Better HN
topnewbestaskshowjobs
Log inSign up

MapleWalnut

136 karma · joined Jun 4, 2018 (8y ago) · 89 submissions

Submissions

comment 5y ago · link · parent

Scoring results in Postgres requires scanning all matches, which is slow if you have a lot of results.

Elastic search and other search solutions don’t have this problem.

comment 5y ago · link · parent

I ran into this issue when setting up UI previews for a GitHub OAuth app.

My solution is to have a single callback server that looks in the OAuth state to determine where to redirect. This isn't secure, so when building the UI, I sign the UI's preview URL with a secret and send that in the OAuth state. The callback server checks the signature and redirects that way.

It's hacky and I wouldn't trust it for a production app, but for a test environment it seems okay.

comment 5y ago · link · parent

If you add a link like the following to your page, feed readers should be able to discover your RSS feed

    <link rel="alternate" type="application/rss+xml" href="/engineering/feed/" />

comment 5y ago · link · parent

Excellent, this works perfectly. Thanks!

comment 5y ago · link · parent

It seems like Khan Academy changed their blog to Wordpress and they no longer have an RSS feed.

comment 5y ago · link · parent

I've used mypy and pyright. Mypy generally "just works" for all the Python idioms I use, while pyright is less reliable.

Pyright's VSCode integration, Pylance, provides a great auto complete experience. So I use Pyright for autocomplete in VSCode and mypy for type checking.

comment 5y ago · link · parent

Lyft

comment 5y ago · link · parent

Which NoSQL store are you talking about regarding fast aggregations? I don’t think that’s a property of all NoSQL dbs.

comment 5y ago · link · parent

Those tools are not re-implementations of mypy, but their own type checkers. Pyre doesn't necessarily have all the features of mypy and vice versa.

comment 5y ago · link · parent

You can use typing.TypeVar for the `pow()` example. TypeVar was added via the original type hints PEP in 2014.

    from typing import TypeVar

    T = TypeVar('T', int, float)
    def pow(base: T, power: T) -> T: ...

comment 6y ago · link · parent

GitHub's $4/user/month pricing is very hard to compete against and actually make money as a business. Charging half the price of GitHub for example isn't sustainable.

comment 6y ago · link · parent

OT: this blog could use RSS.

comment 6y ago · link · parent

Why didn't you use Pydantic with Django if the DRF serializers were too slow?

You can also skip the object serialization from the ORM and work with python dicts directly to significantly improve serialization performance from the database.

comment 6y ago · link · parent

You can purchase a license through the app. I don't think you can get one through the website.

comment 6y ago · link · parent

Intersystems purchased Trakcare, which was developed by an Australian company. They'd love to sell it in the US, but Epic is Intersystems largest customer and they have an agreement to not compete in the US.

Cache is the most archaic and least usable programming environment I've ever experienced. Unit tests are not a thing. MUMPS, which underlies the whole system, is stringly typed. The entire stack is junk, so it's no surprise that Trackcare is either.

comment 6y ago · link · parent

> It’s worth noting that HAProxy can integrate with Consul’s DNS interface, but this adds lag due to the DNS TTL, it limits the ability to use Consul tags, and managing very large DNS responses often seems to lead to hitting painful edge-cases and bugs.

I was surprised how they dismissed HAProxy integration with Consul using SRV DNS records. Can anyone confirm the problems they highlight?

It seems like their service that broke would not be needed if they went the DNS route.

comment 6y ago · link · parent

Anyone know how to enable this new UI?

comment 6y ago · link · parent

Another great post! I'm curious what people would suggest as a tech stack that's not python/gunicorn. Something with a GC, decent ORM, that can replace database-backed services written in Python with similar high level code.

comment 6y ago · link · parent

It would be great if you could add an RSS feed to the blog.

comment 6y ago · link · parent

Additionally any deploy will give users a moment of downtime because Heroku only supports rolling deploys on paid dynos.

comment 6y ago · link · parent

This project appears to have a dependency on pandas.

https://github.com/alan-turing-institute/CleverCSV/blob/mast...

comment 7y ago · link · parent

It's the _default_, as they say in the article:

> There is no mandated development environment. Some developers use vim. Some use Emacs. And even more engineers use our internal, unified development environment called Nuclide.

comment 7y ago · link · parent

off topic: It's annoying how the Twitch blog linked in the article doesn't have an RSS feed. How do people read these blogs without one?

https://blog.twitch.tv/en/tags/engineering

comment 7y ago · link · parent

Why wouldn’t you return more data for the REST API instead of making dependent requests?

comment 7y ago · link · parent

What languages are you using with Bazel? I have a project that uses Typescript and Python. Are you using Bazel with interpreted languages?

comment 7y ago · link · parent

Have you tried https://docs.python.org/3.9/library/2to3.html? It should automate some of the syntax conversation.

You can also write custom transforms with 2to3 but I've found https://pybowler.io is a decent wrapper. I haven't used it for 2to3 conversion though.

comment 7y ago · link · parent

You can create a genius (or maybe it’s called smart) playlist in iTunes that is ordered by recently added. It does exactly what you need.

comment 7y ago · link · parent

It's MongoDB Compass, a client for Mongo.
123