Using COBOL to make a video game!

  Рет қаралды 28,374

Context Free

Context Free

Күн бұрын

Пікірлер: 84
@enirya
@enirya Жыл бұрын
i'm glad you did this so i don't have to go through the effort of satisfying the morbid curiosity of "could i make a game with cobol?"
@contextfree
@contextfree Жыл бұрын
And I can imagine you doing that, too. Glad I helped out!
@chuckbenedict7235
@chuckbenedict7235 9 ай бұрын
I learned COBOL MANY years ago. First job out of college was maintaining COBOL business systems on IBM 3090. Later did work on using Microfocus (and an early version of the OO transpiler later added to MF COBOL) on Unix and PC platforms. You did an amazing job organizing and explaining this work, and it was really cool seeing COBOL integrated with SDL. So few really understand how much COBOL still exists in production environments.
@jeanjcl
@jeanjcl Жыл бұрын
Cobol is the business language of choice for business people to do business things.
@0x1EGEN
@0x1EGEN Жыл бұрын
The most bureaucratic programming language.
@RikusLategan
@RikusLategan Жыл бұрын
Unlikely to ever be any of my business
@guckstift1081
@guckstift1081 Жыл бұрын
When looking at this code I instantly get the smell of old paper in my nose from ancient programming handbooks that I borrowed a thousand years ago from my local library and never returned.
@stevenhe3462
@stevenhe3462 Жыл бұрын
9:13 "[B]ecause I really wasn't always sure exactly what was going on in my COBAL code." That pretty much sums up the COBAL experience, I guess.
@ayoubbelatrous9914
@ayoubbelatrous9914 Жыл бұрын
this feels more like Homework: The programming language.
@BrainySmurf77
@BrainySmurf77 Жыл бұрын
Regarding the direct call to SDL in C: I just encountered this in C/C++ libraries recently - basically, if your executable does not directly access symbols from within a dynamic library, that library will never be loaded because the linker sees no reason to have the executable do so. For the GNU linker, the solution for me was to add the linker flag --no-as-needed (if using GCC, add "-Wl,--no-as-needed"). It looks like GNU COBOL may use the GNU linker, so, it may just work for you!
@Bobbias
@Bobbias Жыл бұрын
Seeing the transpiled C source generated from COBOL was pretty cool.
@xelaxander
@xelaxander Жыл бұрын
For once the compiled code might actually more readable than the original source.
@Bobbias
@Bobbias Жыл бұрын
@@xelaxander I'm gonna have to disagree there. Once you get used to some of the quirks of COBOL it's actually really easy to read and understand.
@dumbidiot1119
@dumbidiot1119 Жыл бұрын
@@Bobbiasfound the cobol user
@contextfree
@contextfree Жыл бұрын
I'm super glad some actual COBOL programmers have commented on this video. It's great to hear from them.
@contextfree
@contextfree Жыл бұрын
@Bobbias Thanks for commenting!
@thfsilvab
@thfsilvab Жыл бұрын
I haven't even started to watch and I already feel the pain
@tuxino
@tuxino Жыл бұрын
One thing I remember from working in COBOL (about 10 years ago) was that we *always* used a copybook to define the linkage section for a program, and then included (with the copy command) it into both the program itself and into any programs that would call it. We also had naming conventions for the source files, so that it was immediately obvious (without looking inside a file) which files belong together. (Kinda like an equivalent to .c and .h files in C.) Another thing we did, was have template programs with all the relevant divisions and sections largely prefilled, so whenever we needed to make a new program, we ran a utility that asked for the name of the new program, and which template we wanted to base it on, and possibly some extra template-specific questions (such as tables and fields for database lookups). It would then autogenerate the source file, and any relevant copybooks. For some simple sub-programs, such as a batch routine to dump a database table, or a sub-program to fetch a single record, we didn't need to do any more. The template system did all the work - including writing SQL.
@TankorSmash
@TankorSmash Жыл бұрын
I liked how you kept track of all the little tiny issues you ran into, really felt like I got a sense of what it was like making this
@obinator9065
@obinator9065 Жыл бұрын
Don’t know if this or getting my testicles twisted is worse.
@OpenKeith
@OpenKeith Жыл бұрын
9:41 YO FINALLY SOMEONE ELSE WHO PRONOUNCES PNG CORRECTLY
@owenwexler7214
@owenwexler7214 Жыл бұрын
Every time there is an emergency, COBOL devs are needed. Let's get this emergency apocalypse COBOL crisis bread, gentlemen.
@Saviliana
@Saviliana 6 ай бұрын
I wonder if we should get hollywood to film a movie about this plot, it could be interesting than whatever the current garbage they thrown out to the market every another week.
@christopherfore7786
@christopherfore7786 Жыл бұрын
This is really cool! Didn't know COBOL could do stuff like this.
@contextfree
@contextfree Жыл бұрын
Yeah, until I started trying things out, I had almost no idea what cobol could do at all.
@lukez8352
@lukez8352 Жыл бұрын
Looks like we're one step closer to a video on REXX. I would be interested in your thoughts on the string parsing & manipulation in that. I used to build edit macros in REXX to help quickly build out COBOL and JCL in my mainframe days, and it was wonderful.
@noelkelly4354
@noelkelly4354 Жыл бұрын
Don't forget CICS and DB2!
Жыл бұрын
@@noelkelly4354 CICS is not a language and neither is DB2 As system automation sysprog for Z systems I do kind of work with it all, except cobol, I don't touch that stuff but rexx I see daily and write somewhat often (usually very simple chunks of "if ... then ...." into existing procedures, but sometimes pretty complex things) we were wondering with coworkers if we could write some games on Z, but no one will let us do it in production system and even if they would, they wouldn't allow us to tell anyone... but maybe some day on some sandbox
@noelkelly4354
@noelkelly4354 Жыл бұрын
@ I mention them because they're both resources that can be accessed from COBOL. Need persistence, Star Trek (1971 game) MMO terminals. ;)
@edgeeffect
@edgeeffect 10 ай бұрын
I used to genuinely love CoBOL back in the olden days. Way nicer to look at than BASIC or ForTran. :) PDP-11/73, a VT-100, RSTS/E, and COBOL-81 .... (sigh) ... those were the days. `goback` sounds like a weird GNU-ism .... `STOP RUN.` is the normal way of going about it.
@contextfree
@contextfree 10 ай бұрын
Seems you've got some experience on me. My time starts with TV-connected computers running BASIC in the 80s.
@edgeeffect
@edgeeffect 10 ай бұрын
@@contextfree just a little bit before... TV connected school computers running BASIC
@nathanfranck5822
@nathanfranck5822 Жыл бұрын
The special two digit codes for lines sounds kinda vile, but it does seem mostly useable with enough familiarization
@kim15742
@kim15742 Жыл бұрын
COBOL is so verbose but when it comes to data types instead of being clear like any other language with integer, character, etc. it's the super unintuitive 9, x, z...
@hackvlix
@hackvlix Жыл бұрын
You have to understand that when they designed the language, they had the vision that it the code should be understandable for people who possibly had no idea what integers or bytes were. Clearly a flawed vision, with hindsight. And imho even for that goal a flawed execution, for whoever is supposed to make sense of something like PIC X(10) ? 🤔
@kim15742
@kim15742 Жыл бұрын
@@hackvlix Sure but they could have named it numeric, alphanumeric, alpha, etc. to be more verbose
@hackvlix
@hackvlix Жыл бұрын
@@kim15742 Yeah, hard to tell what they were thinking there.
@hackvlix
@hackvlix 10 ай бұрын
@@edgeeffect Oh I do love me a good "IS" 😉 When/where did you use to write COBOL code, if I may ask?
@edgeeffect
@edgeeffect 10 ай бұрын
@@hackvlix Only at college, never in industry (although I did once have a hobby project where I was reading old NASA data in fixed record length files - and I wished I had CoBOL then but I only had Clipper and Borland Turbo C++) We had a project where we were given a spec for a system in a textbook and had to do one of each of validate, sort, update and report programs using C81 on a PDP-11 running RSTS/E.
@theseatoad
@theseatoad Жыл бұрын
Oh, this is awesome.
@itsbk6192
@itsbk6192 Жыл бұрын
Absolutely devious behaviour being displayed here
@cbbcbb6803
@cbbcbb6803 Жыл бұрын
Enjoyed.
@lightrh
@lightrh Жыл бұрын
i like dashes in variable names instead of underscores. feels easier to read.
@mattmurphy7030
@mattmurphy7030 Жыл бұрын
Oh god
@noelkelly4354
@noelkelly4354 Жыл бұрын
You're a sick sick puppy! ;)
@pablozuta2402
@pablozuta2402 Жыл бұрын
This is pretty dope ngl
@kristoff-it
@kristoff-it Жыл бұрын
Awesome video!
@letMeSayThatInIrish
@letMeSayThatInIrish Жыл бұрын
looks so wrong when divisions and sections are in lowercase
@contextfree
@contextfree Жыл бұрын
I just can't take extensive shout case, so I purposely avoided it. I probably should have commented on that in the video, though.
Жыл бұрын
looks so wrong in VScode, I mean I use it sometimes for rexx, but usually it's all ISPF, much more visually pleasing
@FireDragon91245
@FireDragon91245 Жыл бұрын
ok, you awnsered my question "how is cobol", and now im never touching it
@jfftck
@jfftck Жыл бұрын
Why?
@kim-lg7rc
@kim-lg7rc Жыл бұрын
Next step is Haskell
@erikschiegg68
@erikschiegg68 Жыл бұрын
Had to chew that in my mainframe training. You better get a novel writer than a Cobol programmer, dude 😅
@s1l3nttt
@s1l3nttt Жыл бұрын
Why tho
@theowaldburg
@theowaldburg Жыл бұрын
Who will join me on my COBOL startup venture?
@flyingsquirrel3271
@flyingsquirrel3271 Жыл бұрын
It's gonna be hard to find someone with the necessary amount of self-hatred :-P
@jimschneider799
@jimschneider799 Жыл бұрын
As GLaDOS once said, "the answer is no one. No one but you would be so pointlessly cruel."
@Paulo-c3n
@Paulo-c3n Жыл бұрын
So, GNUcobol is like a cracked version of python?
@contextfree
@contextfree Жыл бұрын
Not really. COBOL is lower level then Python, which is why compiling through C makes sense. But the details are quite different than C sometimes.
@R1ONA
@R1ONA Жыл бұрын
lol this was hardcore
@WadeMealing-n3b
@WadeMealing-n3b Жыл бұрын
Was that my wasm cobwebber ?
@contextfree
@contextfree Жыл бұрын
No, sorry, though I think I ran across your project. Just put a star in it. I was trying to reference this pong game for building to wasm. I updated their dockerfile to latest dependencies and got that working, but I failed to get my own game working. moxon6.github.io/cobol-js-emscripten/
@airman122469
@airman122469 Жыл бұрын
But… why though?
@contextfree
@contextfree Жыл бұрын
So people can ask why. :)
@Requiem100500
@Requiem100500 Жыл бұрын
COBOL, except it's actually yet another C code generator
@NuclearFury8
@NuclearFury8 Жыл бұрын
If you like hyphens in variable names and no spaces in your functions, why not lisp? Just rebind parenthesis to not need shift, your pinky will thank you.
@contextfree
@contextfree Жыл бұрын
Yeah, I should have mentioned the similarity with lisp. I was just being quick there. I'm actually not a huge fan of even looking at nested parens, though I hear it grows on people.
@contextfree
@contextfree Жыл бұрын
And I know that Clojure at least has commas as optional whitespace, too. But I'm not sure which language in the past might have had that first.
@NuclearFury8
@NuclearFury8 Жыл бұрын
@@contextfree Didn't know that about Clojure. It reminds me of Racket (or all schemes?) treating braces and brackets as parens, letting you use them as disambiguators. I do agree about parens, they easily get confusing, and the only way I can follow nesting on a larger scale is indentation.
@illegalsmirf
@illegalsmirf Жыл бұрын
python game_gen .... you been cheating a little bit there?
@contextfree
@contextfree Жыл бұрын
Good question! That's what generates the hex data from the PNG files.
@lazyh0rse
@lazyh0rse Жыл бұрын
I don't know why people always assume that cobol developers have a higher pay. Upon looking at the salary of the jobs. It has relatively higher salary but not so much. You would be better off improving your existing skills in the job itself rather than going off track to a language nobody cares about.
@mattmurphy7030
@mattmurphy7030 Жыл бұрын
"nobody cares about" _banks have entered the chat_
@GCKteamKrispy
@GCKteamKrispy Жыл бұрын
That's nothing. I bet you can't make it in binary
@v-2schneider264
@v-2schneider264 Жыл бұрын
You definitely should get medical treatment as soon as possible.
@SEOTADEO
@SEOTADEO Жыл бұрын
wtf hahaha
@lifegrain6375
@lifegrain6375 Жыл бұрын
Oi/hi, like No 500,
@obiwanjacobi
@obiwanjacobi Жыл бұрын
Cobol is not a language, it's a speech impediment... 😀
The World Depends on 60-Year-Old Code No One Knows Anymore
9:30
Coding with Dee
Рет қаралды 1 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
6 Programming Languages in 1 Godot Game! Trying out GDExtension!
19:22
Starting my own hobby language (again)
13:17
Context Free
Рет қаралды 7 М.
Some simple problems solved in C3
20:39
C3Lang
Рет қаралды 1,8 М.
do you know how "return" works under the hood? (are you SURE?)
5:08
Andrew Kelley   Practical Data Oriented Design (DoD)
46:40
ChimiChanga
Рет қаралды 155 М.
Making a Game Using COBOL!
9:22
Truttle1
Рет қаралды 62 М.
Introducing Clay - High Performance UI Layout in C
35:19
Nic Barker
Рет қаралды 215 М.
I made the same game in Assembly, C and C++
4:20
Nathan Baggs
Рет қаралды 836 М.
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 4,3 МЛН
Building a Physics Engine with C++ and Simulating Machines
11:23
AngeTheGreat
Рет қаралды 720 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН