this post was submitted on 03 Aug 2024
1093 points (99.0% liked)

Programmer Humor

32042 readers
1108 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
(page 2) 36 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 month ago

Assembly was easier to me than C/C++.

[–] [email protected] 4 points 1 month ago* (last edited 1 month ago)

From my understanding, one of the actual use case of assembly is for cyber security engineers to dump assembly instructions from a compiled program, so they can check for any potential vulnerability. I've also seen assembly included in an embedded codebase (the overall project is in C), which I assume is for more optimized performance and deterministic behavior

[–] [email protected] 3 points 1 month ago
[–] [email protected] 3 points 1 month ago

For a university assignment, I built a compiler for x86; I cheated a bit by relying on LLVM, but it gave me a better understanding of the architecture. I also developed emulators for the NES (Ricoh 2A03) and RISC-V (RV32I) as a hobby. For the latter, I implemented it in FPGA.

[–] [email protected] 2 points 1 month ago

I used to write z80 asm without an assembler back when I was a LOT younger. The ZX spectrum manual I had, had the full instruction list with the byte values.

I think it was oddly easier than some higher level languages for some tasks.

But, making changes was an utter nightmare.

[–] [email protected] 2 points 1 month ago (1 children)

Mebly I do, and mebly I don't.

[–] [email protected] 2 points 1 month ago (1 children)

I have Dyslexia ¯_(ツ)_/¯ Sorry.

[–] [email protected] 5 points 1 month ago* (last edited 1 month ago) (3 children)

You dropped this \

Short explanation: Type ¯\\\_(ツ)\_/¯ to see ¯\_(ツ)_/¯.

Long expanation: Lemmy supports formatting, like _italic_ becomes italic. To stop this from happening, you can put a \ before it like \_; the \ isn't shown. This is why ¯\_(ツ)_/¯ becomes ¯_(ツ)_/¯. To show a \ you need an additional \ like so: \\, and to make sure _ is shown and not turned into italic, it too needs \. This is why ¯\\\_(ツ)\_/¯ becomes ¯\_(ツ)_/¯

[–] [email protected] 2 points 1 month ago* (last edited 1 month ago)

Alternatively, you can just use the `` enclosure, used for single line code.
That is a "grave accent" or a "backtick", the key you will find on the left of the '1' key and under the 'Esc' key on a standard (ISO, maybe) 104/105 key qwerty keyboard.

¯\_(ツ)_/¯

[–] [email protected] 2 points 1 month ago

The backslash is known as an escape character in this context, because it removes (escapes) the special meaning of the following character.

It's also used that way in most Unix shells.

[–] [email protected] 1 points 1 month ago (2 children)

I'm sorry, I have no idea what you're talking about. Could you explain it in assembly?

load more comments (2 replies)
[–] [email protected] 1 points 1 month ago

I used to make video games entirely in assembly

load more comments
view more: ‹ prev next ›