Better HN
topnewbestaskshowjobs
Log inSign up

kortex

8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions

Submissions

comment 4y ago · link · parent

I find Twisted less accessible and more opaque than async. It's also more "bolted on" in that it's an entirely separate library/framework outside the standard lib.

Async might technically be bolted on, but no worse than async in most languages which weren't designed de novo for async (eg go/elixir).

comment 4y ago · link · parent

I think WiFi is better abstracted and layer-delineated though. Wifi has a lot of complexity but it largely feels like necessary complexity, and the physical layer, data layer, and application layer all mostly stay in their lane. Bluetooth is a mishmash of accidental complexity with physical layer leaking data layer abstraction, and the application/data boundary is even more blurred. Instead of dumb pipes, you have to worry about codecs and the like, of which there are myriad vendor specific ones.

comment 4y ago · link · parent

It depends who, what, and when the error is about. Failures are generally a bathtub curve. You have a high rate at start (usually configuration issues), some fairly fixed rate during operation, and then more at end of lifecycle (exhaustion, service hiccups on scale-in).

If it's in the early lifecycle, absolutely, because it's most actionable. X is set wrong, Y can't be reached, etc, guide whoever is operating the system how to fix it.

If it's mid cycle, it's often post-hoc, but context is worth its weight in gold. Less about telling the operator how to fix and more about why it broke, to avoid in the future.

End of cycle, whatever.

comment 4y ago · link · parent

Sure, but my point was there that it's really easy to use KVs as a backing store for tags, which you can implement anywhere and easily serialize. Sets, if you have to do something like transform it to JSON, you have a choice to make: dict:true, or list.

comment 4y ago · link · parent

> It means that you're building a knowledge base.

That's precisely the problem. You started with tags and now you are building a knowledge base. You wanted a banana and now you have a gorilla holding a banana and the whole jungle. If you want to build a knowledge base, use links/URIs/ontologies.

You'll find out the moment you add cycles the algorithms get way more intense. And then once you have stronger algos, you want more search power. Next thing you know you are bikeshedding about things like "apple" is both "fruit" and "tech company" so you need tags-of-tags etc. Just build a knowledge base if you need a knowledge base. Otherwise tags are just a way to do faceted search.

They aren't mutually exclusive, either.

OpenTelemetry, for example, has both tags and references.

comment 4y ago · link · parent

Nice that the ROS community is starting to get hip to web/cloud community innovations. Back when I worked on ROS heavily (about 2 years ago), it felt like there were tons of cases of Not Invented Here syndrome. Rosparam server, service discovery, some of the rpc concepts. Just felt like a large chunk of the stack could be replaced with pre-existing technologies that could do the job better and with more features.

TFA is traditionally the sort of thing someone would write a full solution for, entirely in ROS, and it would be rickety and opinionated, but refreshingly, they just use Prometheus, with enough Ros binding to capture the auxiliary data.

comment 4y ago · link · parent

I think tag aliases are fine, but in my opinion, tags should not have hierarchies. That is just opening the can of ontology worms, and most systems are ill-equipped to deal with ontologies...including ontological systems.

Tags are just dumb strings which label data. They are basically KeyValues, where the value is just always equal to True. We don't think of KVs as hierarchical unless they are explicitly a path string, and in that case, they are forced to be a plain tree with no cycles or diamonds.

comment 4y ago · link · parent

This drives me absolutely bonkers. We had a situation in a machine learning context where we should have been treating the output of a detector as NaN (it was deliberately opting out), but instead it was falling back to zero.

Last I checked (this was years ago) the way to deal with this is to wrap it in a sub-message (which are actually nullable), which is just kinda gross.

comment 4y ago · link · parent

They are complementary. I've had code reviews pick up gaps in unit tests (e.g. the code is covered, but the state space isn't), and I've had code reviews miss some absolute doozies. Also code review is as much about sharing knowledge and reducing bus factor (if not more so) than acting like some great filter.

comment 4y ago · link · parent

That's assuming the thing you are currently doing is what crashes, and not instead creating data (a document, a compiled binary, a financial transaction, a crypto key) which is silently corrupted and the corruption is only detected way later. C.f. xerox photocopier bug (not saying that was a memory bug, example is an insidious bug).

https://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres...

comment 4y ago · link · parent

I'm in Upstate New York and despite my penchant for gardening, I'm hardly an agricultural worker. Any urban-geofenced product is useless to me and the half a million folks in the greater capitol area and nearby counties aside from the tricity residents. Which is at least 50% of the folks. Hardly a passing grade, let alone big win.

comment 4y ago · link · parent

Lidar can't see through fog (or snow/rain to enough of a degree), which is one reason tesla has avoided it. Do you mean radar? In the case of radar, I would hope that it becomes a base features of all cars eventually to avoid/mitigate rear endings by preemptive braking.

comment 4y ago · link · parent

As of recent I've been weirdly fascinated with codecs, serialization protocols, file formats, and the like. It scratches that low-level hacking itch (I spent most of my professional programming in web dev space) without as much commitment to electronics (used to be super big into arduino but I find that's harder to pick up and put down).

I've started hacking on my own container format (yeah, I know, xkcd927), after finding it super frustrating to embed arbitrary time-synched data streams into mp4/matroska/ogg/etc. Also it bugs me how crusty, complicated, and arcane mp4 is, and at the same time, mastroska and ogg are weirdly opaque given how they are supposed to be open standards.

If anyone is curious, here's my container format I've been developing: https://github.com/xkortex/sito

comment 4y ago · link · parent

I think you added some zeroes there. HMS Queen Elizabeth carries about 1.75 million gallons of fuel [1]. she has to fuel up about twice to sail 26,000 Nmi [2]. Pacific is about 8000 Nmi, so round tripping would be roughly a full tank.

1) https://www.royalnavy.mod.uk/news-and-latest-activity/news/2...

2) https://declassifieduk.org/royal-navys-gunboat-diplomacy-is-....

comment 4y ago · link · parent

I love this idea. I would wager that calcium carbonate dust has a higher ballistic coefficient than SOx (ratio of mass to cross section, a measure of ability to stay aloft), meaning if we overdo it (unlikely but the most common concern), the decay rate would be faster.

Plus would also mitigate acid rain somewhat, and isn't noxious the way SOx is.

comment 4y ago · link · parent

Even if we don't figure out green hydrogen for some time, I'd be okay with diverting some amount of fossil fuel consumption to essential chemical processes, like Haber-Bosh ammonia and plastics, while cutting drastically the systems that don't strictly need hydrocarbons for their purpose. Hydrocarbons are wildly useful chemical precursors, it's kind of a shame they are mostly used just for burning.

comment 4y ago · link · parent

Then we stop increasing albedo for a bit. Basically PWM-ing the Earth's solar flux. As long as the decay time of the albedo modification is known, it's quite unlikely that we could induce a snowball earth.

comment 4y ago · link · parent

That's wild. So every column is fixed width?

Is anything nullable, or for like the user_data column, do you just use 0x0 to indicate no record?

comment 4y ago · link · parent

> using one buffer for multiple strings is just a type specific arena allocator.

Sure, but there's a lot of advantages of entirely controlling memory allocation in-process.

> this approach is going to be EXTREMELY wasteful.

Could you elaborate why? Sure, you have to do a bit more juggling in-process, but I would imagine this would be potentially more efficient than having conventional mallocs.

In the environment it is designed to operate in, there is usually a fixed memory limit per process, so you might as well grab all that up front.

comment 4y ago · link · parent

I just learned about using this tag in github comments for hiding full tracebacks or large code blocks and it is such a usability game changer.

comment 4y ago · link · parent

Depends what version python you are on and what work you are doing. Our application deals with user calendars and scheduling across multiple calendar providers (google, microsoft, zoom, you name it), so I deal with the full brunt of timezone complexity all the time.

I use the stdlib datetime.datetime with pytz, with a few in-house helper functions, and it's frankly kinda awful across the board but we deal with it.

Pendulum is really nice, and I want to use it as my daily driver, but I unfortunately found some timezone bugs [1] in v2 that make me hesitant to trust it for what we are doing in production (it screws up DST when doing `.utcoffset()`). If you aren't constantly dealing with data timezones from all over the world, it's probably fine, and it's the only one that the least surprising thing at each step.

Pytz has the whole .localize footgun.

The std datetime lib has horrible ergonomics and can't even cope with IANA timezones until the zoneinfo module was introduced in 3.9. Every single day it bugs me that the classes `datetime` and `time` are lowercase, and there is no consensus on datetime.datetime vs from datetime import datetime.

I tried using arrow and while I applaud them for moving away from the horrible datetime class, that makes it pretty much incompatible with any other time library, including things like pydantic and orjson.

I don't have much experience with dateutil.

1 - https://github.com/sdispater/pendulum/issues/655

Seems to have started in 2.x but is fixed in the 3.0alpha. You have to be specifically using utcoffset, which in general is probably not something you should do and use the timezone types to do conversions, but it was enough to give me pause

comment 4y ago · link · parent

I watch this channel on the regular and... yeeeahhhh this is right on the money. It's definitely not neutral journalistic reporting of the war, and plays pretty fast and loose with "footage that some viewers might find disturbing". Heck, his catchphrase, "Knock em out cold" is pretty obviously a euphemism for killing russian soldiers. If anything I'm surprised he has survived this long without being demonetized or straight up stricken out (Cody's Lab nearly got struck out for far less).

comment 4y ago · link · parent

Yes, with actual police. Why anyone would use a government- issue email tied to their identity to traffic CP is absolutely beyond me.

comment 4y ago · link · parent

It'll be in good company with dialing, film, photograph, watching the tube, etc.

Actually photograph was already out of date, because graph had morphed from "to write" to making any kind of image. Which itself I believe meant something akin to inscription /engraving.

Actually while photograph may no longer be a graph as in image on a surface, in some ways it's still an image impressed on rocks. Made using lithography. Have we gotten closer to its roots?

comment 4y ago · link · parent

Thanks! This is pretty sleek! I'm going to have to dust off my homelab and play around with this.

What is the stack written in? Looks like a lot of javascript and makefiles from the github side of things but idk if that's the whole kit and caboodle.

comment 4y ago · link · parent

What does the landscape look like now for "terraform for bare metal"?. Is ansible/chef still the main name in town? I just wanna netboot some lightweight image, set up some basic network discovery on a control plane, and turn every connected box into a flexible worker bee I can deploy whatever cluster control layer (k8s/nomad) on top of and start slinging containers.

comment 4y ago · link · parent

Germany's energiewende has been faltering even before the energy crisis. But what do they have a ton of? I can guarantee their coal consumption will increase before it even thinks about dropping again.

comment 4y ago · link · parent

Language is the real AI and its been improving itself since the first word was used between two people.

comment 4y ago · link · parent

I just updated the github page with my current state of notes, in case folks are curious to some of the details.

https://github.com/xkortex/sito

1
232425
85