8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions
comment 4y ago · link · parent
My suspicion why there was an uptick of incidents in NL/Amsterdam was the influx of people specifically seeking those substances out, with little safety education or experience. If they were more widely available, the incidents would be far more diffuse, and likely fall below the noise floor. Plus, wider awareness means better overall substance education and understanding, meaning fewer folks getting in over their heads and acting a fool.
The same "can of worms" argument was leveled against cannabis legalization, and turned out to be overblown, there was no outbreak of reefer madness.
comment 4y ago · link · parent
That's great that you are taking that into account, but I'm not totally sure how to interpret the value bars. So I presume a high value means lots of positive engagement. But how does a lot of negative engagement show up? I think it's valuable to know when there is a lot of chatter about something and it's mostly negative. Or when it's controversial.
Maybe something like a statistical distribution graph or weighted color gradient, so you could tell at a glance the density/quality/depth of discussion, and also the distribution of sentiment.
comment 4y ago · link · parent
That is definitely a tall statement short on evidence. We expect there to be countless islands in latent space - this is basically a related concept to grandmother neurons, although instead of "Jennifer Aniston neuron" we have this "Loab neuron" which has no particular obvious origin. But I don't think there is anything privileged or special about this cluster.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
That could be an exchange like: "Sign this nonce, and your message will be vetted", or "this is very suss, you have to do X difficulty hashes to have any chance of delivery, and regardless it'll be flagged as potential spam". Or perhaps just a guarantee on how an action would affects the message's "spam score".
This could be used alongside nested packets/envelopes and various headers/trust levels in a network of trust to give a message some overall trust level.
comment 4y ago · link · parent
If it were a back-and-forth protocol, more like TCP, then you have way more options for congestion control, error reporting, load balancing, and the like. The server can choose to accept the incoming request, ask for more verification, or interrogate the client in various ways. This could be something just like DKIM / DMARC / SPF, or even something more exotic, like making the client do proof-of-work with difficulty tied to how suspicious that client is to the server, and also the delivery scope/scale. Or forcing the client to wait for ACK for valid delivery while slow-walking it.
This gets around some of the issues in cousin comments, with respect to punishing botnets and rewarding lawful players. Established, high-trust players pay no cost. Suspicious players can still get through, albeit with a tax (that should be trivial for low-volume personal MX, but expensive for high-volume spam). Furthermore, it's adaptable.
comment 4y ago · link · parent
The medium/high quality stuff contains more/better detergents, water conditioners, and sometimes rinse aids. The packs are just powder formulations pressed into a pellet.
comment 4y ago · link · parent
- xeharmonic wiki: https://en.xen.wiki/w/Main_Page
- xenharmonic playlist: https://open.spotify.com/playlist/1OcPPq0ohnUarvDCERaxaR?si=...
- Tolgahan Çoğulu and his awesome microtonal guitar creations: https://youtu.be/iRsSjh5TTqI
Some bands with more "approachable" sounds (vs the xenharmonic playlist, which gets spicy) known for microtonal work:
Psychedelic rock:
- King Gizzard and the Lizard Wizard (namely albums Flying Microtonal Banana, KG, LW)
- Altin Gün
- Gaye su Akyol
Classic blues rock (Led Zeppelin and the like, but also OG blues like Robert Johnson, that's another rabbit hole) also has a surprising amount of off-12Tet notes, because of the blues scale
In the electronic realm, Aphex Twin does some interesting stuff with microtones
- Jacob Collier - musical prodigy, mostly a capella/vocal arranging, but is a genre polymath, does some incredible stuff with just harmony
If anyone has anything to add, please do! I can't get enough of this stuff
comment 4y ago · link · parent
Oh and you can downshift to engine brake and the Sport model has flappy paddles to boot.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
Ohhh trust me, I know bad code. And I know good code. My unit of measurement is how fried I feel at the end of the day. Dynamic loosy-goosy python? Brain fried, constant debugging, little confidence in deploys. Static types, pydantic, pycharm, mypy, DI? I'm in the zone all day.
I don't think you are the arbiter of all code, so I'm not sure what grounds you have to tell me what my taste in code is.
Additionally, you would be better served by writing comments with less presumption in them. It makes the discourse more adversarial than it needs to be.
comment 4y ago · link · parent
You're writing unit tests wrong if they are taking that long. Unit tests should be quick.
> It's impossible to update the Python version since all the Python code needs to be updated at the same time.
I've done it, so, objectively not impossible.
> Long check-in times for changes running MyPy over 100k lines of code.
TFA addresses this. It can be greatly sped up with use of caching in CI.
> Maintainability issues since code can't be updated without knock on effects all over the codebase.
That's exactly why static types are better - automatic refactors.
> On average MyPy type checking will catch 1 bug per developer per year, which wouldn't of being caught normally.
I catch several per day, simply from IDE highlighting, in real time, and fix them immediately, which only works because of the type system. (maybe it's wrong to call these bugs at this point, it's more like proto-bugs which never even get checked in cause there is immediate feedback)
> It makes people who previously coded in statically typed languages feel more familar with the code.
I came from a fully-dynamic-everything python world, and types were a breath of fresh air.
You've clearly been burned by (a) bad codebase(s), but I think you are drawing all the wrong conclusions. All the benefits of narrow interfaces, easy refactors, high maintainability, can be had with static typed python. I will admit it's much more challenging to be really competent at it than it ought to be, but this has been improving rapidly.
comment 4y ago · link · parent
comment 4y ago · link · parent
Yes, actually.
This is an antipattern in the vast majority of use cases. There are far better patterns out there than just sticking a method on an object, and I detest codebases that do this sort of thing. It's almost always someone who uses the phrase "pythonic" unironically way too much, writing these sorts of things, and a nightmare to debug.
There's less problem with doing something like
def quackerizer(foo: Any) -> Quacker:
foo.quack = lambda...
return foo
Still kinda odd, but at least you are doing a formal cast.> That's an IDE problem, with sufficently powerful code inspection, the fields can still be found.
Ok, name one. Pycharm and vscode don't currently do it afaik. Maybe some vscode plugin, haven't used vscode much.
comment 4y ago · link · parent
So do our anecdotes cancel out?
comment 4y ago · link · parent
That's...that's literally how type systems and interfaces work. You do know Python supports behavioral subtyping (Protocol), right?
It sounds like you certainly have had some bad experiences with poorly-written typed python. But that speaks more to those maintainers not knowing how to actually use types effectively, vs a shortcoming of static typing in python. Python's type system has plenty of shortcomings, but has plenty of escape hatches as well.
comment 4y ago · link · parent
I've been writing python for over 15 years and use Pycharm extensively. Please don't make assumptions about other users' experiences without evidence.
IDEs absolutely do not infer what fields *kwargs take, let alone what types those fields are. I'm not talking named fields, I mean literally
def func(*args, **kwargs): ...
Afaict, no IDE and no type system can help you there, in python, save for some really arcane type inference magic on every single call site.> duck doesn't have a type, not even Duck
It absolutely does, if Duck is a protocol. If you have some object, and you call .quack(), it implements the Quacker interface, even without inheriting BaseDuck. You can still statically type it no problem, and it'll take a Truck no problem, so long as Truck.quack() is defined. Almost everything has a type, it just takes some effort to uncover it.
comment 4y ago · link · parent
Yeah, this drives me nuts as well. But Pycharm has recently started inferring types and jump-to-declaration works, so I believe obtaining that information must be possible.
Celery is another library in the group like django/pytest in that everything about it is suuuper dynamic and *kwargs-y. It drives me up a wall that I can't readily decouple task functions from their interfaces in a typesafe way. Also I don't know how to decouple the tasks from a Celery app with a pre-defined broker uri without resorting to config files/env vars - that approach simply does not unit test well.
comment 4y ago · link · parent
I really dislike this take. I believe Python is about rapid iteration, doing more of functionality with less code, and enjoying the process of programming. You know what I enjoy? Easily knowing what features (methods, attributes, keys) an object has. You know what I really don't enjoy? Having to dig through reams of source code to figure out what attributes I can use, or what *kwargs a function takes.
Nothing about duck typing prohibits saying `def func(duck: Duck)`, because maybe it's a French duck and has .coin() instead of .quack().
Also also, how is static typing completely incompatible with dynamic features? Usually there exists an abstraction with static types that actually captures the behavior you want. Its rare you want to be able to handle literally anything. Ask oneself, "could this function receive absolutely, truly, anything, or is it just shortcut for not finding the right types?"