Write a program that makes 2 + 2 = 5 - <AUTHOR> http://codegolf.stackexchange.com/questions/28786/write-a-program-that-makes-2-2-5 <comment><USER2> I would like to post on there but it's protected from people with low reputation... Maybe someone here appreciates my solution in C:

      #include <stdio.h>

      int main(int argc, char* argv[]){
      	int arr[1];
      	int a = 2;
      	int b = 2;
      	arr[1] = 3;
      	printf("%d", a+b);

      	return 0;
      }

Explanation: I go out of bounds of the array arr, it only has one value but I access the second value. That's why b is likely to get overwritten with 3 and hence a+b=5

<comment><USER3> I think the line above the printf call should be

        arr[2] = 3;

I ran your program and I got 4. Then I changed arr[1] to arr[2] and got 5, as I expected.

<comment><USER2> It's only likely, but not certain that a or b get overwritten. How your stack is laid out is entirely up to the compiler. arr[1] is already out of bounds, however, we don't know for certain what's immediately above the array.

<comment><USER4> With compiler optimizations turned on, it's almost guaranteed _not_ to happen, because a and b are very likely to be stored in CPU registers.

<comment><USER5> Or rather, a and b will be constant folded so that the printf call is optimized to "push #4; push ptrFmt; call printf"

<comment><USER6> A truly good compiler would replace that printf by a call to putchar or pass a constant string to 'write' (gcc almost (?) does that. See [http://www.ciselant.de/projects/gcc_printf/gcc_printf.html](http://www.ciselant.de/projects/gcc_printf/gcc_printf.html))

</comment></comment></comment></comment></comment></comment><comment><USER7> Here's mine :

        $ cat test.c
        #include <stdio.h>

        int main() {
            int a = 3;
            int b = 3;

            // aren't we supposed to add 2 and 2 ??/
            a = 2;
            b = 2;

            printf("%d\n", a + b);

            return 0;
        }
        $ gcc -W -Wall -trigraphs test2.c 2>/dev/null
        $ ./a.out
        5
        $

<comment><USER8> Very sneaky. For anyone else wondering why this works, look up trigraphs.

<comment><USER9> And after looking it up, you better then realise that if you actually ever use them in production code you better have a _really_ good reason, or your colleagues will forever curse your name..

I think the above is probably the first time I've seen trigraphs used in the last 20 years or so.

</comment></comment></comment><comment><USER10> That Java one is particularly amusing, as most programmers otherwise familiar with the language would never know about the _integer cache_ (and their reaction upon discovering that there is one would probably be the same as mine - _WTF?_ )

Edit: I had a feeling I'd heard of an "integer cache" somewhere else" in a WTF-eliciting context... [http://thedailywtf.com/Articles/The-Integer- Cache.aspx](http://thedailywtf.com/Articles/The-Integer-Cache.aspx) !

<comment><USER11> It also leads to some interesting programming errors in Java.

        class A {
            public static void main(String[] args) {
                Integer a = 100, b = 100;
                Integer c = 10000, d = 10000;
                System.out.println(a == b);
                System.out.println(c == d);
            }
        }

Prints:

        true
        false

For those unaware, the == check above is doing an Object check (are they the same object). The cache makes the '100' return the same instance of an object. To do actual value checks, you'd need to do c.equals(d)

<comment><USER12> what a dumb language! operator overloading should have bound the equals method to the == operator without the programmer having to be aware of this. when in java do you ever want to compare if two objects are the same referenced with the same ptr? Never, so why not do the right thing by the user of the language.

At least be consistent between primitives and objectives.

Sadly, I have to use this language daily. My heart belongs to python, but java pays the bills.

<comment><USER13> You're forgetting legacy and history. Many Java programmers came to Java, myself included, from C (or C++). The == operator in C is a simple register comparison. If you compare two ints the the == operator will return true iff the two int values are the same, but if you compare two int pointers, then equal integer values may or may not be stored at the same address, which is exactly what we're seeing here. Since Java references are pointers, this behavior -- while probably not the right choice -- was _less_ surprising to us, C programmers, than the alternative. Of course, auto-boxing made this behavior even stranger, but autoboxing was added to the language much later.

</comment></comment></comment></comment><comment><USER14> UB abuse in C/C++ Linux x86-64 (works with gcc/clang/icc with any optimization level):

      #include <stdio.h>

      int main() {
        double x;
        printf("Input any number:\n> ");

        if (scanf("%lf", &x) == 1) {
          printf("Is 2 + 2 really equals %g? Let's try!\n", x);
          printf("2 + 2 = %g\n", 2 + 2);
        } else {
          printf("Invalid input!\n");
        }
      }

Output:

      Input any number:
      > 5
      Is 2 + 2 really equals 5? Let's try!
      2 + 2 = 5

Explanation: linux x86-64 calling convention uses xmm registers to pass fp values. In the first printf we initialize %xmm0 with some value. In the second printf we put integer 4 in %esi, however printf reads value again from %xmm0. Here is an assembly in GCC explorer (sorry for shortened link, that's how GCC explorer works): [http://goo.gl/mY9phE](http://goo.gl/mY9phE)

</comment><comment><USER15> JavaScript ;)

[http://codegolf.stackexchange.com/a/29944/12328](http://codegolf.stackexchange.com/a/29944/12328)

<comment><USER16> 7 bytes: !''|2+2

:)

<comment><USER17> 5 bytes: 1|2+2

<comment><USER18> I think all these bytes are not creative. !![]+2+2 ? !''|2+2 ? 1|2+2 ? Why the use of new operators? Why not just write 1+2+2 ?

<comment><USER17> To make many more examples of why Javascript is not a language for beginners.

<comment><USER19>
      var tens = ['10','10','10','10','10','10','10','10'].map(parseInt);
      var ten = tens[tens.length-1];
      var two = ten % 4;
      console.log(two + 2);

</comment></comment></comment></comment></comment></comment><comment><USER20> Here's a Ruby solution that really does modify the + operation:

      class Fixnum
        alias_method :old_plus, :+
        def +(*args)
          old_plus(*args).old_plus(1)
        end
      end

      2 + 2 #=> 5

<comment><USER21> Here's one in Ocaml that modifies the + operator

let (+) x y = match (x,y) with (2,2) -> 5 | (x,y) -> x+y;;

<comment> a-nikolaev A shorter one:

let (+) 2 2 = 5 in 2+2;;

</comment></comment></comment><comment><USER22>
      public class Main {
       	public static void main (String [] args) {
      		System.out.println("5=2+2"); // prints 4=2+2
      	}
      }

</comment><comment><USER23> C:

        #include <stdio.h>
        #include <stdbool.h>
        #include <stdlib.h>

        int nums[5] = {1, 0, 1, 0, 1};
        static int cur;

        int main(int argc, char **argv) {
            for(int i = 1; nums[i] != 5 && i < 10; i++) {
                cur = i;
                if(i/4 == 1) {
                    printf("2 + 2 <= %d = %s\n", cur, 2 + 2 <= i ? "true" : "false");
                    printf("2 + 2 == %d = %s\n", cur, 2 + 2 == i ? "true" : "false");
                    printf("\n");
                }
            }
        }

No strange array writes! No indirect writes at all!

It's finicky and I believe depends on register allocation, but when I compile it using whatever version of gcc-mp-4.9 I have installed from MacPorts at -O3, it outputs, among other things:

        2 + 2 == 5 = true

(For all they say about evil optimizing compilers, it was really hard to make this work.)

<comment><USER24> Can anyone explain? It didn't work for me but still gives odd results depending on optimization level that I don't understand.

<comment><USER23> Because nums is a length 5 array, and the loop condition checks nums[i], GCC assumes going into the loop that i is a valid index, i.e. i <= 4. The division then rules out the possibility that i < 4, so for the purposes of optimization, my version of GCC thinks that i always equals 4 at the printfs, even if it's actually higher.

It's based on an old Linux bug... I should learn more about GCC internals in order to tell tell why I couldn't get it to work without a loop. In general, any sequence where some property not holding would cause undefined behavior to occur allows a conforming compiler to assume it does hold, but for most basic examples neither GCC nor Clang does anything special.

<comment><USER24> Great explanation and fun exploit, thanks!

</comment></comment></comment></comment><comment><USER25> Because I can't post on stackoverflow either, here's my variant in C (requires glibc, and a deprecated function at that).

      #include <printf.h>
      #include <stdio.h>
      #include <string.h>

      int d_cb(FILE *stream, const struct printf_info *info, const void *const* args) {
        int num = (*(int*)(((int**)args)[0])), numw = info->width;
        char str[10], numn = num|numw, *out = str;
        num = num < 0 ? *out++ = '-', -num : numn;
        do { *out++ = '0' + num % 10; num /= 10; } while(num);
        fwrite(str, out - str, 1, stream);
        return 0;
      }

      void init() {
        register_printf_function('d', d_cb, 0);
      }

      int main() {
        init();
        printf("2+4 = %d, 2+2 = %1d\n", 2+4, 2+2);
        return 0;
      }

</comment><comment><USER26> Here's the Perl 6 solution:

      multi infix:<+>(2, 2) { 5 }
      say 2 + 2;  # 5

</comment><comment><USER27> Ruby solution (don't have enough rep to post to codegolf):

      def mad_addr(a,b)
        a == b && a == 2 ? (a.object_id + b.object_id)/a : a + b
      end

Explanation: If a and b are both equal to 2 we can sum the values of the object_id's (the object_id of 2 is 5), and then divide the sum by 2. [Edit to add] For all other numbers this should behave as expected.

I just learned the object_id of 2 is 5 while doing this exercise, and I would like to continue learning more about how Ruby works. So if you have feedback, criticisms, or other ideas regarding this solution please feel free to share :)

[edit: added missing `=`]

<comment><USER28> _a == b && a = 2 ? (a.object_id + b.object_id)/a : a + b_

It looks like you are missing an equals sign on a == 2.

 _I just learned the object_id of 2 is 5 while doing this exercise, and I would like to continue learning more about how Ruby works. So if you have feedback, criticisms, or other ideas regarding this solution please feel free to share :)_

The object_id appears to be the tagged pointer that contains the value cast to an integer. Ruby stores all of its data types using a single underlying C data type (called VALUE in the Ruby source), using the bottom two bits to identify special values that aren't really pointers. This is why Fixnum can only hold 31 or 63 bits instead of 32 or 64 (including sign), for example:

        # Ruby irb on a 32-bit system
        > (1<<30 - 1).class
        => Fixnum
        > (1<<30).class
        => Bignum

See also:

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

<comment><USER27> Thanks, nitrogen. Following your info led to a couple of other neat discoveries, and a bunch more useful material [1].

As a result here are some new ways I learned to get 5 from 2 + 2:

      require 'fiddle'
      a = 2
      b = 2
      Fiddle::Pointer.new(a.object_id << 1).to_value.ceil + b
      => 5

Note: This happens because calling `to_value` on the `Fiddle::Pointer` object returns a Float (2.0000000000000004) instead of Fixnum (which was a surprise to me).

And here's another using `Object#tap`:

      a = 2
      (a + a).tap{|x| a = x + 1}.send(:eval,'a')
      => 5

[1] These links were helpful for me. The last one is an MIT licensed book called, "Kestrels, Quirky Birds, and Hopeless Egocentricity."

[http://stackoverflow.com/questions/1872110/is-ruby-pass- by-r...](http://stackoverflow.com/questions/1872110/is-ruby-pass-by-reference- or-by-value)

[http://patshaughnessy.net/2014/1/9/how-big-is-a- bignum](http://patshaughnessy.net/2014/1/9/how-big-is-a-bignum)

[http://stackoverflow.com/questions/2818602/in-ruby-why- does-...](http://stackoverflow.com/questions/2818602/in-ruby-why-does-inspect- print-out-some-kind-of-object-id-which-is-different)

[http://combinators.info/#kestrels](http://combinators.info/#kestrels)

Edit: line formatting

<comment><USER28> If you want to dig even deeper into the way Ruby works, I recommend trying to write a C extension (or at least reading the documentation):

[http://www.ruby-doc.org/docs/ruby-doc- bundle/ProgrammingRuby...](http://www.ruby-doc.org/docs/ruby-doc- bundle/ProgrammingRuby/book/ext_ruby.html)

</comment></comment></comment></comment><comment><USER29> Asking: Isn't the only true solution the one using Decibels for Addition? Because everyone else either just redefines or overwrites a value. Also addition of decibels cannot be disproofed as fake.

<comment><USER18> After thinking for a while, I found that there is no true answer. If we are not dealing with normal calculating, every answer should redefine the calculating system or value in a tricky way. The simplest answer I can tell related to the addition of decibels is like this:

        function add(a, b): return 5

But it is just not so fun.

</comment></comment><comment><USER30> You know, this would be possible in C and C++ if you add some code at the start of main() that unprotects the executable section, goes through it and modifies each "load 4 in register X" instruction to "load 5", then forks a process that attaches itself as a debugger to the executable to monitor every add and change the result to 5 if it's 4.

</comment><comment><USER31> Lua:

        local debug = require "debug" -- in case 5.2
        debug.setmetatable(1, {__tostring=function(n)
          return ("%g"):format(n+1)
        end})

        print(2+2)

Trying to make 2+2==5 evaluate as true is a lot harder. Although Lua lets you define a custom + operator, it's a fallback not an override.

</comment><comment><USER32> How about the opposite? Make 2+3=4, here in C.

        add2And3(int *a, int *b)
        {
           *a = 3;
           *b = 2;
           printf("%d", *a + *b);  //4
        }
        void main()
        {
           int storage;
           add2And3(&storage, &storage);
        }

</comment><comment><USER33>
      #!/bin/bash
      tty
      if [[ $? -ne 0 ]] ; then
          # command returned nonzero
          echo "not a tty"
      else
          # command returned zero
          n=$?
          ((n=$n+2))
          ((n=$n+2))
          echo "0+2+2=$n";
      fi

</comment><comment><USER34> Haskell:

      let 2 + 2 = 5

</comment><comment><USER35> Simple solution in R:

       > '%+%' <- get( '+')
       > '+' <- function( e1, e2) 1 %+% e1 %+% e2
       > 2+2
       [1] 5

Regards

</comment><comment><USER36> Combining a couple ideas, here's a Go solution

[http://play.golang.org/p/XnPglbkLW4](http://play.golang.org/p/XnPglbkLW4)

<comment><USER37> Could you please explain why this works? How come int(a) produces 2.5?

<comment><USER38> scroll down to find the underhandedness

<comment><USER37> Haha thanks, very nice!

</comment></comment></comment></comment><comment><USER39> You have to add 1 to either the first or the second 2 or to the sum of the two.

</comment><comment><USER40> #lang racket (define (add-bizzare x y) (round (+ (+ x 0.4) (+ y 0.4))))

</comment><comment><USER41> My first thought in Clojure.

      (let [+ (partial + 1)]
            (+ 2 2))

</comment><comment><USER18> The JavaScript answer from @user1886419 is a great joke. lol

</comment><comment><USER42> Julia

      !(a::Int) = !bool(a)
      !0 + 2 + 2

      ##> 5

<comment><USER43> Or more directly:

      julia> +(a::Int, b::Int) = if a==b==2 5 else a-(-b) end
      julia> 2+2
      5
      julia> 3+1
      4

(The else part can't use + or it will cause infinite recursion).

</comment></comment><comment><USER44> why not just overload the + operator in C++?

<comment><USER45> first thing i thought when i read the title:

        #include <iostream>

        class Int
        {
        private:
                int _value;

        public:
    	    Int(int value) : _value(value) {}
    	    Int operator + (const Int& b){ return Int(++_value + b._value); }
    	    friend std::ostream& operator << (std::ostream& out, const Int& value){ out << value._value; return out; }
        };

        int main(int argc, char** argv)
        {
    	    std::cout << Int(2) + Int(2) << std::endl;
                return 0;
        }

output: 5

</comment></comment><comment><USER46> I'm surprised no one has suggested this yet. In python

>Write a program that seemingly adds the numbers 2 and 2

a=2+2

>and outputs 5.

print(5)

Yeah, I know that isn't the intent here, but, following the wording of the contest rules exactly...</comment>


How do international students start businesses in the US? - <AUTHOR> Referring to TechCrunch article "How international students are keeping US colleges afloat and powering the tech industry" <https://techcrunch.com/2016/07/19/how-international-students-are-keeping-us-colleges-afloat-and-powering-the-tech-industry/>
"Specifically, nearly one-quarter of U.S. unicorns had a founder who first came to America as an international student, which shows their path to success often begins on U.S. college campuses."
How do they do it?
I'm currently on an F-1 visa and looking to start a business when I'm on OPT. How do these other founders do it and then get the right to stay?
H1B where their employer is their board? But it's still a lottery
O-1? But it's supposedly a very hard visa to get?
EB-5? But you need $500K-1M
NIW? <comment><USER2> You want us to render advice that covers several legal specialties which converge between state, federal, tax, business, and immigration law, which if wrong, could result in a denial of a visa and untold aggrivation to your business partners? In addition, you want us to tell you the secret on how to found a company that will become a unicorn?

You are an F-1, so you are forbidden from working as statatory employee (immigration law + employement law), except as OPT. You are forbidden from forming a single-member Sub S corporation (tax law). However, there isn't any reason why you can't act as a sole proprietor or single member LLC (depending on state law regarding LLCs). While this violates the spirit of the law, as long as you declare your income on a Schedule C the IRS (tax law) won't care. You will not be able be an employee of the company, but you should be able to take a draw or distribution. If you go this route, should should reserve 30% of everything you make to pay taxes and be prepared to pay estimated quarterly taxes.

If you plan on holding accounts overseas, you need to find a CPA that understands the requirements for reporting foreign holdings. You really need to be asking a good attorney along with an even better accountant, and be prepared to pay for their advice.

</comment><comment><USER3> Judging from the other comments posted thus far, I don't think you're going to find any useful answers here.

The following link seems a lot more informative:

[https://www.quora.com/Is-there-any-legal-way-for- internation...](https://www.quora.com/Is-there-any-legal-way-for- international-students-on-F-1-visas-to-incorporate-and-run-their-own-startup- while-maintaining-the-F-1-visa-status)

If I had to guess: The OPT is extremely flexible - I know of people who literally sat at home unemployed the whole time. So I suspect it should allow you to found a company as well. If that goes well, and if you're able to raise VC funding, that should allow your startup to then hire you on a H1B, or extend your OPT for an additional 1.5 years.

But my main advise is to do a variety of google searches around the above keywords. That should give you a better idea of what your potential options are. Once you understand the problem space a little more clearly, find an immigration lawyer who's willing to do a consultation for ~$200/hour, and have them give you specific legal advise for your situation. Good luck.

</comment><comment><USER4> > H1B where their employer is their board? But it's still a lottery

I don't understand how you plan to start a business when you are being employed by someone else? As in I don't think you can be listed as a founder in the company that is offering you a H1B

> O-1? But it's supposedly a very hard visa to get?

Yes

> EB-5? But you need $500K-1M

Yes.

Ultimately, it is not easy and only a few can _work_ (not start a business) in the U.S. YMMV and you should probably talk to an Immigration Lawyer.

</comment><comment><USER5> I fear the conclusion about colleges may not be justified by its antecedent. Off the top of my head, my impression is that some of the tech leaders who came to the US as students came as children with their parents, e.g. Sergey Brin was six when his parents emigrated from Russia.</comment>


The age of Apple is over – it's become the new Microsoft - <AUTHOR> https://hackernoon.com/the-age-of-apple-is-over-b4570e2a2955#.2n3skee4k <comment><USER2> The first claim this makes - that people don't line up for iPhones any more - is categorically false.

[https://mic.com/articles/154018/people-are-already-lining- up...](https://mic.com/articles/154018/people-are-already-lining-up-for-the-i- phone-7-check-out-the-photos#.a9K3tBy0g)

It sounds fucking insane to me - it always has, and I'm a lifelong apple user - but people still line up for DAYS to buy these things.

The problem is, the media (and social media whiners) are never happy: if Apple makes small steps and incremental upgrades and focuses on making things super reliable/stable, they're considered boring. If Apple takes giant, dangerous leaps and has slight missteps (i.e. Maps) they're considered reckless.

Make up your fucking minds. You can't have it both ways.

</comment><comment><USER3> Really weak article with a sensationalist headline. Very reductionist to say Apple is "over", and the analogy to Microsoft as "unsexy" might be apt, but ironically Microsoft is having a great technological resurgence and has seen rock solid 5 year growth in their stock.

Not to mention that Apple has so much cash in their coffers that they can afford to fail and figure things out for a while. Give them a damn second. There are so many interesting, high-investment bets that these tech giants are making, and I'm looking forward to seeing how they pay off. Self-driving cars, drone technology, AR, VR, ... Who cares about iPhone sales.

> But without Steve Jobs, I can't see Apple pushing the boundaries of these > industries and unlocking their true potential

It's unreal to me how people associate so much of Apple's success and ability to "Steve Jobs". The image of one guy rolling up his sleeves and pushing out all of the successful products and ideas alone is ridiculous. He had help. Apple is fine without him.

And the notion that a company just "peaks" once and it's done is also a complete fallacy. Their trajectory can be full of peaks and dips -- in fact many people would have said years ago that Apple had already peaked, and it was on its way into the dumpster.

Building an expensive HQ, comparing that to banks, what the heck does that have to do with anything ? None of these things are predictors for success or failure. Even if Apple's trajectory was directly in line with a similar company that had once existed and then failed, that means absolutely nothing to predict the future of Apple. You just can't. In my view it shows poor judgement on the author's part to even try and make a call like that, you'd have to be insane to think you had that kind of predicting power.

Apple can live or die for all I care but I think it's a huge leap to say they're "over" at this point...</comment>


Do you trust this computer? (Documentary) - <AUTHOR> http://doyoutrustthiscomputer.org/ <comment><USER2> I highly recommend everyone to watch this great documentary. We all know AI (and robotics) will be revolutionary, as we see it daily in the news and in our social feeds, or we are (enthousiastically) working on AI projects ourselves. This 1,5hr well-made movie brings it all together, and offers a disturbing glimpse into our near future. The revolution is well underway, and it is mostly unregulated.

Watch and share!

You can watch for free until Sunday night, April 8, according to Elon Musk:

[https://twitter.com/elonmusk/status/982119546420002817](https://twitter.com/elonmusk/status/982119546420002817)

If you are (rightfully) worried about where this all leads, come join the non- profit humanetech.com community and provide your insights and solutions for the development of more Humane Technology. We are still small with 1300+ members and need all the help we can get :)

</comment><comment><USER3> Recommended. 8/10 I'd say. The Cambridge Analytica bit was interesting. Musk thinks we'll have superhuman AI within five years.

</comment><comment><USER4> It was OK. Nothing new that wasn't covered in 'Humans need not apply' short documentary.

I wish they'd explored some of the topics a bit more in depth.</comment>


Ask HN: A few seconds for this experiment in progress? (open-sourced when ended) - <AUTHOR> Thanks in advance for your participation :) <comment><USER2> What is it? I don't like to click strange links to complete an unknown task for an unknown purpose. I imagine I'm not alone in that.

</comment><comment><AUTHOR> Here is the URL: [http://188.8.131.52/testoctober2/](http://18.104.22.168/testoctober2/)</comment>


Ask HN: If Software engineering wasn't a high paying job, would you still do it? - <AUTHOR> <comment> 1970-01-01 No</comment>


Lessons from Running a Small-Scale Electronics Factory at Home, Part 2: Assembly - <AUTHOR> https://spun.io/2019/04/28/lessons-from-running-a-small-scale-electronics-factory-in-my-guest-bedroom-part-2-assembly/ <comment><USER2> This is pretty cool! Your last article was great and really helped provide some insight into how hard (and easy) it is to do this.</comment>


Australia's new triangular 5$ coin. - <AUTHOR> http://l.yimg.com/ao/a/trianglecoin130509aap630.jpg

<comment><USER2> FWIW, here are images of other triangular coins: [http://www.dig4coins.com/articles/other-coins/triangular- coi...](http://www.dig4coins.com/articles/other-coins/triangular-coins)

</comment><comment><AUTHOR> Source: [http://my.reddit.com/r/pics/comments/1dz6s2/australias_new_5...](http://my.reddit.com/r/pics/comments/1dz6s2/australias_new_5_coin/)

</comment><comment><USER3> the comments in the source are the really interesting thing, actually.</comment>


Paul Allen's new rocket-launching plane - <AUTHOR> https://arstechnica.com/science/2017/05/paul-allen-showed-off-his-new-rocket-launching-plane-today-it-is-big/ <comment><USER2> IANARS but this plane should give the remaining stage(s) four advantages:

1\. +230m/s orbital velocity [1]

2\. +9km launch altitude [1]

3\. can launch in more weather conditions

4\. 1st stage can abort mid-launch without loss of payload.

Of these, the most important is the increase in launch altitude, because that means stage 2 launches in air of greatly decreased density, leading to the following efficiencies:

A. a vacuum-optimized nozzle can be used, increasing engine performance

B. less aerodynamic/drag energy losses

C. max Q should be lower, allowing full throttle usage, reducing mass needed for structural elements, and reducing vibration stresses on payload

[1] [http://dailym.ai/2soH6FD](http://dailym.ai/2soH6FD)

P.S. Thank you KSP for teaching me this stuff! :D

Bonus: video of pegasus air launched rocket: [https://www.youtube.com/watch?v=jz_5hnIw2jc](https://www.youtube.com/watch?v=jz_5hnIw2jc)

<comment><USER3> The primary advantage of airplane launch is that you can fly to into a launch window for an orbital rendezvous. Otherwise you'd have to wait for the target's orbit to be just right w/respect to the launch site, or do a long orbit matching process.

This is very useful if say you want to very quickly and quietly launch something towards another satellite.

People are making comparisons with the Spruce Goose, but the Glomar Explorer may be a better analogy.

<comment><USER4> The largest downside is the rocket needs to be strong in more than one direction which adds a lot of weight. Sub Mach 1 first stage will save a little net weight but significantly less than you might diets assume.

<comment><USER5> Sure, but the strength it needs to have in the additional "hanging horizontal" orientation is only 1g -- much less than the many-g strength that all rockets need to have along their thrust axis. It adds some weight, but not enough to ruin the other benefits.

</comment></comment></comment></comment><comment><USER6> Scaled Composites built it. It should work. Although Rutan has retired, the company goes on. It's interesting that they didn't connect the tails, like the old Lockheed P-38, but there's probably some good reason for that.

Launching a Pegasus XL has to be just a demo. That's normally launched by dropping it from an old Lockheed L-1011; it doesn't need this monster. They need something bigger to launch. There was a contract with Pegasus for a "Pegasus II", but that didn't work out. The "Dream Chaser" mini-shuttle is a possibility, if that ever gets built.

The 747 engines are probably used. There are lots of retired 747s around, many at the Mojave boneyard. Great aircraft, but a fuel hog by current standards.

<comment><USER7> >The 747 engines are probably used. There are lots of retired 747s around, many at the Mojave boneyard. Great aircraft, but a fuel hog by current standards.

Correct. They just flew in two used 747s and cannibalized them for parts. [http://www.seattletimes.com/business/boeing- aerospace/paul-a...](http://www.seattletimes.com/business/boeing- aerospace/paul-allens-giant-plane-takes-shape-in-the-desert-but-its-market-is- unclear/)

> _The crew's flight deck is literally that of a 747._

> _Allen bought two used jumbo jets formerly flown by United Airlines and > cannibalized them for parts that account for about half the empty weight of > the Roc._

> _So although the shell of the cockpit and all the rest of the plane's body > is new — hand-built by Scaled Composites from carbon fiber composites — > various key pieces and systems, including avionics, hydraulics and fuel > subsystems, are salvaged 747 parts. BAE Systems was subcontracted to > disassemble the 747 and install its systems on the Roc._

> _The cockpit seats look old and used because they are. The seats as well as > the controls the crew will manipulate and the windows they'll look out of > all came from the 747s._

> _So did the plane's six Pratt & Whitney engines, which are already > refurbished, cleaned, wrapped and set aside in a corner, ready to hang on > the airframe when it's finished._

<comment><USER5> That's absolutely how I would've done it. Way cheaper to make a monster hybrid of two used 747s than to try to make a one-off custom airplane from scratch. Sure, it won't be as efficient at its job as if it were purpose-built, but you'd never get all of that R&D money back.

<comment><USER8> Once the concept is proven, once there is a real market for that, other, more efficient planes designed for bigger rockets will be built.

<comment><USER5> The market would have to be really large (like way larger than the current global launch market) to justify it though. The conjoined twin 747s are gonna be good enough for any payload that they can carry.

<comment><USER8> If the cost goes down enough, new previously impractical products become practical, driving new demand.

<comment><USER9> Big _if_ there.

The Seattle Times article says that the Vulcan rocket will have a mass of 375 tons. (Probably US tons?) Assume it's got the same payload fraction as a Soyuz, about 2.5%, which means it can put 9.4 tons into orbit. (A Falcon 9 can put 22 metric tons into orbit)

According to some comment on stack exchange, the world collectively orbited 255 tons of stuff in 2007. Assuming every payload can be launched on a Vulcan rocket, (Which they can't) and assuming a generous turnaround time of one week, (Allen says it should be faster than that) then it would take only a single plane 27 weeks to satisfy the launch needs of the _entire world._ You could double the amount of stuff launched, and still only need one plane.

There's probably not going to be a lot of airframes to spread development costs across.

<comment><USER8> Either that, or we will launch a lot more stuff, 9 tons at a time.

The biggest thing going against it is it's not clear this scheme can drive the costs down enough to double or triple the launched mass per year. There is a limited number of things we can do in space. A significant part of the cost of any single probe is the launch.

If we can reduce launch costs enough (maybe making the booster reusable) and through building a standard probe with pluggable sensors, drive down the building costs, we could have dozens of probes going places we currently can't afford to go. We spend enormous effort in shaving off every single gram from anything that goes to space. If going to space gets cheaper, we can spend a lot less time shaving probes and more time probing.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> This is being blown out of proportion. Vulcan's Stratolauncher is not the future of launch; if this thing ever manages to leave the ground (with a payload), I doubt it will host more than five-to-seven launches throughout its lifetime, and that's a generous estimate.

This vehicle is going to be incredibly expensive, compared to both other air launch options and dedicated smallsat options. Although this can change, the current plan is for Stratolaunch to use OATK's Pegasus-XL payload, which provides an indicator for cost. Pegasus-XL launches are incredibly expensive ($337.3K per kg). Now, this is due to a variety of reasons (the L-1011's incredibly high maintenance costs, OATK's expensive labor structure, low launch cadence). Vulcan will bear similar costs--the inefficient OATK overhead tied to Pegasus-XL, Stratolauncher is a one-of-a-kind aircraft and increasing maintenance costs (despite using 747 engines). Due to significant development delays, the company has yet to develop or execute a customer strategy. Depending on how much more PA pumps into it, the company will not be price competitive in the market.

For comparison, other small launchers charge ~$25K/kg-$41K/kg (e.g., Rocket Lab, Virgin, Arianespace), and most of these will be able to launch US payloads. Virgin's comparable airlauncher delivers slightly less mass (15 kg less), but is priced at ~$40K/kg. Virgin is already a leg up as it has engaged commercial, civil govt., and mil-govt. customers.

Lastly, it's worth noting that this vehicle still has significant work to be done--look at the wings in the picture.

<comment><USER11> Hi there,

you seem to know a lot, any chance we could talk about this topic, would love to hear more of your thoughts on the topic? I don't see an address to contact you.

Thanks!

</comment></comment><comment><USER12> This is awesome but a little bit scary. Interesting that they didn't physically connect the tail wings at all, I wonder what stresses and torques the main wing will endure under maneuvering or turbulence. I assume all the control surfaces are computer controlled to synchronize and minimize that, but from the perspective of an ignorant observer, looks a little fragile.

<comment><USER13> it's a proven design.

scaled composites, which built this also built the GlobalFlyer with similar configuration.

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

<comment><USER14> Clearly Allen and his team did the necessary engineering work, but I'm not sure the GlobalFlyer is a good example. It had a single mid-mounted engine, and had a gross, fully loaded weight of 22,000lbs. This thing has 70,000+ lbs of engines alone. The torque has to be absolutely colossal.

Again, I know that much smarter people did the math, but from the eye check this does not look like a tenable design.

<comment><USER15> I agree. There are so many forces at such incredible potential levels of torque that the center wing must be almost entirely full of structural elements... and those probably pass through to the outer wings.

Imagine differing oscillations of pitch or yaw from each fuselage happening at the same time... and at just the right/wrong frequency for the connecting structure.

I'm sure I'm just overly paranoid, but often we find out long after something is built that some "little possibility" was overlooked.

<comment><USER12> _> Imagine differing oscillations of pitch or yaw from each fuselage happening at the same time... and at just the right/wrong frequency for the connecting structure._

Exactly. I expect they have real-time computer control of all control services that quickly adapt the relative attitude of both fuselages to prevent over- stressing the wing, but what about "rogue waves" of turbulence hitting each fuselage differently. What's the safety factor on both the adaptive controls and, as a backup, the structural integrity of the wing?

</comment></comment></comment></comment></comment><comment><USER16> 385-foot wingspan

1.3 million pounds

65 feet

2,000 nautical mile

I'm sorry, I know it has been mentioned a billion times already, but can someone make a browser plugin that converts everything on a website to normal SI units? As a non-american I have no idea how big this aircaft is or how much it can lift - sure I can look up conversions(I have) but it would be awesome if there was an automatic website conversion option.

<comment><USER17> Just type the quantity and units into google.

<comment><USER16> As I said in my comment - I have. I just said it would be awesome if there was some automatic conversion option.

</comment></comment></comment><comment><USER18> It seems like air launch doesn't buy you a whole lot, but it turns out that a small win on delta-v can result in a fairly big win on payload. This might seem counter-intuitive, but you have to remember that in orbital class rockets, payload is only 5% or so of total mass at take-off.

<comment><USER19> It's a small win on delta V, a small win on gravity losses, and a small win on Isp (due to atmospheric pressure). The delta V and Isp wins are exponentially related to stage mass fraction so they actually become very big wins.

</comment></comment><comment><USER20> Any more billionaires feeling left out of the space race?

<comment><USER21> Should we worry that every billionaire seems highly intent on building ways to get the heck off the planet?

... Do they know something we don't?

<comment><USER22> No. We already know that the planet will undergo drastic changes in the next 100 years.

</comment></comment></comment><comment><USER23> I'm confused as to what this thing can accomplish. It can probably fly very high, but I assume it can't fly very fast (relative to orbital speed), and I thought the overwhelming majority of the delta-V to get something into orbit was for forward momentum and that just launching from higher up wouldn't help much.

Clearly there's something I'm missing here (or they wouldn't have built it), can anyone fill me in?

<comment><USER24> From wikipedia [1]:

>Atmospheric and gravity drag associated with launch typically adds 1.3–1.8 km/s to the launch vehicle delta-v required to reach normal LEO orbital velocity of around 7.8 km/s (28,080 km/h).

So it'll help. Also significant is the ability to base out of an airport and launch closer to the equator.

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

<comment><USER25> Combine that with the tyranny of the rocket equation and it becomes sensible.

<comment><USER24> Right. Reducing the delta-v by a constant amount reduces the fuel requirements by a specific percentage. The correct thing to measure delta-v savings to isn't the launch requirements, but rocket exhaust speed. That is, if your rocket exhaust speed is 1 km/s, saving a km/s of delta-v will reduce your fuel requirements by a factor of 2.718

</comment></comment></comment></comment><comment><USER19> This is pretty cool but to be honest I don't expect it to be very advantageous.

The big advantage of airlaunch is the Isp improvement from launching at altitude. Since the rocket equation is exponential with respect to the ratio of delta V and Isp improving Isp even a little has big effects, and reducing delta V even a little does too.

But the big advantage of ordinary vertical launch rockets is that it's fairly straightforward to just make them bigger. The Saturn V was able to launch Skylab with a 6.6 meter diameter. And rockets could easily be scaled up to launch even larger diameter payloads. That's pretty difficult with something like Stratolaunch. Even with basically the largest aircraft ever made it still has a pretty small payload mass and fairing size.

One other cool thing about stratolaunch is that it has the ability to launch out of a lot more locations since it doesn't depend on a launch pad and tower. However, I suspect that's not going to be of huge importance.

I'd like to see what they can do with this technology but I suspect it'll be underwhelming.

</comment><comment><USER26> Since the Orbital ATK Pegasus already exists and already has a customised plane it launches from, can we assume launching Pegasus is just phase 1 for this plane? If that's all it's going to do there would be no point. So presumably this has capabilities the current Pegasus launch plane doesn't have, and eventually we'll see it launching something like a Pegasus XL Plus? Do we have any indication how big a rocket this thing can carry?

Also, I wonder how this compares in capability to the XS-1 currently under development, which will be a vertically launched first stage rocket that can fly back for a runway landing.

Edit: just found the link below from last year on Space.com.

[http://www.space.com/32680-stratolaunch-rocket-vulcan- aerosp...](http://www.space.com/32680-stratolaunch-rocket-vulcan-aerospace- mystery.html)

<comment><USER27> Originally it was going to use a Falcon 5 Air, and later a Pegasus II. Both projects were cancelled.

</comment></comment><comment><USER28> This is a very good idea. In rocketry, air is your enemy. At the speeds rockets move it causes enormous heat/mechanical stress on the rocket, drag energy losses, and it messes with the flow of matter out the back of the engine that provides your thrust.

With a jet engine, air is your friend, because it _is_ the matter you spit out the back of the engine. And at the much smaller speeds of an airplane, mechanical and thermal stresses are much smaller.

</comment><comment><USER29> Dumb question: why don't they launch rockets from the tops of mountains?

<comment><USER30> Related question: Couldn't we create some sort of rocket elevator with huge and very high balloons?

<comment><USER31> [https://what-if.xkcd.com/58/](https://what-if.xkcd.com/58/)

<comment><USER32> The point isn't to get higher up, the point is to get out of the damn atmosphere so you can use wider bells, lower chamber pressure, and lighter weight tankage.

</comment></comment></comment></comment><comment><USER33> The article doesn't mention SpaceX, I wonder what's the difference in energy and cost for launching (and landing) the relative stage 1s. Does anyone have an idea on that?

<comment><USER34> At separation, Falcon 9 first stage is doing about 2500 meters/second and is at about 70km altitude. The two connected 747s flying in formation don't get that fast (or that high, but horizontal velocity is much more important).

</comment></comment><comment><USER35> Paul Allen isn't alone in this endeavour. The field is actually getting quite crowded:

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

</comment><comment><USER36> I feel overcome by the Dianne Kruger effect, to an extent I don't remember feeling any time recently. I'm becoming more and more interested in news about rocketry (due to SpaceX of course) but I'm still a full on space-pleb. I see something like this and my intuition screams "Woah! Of course! Why don't other rocket companies do this? What's wrong with them?!"

But the rational part of my brain kicks in and slaps me down for being so arrogant. It feels humbling to be reminded how stupid one can be.

<comment><USER37> Dianne Kruger......?????

<comment><AUTHOR> The Dunning-Kruger effect: The idea that people of low skill or knowledge about something don't know how much they don't know and thus think they're much better at it then they actually are.

[https://en.m.wikipedia.org/wiki/Dunning–Kruger_effect](https://en.m.wikipedia.org/wiki/Dunning–Kruger_effect)

<comment><USER38> was dianne his wife?

<comment><USER37> Thank you for getting it.

</comment></comment></comment></comment></comment><comment><USER39> I'd really hate to see that thing land in a crosswind, I don't think I could watch it.

<comment><USER40> They could always use a chase car like they do with the U-2 Dragon Lady because of its ridiculous wing span. This wouldn't help you avoid watching it, though. youtu.be/W2tnCDBkIoI

<comment><USER39> That pilot is an artist. Such a narrow gear stance on such a huge wingspan and he lands it perfectly. Wonder how many times it went wrong versus how many times it worked.

</comment></comment></comment><comment><USER41> Does anyone have any insight into how the dual flight decks are utilized?

<comment><USER42> There's only one flight deck and it in the right-hand fuselage. I was at a recent friends and family day at Scaled Composites and was able to see and touch this amazing plane.

<comment><USER43> Both fuselages seem to have identical windows. Is that just so they can use the same tooling for both, or is there something else in the left fuselage? Passenger/observer seating, maybe?

<comment><USER5> The fuselages are used 747s that were repurposed. They have identical windows because of the design of a typical 747, not anything purpose-specific to this mission.

</comment></comment></comment></comment><comment><USER44> Has anybody tried launching a rocket from an airship/dirigible?

</comment><comment><USER45> This might be a dumb question, but it looks like there are two cockpits on this plane. I imagine the plane is drive by wire, so it doesn't matter where you are on the plane. Why do they have two?

Extending my question further, why does this plane have a cockpit at all? Isn't this something you could remotely pilot, especially to mitigate the potential risk of being at 30k feet with thousands of kilos of RP-1 or similar?

<comment><USER5> They just bought two used 747s and stuck them together. Way more work to remove the cockpits than just leave them intact on their individual airframes.

Hell, for all we know, this could be remotely piloted.

</comment></comment><comment><USER46> The really interesting question - does the modest increase in initial velocity and altitude with a boost out of the lower atmosphere make it practical to build a Single Stage To Orbit rocket? If they can, then it's an impressive achievement. If not, then it doesn't really seem worth the trouble.

<comment><USER32> The altitude boost is certainly not worth the work. The velocity from the plane is small but since fuel requirements go up exponentially with necessary velocity every bit helps.

More important than that is that the rocket doesn't have to punch through as dense of an atmosphere when getting up to speed. That means you don't have to reinforce the rocket as much since it's maximum dynamic pressure (maxQ) is lower giving you a better mass ratio and it means that you're not losing as much delta-v to air resistance but that's only another 100 m/s or so for a decently sized rocket like the one being launched here.

But more importantly you can design your engines so that they don't have to work at higher atmospheric pressures.

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

A Merlin engine with a bell designed for taking off from sea level has a trust at sea level of 845 kN but a thrust in Vacuum of 914 kN all while burning the same amount of fuel. And a Merlin with a nozzle sized for vacuum use can go up to 934 kN when firing in vacuum, again for the same fuel flow rate.

</comment></comment><comment><USER47> The general idea like USSR's An-225 Buran tandem within MAKS program [https://en.wikipedia.org/wiki/MAKS_(spacecraft)](https://en.wikipedia.org/wiki/MAKS_\(spacecraft\)) and it's 25 years old.

</comment><comment><USER48> The article claims that it hold's the record for largest wingspan, which is 385ft. It then goes on to say that this blows away the previous record of 65ft. I don't know what the largest wingspan is, but I thought B-52s had a wingspan of 185ft? Error in the article?

<comment><USER49> Blows past the previous record _by_ 65 ft. The Spruce Goose[0] had a wingspan of 320 ft.

(It's possible the article has been updated since you saw it to correct that.)

[0] [https://en.wikipedia.org/wiki/Hughes_H-4_Hercules](https://en.wikipedia.org/wiki/Hughes_H-4_Hercules)

</comment></comment><comment><USER50> Really interesting thing is the flat walls on the fuselages. They were done that way for ease of construction, and are not pressurized containers therefore don't suffer from stress singularities at the corners.

</comment><comment><USER51> Why not the other way round?

Have a plane take off with a small load and have rockets connect with it at it's highest altitude and push it into orbit.

expended stages could reconnect with another plane of the same model on the way down.

</comment><comment><USER52> I wonder if they considered a half-loop launch, toss bombing style. That way they could dump the wing, perhaps at a price of higher strength requirements.

</comment><comment><USER53> I can just imagine him up there in the plane, listening to Huey Lewis and the News.

<comment><USER54> I'm confused by this. I don't know if Paul Allen is a Huey Lewis fan. What I do know is that he's a big Jimi Hendrix fan.

Allen basically built a museum to (mostly) Hendrix. It's since been re- purposed somewhat, and Wikipedia doesn't have much of the history. But originally the museum was mostly Hendrix. Here are links to a few early articles that make it clearer:

[http://www.independent.co.uk/travel/americas/in-search-of- ji...](http://www.independent.co.uk/travel/americas/in-search-of-jimi-hendrix- in-seattle-9131310.html)

[http://www.voodoohendrix.com/jimi-hendrix- museum/](http://www.voodoohendrix.com/jimi-hendrix-museum/)

<comment><USER55> It's a reference to American Psycho.

[https://www.youtube.com/watch?v=vzN3qO- qc8U](https://www.youtube.com/watch?v=vzN3qO-qc8U)

[https://www.youtube.com/watch?v=cISYzA36-ZY](https://www.youtube.com/watch?v=cISYzA36-ZY)

</comment></comment></comment><comment><USER56> Nice to read how people are so out of touch when they reach to certain threshold.. lol where mark suckerberg rackets ?</comment>


WebKit to get CSS variables, mixins, nesting? - <AUTHOR> http://johanbrook.com/quickies/webkit-css-variables-mixins-nesting/

<comment><USER2> I wonder, why introduce (yet) another syntax, not <style type="text/x-sass"> (or text/x-less) support. The latter can be used in supporting browsers natively, while there are existing JS helper libraries to provide support to other browsers.

<comment><USER3> Using SASS would be introducing Yet Another Syntax. 99% of people who write CSS will never have used or heard of SASS.

<comment><USER2> Sorry, but this sounds illogical to me. How introducing some additional _new_ CSS syntax is less Yet Another Syntax than just using some already established (but not popular) syntax? SASS has its user share (and easy to learn too) and new syntax has no users at all.

<comment><USER3> The new syntax has no users at all sure, but CSS has far more users than SASS or LESS will ever have. You're asking web developers and browser developers to learn and support a completely different technology, rather than adding an incremental, much needed improvement to something that has been used for many years.

</comment></comment></comment></comment><comment><USER4> Mixins seam the be the most useful feature to me, the other two seem more like syntactic sugar to me.

</comment><comment><USER5> Strikes me as over complicated. Add variables to CSS. Done.</comment>


The Original Serverless Architecture Is Still Here - <AUTHOR> http://engineering.khanacademy.org/posts/original-serverless.htm <comment><USER2> I still remember the absolute shock GAE was to me.

Back in 2006, for a lot of people when you wanted to run a service, you configured your own LAMP server. Once everything was running, you didn't touch it and hoped there was not going to be a power failure.

Then GAE came and for the first time you got security updates, uptime, and automatic scaling without having a dedicated sysadmin. Needless to say that I've been a customer and advocate of this service from the beginning. My oldest service is still running. I just had to update a .yaml file twice... in a decade.

It's kind of sad the amount of people that are wasting their time administrating their own servers when it could be done automatically. I suspect the hype around k8s will waste millennia of man-power.

<comment><USER3> > It's kind of sad the amount of people that are wasting their time > administrating their own servers when it could be done automatically.

It is, provided your service fits GAE's limitations. If it does, great! Otherwise, you are out of luck.

People are running a lot more workloads than LAMP servers.

<comment><USER4> I guess the same goes for Lambda.

</comment></comment></comment><comment><USER5> Title should be "GAE is an example of serverless developed in 2006" ( year might be wrong)

Actually, as well known, nothing is new in computer science. Ubiquitous computing grid computing and many other ideas I am not aware of, are all rather similar to server less in the sense of granting application developer the least friction of accessing computing resources.

</comment><comment><USER6> The trend is to have applications use less memory. On bare metal an application used all memory, a virtual machine has the OS overhead per application, on a container an application uses just one process, and with serverless even the processes can be reused.

If I understand correctly AppEngin uses containers that do not re-use processes, so not serverless according to the above classification.

I wonder why AppEngine didn't take off, the best answer I heard was that the security sandbox was too small and people wanted more flexibility. What do people think?

BTW As for Functions-as-a-service (FaaS) we're thinking about running the Lambda code (which is open source) on Kubernetes [https://gitlab.com/gitlab- org/gitlab-ce/issues/43959#note_74...](https://gitlab.com/gitlab-org/gitlab- ce/issues/43959#note_74835448) how hard would that be?

<comment><USER7> I tried to use GAE back in the day, and it suffered from cold-start issues. Same story as if you tried to develop lambda-backed website with Java on AWS, and your lambda may take 20 seconds to start from cold.

<comment><USER6> Interesting. Heroku had cold start issues when you were on the free tier and didn't have any questions for a couple of minutes. Did GAE work the same?

<comment><USER7> Yes, exactly. They would shut down your container (or whatever it was).

<comment><USER6> Makes sense. With Heroku I used to run a monitoring service that made a request every minute to prevent this.

</comment></comment></comment></comment></comment><comment><USER8> Every time you use the term "serverless", a small, innocent puppy dies.

At least "the cloud" didn't mean anything. This is worse, because it's misleading. There's a server involved and you know it. Anyone who hears it for the first time initially thinks it means "oh, so there's no server involved, it either runs on the user's local machine or uses a peer-to-peer infrastructure".

Then you have to google around and find out that it actually refers to the notion of having someone else maintain the server for you, just as was the case for CGI scripts on shared web hosts people were writing 20 years ago. Only once you realise this does it start to make sense.

<comment><USER9> It's like wireless.

There are most definitely wires, they're just not yours, and you don't have to worry about them.

<comment><USER10> That's a weak analogy, since the vast majority of products that are called "wireless" really are substituting, with radio (or optical), for products that would otherwise use wires.

</comment></comment></comment><comment><USER11> Isn't GAE PaaS? I thought serverless meant programs that served only individual endpoints, like AWS Lambda.

<comment><USER12> You get a list of responses you need to handle. Nothing says your binary only responds to one, or that there is a 1-1 correspondence.

</comment></comment><comment><USER13> This isn't an article on PHP served from shared/managed hosting, is it? ;)

<comment><USER14> This actually is a good thing to point out IMO. This model did sort of resemble a primitive version of serverless; that's why it was so popular. It was quick, easy, and affordable despite it's many downsides.

<comment><USER13> If the downvotes are any indication, apparently pointing this out is less popular than the model itself.

</comment></comment></comment><comment><USER15>
        - Serverless you say, hmmm, like pushing code,
          and having *a server*, any server execute it.

        - Yep.

        - We had it a decade ago, prior to the Cloud,
          prior o the VPS, it was called CoLo. You were
          pushing php code, and it worked on a server
          we did not care about..

</comment><comment><USER16> Most of the cloud providers moved away from metered database pricing, and into provisioned tiers. SimpleDB is an example of that early spirit. FaunaDB (my employer) aims to fit serverless deployments like a glove. You can get started here: [https://blog.fauna.com/serverless-cloud- database](https://blog.fauna.com/serverless-cloud-database) or go deep here [https://serverless.com/blog/faunadb-serverless- authenticatio...](https://serverless.com/blog/faunadb-serverless- authentication/)

<comment><USER17> I am very excited AWS Aurora will 'soon' be available as 'serverless': a full sql database that comes up almost instantly ([https://aws.amazon.com/rds/aurora/serverless/](https://aws.amazon.com/rds/aurora/serverless/))</comment></comment>


GPS uses 10 bits to store the week. That means it runs out after April 6, 2019 - <AUTHOR> https://www.theregister.co.uk/2019/02/12/current_gps_epoch_ends/ <comment><USER2> Not one of the better design decisions, but then again, who anticipated it would become civil-oriented and thoroughly ubiquitous? My ancient Garmin handheld survived the last rollover but not without consequences: After the rollover it couldn't fast power up anymore and needed to grab the entire almanac to find itself again. Not an issue suction cupped to the yoke of a Warrior but inconvenient everywhere else.

</comment><comment><USER3> interesting. on another note am i just not getting the pun or something? "Nav gadgets will be Gah" can someone tell me what "Gah" is?</comment>


Ask HN: Examples of good NFC android apps - <AUTHOR>

If you were to chose, what nfc app do you need on your android device <comment><USER2> The only one I've used so far on my Galaxy Nexus is FareBot: <http://codebutler.github.com/farebot/> It can read the data off my Clipper transit fare card here in the Bay Area.</comment>


The dangerous downsides of perfectionism - <AUTHOR> http://www.bbc.com/future/story/20180219-toxic-perfectionism-is-on-the-rise <comment><USER2> _"They give up more easily. They have quite avoidant coping tendencies when things can 't be perfect." That, of course, hinders them from the very success that they want to achieve. In his 60-plus studies focusing on athletes, for example, Hill has found that the single biggest predictor of success in sports is simply practice. But if practice isn't going well, perfectionists might stop. It makes me think of my own childhood peppered with avoiding (or starting and quitting) almost every sport there was. If I wasn't adept at something almost from the get-go, I didn't want to continue – especially if there was an audience watching._

Ugh. Been there, done that. I remember skipping the first year of fast pitch baseball because I was sure I'd never be able to hit the ball. It simply wasn't true and can only have set me back when rejoining the following year.

I assumed perfectionism was generational or at least cultural. It's distressing to see it's widespread and increasing. The studies put a fine focus on the need to get smarter and model healthier responses to mistakes for the next generation.

<comment><USER3> > In his 60-plus studies focusing on athletes, for example, Hill has found > that the single biggest predictor of success in sports is simply practice.

I mean apart of genetic makeup - if you have wrong genetics no amount of practice will help you.

<comment><USER4> That's a terribly self limiting mindset.

<comment><USER3> It is reality. Someone with large hands has huge advantage over someone with small ones in competitive swimming. Someone with a lot of red muscle fibre will grow stronger then someone with white one in weight lifting. Weight lifters are not small by random either. Pretending it is not so is just lying to yourself or worst if you make moral virtue out sport.

<comment><USER4> I'm not doubting effects phenotype has on abilities in specific areas. Just that the mental model of "I can't" is very limiting.

Just because your phenotype isn't ideal for a thing doesn't mean you shouldn't do it.

Also there are a large array of phenotypical that are harder to identify through testing than just giving it a go and seeing how you go / enjoy it.

<comment><USER3> We were talking about predictors of success. You can do sport recreationally or for fun, but that is not what is meant by "predictor of success". If your goal is to have success in competition, you will compete against people who have right phenotype. In which case it makes more sense to look at sport that might suit you.

Also, if two students start weight lift and he grows faster then you, the reason might not be that one is simply lazy and the other simply trains harder.

<comment><USER5> Clearly you can find numerous cases in sports of individuals overcoming physical limitations by finding alternate pathways to success (take for example short/shorter NBA players). Furthermore, those with "good genes" do not always find success. In competition, preparation and luck far outweighs the gene factor.

<comment><USER6> Only for sports which have a heavy "skill" bias, where at the competitive limits skill is a major determining factor.

It's not true in all sports. E.g. Long distance running, cycling etc where skill plays a much lesser role.

<comment><USER5> > E.g. Long distance running, cycling etc where skill plays a much lesser > role.

If this were the case then only those with the highest, humanly achievable VO2 max levels would dominate the sport. But this isn't the case. Why? It's just a single contributing factor (in a vast sea of contributing factors) which can lead to success. I would argue a motivated athlete with a "can-do" spirit, but lower V02 will be more successful than any unmotivated athlete with a high V02 level.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> I haven't looked at it specifically from the perfectionism vs conscientiousness perspective, but this jives with what I've been doing to reduce my overall anxiety levels.

I used to perceive various small failures, often just things like not doing chores on time, as a _big deal_ and a sign that I'm failing as a person. This, of course, is not productive at all, saps my energy, and often results in me failing even more. But when you truly believe that it _does_ make you a worse person, you feel as if you deserve these side effects...

It's a long story of how I got there but at one point I decided that I'm not going to give any non-major failures much credit and advance from them as soon as possible. It's really nice to be able to look at a small error, say "whoops", and move on to fixing it. I sometimes still relapse to the old way of thinking but it's a huge weight off one's shoulders. But it is also so weird to just say "Yes I was really wrong about that, and I really shouldn't have done this. But that's OK, moving on."

What I've found, though, is that this is not really the kind of philosophy the average person I talk to actually has. The implication that one is a failure if they do not complete certain chores efficiently, or don't do certain things, or don't know a given technology, or don't lose weight, is common. So is giving people a very limited amount of chances before they're marked in some negative way. Perhaps I am simply imagining it because it's something I'm used to, but we may just be living in a fairly perfectionist environment. The article appears to confirm this.

I think ultimately it comes down to the idea that people make mistakes _naturally_ (i.e., automatically) and might end up in unfavorable situations through no fault of their own. From here, you can accept errors as a fact of reality that happen _to_ you, as opposed to _from_ you, which makes them much easier to rectify. If you don't believe this, all those minor mistakes are then your sole responsibility, so it makes more sense to feel guilty for them.

<comment><USER8> "You never fail until you stop trying."

― Albert Einstein

I'm doubting this attribution is correct but the quote itself summarizes this approach nicely.

Mistakes do come naturally. Life is a probabilistic game of guessing what outcomes we will reach after making actions with restricted knowledge of the circumstances. Failing is imminent sooner or later. The sooner the better or loss aversion kicks in and we end up doing nothing, which most often is the worst action leading to a pit of cascading failures.

</comment></comment><comment><USER4> I consider myself a recovering perfectionist.

It used to be that, all my code had to be perfectly understandable, all my variable names the perfect metaphor / concept, my architectures the most scalable etc.

I found that the anxiety of having to make hundreds of correct decisions everyday left me exhausted. Ultimately it was not sustainable. I would agonised over tiny details for extended period of time.

I was eventually exposed to and much later internalised the idea that there are three types of decisions:

1\. those you get right 2\. Those you get wrong 3\. Those you don't make

Anything is better than 3 in a non-life or death situation. If you're trying to learn 1 is not so important and doing 2 is the only way to truly learn.

<comment><USER9> It's a resource allocation problem. You've only got so many hours and energy in a day. I think the trick is to learn to recognize which code is more important and spend effort where it is needed.

I think it would help if as a community we would recognize that sometimes writing crappy code is OK, as long as it's a conscious decision and.

</comment></comment><comment><USER10> Disappointing that it doesn't mention "maximizers vs satisficers" which is a good way to look at things.

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

</comment><comment><USER11> Does anyone else sort of enjoy some tenets of perfectionism? I write songs and often drive myself nearly insane trying to get every detail right.

But there is a nice feeling knowing that what you've finished is as good as it can be, because you've exhausted every damn option.

<comment><USER12> If you can use perfectionism as a motivator, it can be very powerful and drive you - sometimes - beyond what you thought was even possible.

But it can backfire. Either because you may at some point not know where to stop, or because you are so intimidated by the idea of not getting it right you do not even dare to begin.

</comment></comment><comment><USER13> I can believe that the single most important predictor in sport (indeed many things) is practice. I suspect, however, that what also matters immensely is the kind of practice. For instance, often those in the gym that measure practice as "runs x distance in y time" or "do X exercises for Y weight in Z reps" are far, far more effective than those whose sole metric is "spend X amount of time doing Y'. It's the same with studying: I remember during my undergrad I saw people spending hours and hours "revising" by simply reading the math book back to front. I think a lot of people work hard but not necessarily as effectively as possible. People need to learn how to learn.

<comment><USER3> Imo, practice is most important predictor in sport only after you excluded all the people who are, depending on sport, too tall, too short, have too small hands, too short attention span, have wrong kind of muscle fibre (white vs red) etc.

<comment><USER14> > have wrong kind of muscle fibre (white vs red)

How can you find out which one you have?

<comment><USER3> To get quality result, they take sample of your muscles. Dont do it at home.

Less precise but easily available test: [http://www.topendsports.com/testing/tests/muscle-fiber- compo...](http://www.topendsports.com/testing/tests/muscle-fiber- composition.htm)

</comment></comment></comment></comment><comment><USER15> Perhaps it's our media saturated culture with its constant images of perfect, beautiful, successful people? It may also be a lack of a grander purpose in life, so every little goal becomes all consuming.

</comment><comment><USER16> I don't identify with the self-criticism or the rage much at all. For me the problem with perfectionism is just how good it feels to edit every little word of an email or comment compared to stuff that actually needs to get done.

<comment><USER7> Perfectionism is a bit more loaded term than this, I would just call this attention to detail / enjoyment of order. If you don't dislike yourself when you send an email with typos, it's probably not perfectionism.

<comment><USER17> I Agree. It really is debilitating for those that have it in its truest form. From the ridiculous amount of time it takes to do simple tasks to the amount of anxiety you get when you know what you have is good enough and there's a deadline approaching and/or you have a ton of other things to do, but you just can't call it quits because of all those little details that aren't up to standard.

And it makes it even worse when you're spending this extra time to go that extra mile and you're fully aware how nonsensical and irrelevant it all is but still can't let it go.

</comment></comment></comment><comment><USER18> Perfect is the enemy of good.

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

<comment><USER8> Somewhat related:

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

[https://pchiusano.github.io/2014-10-13/worseisworse.html](https://pchiusano.github.io/2014-10-13/worseisworse.html)

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

</comment></comment><comment><USER19> I only heard the bad sides of perfectionism in the last 3 years honestly.

</comment><comment><USER20> In college I felt like anything was possible.

I felt the failures around be needed to just delay gratification, and work hard, because life is difficult.

I looked at my classmates, and thought they were just not serious, and needed to work harder.

After all, going to school is easy. (I still belive the worst day at school is better than any day I spent in construction.).

I'm chugging along. I'm thinking about how short life is. I'm thinking about that vague pain in my head. The pain the Neurologist said wasen't psychological, because the pain was coming from cranial nerve locations in my skull. (I forgot to tell him I used to read through Grey's Anatomy for recreation.)

I thought I was doing well. Doing great in school. Keeping down a job. I really felt I could do anything.

I was lonely though. I broke up with my college girlfriend a few years earlier --why--for no good reason? Just young, and dumb.

My vague head pain was my daily friend.

I was toying with getting two professional degrees. Why not? School is easy. Just delay gratification. Don't mess up your life with chaos, and all the drama of a relationship.

Then a classmate died of a anyurism. I didn't know the kid, but he was the image of health.

It wasn't long after I went home for a holiday, and at around 11:30 pm, I had a panic attack. A scary one, but I had minor ones before, so no big deal. I'll just go to sleep, and feel great on the morning.

Wake up at 8:30 am, and the minute my bedroom door opens intense anxiety sets in, and stays with me all day.

After a few weeks, I see a bunch of doctors. They all say different things. I pick out a Therapist out of the yellow pages. See him for months. Anxiety just off the charts.

I finally see the "right" doctor, and he gives me a long half life benzo. It works, but only works for a few hours during the day. Alcohol worked better. It scared me because the last thing I wanted was to be one an alcoholic.

Well the intense anxiety went on for a decade. My life definely suffered.

I went from the better, capable guys in the room, to someone who could barely walk into the room.

I don't have any advice. I wouldn't wish what happened to me on my worst enemy. My doctor did say my case was unusual.

I'm still kinda a perfectionist though. My life is close to being homeless, but when I do something; I still do it well.

Enjoy your life.

<comment><USER21> Thanks for posting this! I'm always interested in other people's experience with anxiety. I'm slightly jealous yours has an origin story though. I've been anxious for as long as I remember and can't recall any traumatic experiences nor come up with any logical explanations.

<comment><USER22> It's important to remember that anxiety and panic are neurochemical responses and can have strong physical and genetic components, they don't always need to have a psychological "cause."

One thing I'd suggest, if you haven't already, is look into your family history for any for signs of it. In my case, there's a very clear hereditary line of panic disorder and other similar ailments that came down through the generations, eventually landing in me as well.

We like to think of our "mind" as something that exists completely separate from the physical reality of the brain, but in the end it's an organ like any other, and any malfunctions within it can affect us in subtle ways. For example, during the run up to a panic attack, I tend to get very irritable and easily frustrated. I've come to recognize it as a sign of what's to come and take steps in advance to try to curb it.

<comment><USER21> > It's important to remember that anxiety and panic are neurochemical > responses and can have strong physical and genetic components, they don't > always need to have a psychological "cause."

Agreed. Members of my mother's side are especially known to be "worriers". Sporadic levels of anxiety on my father's as well.

> I've come to recognize it as a sign of what's to come and take steps in > advance to try to curb it.

Via therapy, I've discovered my own version of this, mostly around breathing. I tend to hold my breath as I start to go into my head. If I catch myself doing this, I can sometimes reduce most of the physical effects by focusing on breathing again. It's easier said than done.</comment></comment></comment></comment>


Looking for a remote front end developer to work together on side project ideas - <AUTHOR> I'm a hardcore backend dude who can pretty much do anything quickly on backend but working on frontend was always pain for me.
Any frontenders out there who feel the same way and would like to get acquainted and possibly start working together as a team?
Contact me on firstname.lastname@example.com <comment><USER2> Fullstack developer here but I don't mind working on frontend. Let's get in touch!

<comment><AUTHOR> Just added my email address to thread.

<comment><USER2> Sent you an email :)</comment></comment></comment>


Show HN: A simple crypto asset explorer using GitHub data - <AUTHOR> http://monedas.io <comment><AUTHOR> Hi everyone!

Monedas is my first web app. Although still very bare bones, the idea is to use different data points to explore crypto assets. Like I say in the about page: "I think crypto assets are a different animal. Instead of looking at projects solely by traditional standards (like we look at equities), there should be more information on the code itself. Being that the important projects are protocols vs businesses that use blockchain, I believe data points on the code base should be considered.

With that said, I don't think commits, repo age or any one data point is a good determinant for the quality of the project. I do believe that, at the very least, it can signal something interesting. For example, a $X00M project with little to no activity on the repository should raise some flags."

You can find more on how I went from nothing to now here: [https://twitter.com/espitia7/status/918260378777407488](https://twitter.com/espitia7/status/918260378777407488)

Feedback is welcome :) !</comment>


Asymmetric risk and the dangers of too high a valuation - <AUTHOR> http://lsvp.wordpress.com/2007/07/09/asymmetric-risk-and-the-dangers-of-too-high-a-valuation/

<comment><USER2> High valuation == lower chances of an exit.</comment>


For those of you looking to break into programming - <AUTHOR> http://www.rdegges.com/how-i-learned-to-program/

<comment><USER2> This is a great article of a person who went through the joys of programming coming from not know anything.

<comment><AUTHOR> my impression as well</comment></comment>


Foodzie Raises $1 Million For Its Specialty Food Marketplace - <AUTHOR> http://www.techcrunch.com/2008/12/16/foodzie-raises-1-million-for-its-specialty-food-marketplace/ <comment><USER2> 12 Chocolate Chip Cookie for $18.95. I'm amazed people would pay so much. I wonder how many sales she gets.

<comment><USER3> Clearly you've never been to whole foods.

</comment></comment><comment><USER4> I'm glad they finally launched. Site looks good.

I have a similar startup in the works.

<comment><USER5> Thanks for the kind words about the site. We're excited about the convergence of food and technology, and would love to connect if it makes sense.

</comment></comment><comment><USER6> I ordered the chocolates awhile ago for my girlfriend... It was delicious.</comment>


Cops take dead man's smartphone to his corpse in attempt to unlock it - <AUTHOR> https://arstechnica.com/tech-policy/2018/04/cops-take-dead-mans-smartphone-to-his-corpse-in-attempt-to-unlock-it/ <comment><USER2> Discussion : [https://news.ycombinator.com/item?id=16893814](https://news.ycombinator.com/item?id=16893814) : 50 comments

Other sources:

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

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

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

[https://news.ycombinator.com/item?id=16928360](https://news.ycombinator.com/item?id=16928360)</comment>


Are Atheists Genetic Mutants-A Product of Recent Evolution? - <AUTHOR> http://www.unz.com/article/are-atheists-genetic-mutants-a-product-of-recent-evolution/ <comment><USER2> Since atheism has been around for at least 4000 years, I don't think they can attribute it to "bad" genes. It is a choice by people to believe in a god or gods or no gods.

The funny thing I find is that intelligence is not an indicator of whether one believes in or does not believe in a god, or gods.

For example, there are those who were believers in Jesus Christ as God and have come to the position that there is no god. These are at all levels of intelligence. There are those who didn't believe in a god and now argue strongly for Jesus Christ as God. Again these are at all levels of intelligence.

There are those who fit in the autistic spectrum and sit on both sides.

Whether or not you are an atheist boils down to what you choose, it is not your genetics or intelligence. Based on the evidence that is placed before me, I have come strongly to believe that there is God, that He is Creator and that He is Jesus Christ. How other people see and weigh that evidence will be up to them and they have the choice to choose differently.

To say that atheists have "bad" genetics and that this is the reason for their choice is not only bad science, it is bad for society and for allowing people to choose. If such an idea was to gain any sort of traction, it would be very bad.

</comment><comment><USER3> I'm missing the evidence that shows that people with autism, schizophrenia, homosexuality, sex-dysmorphia, left-handedness, asymmetrical bodies, high intelligence, atheism are prone to having worse than average immune systems.

Also, where's the evidence that schizophrenia, homosexuality et al are on the rise since the industrial revolution?

</comment><comment><USER4> Is this, like, a fundementalist Christian, click-bait, Facebook article?</comment>


Performance Impact of Removing an Out-of-Band Garbage Collector - <AUTHOR> https://githubengineering.com/removing-oobgc/ <comment><USER2> Of course removing it reduced your CPU consumption. What did it do to p99 request latency? That was the trade-off being made by OOBGC.

Does Github use SOA? The more backend services that are involved in handling a user facing request, the more the latency of frontend requests will be dominated by the _tail_ latency of backend services. So in distributed systems it makes much more sense to focus on those tail latencies. Who cares about average latency?

<comment><USER3> > Who cares about average latency?

People who are bad at statistics. So most of us programmers.

Seriously though, I don't think many of us get around to acknowledging that microservices are distributed computing and then consider all of the limitations that go with it.

Latency is dominated by the slowest thing you can't start earlier. So in real distributed computing you see a degree of duplicate effort in order to improve latency. It reduces throughout but increases the utility of the system.

When I took CS in college there was a proper class on distributed computing. When I got out I discovered not everybody had one of these (and I think in my program it was an elective. IIRC I chose it instead of kernel design). I had hoped that situation improved but I got tired of asking people disappointing questions about their education so I stopped asking.

<comment><USER4> > People who are bad at statistics.

Heh! sadly very true.

Many of those who do care about the p95s of an internal service often do it with a sense of chivalry that they have that 5% of the users back. The end user latency percentiles would be quite different from the service side latency, more so if its composed by a "Last_of" or a Max operator.

At times I feel tempted to write a library that offers primitives to glue microservice calls such as fan_out, retry, timeout etc but one that can reason about the percentiles of the output from the percentiles of the input.

BTW are statistical properties of latencies covered in distributed system courses ? I thought they were mostly about different kinds of guarantees, such as consensus, atleast-once, atmost-once etc etc.

<comment><USER3> Heck no, I got a little bit in a multivariate stats class but the rest I had to pick up in the field or a bit from books. I had a particularly illuminating moment with my ops guy trying to work out how often we could expect a drive to fail in a ten drive array and it was pretty shocking.

My knowledge is pretty thin, but the fact that I even know what questions to ask puts me in a better spot to contribute than 4 out of 5 people in the room. That shouldn't be how things are, but that's where we are. Every new (old) technique is a bunch of naive people crossing their fingers and hoping things go better than last time.

<comment><USER4> I thought as much. Your handle has anything to do with [https://books.google.co.in/books/about/Theoretical_Statistic...](https://books.google.co.in/books/about/Theoretical_Statistics.html?id=ppoujo- BInsC) ? very nice book BTW

<comment><USER3> Nope just random.

<comment><USER4> Spoken like a true statistician :)

</comment></comment></comment></comment></comment></comment></comment><comment><USER5> I find this an interesting contrast to Go's move towards a "request-oriented collector":

[https://docs.google.com/document/d/1gCsFxXamW8RRvOe5hECz98Ft...](https://docs.google.com/document/d/1gCsFxXamW8RRvOe5hECz98Ftk- tcRRJcDFANj2VwCB0/edit)

Perhaps a key difference is this point from the Github document:

"Since the OOBGC runs the GC after the response is finished, it can cause the web worker to take longer in order to be ready to process the next incoming request. This means that clients can suffer from latency due to queuing wait times."

It seems like a little bit more intelligence in the load balancer that sits in front of the application servers would go a long way here. Could it only route requests to servers which have finished garbage collecting and are ready to serve again?

<comment><USER6> Now you have another problem: the load balancer needs to know accurately when the backend is ready. This can be prone to race conditions, too, especially for services that have very short response times, unless you manage to keep the LB/RPC protocol in lockstep with the garbage collector's behaviour. E.g. you might have to extend the LB/RPC protocol for responses in-band, to include a bit that says "those were the results for the request and, by the way, don't send me new work until I signal you again", which also assumes a permanent connection between the two ends, etc.

It is doable, but it benefits greatly if you have complete control over the whole stack. It gets harder and harder as more languages are thrown into the mix.

<comment><USER7> Come on, we can solve that by adding a message queue manager in between. Whenever in doubt, just throw more layers at the problem.

<comment><USER8> Yes! Especially when fixing latency problems.

</comment></comment></comment></comment><comment><USER9> I am actually surprised GitHub still has OOBGC, which I thought was made redundant in 2014/2015 when Ruby 2.2 had incremental marking, and further improvement in GC 2.3, 2.4 and now 2.5.

In 2.6 they are introducing something similar called Sleepy GC

[https://bugs.ruby-lang.org/issues/14723](https://bugs.ruby- lang.org/issues/14723)

There are even better memory default for 2.6 using less memory. ( Or better switch to Jemalloc )

[https://bugs.ruby-lang.org/issues/14718](https://bugs.ruby- lang.org/issues/14718)

I cant find the thread, but there also a test showing how on Alpine Linux memory and performance were much better for Ruby Apps.

Meanwhile we are waiting for Truffle Ruby as a true drop in replacement, that should take lots of Ruby Pain point away. ( Native Image deployment, Better Memory handling and GC, Much faster JIT )

</comment><comment><USER10> Interesting work, thanks for sharing.

Nitpick:

> The blue line is CPU utilization for the day the patch went out. You can see > a great drop around 15:20.

I see a dip at 18:20, not at 15:20 - if there is a dip at 15:20, maybe it would be worth highlighting it.

<comment><USER11> I'd assume that it's a timezone issue. The author probably didn't check to see if the labels on the x-axis matched his own timezone and just pointed out where he knew the drop happened, instead of where it actually happened (on his graph).

</comment></comment><comment><USER12> That's a remarkable author profile on that article.

</comment><comment><USER13> TLDR: they saved 400 to 1000 cores by switching off the switching off of the GC during requests.

The fact that they are running Ruby and are spending 1000 cores on GC is o_O.

<comment><USER14> Isn't Ruby known for these kind of issues?

<comment><USER15> In this case it was Github's hack to work around no-longer-existing issues with Ruby's GC that was the issue.... Note that the speedup came from removing their hack in favour of relying on the default behaviour of Ruby 2.4

<comment><USER16> It was actually Ruby 2.2 from 2014 that made this redundant. 2.2 introduced incremental marking, removing the last long GC phase in MRI Ruby.</comment></comment></comment></comment>


Pricelizer.com - <AUTHOR> http://www.pricelizer.com

<comment><AUTHOR> Pricelizer.com saving you money Have you ever want to buy something but found the price to be too high with Pricelizer.com that changes. Pricelizer is a totally free browser plugin, Whenever you find something you like just add it with one click to your watch list

You will then be the first who knows when the price drops.

Not a price comparison site but a private alert tool. That will tell you as the price drops on the products you love Reserve a Spot NOW, Limited Number of Spaces Available Sign up for free on the beta program. SIGN UP NOW! Pricelizer.com, Saving you money</comment>


Show HN: A way to help figure out mysterious syntax errors. - <AUTHOR> http://rocketships.ca/fixmybug/

<comment><AUTHOR> This is my first non-trivial website, so I'm pretty nervous about it. Please let me know if there's anything I need to change/fix.

I'm hoping the purpose and usage is self-evident - submit your 20 lines of code that definitely contains a syntax error which you can't find, and everyone else will try to fix it for you. There are a lot of days when I get sick of my own code and would rather help someone else with their for a few minutes. This is an easy way to do it during your coffee break.</comment>