8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions
comment 4y ago · link · parent
> Sometimes conciseness is better than cleverness.
Isn't concise and clever on the same side of the balance? Cleverness and abstraction is how you cut down on LOC.
Abstraction has its own cost, so while you can trade LOC for cleverness/abstraction, there's limits/costs to that as well.
Also also, python/mypy still lacks support for higher-kinded types, which really puts a soft-ceiling on the amount of abstraction you can type-safely utilize.
Aaaanyways, I think the whole original point is, "we have a large codebase, and mypy helps keep the wheels on at speed".
+1 on black and precommit. That has done wonders for codebase consistency. I'd run flake8 too but the maintainer is weirdly opposed to supporting pyproject.toml for config.
comment 4y ago · link · parent
- `pytz.timezone(timezone_name)` will give you the current offset for that timezone - well, it will at least be some consistent offset - surely, every timezone has the same reference starting point?
What `pytz.timezone(name)` actually does is initialize a timezone object at the point in time of the first entry in the tz database for that zone. For example, New York had an offset of 4:56:02 prior to 1883 November 18, 12:03:58 [1]. That is the "starting point" for America/New_York and US/Eastern (which I think is an alias of New_York before a certain date). Which is why you get
>>> pytz.timezone('America/New_York')
<DstTzInfo 'America/New_York' LMT-1 day, 19:04:00 STD>
Ish. Not sure where those 2 seconds went. But that explains why you see that strange 19:04 (-3:56) offset. The real way to use it is >>> pytz.timezone('America/New_York').localize(your_specific_datetime)
Timezones without a reference time are deceptive.[1] https://en.wikipedia.org/wiki/Tz_database#Example_zone_and_r...
comment 4y ago · link · parent
Yes, by that definition, most photographs already aren't real.
comment 4y ago · link · parent
That said, as a former chemist, I consume sucralose, and I am not worried by it. Unlike most halocarbons, It's very water soluble, so it does not react in the ways the bad halocarbons do.
comment 4y ago · link · parent
Big if true. I'm slightly skeptical that just decarboxylating PFAS causes the rest of the backbone to "fall apart" - I would expect it to form CF3[CF2]· (carbon radical) which would readily react with water to form -H or -OH, which is basically back to square one. But maybe it can eliminate HF in the presence of UV, forming CF3[CH2]CF=CFOH, which gets hydrolyzed, oxidized, then cleaved, but boy is that an unfavorable process.
(edit: skimmed the paper, I was pretty close. Forms CF3[CF2]- which goes to CF3[CH2]CF=CF2 which then gets hydrolyzed, but...DMSO/NaOH at 80-120°C ...yikes. This is the ochem equivalent of "nuke the site from orbit", very few compounds survive these conditions)
I've been out of the chemistry game for a few years now so I'm a bit rusty but gut instinct is that this is far from a slam dunk. But anything to reduce FC's is a boon to the world, so I'm hopeful this is a breakthrough.
Edit2:
> This high fluoride recovery indicates that most of the perfluoroalkyl fluorines were defluorinated and mineralized rather than being transformed to smaller-chain PFAS or being lost as volatile fluorocarbons.
So the surprising thing isn't the decarboxylation, it's that NaOH encourages the perflourylalkenes to cleave at sites away from the alpha (splitting, rather than carbon-by-carbon), which is neat. Still doesn't touch PFOS, unfortunately.
comment 4y ago · link · parent
Being in the peanut gallery is fun, so I'm going to echo a few common points.
- I love the dished keys. Would be a neat feel I think to do all keys like that
- staggered is the past, ortho is the present and future
- separate delete/backspace key is great (maybe fn-bksp can do this?)
- I would give my left toe for a trackpoint on a low profile portable keyb.
- I love the novelty/utility of the rotary encoder, but the high profile of the knob kind of defeats the low-profile. A jog wheel or knurled knob would be perfect
- I like all of the font choices - in isolation. Yes even the numbers, which are getting some heat. What irks me is the inconsistency of the fonts. I count 3-5 distinct typefaces. It would be very iconic if you used the number font on all keys. It screams ART and makes it stand out from bog standard keycaps.
- I know split is hard to engineer, but it's worth mentioning, because that would really knock this out of the atmosphere.
comment 4y ago · link · parent
I've played around with Hashicorp Consul on "edge boxes" - long-haul, wirelessly-connected embedded computers, with unreliable power supplies. Allowing edge boxes be Consul leaders results in all kinds of mayhem: split brain situations, corrupted state, stale DNS resolutions (Consul handles DNS as well), cats and dogs living together, mass hysteria. A much better topology is to have 3 server nodes on a LAN as the "head cluster" and letting all the edge boxes be clients of the head.
I haven't used it but Consul has a multi-datacenter mode, which I believe is designed to better handle such a situation, which I believe has a dedicated raft cluster per datacenter.
https://learn.hashicorp.com/tutorials/consul/federation-goss...
comment 4y ago · link · parent
The amount of frustration dynamic linking causes is just not worth it in today's day.
I think that calculus looks very different 20, 10, maybe even 5 years ago, when getting packages rebuilt and distributed from a zillion different vendors was much harder.
comment 4y ago · link · parent
I think this is the crux of it, moreso than the CGI Orgy (great term btw). You can have movies with visibly apparent CGI, or even straight up animated movies, but the action is great and still drives the plot and pulls on your heart strings. I know every beat of The Matrix by heart, but there's still a ton of suspense in every action shot, because each encounter adds some new angle to the power scaling. At the start, squad of mooks > 1 freedom fighter > several mooks, but even 1 agent is better than several FFs. Then that balance shifts.
Contrast that with the Smiths fight in the later films, and it's totally Conservation of Ninjutsu at play. Adding more baddies just divides the power of a single baddie, because we already know the outcome, so we know 1 Neo = N Smiths.
Watched Aquaman recently, same thing. Completely unprincipled power scaling. No reference frame, and it just scales up and up until it's CGI Army 1 vs CGI Army 2. That spectacle might work if I had more reference for the power levels, plus emotional investment, but I don't.
comment 4y ago · link · parent
Does anyone know if Erg code can be (ergonomically) called from python? I think that'd be the real killer feature, being able to write erg modules and pull it into the greater python ecosystem as easily as native python.
* looks like the project is nary a few weeks old? Can't really dig into the git history on mobile, it freezes my browser
comment 4y ago · link · parent
More people drive gas, so more gas vehicles continue to be available.
Biodiesel along with moving more of these passenger trucks to diesel would go a long way toward reducing overall carbon, but cost is the main issue there.
comment 4y ago · link · parent
It's all the ways in which it doesn't act like matter which make it interesting.
comment 4y ago · link · parent
It's just not a good model of the world. Soft features and belief-based links are a far better way to describe observations.
Basically, every edge needs a weight, ideally a log-likelihood ratio. 0 means "I have no idea whether this relation is true or false", positive indicates truthiness and negative means the edge is more likely to be false than true.
Really, the whole graph needs to be learnable. It doesn't really matter if NMR is a chromatographic method. Why do you care what kind of instrument it is? Then apply attributes based on behaviors ("it analyses chemicals", "it generates n-dim frequency-domain data")
comment 4y ago · link · parent
This is incredibly problematic for many reasons. Not the least of which is the inevitable promulgation of bad data/schemas. I remember one ontology for scientific instruments and I, a former chemist, identified multiple catastrophically incorrect classifications (I forget the details, but something like classifying NMR as a kind of chromatography. Clear indicators the owl author didn't know the domain).
The only thing worse than a bad schema is multiple bad schemas of varying badness, and not knowing which to pick. Especially if there is disjoint aspects of each which are (in)correct.
There may have been advancements in the few years since I was in the space, but as of then, any kind of probabilistic/doxastic ontology was unviable.
comment 4y ago · link · parent
I think the criteria are that it a) delivers/distributes content b) is a network, implying multiple nodes c) lowers the latency and/or bandwidth cost of data consumption, by d) leveraging geographically distributed redundancy and/or proximity. I think the key feature is geographically distributed redundancy which differentiates it from a regular cache.
comment 4y ago · link · parent
> A content delivery network, or content distribution network, is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance by distributing the service spatially relative to end users.
Emphasis mine. CDN implies some sort of edge-hosting topology (or at least more-proximal than the main servers).
comment 4y ago · link · parent
Was a fun project, but the cat-and-mouse feeling was inescapable. For those curious, look up the DARPA MediFor project. Siwei Lyu (in the article) did a bunch of work in this space. Also see Hany Farid and Shruti Agarwal. They've worked specifically with deep fake detection.
comment 4y ago · link · parent
comment 4y ago · link · parent
Asking the subject to hold up a mirror and move it around pushes the matte and inpainting problems to a whole nother level (though it may require automated analysis to detect the discrepancies).
I think that too might be spoofable given enough time and data. Maybe we could have complex optical trains (reflection, distortion, chromatic aberration), possibly even one that modulates in real time...this kind of just devolves into a Byzantine generals problem. Data coming from an untrusted pipe just fundamentally isn't trustable.
comment 4y ago · link · parent
I really like the idea of "practicing in order to devote less consciousness to it". I think this works well for a lot of low-thought tasks that aren't very mentally stimulating. Not sure about those where it requires conscious effort (paying taxes) but it's certainly a new avenue I haven't tried before.
comment 4y ago · link · parent
comment 4y ago · link · parent
I think Go is possibly simpler than Python. The syntax is smaller, no method overriding, and does not really have internals to the same depth as a VM language.