Thoughts on writing a Minecraft server from scratch (in Bash)
February 15, 2022 4:01 PM   Subscribe

For the past year or so, [sdomi had] been thinking about writing a Minecraft server in Bash as a thought excercise. 2600 words plus code plus images describing the effort.
posted by cgc373 (19 comments total) 7 users marked this as a favorite
 
I cringed when I saw the variable “uwu” in the sample code but then remembered how often I’ve used “foo” in similar situations. I did some self-examination and decided that I’ll use “uwu” in the future instead of “foo”.

Anyway, it’s an amusing project. I once wrote a decent ELIZA implementation in Bourne shell (V6-ish Unix), so this is very relevant to my interests.
posted by sjswitzer at 4:57 PM on February 15, 2022 [6 favorites]


hic sunt dracones
posted by noop at 5:47 PM on February 15, 2022 [2 favorites]


I, uh, wow.

I love this but I also fear (for?) the mind that would choose to attempt it.
posted by djeo at 6:18 PM on February 15, 2022 [1 favorite]


For the past year or so, I've been thinking about writing a Minecraft server in Bash as a thought excercise. I once tried that before with the Classic protocol (the one from 2009), but I quickly realized there wasn't really a way to properly parse binary data in bash.

That's. Um. That's certainly a project, that a determined person could undertake.

I'm struggling to come up with an analogy for the non-coder types reading this. Closest I've gotten is "I really enjoy a nice salty pretzel, so I've gathered a cube of elemental sodium and some liquid bleach, which I'm going to use to make some salt the old-fashioned way."
posted by Mayor West at 6:24 PM on February 15, 2022 [11 favorites]


What is the perverse machochistic draw for some programmers to write a cute toy project in the most inconvenient language possible? I essentially use bash every day and have written very short shell scripts for the rational reason that it's the easiest way to run one or more programs multiple times but wacky slow un-debuggable "write only" code was amusing the first time long long ago.
posted by sammyo at 6:54 PM on February 15, 2022


Most of the really long bash scripts I've seen got that way because they started out relatively small and grew like topsy.

Not all, though. The Slackware installer was something to behold.
posted by wierdo at 7:08 PM on February 15, 2022


they should have sent a poet
posted by wotsac at 7:45 PM on February 15, 2022 [1 favorite]


Other bad ideas in bash:

bocker (docker in bash)
shit (git in bash POSIX shell)
posted by lkc at 8:07 PM on February 15, 2022 [3 favorites]


an analogy for the non-coder types

Maybe "I am constructing a scale model of the Lincoln Memorial using only flakes of my own dry skin", that kind of captures the unsavory and inappropriate use of the medium
posted by echo target at 8:08 PM on February 15, 2022 [13 favorites]


What is the perverse machochistic draw for some programmers to write a cute toy project in the most inconvenient language possible?

Same reason someone might, I don't know, ride a bike across Iowa in the middle of the summer when there are perfectly good rental cars available for transit. The point is to have done it, and you'll probably have a good story or two by the end. Type III fun, if nothing else.
posted by echo target at 8:15 PM on February 15, 2022 [5 favorites]


"I frequently use strings and tin cans for their intended purposes. I vaguely recall that you can make a sort-of-telephone with two tin cans and a string. I have constructed a can-and-string teleconferencing system. You and your colleagues can dial it at this phone number and have conversations, sort of. If you touch it out of curiosity, it will probably collapse into a Gordian knot or perhaps a black hole."
posted by fantabulous timewaster at 8:33 PM on February 15, 2022 [3 favorites]


If you had told me someone had implemented Bash in Minecraft using redstone, I would have believed you.
posted by straight at 8:48 PM on February 15, 2022 [3 favorites]


What is the perverse machochistic draw for some programmers to write a cute toy project in the most inconvenient language possible?

Well, sometimes you have to build something with autoconf...
posted by credulous at 8:49 PM on February 15, 2022 [2 favorites]


"Hash bang slash bin slash bash" isn't supposed to be an invitation for masochism...
posted by biogeo at 11:56 PM on February 15, 2022 [2 favorites]


If you had told me someone had implemented Bash in Minecraft using redstone, I would have believed you.

Making this project self-hosting is a clear next goal.
posted by flabdablet at 2:29 AM on February 16, 2022 [2 favorites]


To me it seems out on the nerd shibboleth axis of memorizing pi digits, although insane programming stunts (quines, chess engines in 20 lines of Javascript, languages like Whitespace, etc) have their own subculture who probably would scoff at this idea.
posted by thelonius at 4:15 AM on February 16, 2022


"Hash bang slash bin slash bash" isn't supposed to be an invitation for masochism...

It's NOT?!
posted by mikelieman at 6:32 AM on February 16, 2022 [1 favorite]


Aw, I thought it was going to be pure bash, not bash and other unix utilities.
posted by zengargoyle at 8:56 AM on February 16, 2022 [2 favorites]


Do I sense a fork in the offing?

terribly painful condition, fork in the offing
posted by flabdablet at 10:00 AM on February 16, 2022 [1 favorite]


« Older P.J. O'Rourke, (1947-2022)   |   The Adventures of Captain Symptomo Newer »


This thread has been archived and is closed to new comments