HNHacker News
TopNewBestAskShowJobs

alexpeattie

84 karma · joined January 24, 2011

submissionscomments
alexpeattie··on Formalizing the proof of PFR in Lean4 using Blueprint: a short tour
The proof text is separate. Currently it's up to humans to ensure the proof text (written in LaTeX) properly matches the Lean proof.

Indeed, you can see in the article that the text of Theorem 7.2 omits for brevity details which are present in the non-pretty printed Lean proof (for example H is non-empty, K is a real number, etc.)

alexpeattie··on Ask HN: Looking for a post from the other day about a ML resumé generator
I believe this is the site:

https://artickl.com/

And here's a post about it: https://www.reddit.com/r/learnmachinelearning/comments/oa7x3...

alexpeattie··on Replicating GPT-2 at Home
The article has moved here: https://bilal2vec.github.io/blog/algpt2/2020/07/17/ALGPT2-pa...
alexpeattie··on Could a Rating System Help Weigh Claims Made in Popular Science Books? (2019)
The Intergovernmental Panel on Climate Change (IPCC) produces impressive summaries for policymakers in which explain alongside every claim the corresponding level of confidence, the quantity of evidence available, and the level of agreement between studies/scientists. For example:

> Risks of global aggregate impacts are moderate for additional warming between 1–2°C, reflecting impacts to both Earth’s biodiversity and the overall global economy (medium confidence). Extensive biodiversity loss with associated loss of ecosystem goods and services results in high risks around 3°C additional warming (high confidence). Aggregate economic damages accelerate with increasing temperature (limited evidence, high agreement), but few quantitative estimates have been completed for additional warming around 3°C or above. [0]

I've always wished more scientific (or pop science) writing followed this approach.

[0]: https://www.ipcc.ch/site/assets/uploads/2018/03/ar5_wgII_spm...

alexpeattie··on Ask HN: Best practices (and examples) for designing client libraries for APIs?
Personally, for building a client library I'd take a look at OpenAPI Generator (https://github.com/openapitools/openapi-generator) or Swagger Codegen (https://github.com/swagger-api/swagger-codegen) - especially if the API provider has an official OpenAPI/Swagger specification. (If not you can always write a specification yourself). Both tools support PHP among other languages.
alexpeattie··on Ask HN: Who is hiring? (September 2017)
Peg | Full Stack Developer | London | ONSITE | fulltime | https://peg.co/hiring | £45k-£55k + equity

We're on a mission to shift $1BN in advertising budgets towards independent content creators, so we're after someone with frontend and backend development skills to help make that happen.

We're looking for a full stack dev with 3+ years of experience building software professionally, but above all we're after people who are excited about building world-class software, getting their hands dirty with tough problems, and constantly learning.

Our stack is Rails 4.2, Angular, a PostgreSQL DB (now quite big, hundreds of millions of rows), Redis/Sidekiq, Gulp for builds - the whole shebang is at https://stackshare.io/peg/peg We recently moved into lovely new offices near Aldgate East, if you'd like to drop in and chat more about the roles, drop me a line: alex@peg.co

PS - We've recently added a fantastic developer to our team thanks to last month's Who is hiring thread :).

alexpeattie··on Ask HN: Who is hiring? (August 2017)
Peg | Full Stack Developer | London | ONSITE | fulltime | https://peg.co/hiring | £35k-£55k + equity

We're on a mission to shift $1BN in advertising budgets towards independent content creators, so we're after someone with frontend and backend development skills to help make that happen.

We're looking for one dev with 1+ years of experience building software professionally, and another with 3+ years; but above all we're after people who are excited about building world-class software, getting their hands dirty with tough problems, and constantly learning.

Our stack is Rails 4.2, Angular, a PostgreSQL DB (now quite big, hundreds of millions of rows), Redis/Sidekiq, Gulp for builds - the whole shebang is at https://stackshare.io/peg/peg We recently moved into lovely new offices near Aldgate East, if you'd like to drop in and chat more about the roles, drop me a line: alex@peg.co

alexpeattie··on Ask HN: Who is hiring? (July 2017)
Peg | Full Stack Developer | London | ONSITE | fulltime | https://peg.co/hiring | £35k-£55k + equity

We're on a mission to shift $1BN in advertising budgets towards independent content creators, so we're after someone with frontend and backend development skills to help make that happen.

We're looking for one dev with 1+ years of experience building software professionally, and another with 3+ years; but above all we're after people who are excited about building world-class software, getting their hands dirty with tough problems, and constantly learning.

Our stack is Rails 4.2, Angular, a PostgreSQL DB (now quite big, hundreds of millions of rows), Redis/Sidekiq, Gulp for builds - the whole shebang is at https://stackshare.io/peg/peg

We recently moved into lovely new offices near Aldgate East, if you'd like to drop in and chat more about the roles, drop me a line: alex@peg.co

alexpeattie··on Ask HN: Who is hiring? (June 2017)
Peg | Full Stack Developer | London | ONSITE | fulltime | https://peg.co/hiring | £35k-£55k + equity

We're on a mission to shift $1BN in advertising budgets towards independent content creators, so we're after someone with frontend and backend development skills to help make that happen.

We're looking for one dev with 1+ years of experience building software professionally, and another with 3+ years; but above all we're after people who are excited about building world-class software, getting their hands dirty with tough problems, and constantly learning.

Our stack is Rails 4.2, Angular, a PostgreSQL DB (now quite big, hundreds of millions of rows), Redis/Sidekiq, Gulp for builds - the whole shebang is at https://stackshare.io/peg/peg

We've just moved into lovely new offices near Aldgate East, if you'd like to drop in and chat more about the roles, drop me a line: alex@peg.co

alexpeattie··on Ask HN: What software engineering related podcasts are you listening to?
It's much more niche-specific than most of the other suggestions, but I've been enjoying This Week in Machine Learning & AI (https://twimlai.com/). It feels like the field of ML is moving so quickly these days, and I think Sam Charrington does a good job of making new research accessible without dumbing things down too much (which I find most media outlets tend to do).
alexpeattie··on Let's Encrypt and Nginx – State of the art secure web deployment
You can create a more hardened setup by using a 4096 bit RSA key:

  /opt/letsencrypt/letsencrypt-auto certonly --rsa-key-size 4096 --server https://acme-v01.api.letsencrypt.org/directory -a webroot --webroot-path=$DIR -d $DOMAINS 
...and using the secp384r1 curve for ECDHE key exchange:

  # in your nginx.conf
  ssl_ecdh_curve secp384r1;
Arguably, the real state of the art is to use an ECDSA certificate. Let's Encrypt recently started supported them, they offer a equivalent level of security to RSA at much lower bit lengths (a 384 bit ECDSA key is considered equivalent to a 7680 bit RSA key) and a few recent TLS vulnerabilities (like DROWN) have targeted implementation details of RSA.
alexpeattie··on Fast Search Using PostgreSQL Trigram Indexes
Ah ok, interesting :). We were weighing up exactly these kind of tradeoffs a few weeks ago, and the benchmarks we did put the 2 approaches more or less neck and neck, so maybe PG has managed to optimize things a bit? Or, our search is over hundreds of thousands of rows, so maybe things only slow down in the millions and above...
alexpeattie··on Fast Search Using PostgreSQL Trigram Indexes
There's nothing stopping you indexing multiple columns with different dictionaries either :). And indexing works beautifully with multiple weighted columns.

The related records point is true though - indexes don't help if you're trying to implement multi-table search. Although then I'd argue a materialized view (refreshed with triggers) might be better than putting more columns into one of the data tables.

alexpeattie··on Fast Search Using PostgreSQL Trigram Indexes
I thought this was a great article, and trigram indexes are definitely an amazing tool to have in the arsenal.

I think PostgreSQL fulltext search (with tsvector, tsquery etc.) is given an unfairly bad rap though. I'm not sure that "full text search works best when the text vectors are stored in physical columns with an index" is true - in my experience there's no performance penalty to just indexing the tsvector expression - no need to worry about additional columns or triggers.

I also think the assertion that the key problem is that "full text search is that words are broken up according to the rules defined by the language of the text" is very context-dependent. In many situations that's the most awesome feature of fulltext search. Usually when I search for "cat" I'm not interested in results for catacombs or categories, but when I search for restaurants, results matching restaurant (singular) are relevant too.

I definitely see that for a use-case like GitLab's, where the data includes code, full text search's stemming would be a hindrance rather than a help.

alexpeattie··on Pull request acceptance of women versus men
I guess competent is meant to be shorthand for "likely to get a Pull Request merged" - I agree that competent is a overextension of that, and very subjective. The actual study is more thoughtful than the abstract might suggest.
alexpeattie··on Let’s Encrypt Now Being Abused by Malvertisers
Yes, although the subdomains still point to deviantart's servers. The difference here is that ad.example.com ends up pointing to the attacker's server.

Because LetsEncrypt needs a very specific response to be served from a specific endpoint, you need this kind of total control to validate a domain and get a certificate issued.

alexpeattie··on Openage – Free Age of Empires 2 engine clone
Yep, the assets don't ship with the codebase - you need to provide your own original AoE II (or AoE II HD) installation.
alexpeattie··on The Myth of Japanese Longevity
It's true that the 'undead' wouldn't skew the mean life span much. But given the way life expectancy is calculated (http://en.wikipedia.org/wiki/Life_expectancy), it ends up being closer to median life span - so an overstated number of centenarians (people over 100) could significantly skew things.

And it's worth noting that while other developed nations are close to Japan in terms of life expectancy, they're WAY behind in terms of number of centenarians. Switzerland for example has an average life expectancy of 81.8 years, vs. Japan's 82.7. But Japan supposedly has 3.5x as many centenarians per capita (http://en.wikipedia.org/wiki/Centenarian#Centenarian_populat...).

alexpeattie··on Diablo in JavaScript
Pretty cool. The full source code's on Github as well:

https://github.com/mitallast/diablo-js

The code's not commented very heavily, but it's pretty readable nonetheless.

alexpeattie··on Hacking ls -l
I think it should be: http://joeyh.name/blog/entry/ls:_the_missing_options/
alexpeattie··on WebGL Nyan cat
Mirror: http://www.alexpeattie.com/nyan-3d/

(Couldn't find one elsewhere, so uploaded files from this repo: https://github.com/canuckistani/Nyan-3D-Firefox-fix)

alexpeattie··on 'Perfect black' coating can render a 3D object flat
Here's a (not terrific) picture of this in action:

http://www.eurekalert.org/multimedia/pub/38262.php?from=1992...

Hihger res:

http://media.gizmodo.co.uk/wp-content/uploads/2011/11/Carbon...

alexpeattie··on Backbone.js Tutorial - by noob for noobs
It does, but as catshirt says, that's probably reasonable. Especially as jQuery assumes a browser (and relies on the window namespace) too - so it wouldn't be suitable for a browserless environment anyway...
alexpeattie··on Who Is Marrying Whom
But I guess you can't have it both ways - if Black and black Hispanics should indeed be two distinct racial groups it would be a bit arbitrary to say marriages between them aren't interracial, no?
alexpeattie··on Backbone.js Tutorial - by noob for noobs
Of course you're right, they're not identical, but I don't think there's any practical difference between them here - they both initiate the view; but using the window namespace seems more readable, and is an established idiom. Maybe it is intentional, but I don't think so?
alexpeattie··on Backbone.js Tutorial - by noob for noobs
A very minor suggestion, but I think the last line (var appview = new AppView) is a little bit confusing on first reading - it's not immediately obvious that you're setting the variable to initiate the view... I've seen it written elsewhere like so:

  window.App = new AppView
which I think is a good idiom.
alexpeattie··on Backbone.js Tutorial - by noob for noobs
This shows the problem with the b's and d's (also the u's):

http://i.min.us/ickmjM.png

its just that they descend below the baseline, which looks a bit odd. The effect only appears at the default text zoom (on FF for Windows).

alexpeattie··on Kaspersky Antivirus 2009 source code leaked
More info here:

http://news.softpedia.com/news/Former-Kaspersky-Employee-Res...

It seems it's probably a beta version of AV 2009... Still embarrassing/potentially harmful to the company though - especially following the hacking of their website a few months ago (http://www.computerworlduk.com/news/security/3244882/kaspers...)

alexpeattie··on eBooks compiled from top StackOverflow topics/answers
I found that these were actually a bit tricky to convert to PDF, with even (normally) reliable tools like Calibre outputting PDFs with really small text... I stumbled across mobi2html, part of mobiperl (https://dev.mobileread.com/trac/mobiperl).

Apart from a couple of character encoding bugs, it seems to do a good job. I've uploaded the eBooks as html here:

http://alexpeattie.com/stackoverflow/html/

I've then been using FF/Chrome and a print-to-PDF driver to make PDFs (again, the only method that worked for me) which I'm uploading here:

http://alexpeattie.com/stackoverflow/

PDFs are taking a while to generate, esp. the larger ones. If anyone can find a faster method to convert the html files, let me know!