Hacker Newsnew | past | comments | ask | show | jobs | submit | more rectangletangle's commentslogin

I'm a huge fan of Django, but I always felt that this was true. I wish there was more of a push to decouple parts of the framework. Keep the magic, but allow usage without it.


Dynamic typing vs. static typing is on a different axis than strong vs. weak typing. Python is a strong dynamically typed language, with some "static lite" features introduced in Python 3.

Dynamic typing means that types can be changed arbitrarily at runtime, compared to statically typed languages which define all types at compile time.

Strong/weak means that type coercions rarely/never happen automatically. For instance JS has some interesting behavior enabled by weak typing `[] + [] -> ""`. Whereas Python rarely coerces things for you. The division operator in Python 2 was strongly typed, while they changed it to weak typing in Python 3 (inline with the practicality vs. purity convention).


It is an interesting approach, though I feel like this could introduce some nasty unintended consequences given how dynamic and introspective Python can be (admittedly I haven't studied this particular implementation).

I always treated this a bit like single underscore private functions/methods, i.e., follow a convention that produces code that's easy to reason about, even if it's not strictly enforced by the language/compiler. So in practice this equates to separating out modules that mutate global state, and placing the majority of logic in "strict" modules that only declare a bunch of "pure" classes/routines. So the "non strict" code is really just a thin layer of wiring gluing everything together. For instance my Celery task files tend to be very thin.


well, we also heavily use static typing, so you end up with something like

my_db_conn: Lazy[DbConn] = Lazy(lambda: make_db_conn(...))

and MyPy will tell you if you're doing something silly when you try to use it.

EDIT: After typing up this response and submitting I realize you were talking about their strict approach rather than ours. whoops :)


>In web development, losing a connection is a failure case.

That's changing with the advent of progressive web apps. It's possible to write web apps now that are robust in the face of network problems, e.g., the web app renders and is functional even without a connection.


I’m not questioning whether you can do it with web technology. But you still have to design it where both your business logic and your data can live on the device and it can queue submitted data until there is a connection available and if multiple people are updating the same record, knowing how to merge the information or knowing which one takes precedence. I’ve even seen cases where the logic depended not on just the record, it depended on knowing which fields were updated by the device when it was disconnected and the prior value of the field to make sure that the user had seen the most recent value before they updated it. If not, someone on the back end had to do a “manual merge conflict resolution” by calling both people.


You frequently encounter similar issues between multiple web servers. Either due to scaling to multiple data centers or when multiple independent services all update the same information. This can get really complex when clients start talking to multiple different services.


Although it's not quite the same thing, this reminds me a bit of amnesic shellfish poisoning. In addition to all the terrible gastric problems ASP has the curious side-effect of severe permanent anterograde amnesia, where all memories before the incident are retrained, but the poisoned individual can't create new long term memories. So they're limited to working memory which only lasts a few seconds.

However research has shown that some specific types of long term memories can be still be made. For instance if an amnesiac individual is asked to draw the same image repeatedly, they may still improve in speed and efficiency without any apparent conscious memory of having drawn the image before.

https://en.wikipedia.org/wiki/Amnesic_shellfish_poisoning


If you're ever in SF and have a bit of an afternoon, the Marine Mammal Center, just north of the Golden Gate Bridge, is a fantastic afternoon. It's free to wander about and tours cost ~$10/person. Perfect for an afternoon with the nieces and nephews. They cover ~600 miles of coastline on the western US, including Hawaii, and help with marine mammal rehab and study.

One of the KEY functions of the center is the monitoring of demoic acid in marine mammals, the cause behind Amnesic Shellfish Poisoning. Much like us terrestrial mammals, demoic acid is a heck of a terror for marine mammals too. When lots of seals and otters show up with high amounts of demoic acid in them, the Marine Mammal Center can issue alerts to local health officials to help us humans steer clear of seafood and to increase monitoring of the oceanic food chain.

As of this last weekend when I was there, they state that they have never seen such an outbreak of demoic acid poisoning on the west coast going back to about 1984.

The Marine Mammal Center is a fantastic place filled with great volunteers and incredible staff. Everyone there is super knowledgable and super dedicated to our oceans. If you have never been, it's a great time and perfect for the little ones. More info here: http://www.marinemammalcenter.org/


Well you can add that to my list of horrifying potential outcomes of being human.

> For instance if an amnesiac individual is asked to draw the same image repeatedly, they may still improve in speed and efficiency without any conscious memory of drawing the image.

So it's basically a human version of cache timing attacks. O.o


>Well you can add that to my list of horrifying potential outcomes of being human.

Pretty much, fortunately it's very rare. However you shouldn't eat sport caught shellfish without first checking for local warnings regarding harmful algal blooms.

At least in the US/Canada all store bought Seafood is thoroughly screened for this specific problem, because ASP was discovered in Canada after a mass poisoning event in the late 1980s.

Alfred Hitchcock's film The Birds was loosely based on an invasion of tens of thousands of delirious seabirds thought to be suffering with ASP in Santa Cruz in 1961.


Both?


"Derivative work" is the phrase to resolve any conundrums here.


The New Caledonian crested gecko was thought to be extinct for over 100 years until they were rediscovered in 1994. Now they're common place in the pet trade because they're so hardy.

Rediscovery of "extinct" species is common place, because of the inherent difficulty in proving that all individuals of a given species are dead. Combine this with the robustness of biology, allowing species to quickly boom under favorable conditions, and then false extinction ends up happening more often than you would probably suspect. It's normal for many healthy populations to fluctuate wildly around a given carrying capacity. r-selected organisms are particularly notorious for having like 95% of the population die off regularly, and then bouncing back in a few years.

In the case of the thylacine, it's a macro organism so it probably has a higher profile when compared to a small gecko. So the likelihood that they're still extant probably isn't quite as high, unfortunately.

https://en.wikipedia.org/wiki/Crested_gecko


Had issues dragging the rotary bit on my iPhone in landscape mode. I noticed that it didn't entirely fit on the screen, so perhaps that's causing the issue. However it works great in portrait mode.


I'm pretty sure there's more than a few options out there.

Just a quick google search found these:

https://www.floydhub.com/

https://algorithmia.com/product

(I'm not affiliated with them in any way, and haven't ever used their services.)


Binary search.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: