Buses for Tech Workers in San Francisco Will Pay Fee - <AUTHOR> http://www.nytimes.com/2014/01/22/technology/buses-for-tech-workers-in-san-francisco-will-pay-fee.html <comment><USER2> As someone in an entirely different country (and lives in a state where they've decided a 30% increase in public transport prices every year is acceptable and not idiotic...) can someone explain to me _why_ there is such a fuss around companies making their employees lives easier by taking care of transport for them?

Heck in some industries, they give you a car, and yet I've never seen anything like this before. I've read a whole stack about this issue but still can't seem to make it click.

<comment><USER3> [http://www.theatlantic.com/business/archive/2010/09/gray- def...](http://www.theatlantic.com/business/archive/2010/09/gray-defeats- fenty-what-does-it-mean-for-the-city/63042/)

There's not a fuss around companies providing transport to their employees. There's a fuss around the employees, who are hated by "locals", living nearby. As described in the linked article, gentrification battles are phrased in other terms, because you lose PR points for saying "get out because, um, we hate you".

Threads about the buses on HN in the past have seen a lot of self-righteous grandstanding about "but the buses are _breaking traffic laws!_ " \-- completely disregarding the fact that everyone posting in the thread, San Francisco residents or not, breaks traffic laws every day.

<comment><USER4> This is an honest question, that maybe someone in SF could answer for me. I have been in SF several times, and I didn't like the city all that much, but that's just a personal preference. But in that area their are so many nice cities to live in. My personal favorite is Santa Cruise, but there a ton of other great cities around the bay. If San Fransisco natives hate the tech workers so much, why stay?

I live in San Diego, so it might be just a clash of cultures. But I honesty would like to know, why does the tech community find SF so appealing. Is it just a function of that's were all the VC money is? Or am I missing something?

<comment><USER5> San Francisco is the only thing resembling a dense urban core in the area. There are many other nice places in the Bay Area, but very few of which will afford you the archetypical car-less transit-centric lifestyle that many people desire, while maintaining commutability to suburban offices. Many places are anti-urban by choice.

At the risk of being a bit flippant, it's not that people find SF so appealing, but that they find everywhere closer to work unbearable. By any measure I can think of SF is a deeply dysfunctional city with incredible failures in basic quality of life - but it is the _only_ city around that even begins to offer a lifestyle that many people want.

<comment><USER6> I'm sorry, but you are mistaken. There are many other places in the Bay area that offer dense urban areas. Palo Alto, San Mateo, Berkeley, and Santa Cruz come to mind. I know someone who lives in the south bay and does not have a car. There are places which are very hard to live in without a car (Sunnyvale comes to mind), but different places in the south and east bay are... different.

And frankly, there are parts of SF that I personally would find difficult to live in without a car (or at least bicycle), because they're far from effective public transit or commercial areas. BART and CalTrain don't serve the western part of SF at all, and muni is often slower than walking.

The south and east bay may not have the same density as San Francisco, but then again, it's far from clear that super-high density is a good idea in a seismically active zone. A lot of people seem to treat the choice as being between super-low density and super-high density. The alternative, medium density, never seems to get much P.R., but it seems like by far the best choice.

<comment><USER7> Are you seriously suggesting that San Mateo and Palo Alto are "urban", in the sense 'potatolicious means, of "offering a lifestyle comparable to that of Seattle, Boston, or Milwaukee"? San Mateo and Palo Alto are suburbs, each with essentially a single suburban main drag†, neither with any significant transit to get from point A to point A' (neither being large enough, as large as, say, Ann Arbor, to host a legitimate point B).

I think a reasonable case could be made that Champaign Illinois (which hosts UIUC) is more of an urban area than those two cities. At the very least, I think it's better than San Mateo.

I agree that San Francisco sucks (and I lived in SOMA and in Noe Valley, both of which have relatively good [for the area] transit), but it is at least an actual city.

The obvious elephant in the room here is San Jose, and it's telling that you didn't mention it, opting instead to pretend that San Mateo was a "dense urban area". San Jose is an urban center. But it's miserable; nobody talks about moving there. The fact is that San Mateo sounds plausible because of its proximity to San Francisco.

† _For Palo Alto, I mean University; you don 't need to point out that El Camino runs through it, I know where to go to find the strip malls. :)_

<comment><USER8> > The obvious elephant in the room here is San Jose, and it's telling that you > didn't mention it, opting instead to pretend that San Mateo was a "dense > urban area". San Jose is an urban center.

San Mateo, at around 8K/sq.mi., is far more of a "dense urban area" than San Jose, at around 5K/sq.mi.

So who is pretending?

<comment><USER7> Easy: you are. Lots of people live in San Mateo. It's still a suburb. Evanston and Oak Park are suburbs of Chicago that are denser than San Mateo. So is, for god's sake, Berwyn.

To see how silly population density is as a metric for what 'potatolicious is talking about, consider that your metric says that Berwyn and San Mateo are more like cities than Bellevue Washington, which is so independently urbanized that it stretches the definition of "suburb" but has a density of only 3k/sqm. Look at downtown Bellevue in street view on Google Maps. Now go look at Delaware and 3rd in San Mateo.

The idea that you might think San Mateo is more of an urban area than San Jose --- I mean this without annoying snippiness in my heart though I know it is, characteristically, going to sound that way --- suggests to me that you haven't been to one of those two cities before. San Jose is self-evidently a real city. (I look forward to you embarrassing me by informing me that you've lived in both).

<comment><USER8> > Easy: you are. Lots of people live in San Mateo. It's still a suburb.

The issue was what is a "dense urban area". A city that is a suburb because of its relation to a another city can still be a dense urban area, and a sparsely populated municipality that is not a suburb can _fail_ to be a dense urban area. San Jose is _not_ a dense urban area, by any remotely reasonable standard.

> consider that your metric says that Berwyn and San Mateo are more like > cities than Bellevue Washington,

All of those _are_ cities, none of them are "more like cities". The issue was "dense urban areas", and certainly some of them are more "dense urban areas" than others, and that is easily and objectively verifiable.

> The idea that you might think San Mateo is more of an urban area than San > Jose

You keep leaving out the key word "dense".

San Mateo is, objectively, more of a "dense urban area" than San Jose. Whether its more of an "urban area", density aside, isn't a entirely a well-defined question, but given that San Jose is basically a giant mass of the type of development referred to as "suburban sprawl" that just happens to be within a single legal jurisdiction that isn't a satellite of a larger municipality, I'd say by most reasonable standards its probably not more an urban area than most Peninsula cities, even if the latter happen to suburbs of San Francisco.)

Though, of colin_mccabe's examples, I'll agree that San Mateo isn't the _best_ (Berkeley probably is).

<comment><USER7> I think the reason you & I are talking past each other is that I wrote my comment because I found Colin's "dense urban area" appellation misleading. Your comment forced me to do the research to check whether population density meant anything like what 'potatolicious was talking about; had I done that before writing my original comment, I think my response would have been more convincing.

Oak Park is a village, not a city, and is denser than San Mateo. The city/town designation is arbitrary.

San Jose has a very large downtown area, much better transit, and more diverse retail businesses and restaurants than San Mateo does. It _also_ has a gigantic residential sprawl. So does Houston. Nobody would mistake San Mateo for a urban area of the likes of Houston.

I agree with you about Berkeley, but that's telling too, isn't it? Berkeley is, like San Francisco, a hotbed of anti-Google protests.

The subtext of this thread is 'potatolicious' claim that no place other than San Francisco (and, admittedly, Berkeley and Oakland) offer a "dense urban core" with a "transit-centric" lifestyle that is "commutable" to jobs on the Peninsula. He is right. San Mateo does not in fact offer that. To argue the contrary, you'd need to find a way in which San Mateo offers that lifestyle that, say, Mountain View or Santa Clara or Pleasonton don't; otherwise, you're arguing that the whole Peninsula is urban, and the term doesn't mean anything. Obviously, if you find a job in downtown Pleasanton and are happy to eat out only at the Cheesecake Factory, Pleasanton is livable too.

<comment><USER6> Berkeley has been a hotbed of political protest for a long, long time. While I lived there, the Oak Grove protests, (protesting the cutting down of some trees to build a stadium) were going on. Most of the fellow Berkeley residents I talked to were not in favor of the tree protesters, simply because the university was planting more trees in other places, so that there would actually be a net gain of trees due to the construction. Prior to Oak Grove, there were the protests surrounding the army recruitment offices. And prior to that, I'm sure there was another cause, all the way back to Vietnam, where Berkeley was also a famous center of protest.

The protests in San Francisco are very different from the ones in Berkeley. The San Francisco ones are basically concerned about the effect the Google buses are having on the composition of the neighborhood. The idea is that SF is perfect as-is and must not change. There were similar worries when gays started moving into SF in the 70s and 80s.

I think the reason why you're "talking past" me and the other people here is that you haven't really visited most of the neighborhoods outside SF, and you think they're all the same. Hence the apparent non-sequiturs like bringing up Oak Brook, Illinois, or trying to decide whether something is a "city" or a "town." The reality is that different places are different. Berkeley is not SF. San Mateo is not downtown San Jose. And downtown San Jose is not east San Jose.

An "us versus them" mentality, coupled with lack of knowledge of "them," lies behind a lot of ugly things in human nature. Do we really need to have more of it here? Maybe there are places outside of SF that are (gasp) as good as parts of SF. Maybe there are places in SF that kind of suck. Is it possible?

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> $1 per stop is chump change for a company like Google. I don't see how this fee will create any difference for what the protestors are demanding.

And this type of fee reminds me of a Freakonomics article that talked about how a daycare started charging parents a late fee of $3 and it had an unintended effect of increasing the frequency of late parents, because it rid the parents of moral guilt for being late. In a similar way, despite the fee, the big tech companies are going to continue doing what they're doing, but now they won't feel as bad for it. I don't see how this solves anything.

Freakonomics article: [http://www.nytimes.com/2005/05/15/books/chapters/0515-1st- le...](http://www.nytimes.com/2005/05/15/books/chapters/0515-1st-levitt.html)

<comment><USER10> The purpose is to deal with the issues arising from the physical presence of the buses, and $1 a stop might be enough for that.

The purpose is not to discourage the buses. If a person wishes to live in San Francisco, and work at Google, that is their _right_ (assuming they can pay the rent). No one has any moral basis for trying to stop them from exercising that right, any more than I have a right to stop people from paying high prices for caviar so, that I can afford it.

</comment></comment><comment><USER11> People in the comments below have already started complaining that the 1$ fee isn't enough. What would be enough anyway? What do you feel charging a fee is going to accomplish?

The controversy surrounding these buses is just a symptom of the much larger problem, affordable housing development. If you want this issue to go anywhere, stop worrying so much about these buses full of people headed to work. Getting rid of the buses isn't going to solve the real problem. It's just something that people have latched on to.

</comment><comment><USER12> Putting aside the tangential issues of housing and gentrification, the real problem that needs to be addressed is street space. The Mission (where most of these buses are stopping) is a densely-populated urban environment, and yet residents often expect available on-street parking so they can use their basements as storage. Making bus stops and loading zones longer would go a long way towards reducing traffic problems in the area.

</comment><comment><USER13> Sure hope the same standards are applied to charter tourist buses and those double-deckers that carry tourists back and forth.

</comment><comment><USER14> "In a small, cramped city, ...". San Francisco certainly may be small, but I've never known it to be cramped. I feel like its not being cramped is precisely the root of the problem for which "Google" buses erroneously take the blame.

</comment><comment><USER15> This is so stupid. The fee is equal to the cost of the program. Flushing $1.5 million a year down the toilet. Bizarrely this is a victory as the activists wanted the buses outlawed completely.

SF will always be a second best city until it can face it's true demons: decisions made by ideology, that is, without regard to reality or even common sense. I want the tolerant SF of the late 1960s back - a bunch of dockworkers, businessmen, soldiers, factory workers who were cool enough to let freaks and weirdos take over their city. Now the cultural descendants of those freaks complain if you don't look, talk or get to work like them. This needs to stop.

</comment><comment><USER16> Read this book to understand the real problem and how to solve it: [http://www.amazon.com/gp/aw/d/B0078XGJXO](http://www.amazon.com/gp/aw/d/B0078XGJXO)

</comment><comment><USER17> Meta-comment: did this post just get kickbanned [1] from the front page?

I've heard it happens on HN but (as only an occasional commenter) I've never noticed it. It just went from #5 to nonexistent.

[1] excuse the IRC lingo

<comment><USER18> "The controversy penalty can have a sudden and catastrophic effect on an article's ranking, causing an article to be ranked highly one minute and vanish when it hits 40 comments. If you've wondered why a popular article suddenly vanishes from the front page, controversy is a likely cause. "

[http://www.righto.com/2013/11/how-hacker-news-ranking- really...](http://www.righto.com/2013/11/how-hacker-news-ranking-really- works.html)

</comment></comment><comment><USER19> "You allow these companies to illegally use public spaces." The fix is either stop them from doing so, or make such action not illegal.

<comment><USER20> Or make them pay something towards the cost of those public spaces. Which is what the city is doing. I don't think $1 per bus per day is enough though really - it seems so obviously a token amount that I'm sure its going to go up.

<comment> jack-r-abbit It is $1 per bus per stop. Basically, every time a bus pulls into a public bus stop, they pay $1. So at a minimum that will be $2 a day (pick up in the morning, drop off in evening). But I believe buses make multiple stops.</comment></comment></comment>


Fantasy World OCaml (2013) - <AUTHOR> http://chaudhuri.info/misc/fwocaml/ <comment><USER2> I'm surprised that better threading wasn't mentioned. As I understand it, OCaml has threads but parallelism isn't possible. That is, although you can have multiple threads, only one can execute at a time.

<comment><USER3> #5 of Build Tools and Runtime would cover that (encapsulating all global state into a runtime context). The ongoing multicore work at OCamlPro is taking this approach [1].

Erlang-style actors or lightweight processes would be my dream multicore scenario (no more monads for concurrent IO!), but that's likely too difficult to graft onto the current runtime, which is otherwise extremely well-done.

Also, I'd really like checked exceptions. The omission of checked exceptions has always struck me as strange, given the emphasis on compile-time checking. Considering how fast exceptions are in OCaml, it seems like a bit of a missed opportunity -- it is faster to use exceptions for control flow [2] than matching on variants (such as Option), which usually involve an extra allocation + dereference, IIRC.

[1] [http://www.ocamlpro.com/pub/multi- runtime.pdf.tar.gz](http://www.ocamlpro.com/pub/multi-runtime.pdf.tar.gz)

[2] Odd as it may sound, it's encouraged to use exceptions as a control-flow construct in OCaml, but that is falling out of favor in modern code as far as I can tell.

<comment><USER4> Checked exceptions are possibly the worst feature of Java.

Now it may be a good idea to have an optional tool for checking exceptions -- in fact, one exists already, but I can't recall the name of it. But please don't make this mandatory unless you avoid the mistakes of Java.

<comment><USER5> _Checked exceptions are possibly the worst feature of Java._

Why? I absolutely hate C++ codebases where all of a sudden you get yet another type of exception that was not documented, possibly because the exception was thrown ten functions down (up) the stack.

In Java, at the very least you know what to expect and can prepare for it. Unfortunately, even there people try to avoid exceptions by throwing classes that derive from RuntimeException.

Given that Java has no sum types, checked exceptions are really the next best thing.

</comment></comment></comment></comment><comment><USER6> Generally sensible, but a few things seem already fixed.

The duplicate argument thing already generates a warning (I wish warnings were enabled by default though):

      # let f x x = x;;
      Warning 27: unused variable x.
      val f : 'a -> 'b -> 'b = <fun>

"Values of type string and bytestring are not mutable." In 4.02, strings can be made immutable (it's optional currently, to avoid breaking existing code).

Camlp4 is already on the way out, being replaced by Extension Points.

Rather than adding checked exceptions, I'd rather just see more use of variants in the standard library (3rd-party libraries mainly do this already). I don't see why checked exceptions should be faster - maybe this is just a compiler optimisation problem?

</comment><comment><USER7> Most of these things seem nice but are actually a bad idea. Many of the rest are already implemented or in the process of being implemented. A couple of them are good ideas which are awkward to implement due to politics (e.g. the licence) or backwards compatibility.

Still, I enjoyed reading the post, and it is good to see people looking to improve OCaml and make suggestions.

<comment><USER8> Can you list some specifics that seem nice but are actually a bad idea? I would be interested and I'm sure others would be too.

</comment></comment><comment><USER9> I would be interested in seeing a similar list for Haskell. Like OCaml, it's a great language, but definitely has a few long-standing warts that could be fixed. (Among these, the many competing streaming libraries and cabal hell come to mind. Though maybe the first ain't so bad, since they are all pretty high-quality.)

<comment><USER10> I think there's a big difference between language issues (which are routinely being worked on) and community questions like the pipes libraries and cabal.

Probably the two biggest problems, both of which are currently being worked on, is a solution to true modules/modular dependencies (which is highly beneficial to fixing the community problem of cabal hell) and a solution to the "record problem" which is probably going to come in a new GHC extension which automatically allows for structural subtyping on public records via row types.

<comment><USER11> "Probably the two biggest problems, both of which are currently being worked on, is a solution to true modules/modular dependencies "

I'm looking forward to this. I have Haskell code in production and would _greatly_ appreciate these features. Is there a url where I can check/follow for the state of these efforts? Who is working on these? Thanks in advance.

<comment><USER10> Edward Z Yang[0] is doing a GSoC project (I think) on expanding Backpack[1][2]. He's a GHC contributor, so it's relatively big.

And here's overloaded record syntax: [http://www.well- typed.com/blog/84/](http://www.well-typed.com/blog/84/)

[0][http://ezyang.com/](http://ezyang.com/) [1][http://plv.mpi- sws.org/backpack/](http://plv.mpi-sws.org/backpack/) [2][http://blog.ezyang.com/2014/07/type-classes-confluence- coher...](http://blog.ezyang.com/2014/07/type-classes-confluence-coherence- global-uniqueness/)

</comment></comment></comment></comment><comment><USER4> I would like to see a 'return' statement added to the language, so that:

        fun () ->
          if foo then return r;
          more code ...

is the equivalent of:

        fun () ->
          if foo then r
          else more code ...

Note that type safety would obviously have to be preserved. The returned type would have to match the return type of the overall function.

<comment><USER10> I think this is pretty intentionally avoided most of the time since it clutters up the continuation-passing semantics of the code... With `return` you have a much more complex base language. Especially since you can achieve it using monads.

<comment><USER4> Monads don't (quite) short-circuit the later computations unlike a return statement. Anyway, I'd like to see an example of writing this using monads, since it makes the idea more concrete.

<comment><USER10> I can write a continuation monad in Haskell which would. Something like

        {-# LANGUAGE DeriveFunctor #-}

        module Return where

        import Control.Monad

        newtype Cont r a = Cont { runCont :: (a -> r) -> r } deriving Functor

        instance Monad (Cont r) where
          return a = Cont (\k -> k a)
          m >>= f  = Cont (\k -> runCont m (\a -> runCont (f a) k))

        early :: r -> Cont r a
        early a = Cont (\_ -> a)

        ex :: Cont Integer [Integer]
        ex = do
          forM [1..] $ \i -> do
            when (i == 33) (early i)
            return i

<comment><USER12> Why Cont when Either would do?

<comment><USER10> True, but I mentioned continuation-passing semantics! Peaker's right though—and Either might be a little easier to understand.

</comment></comment></comment></comment></comment></comment><comment><USER13> Unicode support is the biggest problem I have with OCaml, and it's something I noticed immediately as I tried to put in messages and keywords for a japanese friend.

It may not be wise to break current behaviour of the char and string types, but their literals should at least support unicode escapes. One way to do this would be to bring in UCS-4/UTF-32 strings as offered by Camomile, and have some simple convention to allow UCS-4 strings to be mapped from what are UTF-8 literals in the code.

<comment><USER4> I prefer that OCaml _doesn 't_ support Unicode in the core language, and that it's left to Camomile to support.

One reason is that it's very hard to get it right -- see how complex Perl 5 is which is about the only language that does do the right thing. Another reason is that baking an incorrect Unicode into the language would be worse than the current situation. For examples of brokenness, see: all of Win32, Java, Ruby.

It would be good to remove the broken String.lowercase and String.uppercase functions from the stdlib though.

Edit: Although perhaps your problem was more to do with supporting arbitrary binary in the source files (which instead are encoded as ISO-8859-1). That would be something to fix.

<comment><USER10> Haskell has its Text library type. Which is a great example of how complex UTF done right can be... And how it can be done quite nicely as a lib. String literal overloading is pretty important (and library-level rare) though.</comment></comment></comment>


Malware jumps air-gap by blinking LED - <AUTHOR> This story has been submitted many times from many sources. This submission is purely to provide a cross-reference in case discussion starts on more than one of them. <comment><AUTHOR> Here are some of the submissions with comment count as of 13:00 GMT:

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

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

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

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

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

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

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

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

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

[https://news.ycombinator.com/item?id=13708279](https://news.ycombinator.com/item?id=13708279) (4 comments)

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


Show HN: Find something to do today based on your Facebook friends' events - <AUTHOR> http://www.fiestastic.com

<comment><AUTHOR> As a side note (I submitted it without thinking much), this would probably be more useful (because will have more events) on a Friday or Saturday.</comment>


"Space Jam" Website Still Online - <AUTHOR> http://www2.warnerbros.com/spacejam/movie/jam.htm

<comment><USER2> I used to run the servers for this site back in 2001 and it was old then. Sad to see that www2 has still survived, that was the result of a migration off some older servers. I'm not surprised that nothing has been cleaned up, we were still running Netscape Enterprise Server about 5 years after everyone else had given up on it and moved to Apache. They had a compiled NSAPI module to serve ads though and the company had gone out of business so we couldn't get an Apache module. They used to buy so many domain combinations for each new movie that we had to set up a separate cluster just to do 302 redirects to the canonical name for each otherwise the configs became unmanageable.

</comment><comment><USER3> It's unfortunate that the sites and links that stay up are the _outliers_ we remember, rather than the norm.

</comment><comment><USER4> It's interesting to see how HTML has changed since 17 years ago, especially since this was probably created before CSS was a standard (or at least not widely used). I had never even heard of the <nobr> tag before.

</comment><comment><USER5> I like the comments on the html:

</comment></comment><comment><USER6> Looking at this page on a retina screen is like watching the pixel heat death of the universe. Everything is so tiny and zoomed out! I wonder if this trend will continue now that pixel densities have approached human perceptibility limits.

</comment><comment><USER7> Legal/Privacy info points to <http://www.warnerbros.com/terms.html> which isnt available

<comment><AUTHOR> Ah, well, can't have everything. Maybe there is no privacy?

<comment><USER7> 1996 internet wasn't as obsessed with privacy as 2013 ...

</comment></comment></comment><comment><USER8> You have a non-frames compatible browser. Please click here.

</comment><comment><USER9> This is one of the first websites I visited as a kid! I love the "Fifth Element" reference in the code.

</comment><comment><USER10> The trailer and other video clips unfortunately appear to be gone :-(

</comment><comment><USER11> </comment>


IBM's Watson Designed the Worst Burrito I've Ever Had - <AUTHOR> http://www.fastcodesign.com/3045147/ibms-watson-designed-the-worst-burrito-ive-ever-hadestination=http://www.fastcodesign.com/3045147/ibms-watson-designed-the-worst-burrito-ive-ever-had

<comment><USER2> Just because you wrap a tortilla around some ingredients doesn't mean it will nor have to taste like tex-mex.</comment>


Ask HN: Automate adding nginx and ufw allow rules via a restful API? - <AUTHOR> I feel this is a problem that should be solved somewhere already, without using something big like openstack.
eg. You can only connect to `myapp.com:443` and call `/set/ip-address` with a `auth` token in the header and ip in the body. This data get dumped into a sql table and a nginx and ufw allow rules update will take place, currently with a ugly py hack:
system.os('ufw allow proto tcp from {} to any port 444'.format(ip))
system.os('echo "allow {}" >> /etc/nginx/sites-enabled/include_allow.conf && service nginx relead'.format(ip))
I will be running another nginx `server` listening on `port 444 ssl;` that will `include /etc/nginx/sites-enabled/include_allow.conf`
The idea, problem and current solution is introduced here:
https://gist.github.com/Morabaraba/06403358de009ede60e1d842c48100b7
I asked /r/flask(10 hours ago) as well:
https://www.reddit.com/r/flask/comments/6cvo4j/af_swagger_api_connexion_behind_nginxusing/
Any insight or nudge in the right direction would be appreciated. <comment><AUTHOR> In a attempt to add a anchor to the links:

The idea, problem and current solution is introduced here:

[https://gist.github.com/Morabaraba/06403358de009ede60e1d842c...](https://gist.github.com/Morabaraba/06403358de009ede60e1d842c48100b7)

I asked /r/flask(10 hours ago) as well:

[https://www.reddit.com/r/flask/comments/6cvo4j/af_swagger_ap...](https://www.reddit.com/r/flask/comments/6cvo4j/af_swagger_api_connexion_behind_nginxusing/)

Any insight or nudge in the right direction would be appreciated.</comment>


Google Opens Up Internal Speed Tool To Developers - <AUTHOR> http://www.techcrunch.com/2009/06/04/google-opens-up-internal-speed-tool-to-the-public/ <comment><USER2> Why link to TechCrunch when they add nothing to the story?

<http://code.google.com/speed/page-speed/>

</comment><comment><USER3> It looks really useful. Much more than Yslow, and Yslow is great too.

I posted an example <http://dodeja.posterous.com/762803>

It even gives images that are optimized and JS that is minified. Developers <3 Google</comment>


Chrome Web Store: a solution in search of a problem? - <AUTHOR> http://arstechnica.com/web/news/2010/12/thoughts-on-the-chrome-store-does-the-web-need-an-app-delivery-channel.ars

<comment><USER2> This is what bothered me about the chrome app store after using it to "install" a few web apps. I agree that finding new web applications might get easier, but other than the fact that we now see 'chrome-optimized' web apps, how is this different from a simple bookmarking solution?

<comment><USER3> For now it's same as bookmarking a website but with a bigger icon. Probably in future chrome app store will let people buy native apps for their devices that run on Chrome OS.</comment></comment>


USB Combination Lock - <AUTHOR> http://www.schneier.com/blog/archives/2010/03/usb_combination.html

<comment><USER2> I found this in the comments:

 _There is no problem:

People who are stupid enough to buy this sort of thing won't have anything important enough to store anyway._

Its not their stuff I'm worried about. They buy these things, then believe that they've enhanced their security, and then confidently (and thus believably) promise you that the have taken measures to keep the data you give them safe.

Fake security, especially the _"it looks just like on tv!"_ kind, does way more harm than it seems like it will at first.

</comment><comment><AUTHOR> Here's the link to the product [http://www.staplespromotionalproducts.com/ProductDetail.aspx...](http://www.staplespromotionalproducts.com/ProductDetail.aspx?id=2953)

It's hard to believe Staples is selling something this incredibly stupid.</comment>


Show HN: an extremely simple program shows a 2D structure in the integers - <AUTHOR>

This seems unlikely to be a "new" idea, but I stumbled into it by accident and thought it was cool. Java source code below:

  // This class is in the public domain.
  public class Numbers
  {
    public static void main(String[] args)
    {
      int numRows = 256;
      int numColumns = 128;
      for (int row = 0; row < numRows; row++)
      {
        StringBuilder rowOutput = new StringBuilder();
        for (int column = 0; column < numColumns; column++)
        {
          if ((row & column) != 0)
            rowOutput.append("1");
          else
            rowOutput.append("0");
        }
        System.out.println(
          String.format("row/col %s:\t%s", row, rowOutput.toString()));
      }
    }
  }
 <comment><USER2> This was on HN a couple of days ago:

      http://www.oftenpaper.net/sierpinski.htm

It points out that you can interpret the table as the relation "is disjoint" between the bitsets encoded in the row and col indices (CTRL+F for "binary logic"). Following links from there will take you to a rabbit hole of combinatorics that I will not claim to fully understand.

The whole page is a delight, though, and given your enjoyment for your discovery, you'll certainly love browsing it.

</comment><comment><USER3> Reminds me of Sierpinski triangles:

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

I'm sure someone with a greater intuition for mathematics than I have will be able to explain why.

<comment><USER4> My first thought is that it has something to do with the fact that you get a Sierpenski Triangle from a Pascal's triangle when you assign one color to even numbers and another to odd: [http://en.wikipedia.org/wiki/Pascal%27s_triangle#Overall_pat...](http://en.wikipedia.org/wiki/Pascal%27s_triangle#Overall_patterns_and_properties)

</comment></comment><comment><USER5> Here's a C version in less than 80 characters:

      main(c,r){for(r=32;r;)printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}

I first learned of this phenomenon in my discrete math class, and we had a competition to see who would write the shortest program to draw a Sierpinski triangle. This version would certainly have won if I'd been clever enough to write it at the time, though even shorter versions are possible in other languages.

</comment><comment><USER6> [http://faculty.msmary.edu/heinold/bitwise_and.pdf](http://faculty.msmary.edu/heinold/bitwise_and.pdf)

seems to be a paper on this phenomenon, with

[http://faculty.msmary.edu/heinold/maa_pres2009-11-14.pdf](http://faculty.msmary.edu/heinold/maa_pres2009-11-14.pdf)

being a similar work in presentation form.

I've never seen it before; I like it!

</comment><comment><USER7> For any lazy C# folks:

        internal class Program
        {
            public static void Main()
            {
                int numRows = 256;
                int numColumns = 128;
                for (int row = 0; row < numRows; row++)
                {
                    StringBuilder rowOutput = new StringBuilder();
                    for (int column = 0; column < numColumns; column++)
                    {
                        if ((row & column) != 0) rowOutput.Append("1");
                        else rowOutput.Append("0");
                    }
                    Console.WriteLine("row/col {0}:\t{1}", row, rowOutput);
                }
                Console.Read();
            }
        }

Cool stuff, very interesting to see that triangle structure emerge.

<comment><USER8> For the even lazier: [http://dotnetfiddle.net/gsdfJp](http://dotnetfiddle.net/gsdfJp)

</comment></comment><comment><USER9> Interesting, I've not seen this before. Here is a screenshot of some of the output: [http://i.imgur.com/Ro2AA6u.jpg](http://i.imgur.com/Ro2AA6u.jpg)

</comment><comment><USER10> That's cool. You can expand the pattern, presumably arbitrarily, by setting the number of columns to 256 or 512 (or greater?), but on my little 1440px screen I had to redirect to a file and scroll it sideways in an editor to see the whole thing.

</comment><comment><USER11> You will probably like searches for rule NNN on wolfram alpha, like [http://www.wolframalpha.com/input/?i=rule+101](http://www.wolframalpha.com/input/?i=rule+101)

</comment><comment><USER12> Back when they taught me the number line and the Cartesian plane, it all seemed smooth and straightforward.

In the years since, I've seen primes, rationals, irrationals, Mandelbrot, and all manner of weird structures popping up out of what seemed like nothing.

How did this happen? And who put all that stuff in there?

</comment><comment><USER13> Sierpinski's Triangles?

</comment><comment><USER14> Is this the same as Rule 90?</comment>


Seattle meetup? - <AUTHOR>

I'm in Seattle until the 25th or so, anyone in the Seattle area want to meet up? <comment><USER2> You may want to come out to the Seattle Tech Startup meeting on 8/12 on the UW campus. I've been going for the past year or so and it's usually a fun event. <http://www.seattletechstartups.com/doku.php>

<comment><AUTHOR> schweet

</comment></comment><comment><USER3> I'm also in Seattle.</comment>


Show HN: Edit this webpage with your voice - <AUTHOR> https://shaungallagher.github.io/say_restyle/ <comment><USER2> So after playing around with the page, I just started saying random things to see how the speech API would fare with my atrocious accent. That was interesting, until I said "the quick fox", and it interpreted ... bleeped speech?

        2015-06-20 03:02:49.109 say_restyle.js:7 Speech recognized: the quick f****
        2015-06-20 03:02:49.110 say_restyle.js:7 Speech recognized: the quick Fox
        2015-06-20 03:02:49.110 say_restyle.js:7 Speech recognized: quick f****

What the fox?

<comment><AUTHOR> I noticed that while I was developing the script. I'm using annyang -- [https://github.com/TalAter/annyang](https://github.com/TalAter/annyang) \-- to interact with the web speech API, and it doesn't look like annyang is the one censoring the results, so it must be ... the API itself?

<comment> TD-Linux Yes - in particular, it's done server-side by Google. It seems that there is a config option to turn it off. [http://src.chromium.org/viewvc/chrome/trunk/src/content/brow...](http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/speech/google_one_shot_remote_engine.cc)

<comment><USER2> Am I really the only one freaked out by this?

<comment><USER3> No. The idea that your voice is being recorded and sent to Google is something that a lot of people might not want.

<comment><USER2> I think you missed the point.

</comment></comment></comment></comment></comment></comment><comment><USER4> I envision this to be a great little browser extension for those pesky team / site presentations.

 _Can you make that text yellow?_ Sure, tell it to do so and see how stupid it looks for yourself!

</comment><comment><USER5> I have no idea what is going on, am I suppose to just speak to the page? Because it does nothing (safari)

EDIT: apparently visiting [https://www.google.com/intl/en/chrome/demos/speech.html](https://www.google.com/intl/en/chrome/demos/speech.html) it tells me safari is not supported :(

Why are these cool things never in Firefox? As I don't use Chrome I often run into demos that don't work.

<comment> TD-Linux The Web Speech API in Chrome is implemented by calling Google Speech Recognition APIs. Firefox would have to pay for an API key to use the same service.

There has been some work for client-side speech recognition in browsers though, for example: [http://syl22-00.github.io/pocketsphinx.js](http://syl22-00.github.io/pocketsphinx.js)

</comment></comment><comment><USER6> Now that the speech API is accessible to almost all developers, I really see this being a very helpful thing for developers while they work on web sites.

Want to try multiple styles on a mobile app (phonegap/cordova) without recompiling it? Need to make "fuzzy" css changes to gradient colors ("make it darker") while experimenting?

Then, in a little while we will be able to roll this same powerful API out to our users.

<comment><USER7> seems more tedious than open up dev tools. too much variation to be of general use, probably depends on certain markup like bootstrap. innovative idea though.

</comment></comment><comment><USER8> This is quite interesting and is very close to what we are doing at [http://www.dhi.io](http://www.dhi.io). Though the difference is that , there is actually an AI sitting in between the user and the editing layer - interpreting the users commands, making the edits etc.

</comment><comment><USER9> I've seen some neat projects using the speech API, including this one, but the recognition seems way too bad. Where does the recognition engine come from? Do the browser vendors make it?

</comment><comment><USER10> Really cool! And it actually works!

Seems like 'select its first child' doesn't select the first child, but the second.

</comment><comment><USER11> This is really cool!</comment>


Study reveals how climate change could cause global beer shortages - <AUTHOR> http://www.uea.ac.uk/about/-/study-reveals-how-climate-change-could-cause-global-beer-shortages <comment><AUTHOR> Now $#!+ is getting real...</comment>


The Real Genius Of The Kindle? The Return Of 'Unitasking' - <AUTHOR> http://paidcontent.org/article/419-the-real-genius-of-the-kindle-the-return-of-unitasking

<comment><USER2> I think Amazon should fund their own newspaper on the Kindle, as a content driver for further Kindle sales. Most of it can be comprised of aggregation, with a few exclusive investigative stories only available on the Kindle.

</comment><comment><USER3> And what about the genius of a book ?

<comment><USER4> The Kindle provides a convenient and (most think) superior platform for reading and navigating extended texts. The computer does not.

It lets those who enjoy reading have immediate and portable in-hand access to their favorite reading and reference materials. The computer does not.

When I read extended texts, I like to concentrate for long periods on that text. If I leave off somewhere, I like to be able to find my place quickly and easily. The Kindle is a dedicated device that builds in the functionality to do this. The computer does not.

Would I subscribe to the New York Times on the Kindle? Sure, if I have lots of money and value the convenience more than the expense. It is nice to be able to switch instantly to the news while reading your book on a commute train. But, not really if I don't want to spend where I don't have to spend. Not when I can get access to such news sources over the web.

Don't see that the issue of multi-tasking versus uni-tasking has anything really to do with this.

News publishers who want to sell paid content will benefit incidentally from any superior reading platform that will induce some minority of the reading audience to pay for their subscription just to have all their reading material in one convenient place.

But uni-tasking is not a deus ex machina for the news business.

If I put pure uni-tasking as my primary reading aim, I will sit back in the comfort of my home, pull one of the wall-full of antiquarian books I own off the shelf, and through myself into it without distraction.

If I am riding a commute train, or flying on a jet, I will take the convenience of a superior reader, uni-tasking or not, and I will probably like it all the more if it lets me do many things at once as I travel.

</comment></comment><comment><USER5> this reminds me of the UI principle: focus the same way your users do. if your users spend 90% of their time using two features, those are the features you should put 90% of your effort into.

<comment><USER6> Blind leading the blind (leading the blind)?

If your users spend 90% of their time using two features, maybe it's because you've made the other features suck.

</comment></comment><comment><USER7> one thing at a time? Like the iPhone has promoted since its launch?

<comment><USER8> "It's not a shortcoming, it's a feature!"

While I am now an Apple fan, this reminds me of the ridiculous excuses Apple fanboys gave me when they compared their early-generation iPods to my MP3 player at the time (a Rio Karma).

      "It doesn't support gapless playback because in modern times, you should focus songs not albums!"
      "It only holds 10 gigs, because you should only listen to your best songs on the go!"
      "You don't need a button for skipping tracks, because you should spend your time listening to music, not switching between songs!"

</comment></comment><comment><USER9> >When's the last time you did only one thing at a time? If you're reading this—particularly if you're in the news or content business—there's a good chance you'll have trouble answering that question.

Uh, when I read that passage it was the only thing I was doing. I often multitask, but not all the time or even the majority of the time. And as others mentioned, it's not like the Kindle encourages "unitasking" any more than reading a book does.

</comment><comment><USER10> That article is interesting, but his headshot creeps me out while I read it.

</comment><comment><USER11> unitasking - also known as do one thing and do it well</comment>


TCP/IP in Lego - <AUTHOR> http://righteousit.wordpress.com/2010/06/27/practical-visual-three-dimensional-pedagogy-for-internet-protocol-packet-header-control-fields/

<comment><USER2> From the title I assumed someone had built a packet-switching network out of lego, which makes the actuality slightly disappointing.

<comment><USER3> Yeah I thought so too, would've been so awesome..

Though it still is pretty neat.

</comment></comment><comment><USER4> TCP/IP packets made with building blocks, brilliant. They could also be used as cuisenaire rods. I would be interested if anyone has used them in a nontrivial way to represent computable expressions (if you can do with alligators and eggs, you can do it with Lego)

<http://worrydream.com/AlligatorEggs/>

<comment><USER5> Thanks for teaching me a new word, had no idea what <http://en.wikipedia.org/wiki/Cuisenaire_rods> were. :)

</comment></comment><comment><USER6> Yay for Steven's _TCP/IP Illustrated_ book in the background of one of the photos!

</comment><comment><USER7> The legos to make that cost $100? Wow.

</comment><comment><USER8> The article correctly calls it "TCP/IP in Lego(TM)". Isn't Legos a city in Nigeria or a character in Lord of the Rings? :)

<comment><USER9> _Legos_ \- so very much a personal pet peeve.

see this discussion: [http://english.stackexchange.com/questions/10839/legos- not-l...](http://english.stackexchange.com/questions/10839/legos-not-lego)

Although I very much disagree with the upvoted answer which essentially says we're free to invent words and call it english.

1 Company called Lego 1 lego brick or piece 1 lego set 1 lego construction 2 lego bricks or pieces 2 lego sets

To me, it's like 'sheep'. One sheep, flock of sheep - never 'sheeps'.

It's not so much the problem of pluralising the word, but by pluralising it, you're saying that individual piece is a Lego, which makes no sense to me.

EDIT: To prove my point. Take this story: A man walks into an Apple Store. He buys 1 Apple MacBook, 2 Apple iPods and 3 Apple iPads. He takes them home to configure and set up. His wife walks in. Does she say:

a) Oh look, my husband is playing with his new Apple products

b) Oh look, my husband is playing with his new Apples

<comment><USER10> Sheep is a bug in the language and the only reason it's not fixed is because it's not used very often. Like scissors and pants, which have correctly evolved to "a scissor" and "a pant" where I live. On the subject of Lego:

Lego the company - "Lego had high profit this year"

A lego heap - "Put away the lego when you're done with it"

A lego piece - "I'm looking for a 2x3 lego and three 2x2 block legos"

It's all very understandable and natural and you should just let go.

<comment><USER11> _Like scissors and pants, which have correctly evolved to "a scissor" and "a pant" where I live._

At the risk of your anonymity, anonymous, can you say where this is? I haven't heard that usage before.

(Interesting find while googling for that usage — iCarly and perhaps Rhode Island apparently say "a scissors": <http://danwarp.blogspot.com/2009/07/icarly-scissors-huh.html>)

<comment><USER10> More than one people use the anonymous account, so I won't really sacrifice my anonymity by sharing. That said, I'm Bulgarian and we use both "ножица" (scissor, singular) and "ножици" (scissors, plural), both deriving from "нож" -- knife; the latter also means more than one pair of scissors. We never use "a pair of scissors". Unfortunately, I couldn't see if the singular or plural form came first, because the very first published Bulgarian dictionary from 1900 lists both. It also doesn't have the word for "pants", so I can't comment on that neither. In general though, we never use "a pair of" for things that are physically a single object, like a scissors or a pants; "a pair of scissors" would mean two distinct scissors. Of course, all languages have exceptions to every rule and for the above in Bulgarian it's "glasses". We do say "a pair of glasses". We also say "a frameS for glasses" speaking about a single frame for a single pair of glasses.</comment></comment></comment></comment></comment>


Dude's Night, Cooking 101 for Hackers - <AUTHOR> http://lickmyspoon.com/recipes/foodbuzz-24-24-24-dudes-night-cooking-101/ <comment><USER2> It is unfortunate that the knife skills photos show poor (an potentially dangerous) grips.

The shots of breaking down the onion are much better technique.

<comment><USER3> [http://www.5min.com/Video/How-to-Properly-Use-a-Kitchen- Knif...](http://www.5min.com/Video/How-to-Properly-Use-a-Kitchen-Knife-932701)

</comment></comment><comment><USER4> Wine tasting?

In keeping with the Dude theme, I would suggest Belgian beer tasting instead. There are trappists, lambic, framboise, witbier, or my favorite, all of the above.

<comment><USER5> Wine is for dudes and everyone else here in "Southern Europe".

</comment></comment><comment><USER6> I once tried to break a thick frozen pizza into two parts with a hammer. So, cooking stills aren't a priority.

</comment><comment><USER7> Not all hackers are dudes.

</comment><comment><USER8> Sorry I missed it. You need to do this again Hua!

<comment><USER9> Coming soon: Dude's Day: BBQ 101!

</comment></comment><comment><USER10> The crab cakes look good.

<comment><USER11> You have to be careful about crab cakes. There are very few places in the United States where the crab is actually "fresh." Most of the blue crab in the US (which is usually in crab cakes, but not always) is caught in or near the Chesapeake Bay. As a native Marylander, my advice to most people is to usually stay away from the crab unless you're in the MD/VA area as it's probably not fresh. That said, if you've never been to a proper MD crab feast, you may not tell the difference. ;)

<comment><USER9> Agreed, nothing like eating fresh crab!

If they aren't in season, I like to go with Costco's big tub of Chicken of the Sea Crab. It's around $20 and you can make about 8-10 crab cakes. Pretty good and saves you time washing your hands in lemon juice.

</comment></comment></comment><comment><USER12> only you vlad, only you</comment>


Drone strikes increasingly rely on NSA surveillance data, report suggests - <AUTHOR> http://gigaom.com/2014/02/10/drone-strikes-increasingly-rely-on-nsa-surveillance-data-report-suggests/

<comment><USER2> I thought that:

CIA = external spying, NSA = internal spying

So how is a domestic agency helping with foreign drone strikes?

<comment><USER3> You are quite a bit off on both of them. Wikipedia can straighten you out:

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

[http://en.wikipedia.org/wiki/National_Security_Agency](http://en.wikipedia.org/wiki/National_Security_Agency)</comment></comment>


Cap'n Proto 0.6 released – 2.5 years of improvements - <AUTHOR> https://capnproto.org/news/2017-05-01-capnproto-0.6-msvc-json-http-more.html <comment><USER2> As usual, nobody has said "capability" yet, which is unfortunate, because one of Capn's biggest strengths is that it embodies the object-capability model and is cap-safe as a result.

Edit: Why does this matter? Well, first, it matters because so little software is capability-safe. Capn's RPC subsystem is based directly upon E's CapTP protocol. (E is the classic capability-safe language.) As a result, the security guarantees afforded by cap-safe construction are _extended across the wire_ to cover the entire distributed system. This security guarantee holds even if not every component of individual nodes is cap-safe, and that's how Sandstorm works.

Continuing on, there's also historical stuff going on. HN loves JSON; JSON is based on E's DataL mini-language for data serialization. HN loves ECMAScript; ES's technical committee is steered by ex-E language designers who have been porting features from E into ES.

<comment><USER3> Is this the E language you are referring to? Had never heard of it before.

[https://en.wikipedia.org/wiki/E_(programming_language)](https://en.wikipedia.org/wiki/E_\(programming_language\))

<comment><USER4> Yes. It's not widely known because it was somewhat of a research language, never really production ready. But, it presented clean solutions to a huge number of hard problems, and as a result has been pretty influential behind the scenes. E.g. Javascript promises are directly inspired by E.

</comment></comment></comment><comment><USER5> This might be a contrarian view, maybe I'm misunderstanding it. To me, much of message passing is not performance critical, so it would be well served by JSON/YAML/XML for easy implementation/testing/debugging. If one needs performance, he can just send bytes over, which can be (de)serialised in a (couple) dozen SLOC. Sure, when you're talking about very complex structures, RPC, dynamic schemas etc., then you might opt for something like this, but let's be honest - that's quite a minority of current users, isn't it?

I never minded these frameworks, but then I wanted to write a few parsers for some file formats and they used Thrift/Flatbuffers to encode a few ints, which seemed like a major overkill. There was no RPC, no packet loss, no nothing.

<comment><USER4> Your view isn't contrarian at all -- in fact it's widely-held by smart people. But I'll present the counter-argument.

True, in many use cases, performance is not critical. However, when you're doing big data processing or serving at scale, serialization performance does in fact start to matter a lot. If Google Search passed all backend messages as JSON rather than Protobuf, it would probably require 10x the hardware (we may be talking about _millions_ of machines here) and wouldn't be able to respond as quickly. Similarly, Cloudflare couldn't handle its logging load without Cap'n Proto.

Many times, companies who started small and thought performance didn't matter later found themselves needing to do massive, expensive rewrites in order to keep up with scale (e.g., famously, Twitter).

Hand-written binary serializers may be easy to write _initially_ , but they are very hard to maintain. Over time, you'll need to add and remove fields, while maintaining compatibility with old binaries already running in the wild, or compatibility across languages. It's very easy to screw this up with a hand-written encoder, but very easy to get right with Protobuf or Cap'n Proto.

Finally, even if performance isn't an issue, you may find that type safety is useful. If you are writing code in a type-safe language, correctly dealing with JSON actually tends to be a huge pain involving lots of branching. By defining a schema upfront and generating code, you can get a much nicer interface. And if you're doing that anyway, then you might as well take advantage of the more-efficient encoding while you're at it -- it's easy to dump human-readable text for debugging when needed. (As of this release, Cap'n Proto ships with a library for converting to/from JSON, and there are lots of third-party libraries to do the same with Protobuf. Both libraries also have one-liner "dump a debug string" functions.)

<comment><USER6> You don't need a schema for type safety. Just an encoding that preserves type information like all the schemaless binary serializations (BSON, CBOR, etc.) do.

<comment><USER4> You're talking about a different kind of "type safety".

I mean that when I write code to consume a message, I would like to detect (at compile time) if I typo a field name, and I also don't want to worry about what happens if a (possibly-malicious) sender sending me a different type than I expected.

<comment><USER7> I like to use the term "binding" to differentiate between the compile-time type checks and static typing of messages in a programming language vs. the runtime type equivalence checks performed between sender and receiver of a message.

<comment><USER8> Please don't use the term "binding". It has many uses and it mostly tends to confuse people.

<comment><USER7> What kinds of uses of the term "binding" causes confusion in the context of message data types?

I think binding is precisely what is going on when a compiler generates code for marshaling and unmarshaling messages based on a schema.

<comment><USER8> Binding, as a term, is used for anything from assigning values to variables to what is essentially dependency injection of implementations of more or less abstract interfaces.

I'm merely pointing out that the term is vague and can cause confusion. That you make a strong association with one use of the term doesn't really govern what others associate with it.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Some time ago I wanted to use Cap'n Proto in the browser but then I found that the only existing implementation written in JavaScript hadn't been updated in two years and the author himself recommended against its use somewhere in a thread on Stackoverflow. I would love to use Cap'n Proto but for me a robust JS implementation is a sine qua non. Does anyone here happen to know if there's been any progress in this regard or have I missed something?

<comment><USER10> I've got about 70% of a capnproto implementation written in pure javascript that works in the browser.

Part of the problem is that there is a bit of an ideological difference, where I prefer dynamic code to adding build steps but all the existing tools and code assume you want to generate source. I also found it quite irritating to bootstrap too, because the tooling itself uses capnproto. It sounds neat, but then it means that you have to be able to read capnproto in order to be able to read it.

The documentation was also incredibly patchy at the time which made it quite hard to develop for, although I'm told that the kentonv & gang are very helpful.

In the end, I was just starting to struggle with capnproto generics when my requirement went away as the server I was connecting to added a msgpack option.

<comment><USER4> FWIW, the Python implementation of Cap'n Proto loads schemas dynamically -- there is no code generator.

However, this is done through a C extension that calls into the C++ implementation. For browser-side Javascript, that's obviously problematic. (Emscripten isn't really the answer -- would be way too large a download.)

<comment><USER11> > Emscripten isn't really the answer -- would be way too large a download.

Could the emscripten result be slimmed-down?

(I fear the answer is probably "in theory, yes, in practice, it's >100KB")

</comment></comment></comment></comment><comment><USER12> There is some strange geeky enjoyment from browsing all the serialization libraries out there. For my taste, I have centered on Cereal. When workind with C++ end to end, I have found it to be the easiest and fastest way to throw data around.

<comment><USER13> Serialization can easily be a bottleneck, especially for write-heavy systems (like we do, with Event Sourcing). So i think it's quite natural that people try and squeeze the last few milliseconds out of it. It can easily make a huge difference when serializing/deserializing billions of entities

<comment><USER14> Serialization is order of microseconds, not milliseconds.

<comment><USER15> That depends entirely on how much (in both quantity and size) you are serializing, doesn't it?

</comment></comment></comment></comment><comment><USER16> Woohoo! Lack of first class Windows support always held me back. Looking forward to playing with this and seeing hopefully more regular future updates.

</comment><comment><USER17> Great stuff! Since this release comes after the release of GRPC and (slightly less related) Graph API and ships with a web server, how does it compare?

<comment><USER4> Cap'n Proto RPC was originally released before gRPC. That said, gRPC is heavily based on Google's internal RPC system which has been around for a very long time, albeit not publicly.

If you read the Cap'n Proto RPC docs, everywhere where it mentions "traditional RPC", I specifically had Google's internal RPC in mind (having previously been the maintainer of Protobufs at Google). So, you can more-or- less substitute gRPC in there for a direct comparison. [https://capnproto.org/rpc.html](https://capnproto.org/rpc.html)

There are two key differences:

1\. Cap'n Proto treats references to RPC endpoints as a first-class type. So, you can introduce a new endpoint dynamically, and you can send someone a message containing a reference to that endpoint. Only the recipient of the message will be able to access the new endpoint, and when that recipient drops their reference or disconnects, you'll get notified so that you can clean it up. This is incredibly useful for modeling stateful interactions, where a client opens an object, performs a series of operations on it, then finally commits it. Put another way, this allows object-oriented programming over RPC. Also note that you can easily pass off object references from machine to machine -- currently this will set up transparent proxying, but in the future we plan to optimize it so that machines automatically form direct connections as needed, which will be really powerful for distributed computing scenarios.

2\. Relatedly, Cap'n Proto supports "promise pipelining", which allows you to use the result of one RPC as an input to the next without waiting for a round- trip to the client. This makes it possible to use object-oriented interaction patterns with deep call sequences without introducing excessive round-trip latency. This is described in detail at the RPC link above.

<comment><USER18> For me another key difference (and really a killer feature if you need it) is that grpc supports streaming usecases natively besides RPC. In server->client, client->server and bidirectional ways.

Server->Client streaming is e.g. a powerful way to get realtime updates about some state on the server to the client without needing to poll (not performant) or needing to define callback services (ugly to maintain, service lifecycle questions, and if you need an extra connection for from the service to the callback service (client) there are also challenges around routing).

Native support for streaming also removes the need to model explicit flow control (backpressure) behavior in the user defined APIs (like functions for requesting some items in addition to the callback functions for delivering items).

Another difference is that grpc utilizes HTTP/2 as underlying transport protocol. However I'm thinking that's mainly an implementation detail. If Google had designed grpc slightly different (not relying on barely implemented features like HTTP trailers) it could have been a bigger differentiator, e.g. by allowing browsers to directly make grpc calls without proxies.

<comment><USER4> gRPC-style streaming can be implemented in terms of Cap'n Proto object references: When starting a streaming call, the client creates a callback object to be called by the server every time a new message is available, and then sends a reference to that object as part of the request. Or for client->server streaming, the server returns such an object reference.

The drawbacks of callbacks that you mention don't apply in this scenario: The same network connection is utilized for the callback, solving the routing question. The callback object receives a notification when the caller is done with it (or disconnects), so it can clean up, solving the lifecycle question. Flow control / backpressure can be achieved by pausing calls to the callback if too many previous calls have not returned (I actually plan to bake this pattern into the library in the future to make it dead simple).

So, it seems to me streaming in gRPC is actually a narrow subset of what Cap'n Proto can express.

For web stack compatibility purposes, it's straightforward to implement Cap'n-Proto-over-WebSocket. I'm not sure that HTTP/2 buys much on top of that.

<comment><USER18> Thanks for the explanation. If it works like you describe it seems to be a reasonable way to obtain streaming behavior. Will take a look at it if I find some time.

Regarding backpressure and HTTP/2: You get some different kind of backpressure behavior with your approach (application level flow control) and the grpc approach (transport level flow control). Let's say you have 2 functions which are called in parallel. For one the arguments are very big (let's say 100kB), for the other one they are small (some bytes). With HTTP/2 and transport level flow control the small function could get the bandwidth as the big one, which means more requests/s for the small function. With pure application level flow control the small function needs to wait until the big one is fully sent before it can be put on the wire.

Which means if I have 2 tasks that execute concurrently and look like

        A: while (true) { await callBigFunction(); }
        B: while (true) { await callSmallFunction(); }

then with grpc I get more calls for B and without Cap'N'Proto I get the same for both (correct me if I'm wrong).

I don't think it's a huge disadvantage in practice, because if you have large data chunks you should probably design your API different - and if you want realtime behavior then probably both protocols are not optimal. But it's still something to keep in mind.

<comment><USER4> You can achieve what you describe under my scheme by counting the total size of the parameters of all calls in flight rather than just counting the calls. This is what sophisticated systems are doing in practice and is what I plan to do when incorporating the pattern into the library.

<comment><USER18> The described approach sounds very reasonable!

Besides building more support in the library it would maybe also be very worthwhile to have these patterns described together with examples on the website. E.g. how to achieve callback interfaces which don't user another connection, server->client streaming, etc.

For me as a potential user information about these kind of features would make Cap'n'Proto immediately look more interesting. When I look at the website I only see Promise Pipelining described as a main feature - which is novel for sure, but not something that attracts my interest if I look for the other features we discussed about.

</comment></comment></comment></comment></comment></comment></comment><comment><USER19> What always trips me up about capnproto is that it's billed as a serialization library, but what it is is an in-memory storage layout, and "serialization" is mostly just dumping memory into a file, right? (which is cool)

What confuses me is, then what are the costs of migrating to this system? Am I essentially dumping my programming language's object model for my capnproto implementation's? When can this be annoying? Or does it vary from implementation to implementation?

In a similar tangent - how similar is this to apache arrow, not because of the columnar analytics part, but could I expect to just dump a bunch of data in shared memory and read it from another process to eliminate IPC serialization/copy costs?

<comment><USER4> Generally I'd recommend using Cap'n Proto in much the same way as you'd use Protobuf. It's not intended that your in-memory state be in Cap'n Proto objects, only the messages you intend to transmit, or data stored on disk.

<comment><USER20> Why is not intended that in-memory state be in Cap'n Proto / Protobuf objects? What are the down-sides?

<comment><USER21> After integrating protobufs in my application for messaging I decided to use a separate schema for storing the current state of the program. Ie. When state changes, the protobuf is updated and written to disk. When the program restarts, the state file is loaded into memory. I have not run into any problems doing this.

Edit: Your question is addressed here: [https://news.ycombinator.com/item?id=14249367](https://news.ycombinator.com/item?id=14249367)

<comment><USER20> Thanks, but I don't follow how that comment addresses my question. Is it that cost of constructing Cap'n Proto / Protobuf is quite a bit higher than constructing objects defined natively?

<comment><USER4> > Is it that cost of constructing Cap'n Proto / Protobuf is quite a bit higher > than constructing objects defined natively?

I discussed in more detail in reply to your first post, but just to be really clear on this:

No. In fact, for deeply-nested object trees, constructing a Cap'n Proto object can often be cheaper than a typical native object since it does less memory allocation. However, there are some limitations -- see my other reply.

(Constructing Protobuf objects, meanwhile, will usually be pretty much identical to POCS, since that's essentially what Protobuf objects are.)

There is a common myth that Cap'n Proto "just moves the serialization work to object-build time", but ultimately does the same amount of work. This is not true: Although you could describe Cap'n Proto as "doing the serialization at object build time", the work involved is not significantly different from building a regular in-memory object.

</comment></comment></comment></comment></comment></comment><comment><USER22> Does it do protocol negotiation? i.e. can a client ask the server what interfaces it implements?

<comment><USER4> There are a few answers to that:

1\. If you have a remote object reference, you can (explicitly) cast it to any interface type, and then attempt to call it. If it doesn't implement that interface (or that method), an "unimplemented" exception will be thrown back. It's relatively common to do feature detection this way.

2\. It's easy for the application to define a Cap'n Proto interface to support fancier negotiation. For example, you could have all your RPC interfaces extend a common base interface which has a method getSchema() which returns the full interface schema, or a list of interface IDs, or whatever it is you want.

3\. We actually plan to bake in schema queries in a future version, such that all objects will support some sort of getSchema() call implicitly. This would especially be useful for clients in dynamic languages that could potentially connect to a server without having a schema at all, and load everything dynamically.

</comment></comment><comment><USER23> I think this[1] API among others should be renamed and "future" be used instead of "promise" to better reflect C++ naming conventions.

[1] [https://github.com/sandstorm- io/capnproto/blob/247e7f568b166...](https://github.com/sandstorm- io/capnproto/blob/247e7f568b1664cbcca1455243da06a7ab78c6a3/c%2B%2B/src/kj/async- io.h#L54)

<comment><USER4> Cap'n Proto Promises are highly analogous to promises in Javascript. Both are derived directly from the E language, which has been around for decades. It makes sense to stick with the terminology used in similar designs, so that people don't have to re-learn the same concept when switching languages.

C++'s standard library for some reason decided -- relatively recently -- to introduce the term "promise" to mean something different (what most people call a "resolver" or a "fulfiller" for a promise), which is unfortunate. It's C++ that is being inconsistent here.

There are also subtle historical differences between the meaning of "promise" and "future". Historically, futures have usually existed in multi-threaded designs rather than event-loop/callback designs; you wait() on a future, blocking the calling thread, whereas with promises you call promise.then() to register a callback to call when a promise completes. The C++ committee again seems to have gotten this confused with their definition of "future", which looks more like a traditional promise.

<comment><USER24> How do Cap'n Proto Promises and Rust futures relate?

<comment><USER25> They have a lot in common!

For a while, capnp-rpc-rust used `gj::Promise`, which is based directly on the C++ Cap'n Proto implementation of promises (i.e. `kj::Promise`). Back in January, capnp-rpc-rust was updated to use `futures::Future` instead, and it was a fairly straightforward transition, as described in this blog post: [https://dwrensha.github.io/capnproto-rust/2017/01/04/rpc- fut...](https://dwrensha.github.io/capnproto-rust/2017/01/04/rpc-futures.html)

The trickiest part of the transition was dealing with scheduling. The implementation of `kj::Promise` has a built-in scheduling queue that guarantees a certain form of deterministic FIFO semantics, and those semantics are heavily depended upon in the Cap'n Proto RPC implementation. Rust's `future::Future` is less batteries-included, requiring capnp-rpc-rust to explicitly create queues where deterministic scheduling is needed.

Confusing the terminology perhaps even more, in capnproto-rust there is a type `capnp::capability::Promise` that implements `futures::Future`.

</comment></comment></comment></comment><comment><USER26> Windows support is great but why is this a showstopper? This is a common problem in many libraries and the common solution is to mark those platforms as unsupported until sometime steps up. Also platform support is a dynamic list - platforms are kept alive by presence of contributors/maintainers.

<comment><USER4> I think it would set a pretty bad precedent to have Windows support in one release and then drop it in the next release, then bring it back, etc. Windows users would likely be left very confused. Saying "it's up to contributors to step up" is nice in theory but in practice I don't think a well-maintained library can operate that way. Few people are eager to volunteer to run tests over and over fixing tiny issues for a coordinated release...

That said, it probably would have been better to drop Windows temporarily than to go two years without a release. But it always _seemed_ like I'd find time in the next month.

Also note that Windows wasn't the only thing. I have a huge test matrix that I run for every release and, again, to avoid confusion, I want the whole thing to pass for any release. Things like building with -fno-exceptions or 32-bit builds or Android or ancient GCC versions tend to break frequently as the code evolves, but we really ought to have all these working for a release.

But maybe I'm just too OCD about this... :)

We now have AppVeyor (and Travis-CI) set up to build a chunk of the test matrix on every commit, which should help a lot going forward.

<comment><USER27> > But maybe I'm just too OCD about this... :)

It's not OCD, it's good practice and I wish more open-source projects would follow that! Good job!

</comment></comment></comment><comment><USER28> Would it kill developers of open source to provide a simple, two-sentence explanation of what their app does?

<comment><USER29> How's this?

> Cap'n Proto is an insanely fast data interchange format and capability-based > RPC system. Think JSON, except binary. Or think Protocol Buffers, except > faster.

[https://capnproto.org/](https://capnproto.org/)

<comment><USER4> I guess I should make the top banner be a link to the home page, so that people on mobile (who can't see the sidebar very easily) can just mash the screen.

EDIT: done

</comment></comment></comment><comment><USER30> Ver nice and technically better than gRPC. However i better bet my company success on a standard that the big giant Google is betting on, and other companies are embracing. Also client side libraries for all langauges is important. Probably gRPC is probably better here too?

<comment><USER31> FWIW, Cloudflare is betting on Cap'n Proto, and Cloudflare is pretty big too.

<comment><USER4> Though to be fair, Cloudflare is still 2-3 orders of magnitude smaller than Google by most measures. :)

</comment></comment></comment><comment><USER32> A bit off topic, but that title banner is a massive waste of space. It takes up more than half the space on my screen (15" laptop).

<comment><USER33> I know, totally agree. It's actually one of those things that have made me shy away from recommending its use. I continually end up back at Protocol Buffers, simply because the Cap'n Proto website doesn't seem professional to me. Instead, it feels like the back of a breakfast cereal box.

<comment><USER4> Working as intended. :)

<comment><USER33> Ha ha, indeed! :)

</comment></comment></comment></comment><comment><USER34> The name "Cap'n" was forever tainted for me, from my traumatic experience with "Cap'n Software Forth".

[http://www.art.net/~hopkins/Don/lang/forth.html](http://www.art.net/~hopkins/Don/lang/forth.html)

"The first Forth system I used was Cap'n Software Forth, on the Apple ][, by John Draper. The first time I met John Draper was when Mike Grant brought him over to my house, because Mike's mother was fed up with Draper, and didn't want him staying over any longer. So Mike brought him over to stay at my house, instead. He had been attending some science fiction convention, was about to go to the Galopagos Islands, always insisted on doing back exercises with everyone, got very rude in an elevator when someone lit up a cigarette, and bragged he could smoke Mike's brother Greg under the table. In case you're ever at a party, and you have some pot that he wants to smoke and you just can't get rid of him, try filling up a bowl with some tobacco and offering it to him. It's a good idea to keep some "emergency tobacco" on your person at all times whenever attending raves in the bay area. My mom got fed up too, and ended up driving him all the way to the airport to get rid of him. On the way, he offered to sell us his extra can of peanuts, but my mom suggested that he might get hungry later, and that he had better hold onto them. What tact!"</comment>


Referential Transperancy - <AUTHOR> http://poincare101.blogspot.com/2012/02/whats-referential-transparency.html

<comment><USER2> Hey! Thanks for using my explanation from your last article. It's very flattering. And, kudos for calling it what it is.

<comment><AUTHOR> Yup! I love feedback!</comment></comment>


How to Learn Advanced Mathematics Without Heading to University - <AUTHOR> https://www.quantstart.com/articles/How-to-Learn-Advanced-Mathematics-Without-Heading-to-University-Part-1 <comment><USER2> The main thing to remember is that nobody learns mathematics to any significant depth by reading. The only way to learn it is by doing it. Doing it carefully, and in full detail, not falling into the trap of "and I understand it from there".

So the biggest barriers to doing it on your own aren't source material (there is lots of that) it's a good source of correction. There is also the usual problem of self study, in that you don't have a roadmap and can waste time easily.

That said though, one advantage if you are diligent is that you probably by necessity learn techniques of checking your work (formally and informally) earlier than typical students, which is a good thing.

<comment><USER3> This is probably the reason why there are so many more autodidact programmers than mathematicians. When programming, you know if you made an error as soon as you try to run your code. The program, by definition, must be "correct" in order to execute. The "source of correction" is the error detection built into any programming language runtime or compiler.

No such "source of correction" exists for mathematics, and that makes it an inherently more difficult subject to teach yourself, because any errors you make will "fail silently" unless you are capable of detecting them yourself, which by definition you cannot do without experience. This is why a mentor/professor makes learning mathematics so much easier; he/she plays the role of mathematical compiler.

<comment><USER4> Good point and great analogy, though I think EWD might be turning over in his grave. While the error detection built into compilers and the testing process are, in general, indispensable tools for developing stable software, a program that executes without any evidence of error is a great distance from a program that has been shown to be correct.

<comment><USER5> It's still easier to build up an understanding of computers under that environment. You may not be proving your programs correct, but you are probably proving them useful.

</comment></comment></comment></comment><comment><USER6> I've been getting into math recently and found [https://www.youtube.com/user/professorleonard57](https://www.youtube.com/user/professorleonard57) Professor Leonard's videos are excellent, clear and he injects just enough humour to keep it from been too dry.

</comment><comment><USER7> Learn it in a group. Mathematics is a social activity. Meeting even once a week to discuss the material you're trying to learn will vastly improve the learning rate for everyone involved.

<comment><USER8> Brilliant suggestion!

</comment></comment><comment><USER9> There is no reason to shun university.

If you want to learn mathematics but do not have the time for a full time degree do it part time.

You are most definitely not actually going to reach the same level of mastery of mathematics as even the most mediocre graduate by studying alone. It requires a huge amount of commitment and staying focused and discipled enough is very hard when you don't have a set goal and good continuous guidance and motivation.

It is also very boring and much less productive to study alone. I'd estimate that 70% of my learning comes from the tutorial sessions. Reading the literature is just the starting point. It only counts for 10% if that. Homeworks and exams are also very useful because they make sure you have the prerequisites to move on and start learning something new.

<comment><USER10> I disagree, at least at the undergraduate level.

There is no shortage of problems and solutions to check your knowledge for much of undergraduate mathematics.

As to the value of tutorial sessions for you, it is important to remember that people learn differently. Speaking with an expert is valuable, but not required in my opinion.

To really learn a subject, you have to go beyond the minimum required to get a good grade on homework and tests. You can absolutely do this in university, but I found that I was rarely willing to do so. Studying on my own, I find it easier to reach a deeper level of understanding.

</comment></comment><comment><USER11> An early place where the OP dropped the ball:

> and some good experience manipulating continuous functions and their > derivatives.

Nope. If a function is differentiable, then it is continuous, but continuity is not sufficient for differentiability. So, we can't talk in general about the derivatives of continuous functions.

E.g., each sample path of Brownian motion is almost surely differentiable nowhere.

Just f(x) = |x| is continuous but not differentiable at x = 0.

Maybe the OP advice is okay in England, but here in the US I would advise people wanting to learn to f'get about the OP and get better advice.

For job opportunities in _quantitative trading_ , I tried that on Wall Street here in NY, and got nowhere. I came with a Ph.D. from a world-class US research university with my dissertation research on stochastic optimal control, which should have put my resume near the top of any stack. My favorite prof was a star student of E. Cinlar at Princeton and, thus, about the best there is for mathematical finance. I came with a long, solid background in software, peer-reviewed publications in mathematical statistics, optimization, and artificial intelligence.

I had a good background in second order stationary stochastic processes, power spectral estimation, and the fast Fourier transform -- no interest.

Got nowhere. That was before I heard about James Simons.

One interview was by a guy who recruited for Goldman Sachs, and he didn't have a clue about my background.

Another interview was at Morgan Stanley: The interview was in their computer group, but I indicated that I'd like to get into quantitative trading -- they acted like they had never heard of any such thing.

I got the impression that only a very tiny fraction of the people on Wall Street had good backgrounds in measure theory and stochastic processes based on measure theory, that my resume never got in front of any such person, and that the other people didn't know measure theory, anything about Brownian motion, power spectra, time series analysis, etc. and were looking to hire people like themselves.

Candidate Lesson: Study all the math you want, but don't expect Wall Street to be interested.

<comment><USER12> >> and some good experience manipulating continuous functions and their derivatives.

> Nope

1\. "good experience manipulating differentiable functions and their derivatives" sounds weird in prose.

2\. Some continuous functions are differentiable. Those ones have derivatives you can manipulate. In fact knowing when a function is not differentiable is a pretty useful skill.

 _> The interview was in their computer group, but I indicated that I'd like to get into quantitative trading -- they acted like they had never heard of any such thing._

Sounds like you interviewed for position X and talked about wanting position Y, and were rightly rejected as "not a good fit; likely to leave at first opportunity".

 _> only a very tiny fraction of the people on Wall Street had good backgrounds in measure theory and stochastic processes based on measure theory_

Probably true. Think of this as "calculus for engineers vs. analysis", and imagine how well a civil engineering interview would go if you talked about different types of integrals instead of talking about how to use the basic stuff to build good bridges. Fact is most people in industry are looking for "calculus for engineers" levels of formal understanding. Enough to be useful and make money while avoiding expensive mistakes.

 _> and were looking to hire people like themselves._

Also probably true. This is a good assumption not just on Wall St but everywhere.

<comment><USER11> > Think of this as "calculus for engineers vs. analysis", and imagine how well > a civil engineering interview would go if you talked about different types > of integrals instead of talking about how to use the basic stuff to build > good bridges.

That analogy shouldn't apply to quantitative trading on Wall Street: That challenge needs more than just _engineering_ math approaches if only to read the literature.

E.g., apparently broadly the first cut way to evaluate _exotic options_ is to use the Brownian motion solution to the Dirichlet problem, that is, the subject of Markov processes and potential theory. The subject is awash in measure theory, e.g., stopping times, the strong Markov property, regular conditional probabilities, of course conditioning and the Radon-Nikodym theorem. This isn't advanced calculus for engineers. E.g., the work of Marco Avellaneda at NYU Courant, Steve Shreve at CMU, no doubt the work of E. Cinlar at Princeton.

</comment></comment></comment><comment><USER13> A single book is enough to learn mathematics:

Riley, Hobson, Bence: Mathematical Methods for Physics and Engineering: A Comprehensive Guide

It has a whopping 1300 pages, but it has everything you need. And if that is not enough for you get

Cahill: Physical Mathematics

This will give you advanced topics like differential forms, path integrals, renormalization group, chaos and string theory.

<comment><USER14> Thanks for the suggestion. Like you mentioned though getting to the end of 1300 pages will take ages. Hope I can find that sort of time.

</comment></comment><comment><USER15> I know that many learn programming themselves but I'm curious if anyone have learn advanced mathematics this way.

<comment><USER16> What are the best ways for a non-genius, normal person to learn advanced mathematics?

<comment><USER17> It is very easy to get most mathematics textbooks online, through slightly unsavoury means. It is far more difficult to figure out which textbooks are worth reading---this is a process that requires trial and error, and browsing through recommendations (math.stackexchange and mathoverflow.net have many good textbook recommendation questions, with many excellent answers).

Also, it is very easy to audit courses at universities! Get out there, ask the professor if you can audit the courses (make friends with them too!), and enjoy yourself a stress-free, and money-free, quality education.

<comment><USER18> "Unsavoury", as in?

<comment><USER19> Piracy.

Though, between price fixing and booksellers going under and not being able to guarantee that you will retain access to the books you bought, I'd say that this form of piracy is morally ambiguous.

</comment></comment></comment></comment></comment><comment><USER20> Amazing how thorough the Math curriculum is in the UK! I got a minor at my undergrad just by doing stats, linear algebra and calc through multivariate. I think I was just 2-3 courses shy of a BA in the subject.

I'm curious how many people have met self-trained mathematicians in real life. I know there are storied examples, but is it feasible? (Compared to say - self-trained programmers or writers)

<comment><USER21> > I got a minor at my undergrad just by doing stats, linear algebra and calc > through multivariate.

I wouldn't call this a good thing; this just seems like a sane basis for any maths work (including Comp Sci).

<comment><USER20> That's my point. It was pretty much what was required for the CS degree. The UK standard is much higher.

<comment><USER22> I don't think it's just the UK. At Berkeley, for example, the Math minor requires 4 lower division courses and 5 upper div.

[https://math.berkeley.edu/programs/undergraduate/minoring- ma...](https://math.berkeley.edu/programs/undergraduate/minoring-mathematics)

<comment><USER20> Yes - 9 versus 5. Is Berkeley quarterly or semester? Either way, it looks like a much more rigorous program. (I've generally been very impressed with Berkeley Math and CS grads)

</comment></comment></comment></comment></comment><comment><USER23> Any one know any books or resources that concentrate on invariant programming? Translating recursive code into properly tail recursive or iterative code can be pretty difficult.

<comment><USER7> `Pearls of Algorithmic Design` by Bird - Beautiful little book. It's a series of problems that are solved by first writing the naive program and then transforming it rigorously to make it more efficient.

`Algebra of Programming` by Bird and De Moor - This a treatment of the theory that is implicit in the methods of the previous book.

</comment></comment><comment><USER24> It's cute that quants think what they do is advanced, isn't it?

<comment><USER25> It's cute that the article is littered with Amazon referral links to textbooks.

<comment><USER26> I'm curious why people care about articles with referral links. It's not like you're paying more if you end up buying something, is it?

<comment><USER27> It is always good to know when someone is profiting financially from a recommendation they're giving you.

<comment><USER26> Sure, I'll buy that in principle. But wouldn't you agree that it mostly matters if someone is recommending some shady financial product or otherwise high-ticket item? What's the worse that could happen when someone makes (text)book recommendations?

Affiliate links are also a good way to compensate people for curating valuable information. So the sort of "it goes without saying affiliate links are bad" attitude is kind of a mystery to me.</comment></comment></comment></comment></comment>


How ready is the U.S. for a North Korean missile attack? - <AUTHOR> https://www.axios.com/if-north-korea-nuked-the-u-s-today-2456998071.html <comment><USER2> I think the risk that terrorists detonate a dirty bomb in urban areas or poison the water supplies (which is actually really easy) is much higher and more alarming than anything North Korea has ever done or will do.

</comment><comment><USER3> How ready are North Korea for a North Korean missile attack?

</comment><comment><USER4> I love how diplomacy isn't mentioned as an option. Sounds like the message between the lines is to expect and fear inevitable missile attacks.

<comment><USER5> You can't talk NK down without making concessions. Diplomacy isn't brainwashing.

<comment><USER6> Historically making concessions hasn't worked either. We made many concessions and the DPRK didn't follow through. I think at this point diplomacy is not off the table, but we have to see some lasting comittment and trust building from both sides.

<comment><USER5> Yes, I wasn't implying concessions would work.

</comment></comment></comment></comment><comment><USER7> War is going to look like nothing compared to what happens to civilization when the ice caps have melted.

</comment><comment><USER7> It's such a silly question. No one is readu for a missile attack except the navy. And no one can prevent a missile attack despite all the bluster about missile defense systems, again, except the navy, and the only reason the navy can defend is because ships are such small targets compared to countries and cities, so navy defensive systems have a chance of hitting incoming missiles because there is some certainty about what they are aimed at. Even then I wouldn't give a ship much of a chance against multiple incoming missiles.

The only positive thing working for the target when it is a city is that ICBMs are likely to fail to hit and detonate precisely as intended.</comment>


Planet's erratic magnetic field forces emergency update to global nav systems - <AUTHOR> https://www.independent.co.uk/news/science/magnetic-north-pole-moving-arctic-siberia-canada-earth-navigation-ships-a8724426.html <comment><AUTHOR> The disaster movies -- with this announcement as the prologue -- almost write themselves.

</comment><comment><USER2> It seems like with tzdata, there should be magnetic field data (mddata).

</comment><comment><USER3> Surprise affect of the shutdown</comment>


Go Running on the Rumprun Unikernel - <AUTHOR> https://github.com/deferpanic/gorump <comment><USER2> This title sounds like a children's fairytale.

</comment><comment><USER3> how do I debug a program running on a unikernel?

<comment><USER4> With gdb, prints, and lots of thinking. In other words, pretty much like you'd debug one elsewhere, except instead of "run" in gdb you need "target remote <guest-gdbserver -address>".

<comment><USER3> if my program crashes, will it crash the unikernel? is there a usermode/kernelmode separation?

<comment><USER4> When all of the "kernel" exists to service that single application alone, does it matter? Where does the kernel start and the application/libraries end? Who says that a protection barrier is even best suited for every application at what is typically the syscall level?

Yes, you _can_ add protection barriers (at least if the underlying HW supports it), but I have trouble imagining what you'd really gain. Maybe, if we assume the cloud, if you restrict the hypercalls to the "kernel", you can add some extra fences an attacker would need to go through to attack the hypervisor, but that barrier would not be at the normal user/kernel separation in a general purpose OS.

</comment></comment></comment></comment><comment><USER5> Sweet, nice work.

</comment><comment><USER6> neat!

</comment><comment><USER7> You beat me to this! Awesome!</comment>