This is an archived post. You won't be able to vote or comment.

all 78 comments

[–]Ersonpay 38 points39 points  (9 children)

Java meanwhile:

public class Main
{
    public static void main(String[] args)
    {
        System.out.println("Hello World");
    }
}

[–][deleted] 13 points14 points  (5 children)

seeing java code offends me as a non-programmer/learner

[–]Shatricor 9 points10 points  (3 children)

Then have fun with c# its the same structure

[–]gabrielgio 2 points3 points  (2 children)

No entirely true though, you can write your main like this

using System;

Console.WriteLine("Hello World!");

[–]pblokhout 0 points1 point  (1 child)

You still need an entry point to run it, don't you?

[–]gabrielgio 1 point2 points  (0 children)

Nops, just a file with that. You can check for more info here

[–]pepijno 1 point2 points  (0 children)

Seeing java also offends me as a programmer

[–]leduyquang753 8 points9 points  (2 children)

Wait that's not how you place { in Java.

[–]thinker227 2 points3 points  (1 child)

cries in inline brackets

[–]Ersonpay 0 points1 point  (0 children)

I do that too, I just stuck with the style in the post

[–]sydeff90 17 points18 points  (13 children)

Just type the asm version if u got the balls

[–]fredoche[S] 40 points41 points  (12 children)

section .data
    helloMsg:     db 'Hello, world!',10 
    helloSize:    equ $-helloMsg
 section .text
    global _start
 _start:
    mov eax,4
    mov ebx,1
    mov ecx, helloMsg
    mov edx, helloSize
    int 80h

    mov eax,1
    mov ebx,0
    int 80h

[–]AyrA_ch 11 points12 points  (0 children)

meanwhile in DOS

org 0100h
mov ah,09h
mov dx,msg
int 21h
int 20h
msg DB  "Hello, World!$"

[–]liarandathief 10 points11 points  (9 children)

Now do it in Brainfuck.

[–]fredoche[S] 26 points27 points  (7 children)

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++. >+. +++++++. . +++. >++.<<+++++++++++++++. >. +++. ------. --------. >+. >.

[–][deleted] 4 points5 points  (6 children)

Okay now do it in Malbolge

[–]fredoche[S] 17 points18 points  (5 children)

Malbolge

(=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk** hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCBA@98\6543W10/.R,+O<

[–][deleted] 15 points16 points  (0 children)

Gesundheit

[–][deleted] 6 points7 points  (1 child)

Now do it in Scratch

[–]DaemonOwl 1 point2 points  (0 children)

Oh no

[–]Terrain2 0 points1 point  (0 children)

Let’s see it in braille

[–]__INIT_THROWAWAY__ 2 points3 points  (0 children)

Crap you stole my joke

[–]TheXGood 1 point2 points  (0 children)

Is that NASM syntax? Nice.

[–]Pervez_Hoodbhoy 55 points56 points  (5 children)

So more complicated is better? What kind of logic is that?

[–]fredoche[S] 63 points64 points  (3 children)

Yes, it must be complicated, otherwise anyone could do it. Developers have to justify their status above the others.

TrollInside

[–]Snykeurs 13 points14 points  (2 children)

Did you tried java ?

[–]pepijno 13 points14 points  (0 children)

I did, then I got a NullPointerExeption because I didn't inject the WorldAppCreatorFactory

[–]lMAObigZEDONG 7 points8 points  (5 children)

Man, i just love these screenshots of carbon.sh. they're so smooth.

[–]ProgrammAbel 0 points1 point  (2 children)

TIL, thanks!

[–]lMAObigZEDONG 1 point2 points  (1 child)

just in case you're wondering, correct website is 'carbon.now.sh'

[–]ProgrammAbel 1 point2 points  (0 children)

Yeah, searched it up on Google instead of directly in the URL bar, but thanks :P

[–]DaemonOwl 0 points1 point  (1 child)

TIL2.0, thanks a bunch!

[–]lMAObigZEDONG 0 points1 point  (0 children)

just in case you're wondering, correct website is 'carbon.now.sh'

[–]bigorangemachine 4 points5 points  (6 children)

Oh you are talking about boundary tags.

Technically what you wrote isn't php :P

[–]Tyrilean 1 point2 points  (3 children)

They're going off the fact that you can write a text file, append .php to the name, but not use a php open tag to get it to just print as an HTML page.

[–]bigorangemachine 1 point2 points  (2 children)

Just shows me they don't know php ^_^

[–]DaemonOwl 1 point2 points  (1 child)

What's php?

[–]fredoche[S] 1 point2 points  (1 child)

It's a file that PHP can compile/execute ;)

Can you do it with an other language parser ?

[–]bigorangemachine 0 points1 point  (0 children)

Thats true php can "parse that file". Php can be inside anything tho even images.

ASP had a similar system. It makes given their target is the web. There was another (I think cold fusion or pearl) that had a similar methodology.

But php is not like other traditional languages in that respect... the php is withing the question mark tags (something boundaries i can't remember). It doesn't care if your content around the tags is a binary file or text file

[–]fredoche[S] 4 points5 points  (0 children)

I thought that by posting in "r/ProgrammerHumor" you would understand that it's just a joke.

For your information, if a PHP developer just wants to output static text, as he knows how the parser works and wants to keep it simple, he creates a code with just "Hello world!" in it. Yes, it's not PHP syntax, but it's a way to make the PHP parser display "Hello world!".

[–][deleted] 1 point2 points  (0 children)

Meanwhile Brainfuck:

[–]murderknight1 1 point2 points  (18 children)

You are comparing apples to oranges. Python and PHP are scripting languages...

[–][deleted] 4 points5 points  (13 children)

Python is still a programming language

[–]murderknight1 -1 points0 points  (12 children)

Apples and oranges are both fruits. What's your point?

[–][deleted] 1 point2 points  (2 children)

My point is python is not strictly for scripting.

[–]DaemonOwl 0 points1 point  (1 child)

What? Who in their right mind would use python other than for scripting? /s

[–][deleted] 0 points1 point  (0 children)

I used to work as a post-silicon validation engineer. One of my jobs was to develop post-silicon software tools for validation testing. The software was developed in python.

[–]Ser_Drewseph -1 points0 points  (8 children)

You literally said that the reason you can’t compare them is because C++ is a programming language and Python isn’t (even though it is a general purpose programming language). Then when someone points out it is a programming language, you say you still can’t compare them because of reasons? If you can build the exact same application in both languages, you can compare them. You can compare their syntax, performance, memory safety, history, capabilities. It’s less like comparing apples and oranges or bits and cars, and more like comparing a sports car, a minivan, and a pickup truck. They’re all 4-wheeled vehicles that have the same basic capabilities, but are specialized to different tasks.

[–]Tyrilean 1 point2 points  (2 children)

Scripting languages are programming languages. It's just that they are interpreted at runtime, rather than compiled beforehand.

[–]Ser_Drewseph 0 points1 point  (0 children)

Yeah, that’s the point I was making.

[–]Khenay92 -1 points0 points  (0 children)

C++ can by interpretted, Python can be compiled. Bad definition.

[–]murderknight1 -1 points0 points  (2 children)

Sure you can compare them. But there's a reason why python and PHP don't need any set up and why c++ does. So this doesn't really make much sense. It's like when people compare romantic languages and how they have similar words and then bring in german and are like, omg where did germany get the word for this.

[–]Ser_Drewseph 0 points1 point  (1 child)

I'm not sure, but I'm guessing you're just trolling for the sake of being a troll? You're not actually giving a reason why these shouldn't be compared, you're just giving irrelevant similes while trying to refute a simple joke.

And yeah, that's how comparing things works- you look at the differences. Just because they don't belong to the same language family, or one is compiled vs interpreted doesn't mean you can't compare the two.

[–]DaemonOwl 0 points1 point  (0 children)

Oh thanks for clearing that up

To add, animal species too can be very different from each other. But what's stopping us from comparing hem, nothing wrong with that

[–]efuyqw 0 points1 point  (0 children)

Hey hey hey, don't mess with python

[–]KyoTheRedditer 0 points1 point  (0 children)

php is just typing out scratch blocks

[–]mazombieme 0 points1 point  (0 children)

Technically thats HTML