Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on awful.systems
notawfultech·NotAwfulTechbyjaschop

Build Golf (very rough post, low expectations only!)

Build Golf! Code Golf, but for Builds! Uhhh, that's sort of it.

I remember being very slightly intrigued by the concept of code golf a long time ago. But I mostly took notice of people taking it in very esoteric directions, and even before that it was pretty much orthogonal to writing the kind of useful code I care about.

But just now my brain rubbed 2 neurons together, and made the connnection to another problem that has bothered me quite often. How do you do a minimal build of some thing without some "helpful" 300 LoC boilerplate. I want like, 2 files with 3 lines each and one command to run.

Okay, there will be a couple complications to consider to avoid this going down a hacky direction like Code Golf. Like, how much tooling do you depend upon? Do you have to install a package? How many (hundred) packages does that depend upon? (Looking at you React.) But the general idea is, how to you get (for a specific task or category of tool) in a minimalist way from plain-text in git to running machine code? (or like, HTML if you're building for the web) It's a challenge of taste more than discrete optimization! If tools will reign over others in this sphere, it should be because they cater to refined tastes!

Soooo, that's my prompt. Ideas in all directions welcome. Concept for actually practically realizing this? Overly complex unworkable scoring rules? Personal fave minmal project templates? Feel free to evolve on this, or not, I'm not your boss.

View original on awful.systems
9

1 reply

this idea is brilliant, hats off to you

i have been doing this sorta unofficially for a minute without considering it "build golf", mostly due to the fact that NPM is nightmare fuel and javascript build tooling has been out of control for a loonng time

the rules for capystack at the moment go something like

  • don't depend on any packages, and if you have to, those packages should have no dependencies
  • don't depend on react, just use boring ass string templating
  • don't depend on typescript, just run plain ol dynamic js
  • build your own minimalist dependency libraries if you have to

as a result, i can mostly just install nodejs pinned to a nonsloppy version and go to town; package.json can have some simple build-scripty kickstarts to run node somescript.sh or whatever

i have cobbled together some non-totally-embarrassing projects this way

you can judge me for javascript, i like some other languages more (hi F#!) but they require so much hateful ecosystem that i just can't be bothered

1

You reached the end

Build Golf (very rough post, low expectations only!) | Spyke