HNHacker News
TopNewBestAskShowJobs

alephu5

412 karma · joined September 23, 2015

submissionscomments
alephu5··on HTTPS Everywhere to Be Deprecated
It's trivial to do public certs with acme.sh, caddy, or certbot so you might as well. For most private networks I think it's fine to use plain HTTP.
alephu5··on Barcelona gives free annual public transport tickets to former car owners
This feels a bit like being in school and seeing the naughty kids being offered sweets or privileges, meanwhile the good kids get nothing because they're already well-behaved.
alephu5··on You may not need Moment.js
Latency
alephu5··on Borb – A Python library to read, write, and edit PDF files
Amazing, I've been yearning for something like this for years but have always been told it's impossible. Can't wait to try it
alephu5··on What I Learnt Becoming a Tech Lead
I'm considered a senior engineer by the company I work for and my peers, however it makes me cringe to write or say it. I think it comes across as pretentious.
alephu5··on Tailscale free for open source projects
Wireguard isn't so good for mesh networks because every new node requires reconfiguring all the others. Even with management utilities this is a pain, so instead I recommend something like nebula https://github.com/slackhq/nebula
alephu5··on Ask HN: When to switch startup backend from Python to Golang?
I spent a couple of years working on a Haskell backend and honestly the safety and performance wasn't worth it, compared to the agility of python.

Judicious use of mypy, unit testing and leaning heavily on the framework can keep things well organised

If you're hitting performance limits you likely have enough revenue to get some extra computing power and this might even be a viable long-term solution. Otherwise you can: - Build a service in the performant language - Embed C, Rust or Fortran into python

A full rewrite in a performant language is an option but almost never the right one in my experience. In any case optimise for development agility right now, which includes writing good organised code. You can cross the performance bridge when you come to it.

alephu5··on Ask HN: How should I learn Java Spring as a PHP / Python developer ASAP?
I'm guessing it's a very simple application, given the timescale, so you can probably use Spring Boot to get started and follow a simple tutorial of your choice. The precise details in your case are probably close to what the tutorials offer I'm guessing: a simple calculation or database access behind an HTTP endpoint.
alephu5··on “The Book of All Skies” by Greg Egan
Me too, and they always think I'm crazy.
alephu5··on Fundamental physics sees worlds in grains of sand and infinities in hours
I think the OPs point was not that they were intellectually difficult to comprehend, rather each discovery radically alters your perspective of the world.

If we were to discover with certainty that our universe were one of many, it would completely blow my mind.

alephu5··on Friendship ended with the garbage collector
Why use a language with a GC at all if you don't like it?
alephu5··on Nirvana sued by the man who appeared on Nevermind’s album cover as a baby
The image has nothing to do with the success of the album, it's the music. They could have put a deflated football on the cover and it would have still been iconic.

Given the easy availability of newborn babies, I think $200 is fair.

alephu5··on Apple Just Gave Millions of Users a Reason to Quit Their iPhones
If you're going to do something truly devious, do it in the name of protecting children.
alephu5··on Elm at Rakuten
What about something tedious and ubiquitous, such as swapping between camel and snake case?
alephu5··on YAML and Configuration Files
Use dhall and serialise to JSON/YAML!
alephu5··on Scientists find an effective solution for the three-body problem
For a two-body problem the discrepancies between your model and reality increase gradually with time, but it's still possible to predict eclipses decades in advance with a precise albeit imperfect measurement of initial conditions.

With a three-body problem any slight shift causes a wildly different trajectory, bearing no resemblance to the original so your measurements of the initial condition have to be perfect.

alephu5··on AWS adds an extra 5.5M IPv4 addresses
Ngrok if you only want TCP
alephu5··on Mastering Web Scraping in Python: Crawling from Scratch
I worked on a large web scraper for several years and JavaScript almost never needs to be executed. The only times I've had were to extract obfuscated links that are revealed by some bit twiddling code, specific to each request, and this was achievable by forking out to deno.
alephu5··on Tools to Run Kubernetes Locally
Definitely an indicator of bad design if you need this for development, but I can imagine it's sometimes useful for ops to play with different configurations.
alephu5··on Haskell for the Elm Enthusiast
It seems like you're asking a more general question unrelated to JSON. Rather you want to know how to manipulate data without all the ceremony of a strong type system, as you would in JavaScript or python. This is completely valid and is the best choice for simple jobs.

If you have a set of key value pairs where all the values are the same, you can use a Map or HashMap. These are both easily serialisable.

I'm not sure there's a way of having key-value pairs without a schema and with different types of values. If it has a schema you can use a record of course.

If you just want to add a single value, such as pdfUrl for example, you can include this as a nullable (Maybe Text) value in the record. Receive the data without it and return it with it. If you wanted to, you could also use a type parameter to guarantee that a pdfUrl is always included in the response record.

alephu5··on Modern C++ for C Programmers (2018)
For those that don't want to upgrade, why not use a pinned compiler? Everyone else does this with other languages, and overall I think the benefits outweigh the costs.
alephu5··on The Tyranny of Spreadsheets
I think the best approach in many cases is to bring data management into a specialised application, rather than using spreadsheets as a database. They can use the CRUD applications we all write or some off-the-shelf solution, but the important thing is that it provides validation, schemas etc.

Then you provide a spreadsheet export or direct connection that can be hooked into another spreadsheet with all the formulas, pivot tables and so on.

This way the core data is safeguarded and kept clean while not requiring constant development for every report requested.

alephu5··on Kubernetes is our generation's Multics
I worked in a Python web-scraping team doing 3 million requests per day. Their solution to manage concurrency was also one pod per crawl, each with its own DB connection. It really struck me as crazy that everyone thought this was a good idea.
alephu5··on Kubernetes is our generation's Multics
There are some good ansible playbooks on GitHub for nomad, consul and vault. I personally don't use vault because it's overkill for the proeuct in working on at the moment.

To avoid the pain of managing a CA and passing out certificates for TLS between services, I use a wireguard mesh and bind nomad, consul and vault to these wg interfaces. This includes all the chatter of these components, as well as the services I deploy with nomad. It's configured such that any job can join the "private" wireguard network or "public" internet gateway.

It takes a few days to set up, but it's very easy to manage.

alephu5··on Canada to donate 17.7M AstraZeneca doses
https://www.ema.europa.eu/en/news/covid-19-vaccine-astrazene...

7 clots in 20 million vaccinated which is below background levels.

alephu5··on Dozens killed after record rain in Germany and Belgium
I don't think this is right. You can calculate the probability due to pure chance of having a certain number of extreme events in a year, given their variance since records began. If we suppose the probability is 10%, then seeing the same or worse year on year would get us to 0.0001% after just 5 years.

I don't know the numbers are or if they're even this drastic, but at some point they will be and we'll be able to say with confidence that climate change is the cause.

alephu5··on Facebook users said no to tracking, and now advertisers are panicking
I don't use social media and aggressively block all ads, but my wife does so I've seen how it works. While scrolling through she sometimes she's clothing or jewellery that matches her style and will engage with them to see what's available and how much it costs. Nevertheless she hardly ever converts.

The ads themselves aren't a problem from what I've seen, rather it is the incessant stream of memes and emotive content that keeps you scrolling through the feed.

alephu5··on Minimum wage workers can't afford rent anywhere in America
I'm pretty sure you could get a 2-bed home with minimum wage 70 years ago, so I suppose you're saying that it's absurd to expect societies to advance and make life easier.
alephu5··on Give me /events, not webhooks
Another option would be to publish an AMQP endpoint, I'm not sure what the security implications of this are though.
alephu5··on Where in the HypeCycle is GraphQL?
> With GraphQL, I can generate most of my client libraries while, and when I am writing a web client using typescript, I have full type checking on my apps. This makes me as a solo developer so much faster than using rest, with 0 client library generators, and 0 type safety. If my API changes response, my front end generated library will fail compilation with a type error.

> Moral of the ramble, new tech is great – sometimes.

> https://www.graphql-code-generator.com

You can do this with a boring REST API too. Most frameworks can automatically generate a swagger file, and there is a tool to generate clients from this in lots of different languages.

← PreviousPage 2 of 7Next →