Better HN
topnewbestaskshowjobs
Log inSign up

kortex

8,495 karma · joined Feb 1, 2017 (9y ago) · 2,551 submissions

Submissions

comment 5y ago · link · parent

I've used Jetbrains products for five years. Updates are consistently an improvement. Even performance improvements from time to time, which is fantastic since it is a heavy java application. They were quick on the take with Docker integration, latest Cmake updates, even some Go2 generics support already.

comment 5y ago · link · parent

Of course global state is useful. All interactions with the universe (all i/o, anything with time) involve global state. So what makes DB's a smart pattern but global variables usually bad?

It gets hairy whenever you have "behind your back" mutation within a single scope. Because db calls are costly, people usually batch the transaction and pass the result to mostly pure functions. If you were to do something silly like wrap a Redis get/set in a Mapping, it'd feel an awful lot like a global dict.

This is why things like transactions, event sourcing, and the reactor pattern exist. You batch all i/o to the global state so you a) deal with immutable structures everywhere else b) have ACID c) have traceability.

comment 5y ago · link · parent

IMHO the cleaner way to achieve this is some sort of message/reactor pattern, passing data to some in-process event sourcing store, that way you don't have things altering globals willy-nilly.

However, I recently needed to just yeet some large data objects across two contexts. The solution I used was the Borg pattern with a Mapping interface and with an RLock around getitem/setitem.

It feels surprisingly clean. It behave much like an external message queue, which is what it was replacing.

https://github.com/faif/python-patterns/blob/master/patterns...

comment 5y ago · link · parent

> Some economists have tried arguing that advertising adds value to products, but I think it only hinders people from making choices based on the product's merit. It's a distortion of the market.

Precisely. Spec sheets, unbiased reviews, ratings systems that vet purchases, those add value. Almost by definition, what we consider advertisement is designed to distort humans from making rational free-market choices. Stretching the analogy: Attention is finite, therefore every ad you consume moves you further from perfect information.

That's a purely pragmatic argument without getting into the whole bit where ads use all sorts of psychological tools to shape behavior.

comment 5y ago · link · parent

I look forward to the slow but steady reinvention of various coreutils in Rust or Go. Rg-ripgrep is better than grep. Fd-find is better than find. Exa is better than ls/tree. Fzf has no equivalent. I'm still looking for a ping that lets me timeout less than 1 second.

There are so many assumptions baked in to the early tools that a complete rewrite just bypasses.

comment 5y ago · link · parent

Loguru is a great package for "I just want a nicely formatted logger out of the box"

comment 5y ago · link · parent

This is my life right now: reckoning with optimizing a ROS1-based system that was itself hacked together in record time.

ROS seems almost like it wants to distribute state by default. And it has no primitives for sanely managing distributed state, health checks, etc. The lego brick approach to camera drivers is great, but trying to orchestrate all those bricks is a nightmare. Rosparam/master is woefully inadequte as a control plane.

I recommend anyone in this space look at tools like Consul.

comment 5y ago · link · parent

https://news.ycombinator.com/item?id=25257932

My 10,000' view understanding:

- Small feature size. M1 is a 5nm process. Intel is struggling to catch up to TSMC's 7nm process

- more efficient transistors. 7nm uses finFet. M1 probably uses GAAFET, which means you can cram more active gate volume in less chip footprint. This means less heat and more speed

- layout. M1 is optimized for Apple's use case. General purpose chips do more things, so they need more real estate

- specialization. M1 offloads oodles of compute to hardware accelerators. No idea how their code interfaces with it, but I know lots of the demos involve easy-to-accellerate tasks like codecs and neural networks

- M1 has tons of cache, IIRC, something like 3x the typical amount

- some fancy stuff that allows them to really optimize the reorder buffer, decoder, and branch prediction, which also leverages all that cache

comment 5y ago · link · parent

Minor correction: 4.0 lox/methane is stoichiometric. 3.8 is rich. 3.55 is very rich. It runs fuel rich to keep cool and possibly increase specific impulse.

comment 5y ago · link · parent

The adiabatic temperature peak is stochiometric. However dynamics can shift the peak temperature lean or rich.

However, SpaceX is also tuning for engine temperature control and specific impulse. Raptor runs ~3.55 lox/methane (very rich), 4.0 is stoich.

https://www.researchgate.net/publication/255632584_On_the_Of...

comment 5y ago · link · parent

The trick is to find "fault lines" throughout your monolith - places where it's easy to create separation of concerns and narrow interfaces. Maintain and document these like they are external APIs. Only pass simple data through it (serialized or anything easy to serialize).

When the time comes, cleave these chunks off and wrap them in RPC/REST/graphql.

It's good form even for monoliths since it makes for an easy interface to test.

comment 6y ago · link · parent

What really made monads click for me is when I read Monads for Go Programmers [0], drawing a comparison between pointers and functors:

> We can think of a functor as a container, which contains one type of item. ... > A pointer: *T is a container that may be empty or contain one item;

Despite that comparison probably making seasoned FPers groan, that was a big clicking moment for me.

Thinking along the lines of nullary-function:pointer::return:dereference, frames Linus' abstraction in an interesting light. You're manipulating the "function which yields the struct", not the struct itself. In fact it looks much closer to a map than the cs101 blurb in that now all nodes can be treated symmetrically.

[0] - https://awalterschulze.github.io/blog/post/monads-for-goprog...

comment 6y ago · link · parent

Agreed. It's a controversial opinion that opinionated languages/formatters are the way to go. :)

comment 6y ago · link · parent

Alcohol is so odd. By virtually every metric, it is or is among the worst: narrow active/lethal window, high absorption rate, high addiction potential, high physical harm, high societal harm, and an almost diabolical ability to nerf motor skills while simultaneously reducing risk perception and overestimating skill.

If you objectively listed ethanol's effects on paper without the name, people would clamor to ban it. Yet we all know how that went over. And the fact is societies largely coexist with it. It should be the poster child for how sensible drug legalization won't cause western civilization to crumble.

comment 6y ago · link · parent

Vers- is just from versus "opposite/against". But versine isn't opposite of sine, if anything it's opposing cosine. I too am curious this how this naming convention arose.

comment 6y ago · link · parent

This really hammers home the advantage of this notation. It leads naturally to the question, "What is the operation when we leave the bottom right constant?" which Grant calls "O-plus" (tex call it \oplus), which is in fact related to the harmonic mean (which is n times the o-plus of the terms). I don't know if there's a better term for "o-plus" other than "reciprocal sum of reciprocals". Maybe "optical sum" which kind of makes o-plus make even more sense?

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

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

comment 6y ago · link · parent

IMHO, the "deeper truth" is addition is translation and multiplication is rotation/stretching (at least when it comes to rings and fields).

It involves getting a geometric understanding of e to the pi i, and 3blue1brown explains it better than I could:

https://www.youtube.com/watch?v=F_0yfvm0UoU [6.28 min]

https://www.youtube.com/watch?v=v0YEaeIClKY [3.14 min]

https://www.youtube.com/watch?v=mvmuCPvRoWQ [25 min]

comment 6y ago · link · parent

Talking "feeds and speeds", 7 feet per minute (1.4"/s) as a feed rate would obviously be crazy fast, so I presume this is the "speed", the linear reciprocating speed of the chain.

It's less "cutting" and more "crunching" its way through. Sheer brute force plastic deformation.

comment 6y ago · link · parent

If Global Warming were in fact a nuclear-tipped communist regime directly threatening American Way of Life, instead of a creeping international issue jeopardizing food and fresh water, creating distributed violence threatening American Way of Life, we would have had Fusion licked in the 70's or 80's.

comment 6y ago · link · parent

This is absolutely an element at play at NIF. In fact not just the physics brains, but the experiments themselves, play a role in getting around test bans. To the point where nuke stewardship (ensuring aging warheads still will work) interferes with fusion physics.

comment 6y ago · link · parent

Only if you have bad sleep schedule. Or bad sleep out of your control (eg apnea). Or insomnia. Or DPSD. Or a chronic condition. Or ADHD. Or...

Many people are in at least one of the bins that benefit from naps.

comment 6y ago · link · parent

RAW imagery I have worked with is about 25-50% losslessly compressible on average. Most of your gains in image compression are from quantizing the gamut in clever, (usually) imperceptible ways.

Raw imagery contains a lot of entropy that usually doesn't affect the appearance perceptually, but still has sig figs that frustrate compression.

comment 6y ago · link · parent

> but doesn't even mention one other. Which is an editorial choice.

That's some weird hot take on a 20 min video titled "The CIA is a Terrorist Organization". He's obligated to mention Moussad, KGB/FSB et al, because "both sides"?

Also last I checked, "we only did shady shit cause they did shady shit" isn't much os a defense anyway.

comment 6y ago · link · parent

A few thoughts:

- holy jargon, Batman! From what I've gleaned, "holographic" refers to Tony Plate's Holographic Reduced Representations

- "hypervector" is just a swanky term for very-high-dimensionality vectors, a la "hypersonic", "hypervisor", hyper-encabulator, etc.

- this reminds me an awful lot of thought vectors. The first abstract linked mentions HRRs alongside semantic vectors, so both are types of hypervectors I think?

- this also reminds me of Numenta/Nupic/sparse distributed represntations. I think SDR's are also hypervectors?

comment 6y ago · link · parent

I've read Bazel without the rest of Google tooling (giant monorepo of everything, distributed build farms, etc) the experience is nowhere near the same.

comment 6y ago · link · parent

They already aren't a stream of bytes. There's time and permission metadata, which tar, cp, rsync and friends may or may not handle in various ways based on option flags.

I guess it boils down to what is "application data" and what isn't.

comment 6y ago · link · parent

This infuriates me. There are so many problems I run into, day-to-day even, which could be readily solved if files/folders just had a stringly-typed key-value metadata store of arbitrary size which was portable-ish across file systems. Heck, even just one bytes field I can dump json or some serde into, that doesn't impinge on the actual file bytestream. xattr is close but no cigar.

Instead you either need sidecar files, archives, or custom binary formats.

It's as if the posix filesystem abstraction crystallized a bit too soon (same like tcp/ip)

comment 6y ago · link · parent

Did you know it was diet? Given this article and some of the linked research, it seems like even incorrect knowledge of the caloric content has effects on the system. Would be cool to blind yourself to it and analyze the results of caloric vs diet soda.

comment 6y ago · link · parent

I've been experimenting with a technique for string vectorization: create a "basis space" of N random strings. The vector of string S is

`[edist(S, b) for b in basis]`

Where edist is some Levenshtein edit distance. You can build feature vectors from these by analyzing adjacency within logical blocks. Take other known Go software, obfuscate it, and vectorize it on the same basis. Even though the obfuscation is random, similar code chunks should project to a similar "shape" manifold.

1
656667
86