Live data from Hacker News

A Minecraft server written in COBOL

github.com

51–60 of 127 posts

Re: A Minecraft server written in COBOL

#51

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.

MOVE FUNCTION MIN(BLOCK-ENTRY-MINIMUM-STATE-ID(LK-BLOCK), STATE-ID) TO BLOCK-ENTRY-MINIMUM-STATE-ID(LK-BLOCK)

Re: A Minecraft server written in COBOL

#52
post #5

> 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 COBO…

One of the rumoured stigma is that the object-oriented flavour of COBOL goes by the unwieldy name of ADD ONE TO COBOL YIELDING COBOL. At least it doesn't have the unrumoured stigma of older FORTRANs, which ignored whitespace, allowing: DO 10 I=1.10 to silently compile an assignment: DO10I = 1.10 instead of signalling an error for the syntax of the loop the flight software programmer had intended: DO 10 I=1,10

If you have to go to 1977 or prior to slag a language, there are tons of languages that will disappoint you.

Re: A Minecraft server written in COBOL

#53
post #25

Earlier quoted context omitted.

COBOL was designed to be written and read by non-programmers. That was the theory, at least.

And let’s not forget, so was FORTRAN. (Programmers coded in Assembler back then.)

Fortran (FORmula TRANslation) was intended for a very peculiar subset of 'non-programmers': mathematicians, engineers and the like. It ends up being a pretty good impedance match for people who are use to dealing with terse forms of expression already.

Re: A Minecraft server written in COBOL

#54

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,…

It’s worth noting that a lot of rust frameworks have code generators and the like that emit a lot of lines quickly.

I’m working on a web app with Axum, Diesel (type-safety on my Postgres stuff), and Leptos (in “islands” mode, allows me to write my server side HTML using JSX-like syntax within Rust, and client side WASM). It’s actually incredible how much it can accomplish with a relatively simple file tree.

I originally started with Loco, which is rails-like. It spits out something like 80 files every time you make a scaffold. It felt exactly like what you describe — too much code to do something that should be simple.

Re: A Minecraft server written in COBOL

#56
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)

Re: A Minecraft server written in COBOL

#57

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

There's actually two completely separate games (Java edition and Bedrock) that can't cross-play with each other. You can buy a Bedrock edition Minecraft for Windows that should be able to cross-play with the switch. Java Edition is the original game and it's fairly easy to either host your own server (The dedicated server is just a .jar you run) or pay for a server ($10-40/mo) using a game server host. Unsure about b…

Bedrock has self-hosted servers available too: https://www.minecraft.net/en-us/download/server/bedrock

They're pre-compiled Windows and Linux binaries, but if I'm remembering correctly, I think they're statically linked, and I had no trouble running the Ubuntu one on my Fedora system.

I used to keep a Bedrock server running on my desktop, and my son and I could pop in from a phone, tablet, or laptop whenever we wanted to.

Re: A Minecraft server written in COBOL

#58

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,…

I think it's just the difference between real hackers™ who often have a fancy for simpler languages and can write the whole universe in anything you give them, versus code monkeys chasing the latest hype cycle. (For reference, I put myself into the second category.)

Re: A Minecraft server written in COBOL

#59

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

There's actually two completely separate games (Java edition and Bedrock) that can't cross-play with each other. You can buy a Bedrock edition Minecraft for Windows that should be able to cross-play with the switch. Java Edition is the original game and it's fairly easy to either host your own server (The dedicated server is just a .jar you run) or pay for a server ($10-40/mo) using a game server host. Unsure about b…

There are extensions/plug-ins to the standard Java server, allowing Bedrock players, and xbox accounts to join:

https://geysermc.org/

(Plus Floodgate so they don't need a Java account)

I just setup a new family minecraft server last week and have successfully hosted java and bedrock players simultaneously (one coming in from a Nintendo switch, another from their phone and several from Java clients).

There are also plug-ins allowing older (or newer) client versions to connect to your server as well (ViaVersion, ViaBackwards).

Re: A Minecraft server written in COBOL

#60
post #46
post #38

Earlier quoted context omitted.

Check out minetest open source too, which is similar but separate game like minecraft. You can self-host the server.

or, as the kids like to call it, the "We Have Minecraft At Home" version.

Tell them they can just call it "Luanti" now ;-) [1]

It's also becoming more and more "not just Minecraft". For instance this entry from the latest GameJam, which is a nice little shooter [2]

[1] https://www.luanti.org/

[2] https://content.luanti.org/packages/Sumianvoice/extra_ordina...

Post reply on HN