What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

0

Yesterday, I had a realization about boilerplate code.

It seems like there are certain tasks (writing a compiler, writing a graphics pipeline) which involve rewriting a lot of code that is very well understood. So why can't this just go into a library? Why does it take a thousand lines of code just to get a triangle on the screen, or to write a basic bidirectional elaborator?

It is because the *surface area of customization* is very large, and it's far easier to customize code that you have written than it is to expose exactly the right options in a library. There are just so many choices to make, and all of them make sense in *some* scenarios, that it doesn't make sense to abstract. The user of an abstraction library would need to effectively give the library as much information as it would take to simply write it yourself.

An abstraction layer is going to have to make some strong assumptions about what you want.

For instance, you could use a game engine, or you could use Racket and avoid writing a parser at all. But these aren't exposing the underlying API in a concise way, they are writing lots of algorithms that use the underlying API in particular patterns, patterns which you may or may not want.

So I think I've gotten over my aversion towards boilerplate. I now think of boilerplate not as "a tax I have to pay in order to do something I care about" and rather as "a visual representation of the space of decisions I can make about the thing I'm working on." Which is cool!

Viva la boilerplate!

0
1
0
1
0
0

Unser PO hat heute mein -T-Shirt in der Spezialedition gesehen und sagte: Du meintest, das am Wochenende war eine Hacker-Konferenz. Also kann das mit der Trans-Flagge keine Absicht sein, richtig?"

Er hat noch so viel zu lernen :D

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0

@catsaladCatSalad🐈🥗 (D.Burch) :blobcatrainbow: @soatokSoatok Dreamseeker Fuck yeah. May I present some musical accompaniment? thedoubleclicks.bandcamp.com/t

I'd say it's my favorite song that includes the work "toxoplasmosis", but I am not sure I know any others...

0
0
1

The Song Dynasty of China: can you believe that those Khitan to the north also call their chieftan "emperor"? Ridiculous. Rural hicks. There can only be one emperor in the world, and it's definitionally here in China.

The Liao Dynasty of Khitan: We love China! Our southern brothers, you are so cool! Can you believe how awesome it is that we're both emperors?! 🤗 also if you invade, we will send a girl to beat you and she'll win.

0
0
0
1

Mastodon servers running the experimental ("nightly") version of Mastodon may have quote-tooting now active.

If it is active for you, it should work by clicking a post's boost 🔁 button, which offers the option to quote.

Don't worry if it's not yet active for you, this is just on experimental Mastodon as the quote feature is still being tested and bugs fixed.

Quoting will be properly released in the next server software version (v4.5.0).

(Thanks @NatureMCPetra van Cronenburg for info! 🙏 )

0
0

Mastodon servers running the experimental ("nightly") version of Mastodon may have quote-tooting now active.

If it is active for you, it should work by clicking a post's boost 🔁 button, which offers the option to quote.

Don't worry if it's not yet active for you, this is just on experimental Mastodon as the quote feature is still being tested and bugs fixed.

Quoting will be properly released in the next server software version (v4.5.0).

(Thanks @NatureMCPetra van Cronenburg for info! 🙏 )

0
0
0
0
0
0
0
0
0
0
0
0
0
1

일본 지방 여행을 다니다 보면 구형 철도차량을 자주 보지만, 아주 시골로 가지 않는 이상 1량 편성의 디젤 동차를 보는 경우는 많지 않다. 나도 미에현에서 한 번 타 본 정도.

가고시마 추오 역은 신칸센 역인데다 닛포 본선은 전선이 가설되어 있어서 키하 40형을 타게 될 줄은 몰랐는데 운(?)이 좋았다. 보통은 전동차가 투입되는 거 같은데 딱 맞춰서 키하를 탔네. 😁

KiHa 40 of JR Kyushu for Nippo main line. Kagoshima Chuo station.KiHa 40 of JR Kyushu for Nippo main line. Kagoshima Chuo station.
0
0
0