HN user

mwsherman

3,607 karma

https://clipperhouse.com/

Posts260
Comments396
View on HN
clipperhouse.com 9mo ago

Making Unicode things fast in Go

mwsherman
2pts0
marketplace.visualstudio.com 9mo ago

Show HN: Go Allocations Explorer for VS Code

mwsherman
4pts0
clipperhouse.com 10mo ago

Allocations Are a Dependency

mwsherman
1pts0
www.youtube.com 10mo ago

I deal with copyright claims [video]

mwsherman
2pts0
clipperhouse.com 10mo ago

Yagni for Distributed Rate Limiting

mwsherman
1pts0
github.com 11mo ago

Show HN: A more composable rate limiter for Go

mwsherman
1pts0
www.youtube.com 11mo ago

Casey Handmer on powering data centers [video]

mwsherman
4pts0
twitter.com 11mo ago

Is a "routing" LLM isomorphic with a single large model?

mwsherman
2pts1
clipperhouse.com 1y ago

Designing a Composable Rate Limiter

mwsherman
4pts0
ziglang.org 1y ago

Self-Hosted x86 Back End Is Now Default in Debug Mode

mwsherman
1pts0
github.com 1y ago

Poor spill decisions making code 14% slower

mwsherman
8pts0
statmodeling.stat.columbia.edu 1y ago

The River, the Village, and the Fort: Nate Silver's New Book, "On the Edge"

mwsherman
2pts0
clipperhouse.com 1y ago

C# almost has implicit interfaces

mwsherman
53pts71
github.com 2y ago

Splitting Words Correctly in C#

mwsherman
2pts0
clipperhouse.com 2y ago

Tips for moving between Go and C#

mwsherman
2pts1
clipperhouse.com 2y ago

Tips for moving between Go and C#

mwsherman
3pts0
github.com 2y ago

A fast Unicode tokenizer for C#

mwsherman
3pts0
clipperhouse.com 2y ago

Go-style "alongside" testing in C#

mwsherman
3pts0
clipperhouse.com 2y ago

Apple as MVNO for LLMs

mwsherman
1pts0
clipperhouse.com 2y ago

Apple as MVNO for LLMs

mwsherman
1pts0
github.com 3y ago

CLI for splitting words the Unicode way

mwsherman
2pts0
github.com 4y ago

Splitting Words the Unicode Way

mwsherman
2pts0
github.com 6y ago

Fast Unicode text segmentation for Go

mwsherman
2pts0
github.com 6y ago

Unicode Text Segmentation for Go

mwsherman
2pts0
github.com 6y ago

Show HN: Unicode Text Segmentation for Go

mwsherman
3pts0
github.com 7y ago

Jargon, a lemmatizer for Go

mwsherman
1pts0
clipperhouse.com 7y ago

Generics as builtin typeclasses (in Go)

mwsherman
2pts0
clipperhouse.com 7y ago

Query expansions in Stack Overflow Talent

mwsherman
1pts0
clipperhouse.com 8y ago

Does TypeScript make for more performant JavaScript?

mwsherman
2pts0
clipperhouse.com 8y ago

Having the courtesy to be wrong

mwsherman
1pts0
Go subtleties 9 months ago

That’s true, converting in either direction will typically allocate. Which it must, semantically.

One can use unsafe for a zero-copy conversion, but now you are breaking the semantics: a string becomes mutable, because its underlying bytes are mutable.

Or! One can often handle strings and bytes interchangeably with generics: https://github.com/clipperhouse/stringish

Go subtleties 9 months ago

There is mention of how len() is bytes, not “characters”. A further subtlety: a rune (codepoint) is still not necessarily a “character” in terms of what is displayed for users — that would be a “grapheme”.

A grapheme can be multiple codepoints, with modifiers, joiners, etc.

This is true in all languages, it’s a Unicode thing, not a Go thing. Shameless plug, here is a grapheme tokenizer for Go: https://github.com/clipperhouse/uax29/tree/master/graphemes

Go subtleties 9 months ago

In Go, string effectively serves as a read-only slice, if we are talking about bytes.

ReadOnlySpan<T> in C# is great! In my opinion, Go essentially designed in “span” from the start.

I move between Go and C#. I wrote a zero-allocation package in Go [1] and then ported to C# — and the allocations exploded!

I had forgotten, or perhaps never realized, that substrings in C# allocate. The solution was Spans.

Notably, it caused me to realize that Go had “spans” designed in from the start.

[1] https://github.com/clipperhouse/uax29

Putting on eng manager hat, the problem to solve is that this regression went undetected, not that Safari is slow.

The solution is a test that fails when Chrome and Safari have substantially different render times.

As you get into this, you’ll want to improve the tokenization to something less naive. (The naive approach is fine for the educational purpose of the article.)

I’ve made the mistake of simply splitting on spaces or punctuation, and eventually finding that will do the wrong thing.

Eventually I learned about Unicode text segmentation[0], which solves this pretty well for many languages. I believe the default Lucene tokenizer uses it. I implemented it for Go[1].

[0] https://unicode.org/reports/tr29/ [1] https://github.com/clipperhouse/uax29

Bullshit Jobs 8 years ago

What allows a firm to stay competitive if there are many apparently wasteful tasks being done? Should that firm not be superseded by competitors offering better efficiency (reflected in prices) or consumer benefit?

I keep coming back to theory-of-the-firm: https://en.wikipedia.org/wiki/Theory_of_the_firm

An industry that accommodates a lot of bullshit work is an industry with high transaction costs. The author hints at that at the end of the article, but leaves it an open question.

If they really want to redistribute, they could reduce prices. They could return to shareholders, sure, but returning to the market (of their customers) would be more economically valuable.

Think in terms of natural selection. Behaviors (and personalities) that make more successful choices in that environment will tend to survive in the environment, regardless of whether they know what they are doing.

Most of the bumbling fails. Some of the bumbling works. And so the most “effective” politicians (and organizations) will survive, even if their success has little to do with deliberate scheming.

Another word for complexity is diversity. Resilience comes from that complexity. Very much like biology.

NYC (where I live) is wildly inefficient, except at delivering benefits that millions of people consider worthwhile.

This is a perfectly reasonable intuition – that there will be large net loss of jobs as trucks are automated – but we should not mistake the intuition for evidence. There is a long history of believing that massive job losses are imminent due to technological advance.

The problem with mistaking this fear for a fact is that it often leads to an incorrect intervention. (I call this a WMD argument.)

We’d be much better served with much greater caution about what is actually, observably, measurably true. In this case, we’d have to discover the yet-unfound correlation between technical advance and employment rate.

A little meta-civility goes a long way, too. If one is inclined to call people jerks, bozos and assholes, perhaps one is not understanding people very well.

It’s much more effective to work learn about people, their predilections, biases and experiences. No one is a “checkbox” asshole. Much better to focus on specific behaviors, instead of writing off a person as a type.

When I see a company describe its “no assholes” rule, I see a company inclined toward calling people assholes.