24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions
https://www.bitecode.dev/
Email: contact at bitecode.dev
comment 4y ago · link · parent
We would need a ? to says "ignore AttributeError, IndexError and KeyError on that access".
However, the use of {} for set is not a problem.
First, remember than Python is much, much older than JS. Insight is 20/20. Second, you could always use a different syntax.
comment 4y ago · link · parent
Some people will need to become more discreet, while some people need to take more space, some people need to be less materialistic, while others need to accept to use material for their own comfort, some people need to play more, some need to work more.
Also, what you see is rarely the definitive result: it's usually only part of the ungoing correction, meaning you may be seeing a swing on the other side of the curve, a different kind of unbalance, and it would be easy to judge the meditant is not progressing.
However, progress in meditation is not an absolute, it is always to be understood in the context of each human. Some start from very far away on their path, and what your perceive as failure may be a great success for them.
As usual with things that are practiced inside yourself, there is no objective way of measuring progress. We don't have a wisdom metter. This is also why it's very hard to assess if somebody is practicing correctly, or if some teaching is off. Teachers have tools for this, but even that is fuzzy at best.
My personnal experience is that I used to be minimalist, and after years of meditation, now I buy more things. I used to attend to more social events, and now I'm declining regularly some of them. Now some around me could see that as a regression. But from my perspective, it's a way of taking more care of myself.
Be careful with the way you evaluate people, practicing or not. You are probably not having all the context.
comment 4y ago · link · parent
Unpacking doesn't let you specify default values if cardinality doesn't match, nor can you extract dictionaries by keys.
Since operators.itemgetter and itertools.slice are limited, I end up either adding a dependency or reinventing the wheel for every project.
comment 4y ago · link · parent
- add time constraints, where you need to implement widgets that you could source from a JS framework ecosystem otherwise.
- in your 10 engineers, make it 5 juniors, 2 interns and 3 seniors comming from PHP, and make sure they write all the code in the same style, follow a congruent architecture, can find solutions to common problem, get easy onboarding, etc.
- request sub-routing, off-line mode, notifications, content udpated by multiple users and so on.
- put a big table in there with 10000 rows and ask your team it renders fast.
comment 4y ago · link · parent
The simple fact there no guaranty of safety that can be made about such a system despite its obvious consequences about tracking, power and control should alone be a red flag.
When I read such a comment, I can't help but think school should make kids read more science fiction. Many authors covered why something like this is a dangerous idea.
I'd go even farther, but I would reach the Goodwin point.
comment 4y ago · link · parent
In this context the argument is moot: a better app that is too expensive or slow to make is simply not going to be released vs the worse one that actually gets published.
That's all there is to it.
That's why people still use wordpress, excel or jupyter notebooks for important stuff.
You may want things to be different, and for good reasons, but it's still what's the market has decided.
comment 4y ago · link · parent
I myself prefer the snapiness of QT apps, but budget and time to market will win.
comment 4y ago · link · parent
TL;DR: Path() initialization is very heavy compared to simple strings, and subsequent path operations produce new Path() objects every time.
The video then illustrates the point with a patch to the black formatter cache yielding a 40X speedup.
comment 4y ago · link · parent
This makes for poor debates, where there is little nuance, fuzzy scales and hardly meaningful communication.
comment 4y ago · link · parent
That doesn't make water bad.
I wish for people to be strong, just like I wish them good health, because it's a quality that makes for a happier life.
If one has the strength of character not to be pressured to do bad things, you get less fascists, not more.
comment 4y ago · link · parent
Strength is the ability to apply force, it's the quality of solidity, the potential for resistance, etc.
E.G: it takes strength to not act on fear and hate. Gandhi is considered a man of great strength.
comment 4y ago · link · parent
A couple of advises:
- the right algo will go a long, long way.
- know your data structures. E.G: assigning to a slice is ridiculously fast (even while unpacking), memory views may save a lot on byte heavy workloads, heapq and deque are underrated, etc. Also check out https://wiki.python.org/moin/TimeComplexity for big O notations on python builtin types common operations to understand what you pay for.
- know the stdlib. collections, itertools and functools all contain incredible gems.
- delegate. Python is a fantastic glue language, use it for what it's good at. Your database, your numpy arrays, your cache are all amazing are what they do, no matter the language. Let them do the heavy work.
- don't kill good perfs by ignorance. I regularly see people casting a generator, iterating on a dataframe, calling readlines() on a file or doing something else that is destroying the otherwise excellent perfs of their program.
- know the ecosystem. There are some very good fast libs out there: diskcache, sortedcontainer, scipy, uvloop...
- use threads to avoid blocking a GUI, multiprocess to share work between CPU and asyncio to speed up network operations. Each tool has a sweet spot. But threads are underrated, they work well for a couple of hundred parallel network operations, and most C libs will actually release the GIL, so they can use several CPU more often than you'd thin. Also, use pools if you can, shared_memory in 3.8 or mmap.
- sometime the dirty solution is just faster, like subprocessing to ffmpeg.
- The more recent, the slower. Sure, I love statistics, pathlib and dataclasses. In a regular code they are great. On a bottleneck however, they are very slow.
- the array module is not supposed to speed up the code, only save memory. But sometimes it does.
- printing to the terminal is limiting. Sometime your program is doing fine, the display is preventing it to go faster. At least check the flush.
- comprehensions are faster than alternatives.
- pre-allocating lists and dicts can help.
- measure. The austin profiler is your friend.
- rewriting the hot path in a faster language is likely more interesting than writing the whole program in it. A bit of nim or rust is easy to call from python.
- some python distribution are faster than others. I don't mean just pypy, but also regular cpyhon that have been built specially for some architectures. E.G: https://www.intel.com/content/www/us/en/developer/tools/onea...
- nuitka code compilation can speed up the code by a factor of 4, it's nice, especially for startup.
2992.
Simular VR: Lenses and Schematics(simulavr.com ↗)
98 points · by BiteCode_dev · 4y ago · 53 comments
comment 4y ago · link · parent
But allow me to actually provide some hints that, while not able to remove all doubt about the matter, nevertheless show such a theory is not an undeserving question, nor born from an irrational mind:
https://journals.ashs.org/downloadpdf/journals/hortsci/44/1/...
comment 4y ago · link · parent
We don't have to be 100% either.
We do need to build human trust and relationships, and you can't do that with remote easily. Also, communications are slower and full of paper cuts that will make any task requiring to gather a lot from different people harder with remote.
Those 2 things make onboarding much harder.
Young people are also the one that are paying the most cost from remote:
- they are the ones with the less autonomy, which makes remote either very unproductive or make the task super hard.
- they don't learn anything about politics, which remote hides from view, and maybe reduces a little, but doesn't remove.
- they are already deep in the culture distractions, which is incredibly tempting in remote.
How course, remote work has so many benefits it may very well offset all that. Time will tell I guess.