Readit News logoReadit News
well1912 commented on Emerging Tick Bite-Associated Meat Allergy Potentially Affects Thousands   cdc.gov/media/releases/20... · Posted by u/brightbeige
voakbasda · 2 years ago
I am talking about permethrin, but maybe the GP made a typo?

Here is the product that I use on my livestock:

https://nrsworld.com/products/durvet-permethrin-10-concentra...

well1912 · 2 years ago
You and GP are probably referring to the same thing. Hikers sometimes use permethrin is on clothing, not on their bodies. No clue if what you linked would be appropriate on clothes. https://en.wikipedia.org/wiki/Permethrin#Insect_repellent

Permethrin applications last multiple washings; this is also why its use can be problematic environmentally, it sticks around a long time and can hurt aquatic life. I stick to DEET on my hikes, on account of it being less damaging environmentally, but I also don't live in an especially bad area for ticks.

well1912 commented on A colorful problem that has long frustrated mathematicians   quantamagazine.org/only-c... · Posted by u/pyman_in
martinjacobd · 2 years ago
> Michigan, with its separate upper peninsula, doesn’t actually prevent the U.S. map from being four-colorable, but it could, mathematically.

Couldn't you always "connect" the upper and lower parts of Michigan, four color the map that way, and then erase the line you drew? I'm having trouble seeing why Michigan (or Michigan-like states) could ever pose a problem as it seems to be solvable easily.

Does the hole caused by Lake Michigan pose a problem? I see the number of colors grows if you have a torus, but Lake Michigan (or its equivalent) is a 2D hole not a 3D one.

well1912 · 2 years ago
If you consider water to be included in the four colors, then connecting the upper and lower peninsulas through the water does nothing but move the problem between the Michigan segments to be a problem between the water segments.

If you connect Michigan between the water and the land, then you'll have to account for the fact that the water on one side and land on the other can be colored the same during the connection but _can't_ after the connection is erased.

well1912 commented on Emacs is not just an editor (2015)   karl-voit.at/2015/10/23/E... · Posted by u/pmoriarty
well1912 · 2 years ago
Anecdote from this morning: I was taking notes on a technical book in a field I have only a little experience with, and came across a lot of words that I wanted the definition of. At first I opened wiktionary in my browser, but then I thought it'd be nice to have everything in Emacs, after which I used `M-x eww`, `!wikt <term>`. Then on a whim I tried `M-x dictionary`, and lo and behold Emacs has a built in dictionary, which you can even install new dictionaries in and search across. The default dictionary wasn't perfect, with a few terms not existing, but it's hard to beat the convenience for the 95% case. As a bonus, it defaults to searching the word under your cursor.

The point here is less "hey, Emacs has a dictionary!" (I'm sure many/most editors do!), more "hey, Emacs has a lot of use cases built in and they're easily discoverable." It's a great platform with a lot of care put into it over the years by different people, and if you come to it with the perspective of "it's just an editor" you'll be missing out.

well1912 commented on Django Styleguide   github.com/HackSoftware/D... · Posted by u/r4victor
rglullis · 3 years ago
> Always keep your models slim.

As simple as possible, but no simpler. Django models are meant to deal not just with the data, but also with business logic. If `course.has_finished` is a property of the course, why would you want to have a separate function outside of the class?

> Do precomputation if you need the information in a template

If the precomputation is only needed in a template, you can (should, IMO) use template tags.

> Don't make separate apps in the same project (...) avoid dependency hell.

My current pattern here has been to create one "core" project where I represent all the internal models of the domain of the application, and "adapter" apps if I want to interface/integrate with anything from the external world. This makes it easier to extend or replace third-party tools.

> (Migrations) It's built around a fragile model.

I wouldn't call it fragile, quite the opposite. There are some annoying limitations for sure (I didn't find a reliable way to change the primary key of a model, except for creating a whole new model and migrating the data to it), but I think they are due to a matter of strong safety that the migration can only be done if it consistent.

well1912 · 3 years ago
At my current company, we've had many teams over the years fail to make business logic in model methods work, and I think many other people have had similar results. The issues usually boil down to some combination of "business logic is too coupled to the data model" and "this method lives at an intersection of these two models and creates weird dependency problems". I now feel that Django puts you down a path for failure by naming the DB layer "models" and not giving users a decent place to put cross-model domain logic.

My current preference is a functional core-imperative shell-style architecture where as much code lives in the functional core as possible. It's not very elegant with Django but it works fine. Cosmic Python (really accessible and fairly quick read if you have the time: https://www.cosmicpython.com/book/preface.html) has examples that are similar.

well1912 commented on Ask HN: ELI5 What Is a Monad?    · Posted by u/_448
well1912 · 3 years ago
Typeclassopedia is a classic for getting a rock solid understanding of the "hard concepts" in ordinary (and beyond) Haskell. https://wiki.haskell.org/Typeclassopedia
well1912 commented on Applicative WTF?   blog.plover.com/prog/hask... · Posted by u/lainon
well1912 · 7 years ago
"Digging deeper into why this worked this way was interesting, but it's bed time, so I'm going to cut the scroll here." I can very roughly intuit why this is-- the difference between the two Applicative instances the author noticed was that the shape of the first tree was being fitted into the second tree vs the shape of the second into the first. So if you "bind" the lefthand side of <* > first, its shape will be "fitted" to the righthand side, and if you do the opposite you get the second "fitted" to the first shape.

I believe it's the same as iterating over the righthand side of <* > in its implementation first instead of the lefthand side like in their first, wrong implementation?

But my reasoning feels loose here. I probably just need to look at their implementation of Monad Tree closer. :-)

Dead Comment

well1912 commented on A study of musical scales (2017)   ianring.com/musictheory/s... · Posted by u/rwnspace
well1912 · 7 years ago
Nearly jumped out of my seat when I saw this! Look at how similar our approaches are: http://welliam.github.io/molts/ (apologies for how poorly written it is, it's been a few years!)

Not that it's a super novel concept, but we both used this for the modes of limited transposition. For me it was an efficient way of generating MOLTs for any equal temperament scale.

u/well1912

KarmaCake day11August 18, 2016View Original