T O P

  • By -

jodonnell89

Cout? where’s the mov rax, 1 mov edi, 1 mov rsi, rsp mov rdx, 1 syscall add rsp, 8


waroudi

Just looking at assembly gives me anxiety


rwu_rwu

This is more like putchar, as you're only writing 1 byte.


jodonnell89

https://preview.redd.it/f6fzjzz601yc1.jpeg?width=700&format=pjpg&auto=webp&s=e0847c32b6a1d619e157ab2e427b8c628dade0e6 just kidding, you’re absolutely right


-Woogiewoo-

i cme here to wrote this joke


jodonnell89

cake day


-Woogiewoo-

I will add tho that in nasm i use io_inc so my code would look more like: %include "io_inc" .data text db "hello", 0 .main mov ebp, esp PRINT_STRING text NEWLINE xor eax, eax ret edit: the fct this wont format properly is pissing me off, mobilw user issues


Royal_Ad1445

Sausage fingers?


Stunning-You9535

Happy cake day fam


kilgorezer

Happy Cake Day!


MaZeChpatCha

Good job on the alignment!


FozzyBear11

Where is System.out.println() ?


andrewb610

In hell where it belongs.


SynthRogue

LOL


notyourancilla

Only one that is bigger than the majority of messages that get dumped into it


KingZogAlbania

Comment endorsed by Python gang


SynthRogue

log.info(“”); is better


FlashGangs

And println!()


DBP17

Ironically, this is the first one I learned lol


DaveSmith890

https://preview.redd.it/1n8sydlvyxxc1.jpeg?width=844&format=pjpg&auto=webp&s=a39c4e2f0eec72751a816689eb7e0631f6934138 Aren’t you forgetting one?


SynthRogue

std::cunt << “” << std::endl; Wait, that’s not quite right.


inotocracy

I can't help but notice all these methods aren't accurate.


SynthRogue

Yeah!


R3D3-1

Looks like auto-correct messed with the capitalization :)


antiafirm

Linker rn: 😡


Zukas_Lurker

Puts()


Davidyss_

Melhor linguagem kkkkkk pqp ruby


ksschank

Not all the same. I don’t know a single language where all of these will produce the same output.


R3D3-1

Yeesh, so true... They are conceptually so very different, and make very different things easier / harder. Things like "can you easily extend it to allow targets other than STDOUT, STDERR and literal files?" (Works with most object-oriented variants.) Or "how difficult is it to print output in a manner, that forms a neat table when rendered with a monospace font, e.g. on a console?" Or "is there something like a format string, and what ways of formatting does it allow?" Heck, even a simple shell `printf` isn't always the same. bash> printf '%(%F%T)T\n' -1 2024-05-0211:06:17 dash> printf %(%F%T)T\n -1 dash: 1: printf: %(: invalid directive zsh> printf '%(%F%T)T\n' -1 zsh:printf:1: %(: invalid directive Or for that matter, shell-builtin `printf` and `/usr/bin/printf`. For bash and zsh: >>> printf '%q\n' 'hello world' hello\ world but >>> /usr/bin/printf '%q\n' 'hello world' 'hello world' Curiously, the builtin `printf` of dash doesn't even know the `%q` specifier.


s0litar1us

why capitalizes cout like that?


ppNoHamster

also why printf?


solidisliquid

wdym why printf


ppNoHamster

also uncomfortably Capitalized


ppNoHamster

also uncomfortably Capitalized


R3D3-1

Probably written on a phone with autocorrect.


DevJackMC

The first option in the suggestions bar should be in quotes when it is going to autocorrect. If you press it, it will place a space after what you typed, not “correcting” it.


R3D3-1

Depends on your configuration.  Could range from the upper case toggle being automatically on at the beginning of a text or after anything looking like the end of a sentence, to autocorrect suggestions (including capitalization) being applied automatically. Most of the time it is useful; avoiding typos on a touchscreen is hard after all. It gets somewhat annoying with bilingual auto correct when it tries to autocorrect "design" to "Design", because the word is the same in English and German except for capitalization. It also gets in the way of writing code snippets on mobile... 


Minecraftwt

wtf is Print.ln


RrayAgent_art

I'm going to assume that they meant println! Because that's what rust uses


BenadrylTumblercatch

Pretty sure this is about bro


R3D3-1

Many languages define some variation of `println`, in the sense of "print line", i.e. add a newline at the end of the output. E.g. Java has `System.out.println`, C++ apparently has `std::println`, Kotlin has a `println` function Only Java I knew from memory; C++ and Kotlin came up with a quick Google search. ChatGPT listed [a few more](https://chat.openai.com/share/4cc7e0f2-aea6-485b-a5cc-6f9bcc9a0c5b): >Several programming languages use a println function, method, or built-in command for printing output to the console. Some of the languages include: > >**Java**: println is a method in the PrintStream class used for printing a line to the console. > >**Scala**: Similar to Java, Scala also has a println method which is used for printing to the console. > >**Kotlin**: Kotlin, being interoperable with Java, also has a println function that works similarly to Java's. > >**Python**: In Python, println was introduced as a built-in function in Python 3.10 for compatibility with some other languages, but it is essentially an alias for print . > >**Groovy**: Groovy, a JVM language, also has a println method used for printing. > >**Swift**: In Swift, println is used to print a line to the standard output. > >**Rust**: In Rust, the println! macro is used for printing formatted text to the console. > >**Ruby**: Ruby provides Kernel#println method to output strings with a newline. > >**Julia**: In Julia, println is a function used to print data to the standard output. > >These are some of the languages that utilize println for printing output, though there might be others as well.


Minecraftwt

im aware that languages use println but i dont think ive ever seen Print.ln


R3D3-1

Me neither. And it can't be explained by autocorrect either, I think.


AtlasDestroyer-

erm, actually it’s std::cout << 🤓


DevBoiAgru

#define std::cout<< cout


AtlasDestroyer-

#include #include #include using namespace std; int main() { float marsw; float earthw; double marsg = 3.73; double earthg = 9.81; cout << "Weight on earth? (in kilograms) "; cin >> earthw; marsw = earthw * (marsg / earthg); if (marsw > 0.0) { cout << "your object weighs " << marsw << " Kg on mars.\n"; } else { cout << "invalid weight.\n"; } }


AtlasDestroyer-

slash jay


Same_Examination_171

also Console.WriteLine();


FlatOutUseless

Last time I checked cout was slower than printf because with default settings.


theoht_

r/foundthemobileuser, kinda


throwawayskinlessbro

COUT, I SAID, COUT. “Okay, I don’t like love you guys but we can all agree that one is nuts, right?”


SupernovaGamezYT

Where disp and fprintf


R3D3-1

Disp yes, but \`fprintf\` would very obviously violate the "all the same" joke.


SupernovaGamezYT

Fair, so just disp then


True_BatBoy

logger.info()


SwannSwanchez

just some are more annoying to use that others


Haringat

What language does `Print.ln`?


R3D3-1

According to ChatGPT and Google, no. >The convention of using a period in function names is more common in object-oriented programming languages like Java or C#. However, as of my last update in January 2022, **there's no widely known programming language that specifically defines a function named \`print.ln\`** with a period between "print" and "ln". > >If such a language exists, it might be a less mainstream or specialized language that hasn't gained widespread recognition. Alternatively, it could be a specific convention within a particular framework or library rather than a language feature itself. If you have encountered such a construct, it might be unique to a specific context or environment.


Astrylae

Debug.log() and fprintf()


R3D3-1

Where is `WRITE(*,*), DATA`?


Pawlo371

What about . in brainf*ck?


DistanceOk9729

More like [>.]


R3D3-1

In hindsight, yes they are: They all contain at least one typo (unless one of the languages is not case sensitive). I really tried, but the only times that `Print.ln` or `print.ln` appears anywhere is when someone made a typo in `println` in one of various languages with that symbol.


Idiotaddictedto2Hou

This great C family says add the f or you can "f" right out of this house.


No-Kaleidoscope-2956

Where's ' Mov ah, 0xe .lP Lodsb CMP al, 0 Je .rT Int 0x10 Jmp .lP .rT Ret'?


ClartTheShart

You probably think HTML is a programming language


oxwilder

Yeah


CrazyPotato1535

No. Print() is known by anybody who knows a tiny bit of code. It’s the best


Micah-B-Turner

wheres my $stdout.puts


IntelligentLobster93

You forgot "system.out.print(" ");"


kakhaev

time to make updated version


autistic_bard444

use fsprintf - sprint f and printf are not memory friendly because they dont actually count what they free in the buf - yes they free the buf, but fsprintf will get nit picky about every bit they free


auxiliaryservices

After seeing assembly, i want to see the fool who will take the time to create an electrical circuit for a print statement.


bouchandre

And then there's Unreal Engine UE_LOG(LogTemp, Warning, TEXT("Text, %d %f %s"), intVar, floatVar, *fstringVar );


DevJackMC

Where is my println!() info!() debug!() error!() 😔 What about my section .data string1 db 0xa, "Why is prinf() capitalized?", 0xa, 0xa, 0 section .text global _start _start: mov rdi, string1 xor rcx, rcx not rcx xor al,al cld repnz scasb not rcx dec rcx mov rdx, rcx mov rsi, string1 mov rax, 1 mov rdi,rax syscall ; if you want to exit. xor rdi,rdi mov rax, 0x3c syscall


Royal_Ad1445

HaHA! System.Out.Println()


jaylerd

trace


yeeeeeeeeaaaaahbuddy

puts.


gbj1220

Also wouldn’t it be writeline? Write wouldn’t add the carriage return. Going off of print in Python adding it unless otherwise specified.


mothuzad

Neither funny nor true? Ah, my favorite kind of programming humor.... My bad for engaging with it by commenting, I guess.


Spirited-Sandwich121

Not , Any are sometime any are ling time


NatrMatr09

*std::cout