Better HN
topnewbestaskshowjobs
Log inSign up

bos

1,351 karma · joined Jul 16, 2009 (17y ago) · 71 submissions

Submissions

1.

Jj-musubi: live sync for Jujutsu(serpentine.com ↗)

2 points · by bos · 6d ago · discuss

comment 1mo ago · link · parent

If you don’t already know about folds, arguably yes.

If you do, then a quick glance at whether you’re using foldl’ or foldr tells you about what the function is allowed to do, which cuts down a little on comprehension.

List traversals are typically compact enough that there’s not a huge difference either way.

One advantage of using a fold, even in these cases, is that newcomers to Haskell often get so carried away with (and confused by) the power of pattern matching that they’ll write bizarre overly-complicated list traversals by hand, when a simpler mechanism exists that they just haven’t yet internalized.

comment 2mo ago · link · parent

Correct.

comment 2mo ago · link · parent

Author here. I wrote jj-stack because I've spent much of my career doing stacked code review (Arcanist at Facebook, more recently Graphite with my current team) and I wanted that workflow with Jujutsu's editing model.

The core idea is simple: one jj change becomes one GitHub PR, and your local history defines the stack. Reorder, split, squash, or amend locally with ordinary jj commands, run jj-stack submit again, and the existing PRs update in place with their reviews intact. It uses GitHub's native stacked PRs, and handles merging and the local cleanup afterwards.

The heavy lifting was in its safety model. Local jj history and GitHub can each change without the other knowing, and an interrupted submit or network flap can leave part of a stack updated. Someone can squash-merge or rebase your stack from the GitHub UI, which might strip the metadata jj uses to recognise changes. jj-stack checks both sides before it acts, verifies rebased stacks by ancestry and file content, and acts carefully. A large share of the test suite (including an extensive Hypothesis property test suite) exists to exercise these cases.

5.

Jj-stack: stacked GitHub pull requests for Jujutsu(serpentine.com ↗)

4 points · by bos · 2mo ago · 1 comment

6.

My e-reader lost its stripes(serpentine.com ↗)

21 points · by bos · 2mo ago · discuss

comment 3mo ago · link · parent

temacs, in older versions of Emacs, is an intermediate build product, never something that is installed. It’s created fairly late during the build, then loaded up with the standard library, undumped, and that is the emacs that is installed.

comment 3mo ago · link · parent

Claude slop. "durable base", "That is real money", "those are requests, not appropriations", etc etc.

comment 4mo ago · link · parent

Could be, for which the first attested use is in 1965 or so. Still doesn’t help.

comment 4mo ago · link · parent

While fun and satisfying, this is extremely unlikely to be true.

The first attested use is from 1945, on the nose of a P-47 Thunderbolt flown by Captain Milton Thompson of the 509th Fighter Squadron. And his art was exactly what you'd expect: a charging bull with the words "balls out".

comment 5mo ago · link · parent

It starts in the very first paragraph. “The headlines say yes. […] The headline is wrong.”

And there are numerous such examples. “That was half true. The kill chain ran. The interceptor did not.”

LLMs produce staccato, ugly chains of sentence stumps like this all the time. They’re easy to spot, and your essay is littered with them.

If anything, spending a week on a project like this seems liable to blind you to the shortcomings of the prose, because after putting in a lot of effort you can’t read it with fresh eyes. That’s what editors are for, but an LLM is by nature very weak at editing LLM-generated text.

I want to be able to offer constructive feedback on the structure of the overall essay, for example that the interspersed animated/interactive models often don’t seem strongly connected to the text, but simply reading the words makes this a grind.

comment 5mo ago · link · parent

This is an exhausting and dispiriting article to try to read because of its short, choppy, clearly AI-generated sentences. The topic is interesting, but whoever caused it to be penned didn’t seem to care enough to make it appealing to read.

comment 6mo ago · link · parent

Your backstory is complete nonsense.

Liberty Utilities has nothing to do with libertarian separatists. It's a brand name of Algonquin Power & Utilities Corp, a boring Canadian infrastructure conglomerate that buys regulated water, gas, and electric systems across North America. They bought this chunk of rural California grid from NV Energy in 2009. That's it.

comment 8mo ago · link · parent

This is sort of a revival and elaboration of some of Bram’s ideas from Codeville, an earlier effort that dates back to the early 2000s Cambrian explosion of DVCS.

Codeville also used a weave for storage and merge, a concept that originated with SCCS (and thence into Teamware and BitKeeper).

Codeville predates the introduction of CRDTs by almost a decade, and at least on the face of it the two concepts seem like a natural fit.

It was always kind of difficult to argue that weaves produced unambiguously better merge results (and more limited conflicts) than the more heuristically driven approaches of git, Mercurial, et al, because the edit histories required to produce test cases were difficult (at least for me) to reason about.

I like that Bram hasn’t let go of the problem, and is still trying out new ideas in the space.

comment 11mo ago · link · parent

Really nice to see a solidly valuable project develop a sustainable foundation instead of turning into yet another VC-backed devtools startup that will inevitably die in a few years.

comment 1y ago · link · parent

This is a bizarre essay by someone who understands neither functional programming nor the history of computers.

> To be kind, we’ve spent several decades twisting hardware to make the FP spherical cow work “faster”, at the expense of exponential growth in memory usage, and, some would argue, at the expense of increased fragility of software.

There is not one iota of support for functional programming in any modern CPU.

comment 1y ago · link · parent

Should say "(2018)".

comment 2y ago · link · parent

No, this isn’t a good description of monads. It merely describes a case that shows up sometimes.

comment 5y ago · link · parent

The wreck is actually from a 1986 crash that saw no fatalities.

https://www.facebook.com/199535516767620/posts/4006006656120...

comment 8y ago · link · parent

Yes, and in fact this can even be done incrementally and efficiently these days.

One example is the open source tool Infer, which we run on very large bodies of native and Java code at Facebook. http://fbinfer.com

21.

Facebook's evolutionary search for crashing software bugs(arstechnica.co.uk ↗)

3 points · by bos · 9y ago · discuss

comment 9y ago · link · parent

Let me put Mike's comment into what I think is its proper context. "Poor support for numerical computing" really means "relative to Mike's dream, which is not actually realisable by any programming language today" :-)

Most readers seem to be misinterpreting Mike as anchoring off other popular programming languages of today, whereas he's looking for language features for which there's (a) no consensus that they'll actually be good when they exist, and (b) don't yet exist. (I'm highly skeptical of dependently typed programming.)

I think that there's a case to be made that numeric programming in Haskell, relative to the state of the art of today rather than the year 2100, really isn't so great – but my concerns are very different than Mike's, and revolve around libraries rather than type system features.

Source: have done a bit of Haskell in my day.

comment 9y ago · link · parent

Facebook has large engineering offices in New York, Seattle, London, and Tel Aviv, and smaller presences in Boston and Dublin.

There's also a vast range of engineering projects, from VR through video, mobile apps, machine learning, compilers and programming languages, operating systems, on to data centers.

comment 10y ago · link · parent

There have been numerous well-known problems with the Java and Python standard libraries over the years. For instance, the date/time classes in Java were a disaster for a long time, and Python has taken decades to converge on a nearly-good-enough treatment of strings.

comment 11y ago · link · parent

A small correction: GHC uses plenty of type tagging information. In fact, its metadata overhead is relatively high.

comment 11y ago · link · parent

I think of programming in Haskell as being more about being able to choose a level of abstraction that makes sense for the situation.

The more abstract code is great when it works well, and when it falters I can easily drop down to something more concrete, or even to C, and still have most of my code benefit from that higher level of thinking.

27.

Markup.rocks – in-browser markup edit, preview and conversion(markup.rocks ↗)

2 points · by bos · 11y ago · discuss

comment 11y ago · link · parent

In fact, it turns out the Pusher protocol is all JSON, so you can autogenerate the code.

Here's a Pusher message.

  {
    "event": "pusher:error",
    "data": {
      "message": String,
      "code": Integer
    }
  }
Here's the corresponding Haskell.

  {-# LANGUAGE DeriveGeneric #-}

  import GHC.Generics

  -- a generic wrapper type for all Pusher events
  data Event a = Event {
      eventType :: Text,
      eventData :: a
    } deriving (Generic)

  instance ToJSON a   => ToJSON (Event a)
  instance FromJSON a => FromJSON (Event a)


  data Error = Error {
      message :: Text,
      code :: Integer
    } deriving (Generic)

  instance ToJSON   Error
  instance FromJSON Error

comment 11y ago · link · parent

I know nothing about the Pusher protocol, but the standard approach to boilerplate encoding/decoding problems these days is to use GHC.Generics.

It doesn't always fit (typically when your data structures don't resemble the wire encoding), but it kills all the boilerplate when it does.

Since you say that you can magically get away without boilerplate in Ruby in this case, I would expect that the Generics approach will give exactly the same result.

comment 11y ago · link · parent

Right there on the front page: "We are also working on an Android implementation which we will release later."
123