Linux containers in 500 lines of code - <AUTHOR> https://blog.lizzie.io/linux-containers-in-500-loc.html <comment><USER2> Since others are sharing lightweight container implementations, I'll throw mine in. This one is written in Scheme: [http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/lin...](http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/linux- container.scm#n268)

I like to think that there are sufficient code comments and docstrings to help demystify what is going on under the hood with containers.

<comment><USER3> what language is written in? It looks like lisp, but exceptionally readable.

<comment><USER2> Scheme, Guile in particular: [https://gnu.org/s/guile](https://gnu.org/s/guile)

</comment></comment></comment><comment><USER4> The root capabilities section is worrying. Instead of trying to exhaustively list every capability that needs to be dropped, shouldn't the code instead just list the capabilities that are allowed, and clear all the others?

This would seem to better guard against accidentally missing existing capabilities, and also protect against newer capabilities that might be added in a future kernel.

<comment><USER5> I fully agree that whitelisting is safer than blacklisting.

But on the top of the article, the author explicitly recognzied this and explained why they went down that route:

 _> I wanted specifically to find a minimal set of restrictions to run untrusted code. This isn't how you should approach containers on anything with any exposure: you should restrict everything you can. But I think it's important to know which permissions are categorically unsafe!_

<comment><USER4> Fair point. And the article does make a good read, with explanations about why each capability in particular should be disallowed.

</comment></comment></comment><comment><USER6> What a fine piece of literate programming!

I've just printed it out, and it literally contains 100 page of explanation and context for that 500 lines of code. Great work!

<comment><USER7> Just curious, why print it out?

<comment><USER8> Printed out works are less distracting, you can also write on them with a pencil or highlight things you like. Also if the page ever disappears / becomes inaccessible you have a backup of it. Not something I do, but I can see the uses. A coworker did it to analyze someone else's code. Also it doesn't drain your eyes as much. I sometimes wish I could have a Kindle that just showed me code (with some syntax highlighting) so I could look at code on an e-reader type of display but never drain my eyes doing so.

<comment><USER9> > Also if the page ever disappears / becomes inaccessible you have a backup of > it.

I get the other parts, but this is the one thing where having it in a computer format would be _more_ practical. :-) I would rather go the opposite way, i.e. scan physical book for the purpose of keeping a backup.

</comment></comment></comment></comment><comment><USER10> Yet another lightweight container runtime: bocker, docker reimplemented in about 100 lines of bash: [https://github.com/p8952/bocker](https://github.com/p8952/bocker)

</comment><comment><USER11> Nice post! Plug for another container runtime, but in python: [https://github.com/kragniz/omochabako](https://github.com/kragniz/omochabako) (although it doesn't do networking or cgroups)

Writing this kind of stuff from scratch is good fun, and really helps understand the underlying kernel features.

</comment><comment><USER12> I like to go to the first few commits of some repositories to see how the initial proof of concept was implemented. Docker was one that surprised me. Turns out that the core of it was mounting some folders with union fs and providing an API to track its location and status [1].

[1] [https://github.com/moby/moby/blob/a27b4b8cb8e838d03a99b6d2b3...](https://github.com/moby/moby/blob/a27b4b8cb8e838d03a99b6d2b30f76bdaf2f9e5d/filesystem.go#L35)

</comment><comment><USER13> Kinda cool how it's all generated from an org-mode file: [https://blog.lizzie.io/linux-containers- in-500-loc.org](https://blog.lizzie.io/linux-containers-in-500-loc.org)

Really nice example of the power of literate programming in general and of org-mode's support for it in particular.

</comment><comment><USER9> She mentions five Linux kernel mechanisms – "namespaces", "capabilities", "cgroups", and "setrlimit". Is any of those what I should use if I want to run an application inside some kind of container that lets me intercept file system calls (for example for the purpose of creating a file on the fly as it is accessed)?

<comment><USER14> Seccomp with ptrace is the way I'd do this. You can setup the rules to signal the ptracing process to intercept the syscall. I've not done it before but it should be possible. Id also look at doing it in a mount namespace with overlayfs on top of everything the process can see, so that you can manipulate anything you want or need filewise without destroying the original system. Then you can copy out any changed files later if you want to preserve them.

<comment><USER15> You should check out DockerSlim [0] then :-) It'll generate a seccomp profile for you and it uses ptrace too.

[0] [http://dockersl.im](http://dockersl.im)

</comment></comment></comment><comment><USER16> Is it only me or both firefox and chromium refuse to connect with something like ERR_SSL_PROTOCOL_ERROR?

</comment><comment><USER17> off-topic, but that's a pretty cool e-mail address she's got :-) I wonder how many clients fail on it.

<comment><USER18> Huh. That is interesting. _ makes me think of a placeholder in Scala. It is a totally valid e-mail address .. makes me want to add it to my own domain and use it as a junk address.</comment></comment>


Has Google's browser peaked already?  - <AUTHOR> http://www.newscientist.com/blogs/shortsharpscience/2008/10/at-the-beginning-of-september.html

<comment><USER2> If it's being reviewed in the New Scientist, I'd hardly say it's failed.

</comment><comment><USER3> The tipping point of Chrome is just around the corner.

</comment><comment><USER4> most people running browsers want to make sure that it will run everything they normally do before committing to a switch. i run chrome, but i keep firefox close at hand, and IE as a 3rd backup as well.

i like chrome, and i see where they're going with it, and it's pretty ambitious. just wish it didn't make my hard disk thrash constantly when i use it. looking forward to its future, you'll see great things. it may just herald web 3.0 yet</comment>


How does the YC news web page look if you have a message? - <AUTHOR>

Hi friends,
I'm a new user here and I was told if I had received a message, I'd see it at the top of the YC news web page.
If some of you can take a screenshot or can help know how to spot it when I have one, I'd appreciate it.
Thanks in advance,<AUTHOR> <comment><AUTHOR> Bump?</comment>


Ask HN: C/C++ adjusting variables at runtime - <AUTHOR>

I recall hearing of a library that can be linked into a C/C++ program that allows you to register variables. When your application is launched, the library would start a webserver, which you can then connect to. The displayed webpage would then show you all the variables you have registered and allow you to adjust them.
In terms of games development, this would be very useful, but after spending 90 minutes searching Google, I can't find the library. Either it no longer exists, my search terms are bad, or perhaps I made up this whole idea in my head.
Can anyone help? <comment><USER2> I wrote an HTTP server ([https://github.com/tom- seddon/yhs](https://github.com/tom-seddon/yhs)) with pretty much exactly this use case in mind. (This influenced the main unusual thing about it: it doesn't use threads, the idea being that when your function is called in response to an HTTP request, you're less likely to have to do anything special before modifying values as requested.)

The code is mostly complete, and should be usable as-is, but I never ended up using it in anger. My quick and dirty stopgap solution at the time was some on-screen (on the iPhone) widgets, and people seemed to prefer that in the end, because it meant they didn't need a computer/second iPhone/etc. So I never rolled out an HTTP-based equivalent.

If I were doing it again, I probably wouldn't bother with a full(ish) HTTP implementation - I'd support only WebSockets. Then write the Javascript client code separately from the game, and store it separately in SVN or whatever. Faster iteration on the client code, and you can update the UI stuff separately from the game.

Though of course, if people preferred on-screen widgets once, they might then still prefer it a second time ;)

(As an example, a project that's on my must-take-a-closer-look list, that I believe but works in the way I suggest: [https://github.com/Celtoys/Remotery](https://github.com/Celtoys/Remotery))

<comment><AUTHOR> I also stumbled upon microprofile [https://bitbucket.org/jonasmeyer/microprofile](https://bitbucket.org/jonasmeyer/microprofile) which has similarities to Remotery.

<comment><USER2> That's another entry for my must-take-a-closer-look list :)

</comment></comment></comment><comment><AUTHOR> I have come across GLConsole [http://www.robots.ox.ac.uk/~gsibley/GLConsole/](http://www.robots.ox.ac.uk/~gsibley/GLConsole/) and CVars [https://github.com/arpg/CVars](https://github.com/arpg/CVars) and [http://anttweakbar.sourceforge.net/doc/](http://anttweakbar.sourceforge.net/doc/) which are definitely along the lines of what I was after. I just seem to specifically remember something that displayed the information via a webserver, at the time I remember thinking I'll come back to integrate it at a later date, but now can't find the original source!

</comment><comment><USER3> I think you are looking for something like CVars, or equivalent. The doom source has an implementation, there is also one as part of the library below which I highly recommend. [http://www.robots.ox.ac.uk/~gsibley/GLConsole/index.php?n=Ma...](http://www.robots.ox.ac.uk/~gsibley/GLConsole/index.php?n=Main.Documentation)

</comment><comment><AUTHOR> The first post on here lists a lot of cool things it would be nice to be able to do... [https://www.reddit.com/r/programming/comments/36d190/h2o_is_...](https://www.reddit.com/r/programming/comments/36d190/h2o_is_a_very_fast_http_server_written_in_c_it/)

</comment><comment><USER4> Kuck and Associates had a performance tuning library with OpenMP support years ago that did this or something similar to this around 17 years ago. They got acquired by Intel. I don't know if Intel's compilers and libraries still have this feature.</comment>


Google is "pretty sure" its data is now protected against government spying - <AUTHOR> http://thenextweb.com/google/2014/03/07/google-pretty-sure-protected-government-spying-eric-schmidt-says/?fromcat=all#!yW811

<comment><USER2> There are still national security letters. There is no protection against the unconstitutional "patriot act"

</comment><comment><USER3> This is interesting. Is Facebook "pretty sure" of this as well?</comment>


An experiment: Shared memory vs. files - <AUTHOR> http://bre.klaki.net/blog/2011/12/27/

<comment><USER2> Using read()/write() to access shared files is a bad idea because you have no control over buffering. Just because you've written something to a file does not mean it actually has been written somewhere where other processes can see it when they try to.

However, using shared files for IPC is very practical (I've done it before), but you want to use mmap() in conjunction with at least memory barriers or mutexes/semaphores/condition variables that work between processes. If you just need memory barriers, then the atomic_ops lib (<http://www.hpl.hp.com/research/linux/atomic_ops/>, <https://github.com/ivmai/libatomic_ops/>) will include those. For more advanced interprocess synchronization, you can use named semaphores on Linux/OS X (sem_open() and friends); on Linux, mutexes also work in shared memory.

Also, channels created with pipe() are very efficient on modern UNIXes; if that type of IPC is all you need, you may not require anything else (I've benchmarked them myself vs. handwritten implementations, and they're difficult to beat if there's any measurable degree of contention).

Incidentally, despite the author's father having misgivings about shared memory models, there's nothing inherently problematic about them; it's the near complete lack of programming language support to make it safe that makes it so frustrating to use. If you have a language that does not allow you read/write access to data without first having acquired the corresponding read/write lock, it's not any more error prone than interprocess communication.

The other element that makes shared memory concurrency hard is again a programming language issue; the absence of efficient thread-local variables. If you have efficient and convenient thread-local storage, you have all the benefits of separate processes (you can just make all your data thread-local), but can gradually share those data structures that can safely be shared, and generally more easily than in a multi-process model (try keeping anything that contains pointers in an mmap()ed area without tearing your hair out).

<comment><AUTHOR> If you are using write(2)/read(2) on a local file, is there any other buffer that comes into play aside from the memory in buffer cache itself?

You are correct that obviously we don't really know when the data will hit disk, but that doesn't matter because the readers and writers are all hitting the same in-memory cache.

<comment><USER2> Well, technically, the POSIX standard specifies that "After a write() to a regular file has successfully returned: ... Any successful read() from each byte position in the file that was modified by that write shall return the data specified by the write() for that position until such byte positions are again modified."

How well any given operating system implements this and whether it properly considers all the aspects of multiple processes writing/reading to the same file is anybody's guess. Linux /should/ do it correctly, but as I recall, SQLite had some related issues with shared files on OS X a few years ago.

</comment></comment></comment><comment><USER3> I thought that was what mmap was for: <http://en.wikipedia.org/wiki/Mmap>.

And compare <http://beej.us/guide/bgipc/output/html/multipage/mmap.html> to <http://beej.us/guide/bgipc/output/html/multipage/shm.html>

<comment><AUTHOR> Mmap just gives an alternate API - access the file contents as a memory buffer, not a file. Turns out the underlying mechanism is the same, and if you are happy with fseek(), read() and write(), you don't really need mmap at all.

<comment><USER4> That's true on Linux, but is it also true about other OSes?

Also, this will map the file privately (MAP_PRIVATE), meaning every process gets its own copy in its address space, and any coordination will have to go through the IO subsystem to reach the other processes.

Sharing with MAP_SHARED will save space by sharing the memory between processes. It's also possible to share memory not backed by a file, which is even more efficient.

</comment></comment></comment><comment><USER5> Related reading that may be interesting: [http://williamedwardscoder.tumblr.com/post/13363076806/buffc...](http://williamedwardscoder.tumblr.com/post/13363076806/buffcacher)</comment>


Dear Dawn: How a Nasa robot messed up our science fiction, "The Expanse" - <AUTHOR> https://www.nationalgeographic.com/science/2019/02/dear-dawn-james-sa-corey-pays-tribute-nasa-ceres-mission/ <comment><USER2> Very interesting piece on the significance and impact of science to future and present science fiction writers and creators.

</comment><comment><USER3> National Geographic autoplays video, to troll its readers.

<comment><AUTHOR> The EFF ad blocker "Privacy Badger" blocks stuff like that.</comment></comment>


Would you propose with a diamond grown in a lab? - <AUTHOR> http://qz.com/630512/would-you-propose-with-a-diamond-grown-in-a-lab/ <comment><USER2> Yes? Diamonds aren't a rare rock anyway though, amazes me they are so expensive

</comment><comment><USER3> Won't marry a woman who would want to waste money on a shiny rock.

<comment><USER4> I wish you good luck in finding a spouse. It's not about the shiny rock, it's about the financial commitment to a symbol of your enduring love, or something.

<comment><USER5> There has to be something way more awesome than a diamond ring that costs a bundle.

I'm probably fucked; I don't like hanging on to stuff as momentos. That goes double for expensive momentos. Triple if it breaks some societal norm.

My college had a class ring that was kind of a big deal. College buddies pester me years later about when I'm going to get mine. They teased the guy who got silver instead of gold (seriously).

Never. Why do I want a $1000 reminder of something I already have? It's also a huge psychological ploy to get people to rep the school and donate whether or not it deserves it.

I guess buying an expensive ring could make somebody think of me constantly. I'd vastly prefer to have some crazy experience or donate to something we care about and buy a regular priced ring to use as a social symbol.</comment></comment></comment>


Linode is down again - <AUTHOR> http://status.linode.com

<comment><USER2> Remember guys & gals: this can happen to you. I am a fanatical Linode customer, and they are, in general, an extremely rock solid service, but that doesn't alleviate my responsibility to ensure my application is available regardless of datacenter outage. Power outages happen to EVERY datacenter. There are some very well documented and understood ways to alleviate this problem.

<comment><USER3> Care to enumerate a few of them?

<comment><USER4> More than one server across multiple datacenters is the only way. The use either a load balancer (which brings its own problems) or some kind of status aware DNS scheme to route traffic to live servers.

I wish linode would offer some kind of high availability load balancing like amazon ec2 does, that really is a killer feature.

<comment><USER2> I wouldn't be so sure that ELB's are actually failing whole IP addresses across availability zones. Given the current ELB architecture is heavily dependent on dynamic DNS resolution, I am pretty suspicious that they are using DNS for failover. The separate set of DNS servers specifically for elb.amazonaws.com and the 60 second TTLs on the CNAMEs they generate seem to indicate this. Of course, there is no documentation to either confirm, or deny this. Amazon simply states in vague terms that it's highly available, but doesn't state how it's designed, or even possible failure outcomes.

<comment><USER4> Hmmm. Interesting point. However, if that were the case, why would ELBs be restricted to single AWS regions?

Anyway, its a nice feature that it just works without me needing to set it up.

</comment></comment></comment></comment></comment><comment><USER5> Please change the title to indicate this is just the Fremont datacenter. The current title needlessly scares those of us with linodes in other datacenters.

</comment><comment><USER6> And as luck would have it this happened right after one of my biggest clients sent out a bunch of holiday coupon codes to all of their customers. Do. Not. Want.

</comment><comment><USER7> Are there clever solutions for routing traffic to other linode datacenters during one of these outages? I'm moving to AWS if I can't do something akin to elastic ip across datacenters. Linode currently only allows you to swap ip addresses within a dc.

<comment><USER8> use a DNS roundrobin with low TTLs and use monitoring to remove IPs when they go down. if you have 3 hosts in your production app's roundrobin, that makes it much less likely that they'll hit the dead server and if the TTL is 300, then it's only a few minute window anyway.

<comment><USER9> That's material for a great blog post. Please write an article wherever you can and share!

<comment><USER10> Visual Website Optimizer setup is exactly like this. We documented it here [http://visualwebsiteoptimizer.com/split-testing- blog/maximum...](http://visualwebsiteoptimizer.com/split-testing-blog/maximum- theoretical-downtime-for-a-website-30-minutes/)

</comment></comment></comment></comment><comment><USER11> Waiting for the mandatory "Goodbye Linode" post. </sarcasm>

</comment><comment><USER12> Can anyone recommend good documentation on load balancing a LAMP app across multiple independent VPS providers?

We've had a high profile site affected by these Fremont outages so I'm thinking the only real solution is to have VPSs at Linode, Slicehost and EC2 then load balance among them. Of course, then the question is, what do you do when the load balancer goes down?

</comment><comment><USER13> This is why Linode is better than many other services I've used. Every data center has outages, but at least Linode makes a point to update the server status promptly and (it seems) implement the fixes as quickly as possible.

rbranson is right: the responsibility for redundancy lies with you.

</comment><comment><USER14> Other discussion: <http://news.ycombinator.com/item?id=1934013>

</comment><comment><USER15> My London node was down briefly two days ago .. same happened about a month ago - is this a reason to worry?

</comment><comment><USER16> From status page: Initial indications are pointing towards another power outage. We are now working on bringing Linodes up as soon as possible. We will continue to post updates as we have more information.

<http://status.linode.com>

</comment><comment><USER17> My Linode slice is in Atlanta, not Freemont, and it went down once today and once earlier this week.

<comment><USER18> I don't think that was the entire Atlanta data center, for what it's worth. Mine's in Atlanta too and I haven't had any recent downtime.

</comment></comment><comment><USER19> And to think how much time I spent last month recommending these guys, especially the Facebook-friendly Fremont data center. Awkkkk-ward.

<comment><USER20> Why? Because there are other services with no downtime?

Even Amazon and Rackspace go down...

Even Google has had outages...

</comment></comment><comment><AUTHOR> This is really annoying... Down 2 times in 3 days!

<comment> mike-cardwell Have they broken your SLA?

<comment><USER21> Linode has a 99.99% uptime guarantee, which amounts to 43 minutes and 12 seconds offline in a 30 day month. While I don't have a Linode in Freemont, their status page appears to indicate, at minimum, 1 hour of downtime. As repayment for the inconvenience, users get the lost time added to their balance.

<comment><USER22> A 99.99% uptime guarantee would be 4.32 minutes per month. You calculated for a 99.9% uptime guarantee.

<comment><USER21> I'm going to take a long break from ever doing math again on HN.</comment></comment></comment></comment></comment>


Government Digital Service (GOV.UK) is hiring -- in a big way - <AUTHOR> http://digital.cabinetoffice.gov.uk/2011/10/25/the-second-lever/

<comment><AUTHOR> They're advertising for 22 devs on up to £73K (deadline: 13 Feb), as well as interaction people and others.</comment>


What do founders do once they hit 35 and are officially over the hill? - <AUTHOR> http://www.quora.com/Silicon-Valley/What-do-people-in-Silicon-Valley-plan-to-do-once-they-hit-35-and-are-officially-over-the-hill

<comment><USER2> Amazing to see the number of Founders of VERY successful start-ups who have responded to this on Quora, and how many of them were over 40!

<comment><USER3> It actually made me feel really good, and I'm 23</comment></comment>


Phpng – New generation PHP - <AUTHOR> https://wiki.php.net/phpng

<comment><USER2> If PHP keeps going this way, it will be sticking around for another 19 years.</comment>


Business Insider Fires CTO Pax Dickinson Over Offensive Tweets - <AUTHOR> http://www.forbes.com/sites/jeffbercovici/2013/09/10/business-insider-fires-cto-over-offensive-tweets/

<comment><AUTHOR> Summary here: [http://valleywag.gawker.com/business-insider-ceo-and-top- edi...](http://valleywag.gawker.com/business-insider-ceo-and-top-editor-henry- blodget-provi-1281334551)</comment>


Late 30s Career Advice Needed - <AUTHOR> Dear HN,
I need honest advice. I am in my late 30s, in so cal and recently departed my position of 10 years as a Sr Software Dev at an international electronics company.
My resume is diverse-- I've worked as an Architect, Team Lead, Software Developer, Systems Admin. I've done desktop, mobile, web, web services, consumer electronics, semiconductor manufacturing... etc. I was a core contributor to a major Linux distro many many years ago.
My last project--I designed, implemented and was Team Lead for a cross-platform IoT library for Linux, iOS and Android. I worked in half a dozen languages on a daily basis.
I have been out of the job market so long, I don't know how to sell myself, if I'm viable, or how or where I should be looking for work. My talent isn't any particular platform or technology-- I don't have a specialty. My talent is this-- I always focus on doing a good job-- and I pick up any skills needed along the way to do that. I'm an abstract thinker. When I last looked for a job the mantra was "let's hire smart people and see what they can do." Great for my kind-- but now the engineering world seems to be populated with concrete thinkers-- knowledge isn't how things work-- it's facts.
I have no idea where to go from here. Pick a specialty?  (what technologies?) Remain a generalist? How and where should I be looking for work?
My finances are such that it is not urgent that I am employed, but I could very much use help putting together a plan :)
Thanks, Ocean <comment><USER3> Difficult to respond because it's unclear what you're looking for or what excites you. What types of problems? What types of people?

It sounds like you don't have a clear answer to that. If so, your #1 problem is to find out. Talk to lots of people and figure that out. Maybe respond to Hacker News Who's Hiring posts, if only to start conversations and hear what's going on.

This came out recently, I'd take a read: [https://www.tbray.org/ongoing/When/201x/2017/02/18/Geek- Care...](https://www.tbray.org/ongoing/When/201x/2017/02/18/Geek-Career-Paths)

<comment><AUTHOR> Quality. Quality excites me. I'm happy doing almost anything as long as I am _free to do a great job_.

<comment><USER3> Okay, that trends towards: * bigger companies * software companies (where you won't be micromanaged by a pointy-headed boss) * companies with more autonomy

</comment></comment></comment><comment><USER4> > I don't know how to sell myself, ... could very much use help putting > together a plan

The simple, direct approach is look for senior executives/managers WHO you know how to help. Linkedin's advance search feature is a great tool to source target prospects.

Suggest reading Mike Weinberg's New Sales Simplified, specifically - <USER2> 14: Planning & Executing the Attack, helpful in your job search. > [http://www.goodreads.com/book/show/15863998-new-sales- simpli...](http://www.goodreads.com/book/show/15863998-new-sales-simplified)</comment>


Mathify – Simple Text Equation to LaTeX - <AUTHOR> http://www.mathifyit.com/ <comment><USER2> I don't get it, why not just use LaTeX? The syntax is already almost the same anyway..

<comment><USER3> "$$x+\frac{32}{2}$$" is not "almost the same" as "x+32/2".

<comment><USER4> Using / instead of \frac is by far the biggest difference, so it is "almost the same".

<comment><USER5> Just wanted to point out that this is not friendly for beginners. A beginner will be lost between a lot of "\frac"s and "{}"s (I don't know the name in English, sorry). Been there

<comment><USER6> {} are "brackets"/"curly brackets" :)

<comment><USER3> No, [ ] are brackets; { } are braces.

(Disambiguating with an adjective does make it ok to use either -- "Curly brackets" are still { }, and "square braces" are still [ ] )

<comment><USER7> No, they aren't. () are brackets, [] are square brackets, {} are curly brackets. 'Brackets' always refers to () unless specifically you say 'square'.

Stop imposing your stupid American stuff on people.

<comment><USER3> There are substantially more Americans than people in any other English- speaking country, and, to top it off, we're on an American forum.

It's not "stupid" to assume the dialect we're using is American English. Why the aggressiveness?

<comment><USER8> Because the cultural ignorance you are showing is annoying. There are vastly more people speaking english in the world than there are US Americans. On top of that: Most of the Americans are speaking spanish and portuguese. America != US America for one.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Related: [http://asciimath.org/](http://asciimath.org/)

Also, MathJax accepts asciimath as input, not sure if you can get LaTeX out of it though.

</comment><comment><USER10> For Mac users, you can also use the built-in 'Grapher' application which comes with a decent GUI for writing equations/formulas.

1) Open up the 'Grapher' application from the 'Applications/Utilities' folder.

2) Click on 'Choose' (it doesn't matter what other options you pick from the initial loading screen).

3) From here on, just type your equation into the main input field. You can also use the equation palette from the dropdown menu on the right side of the main input field to access the templates for things like integrals and summations. From the dropdown, you should be able to click on 'Show Equation Palette' to get a window of all of the math symbols Grapher supports.

4) Once done writing your equation, select it all, right click, and then click on 'Copy LaTeX Expression'.

</comment><comment><USER11> Feedback for the author: this site is currently best viewed at 80% zoom and a browser width of 320 pixels. Originally (at 15.6", full hd screen) I have to keep jumping from center to left with nothing in between, which feels kinda weird on my eyes.

<comment><AUTHOR> Hey do you mind sending me a picture? You can reach me at firstname.lastname@example.com

<comment><USER11> No problem. Email sent with those two screenshots: [https://snag.gy/cmDhG6.jpg](https://snag.gy/cmDhG6.jpg) and [https://snag.gy/U4unJ2.jpg](https://snag.gy/U4unJ2.jpg)

</comment></comment></comment><comment><USER12> Is there any ocr to latex? Are they any good?

For desktop-based equation writing, something like Microsoft's equation editor is perfect. For tablet/touch screen, a pen based OCR might work really well?

<comment><USER13> You want something more than deTeXify?

</comment></comment><comment><USER14> Bookmarked as my new fastest way to generate a small LaTeX graphic when I need one — though actually having the ability to input LaTeX might be useful as well for edge cases.

<comment><USER15> You might find this useful: [https://jbergknoff.github.io/mathjax- sandbox](https://jbergknoff.github.io/mathjax-sandbox) (example: [https://jbergknoff.github.io/mathjax- sandbox/#JGVee2lccGl9PS...](https://jbergknoff.github.io/mathjax- sandbox/#JGVee2lccGl9PS0xJA%3D%3D))

<comment><USER16> Check out Guppy if you want a live WYSIWYG tool

[https://daniel3735928559.github.io/guppy/](https://daniel3735928559.github.io/guppy/)

</comment></comment></comment><comment><AUTHOR> By the way if you find any bugs or something doesn't work the way you expect it please let me know!

<comment><USER17> The biggest lack compared to my normal Latex usage is a `\mathrm` command or similar. For example I believe the chemical elements should be set in upright, not italic.

<comment><AUTHOR> I just added mathrm{...your text...} and text{...your text...} to write upright text :)

</comment></comment></comment><comment><USER18> I could see this as being useful if it was available as a library

</comment><comment><USER19> Combine this with Detexify?

<comment><AUTHOR> That's actually a pretty good idea, never thought of that. It would be good for handwritten math notes.

</comment></comment><comment><USER3> Edit: apparently I didn't read the site closely enough!

<comment><USER20> That's literally the second thing the website mentions: To use curly brackets for invisible brackets:

        sqrt{1+2x^2/3}
        x^2/{3x}</comment></comment>


The GemRB project celebrates 20 year anniversary with a new release - <AUTHOR> https://gemrb.org/2020/08/24/the-gemrb-project-celebrates-20-year-anniversary-with-a-new-release.html <comment><USER2> I love this project!

Many years ago I was playing with the idea to bring these games to the browser (decade-old demo: [http://lumakey.net/labs/battleground/demo1/](http://lumakey.net/labs/battleground/demo1/)). I spent many long nights studying GemRB's code and the file format documentation from the Gibberlings Three community!

If I ever find the time I'd love to turn it into some kind of reinforcement learning environment :D

</comment><comment><USER3> Confusing! This has nothing to do with rubygems, which I figured _might_ have hit 20 years old. But no, they're only 16.

<comment><USER4> I thought the exact same thing! And this GemRB is not Ruby related at all.

On a side note, similar names abound in Ruby land! Only with a recent pull request merged for typo squatting protection is it that rubygems.org will stop someone from forking and publishing awesome_gem that is confusingly similar to awesome-gem.

</comment></comment><comment><USER5> Ahh, memories...

I remember finishing Baldur's Gate 2, then buying Baldur's Gate 1 and then spending a better part of holidays writing a Java app to convert BG1 data so it can be run on the BG2 engine. I was able to go from the start to the end of BG1-on-BG2 just with one glitch when the game could no switch from the custscene to the in-game mode...

There was (is?) a very dedicated community that reverse engineered practically all data formats allowing such projects like mine to be created. Of course there were much more persistent and knowledgeable people who released their projects to the world, so e.g. you could play from the beginning of BG1 to the end of BG2 in one go! Lots of community-provided fixes, modes and total conversions.

From what I know the guy (Avenger) who wrote the better part of GemRB (probably like 95% ;)) got hired by Beamdog to work on enhanced editions of BG1, BG2 and other Infinity Engine games to bring them to modern computers and other devices. Thx for the Linux version! (Even if I don't like Beamdog additions...)

<comment><AUTHOR> It really was a blow to GemRB when he went to Beamdog, as he was almost as active as lynxlynxlynx and worked on the core parts of the engine. 95% is a bit of a stretch though, he is barely in third place in number of commits before the project founder Balrog994, with lynxlynxlynx having five times as many: [https://github.com/gemrb/gemrb/graphs/contributors](https://github.com/gemrb/gemrb/graphs/contributors)

<comment><USER5> My bad, should check contributions. Probably when I was playing with GemRB Avenger was very active in the project, including their forum. But yeah, now I remember Balrog and lynx as well..

</comment></comment></comment><comment><USER6> I'm glad to see this still kicking, for awhile I was afraid it might get derailed when the enhanced editions were released along with Linux support.

I noticed that they only support a couple of chapters of Icewind Dale 2. Seems like IWD2 never gets any love, but honestly, I thought the adventure was garbage when it came out and still have never finished it. Ironically enough, I was inspired this past weekend to fire IWD2 up again but failed to get it to run in Wine (yet).

<comment><AUTHOR> It does get plenty of love. It's just that out of all the Infinity Engine games, it has the most changes and lynxlynxlynx is developing GemRB almost on his own for the past five years. The engine was already outdated at that point, so they added in graphical changes and switched to the 3rd edition of Dungeons & Dragons, so it takes more love to support than the other games (save for Planescape: Torment maybe, which was forked before Baldur's Gate was even released).

</comment></comment><comment><USER7> > GemRB is a portable free/libre open-source implementation of Bioware's > Infinity Engine, which powered classic CRPGs like Baldur's Gate, Icewind > Dale and Planescape: Torment.

</comment><comment><USER8> 20 years and not a 1.0 release yet? Makes me wonder what release numbers mean to people. In this case, I guess 0.x does _not_ mean that it is not considered ready/mature for production use; and does _not_ mean that it is unstable and could change in wildly backwards incompat ways from release to release?

<comment><AUTHOR> If you read the changes of 0.8.7, you will see e.g. the bumping pathfinding. I stopped playing on trying out GemRB for the first time when NPCs stood in the door and I simply could not advance; that's game-breaking. The next version will also have a major refactoring on another part, still lots to do.

<comment><USER8> I guess there's something interesting about a 20-year-old project whose community of utilizing developers is okay with no predictability or guarantees of backwards compat?

</comment></comment></comment><comment><USER9> > _The GemRB team announces the availability of GemRB 0.8.7, a new minor > release to kick off a week of celebrations of the project's founding > anniversary._

Congrats on 20 years! Can we release a 1.0.0 version now? I know it's a nitpick and version numbers are largely arbitrary, but I hesitate to use software that is <1.0.0 because semver implies it is unstable. I know not everybody uses semver, but I wish they would ;-)

<comment><AUTHOR> The minor version gets upped by one every time another game is completable. As Icewind Dale II is not yet finished, it will stay at 0.8.x for a while. You can still enjoy the other games (Baldur's Gate I/II and Icewind Dale being the best supported).

</comment></comment><comment><AUTHOR> Nice of Hacker News to relist my submission, as this time it garnered some interest. Here is the first interview of the week with project founder Balrog994: [https://gemrb.org/2020/08/25/interview-with-project- founder-...](https://gemrb.org/2020/08/25/interview-with-project-founder- daniele-collantoni.html)

</comment><comment><USER10> Oh this is nice, have been looking at this project for a while as I love the IE games.</comment>


First Impressions of Sitting a Web App on CouchDB - <AUTHOR> http://www.victusspiritus.com/2010/09/04/first-impressions-of-sitting-a-web-app-on-couchdb/ <comment><USER2> From the article: "CouchDB + Another Layer as Web Server is Redundant". This is very true, and the biggest difference to other databases I've used, NoSQL or not. It ends up being a double-edged sword for CouchDB.

On the one hand, it saves having to context switch between thinking about the database, thinking about the web server, thinking about the web framework, etc.. For a single developer, this is not to be sniffed at. As learning is often done by lone experimentation, it makes CouchDB an excellent system for learning about NoSQL. It's also great for prototyping, where you don't necessarily want to spend a huge amount of time creating an industrial strength back-end.

On the flip-side, it means that if you do run into a situation where you want to use another layer, you've just given up the biggest advantage of CouchDB. For my current project, I found I would need to be able to integrate authentication with an existing Kerberos system - the easiest way to do this was to use Apache.

I also had slight reservations about CouchDB's approach of limiting what you can do - everything has to be a map-reduce - to ensure scalability. The plan as I understand it is to introduce further safe operations down the road. I'm sure that approach will yield dividends, but for now it seems quite limiting - similar to eschewing C in the 70s because it does not have garbage collection.

Didn't mean to beat up on CouchDB too much - it's a fine system, but I prefer the flexibility of MongoDB at this point.

<comment><USER3> CouchDB is not as limiting as you suggest but it is a total paradigm shift. There is more to CouchDB than map-reduce.

In my view, CouchDB is more at home as a middleware layer than a database layer.

Take your current project as an example. Why not have Apache reverse proxy to CouchDB? You'd give up zero CouchDB functionality and would gain Kerberos authentication.

Putting another web _server_ in front of CouchDB is unnecessary, but putting web _proxy_ servers in front of it is totally useful. In other words, adding HTTP layers on top of CouchDB means you don't have to trade-off anything.

CouchDB lives and breathes HTTP. If you choose to keep your database from talking with the outside world directly, then CouchDB is a poor choice and you're right to go with MongoDB.

Don't let the name fool you, people. CouchDB isn't simply a place to stuff and retrieve JSON data.

</comment></comment><comment><AUTHOR> This guy Till is awesome, real world examples/strategy to scale with CouchDB

[http://till.klampaeckel.de/blog/archives/95-Operating- CouchD...](http://till.klampaeckel.de/blog/archives/95-Operating-CouchDB.html)

[http://till.klampaeckel.de/blog/archives/84-A-toolchain- for-...](http://till.klampaeckel.de/blog/archives/84-A-toolchain-for-CouchDB- Lounge.html)

here's his github: <http://github.com/till>

</comment><comment><USER4> I have used couchdb in large systems and small systems. CouchDB is at the end of the day a DB use it as a DB don't embedded your webapp in it.

<comment><USER5> I'd say you can do either, depending on your requirements. Some of the biggest CouchDB users use it as a scalable back-end. But some of the most exciting uses are deploying personal web-apps to the desktop.

</comment></comment><comment><USER6> I always am annoyed when I read that CouchDB can "scale up and down". CouchDB has NO internal concept of sharding. The only thing it can do is repliaction. Riak and Cassandra can actually scale up and down, CouchDB can scale up and down as much as MySQL can... (or did I miss something?)

<comment><USER7> There is a recently open-sourced fork of CouchDB that does the sharding thing. With this addition to the capabilities, CouchDB really can scale up to hundred machine clusters.

<http://blog.cloudant.com/cloudant-core-is-open-source>

</comment></comment><comment><USER3> You just made my day when you quoted my stackoverflow answer. Thanks, man.

<comment><AUTHOR> You're great answer helped me better understand the app/DB relationship, and added value to the post. I should be thanking you, in fact I will. Thanks shotgun!

</comment></comment><comment><AUTHOR> Scattered notes and links, trying to soak up as much of the design philosophy as possible. I'll pick up with examples once I'm not such a scrub.

</comment><comment><USER8> Is the idea supposed to be that a web client (html+js) reads and writes directly to a CouchDB server? Where do you put business logic?

<comment><USER9> All business logic is in the database itself. It has ACL's and data validation built into one feature (update validation) and as for deciding which data to display and when, the map/reduce-based view API is extremely powerful.

Force yourself to use CouchDB for a project where you're handling large amounts of data and you'll discover how incredible it really is. There's tons of other great features you'l pick up along the way too.

</comment></comment><comment><USER10> Please note the distinction between high availability writes and lock-free writes. CouchDB offers the former.

<comment><AUTHOR> As I understand you can always write to a node. Where's the lock?</comment></comment>


Researcher decodes prairie dog language - <AUTHOR> http://www.treehugger.com/natural-sciences/researcher-decodes-praire-dog-language-discovers-theyve-been-calling-people-fat.html <comment><USER2> The more we learn about animals, the more I wonder about our casual treatment of them.

It's led me to the conclusion that there are certainly species at least on our level of cognitive development, they just might have different value systems such that our pursuit of technology seems very foreign and strange.

It's also why I'm transitioning into vegetarianism (though still eating chicken eggs, which I can't find an ethical issue with).

<comment><USER3> Despite the commonly-held belief that eating eggs is an ethical alternative to meat, nothing could be farther from the truth. The stress of being treated as egg-laying machines causes hens to peck at themselves and others, ripping out feathers and eyes, a behavior that is unheard of in chickens raised outside of captivity. To prevent injury, most hens have their beaks are sliced off by a hot blade and without anesthetic. After laying about 300 eggs, her bones leached of calcium and often unable to walk, an egg-laying hen is killed for her flesh just a year after she is born.

For the more than 100 million male chicks every year, the day they hatch will be the last day of their lives. Unable to lay eggs and too small be sold as broiler chickens, male chicks have no commercial value and are gassed or ground alive at just one day old. Tragically this is a reality across all egg production; cage free or "humane" eggs are no different. The killing of male chicks and eventual slaughter of "spent" hens are standard industry practice and can only be avoided by rejecting eggs entirely.

<comment> grey-area There are plenty of free-range farms with good conditions (at least in the country I live in), and you're exaggerating in an attempt to equate all eggs with factory production (the conditions of which truly are appalling).

 _The stress of being treated as egg-laying machines causes hens to peck at themselves and others, ripping out feathers and eyes, a behavior that is unheard of in chickens raised outside of captivity._

Hens peck at each other to establish primacy in the wild, or in non-factory conditions very like the wild, losing feathers etc. Animal violence is not down to the conditions humans hold them in. Hence the phrase 'pecking order' which originated far before factory farming of chickens. Violence is probably worse in factory conditions and I'm sure some hens will simply go insane given the conditions you describe, but they do naturally peck at each other to establish dominance.

 _The killing of male chicks and eventual slaughter of "spent" hens are standard industry practice and can only be avoided by rejecting eggs entirely._

They are only standard industry practice in factory farms. On small free range farms or private holdings of chickens, these practices often don't hold. Note that most chickens won't survive in the wild though, so if they are released, they quickly die from predation.

Whether a vegetarian should eat the young of another species harvested before birth is another question (I can see arguments either way), but factory farming is not the only way to harvest eggs and not all eggs are produced that way.

<comment><USER4> > Whether a vegetarian should eat the young of another species harvested > before birth is another question [...]

Unless you are talking about Balut (<https://en.wikipedia.org/wiki/Balut_(egg)>), the eggs we are eating are usually not fertilized. So it's not `eating the young'.

</comment></comment></comment></comment><comment><USER5> I've always found this very interesting, especially their seemingly built-in vocabulary. It's definitely not news though as the blog suggests. I remember having heard about this for years. Here's a reference from 2005: [http://www.johnpratt.com/items/docs/lds/meridian/2005/prairi...](http://www.johnpratt.com/items/docs/lds/meridian/2005/prairie_dog.html).

<comment><AUTHOR> I really didn't expect to read a conclusion like this in an article about prairie dog linguistic research:

        This article has summarized groundbreaking research that reveals sophisticated language use by the prairie dog. Their ability to coin new words has thus far defied reasonable explanation. To us it indicates that a divine Creator was required to endow these rodents with this language gift. Surely, even a higher level of design and intelligence would be required to enable the incredibly more complex linguistic abilities of mankind as spiritual children of the Living God.

<comment><USER6> Well, to be fair, there's a fair amount of goofy Biblical quoting at the beginning. Really, that article is hilarious, you should read it. Complete with pseudo-information theory bullshit -- it's INCREDIBLY COMPLEX, says the title of one section--, artificial intelligence from the sixties (I guess if SHRDLU couldn't do it, then GOD must have done it), and just general obtuseness from a pair of pompous fundamentalists. Come on, the conclusion of this religious tract disguised as scientific paper is, _literally_ , "we don't know why this happens, so GODDIDIT"! Got to laugh at that :)

Were the authors catholics, they'd be either hypothesizing the existence of a Prairie Dog Jesus, or contemplating whether to send missionaries. I can't decide on what would be funnier.

<comment><USER7> Were the authors Roman Catholic, they would not be citing this or anything else as evidence for intelligent design.

<comment><USER8> Book of Mormon mention suggests not Catholic. :-)

</comment></comment></comment></comment></comment><comment><USER9> Off-topic, but if you manage a content site, and you cannot say with a straight face that your mobile site is objectively better for mobile devices in some way, GET RID OF THE MOBILE SITE.

<comment><USER10> As an iPad 1 user, agree. Most mobile sites kill Safari on iPad 1s

</comment></comment><comment><USER11> Non-swipe: [http://www.treehugger.com/natural-sciences/researcher- decode...](http://www.treehugger.com/natural-sciences/researcher-decodes- praire-dog-language-discovers-theyve-been-calling-people- fat.html?onswipe_redirect=never)

</comment><comment><USER12> Some years ago, I read about chickadees (small birds found in parts of the U.S. and Canada) having a similar alarm system (1) -- certain types of calls for certain types of predators (e.g., hawks, cats, or owls) and additional modifications based on the perceived threat (including lengthening the call for more dangerous animals).

One of the most interesting aspects of these calls is the "mobbing" signal, which is used to call other chickadees and even other bird species.

The birds are quite endearing; they have a small black cap on a white head and two easily recognizable calls -- the "chicka-dee-dee-dee" alarm call and a sad-sounding, two- or three-note call (2). If you live in the northeast U.S. and set up a bird feeder during the winter, you'll probably get them to visit.

1) [http://www.washington.edu/news/2005/06/23/chickadees- alarm-c...](http://www.washington.edu/news/2005/06/23/chickadees-alarm-calls- carry-information-about-size-threat-of-predator/)

2) <http://www.youtube.com/watch?v=l41nXK4ZdUA>

</comment><comment><USER13> Animals do not have language in the same way that humans do. Yes, the may have a way to communicate with each other by sounding their voices in different pitches, and yes, some apes can learn sign language, but that does not mean that they understand language in the way humans do. Human language has grammar, syntax, and recursion in a way that animals do not.

<comment><USER14> Watch the video in the post. The prairie dogs appear to have a basic syntax and grammar ( [threat] [shape] [color] ), according to the researchers.

<comment><USER15> That sounds like it could be generalized to [noun] [adjective] [adjective]. Notice the lack of verbs, prepositions, or markers for subordinate clauses.

This seems much closer to a code than an actual language.

</comment></comment></comment><comment><USER16> It would be very funny to watch older documentaries about prairie dogs and see what they were saying about the crew members filming them.

</comment><comment><USER17> funny, a friend of mine has been just a few days ago to the vienna zoo and told me she spent 40 mins in front of the prairie dogs claiming they're talking to humans and also posing for photos and laughing at some people.

i didn't know what to say, so i just laughed, now i have to tell her that link ...

</comment><comment><USER18> It would be super fun to have a real-time translator and then approach them wearing costumes.

<comment><USER19> A prairie dog shaped robot could work better.

</comment></comment><comment><USER20> I knew Timon could talk! (OK, I know meerkat and prairie dogs are in different orders.)

By the way, similar vocal studies have been done with zebra finch: <http://ofer.sci.ccny.cuny.edu/>

</comment><comment><USER21> What a beautiful, inspiring surprise, that prairie dogs would have such a powerful language.

Just showed it to some kids, who were as fascinated as I was and peppered me with a million questions. Science is awesome.

</comment><comment><USER22> Incredible. I owe several degu which are very similar to praire dogs (both rodents, both are highly social, both live in prairies etc). They produce a large number of sounds, and I always thought that their sounds are just are a bunch of noise. Now, I understand, after heard prairie dog's sound that it's not so simple.

</comment><comment><USER23> Yes, last time I saw one (in a video), it kept going about trying to find someone called Helen!

<comment><USER24> If I think I know what you're talking about, the person in question is Alan.

<comment><USER25> [http://www.youtube.com/watch?feature=player_detailpage&v...](http://www.youtube.com/watch?feature=player_detailpage&v=f-Kt_kuYVtU#t=22s)

</comment></comment></comment><comment><USER26> Does this use an academic meaning of the term "language" I don't know about? It sounds like prairie dogs effectively have _words_ , but there's no indication that they use grammar, syntax, etc., so describing their vocalizations as "language" seems misleading.

<https://en.wikipedia.org/wiki/Language>

<https://en.wikipedia.org/wiki/Animal_communication>

</comment><comment><USER27> F'in onswipe on an iPad, time to change the use agent

</comment><comment><USER28> What if human ancestors were like these back in dinosaur era.

</comment><comment><USER29> I wonder if they ever do things like...

"Who's on first! Who? Yes!"</comment>


Why the Big Bang produced something rather than nothing - <AUTHOR> https://www.nytimes.com/2020/04/15/science/physics-neutrino-antimatter-ichikawa-t2k.html <comment><USER2> tl;dr the T2K collaboration published a paper in Nature [0] describing a 1/1000 certatinty that neutrinos and antineutrinos oscillate in 'identity' at a different rate. 'Oscillate identity' means they fluctuate between three types of neutrino with differing mass. They've come to this conclusion by analyzing the data from the Tokai J-PARC neutrino detector, which measures artificial neutrinos and antineutrinos alternately. The authors note that this doesn't satisfy their preferred p value (6E-6) nor would it account enough to destroy enough big bang antimatter to spare the existing matter. But, it is a promising asymmetry that gives hope for discovering more.

[0] [https://www.nature.com/articles/s41586-020-2177-0](https://www.nature.com/articles/s41586-020-2177-0)

<comment><USER3> Is it me or does the situation get kind of odd when you're looking for multiple asymmetries to explain the disparity?

If there's multiple contributing, are they all in the same direction? If so, why becomes an even bigger question than we started with, right? Then we need a way to explain the asymmetry in the asymmetries.

If that's not it, and it's a mix of asymmetries, some going one way some the other, how does that on the whole end up giving us a large asymmetry one way? It almost seems like you'd need one big asymmetry that's doing the real heavy- lifting and the rest are just noise. Otherwise wouldn't you tend towards zero as you add more asymmetries with uncorrelated directions?</comment></comment>


Google Cloud Downtime Postmortem - <AUTHOR> https://status.cloud.google.com/incident/cloud-networking/18012?m=1 <comment><USER2> > One of the features contained a bug which would cause the GFE to restart; > this bug had not been detected in either of testing and initial rollout.

I wish they elaborated more on what type of bug was that, which was not caught by testing / initial rollout. Either tests must be poorly written or the bug must be very subtle.

On an unrelated note: kudos to Google for publishing this postmortem and hope that this becomes an industrywide practice. I also wish they publish (a belated) one about Google+ and their throng of messaging apps over the years.

<comment><USER3> With all due respect, it's not a postmortem, it's an advert. It doesn't really say anything other than "We had a problem, we fixed it.". There are virtually no technical details in there other than "something would restart spontaneously, which shifted the load somewhere else". Maybe i'm a bit jaded by cloudflare and aws writeups, but this really isn't anything special or worthwhile reading.

<comment><USER4> I donno, looks comprehensive enough for me. What were you looking for, exactly? Source code? Packet traces? Pew-pew maps?

A _useful_ PM include a summary, impact analysis, root cause analysis, and a comprehensive (and realistic) set of measures that will prevent recurrence.

After reading what they provided, I have a reasonable understanding of what went wrong (sufficient for me to plan my own safeguards if necessary), a useful measure of the team's response and remediation capabilities, and enough information to judge my comfort with their preventative measures.

Anything else is just cleverly-disguised marketing.

<comment><USER5> It's pretty bare-bones next to a postmortem like [https://www.epicgames.com/fortnite/en-US/news/postmortem- of-...](https://www.epicgames.com/fortnite/en-US/news/postmortem-of-service- outage-at-3-4m-ccu)

<comment> forgot-my-pw I feel that's way too much info.

</comment></comment></comment></comment></comment><comment><USER6> Amazing that they handled the downtime in such a short time span. Boosts my confidence to actually use GCP. Huge props!

Meanwhile.. waiting for the Amazon prime day post mortem.

<comment><USER7> +1'ed you on the props to GCP, but on Amazon prime, that was only on their retail site, right? Do vendors there have SLA or is there otherwise an obligation to publish a post-mortem on the incident? I think it's different when it's a platform/service provider but the prime day outage only hurt Amazon. My recollection is that AWS service outages had prompt and thorough published incident reports.

<comment><USER8> > I think it's different when it's a platform/service provider but the prime > day outage only hurt Amazon.

Have you not used Amazon? It's where half the country does their shopping. Many businesses live and die on Amazon as just much as they do on AWS.

<comment><USER9> How many businesses died as a result of the prime day outage?

<comment><USER10> None. Sales were way over sales on a typical day.

The outage was way over-hyped.

</comment></comment></comment></comment></comment><comment><USER11> > Google engineers were alerted to the issue within 3 minutes and began > immediately investigating

As a user of their service, our engineers were notified within <30 secs when the issue started. Given GCP had a large population impacted, how is it that it took them much longer to acknowledge?

> The GFE development team was in the process of adding features to GFE to > improve security and performance. These features had been introduced into > the second layer GFE code base but not yet put into service. One of the > features contained a bug which would cause the GFE to restart; this bug had > not been detected in either of testing and initial rollout.

Something going down after a deployment is the most common source of issues. A system KPI abnormality after a rollout should be common practice to monitor and to perform an almost instant auto-rollout on. Also, doesn't GCP perform dark launched, partial launches? Launch to 1%, see KPIs, increase to 5% and so on?

<comment><USER12> Maybe they were on reddit. Seriously though, 30 seconds vs 3 minutes is a long time in the reliability world but not atrocious.

<comment><USER13> It's the difference between being at home, sober, and with a laptop handy vs. being actively logged in and ready to go at all times.

In terms of quality of life for people on call, it's an entirely different world. And in a setup where your oncall engineers are extremely highly skilled and have all the choice in the world in terms of where to work, that little bit of respect of their time is a necessary investment.

</comment></comment></comment><comment><USER14> Did they learn nothing from the Azure of yore? You don't roll out a change globally, ever.

While the postmortem is appreciated, I'd rather they just didn't roll out changes globally.

</comment><comment><USER15> I'm very impressed that they can go from deploying a fix (12:44) to it being effective (12:49) in just 5 minutes.

<comment><USER16> Reading the post mortem, I'm guessing it's more like it took them 30 minutes to figure out what was happening and then they rolled back the deploy and it was fixed.

Edit: Reading further down, they actually admit that it was just a roll back

> At 12:44 PDT, the team discovered the root cause, the configuration change > was promptly reverted, and the affected GFEs ceased their restarts

</comment></comment><comment><USER17> I love GCP's postmortems - they're open, honest, insightful, and I wish I could get my company to OK us releasing details like this when we have outages. It's part of the reason I personally like GCP more than AWS (and certainly azure, those guys don't admit to shit regardless how bad the outage is).

Edit: Wow, downvotes because I like transparency from my cloud hoster, super interesting...

<comment><USER18> You're getting downvotes because this was not a transparent and open report. It was vague and was more advertise-y than postmortem-y.

Not saying Amazon is perfect by any means either, but there's a lot of room for improvement. Good postmortems give everyone ideas on how to solidify their own processes and prevent other issues. This was just fluff.

</comment></comment><comment><USER19> A little offtopic but, why is it called a postmortem?

When I got first introduced to the concept of incident reports it was under the name of postmortem, as I worked for a mainly English speaking company then and didn't think twice about it. But earlier this week I mentioned it to a colleague he found it a rather macabre term for something like an incident report. When you think of it, nothing really died (maybe some engineers died a little inside that their design was not as 100% reliable as they though). But for the rest it was just a temporary state, nothing permanent like death. All other uses (eg: medical) of this word all seem to relate strictly to death.

Maybe it is because incident reports just sound to formal or is there a etymology of this term in the IT world?

<comment><USER20> It's called a 'post mortem' in the medical world because the patient died. It involves a high level of inspection into what went wrong and what can be learned to prevent it. I assume the term was adopted from there into project management.

It might make a little more sense in the world of shipping software in retail boxes, where products/projects had a 'done' date. The project is dead, what contributed to it's demise? Or you might generalize death into failure, and that's why we use the term instead of post-incident.

<comment><USER21> Not all post-mortems are for failures/dead products which might add even more confusion. For instance Gamasutra runs a game development post-mortem section where developers of popular (and unpopular) games can hop on and describe difficult situations they've encountered, how they did what they did, why they did that thing, etc.

It's really fun to read.

[http://www.gamasutra.com/features/postmortem/](http://www.gamasutra.com/features/postmortem/)

edit: Wow, there hasn't been one since 2014. I wonder why this died out. There's 10 pages of them since 2007..

<comment><USER22> Ironic. Apparently we need a postmortem postmortem

</comment></comment></comment></comment><comment><USER23> this was amusing for me, because i am JUST starting to test out google's cloud offerings and got hit by this outage on basically day 1. Luckily, it wasn't too long before i figured out it was them and not me.

<comment><USER24> Bobby Tables?

<comment><USER25> Recently ran into an issue with a provider's CSV export of their data not quoting some of their text fields. It was a minor annoyance in that the data in the text field was user input where the user used commas. Importing in Excel then had the columns mangled by the extra commas.

I then made the comment to sign in using Bobby Drop Tables for a user name. The silence in the room quickly reminded me I was not in the company of other developers. Such a waste

</comment></comment></comment><comment><USER26> I believe the load balancer outage only affected global load balancers not regional load balancers. Is that still accurate?

<comment><USER21> My understanding is yes; I only use regional, which encountered no outages. This hugely affected appengine users. I've not encountered a lot of GKE users that use Global LBs yet (I've run in GKE for roughly 4 years).

</comment></comment><comment><USER27> A good write up, thanks.

I remember a configuration change being rolled out by an automated system caused a problem on GCP a few years ago, it's an interesting area that's probably quite hard to fix

</comment><comment><USER28> I'm an SRE for a large software company. We call it an "incident retrospective" for this reason.

</comment><comment><USER29> It sounds like the impact wasn't limited to particular users or regions. Why would they deploy the configuration worldwide at the same time?

<comment><USER30> It's a global load balancer.

</comment></comment><comment><USER31> Bet Tesla are glad they made the switch to MapBox and Valhalla months ago.

<comment><USER32> genuine question, whats Valhalla? Google returned something Norse.

<comment><USER33> Tack on the "Tesla" keyword in your search. "Tesla Valhalla".

<comment><USER34> That does it but also you can find more detailed information on their Github page: [https://github.com/teslamotors/valhalla](https://github.com/teslamotors/valhalla)

</comment></comment></comment></comment><comment><USER35> Basically, due to the lack of customer service, Google cloud is not for serious busines, just casual side projects. Reading through this and the article about getting their servers cut off made my stomach lurch

<comment><USER36> All major cloud platforms have occasional unplanned downtime. AWS had an outage last year that took many sites offline for hours. A single instance of Google having such unplanned downtime is meaningless without more datapoints.

As for whether it's useful for serious business. Well. Proof by example? This has sixteen pages of case studies: [https://cloud.google.com/customers/](https://cloud.google.com/customers/). That is by no means all of GCP's serious customers.

<comment><USER35> That sort of proves my point :( unless you are a big fish with marketing potential, you're nothing to Google

<comment><USER37> We have been using GCP for 6 years (and is one of the companies in the linked case studies) and I must say that their customer service is good.

I think I had over 30 touches with their support and key account managers regarding everything from billing, minor issues with services and just asking for advice regarding stuff. They have always delivered.

The expectation from us has been that we pay the $150/mon support package fee.</comment></comment></comment></comment>


Create Your Own YouTube Alternative for $150 or Less - <AUTHOR> http://wondersuite.com/blog/create-youtube-site/ YouTube is a very profitable business type and now you can create it too with no technical experience or development knowledge. <comment><USER2> It really bothers me, but as long as the people I follow on Youtube remain there, I will remain on Youtube.

Most of the channels I subscribe are too invested in YT to migrate to another system.</comment>


Javascript jpeg encoding - <AUTHOR> http://ajaxian.com/archives/javascript-jpeg-encoding

<comment><USER2> The original blog post is not responding, presumably due to traffic, so I am going off the screenshot provided by Ajaxian. The quotes from Ajaxian say that the original author suggested that the V8 and Nitro engines were faster at doing JPEG encoding than the AS3 VM. The times given in the screenshot list 703ms and 504ms which I take as the same test with 2 different results. Using the size of the image from the screenshot as 200x255 image I used a AS3 code test, made in Flex, that compares different encoding libraries speed in AS3. The slowest of these libraries encoded a same size JPEG in 270ms and the fastest at 16ms. This test only shows that the JPGEncoder class from the as3corelib library is slower than his JavaScript implementation, not that the AS3 VM is slower than Nitro or V8.

Without the blog site being up I can't do any further testing though to use identical JPG source images but I do take notice when one engine is claimed faster than another. JavaScript and ActionScript are very similar so I suspect most of these libraries, other than the C/C++ based ones, can be ported to JavaScript as he mentioned doing based off the as3corelib implementation, JPGEncoder.

You can see the source I used to compare AS3 JPEG encoding libraries here <http://segfaultlabs.com/blog/post/asynchronous-jpeg-encoding>

Edit: He said that the Nitro and V8 engines were faster but his test proved otherwise. His conclusion was that it was only slower because JavaScript has no static types, vectors, byte-arrays and is not pre-compiled.

Additional Edit: Cool! JPEG encoding in JavaScript :)</comment>


Ask HN: What are most recommended books for startups? - <AUTHOR> <comment><USER2> I liked "Founders at Work: Stories of Startups' Early Days" (2009) and have heard good thing about "Zero to One: Notes on Startups, or How to Build the Future" (2014).</comment>


A month with Windows 8 - <AUTHOR> http://www.techhike.net/2012-09-25-a-month-with-windows-8.html <comment><USER2> I've been using the 64bit version for 2 weeks, all my old apps work fine, everything seems faster, overall happier. I would love to have a unix terminal though, thats what keeps me using a macbook.

<comment><AUTHOR> Have you tried Powershell? It's kind of like if the Bash shell was object oriented.</comment></comment>


My Life in Forensic Pathology - <AUTHOR> https://www.theguardian.com/science/2019/apr/18/how-to-identify-a-body-the-marchioness-disaster-and-my-life-in-forensic-pathology <comment><USER2> One notes that the author never actually claims not to have known that hands were not sewn back on corpses. As "pathologist in charge", he could have ensured that they were, even if he had to threaten to sew them all himself.</comment>


You're probably polluting your statistics more than you think - <AUTHOR> http://euri.ca/2012/05/youre-probably-polluting-your-statistics-more-than-you-think/

<comment><USER2> I like this, it's a very simple example reiterating that it's dangerous to play with statistics.</comment>


Show HN: RAM Disk Backed by GPU Memory(VRAM) - <AUTHOR> https://github.com/prsyahmi/GpuRamDrive <comment><USER2> Linux alternative: [https://github.com/Overv/vramfs](https://github.com/Overv/vramfs) ; HN thread (from 2 years ago) – [https://news.ycombinator.com/item?id=8747057](https://news.ycombinator.com/item?id=8747057)

</comment><comment><AUTHOR> The current technique being used won't be as fast as normal RAM Disk, but somebody might find it useful.</comment>


I am hooked on blockchain, sorry - <AUTHOR> http://no-kill-switch.ghost.io/i-am-hooked-on-blockchain-sorry/ <comment><USER2> Blockchains are often treated as a general solution to all kinds of problems, but imho they are an ingenious solution to a rather specific, ecological problem. A lot of the time when a new start-up proudly proclaims that they use a blockchain for X task, "why not just SQLite" is actually a viable question that is rarely ever answered honestly. This is a hyperbole, but I made my point.</comment>


Firefox will be getting a new release every six weeks. - <AUTHOR> http://blog.mozilla.com/futurereleases/2011/07/19/every-six-weeks/

<comment> john-n Hate to be "that guy", but this is quite old news isn't it?

<comment><USER2> Yeah, date from the article is almost exactly a month ago now.</comment></comment>


On "The Future of JavaScript MVC Frameworks" - <AUTHOR> http://blog.reverberate.org/2014/02/on-future-of-javascript-mvc-frameworks.html

<comment><USER3> I appreciate the skepticism :) But remember the goal of Om is to be simple and fast in more scenarios than are allowed in traditional designs. Emphasis on _simple_.

Take a look at my undo example implemented in about 5 lines of relevant code [http://swannodette.github.io/todomvc/labs/architecture- examp...](http://swannodette.github.io/todomvc/labs/architecture-examples/om- undo/index.html). Note the render time when undoing changes, much less than 16ms. That's undo playback at 60 frames per second.

The ability to snapshot the application state is not a small thing, it's a global application concern with lots of benefits besides user level undo - <USER2> rollback on network request failure, app state restoration sans boilerplate when the user cancels something, simpler model for offline applications, and UIs based on scrubbing come immediately to mind.

I'm sure you could achieve similar or better performance in a system that relies on events with batching and mutable objects but I'm not convinced that it can be done as simply as we can do it today in Om.

<comment><USER4> David, thanks for your work on Om and, especially, writing about it. Your writing introduced me to React and how to use it with a de-emphasis on state. Having very little FP experience and zero Clojure experience, however, sometimes you're going a little fast for me, so was hoping whether you or someone else who reads this could help me out.

I don't completely understand how entirely immutable data can be effectively used in front end apps (I do understand how, _if_ you have immutable data, React can be made fast and undo is easy). If data changes, it needs to mutate, right? Do you then maintain one global object that does change, and have that object be a giant immutable tree with all model data? Or am I completely missing the approach?

If that's the way, how can you efficiently do updates on relatively large chunks of data? Say, I'm coding Gmail and my user wants to star the 2053rd email in a list? Doesn't that mean 2052 items in a list have to be copied? In general, doesn't this make model code much much more complicated? Or am I missing something and is it really not that bad?

Yeah, a bit many question marks, but I hope you catch my drift :)

If anyone could point me to some good reading about thinking in immutable data terms, that would be warmly appreciated too. Thanks!

<comment><USER5> In order to understand the frame of reference for Om, you really need to watch some Rich Hickey presentations [1][2] (or have a good understanding of functional programming). The first one is more relevant to your questions here, the second is just because Clojure programmers have very specific definitions of "simple" and "easy" and because it's a good talk.

[1] [http://www.infoq.com/presentations/Are-We-There-Yet-Rich- Hic...](http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey) [2] [http://www.infoq.com/presentations/Simple-Made- Easy](http://www.infoq.com/presentations/Simple-Made-Easy)

That said, on to answering your questions:

> If data changes, it needs to mutate, right? ...

Data doesn't change in this model (see [1]). Incoming events (keyup, network request, page load) occur and your program responds to those events by producing a new, immutable set of data that you're going to use going forward. Om apps keep one reference to the root of the data tree–Om examples use app- state as the name–which represents the official current state of the data. You can reasonably argue that swapping out app-state is changing data except that anything that had a reference to the previous root(s) still has that reference and you have to go dereference app-state to get the current value instead of having it changed out from under you.

> If that's the way, how can you efficiently do updates on relatively large > chunks of data? ... Or am I missing something and is it really not that bad?

[3] [http://eclipsesource.com/blogs/wp- content/uploads/2009/12/cl...](http://eclipsesource.com/blogs/wp- content/uploads/2009/12/clojure-trees.png)

Clojure(script)'s data structures use structural sharing. The above picture shows inserting a single node into the middle of the structure. The red outlined nodes are the parents which need to be copy+updated, as shown on the right with all the dotted lines being shared references. The most misleading thing about the picture is that the actual cljs trees have 32 branches at each node instead of 2 or 3 so the lookup time is log32 N (basically constant [4], impl in a systems language vs classic datastructures for comparison). In your Gmail example you'd have to make ~3 new nodes.

[4] [https://github.com/michaelwoerister/rs-persistent- datastruct...](https://github.com/michaelwoerister/rs-persistent- datastructures)

> In general, doesn't this make model code much much more complicated?

It requires a different mindset and generally some helper code. In Clojure using Om it's pretty straightforward once you're over the initial hurdle. In javascript using Mori [5] it looks a lot like awkward Backbone with very heavy Underscore use. I've poked around at it and if I were going to try to adopt Mori+React for a real project I'd want to do some quality of life tweaks on Mori. Mostly setting a prototype on the Mori objects to get the feel closer to Backbone+Underscore and trying to get the data structure console output to be more useful.

[5] [https://github.com/swannodette/mori](https://github.com/swannodette/mori)

<comment><USER4> Thanks a lot for the detailed explanation. I'll watch the videos (saw the Simple/Easy one already, they're good definitions of the words and it would be great if they'd be adopted more broadly outside the Clojure community too).

I think I'm catching the drift here. This app-state variable was the concept I was missing. That, and how smart the Clojure(Script) data structures really are.

Mori looks pretty damn nice, actually. Would consider using it in practice.

</comment></comment></comment></comment><comment><USER6> In OP's conclusions: "the DOM is slow, so use a framework that batches updates to it."

It would be nice to see a comparison of React/Om with some less naive approach to handling Backbone events.

In my own apps, for instance, I've dealt with rapid batch DOM updates simply by putting a short timeout on the event handler and canceling it if another draw-inducing event arrived in the timeframe (5ms, let's say). Doing that has led to similar order-of-magnitude speedups, and while not as sophisticated as using requestAnimationFrame, has been sufficient and maintainable.

<comment><USER7> Do you have a open example to this? I would like to know how is implemented.

<comment><USER8> He just described the _.debounce function in underscore.js

[http://underscorejs.org/#debounce](http://underscorejs.org/#debounce)

</comment></comment></comment><comment><USER9> Well, we can check a few of those guesses pretty easily. Here is the stock React TodoMVC demo augmented with Swannodette's benchmarks:

[http://drfloob.github.io/todomvc/architecture- examples/react...](http://drfloob.github.io/todomvc/architecture- examples/react/)

Benchmark to your heart's content! On my system, Om is about 4x faster on benchmark 1, and 1000x faster on benchmark 2. I don't think requestAnimationFrame has a lot to do with it, and immutability only slightly more; I think the real performance gain is in having an application data policy tailored to make the most of React's behavior.

To plug my own work a bit, I built a TodoMVC example with React and my own immutable data structure library in pure JS. It performs a lot like Om on both benchmarks, and actually seems a bit snappier in places, like toggling and clearing all completed todos:

[http://drfloob.github.io/todomvc/labs/dependency- examples/re...](http://drfloob.github.io/todomvc/labs/dependency- examples/react__tree/)

<comment><USER10> Thanks for posting this; I wished when writing the article that I had plain React benchmarks to run.

However when I profiled your benchmark it seems like it is invoking React's event loop more than I would expect (and more than the React/Om benchmark does) -- do you have any idea why this would be? It seems like for this to be apples to apples, it shouldn't be invoking React's update logic (ie. re- rendering everything) until the end of the benchmark. Perhaps this difference is because of requestAnimationFrame?

I don't understand this comment:

> I don't think requestAnimationFrame has a lot to do with it, and > immutability only slightly more; I think the real performance gain is in > having an application data policy tailored to make the most of React's > behavior.

As I mentioned in my article, "Benchmark 2" is a no-op on the DOM. So literally all React should be doing is calling render() before the benchmark (which returns basically nothing), letting the entire benchmark run, then calling render() again (in which it again returns basically nothing).

In other words, I don't see what the "application data policy" has to do with making React efficient in this case; all we're asking React to do here is calculate a no-op diff and then do nothing.

<comment><USER9> > it seems like it is invoking React's event loop more than I would expect ... > Perhaps this difference is because of requestAnimationFrame?

I think so, yes. The performance difference is already negligible with Om, so I didn't see a real need to optimize it any further. Pete Hunt's react-raf- batching (mentioned already) could probably be dropped in to get that last bit of optimization, but I haven't tried.

As for what I mean by "application data policy", I think that if you work with your application's data in such a way that it batches modifications, renders entirely from the top down, and uses fast `shouldComponentUpdate` implementations, you'd achieve most of the improvement you see in the Om vs React+Backbone TodoMVC comparison. Lots of things could achieve that. Immutability isn't a hard requirement to get those features done. And if my React+_tree example is any indication, requestAnimationFrame isn't buying you that much performance either.

I haven't really analyzed what Om's Benchmark 2 was doing under the hood, so thank you for that. I assumed it was doing _something_ , but with the ~4ms benchmark, I just assumed that particular something was wizardry.

<comment><USER10> > I think so, yes. The performance difference is already negligible with Om, > so I didn't see a real need to optimize it any further.

Sorry, I was unclear: my comments were about the (slow) first benchmark you posted that is using React but not using your library. I think it would be orders of magnitude faster with requestAnimationFrame.

<comment><USER9> _EDIT:_ not true. see below.

\</comment></comment></comment></comment></comment><comment></comment><comment></comment><comment></comment><comment>----

Good call! Benchmark 1 is about 33x faster in my browser (with the setTimeout fallback being used, I think).~

[http://drfloob.github.io/todomvc/labs/architecture- examples/...](http://drfloob.github.io/todomvc/labs/architecture- examples/react-raf/)

This is the same React TodoMVC example with a different `react-with- addons.js`, built using React v0.9.0 and [https://github.com/petehunt/react- raf-batching](https://github.com/petehunt/react-raf-batching).

<comment><USER3> The timings you are presenting in the UI are not accurate. But you are correct that this approach results in timings that are almost identical to Om. Use the Chrome Dev Tools profiler flamegraph if you want to confirm what I'm saying.

<comment><USER9> Ah, right. Benchmark 1 is actually ~350ms on my machine. Thanks for the lesson in profiling asynchronous code. I revisited the React+_tree benchmark claims, too, and I think they are still spot on. If you're interested at all, I'd appreciate you taking the time to check my work there.

<comment><USER3> I took a look but it's hard to judge since you are using React 0.8.0 and Om is now on React 0.9.0.

</comment></comment></comment></comment><comment><USER11> The most amazing and irritating thing about JS frameworks is that every week you find something better.

<comment><USER12> And then you decide on one to do a really big single page app (100.000 lines of code) and end up stuck on a legacy codebase watching the pretty new frameworks sailing by. (Happened to me on an ExtJS codebase started in 2008.)

<comment><USER13> Yep, I'm in the same boat. And good luck upgrading ExtJS 3.x to 4.x. Occasionally minor point releases are painful to upgrade to as well. Good lord.

<comment><USER14> Ha! We're even having trouble going from 4.0 to 4.1

Not really funny come to think of it :(

<comment><USER15> I started with 4.0 and switched to 4.1 and 4.2 without any problems.

But yes, I heared 3 to 4 should be a PITA

</comment></comment></comment></comment></comment><comment><USER16> I've used Backbone, Spine, Angular and some handrolled solutions. It never clicked.

But maybe I just don't like JS.. Recently I was trying to use Fay ([http://fay-lang.org](http://fay-lang.org) a proper subset of Haskell that compiles to JS) and I loved it. Now if only I can use it with some sort of FRP library :)

<comment><USER4> If it compiles to JS, I assume that you can call JS from it? The framework of question in this thread, React, actually meshes really well with an FRP kind of thinking and with immutable data. Read the post Haberman links to.

</comment></comment><comment><USER17> Having recently worked on optimizing the performance of my own view extension library to Backbone (kettle.js), I can give some explanation about the relatively poor performance of Backbone's todoMVC implementation in benchmark#1 and #2.

Benchmark 1) This benchmark deals with adding a bunch of todos and seeing how fast they render. The major performance impact here seems to be jQuery. Specifically jQuery event delegation. I was surprised to find that binding DOM events in jQuery are incredibly slow, in fact the majority of the time in that benchmark is spent event binding. For comparison have a look at exoskeleton, a Backbone fork which removes the jQuery dependency and uses the native DOM methods instead. It's also available on todomvc.com and uses pretty much the same code as the Backbone todo implementation.

Given the following benchmark :

        var benchmark = function() {
          app.todos.reset();
          var s = [];var i=0; while (i<1000) {s.push({title:'foo'});i++};
          var t  = performance.now();
          app.todos.reset(s);
          return performance.now() - t;
        }

Backbone: ([http://todomvc.com/architecture- examples/backbone/](http://todomvc.com/architecture-examples/backbone/))

       >>benchmark()
       >>667.2439999965718

Exoskeleton: [http://todomvc.com/labs/architecture- examples/exoskeleton/](http://todomvc.com/labs/architecture- examples/exoskeleton/)

       >>benchmark()
       >>226.4119999963441

It's worth mentioning that Backbone has a couple pull requests open that is meant to address this.

Benchmark 2) This benchmark deals with toggling all of the todos events at once. It builds up 200 todos and toggles them on and off 5 times.

The problem lies with using 'all' and 'change' events way too liberally within the todo application. Which causes a ton of needless render calls. During the course of this benchmark the main view has render called on it 6000 times (!) while the child views have render called on them for a total of 3000 times. I'm actually surprised that Backbone is as fast as it is given those type of numbers. What should happen is the main view should only need to render a total of 5 times (once for each toggle) and the child views 1000 times (200 items x 5 times).

</comment><comment><USER18> I hadn't read the original article, "The Future of JavaScript MVC Frameworks", and the article itself[1] is unreadable for what seems like either font or CSS issues. I made a pastie of the text with links to the text there for those who want to read it too.

[1][http://swannodette.github.io/2013/12/17/the-future-of- javasc...](http://swannodette.github.io/2013/12/17/the-future-of-javascript- mvcs/)

[2][http://pastie.org/8768093](http://pastie.org/8768093)

<comment><USER19> Also happens to me when using Chrome. They must have broken something with the latest updates.

<comment><USER20> There's been a surprisingly bad number of font bugs in the last few months. It's bizarre; I haven't seen browser bugs this visible in years.

</comment></comment></comment><comment><USER21> It's kind-of funny to me see an article entitled "the future of javascript" anything that _only_ talks about a ClojureScript framework.

</comment><comment><USER22>
        Om is an immutable data structure library:
        a structure is  never mutated once created,
        which means that the contents of the entire
        tree are captured in the identity of the object
        root. Or in simpler terms, if you are passed an
        object that is the same object (by identity)
        that you saw earlier, you can be assured that it
        hasn't changed in the meantime. This pattern has
        a lot of nice properties, but also generates more
        garbage than mutable objects.

Is this true to the extent that it typically matters? I would expect so with sort of naive immutability (copying everything whenever you make a change), but not with the kind of structural sharing that Clojure(script)? persistent data structures use.

<comment><USER10> It's hard for me to say how much it matters, because that would depend a lot on the efficiency of the GC and how many copies are forced (which is a property of the application's data structures).

Even with Clojure's sharing, it is still the case (as I understand it) that you're forced to copy all nodes between the root and any node that actually changed. A mutating approach doesn't have to do any copies; it can just mutate the interior node of the tree.

As an example of a degenerate case, imagine that your root has 10,000 children. If I understand correctly, any mutation to any object in the entire graph requires duplicating the root and the entire 10,000-element array.

I honestly have no idea if this would be an important issue in practice or not, I just wanted to mention it as a super-brief pro/con list of immutable data structures.

<comment><USER3> Clojure and ClojureScript data structures use 32 way branching nodes. This means even with >2 billion elements in say a persistent vector you'll never have more than 7 hops on any particularly path. This means in the worst case you will need to copy and update 7 children all which are small arrays.

I did a bunch of GC testing with Om, the GC profile wasn't dramatically different than naive Backbone.js on TodoMVC which is also working GC by blowing away the DOM on every update.

<comment><USER10> Ah, that's clever. Thanks for the info.</comment></comment></comment></comment>


Show HN: Eventn – Data-driven Microservices - <AUTHOR> https://www.eventn.com/ <comment><AUTHOR> Hello HN, Eventn founder here. I have been working on the platform for a little over a year and pleased to announce a public beta. Feedback, thoughts, comments very welcome. Ben.

</comment><comment><USER2> Interesting! Just signed up to give it a try. Quick comment: sign up page is a little bit broken on my Pixel.

<comment><AUTHOR> Thanks for the note, I will get that fixed so it renders better on mobile.</comment></comment>


Steve Jobs: Wired Interview (1996) - <AUTHOR> https://www.wired.com/1996/02/jobs-2/ <comment><AUTHOR> > When you're young, you look at television and think, There's a conspiracy. > The networks have conspired to dumb us down. But when you get a little > older, you realize that's not true. The networks are in business to give > people exactly what they want. That's a far more depressing thought. > Conspiracy is optimistic! You can shoot the bastards! We can have a > revolution! But the networks are really in business to give people what they > want. It's the truth.

<comment><USER2> Same with flat earth people deny cosmologically nihilism depressing thoughts and think they can take down the liars</comment></comment>


Old men who use computers less likely to get dementia - <AUTHOR> http://www.theregister.co.uk/2012/09/05/computers_ward_off_dementia/

<comment><AUTHOR> This is a classic case where a popular account flatly contradicts the actual study.

The popular account, linked above, is titled "Old men who use computers less likely to get dementia", implying a cause-effect relationship. The article goes on to strongly imply a cause-effect relationship: "Men who use computers as they enter their winter years have a better chance of avoiding dementia than those who don't ..."

The original paper ([http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjourna...](http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0044239)) is titled "Older Men Who Use Computers _Have Lower Risk of Dementia_ " (Emphasis added).

The original paper includes this phrase: "Randomised trials are required to determine if the observed associations are causal." For those unfamiliar with technical writing, this means "we have no idea whether the association between computer use and dementia is a cause, an effect, or a coincidence."

Someday, psychology may become a science. But there's no present evidence for that outcome, only counterevidence.</comment>


Neural Networks might help us understand human thought process better - <AUTHOR> http://blog.hashin.me/2016/06/23/catching-the-thoughts-neural-networks/ <comment><USER2> "We all know what Computer programs do - provide step by step instructions on how a particular task is completed"

Sorry dude, but you can't make computers do arbitrary tasks, the only task a computer can do is computation.

Also, the steps to make a coffee is not an algorithm, at least not in the mathematical meaning of the word</comment>


The LEGO Turing Machine (YouTube, w/sound) - <AUTHOR> http://www.youtube.com/watch?v=cYw2ewoO6c4 <comment><USER2> Danes playing with Danish toys</comment>


Mobile Web Developer; social app with a model search contest - <AUTHOR> 2 Full-time roles with clapit, in Sydney (125K package). After a trial period, developer will get equity and trip to launch party in NYC with model search contest.
We have had a good fundraising round and incredible marketing initiatives, with a model search competition over social media out of the U.S.
Front End Guy: React Native, React.js, Redux, Objective-C ideally, you'll also want Java (Android) experience for the future.
 Back End guy: Node.js, Loopback, PostgeSQL, AWS, ElasticBeanstalk
Contact: email@example.com  <comment><USER2> I can also add from experience: these are a nice bunch of people to work with.</comment>