I re-created the game of life in Assembly

preview_player
Показать описание

This video is for entertainment purposes only, you probably shouldn't do as I say or as I do.

I wanted to do something a little more significant than a 'Hello world' in Assembly so I decided to tackle the game of life. I took the opportunity to try and recreate some of my favourite programs in low level languages. Including a Vi clone in C and a file manager in C++.
Рекомендации по теме
Комментарии
Автор

Assembly is high level. If you haven't manually applied electricity to the individual grains of sand, you aren't a senior developer.

JaredFL
Автор

now.. start writing some macros for common coding tasks, like for loops.
call it "for"..
repeat writing such macros and you will end up with C

tanko.reactions
Автор

I graduated last year, seems like my CS degree wasn’t just for writing code—it was also my secret decoder ring for getting those cryptic tech stuff. Awesome vid!

ashutoshj
Автор

Now make a tutorial for a neural network in ASM x86 pls bro

iCrimzon
Автор

What do you mean there's no "if". A conditional branch instruction in assembler is the same thing but with more words.

EdwinMartin
Автор

As a retired software engineer who grew up in the analog age, I say BRAVO! I always thought OO was way too much abstraction. I have coded in hex embedded processors and worked with data scopes. BTW, you can do assembly directly in C via macros. You can interface assembly into anything using a linker or DLLs. Efficient coding is a long since dead art if you are not doing RTOS like missile guidance.

mahakleung
Автор

"to me [classes] just look like meaningless boilerplate"

What did you just say?

Grahamaan
Автор

Python: gets ready working example of Conway's Game of Life with GUI in under 2 min. (including intro)
Java: proceeds to write server with single GET endpoint
C++: implements custom classes to handle routine file management
C: writes text editor in terminal
Assembly: spends more than a half of video to write terminal version of Conway's Game of Life (not including off-screen time which I suspect is SLIGHTLY bigger considering debugging mentioned bugs)

Classic at its best)

igorvasylchenko
Автор

LOL, Oh the good old days:-)
I have to say that your version of Assembler is a fairly high level, compare to the start 80s.
You had no way to just add ASCII, you had to call the letters from the right memory, switch them, combine them and then start up the memory part that had to do with the screen, then set the screen up, tell the CPU to calculate, add the result to the address that you had made for a buffer and send it to the screen.

friedmule
Автор

nice video <3

2:27 java is kinda JIT
first it gets compiled into bytecode
and then at runtime into native machine code
6:38 i would just make a struct with char* and size_t, also use maloc
then store it in similar struct
8:04 yeah thing is awesome, used it many times too
14:41you can look up "ARM 64 Assembly Series— Basic definitions and registers"
R0 for returning arguments
R0 to R7 for passing arguments
R9 to R15 should be ok to use
R19 to R28 should also be ok to use but their content should be saved before and later restored

next project could be writing a compiler :3

thenameisluk
Автор

I hate x86, ARM and RISC-V so much, leading me to design my own architecture lol (I'm not joking)

Slicudis
Автор

with assembly sometimes it can help to write equivalent C code then paste it into godbolt to see the assembly at different optimization levels and how you might code it in assembly

naghs
Автор

Java AoT... There are options like GraalVM, but normally you only AoT compile to bytecode.

denissorn
Автор

i really struggled to read the code in the c++ part, guess i'm addicted to colorschemes

mou
Автор

I don't think your C++ code has any memory leaks. Shared pointers are just really smart. When you copy them a counter goes up and when you destroy them or reassign them the counter goes down. When the last shared pointer stops pointing at that address, the memory gets freed.

FcTomas
Автор

Can you please bring a playlist on Kotlin and Htmx?

beradeep
Автор

I would argue that Haskell is the highest level language there is, since you kinda need to know Category Theory (very abstract math) before you can understand the Monad.

But maybe that's just me.

NostraDavid
Автор

Great! Did you use ChatGPT as an aid for the file explorer?

cook
Автор

5:29, The only time you should not be setting up the free() and fclose() call at the end straight away is if you're returning it or passing that responsibility to a specific thread. In all cases you should have a fallback free() and fclose() call.

zxuiji
Автор

"Assembly is better than Python" - Better at what? I'm pretty sure if you put two random people side by side, person A and person B, you can always say that person A is better than person B because there surely is at least one thing, person A will be better at than person B. But you can say the same for person B, as it surely also works the other way round. So the term "better" on its own is meaningless unless you also name a property that you are comparing.

xcoder