Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
emptysea
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
53 ms
·
211.
▲
by
emptysea
6y ago
You can also select lines in the chunks of the file to stage individual lines. Not super discoverable but pretty useful.
212.
▲
by
emptysea
7y ago
Might be related to https://mdxjs.com
213.
▲
by
emptysea
7y ago
I haven't used it personally but I've heard good things: https://www.getlektor.com Generates static files while also providing an interface for edits.
214.
▲
by
emptysea
7y ago
For application code the ecosystem around containers is pretty handy. For load balancers, databases, and other stateful stuff I still run the binaries on VMs.
215.
▲
by
emptysea
7y ago
Also docker-compose doesn't have zero downtime deploys which might be a deal breaker depending on your application.
216.
▲
by
emptysea
7y ago
Not super scientific but Linus Tech Tips has a video comparing the latency of wired and wireless mice: https://www.youtube.com/watch?v=orhb7Njj3h8 TL;DR: wireless and wired gaming mice have the same response times, but norm
217.
▲
by
emptysea
7y ago
I think this might be what you are thinking of: https://github.com/facebookarchive/huxley
218.
▲
by
emptysea
7y ago
There's an interesting NPR interview on the origin of that quote: https://www.npr.org/2015/03/02/390245038/ben-franklins-famou... tl;dr; Franklin was defending government spending on defense
219.
▲
by
emptysea
7y ago
Anchors also don't work with a list of elements. For instance, if we want to share steps in a YAML based CI config we can't if they are a list.
220.
▲
by
emptysea
7y ago
Ah my mistake Anyways there are some more subtle caveats discussed in this blogpost I was trying to remember: https://jmmv.dev/2018/03/shell-readability-local.html
221.
▲
by
emptysea
7y ago
FYI, using `local foo=$(some-command)` does not actually make the variable local. main() { local count=$(git rev-list --count HEAD) echo $count foo } foo() { echo $count } main
222.
▲
by
emptysea
7y ago
Btw, TypedDict has been available in older versions of python via `mypy_extensions` from mypy_extensions import TypedDict https://github.com/python/mypy_extensions
223.
▲
by
emptysea
7y ago
Looks like `pyflame` was recently deprecated & archived. I've had success using `py-spy` for debugging perf issues. Flamegraphs are much nicer to work with than cProfile's output. https://github.com/benfred
224.
▲
by
emptysea
7y ago
I really wanted to use Django channels for some soft real-time stuff like chat and notifications and it worked but I couldn’t get testing to work reliably (tests would just hang sometimes), so I had to use a different setup.
225.
▲
by
emptysea
7y ago
I gave ‘django-stubs’ a spin on a Django 2.2 project. The ORM typings and mypy plug-in worked great. ‘.filter().first()’ and similar all returned the correct types. Ran into a couple issues with the typing of ‘client.force_login()’ where th
226.
▲
by
emptysea
7y ago
I can't seem the find the GitHub issue for it off hand, but I believe you can override the default indexing signature for arrays to return possibly undefined. Otherwise, you're left to creating a wrapper function and a custom ESli
227.
▲
by
emptysea
7y ago
Ideally we'd have the problematic code behind a feature flag and we'd turn the flag off. For other issues we press the rollback button in the Heroku dashboard. Heroku has its problems: buildpacks, reliability, cost, etc, but the d
228.
▲
by
emptysea
7y ago
How would Option<T>, Result<T, E>, and sum types work without generics?
229.
▲
by
emptysea
7y ago
A great reason to add flake8 to your CI edit: forgot that flake8 doesn't check for mutable arguments by default – need to add https://github.com/PyCQA/flake8-bugbear
230.
▲
by
emptysea
7y ago
I gave Ghostery Lite and Ka-Block! a shot and they blocked ads on most sites except for reddit. Pretty good for free. Wipr blocks the same ads as the above combo, but also blocks those on reddit. YMMY
231.
▲
by
emptysea
7y ago
Type hints in Python are IMO great and quite expressive! You can create sum types (a bit verbose but they are there). You can introspect them at run time and create things like pydantic[0] and fastapi[1]. Strict null checks with Optional[T]
232.
▲
by
emptysea
7y ago
I agree that mypy can be a bit lacking, but to address a couple of your mypy woes: - TypedDict is an option but if you can, dataclasses work much better - mypy does refine Optional[T] to T with an if check. Maybe you need to futz with the c
233.
▲
by
emptysea
7y ago
Safari has even removed Do Not Track because it can be used for fingerprinting. https://developer.apple.com/documentation/safari_release_not...
234.
▲
by
emptysea
8y ago
Most of my migrations with Django are column renames, column adds, deletions, etc., which seem to fit nicely with this tool, but there are some cases where I want to do some more complex transformation which require running a function using
235.
▲
by
emptysea
8y ago
If the app doesn’t pin a cert then mitmproxy should allow you to decrypt the data
236.
▲
by
emptysea
8y ago
Another reason Heroku didn't refute Pipenv is that Pipenv's creator leads Python related things at Heroku.
237.
▲
by
emptysea
8y ago
Do you have any recommendations for earplugs?
238.
▲
by
emptysea
8y ago
Not sure which specific issues you encountered, but I had issues with defining actions and using their types in a union to the reducer. There is a nice little library [1] that fixes this issue. So a general redux setup looks as follows:
239.
▲
by
emptysea
8y ago
Any reason you didn't scale up horizontally with more python instances?
240.
▲
by
emptysea
8y ago
I'm pretty uninformed on the subject, but I am interested to hear why an adjacency matrix is chosen over an adjacency list when it is sparse. My basic data structures and algorithms class would lead me to believe that an adjacency list
More ›