Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Too
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
56 ms
·
841.
▲
by
Too
4y ago
It’s the most popular It can run code during installation phase It’s very easy to obfuscate due to its dynamic nature. An import of urllib or os.system isn’t immediately visible at the top of a file as it would be in Java, it can be hidden
842.
▲
by
Too
4y ago
The MagicMock class from unittest package does what you want. I have a hard time understanding any use case outside of such mocking.
843.
▲
by
Too
4y ago
ParamSpec from 3.10 is adding some improvements to type hinting decorators and wrapper functions that just forward args and kwargs. https://peps.python.org/pep-0612/
844.
▲
by
Too
4y ago
Many of the gray projects listed never even specify the minor number. Looking at setuptools, they only list Python :: 3. If you go back to https://pyreadiness.org/3.8/ there are 20% of packages not explicitly supported
845.
▲
by
Too
4y ago
The protocol is the same, but semantics in the applications can differ. Secure cookies only working on https to give one example.
846.
▲
by
Too
4y ago
Proxies doing TLS termination, with multiple servers behind.
847.
▲
by
Too
4y ago
It's heavily dependent on your scope and how much you value your time. I could spin up a postgres docker container locally, in shorter time than it took me to write this comment. On the other hand that wouldn't provide readonly re
848.
▲
by
Too
4y ago
One possibility is that Google Play runs the app in a sandbox, monkey test it by clicking on everything, trace the outgoing connections and sees that one request contains PII from the sandboxed contacts. It could be a third party library th
849.
▲
by
Too
4y ago
Thinking about it, it's strange that hashlib doesn't have a function that accepts a file-object as input, to make the efficient method default pit of success. Naive implementations like hash(f.read()) are all too common to see. Su
850.
▲
by
Too
4y ago
Forgetting is not a problem. Given all the churn in the js world lately it feels like I’m re-earning a CS degree every 3 months anyway. Skipping 3 years you wouldn’t miss anything, just read up on the latest and you are good to go. If you a
851.
▲
by
Too
4y ago
Internet connectivity is an obvious candidate for this. Could not connect to server? Check if WiFi is on. Check if Dns is working. Check if ping to router is working. Check if ping to google is working. Link to wifi settings. Whatever you d
852.
▲
by
Too
4y ago
They do. Press F12 ;)
853.
▲
by
Too
4y ago
Conversational errors can also be fatiguing. Often what you want is something short and dry that can be pattern matched. Compilers are pretty good at this because all their errors start the same way. Error in file foo/bar.c, line
854.
▲
by
Too
4y ago
About that, the number of developers that can’t read, or even understand the value of, a stack trace is also astonishing. If only I had a penny every time someone sent me a “log of the error”, that only contains the final line with the un
855.
▲
by
Too
4y ago
Derivative work requires a major part of the original, before it’s considered by copyright. A 3 line boilerplate is neither novel nor a major part of the original.
856.
▲
by
Too
4y ago
The activity feed still shows you made PRs into the upstream right?
857.
▲
by
Too
4y ago
The refresh can be done with the old key, within the time-window. You only need the deeper key for the first time authentication, when starting up or provisioning the service. What you have to consider is that starting a service is often no
858.
▲
by
Too
4y ago
This is exactly how Ansible-vault works. It's many times better than committing them plain, but I'd still vote for some external service providing the secrets runtime only.
859.
▲
by
Too
4y ago
Trust me, half the recipients of the email would have forgotten about it within a week. You'd be lucky if they even opened it in the first place.
860.
▲
by
Too
4y ago
Code-reviews? Should be a ritual you do on your own code before commiting+pushing and should be a ritual that others will do in the PR before merge (arguable here a secret is already compromised).
861.
▲
by
Too
4y ago
It's not only some rando on the internet. There's always that one co-worker with a wannabe-vim-hacker setup, that you have to help occasionally with some real work task and nothing in their setup ever works effectively (bonus poin
862.
▲
by
Too
4y ago
Django requires you to have imported settings.py and be connected to the database first, before you can even import a model. It makes it impossible to write modules with type hints and modules which are partially usable outside of Django
863.
▲
by
Too
4y ago
I ask this question a lot too, and yeah it’s shocking to see how many that believe things like magic quotes or some other unknown layer solve everything. Magic quotes is of course very different from an ORM doing the application-specific en
864.
▲
by
Too
4y ago
Who, working with these things regularly, does not have docker installed? There is already an official image available so you don’t need to write dockerfile yourself. Having an instance up and running is literally just a docker run command
865.
▲
by
Too
4y ago
Well, I think a fair presumption is that the option compared with is still distributed. Network latency and disruption is always going to be an inherent part of such. The comparison was more against rpc without async. Primarily, async expos
866.
▲
by
Too
4y ago
Async functions, now available in many languages, solves many of the issues RPC had in its childhood. With the problem that you get "colored" functions. Thinking about it that's probably a good thing, because with RPC you had
867.
▲
by
Too
4y ago
findall and multiline mode makes it even easier, at the cost of loading whole file into memory though, for that reason your alternaive is probably better import re wordlist = open("/usr/share/dict/words&qu
868.
▲
by
Too
4y ago
With argparse.FileType, similar behavior integrates well with argparser https://docs.python.org/3/library/argparse.html#argparse.Fil...
869.
▲
by
Too
4y ago
Simplicity is good but often not the solution to make things faster. Most obvious example. Binary search is faster than linear, at the cost of more complexity (that can often be hidden under an abstraction). Async code is often perceived as
870.
▲
by
Too
4y ago
The python equivalent is in the urllib.parse module, part of standard library.
More ›