Going Serverless with AWS Lambda and API Gateway - <AUTHOR> http://blog.ryankelly.us/2016/08/07/going-serverless-with-aws-lambda-and-api-gateway.html <comment><USER2> I recently threw together a benchmark to measure latency with different requests per second and request concurrency. It bypasses API gateway and just calls the lambda directly. The p50 is very close to the minimum latency I can see to US-WEST-2.

[https://github.com/spullara/lambdabenchmark](https://github.com/spullara/lambdabenchmark)

</comment><comment><USER3> Lambda seems like a neat concept, but is it really worthwhile? Conceptually, an infinitely scalable backend for whatever thing I'm working on sounds great, but in practice, there are some downsides. For instance, your client requests hits the API Gateway, which then initiates another HTTP request to whatever Lambda is supposed to be called, at which point, a container is started to run your code. By this point, you've added some overhead to every single request, and it's completely impossible to get rid of it because that's how Lambda is designed. Am I off base here? Does it really work like that? If so, what's the performance hit that you've seen compared to running e.g. ExpressJS directly on a VM or bare metal?

<comment><USER4> The idea is that containers are started to support the load of your application. If the load of your application is so low you have zero containers running most of the time you're not the target audience for this kind of service.

<comment><USER5> If you have zero containers running most of the time, AWS Lambda is attractive because it costs $0 when there is no activity, unlike instances that costs all the time even when idling.

</comment></comment></comment><comment><USER6> If anyone is not interested in vendor lock-in to Amazon for Lambda and API Gateway, I just released an open-source multi-language microservice backend today.

[https://github.com/Stackvana/stack](https://github.com/Stackvana/stack)

Cheers!

<comment><USER7> Is it feature-compatible with Lambda? Like can I take a Lambda and run it via this stack? As a Lambda user the reality is, sure, at the moment there is a bit of vendor lock-in, but I don't think at all about hardware, which is the point.

<comment><USER6> This specific tool `stack` has a minimal feature-set for taking a function in any language and putting it on an HTTP endpoint. Nothing else included ( by design ).

It supports the same style of coding microservices as Lambda, except `stack` also provides actual HTTP streaming interfaces.

Check out the echo examples here: [https://github.com/Stackvana/stack/tree/master/examples/serv...](https://github.com/Stackvana/stack/tree/master/examples/services/echo)

An additional interface over `stack` could be used to support any cloud function style ( including Lambda's )

</comment></comment></comment><comment><USER8> > There seems to be some issue applying privileges that I can't seem to figure > out. Your lambda function will fail to execute because API Gateway does not > have permissions to execute your function.

This stuff is definitely confusing. I think I "reverse-engineered" from applying things via the web interface and then looking at the policy when I created Gimel[0] - an AWS Lambda A/B testing backend. Take a look here[1] for the policy. I think that's what you're looking for, but I can't say I'm confident it is... (it's confusing).

There are some more general-purpose tools to help you deploy to Lambda. Kappa[2] and Apex[3] are worth looking into.

[0] [https://github.com/Alephbet/gimel](https://github.com/Alephbet/gimel)

[1] [https://github.com/Alephbet/gimel/blob/master/gimel/deploy.p...](https://github.com/Alephbet/gimel/blob/master/gimel/deploy.py#L42-L60)

[2] [https://github.com/garnaat/kappa](https://github.com/garnaat/kappa)

[3] [https://github.com/apex/apex](https://github.com/apex/apex)

</comment><comment><USER9> I did the Alexa Skill tutorial[1] and hosted the skill on AWS Lambda. It was really easy, fun, and I recommend it to anyone who wants to mess around with Lambda.

[1][https://developer.amazon.com/public/community/post/TxDJWS16K...](https://developer.amazon.com/public/community/post/TxDJWS16KUPVKO/New- Alexa-Skills-Kit-Template-Build-a-Trivia-Skill-in-under-an-Hour)

</comment><comment><USER10> aka "Going towards total vendor lock in by basing your system on a proprietary, non portable infrastructure service"

<comment><USER11> Migration between infrastructures is always painful, so I don't think vendor lock in is that big a deal, if you keep APIs small and their I/O well documented (and designed).

<comment><USER12> Migration between a OVH VPS, a local server, or a Hetzner rootserver is not really painful.

I choose a preinstalled distro, deploy my script to automatically handle dependencies and set up the container infrastructure, pull the containers, and I have a server set up and able to run my containers in about 3 minutes, and connected to a central server so it can be provisioned containers to run.

The entire infrastructure can obviously be moved to another hoster in days, because the hoster is just providing a machine.

</comment></comment></comment><comment><USER13> In case someone is looking to move their java REST server to Lambda, here are a few lessons I learnt: a) fragment your REST war into smaller micro services wars. The load time for big REST application will impact your caller. Small micro services will boot up on Lambda much faster and respond quicker. b) If you use spring dependency injection, you may want to rethink that and tweak/optimize it. I had a database tier with over 20 hibernate/ebj beans . The load time was horrendous. I had to eliminate all beans not needed by the microservice.

<comment><USER14> You're right, don't make a big war, but think of it as micro functions.

Also if you're going to use spring check out this guide. [https://cloud.google.com/appengine/articles/spring_optimizat...](https://cloud.google.com/appengine/articles/spring_optimization)

its relevant to aws lambda as well.

</comment></comment><comment><USER15> Are serverless and container based architectures really that popular in the real world, or is it yet another HN bubble? I'm still happy using virtual/cloud servers for anything/everything.

<comment><USER16> Serverless is pretty big in the PHP world, but people there tend to call it "shared hosting".

<comment><USER17> Are there shared PHP hosts that bill by the request? TFA indicates that is a key difference of serverless, and why it's not shared hosting. The billing model matters to some users as much as the implementation.

Serverless is just shared hosting like S3 is just FTP.

<comment><USER12> There used to be quite a few PHP hosts that billed by the request in the past, so, yes?

<comment><USER3> I've been writing PHP for almost a decade and I've never come across any PHP hosts that bill by the request. Not explicitly, anyway -- there were always those hosts where if you got over some threshold of traffic and it caused a certain amount of load on the servers, they'd cut you off with no warning/notice. Those hosts suck. Never seen anything like Lambda for PHP, though. Care to share?

<comment><USER12> Well, there was a host – they shut down years ago, though – which did it.

And there were always the kind of hosts which had no quota, and no fee, but where you'd pay based on how much you wanted to in a given month, but you'd be expected – honor system – to pay more the more you used, with a rough formula how much would be expected from you (but you'd never be terminated).

<comment><USER17> With business models like those, it's not surprising they are not still around.

<comment><USER12> Oh, the honor model one is still around. The other one, which actually billed you, isn't.

Then again, here a lot of things are honor model or volunteer based, and society still works.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER18> How in the world is this considered something new? It was in fact the default mode of operation for small to midscale webhosting that rendered pages dynamically in the dotcom bubble burst era (late 1990-ies).

You'd upload your HTTP attached executables to cgi-bin or similar, register other stuff in crontab and usually also got access to a MySQL or PostgreSQL. Some hosters were actually fancy and deploy your stuff on a MOSIX cluster; but simply load balancing toward the httpd machines and your application talking to a dedicated DB machine worked as well.

<comment><USER19> Load balancing? Heh, that's a good one.

My experience with hosting in the boom consisted of mostly first ip-based, then name-based vhosted Apache, maybe a per-vhost, but often per-system cgi- bin, and if you're lucky, mod_php.

Generally if you were in a shared hosting environment, your DB and webapp lived on the same physical server (Probably a Cobalt RAQ or Netra T1, but maybe a Sun Ultra AXi in an ATX case on a bread rack). Rarely was there any form of multi-host redundancy for a given application. If something broke, you're down while the hosting company swaps disks to a new chassis, and down even longer when the disks die and you need to reproduce the app config/state changes that happened in the 2 days since the last server backup happened.

So yeah. This is a slightly different model.

<comment><USER18> > My experience with hosting in the boom consisted of mostly first ip-based, > then name-based vhosted Apache, maybe a per-vhost, but often per-system cgi- > bin, and if you're lucky, mod_php.

At the core of it this is not so different.

> So yeah. This is a slightly different model.

No, not really. What's changed is our understanding of how to run this kind of infrastructure. And we now have a little bit more sophistication in how we organize process runtime environments (sandboxes, cgroups on Linux, jails on FreeBSD). But if you tear down all the PR and get past the nice decoration it boils down to a glorified shell access.

Back in the boom it sucked because nobody knew then, how to do these things properly.

</comment></comment></comment><comment><USER20> I did this. It's a pain in the butt. Worth it. But a pain in the butt.</comment>


HyperCore Linux: A tiny portable Linux designed for reproducibility - <AUTHOR> http://hyperos.io <comment><USER2> I like this idea, but I do not really understand who it is aimed at. The focus seems to be on reproducibility of scientific experiments and code, which is great! Many existing code artifacts are WOGSL (Works On Graduate Student's Laptop) which is the CS equivalent of "runs when parked".

So, let's break down the fields of CS for which this should be applicable:

* Systems: This won't work except for the few systems projects that are entirely in-RAM AND will work on tinycore's kernel version

* ML: This, I can see, especially with the seeming focus on dataset management. Much ML is compute-bound and the overhead of using the FUSE FS's is hopefully negligible.

So, is this focused on ML and ML-using code and experiments? If so, I think that should be clarified. I think a lot of systems folk will be (rightly or wrongly) turned away from it due to the seeming overhead of the various hyper* extensions. Not to mention that they are all written in Node/JS (Again, rightly or wrongly, many systems folk will not want to run their stuff on platforms written in JS)

I like the direction this project _can_ go, but there seems to be a lack of focus or direction in your mission right now.

<comment><USER3> > So, let's break down the fields of CS for which this should be applicable:

> So, is this focused on ML and ML-using code and experiments?

Your completely missing the point. Please look into 'Computational Science' (or Scientific Computing, or Numerical Analysis), that applies to 80%+ of all disciplines that exist today (e.g., computational physics, comp. biology, comp. economics, comp. aspects of engineering disciplines, the list goes on).

<comment><USER2> Yup, I can see it for computational experiments or "applied CS" fields. I realized this soon after I posted the comment, but I didn't bother to update my comment.

However, this still isn't clear in their website. I will give them the benefit of the doubt since they are early in their project, but I think it would behoove them to nail down their mission sooner rather than later.

This is probably what I get being in the CS bubble. =)

<comment><USER3> Well to their credit, they did mention "scientific research reproducibility" which is a very well known phrase in computational circles.

But I agree, it would help if they expand on this from the pure CS point of view. Especially if they mention things like containers, CS people would be interested in finding out what they're up to.

</comment></comment></comment></comment><comment><USER4> I was hoping this was going to be a linux distro built reproducibly (as in same binary builds given same compiler toolchain) but was disappointed..

<comment><USER5> I'm really curious as to what exactly you mean by this...does the same code through the same compiler not reliably produce the same binary? I know very little about actual compiler mechanics, but non-deterministic compilation seems really strange to me.

<comment><USER4> It is super strange and as a huge amount of undesirable consequences.

If you compile a "hello world" type C program you should get the same binary when you compile it again provided your toolchain (C library, C compiler, linker etc) are all the same.

However certain C macros like __DATE__ make the binary change (in this case based on the time of compile). Additionally sometimes environment variables like your working directory and your username get into the binary.

Why is this bad?

If the build server for Debian gets hacked or if a developer's machine gets hacked (for some projects), the hackers can modify the binaries. If the program is not reproducible then there is no way to tell that something has gone amiss. If the program can be built reproducibly, someone else can build the code, produce the same binary, and validate it.

This is more scarier in the case of a "Ken Thompson" style hack, where the C compiler binary is modified so that it compiles normally but inserts backdoors in certain libraries, and also inserts its modifications whenever it is building another C compiler.

If the "Ken Thompson" style hack is ever pulled off on a linux distro, there would be no real way to tell without analysing the binaries.

Provided your initial C compiler is good. Having a chain of reproducible builds where each build produces the same binary would prevent against this. Currently we are just producing random binaries and relying on trust which is horrible.

<comment><USER6> Another case is when you have to release a maintenance fix of a product released a few years ago.

You likely don't have the old toolchain installed, so you reinstall everything, pull a VM, whatever, and then rebuild the last official version.

I would be so much more comfortable if what you just rebuilt had the same md5 that the one deployed on the field. Because even before applying and testing the patch you are not _absolutely_ sure you have rebuilt exactly the same application.

</comment></comment></comment></comment><comment><USER7> > sudo linux boot

      /usr/local/lib/node_modules/linux/cli.js:60
        fs.accessSync(keyPath)
           ^
      TypeError: Object #<Object> has no method 'accessSync'

<comment><USER8> just fixed this. reinstall and try again

<comment><USER7> > sudo linux boot Error: Timed out waiting for linux to boot

thats because xhyve fails with

      vmx_init: processor not supported by Hypervisor.framework
      Unable to create VM (-85377018)

might be better to output the error from xhyve right away

</comment></comment></comment><comment><USER9> `npm install linux`

<comment><USER10> Right? Bold move, taking that as the npm package name listing.

<comment><USER11> I think they should rename tbh. They are not 'linux'

<comment><USER12> Nor is Karma the universal force of cause and effect commonly called "karma," but somehow we all get by with npm install karma.

<comment><USER11> tbh, It's far different to...

\- use an abstract concept as a metaphor/marketing for your product

than

\- use product "L" that has been influencial and important historically, currently and likely well into the future as your Product's dependency.

\- Then market your product as product "L" on one of the most important package managers for startups, enterprises, hobbyists.

They have but a single distrobution. They are not "Linux". They just are an example of it

<comment><USER13> I agree. It will be better as npm install hypercore or something.

</comment></comment></comment></comment></comment></comment><comment><USER14> What speed stats would people be getting with this..? The idea of Node managing a hypervisor linux VM somehow seems unrealistic in performance terms - but I might be hugely prejudiced on this so who knows.

<comment><USER15> I don't see where it has anything to do with Node. It looks like it's using NPM to install it, but the actual running of the VM looks like it goes through the standard hypervisor of the host OS. NPM is _technically_ separate from Node (though yes, the majority of its use is for Node modules). If it is using Node for anything, I can only imagine it is as a replacement for shell scripting.

Interesting, using NPM. Now that I think about it, it's the only package manager that I know of that runs on and is commonly used on all 3 major OSes.

<comment><USER16> You mean like pip, easy_install, `go get`, gem, or PPM? How about even Tarballs?

/s kids these days, Javascript this, node that...

<comment><USER17> Or, you could just go to the lowest common denominator, and use Make. It's not like that problem space hasn't been thoroughly explored for _decades_. For any problem you would have I imagine FreeBSD encountered and surpassed it in the ports system a long time ago.

<comment><USER18> Except, you know, Windows.

<comment><USER17> True, but for Windows it's no worse than installing some other package manager that isn't installed automatically.

Which is all of them, except for windows update.

Except for if you have Microsoft Visual Studio installed, in which case you probably have a make system, nmake.

Unfortunately, nmake isn't quite compatible with regular Makefiles.

Luckily, there's plenty of resources for how to set up Makefiles so they work for both nmake and cmake.

But since make is so simple, it's been compiled and available for windows for decades,so just shipping it with the makefile for windows is probably simplest.

</comment></comment></comment></comment></comment></comment><comment><USER16> Seems like a competitor for Vagrant as much as anything else. Given the ubiquity of Virtualbox and portability of its images, it seems like it will be the tool most compared.

That or docker toolbox.

</comment><comment><USER19> [https://github.com/maxogden/hypercore/blob/master/include/us...](https://github.com/maxogden/hypercore/blob/master/include/usr/local/bin/hyperfused) \- blerk, binaries in source control.

<comment><USER20> "15\. Rule of Optimization: Prototype before polishing. Get it working before you optimize it."

The Dat team has a solid track record creating separate packages for binaries; they're responsible for maintaining Fuse, Electron and LevelDB packages on NPM. Optimizations are likely to follow.

<comment><USER19> Fair enough.

</comment></comment></comment><comment><USER21> For the first time in quite a while I am actually tempted to update my mac to Yosemite. It isn't explicit, but I am fairly certain it won't work in older versions of osx.

<comment><AUTHOR> Yes, Yosemite was the first version to come with Hypervisor.framework

</comment></comment><comment><USER22> Also check out NixOS if you want a bonefide linux distribution: [http://nixos.org/](http://nixos.org/)

</comment><comment><USER7> why is this using npm and not brew?

<comment><USER8> this is not osx specific. its gonna be installable on other platforms as well (linux/osx/windows)

<comment><USER23> Why does this use npm instead of a tarball?

</comment></comment></comment><comment><USER24> can we stop with .js already?

<comment><USER15> Care to explain why anyone should listen to you in this regard?</comment></comment>


Creating a Modern OCR Pipeline Using Computer Vision and Deep Learning - <AUTHOR> https://blogs.dropbox.com/tech/2017/04/creating-a-modern-ocr-pipeline-using-computer-vision-and-deep-learning/ <comment><USER2> > Our Word Detector was also a significant bottleneck. We ended up essentially > rewriting OpenCV's C++ MSER implementation in a more modular way to avoid > duplicating slow work when doing two passes (to be able to handle both black > on white text as well as white on black text); to expose more to our Python > layer (the underlying MSER tree hierarchy) for more efficient processing; > and to make the code actually readable.

Was this ever contributed back to opencv?

<comment><USER3> OpenCV is licensed under the BSD license. [1]

"BSD (unlike some other licenses) does not require that source code be distributed at all." [2]

Looks like there is no legal obligation to provide their source code or changes. But I really hope they did push their changes upstream. It is a real shame when companies that benefit so much from the open source community don't give back.

1\. [https://github.com/opencv/opencv/blob/master/LICENSE](https://github.com/opencv/opencv/blob/master/LICENSE)

2\. [https://en.wikipedia.org/wiki/BSD_licenses](https://en.wikipedia.org/wiki/BSD_licenses)

<comment><USER4> Hopefully, those who miss that Dropbox code today may think about using a more powerful license (ie AGPL) on the code they'll write themselves in the future so that they make sure their users will contribute back like they want DropBox to. :-)

<comment><AUTHOR> Pretty sure that both OpenCV and Dropbox knew what they were doing when they avoided the affero license.

</comment></comment></comment></comment><comment><USER5> A better baseline than an out of the box OCR engine is applying some computer vision techniques before using an out of the box OCR engine. This can significantly out perform a pure OCR engine approach. (speaking from experience working on startups doing this kind of stuff for ~10 months)

One dumb but surprisingly effective thing to try is apply a bunch of random binarizing filters before putting your text into an OCR engine, then picking the most common output from those filtered images. Some combination of morphological operations (dilates/erodes in different orders and different strengths), different levels of blur and sharpening, adaptive binary threshold at different levels, resizing the image (hilarious but some OCR engines are sensitive to relative scale), adding white borders of different thicknesses, rotating by small angles, denoising, ...

This gave us ~95% word level accuracy on our dataset (with tesseract as the OCR engine), without tuning the filters (we had used the filters individually before with some brittle logic for deciding when to use them: the random filter approach was kind of a joke which ended up working). Tesseract on its own had an abysmal ~40% word level accuracy on that same dataset. Dataset was of words segmented out of scanned bank statements.

Main downside was that this was pretty slow (we were generating ~10k filters per word), but we found a way to make it work (hierarchical stacked AWS Lambdas, lol).

<comment><USER6> Selfless plug, but for some examples of these see a side project of mine: [https://www.juusohaavisto.com/northern-nike- nabob.html](https://www.juusohaavisto.com/northern-nike-nabob.html)

</comment></comment><comment><USER7> 10 years ago I used Abbyy Finereader to add an OCR text layer to about 500,000 pages of scanned PDF documents. At the time it appeared to be the best OCR software available, at least of the options I could try.

Later I played around with the open source Tesseract OCR, but it was _way_ behind commercial desktop packages in accuracy/usability. It lagged especially in dealing with different document layouts. What's the current leader in desktop OCR? Has deep learning yet revolutionized the "traditional" OCR market for desktop document processing, or is it just making it easier for companies like Dropbox to quickly get something reasonably good working?

<comment><USER8> I had to research the commercial OCR market recently for a client project. It's abysmal. Most of the solutions are horrendously overpriced, windows only enterprise packages, and the ones that I was able to try out bordered on unusable (bad results and _terrible_ UI). Since OCR is basically "hello world" for tensorflow, I don't understand why these incumbents haven't been wiped off the map.

<comment><USER9> Because for example Abby replaces the image with an PDF with invisible text overlays. I think it is a bit more complicated once you account for the formatting of documents.

<comment><USER10> Abbyy has had that ability for a longer period of time so it may be more accurate, but this is something tesseract supports[1]. In fact I'd say most OCR systems support it with varying degrees of accuracy.

[1]:[https://github.com/tesseract-ocr/tesseract/wiki/FAQ#how- do-i...](https://github.com/tesseract-ocr/tesseract/wiki/FAQ#how-do-i-produce- searchable-pdf-output)

</comment></comment></comment></comment><comment><USER11> > "At some point, we will open source and release this synthetically generated > data for others to train and validate their own systems and research on."

Glad to hear this.

<comment><USER12> This article was posted in April. Did Dropbox follow through and release? 7 months..

</comment></comment><comment><USER13> I'd kill for a self-hostable solution like that. I just don't have the resources to spend like Dropbox. Can anyone recommend a poor man's approach to this? I can afford a lot of AWS instances, but not the 8 months of engineering.

<comment><USER14> Not self-hostable, but Google Vision API OCR was pretty good when I used last time. AWS also has a offering for that, but I haven't personally tested.

</comment></comment><comment><USER15> It's pretty remarkable that they were able to build a system more or less from scratch that "gave us the accuracy, precision, and recall numbers that all met or exceeded the OCR state-of-the-art."

There was a recent post on the Google Developers blog about a similar project to recognize bottle-cap codes in a mobile app:

[https://developers.googleblog.com/2017/09/how-machine- learni...](https://developers.googleblog.com/2017/09/how-machine-learning- with-tensorflow.html)

HN discussion:

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

</comment><comment><USER16> seems like a lot of value locked away in these training sets, is there a commercial platform to buy and sell trained sets yet ?, answering my own question, yes, [https://algorithmia.com/](https://algorithmia.com/) any others ?

</comment><comment><USER17> Super cool!

Solving problems like DropTurk with stronger guarantees around turnaround/quality/confidentiality is exactly what we do at Scale. Would love to hear more about DropTurk's experiences around building this internally and how it compares to our product:

[https://www.scaleapi.com/ocr-transcription](https://www.scaleapi.com/ocr- transcription)

</comment><comment><USER18> Hadn't really used the document scanner yet...but it sounds like I might have to now. If they keep moving on this it's going to replace my primary use of Evernote...and since Dropbox has a Linux client but Evernote doesn't it'll end up being a pretty easy switch.

Are there any Evernote -> Dropbox Paper migration tools out there?

</comment><comment><USER19> Was this done by the Endorse team Dropbox acquired a few years back? I know they were big into this same line of work.

</comment><comment><USER20> Are there any fully-offline alternatives to this? What is the most capable open-source solution?

</comment><comment><USER21> I'd love to see a system that worked on handwriting. With all the image recognition progress in the last few years, I never see a mention of recognizing handwriting.

<comment><USER22> There are two options for this, one is online and the other is offline handwriting recognition.

Online is when you have info about the strokes (e.g. writing on a tablet or on a HTML5 canvas), offline is when you don't anything other than the image.

Online is mostly solved, offline is not working well yet. Deep learning will certainly help accelerating progress.

I'm working on a prototype that extracts (and transcribes) handwriting info from PDF documents (like forms).

<comment><USER21> Nice to see someone working on it!

The online system is not so useful, I prefer to type when I have the option anyway. It's faster.

The offline system initially doesn't even need to be that accurate. OCRing printed text must be accurate because of the sheer volume being OCRed. Handwritten stuff tends to be of far smaller volume, and so can be hand- corrected more practically.

</comment></comment></comment><comment><USER23> I hope some better OCR comes along. I use Nuance and either I have confused it with my training file or it makes some very dumb decisions. It seems like is should scan something that it sees as "wi1l" or "s0mething" and realize that it isn't very likely that someone would put a number in the middle of a word or put random superscript in the middle of a word.

</comment><comment><USER24> Very interesting post. Is there any benchmark data showing how their system compares to the competition?

</comment><comment><USER25> All this and yet they still can't implement support for a .dropboxignore file

<comment><USER26> You can just place any such file outside the Dropbox directory. Doesn't seem like a big deal.

<comment><USER27> It's very frustrating if you keep your programming projects backed up through Dropbox, and want to back up the code but not gigabytes of node_modules and python virtualenvs. Not that Dropbox has any incentive to make it easier to use less space...

<comment><USER8> Isn't git or mercurial more appropriate for archiving programming projects?

<comment><USER28> For archival, yes. But it's not rare that I want to swap computer without committing WIP changes.

<comment><USER29> Wouldn't a branching do the trick?

checkout a WIP branch and push it. You can pull it on any other computer you want, keep working on it till you are comfortable enough to merge back on master/develop.

<comment><USER25> While that sort of works and I do that, it's a much more cumbersome solution.

I commit WIP code to a separate branch, change, and now if I go back to the original computer, I need to make sure to push, go back, pull again... god forbid I had done interactive rebasing or amended a commit, since it'll be all of of sync... it's just more more complicated than simply saving a file and having it reflected. "Temporary commits" should be a rare thing, not mandatory.

I end up using both git and dropbox for some projects and it mostly works, but having projects on dropbox is a mess because of node_modules, having sync running continuously because some tools/projects/IDEs will keep generating temporary files, etc.

<comment><USER29> Oh i do agree, it's cumbersome and dropbox should have .dropboxignore file. I was just suggesting a work around :)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER30> Dropturk sounds useful, any plans of open-sourcing it ?

</comment><comment><USER31> Why would a personal backup company invest in OCR?

> To peek at personal data

<comment><USER32> This statement is obvious. I pay Dropbox specifically so they can hold my data and yes - look at my personal data. And by OCR'ing it make my data even more understandable and searchable.

How is this a concern when that is the purpose of the company's software?

<comment><USER33> I understand that you are fine with them looking at your data, but how exactly is it obvious that the primary purpose of a company you are paying to backup your data is to mine that data?

<comment><USER32> The primary purpose of dropbox was never "backup". It was always to intelligently store and share data, and to be able to identify information inside of it - like if it's an image, have a gallery. If it's a word doc, have a light weight interface for reading and editing, etc. It was also one of the primary ways to get data out of cell phones because of the "sharing" and "syncing" options.

I think you are confusing dropbox for something else?

In fact I think dropbox would be a horrible backup solution! Don't use it for backup or you will be disappointed.

<comment><USER34> Right: Dropbox isn't a safe-deposit box for your data; it's a checking account for your data.

</comment></comment></comment></comment></comment><comment><USER35> Why do they use mechanical turk to train printed text? You could easily build a tool that transforms ASCII into something that looks like photographed printed text, with different levels of quality (using e.g. erosion and dilation, different fonts, etc.)

<comment><USER36> They were using Mechanical Turk to evaluate existing OCR systems before they started at building their own.

If you read further into the article, they did exactly what you suggested to train their own system:

"A corpus with words to use...A collection of fonts for drawing the words...A set of geometric and photometric transformations meant to simulate real world distortions...The generation algorithm simply samples from each of these to create a unique training example."</comment></comment>


Syntactic: A lexical categorizer with a pretty visualization - <AUTHOR> http://syntactic.omershapira.com/

<comment><USER2> It seems like your cluster quality will be sensitive to the words used to seed each cluster.

Why not use a standard word clustering algorithm like Brown clustering? <http://acl.ldc.upenn.edu/J/J92/J92-4003.pdf>

Percy Liang wrote a great implementation in C++ that you could plug into your visualization: <http://cs.stanford.edu/~pliang/software/>

Also of interest is that Brown clustering is hierarchical, so you can get coarse or fine-grained clustering.

[Aside: Here are some 2-d visualizations I made of word embeddings from a neural language model: <http://metaoptimize.com/projects/wordreprs/> ]

<comment><AUTHOR> I'll definitely look into the Brown clustering. I used this one with the hope of being able to eventually run spectral clustering on this (main problem: the KLIC defines a pre-metric, not a proper metric, so the order of operations is crucial).

How does the Brown clustering method guarantee less sensitivity to the seeding words?

Your visualization is interesting, I'd like to able to navigate it in order overcome most of the clutter. Originally I thought of mapping the clusters in 3d "clouds", but I think the dataset is too large for making a dimension-based visualization more than recreational - I mean, I'd probably be happier to read a cluster as a list.

</comment></comment><comment><USER3> Would love to see what clusters from PubMed would look like. Anyone planning to run this on it?

<comment><USER4> Agreed. Would love to see this too.

IIRC they have a pretty easy to use API but as far as data dumps (according to a quick search and <http://www.nlm.nih.gov/bsd/sample_records_avail.html>) it appears they only provide XML whereas the current code requires XML.

<comment><USER5> _> it appears they only provide XML whereas the current code requires XML_

Is there a typo here, or am I just reading this wrong?

<comment><USER4> typo -- second instance of "XML" should be ".txt"

</comment></comment></comment></comment><comment><USER6> First of all, great work and thanks for sharing!

I guess I know less about NLP and clustering than I thought, but what exactly does the visualization indicate?

On Iteration 1/3, when I click "husband" on the sidebar and "first" shows up...what does that mean? That that's the closest cluster by distance?

The visualization looks nice but the accompanying text doesn't shed much light...

<comment><AUTHOR> There's a 'help' button on the top-right corner in case you get lost - but I guess I should curb my minimalism and make it larger.

The visualization is meant to visually explain the 'distance'. If the chosen word (top scope) falls down nicely on the target cluster (if any lit square on the top lights up on the bottom), then the word should be close. Note that it doesn't work the other way around (more about that in the 'The KLIC' section).

In the bottom of the screen there are two text displays - the left one shows the closest cluster with its contents and the right one is any cluster you choose. Note that the scopes change according to the selection.

</comment></comment><comment><USER7> need horizontal scrollbar</comment>


Show HN: Automated tech newsletter that aggregates the best tech content - <AUTHOR> http://metadigest.uzpg.me/ <comment><USER2> I would be interested to hear more about your "selective algorithm" or what makes your content "the best"..

In other words: Why would I give you my email address?

<comment><AUTHOR> I'm unsure how I could explain but I would love to try. My newsletter gets popular content that many developers found interesting. I then try to make sure that content is relevant and provides insights to the users. This project is still in its early stages but that's a simplified version of what I am trying to do.</comment></comment>


Ask HN: Looking for blogs/resources/people on making a living by filing patents? - <AUTHOR> Through their company or independently? <comment><USER2> Accelerando, by Charles Stross

<comment><AUTHOR> I read the description on Amazon and it seems like a fiction book. How is it related to patenting ideas?

<comment><USER2> The main character makes a living by patenting things.</comment></comment></comment>


When should I begin to talk to a VC? - <AUTHOR>

<comment><USER2> Is this an abstract question or do you have a specific circumstance that you could discuss?

In the abstract, at the end of the day you are selling equity in a company to a VC firm, and you need enough substantiation that the VC firms would bite.

</comment><comment><USER3> I wouldn't talk to a VC (to obtain venture capital) until you can show them how to turn their capital into substantial profit by giving it to you to spend.

</comment><comment><USER4> When you have enough traction and your problem is scaling that traction. Don't take VC money unless your problem is scalability and massive growth.</comment>


Airbnb to Ban Party Houses - <AUTHOR> https://www.bloomberg.com/news/articles/2019-11-02/airbnb-to-ban-party-houses-after-halloween-shooting-ceo-says <comment><AUTHOR> Airbnb is "expanding manual screening of high-risk reservations flagged by our risk detection technology," and it's "creating a dedicated 'party house' rapid response team," Chesky said. He's directed Margaret Richardson to oversee the new team and initiated a 10-day review to kick start the process.</comment>


StandardJS just turned 10.0.0 - <AUTHOR> https://standardjs.com/changelog.html#1000---2017-04-04 <comment><USER2> So what's the goal of this project? From the announcement it says

      there are lots of new rules in 10.0.0 designed to help catch bugs and make programmer intent more explicit.

Then in the FAQ it says

      Can I use a JavaScript language variant, like Flow?

      Before using a custom JS language variant, consider whether the added complexity (and effort required to get new contributors up-to-speed) is worth it.

The goal of variants like Flow is to catch bugs and make intent more explicit! We have to consider if it's worth training up new contributors on this, but we don't have to consider the contributor cost to learn all of feross's personal JS style preferences and API opinions?

I get the goal of having a uniform style - that's important and valuable, even though StandardJS's decisions don't match the style predominant in the JS community. But it seems like there's been a lot of scope creep here where now there are specific rules for specific APIs and other stuff that is well outside the domain of "Let's all format our code the same".

<comment><USER3> _even though StandardJS 's decisions don't match the style predominant in the JS community_

I find it particularly ironic that there's a reasonably popular fork called semistandard. [1]

In all seriousness though, I'd really love to see the JS community move towards tools like prettier[2] instead of continuously trying to establish "one eslint config to rule them all". I just want each repo I work with to configure my editor for me and reformat stuff automatically (a la gofmt) so I can forget about it. Even if some of the particular style decisions are ones that I personally don't agree with, it doesn't matter — the value of having those decisions abstracted away from me in the first place is significant enough that any minor quibbles fade away pretty quickly. Then I can focus on writing and reading code, not on arguing about whether we should enforce or disallow dangling commas in our lint config.

[1] [https://github.com/Flet/semistandard](https://github.com/Flet/semistandard)

[2] [https://github.com/prettier/prettier](https://github.com/prettier/prettier)

<comment><USER4> _> Even if some of the particular style decisions are ones that I personally don't agree with, it doesn't matter — the value of having those decisions abstracted away from me in the first place is significant enough that those quibbles fade away pretty quickly._

So... Standard?

I use Prettier and pipe the output my own eslint file. Could do the same but Prettier | Standard. Or Semistandard. Or whatever.

The issue is the community largely values their personal styles (ignoring choice of semicolon omission) too much to standardize on "one style to rule them all". Because everyone (including myself) "I like this except these _two little things_ " and everyone's two little things are different so you end up with 200 different lint configs each mostly similar but with their own little tweaks.

<comment><USER3> I guess what I was trying to say is that I wish the JS world had had its own gofmt/refmt from the get-go. But since it didn't, the community's still pretty undecided more than 20 years after the language came into being, and I don't see that changing significantly any time soon. I don't know, maybe it's "too late"?

Not that I think golang got it exactly right either, but because the style guide was essentially built into the language from the start, the change process is necessarily slower and more intentional, and I think that's a good thing.

</comment></comment></comment></comment><comment><USER5> Call me old faction or what, but semicolons and 4 spaces indentation, I'm off the grid, so long for so called "Standard" JS.

<comment><USER6> I agree. Furthermore, it is really deceitful to use the name "Standard" when it's far from it. For years this was not the standard way of writing JavaScript. I get that standards change. However, this isn't even the way most companies write JavaScript.

The way I interpret this: some group of developers thought it would be a good idea to hijack the word "standard," and wedge this particular new style into the concept. It just isn't standard. It's as absurd as having a company called "Blue Shine" and selling only green colored cleaning products.

At least be honest about it. Call it something else, like "Colonless," since that's the most obvious thing that sticks out when using this style.

<comment><USER7> > it is really deceitful to use the name "Standard" when it's far from it.

reminds me of the debacle around "Standard Markdown", now called "CommonMark"

</comment></comment></comment><comment><USER8> Feross (of YouTube Instant and Webtorrent fame) did a great branding job on this. However, from my own limited experience, this is an unneeded layer on top of the fantastically good ESLint.

<comment><USER9> I used Standard for a while, because it matched my personal preferences almost 100%. Some day, however, I decided to do a small modification. Now I'm alone with my own eslintrc and my own dotfiles management.

<comment><USER10> You can just extend the eslint config and disable or tune any rules you don't like: [https://github.com/feross/eslint-config- standard](https://github.com/feross/eslint-config-standard)

</comment></comment></comment><comment><USER11> This is an awful project. Someone took his own preferences for code style and tries to make it look like some "standard".

The parts that I don't like the most are 2 spaces for indentation (why so small? who else is using such small indentation?) and "no semicolons" rule.

It would be better to adopt some style guide from Java, because JS has similar syntax and because Java has been in use in large projects for a long time.

</comment><comment><USER12> I've been always meaning to try this out but always just keep reusing the ESLint config, which is probably a bit out of date now. So the question is, could someone explain to me (and everyone who has these same thoughts) why is StandardJS worth a try?

<comment><USER13> If you want a prebuilt eslint config, and you don't like the really popular ones (eg, airbnb[0]) because they default to requiring semicolons, then this is definitely the most popular of the ones that require you to omit semicolons.

Beyond that, there are no advantages. It's just a decent eslint config that requires you to omit semicolons wherever possible. If that's important to you, use it. If it's not important, or you'd rather not omit semicolons, or if you _do_ want to omit semicolons but you're happy making a one line change to the airbnb preset, then there's nothing to set this apart from more, if you'll pardon the expression, "standard" options. :)

[0]: [https://github.com/airbnb/javascript](https://github.com/airbnb/javascript)

<comment><USER14> You can just disable that rule and use the rest of the airbnb preset, which is what I'd recommend. I hate semicolons, and I do a couple of things that I like but airbnb apparently doesn't, so I override those settings on my .eslintrc and use the rest as a great foundation.

<comment><USER13> Exactly.

I think airbnb is a really good base for a project.

</comment></comment></comment></comment><comment><USER15> I thought for a moment that this was a joke, like the one about the vanilla JS tool, long ago, here. That was a good one.

</comment><comment><USER16> How does it compare to Prettier?

<comment><USER10> Prettier is a formatter. It doesn't check for errors, it merely parses JS and enforces a style. It actively corrects any style problems that are found.

Standard is a linter (ESLint) configuration and frontend. It doesn't correct errors, just checks for them. It goes beyond style to actually check for logical errors (usage of deprecated APIs, invalid regexps, etc).

In theory, you can run the two together. Ideally, you'd use plain ESLint with a config geared around catching programming errors, and leave Prettier for just styling concerns.

</comment></comment><comment><USER17> StandardJS is like TornadoGuard from xkcd.

[https://xkcd.com/937/](https://xkcd.com/937/)

Very good reviews, but it doesn't achieve the grandiose things it claims to achieve.

While consistent indentation is important, a coding standard is much more than that. I consider this to be an actual standard:

[https://google.github.io/styleguide/jsguide.html](https://google.github.io/styleguide/jsguide.html)

For example Python enforces consistent indentation, but you know that there is still a lot of room to create a mess even with those restrictions.

StandardJS was designed to maximize adoption, not to ensure actual quality:

\- Want a 1,000 characters long line of code? StandardJS badge of approval.

\- Want a 10,000 lines of code function? StandardJS badge of approval.

\- Want a function with a cyclomatic complexity of 10,000? StandardJS badge of approval.

Those are very basic measures of code quality and StandardJS does not have an actual position about them.

Then... StandardJS actually goes against good practices. Omitting semicolons actually has an effect in JavaScript, and there are many examples of that. The Google JavaScript coding standard advises specifically against it for good reasons. Remember that Google created v8, and has a lot more authority in this matter than whoever created StandardJS.

ESLint can enforce a cyclomatic complexity limit, number of statements per function, lines per file, etc.

<comment><USER18> There's a lot of FUD around Automatic Semicolon Insertion for some reason. Basically, the parser inserts a semicolon anywhere where the program is otherwise unparseable but a semicolon would make it syntactically valid. Importantly, this will occur _even if you are otherwise using semicolons,_ so simply saying that you need to manually put the semicolons in doesn't help the situation since the parser may add them for you in places you didn't expect anyway. Leaving them out forces you to know the rules, but you should have known them anyway since otherwise they will bite you at some point.

ESLint provides--and StandardJS uses--the `no-unexpected-multiline` rule, which will insist that you insert semicolons in places where the meaning would otherwise be unexpected. In practice, with `semi` set to never and `no- unexpected-multiline` enabled, I find that I have _never_ had a problem with semicolons that was not caught by the linter. By contrast, when I was afraid of ASI (since "omitting semicolons actually has an effect", eek!) I would find that I'd occasionally have mysterious issues where arrays were interpreted as indexes and so on. (I switched to semicolonless-style at the same time as I started using a linter, so I can't compare the two independently.)

<comment><USER17> There's a lot of FUD around not using a seat belt. Basically, if you are careful to not crash your car, your seat belt should not be necessary. You can die even if using a seat belt.

My standard of car safety relies on that each time you crash your car, a red light will flash telling you that you have crashed your car. It is very effective detecting car crashes, therefore, very safe.

<comment><USER19> Hm. In the case where the ASI inserts a semicolon where you wouldn't have expected one, how do the semicolons you already added where you _would_ expect them help? Using semicolons in JS to avoid problems is like making sure the seatbelt is securely fastened across the seat before you sit down: there's a satisfying click and the worrying light on the dash goes off, but it won't actually protect you in an accident.

</comment></comment></comment></comment><comment><USER20> I used to be on a team that wrote JS this way and I really enjoyed it. Now I'm in a Flow/React/semicolons-and-classses-everywhere type place. I find this style so much more pleasant.

<comment><USER21> It's almost like it doesn't matter unless it's consistent ;)

<comment><USER20> Well, I agree with that and all. But why type (and more importantly, look at) a bunch of semicolons if you don't have to, ya know?

<comment><USER2> Its a good question readers of the English language can also infer punctuation where needed it's not considered good style to make readers infer this there can be some oddness if you are not used to putting punctuation where it belongs naturally garden path sentences can result and some tools can detect ambiguity automatically but why learn some custom rules for that when its straightforward to consistently put periods at the end of sentences

<comment><USER22> Damn, this is clever!

Except that 'punctuation' in JavaScript comes in the form of a line break, and adding a semicolon is like adding two periods to the end of every sentence just in case someone missed the first one.</comment></comment></comment></comment></comment>


Show HN: Sleeping Beauty, a 7-day roguelike game - <AUTHOR> https://ondras.github.io/sleeping-beauty/ <comment><USER2> FYI: A Seven-Day Roguelike (7DRL) is a roguelike created in seven days. That is, the author stopped writing code 168 hours after they started writing code. A 7DRL can be created at any time during the year. However, general agreement was reached that it would be fun to schedule a specific week for a 7DRL Challenge.

[http://7drl.org/about/](http://7drl.org/about/)

P.S. I found Haxe by following some of the 7drl entries. But I think I would like to use Racket to make one one day.

<comment><USER3> > But I think I would like to use Racket to make one one day.

That would be neat. Are there any roguelike engines for scheme? Or would you build it from scratch?

<comment><USER4> What are you looking for from a roguelike engine?

Just display/controls? Or do you want something that'll do the level generation too?

<comment><USER3> Mostly I'm just curious what the shape of the code looks like for a scheme roguelike. What's easy, what's awkward, how easy it is to extend the rules of the world.

I've always loved roguelikes, and I enjoy reading scheme code too. The elegance and organization of really good scheme code can be a revelation!

</comment></comment></comment></comment><comment><USER5> This is really well done! And I particularly like the combat. Filling the field with your attacks _and_ enemy attacks really forces you to decide if you want to risk getting more of your attacks or be forced to take a really big hit yourself. I love the strategy and risk-reward that you provide with this setup.

<comment><AUTHOR> Thanks! I am glad that people find the combat system useful and comprehensible. Some have troubles distinguishing colors, though.

<comment><USER5> Ah yes that will be a problem for some. An easy solution there is to use different glyphs for the different colors as well.

<comment><AUTHOR> True. Unfortunately, my font of choice (Metrickal) only covers basic ASCII. But its glyphs are very neat otherwise :)

<comment><USER6> Since the combat is in a separate playfield, you can reuse glyphs from elsewhere. What about \ / for attacks and ^ v for magic?

</comment></comment></comment></comment></comment><comment><USER7> I keep trying to kiss rats. I think my adventures won't be re-told in epic song.

<comment><USER8> As pavel through the tower strolled

Sword in hand and collecting gold

He fought off hordes of soaring bats

And tried to kiss the fairest rats

\--mandolin solo--

<comment><USER9> "Not amused," the rats said they were

But Pavel would not be deterred

</comment></comment></comment><comment><USER10> Great game.

It could use an explanation of the (+#) modifiers though. For example, does (+#) green just add +1 to your attacks, and (+#) red add +1 to each enemy attack?

I was proudly rocking some (+#) red armor of treachery until I realized that I was probably the one being betrayed.

<comment> vertex-four They cause extra tiles of that type to be generated, according to the message at the start of the game.

<comment><USER10> Oh yeah, that makes sense now. Cool mechanic.

</comment></comment></comment><comment><USER11> This is incredible.

As someone who's wanted to try making something like this for a while but just doesn't know where to begin, can anybody recommend useful resources or suggestions on how to get started?

If it helps, I work mainly in C# and so would prefer that if possible, but this could be a good way to get familiar with a new language.

<comment><AUTHOR> What about [http://www.roguebasin.com/index.php?title=Main_Page](http://www.roguebasin.com/index.php?title=Main_Page) ?

<comment><USER11> Oh, this is super cool: [http://www.roguebasin.com/index.php?title=How_to_Write_a_Rog...](http://www.roguebasin.com/index.php?title=How_to_Write_a_Roguelike_in_15_Steps)

That doesn't get me out of my language/framework paralysis, but otherwise it looks like a decent roadmap.

Thanks mate. Also your game is amazing; thanks for sharing it.

<comment><USER12> I'd assume I'll throw the first one away, so no framework. Just use C# in a console. wasd+ is input. Game loop is update positions based on input, convert positions to an ascii 2d array, print ascii.

Just those could get you to step 7. Then take stock and decide whether you want to restart the project in a framework or push on.

<comment><USER11> That's probably a good idea. I've never built anything remotely "gamelike" in a console so maybe that's what I'm finding intimidating.

I imagine I just need to dive in and figure it out rather than stalling and posturing. Thanks.

</comment></comment></comment></comment></comment><comment><USER13> Checked out odras's other github projects and found this Star Wars one really neat too:

[http://ondras.github.io/star-wars/](http://ondras.github.io/star-wars/)

Great work!

</comment><comment><USER14> The first tower/game I started into had a room with no exit. At first I thought it was just a very nihilist game with no progress. I started a new game and that was better

<comment><USER15> Same happened to me, I guess there's bug in level generation.

<comment><USER16> In some roguelikes, it could mean that there's a hidden door there, but I guess not here?

</comment></comment></comment><comment><USER17> Solid little game. I wish going through the bramble passages would be worth it (i.e. secrets?). Also I was hoping that at the end I could kiss the princess and the folks there would become hostile if I did.

[http://i.imgur.com/gTx9oXe.png](http://i.imgur.com/gTx9oXe.png)

<comment><USER7> After one of them told me "no kissing", I tried kissing him. He was not amused, but that was the extent of his reaction.

</comment></comment><comment><USER18> Really well done! The combat is really unique and brings something fresh to otherwise walking-into-enemies to kill them.

</comment><comment><USER19> I'm colorblind and am having a hard time with the "you attack" vs "enemy attacks (magic)" color choice.

Outside of that, I'm digging this.

<comment><USER20> I agree, the yellow/green/red is rather difficult to distinguish. Aside from altering the colors, it could also use different symbols. In general, it's good to have multiple distinguishing qualities (e.g. color, shape, texture). This helps make things more distinct for all users, not just those who might be colorblind.

<comment><AUTHOR> Agreed. The overal design direction (have those glyphs "#" as it resembles thorns for a Game of Thorns inside a tower filled with brambles) won over usability in certain cases.

If this was a full-blown game (and not a 7-day proof of concept), I would try to make the combat UI more robust.

<comment><USER20> Huh. I didn't see any relationship between the "#" characters and the game theme. The combat mini game stuck out to me anyway, as an abstract puzzle game in the middle of a hack-and-slash adventure game.

Still, if you are set on using #, you could try varying size, boldness, italic, rotation, font, etc.

</comment></comment></comment></comment><comment><USER21> I like it! One annoying thing I noticed is that if you kill something while it's in a doorway, you won't get any loot from it. Maybe things could stack on open doors?

<comment><USER22> I killed a spider, which dropped a coin, then a bat moved onto the same spot, I dispatched it, but only got the one coin for my efforts :(

</comment></comment><comment><USER23> Using ⌘ + Arrow is problematic in the case of the left arrow. You should catch/swallow that.

That is, on Chrome/Mac. It'll navigate you back to the previous page.

<comment><AUTHOR> Right. [https://github.com/ondras/sleeping- beauty/issues/1](https://github.com/ondras/sleeping-beauty/issues/1)

</comment></comment><comment><USER24> Finished it! :) [https://scontent.xx.fbcdn.net/v/t35.0-0/p480x480/17237216_10...](https://scontent.xx.fbcdn.net/v/t35.0-0/p480x480/17237216_10208180417485886_879931460_o.png?_nc_ad=z-m&oh=948d60ad7fc9453259a4aa2d8ce68a76&oe=58C579D4)

</comment><comment><USER25> This is superb except for one small thing at the end; thank you so much for doing it in a browser window! Especially loving the connection between abstract resource management in combat and choice of weapons/armor.

As others have pointed out:

\- It's hard to distinguish / remember the colors in Game of Thorns. (Pro tip: disable anything like f.lux that might drop out the blue values at some times of day.)

\- Hitting command-left went back in browser history, and when I went forward my game status was gone.

\- There really ought to be a way to annoy one of those knights at the end into combat, so you can clear the way to kiss the princess. Having that Kiss menu option for every single encounter but never actually being able to use it was the only thing wrong here.

</comment><comment><USER26> I love the combat (especially the enter-combat animation). Awesome job!

</comment><comment> d--b Damn, I didn't figure out how to get to that P that's obstructed by pilars and other adventurers, and I've tried kissing everyone many times!

<comment><AUTHOR> Right, there is a line. The game is over, no more content :)

<comment><USER27> I did wonder if that line of text was a red herring. Maybe you should let us kiss the princess and win?

</comment></comment></comment><comment><USER28> Game play and environment are really well executed!

</comment><comment><USER29> Add beforeunload event handler to prevent accidentally closing the window mid game.

[https://developer.mozilla.org/en- US/docs/Web/Events/beforeun...](https://developer.mozilla.org/en- US/docs/Web/Events/beforeunload)

</comment><comment><USER30> It looks possible to have rooms generated that are impossible to exit. For example, I'm up to L3, and can't get out of the room with the stairwell. And on L2 part of the map is cut off from a similar map defect. Is that intentional?

<comment><AUTHOR> No, all rooms shall be accessible. If not, it is a bug :/

</comment></comment><comment><USER31> I've had a few doors spawn along walls with seemingly no purpose..or is there? Bug/never got around to anti-door-logic-placement in 7days?

Anyways, great game and well done. Shared with all my friends!

<comment><AUTHOR> Never got around, right. _Most_ of the levels/rooms are okay-ish with respect to doors. What would you expect of a ruined tower hundreds of years old, filled with brambles and fallen plaster...

</comment></comment><comment><USER32> On the 5th floor or so.

There probably needs to be a game clock (the usually implementation is hunger or enemies spawning).

Otherwise you can just go in a room and walk around till your back to full health.

I assume the author knows this.

<comment><AUTHOR> Yeah, the author is aware. The game is rather easy.

HP regen was added as a fast&hacky way to make the game less difficult (non- regen versions were hard to beat).

(Also, you can F12 your JS console and hack the game's internals to your likings, adjusting your HP as necessary.)

For a non-PoC game, this would need to be more balanced.

</comment></comment><comment><USER33> Nice controls and looks interesting. Will have to bookmark it. Almost makes me want to re-download Dwarf Fortress. Anyone know if the adventure mode has improved much lately?

</comment><comment><USER34> It appears that there should be a way to move at an angle? I might have missed it. There are hallways that look like they lead somewhere, but can't move down them.

Any hints about them?

<comment><USER35> standard rogue/nethack movement keys work: y/u/n/b go diagonally.

</comment></comment><comment><USER36> This is delightful. I've got a flight coming up, does anyone know if there is a keyboard overlay that could be used to play it on a mobile?

<comment><AUTHOR> No, mobile devices are not supported, due to lack of time :(

</comment></comment><comment><USER37> Is there a rogue like framework where you can just build the maps / text / etc? Kind of like never winter nights for rogue

<comment><USER38> Wouldn't that defeat the "procedural level generation" feature that roguelikes are known for?

</comment></comment><comment><USER32> I'm on the 4th floor but can't seem to go up the stairs to the 5th floor?

 _A staircase leading up is here._

And I press '<' but no go.

<comment><AUTHOR> "Enter" activates a staircase.

<comment><USER32> .... I guess I have so many other rogue like keys in my head. I swore I pressed '<' on previous stairs but I guess I didn't.

</comment></comment></comment><comment><USER39> That was a fun 20 minute distraction!

</comment><comment><USER40> This is awesome! The battle system is original too. Well done...

</comment><comment><USER41> I'm stuck on the third floor. It's just a room without any exits.

<comment><AUTHOR> Sorry for that. Apparently, that can happen from time to time. Re-loading will give you a fresh dungeon, if you have enough patience for that.

<comment><USER41> Sure, played it through a second time and got to the end. :) Great game! You should add more and harder levels.

</comment></comment></comment><comment><USER42> Very fun, thank you :)

</comment><comment><USER43> I like the MUD feel :)

</comment><comment><USER44> wow, better roguelike than I could make in a month

</comment><comment><USER45> Very nice. I wish it had a save game feature.

</comment><comment><USER46> Love it! :D

</comment><comment><USER47> ctrl+left is back in browser :(

<comment><USER38> shift+left works as well.</comment></comment>


Estimating the success of re-identifications in incomplete datasets using models - <AUTHOR> https://www.nature.com/articles/s41467-019-10933-3 <comment><AUTHOR> >the scientists posted their software code online for anyone to use</comment>


Review: Amazon's Fire Phone - <AUTHOR> http://www.nytimes.com/2014/07/24/technology/personaltech/review-amazons-fire-phone.html?hp&action=click&pgtype=Homepage&version=HpSumSmallMediaHigh&module=second-column-region&region=top-news&WT.nav=top-news <comment><USER2> My question remains - why did Amazon go for the high-end price point? Amazon has excelled previously by competing on price. While the Fire Phone is competitively priced to the corresponding iPhone or Galaxy (esp. given the freebies), it simply doesn't make up for the lack of Google Play or iOS AppStore. And chained to AT&T?

Perhaps this is Amazon's stalking horse into the phone market.

<comment><USER3> From afar it seems like the US market can't handle phones that cost less than $600, so pricing at less than that has basically no effect on what the average consumer pays.

<comment><USER4> In the US most people[1,2] get their phones on contract, and a $600 subsidy is standard. If you plan to mostly forgo the prepaid market then US customers are cost insensitive, and pricing a phone at less than $600 is giving money away to the carriers. Similarly if a customer plans to stick with Verizon, Sprint or AT&T then they are throwing away money if they don't use the "free" upgrade on an expensive phone every chance they get.

My father-in-law recently realized that he had paid Verizon about $1200 extra for his Samsung Alias 2, and promptly switched carriers to one where you start saving money after 2 years.

[1]about 75M prepaid [http://money.usnews.com/money/personal- finance/articles/2013...](http://money.usnews.com/money/personal- finance/articles/2013/09/16/the-rise-of-no-contract-cellphones)

[2] out of 327M total [http://en.wikipedia.org/wiki/List_of_countries_by_number_of_...](http://en.wikipedia.org/wiki/List_of_countries_by_number_of_mobile_phones_in_use)

<comment><USER5> Getting us to call these usurious loans "subsidies" is probably the most ingenious bit of underhanded marketing the cell carriers ever concocted.

I think you should generally be suspicious when a vendor tries to get you, the customer, to use the vendor's own internal jargon. As a customer, I shouldn't need to know your jargon; I don't give a shit about your internal policies and terms. If you're encouraging me to speak your unnatural language, you're probably trying to give me a false sense of security and savvy that makes it easier to pick my pocket.

One sees similar moves in many complicated transactions like real estate, automobile leases and purchases, etc.

<comment><USER6> "usurious loans"

Beyond the correct analysis of marketing-speak the market looks like contract phones are basically a "worse than payday loan" interest rate of a couple hundred bucks and couple year payback period. So you get a $500 phone at a cost of maybe $2000 over the course of the loan. The MVNO resellers mostly seem to go prepay, I know I paid $300 for my phone some time ago, but I only pay $22 per month for voice and psuedo-unlimited data so I'm pretty happy.

It is interesting that Amazon is kinda in between, kinda a subprime loan seller and kinda a phone service reseller, probably for financial reasons.

Amazon does seem to be financializing itself, they do push their credit card every time I buy. It is no great modification to drift sideways into phone loans.

In the long run I expect to see them continue to financialize themselves into perhaps subprime car loans (outright buy Car Max or a competitor?) and eventually home equity loans (to buy more stuff at Amazon) or home loans (complete with prime membership to help fill your house with trinkets from china)

So it makes sense as a grand strategy thing to move away from Amazon the book retailer and into Amazon the bank. Nobody in America can make a living doing anything but FIRE sector in the long run by intentional regulation, so they kinda have to do this.

<comment><USER7> What carrier is your $22 pseudo-unlimited data though? I'm looking at some alternatives and T-Mobile's $30 unlimited seems like a decent bet. But $22 for pseudo-unlimited would still be a step up from AT&T's 300 MB plan that I'm on.

<comment><USER8> I pay $25 a month for actually unlimited data and text and talk. Republic Wireless can afford to do this because they are a wifi first provider meaning that when I make calls at home or at work it goes over wifi costing them nothing.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> Mayday is truly a new level of customer service, and makes the phone a great choice for those who might struggle with new technology -- like the remaining population without a smartphone.

<comment><USER10> If that's the target market - wouldn't a lower price point make more sense?

<comment><USER11> People who don't yet have a smartphone have many reasons besides cost. Older people who are reluctant to move from a true phone to a multimodal pocket computer may be very happy with paying for one that has instant customer support.

</comment></comment></comment><comment><USER12> I got one of the original Kindle Fire tablets. It's not bad, but without all the Google stuff: gmail, maps, etc... it's just not as useful as my Nexus tablet.

<comment><USER13> No good maps is a reason not get this phone for me.

<comment><USER14> As someone with more than a passing familiarity with geospatial, I was excited when Amazon announced their intention to work on their own maps product. IIRC, it was to be OSM-backed, and presumably integrated into their AWS offerings. I could see Amazon eventually creating a decent competitor to Google / Bing / Apple. But then on the other hand, Google > Bing > Apple.

<comment><USER15> Most people who are not in this field don't understand this but the reason most new smartphones will fail is simply because there is simply no quality options for maps available on those phones. Maps and local search is #2 or #3 most important thing on smartphones depending on which data you look at. If Google ever wants to kill iPhone, all they have to do is pull the plug on Google Maps app and slowly but steady users will floac off.

Unfortunately building high quality modern maps and local search that works world wide (or even just US for that matter) is _extremely_ hard. Sure, you can buy data from NavTeq, InfoUSA and likes but what you will get in return is equivalent of MapQuest quality circa 2000. If you really want to build something that is at Google or even Bing level, you will need far more data, world class geocoding, rendering, partnerships from Yelp and likes, mining images and things like open hours from web, freshness to make sure you don't have closed businesses, huge staff to constantly fix and curate tail end, high performance tool set, huge serve infrastructure and so on.

And that's just for the start. To actually compete with Google or Bing maps you then need all other bells and whistles such as transit maps, walking directions, elevation profiles, building polygons, bird eye view, street views, information on construction, 95+% accurate turn-by-turn navigation among many other minor details that you completely take for granted.

To accomplish this level of features and quality, you will need staff that easily can could in couple of thousands and ability recruit the top talent in many fields including maping, cartography, rendering, indexing, distributed computing, machine learning, computer vision and so on. Even if you do get managed to accumulate this talent, it will still take multiple years to boot up and by that time your competition is already has moved on to next level.

<comment><USER14> I think you're completely right. For me, maps is absolutely the most important feature of my phone, followed by texting, then web, then voice. Bing isn't a bad runner-up to Google in a lot of ways, but it is clearly still a runner up. That last quality hurdle requires a lot of foot soldiers on the ground collecting data. Google has such a small army. Microsoft doesn't--at least not at the scale Google does. Apple's release was a facepalm for several reasons, not least of which was their omission of public transit routing. As an urban planner, I was incensed enough to drop IOS as my last phone upgrade in favor of Android.

Moreover, I would have liked for Apple to double down on open map data by creating the software and supporting infrastructure to collect geospatial data from all those portable, network-connected sensors they keep selling. I'd have put up with an inferior Apple map product if I could rationalize it in terms of them helping build OSM up.

</comment></comment></comment></comment></comment><comment><USER16> Very good review, though I would only argue on one point. The author says it's unfortunate that Amazon heavily promoted the phone's most "out-there" features, while it really excels on usability and friendliness to the user. For me, this is easy to understand: the technical crowd that went to Bezo's presentation would be very disapointed if the phone's biggest feature was a customer support system.

The fact is: this phone is really not for us, the tech-savvy hackernews reading crowd. To the best of my knowledge, this is one of the first biggest tech introduction that only has real value to the "regular" folks that came out of the silicon valley culture (ok, ok, Amazon is not a silicon valley company, but it's as if it were). If I'm wrong and there are products aimed _mainly_ at "regular non-tech folks" that came out of sillicon valley, please correct me.

I am really curious as to how this will unfold. As I see it, most of sillicon valley innovations followed the normal adoption curve: go for the innovators, then expand your market until you hit critical mass. Some were slower (Dropbox), some faster (IPhone), but they all had a very big feature aimed at the tech savvy as well. This is why I think Firefly may be a good thing, it's the bait for the tech people to adopt it and then, hopefuly, it will trickle down to the moms and pops out there. Honestly, then, I think of it mainly as a curiosity than something I would spend $600 bucks to have.

<comment><USER17> I agree that this phone is for the average person, it is also a V1. One advantage that Amazon has over the competitors is their abilities to directly market to the millions of users they have on Amazon.com daily. Think about how successful the kindle became, purely being sold on Amazon.com and being the first thing you saw whenever you went to the homepage. Now the first thing I see when I load Amazon is an ad for the phone... [http://cl.ly/image/3i0c3f0C1f1u/Image%202014-07-23%20at%209....](http://cl.ly/image/3i0c3f0C1f1u/Image%202014-07-23%20at%209.45.57%20AM.png)

</comment></comment><comment><USER18> The ArsTechnica review is far superior: [http://arstechnica.com/gadgets/2014/07/review-amazons- fire-p...](http://arstechnica.com/gadgets/2014/07/review-amazons-fire-phone- offers-new-gimmicks-old-platform-growing-pains).

The bottom line:

> But the bigger question for most people isn't going to be "does this phone > do anything useful"; it's "should I buy this phone rather than some other > competing phone?" For the time being, the answer is no.

</comment><comment><USER19> Amazon pretty much nailed the first iteration of the Fire Phone as much as they could for v1. It got the price point, features, and quality right.

It would be really easy for them to just hire LG or HTC to make an existing phone with an Amazon logo and call it a day, but they took their time to make their own thing.

Smart.

<comment><USER20> judging from the overwhelmingly negative reaction to its price point, the evidence strongly suggests they got the price point wrong. at least until sales can be the final judge.

this is how their value proposition sounds to ME: I have less functionality than other phones, so I'm easier to use, but you still have to pay just as much for me as all the other more well endowed phones. but dont worry, theres some things i offer that you don't care about that actually makes me a small bit cheaper

however, I am certainly not like most other smart phone users. i will say this, people tend to not want to pay for customer service. someone who is intimidated by smart phones doesnt want someone easily available to tell them how to use it, they just want it to be easy to use.

<comment><USER19> If they priced it cheap, there isn't much benefit to them. At $400, it becomes a "free" phone, which means it's less valuable and not comparable to iPhone or Galaxy S.

Most people they are selling to don't buy their phone for real price, so what you're really talking about is up to $200 difference. If they priced it less than $400, they'd lose money in the subsidy and AT&T basically would make money on the deal.

At the end of the day the consumer isn't going to see it as a super expensive smartphone. They're going to see it as costing the same as the iPhone or Galaxy S.

Nobody says the iPhone or Galaxy S are too expensive.

<comment><USER21> Lots of people say the iPhone 5s or Galaxy S5 are too expensive, especially those people who want to upgrade mid-term, or who accidentally broke their device, or who are buying for children or others. Or who want a less expensive plan.

And as carriers start to prioritize or even promote bring-your-own plans (and make the actual cost more obvious), I suspect we're going to see a greatly increasing interest in lower cost devices. This is already happening as we move from smartphones being some sort of status symbol, to being tools.

There is a kind of disconcerting elitism that appears in many discussions about smartphones and the smartphone market - one where we all need to pretend that money is no object, and we're all super rich and careless with our money (two traits, as an aside, that are usually in absolute competition with each other). Reality doesn't mirror that at all. Indeed, it's in stark contrast with the release of this very phone which has overwhelmingly been met with criticism that it is far too expensive (many thought it would be $0 on a standard plan, or even on a reduced rate plan).

</comment></comment></comment></comment><comment><USER6> "The interface constantly sorts your apps according to how recently you've used them. This let me navigate my phone very efficiently, often saving me from getting lost in a sea of apps"

How does this work as a UI? I'm not a UI guy but I know a bad fad when I see one. Superficially, a big scrollable 2-d grid in alphabetical order makes life pretty easy as long as marketing doesn't rename apps too often. A random 1-d line sounds really hard to use.

As a use case example, I'm about to press the "add comment" button thats always aligned with the left and bottom edge of this bright background textbox, its very easy to find, repeatable (which is comforting and convenient) and fairly intuitive. Yet if you took every window decoration widget on my entire desktop and put them on a rotating ribbon in random order, it would probably take 5 minutes, every time I interact with it, to find and click "add comment".

I've seen this fad UI trend on other mobile apps, I find it a huge PITA and impediment to my enjoyment of the afflicted apps. 5 seconds of "oh hey, cool, flicks finger" followed by an eternity of "this sucks"

</comment><comment><USER22> >I called up Mayday four times to pepper its agents with questions. In every case, a person popped up on the screen in under 10 seconds.

So a personal assistant just for your phone. That sounds like a fantastic feature. Is it something that can be sustained long term though without paying for it specifically?

I guess that question applies to Amazon generally too though, so I guess the answer is "I guess we will see."

<comment><USER23> It's been around on their Fire tablets since September 2013.

</comment></comment><comment><USER24> Something tells me that Dynamic Perspective, as implemented on the Fire phone, might not have been an entirely awful experience to implement. A couple of points:

* Amazon isn't known for wasting time or money. They wouldn't have delayed the release of their first-ever phone for an expensive gimmick. Sticking a cheap gimmick on within time requirements is doable.

* 3D rendering is, well, a solved problem. Accelerometers have been incorporated into phone UIs for more than five years. Even facial detection is in most modern digital cameras. Tying these things together doesn't require sending a whole lot of information back and forth -- you just update a couple of vectors representing estimates of phone location and head location.

I wouldn't be too surprised, given Amazon's track record, to find that Dynamic Perspective started as kind of a "why not?". If people can make cool things out of it, they'll keep it: it might be partially a trick to get developers to target the device, and to make interesting things out of it. If not, it won't be missed.

<comment><USER25> >>Even facial detection is in most modern digital cameras. Tying these things together doesn't require sending a whole lot of information back and forth -- you just update a couple of vectors representing estimates of phone location and head location.

The problem is, that it's just not good enough. Even the Kinect 2, which from a developers perspective is a fantastic tool and I have never seen anything as good as it when it comes to full body tracking, it also sometimes messes up. And as a customer, I don't want gadgets in my phone that work 90% of the time. If I want to use the Dynamic Perspective and it works 9/10 times, it's just not good enough - I would rather turn it off.

</comment></comment><comment><USER26> It may be a problem for Amazon that they lack the global presence that their competitors in the phone market have. Amazon is big in the US, UK, Germany and Japan, but not in rest of the world.

<comment><USER8> That is an awfully big portion of the $600 phone market.</comment></comment>


Fair use option added for YouTube takedown notices. - <AUTHOR> http://googlepublicpolicy.blogspot.com/2010/04/content-id-and-fair-use.html

<comment><USER2> at the bottom:

> UPDATE: To clear up confusion, this is not a new feature. The dispute > process has been in place since Content ID first launched in October 2007. > We've changed some text to make that clear.

Interesting though, they use the 'downfall' movie as an example.

<comment><USER3> I wonder if this has anything to do with it: [http://www.npr.org/templates/story/story.php?storyId=1262254...](http://www.npr.org/templates/story/story.php?storyId=126225405)

NPR ran a story on YouTube pulling the Downfall parodies and stated the videos were fair use.

</comment></comment><comment><USER4> I wish Google would add more anti-DMCA takedown options like "they're lying".

Showtime claimed copyright violation over a clip I posted from CBS. My only option is to give Showtime my personal information to point out their stupidity.

I'm pretty sure the video falls under fair use since it was a 59 second clip of a fight breaking out on public television (possibly a crime).</comment>


Show HN: SucheBilder – Find a perfect photo for your work - <AUTHOR> https://marcionitao.github.io/SucheBilder/ <comment><USER2> I searched for "Wu-Tang" and got nothing back, so either it is taking a long time, found no results, or knows not to fuck with Wu-Tang. Either way, should provide some feedback so the user isn't left in the dark.

</comment><comment><USER3> I typed "cat" and the top result was a cloud looking like a percent sign.

I'm not sure whether that was intentional, or what this is supposed to do.

<comment><USER4> Maybe its abstract art

</comment></comment><comment><USER5> Searched for "generator", got: [https://pixabay.com/get/eb31b50d2df2043ed95c4518b7494f90e374...](https://pixabay.com/get/eb31b50d2df2043ed95c4518b7494f90e374e1dd04b014409df1c07ca2ecb1_640.jpg)

Needs a bit more work ;-)

</comment><comment><USER6> Looks like it adds never ending scroll to Pixabay.com

</comment><comment><USER7> "tiger" \-- yup, tigers. "dog" \-- more pictures of tigers. "friday" \-- more tigers, plus a housecat.

Verdict: needs more work.</comment>


Google WiFi Beats Eero, Luma - <AUTHOR> https://blog.google/products/google-wifi/putting-google-wifi-test/ <comment><USER2> I'm curious to know if this was done after the new eero update that was just pushed out.

Supposedly it doubled the transfer rated in mesh network s.

There's also Ubiquiti to calculate in at they can do mesh networking as well.

More data!</comment>