Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wrmsr
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
wrmsr
1y ago
If anyone's interested I've implemented a fairly user friendly lazy import mechanism in the form of context managers (auto_proxy_import/init) at https://pypi.org/project/lazyimp/ that I use fairly h
2.
▲
by
wrmsr
6y ago
If you're building anything past a hello world c ext you're already off the path of shit like poetry, in which case AIUI we're basically on our own as we've always been lol, for better and worse. Again I don't think
3.
▲
by
wrmsr
6y ago
AIUI, as the official way setuptools is used is a setup.py calling setuptools.setup(), doing this will remain supported in perpetuity and will really still be powering everything under the hood, it's just no longer what people are told
4.
▲
by
wrmsr
6y ago
Significant but as it's freethreaded you only run one large process. That alone allows for all kinds of additional optimizations that would be pointless with a lot of little singlethreaded processes in which sharing anything mutable be
5.
▲
by
wrmsr
6y ago
Past some critical mass local dev indeed simply doesn't work, but the majority of codebases aren't ~that~ large. And until that point I feel there's an analogy between having a light laptop and remotely doing your heavy lifti
6.
▲
by
wrmsr
6y ago
I'm a fellow fan of antlr but it's not really an option for the base interpreter. They're (rightfully) very stingy about deps. cpython supports a wide range of platforms and has its own very permissive license - it's a p
7.
▲
by
wrmsr
6y ago
The whole point of python is to eschew 'magic' in favor of dumb explicitness, and this is about as big of a conflict as you can get to that. Python lacks statement lambdas not because they've never considered the possibility
8.
▲
by
wrmsr
6y ago
> You could use this to do little stunts like adding an "unless x:" statement equivalent to "if not x:" You say that like it's a good thing. Python is a language empowered by its constraints. You have indeed alwa
9.
▲
by
wrmsr
6y ago
As far as I can tell functools.partial has been implemented in C since it was added sixteen years ago ( https://github.com/python/cpython/commit/9c323f8de4910dfc0ba... ), and it's faster than lambda ( h
10.
▲
by
wrmsr
6y ago
> Built for Scientific Computing I mean the thing's called 'numba' lol. I always liken Pypy to HotSpot in that to this day the numerical performance of the latter isn't spectacular and nobody really cares - it's
11.
▲
by
wrmsr
6y ago
It actually exceeds non-police theft these days: https://www.washingtonpost.com/news/wonk/wp/2015/11/23/cops-... ( https://outline.com/UX7nfW ).
12.
▲
by
wrmsr
6y ago
As a language purist this one is surprisingly well put together. Its impl suffers from legacy (py2 support in general, predating builtin dataclasses, staying in the shallow end of type annotations) but it really does what it does better eno
13.
▲
by
wrmsr
6y ago
and greenlet, and stackless, and pypy's stm.. python's never really been about dogma. part of why its package management is such a mess is because it's been so successful at integrating with everything under the sun and still
14.
▲
by
wrmsr
6y ago
If your python files are not in a python package (do not have __init__.py in their directory) then they will be importing non-relatively and resolution depends on sys.path. If you have a multi-file python project in which your source files
15.
▲
by
wrmsr
6y ago
As below node has the luxuries of both having been able to learn lessons from python and ruby ~and~ not being a victim of its own success of being already integrated with and a dependency of most major operating systems. (That said javascri
16.
▲
by
wrmsr
6y ago
Name conflicts were basically fixed in 2003 with absolute/relative imports ( https://www.python.org/dev/peps/pep-0328/ ) - you don't ever have to include the name of your library in imports within y
17.
▲
by
wrmsr
6y ago
Imagine if it was the day of the Super Bowl, and you wanted to go out to a sports bar that was going to be airing the Super Bowl. So you go out and find a bar that says they're throwing a Super Bowl party, and go in and settle in, and
18.
▲
by
wrmsr
6y ago
loom ( https://jdk.java.net/loom/ ) is well on its way :)
19.
▲
by
wrmsr
7y ago
Curing polio wouldn't be fair to everyone who already died of polio.
20.
▲
by
wrmsr
7y ago
Was the cold war real?
21.
▲
by
wrmsr
7y ago
They took a step towards this with https://docs.python.org/3/library/gc.html#gc.freeze but it doesn't go as far as disabling refcount touching outright. I've experimented with doing that, both per-object
22.
▲
by
wrmsr
7y ago
It's not China's fault that the US isn't even testing its own healthcare workers displaying symptoms.
23.
▲
by
wrmsr
7y ago
This is the most Hackernews post title I've ever seen.
24.
▲
by
wrmsr
7y ago
In the real world it is inevitably a lot more than just those 3 tables - add 'groups', different types of groups, different privacy settings, different per-user feed preferences, experiments, and any number of other things which _
25.
▲
by
wrmsr
7y ago
eval(/exec) is how dataclasses (and namedtuples before them) work: https://github.com/python/cpython/blob/4c1b6a6f4fc46add0097e... . It is a big gun, but sometimes (usually deep within lib code) big guns
26.
▲
by
wrmsr
7y ago
I've seen so many times people going all in on DRY not understanding that just as dangerous as duplication is _coupling_ - the inevitable result being some ungodly $COMPANY_NAME_common lib with a thousand dependencies, and usually only
27.
▲
by
wrmsr
7y ago
It's stated that llvm ir is not stable ( https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-comp... ) and in my relatively limited experience with it there have been enough differences between every little rele
28.
▲
by
wrmsr
7y ago
I've found Optional<> to at least ~help~ with the null issue - as we still don't have value types it still does come with a runtime penalty but most of the code I write and deal with these days has a no-null policy: if it&#x
29.
▲
by
wrmsr
7y ago
Back in the day someone figured out that punkbuster blindly scanned physmem for illegal string literals and banned on detecting them no matter what process they belonged to. They then posted one of those strings to #findscrim on gamesurge (
30.
▲
by
wrmsr
7y ago
I really learned to code writing all kinds of hacks for half-life and its numerous mods (mostly counterstrike) and helping teach others to (but not releasing binaries as ruining other peoples' fun wasn't the real goal). I'm g
More ›