from Hacker News

A Minecraft server written in COBOL

by notamy on 12/26/24, 3:59 AM with 121 comments

  • by notfried on 12/26/24, 10:52 AM

    > Well, there are quite a lot of rumors and stigma surrounding COBOL. This intrigued me to find out more about this language, which is best done with some sort of project, in my opinion. You heard right - I had no prior COBOL experience going into this.

    I hope they'd write an article about any insights they gained. Like them, I hear of these rumors and stigma, and would be intrigued to learn what a new person to COBOL encountered while implementing this rather complex first project.

  • by guytv on 12/26/24, 11:15 AM

    This is Awesome.

    For my high school graduation project, I wrote a full COBOL system to automate soccer betting odds. Long past its prime, but my school hadn’t quite caught up with the times.

    It was hilariously out of place, but I loved every line of it. There’s something oddly satisfying about a language that whispers, “Remember punched cards?” as you type.

  • by heavensteeth on 12/26/24, 5:28 PM

    I'm sure this is some kind of fallacy, but I feel I quite often see ostensibly impressive small side projects like this written in simple plain languages like C (or here COBOL). Every similar, e.g., Rust project I see seems almost non-functional despite having 10x the SLOC.

    My working theory is that simpler languages lend themselves to blueprinting ideas and getting something working even with an ugly messy codebase, whereas modern languages force you to write code that will last longer. Or maybe modern languages are just doing something wrong.

  • by userbinator on 12/26/24, 10:00 AM

    https://raw.githubusercontent.com/meyfa/CobolCraft/main/src/...

    It's actually not too difficult to understand for anyone with a background in procedural languages, and reminds me somewhat about some game servers written in VB that I saw ~2 decades ago.

  • by PerilousD on 12/26/24, 7:00 PM

    I stopped using COBOL in 1978 and NEVER admitted to even knowing the language forever after. I'm making the sign of the cross and heading for a strong cup of coffee in the hope that I will never see this code :-)

    (impressive that you did this)

  • by owenthejumper on 12/26/24, 3:04 PM

    Roast me but the code is very readable. Compare with some modern languages where you have to stare at it for minutes to understand what's going on.
  • by curious_cat_163 on 12/26/24, 4:15 PM

    I learned a bit of COBOL during high school... in a small town in Pakistan.

    It was okay -- did a project that simulated some financial statements. I recall it being quirky but, to most humans (i.e. non-programmers), any programming language would be quite quirky so I don't understand the stigma around it.

    I also learned C around the same time and that one stuck. :-)

  • by FrustratedMonky on 12/26/24, 12:37 PM

    I'm always hearing that Cobol programmers get high salaries, because they are so rare.

    Did this project generate any flood of offers for work?

  • by purple-leafy on 12/26/24, 6:40 PM

    COBOL actually looks like a very cool language ! Your code looks really well organised
  • by cratermoon on 12/26/24, 3:07 PM

    I love that there are unit tests.
  • by zimpenfish on 12/26/24, 2:00 PM

    Can't tell if it supports redstone (which I would consider basic functionality in a Minecraft server) - isn't called out in the README and the code only makes mention of redstone torches (which also function as a light source).
  • by navbaker on 12/26/24, 3:45 PM

    My kids are just getting into Minecraft on the switch and I am a bit confused by the options for hosting a server. I’d love to hop on and play with them on a self-hosted server, what’s the current best way to do that or is that level of cross-play between PC and Switch on a self-hosted solution even possible?

    Edit: I don’t currently play, which is why I’m not familiar with what’s out there

  • by Alcatros552 on 12/26/24, 2:57 PM

    Actually the writer of this Github Repo is wrong; Cobol has been exactly there to manipulate bits and bytes on the lowest level since forever and is very efficient at it.

    Nevertheless, congrats to this achievement.

  • by b800h on 12/26/24, 11:45 AM

    What an idea. Absolutely unbelievable - I've written an API framework in COBOL, but this is something else. Very impressive bit of work.
  • by philipov on 12/27/24, 1:38 PM

    They should have called it COBOLstone
  • by pigeons on 12/26/24, 6:23 PM

    I upvoted this before I even looked at the link.
  • by muzzelman on 12/26/24, 11:46 AM

    Why does this look like an elaborate PL/SQL?
  • by ARandomerDude on 12/26/24, 7:41 PM

    40 years from now, C-suites all over the world will be saying "COBOL Minecraft servers are dead."
  • by coolkil on 12/26/24, 10:25 AM

    Lol, big question is would it work on zOS as well.
  • by bitfilped on 12/26/24, 12:57 PM

    Docker isn't a platform portable experience fwiw