HNHacker News
TopNewBestAskShowJobs

foob

4,793 karma · joined February 14, 2011

I'm the CAIO at TenantBase (https://tenantbase.com) and a co-founder of Intoli (https://intoli.com). Feel free to get in touch at evan@sangaline.com if you would like to chat.

my public key: https://keybase.io/sangaline my proof: https://keybase.io/sangaline/sigs/uKMqGQ_auE6z2qTdrkpZihnoA-DcJ4BeHb35KLA1KZI

submissionscomments
foob··on Four New Names Officially Added to the Periodic Table of Elements
Your forgot Nihonium after Japan :-).

It's fairly common for them to be named after places (often where they were discovered). Some other examples are Americium, Berkelium, Californium, Darmstadtium, Dubnium, Europium, Francium, and Germanium.

foob··on Donald Trump Is Elected President
One of the most notable things about this election has been how strongly disliked the two main candidates were. They famously have the lowest favorability ratings of any candidates in recent history. Putting aside any corruption and favoritism from within the parties for a minute, it seems like the primary system really sets the parties up to elect poor general election candidates.

For example, take a look at the states where Clinton performed best in the primaries. They're Mississippi, Alabama, South Carolina, Georgia, Louisiana, Arkansas, and Texas. All of these states were decisive victories for Trump in the general election and from a perspective purely of wanting to win, it doesn't make sense for them to be so important in the primaries. At the same time, Bernie won a number of states in the primary that ended up being important swing states (e.g Michigan, Wisconsin, New Hampshire, Maine, Minnesota, Colorado). From a strategic standpoint, it would seem to make sense to attach a higher weigh to those victories (the same is also true for Florida, Ohio, and some other states where he lost).

None of this necessarily means that Bernie would have won, I just think that it seems as though the primary process is not very well designed for choosing the best general election candidates. This is even more true if you consider what a large proportion of states have closed primaries that specifically exclude independents. It seems obvious that they will be far less likely to vote along party lines in a general election but, in many states, they're given no say in the primary process. I can understand why the DNC can't just say, "sorry, but the deep south doesn't count and neither does New York or California," but opening up the primaries seems like a perfectly reasonable strategy to put forward stronger general election candidates.

I don't really have a broader point beyond that, it just seems like the parties really set themselves up to produce such, to put it gently, sub-optimal candidates.

foob··on Realistic alternatives to Apple computers
If you're considering upgrading then you might want to ask yourself whether you really need a laptop instead of a desktop. If you work from home and currently have a laptop that you can use while traveling (or for miscellaneous web browsing, media, etc) then a desktop might actually be a better fit.

I recently started feeling like it might be time to upgrade my 1st gen Carbon X1 and after doing some research I found myself really disappointed by how little the laptop landscape has changed over the last four or five years. After giving it some thought though, I realized that I do virtually all of my work at one desk anyway and decided to look into some desktop options. I found that you can put together something in a mini-case with an i7 processor, 64 GB of DDR4 RAM, 2 TB of SSD, a 28" 4k monitor, a mechanical keyboard, and a high quality mouse for less than about $2k dollars.

This made a lot more sense to me than spending a similar amount on a laptop that offers only marginal improvements over my current one. The obvious trade-off is portability but I would guess that most of us here already have laptops that are "good enough" for most purposes and which could still be used as necessary.

foob··on The world’s knowledge is being buried in a salt mine
I personally agree with you but this is how they attempt to address that point on their website:

> The token shows the location in such a way that a future civilization will be able to interpret its correct meaning. This will require a technical and scientific understanding which is comparable to our own. This is the guarantee that the archive is suitably protected from premature access. Only a civilization which fulfils these requirements will be able to find the archive as well as being able to process, decipher and comprehend its content. The depiction on the token: Two intersecting lines span a map of Europe.

foob··on Image unshredder by simulated annealing (2015)
There's really no way to preferentially differentiate between the image being flipped one way or the other once the one pixel wide columns have been shuffled. The order of the first pair that you put together determines which orientation you end up with and this is totally arbitrary. The reason that it flips sometimes is because the shuffling of the columns is random and the order of the initial pair of seed columns depends on their original order in the shuffled image.
foob··on Image unshredder by simulated annealing (2015)
First off, thanks a lot for posting this and you did a great job with it! It was fun to play around with and it obviously inspired me enough to dig into the code and try my own variation.

You're right about them not matching exactly; I did it in a hurry and wasn't looking closely enough. I removed that incorrect statement (though it does seem to generally outperform the simulated annealing).

The tie breaking for pairs with equal differences and the parity of the image is essentially random. It is deterministic in the code, because it won't replace a candidate unless it's strictly better, but it's totally arbitrary which is found first.

foob··on Image unshredder by simulated annealing (2015)
This is a fun demo but, as others have mentioned, simulated annealing really isn't necessary, or even that appropriate, for this specific problem. I threw together the same demo with a very trivial algorithm that I think does a more accurate job of reconstructing the same images in significantly less time than the simulated annealing [1]. The algorithm consists of first finding the closest matching pair of pixels as a seed. It then finds the remaining column that most closely matches one of the current edges and adds it to the reconstructed columns. This then repeats until there are no remaining columns.

On a different note, if this quote:

> The unscrambling problem being solved here is much harder than a typical unscrambling problem, because we are rearranging single columns of pixels.

is referring to reconstructing shredded strips of paper then it is laughably false. The single columns of pixels are extremely clean and correspond very, very closely to their neighboring columns. In reality, the tearing of the paper makes the edges not match very well and it's just much noisier in general. I've worked on this problem before and it's many orders of magnitude more challenging than the reconstruction that is done in this demo.

[1] http://sangaline.com/blog/image_unshredder/

foob··on Vim Anti-Patterns
These are all good tips but most of the anti-patterns seem to skew towards beginners (e.g. don't use the arrow keys, don't navigate in insert mode). One that I think is more common among intermediate, and even advanced, users is the misuse of tabs, windows, and buffers.

A lot of people have a tendency to think of each tab as corresponding to a single open file. This is very understandable because it closely matches the paradigm of most IDEs but it's actually an anti-pattern in VIM. Tabs are really meant to be more like workspaces where you arrange multiple windows into a desired layouts. You then have one buffer for each file that you're dealing with and view them in your windows. It's perfectly fine for multiple windows to share a single buffer or to switch out the buffer that is being viewed in any given window. This StackOverflow answer [1] and this blogpost [2] both go into a fair bit more detail.

If you're trying out this approach for the first time then you probably want to add `set hidden` to your configuration in order to avoid automatically closing buffers that aren't currently being viewed in a window. Coupling this approach with fzf.vim [3] makes managing very large numbers of files a breeze compared to using one tab per file.

[1] - http://stackoverflow.com/a/26710166

[2] - http://joshldavis.com/2014/04/05/vim-tab-madness-buffers-vs-...

[3] - https://github.com/junegunn/fzf.vim

foob··on UnGoogled Chromium: Chromium with enhanced privacy, control and transparency
Firefox's extension system was powerful but there was next to no chance that XUL based UI was ever going to be adopted in the other major browsers. I'm sure that tapping in to the Chrome extension ecosystem was a big factor in the decision but I would argue that the Chrome extension API was also a far better suited candidate for cross browser standardization.
foob··on UnGoogled Chromium: Chromium with enhanced privacy, control and transparency
Slightly tangential, but on the topic of browser extensions: the Chrome extension API served as the basis for Mozilla's somewhat recent Web Extension API [0]. Many, if not most, Chrome extensions can run in Firefox out of the box right now (there's even a Firefox extension that lets you install these from the Chrome Store [1]). This has been an incredible development for anybody doing cross browser extension development (which has otherwise been a fair bit more complicated than simply including "CSS prefixes besides -webkit").

Having different browsers compete on things like this and then having the better technology become standardized and implemented in multiple browsers seems like a fairly positive outcome.

[0] https://wiki.mozilla.org/WebExtensions

[1] https://addons.mozilla.org/en-US/firefox/addon/chrome-store-...

foob··on Show HN: A flask app to make dashboards, easily
You would typically use something like nginx as a proxy, in conjunction with uwsgi for managing a number of workers, and then offload slow operations to a task queue via redis or something similar. Caching obviously helps if it's applicable and it's also easy to expand to multiple servers with a load balancer. Websockets are a little bit more complicated but definitely possible.

As a side note, the synchronous request processing is more a consequence of Python rather than flask itself. I've personally found that I build more scalable things in Python, compared to something like node, because it lends itself to scalable architecture decisions. You can do a lot of things in node that are super convenient when you have a single server but that require major changes when you expand.

foob··on Visual Studio Code 1.5
For neovim users, you can get something almost comparable with deoplete [1], tern_for_vim [2], and ternjs-deoplete [3]. I set this up recently and have been very happy with the results. This also supports ES6 and JSX in case you use either of those.

[1] https://github.com/Shougo/deoplete.nvim

[2] https://github.com/ternjs/tern_for_vim

[3] https://github.com/carlitux/deoplete-ternjs

foob··on Insomnia 3.0 – A simple and beautiful REST API client
A lot of people here have been mentioning Postman but my personal go-to has been Advanced Rest Client [1]. It's open source, has Google Drive integration, and seems to have a pretty impressive development rate. For me, it's a definite plus that there isn't a paid tier so the developers don't have any incentive to limit the free product. That said, Insomnia looks like a nice contender and I look forward to giving it a shot. The reuse of variables across requests and the automatic generation of boilerplate request code both look like really nice features that ARC lacks!

[1] https://advancedrestclient.com/

foob··on Design and Implementation of Probabilistic Programming Languages
It seems like sampling based inference approaches are the most common. Could you possibly comment on the current state of the art regarding more analytical approaches? I sometimes deal with problems where it's possible to find closed form solutions but they're very painstaking to find by hand and can be extremely complicated. It would be incredible if a PPL compiler were able to do this grunt work and then produce code that could compute desired quantities directly.
foob··on NPR Website to Get Rid of Comments
It's interesting to see that real name policies can actually make trolls behave more aggressively. On the other side of the spectrum, I anecdotally find that they actually prevent me from posting constructive things. I frequently refrain from leaving reviews for restaurants and stores on Google because I don't want them associated with my real name. It's not that I would otherwise be leaving low quality or bitter reviews, I'm just not particularly interested in anybody who knows my name having access to information about where I shop, what I eat, etc (even though I would be happy to share this information anonymously to help other people make informed decisions). I feel similarly about commenting on news articles, blogs, and apps that I use. It wouldn't surprise me if this was a significant factor in how real name policies affect overall comment quality.
foob··on Feynman’s Derivation of the Schrödinger Equation
I personally think that Shankar makes a great companion to Sakurai. Shankar is less rigorous but it explains things in a more accessible way which can be extremely helpful if you find Sakurai too terse on some topics.
foob··on Show HN: Treys – Like solitaire, but fun
Ads and analytics. We're considering adding a paid ad free version that won't need access to the internet. Also, the current version will just skip the ads if you don't have a connection.

By the way, are you on Android? It lists the permission in such a way that it makes it sound like we're looking at all of the local wifi network names (which we absolutely aren't!). I wish the permissions were more granular.

foob··on Show HN: Rentolize – Become your own property manager
You could also do a three month free trial or something of that effect. That would let people get a feel for the full offerings and if they think it's worth it then they'll likely end up being customers for a long time.
foob··on Amazon Sues Fake Reviewers on Fiverr
Are the referral links really necessary in this context? The fact that you don't even mention the CD names makes this feel like click bait for Amazon referrals.
foob··on Firefox 41 can screenshot a single DOM element
This is an awesome feature, I love how browser dev tools have been continuously improving in recent years. Taking screenshots of DOM elements has been something I've dedicated a lot of time to recently. Most of the extensions available for doing this rely on taking a screenshot of the available viewport so in order to capture larger DOM elements they need to scroll around taking repeated screenshots (which can be kind of frustrating if it takes a long time).

We just launched a browser extension [0] for taking screenshots of Facebook posts and we were basically tasked with accomplishing the same thing. We approached it by fetching all of the external resources and inlining them as data URIs, wrapping the HTML in an SVG element, drawing the SVG to a canvas, and finally extracting the data URI for the canvas. It works really well and eliminates the jitter/delay associated with scrolling around to capture multiple screenshots.

Good thing we also automate the anonymization of private information or this announcement might have obsoleted us on Firefox :-).

[0] http://threadshots.com

foob··on Show HN: ThreadShots.com, share anonymized Facebook posts with a single click
It does redact names linked within comments. It even redacts names in the comments that aren't links as long as they belong to people who posted in the thread.
foob··on Creating Cel Animations with SVG
I wrote a little utility called svganimator [0] which is relevant to this. If you're just in a hurry to get something going it can be used to combine a set of static SVG files into one animated SVG file in the same way that you might combine images to create a GIF. It also has an experimental mode where it tries to smoothly interpolate between frames and store things more efficiently. This tends to work really well if you're using programmatically generated SVG files. We used it to generate all of the animations for our article on Swype Optimization [1] and people sent us a lot of positive feedback on them!

[0] https://github.com/sangaline/svganimator

[1] http://sangaline.com/blog/optimizing_for_swype/

foob··on Show HN: ThreadShots.com, share anonymized Facebook posts with a single click
Hi, one of the creators here!

You might also like to check out an example of the image pages that people share [0]. We're really looking forward to getting some feedback from HN and are happy to answer any questions that you might have.

[0] http://threadshots.com/ts/84Ih6

foob··on Python 3.5.0
In most cases, yes. There are libraries that you might want to use that don't support it yet but the vast majority do. Personally, I'm anxiously waiting for Fabric 2 which has been pending for a long time. This is a good resource for figuring out whether the libraries you need are ready: http://py3readiness.org
foob··on YC Fellowship
Hi Kat, we're very excited to hear about this and we look forward to applying. The FAQ for the normal YC program says that it's fine for the cofounders to submit separate applications focusing on different ideas. Does that apply for the fellowship as well?
foob··on Finding an Optimal Keyboard Layout for Swype
I'm perfectly willing to make people learn all sorts of new things :-). We focused on optimizing over the permutations of the key labels in this analysis but we designed dodona [1] to be much more flexible. To demonstrate this, I just threw together a quick little notebook [2] evaluating the average distance traveled for FITALY. As you'd expect, it's much shorter than what we find using a random configuration. We'd love it if people used dodona to explore things more creative than permuting keys.

[1] https://github.com/sangaline/dodona/

[2] http://sangaline.com/blog/optimizing_for_swype/FITALY.html

foob··on Finding an Optimal Keyboard Layout for Swype
I honestly wrote that entire section just so that I could work that quote in :-)
foob··on Finding an Optimal Keyboard Layout for Swype
Sure, here you go: http://sangaline.com/blog/optimizing_for_swype/img/qwerty.ke...
foob··on A 3D haptic shape using ultrasound that can be seen and felt
Visually, the researchers have demonstrated the ultrasound patterns by directing the device at a thin layer of oil so that the depressions in the surface can be seen as spots when lit by a lamp.

They were probably referring to the oil depressions being visible but the title is certainly misleading.

foob··on A veteran teacher turned coach shadows two students for two days
I'm sure this varies between states but at my school in New York we had nine periods per day rather than nine classes. One of these was taken up by lunch and then science classes would often take up two adjacent periods. Most people also had at least one study hall period which could be used for homework or socializing. In the end, most people were taking six classes or so. You also had the option to take classes at the local college or do independent studies for AP courses that weren't offered if you weren't challenged enough. Nine subjects at once is certainly pushing it for most students but that definitely isn't universal in the US.
← PreviousPage 6 of 9Next →