>std::cout << "Hello World" << std::endl
justify this shit
Use namespace std
>>54234828
Use namespace go fuck yourself
>>54235011
Top lep
>>54234818
What a retarded language...
public static void main(String[] args) {
System.out.println("Hello World!");
}
Justify this shit
> char* s = "faggot";
> printf("you are a %s\n", s);
justify this shit
>>54235315
Wouldn't that be
char* s;
s= (char*)malloc(6*sizeof(char));
*s={f,a,g,g,o,t};
Printf("%s", s);
<?php
echo "Hello World!";
?>
document.write('Hello world');
>>54234818
>>54235270
>>54235315
>>54235395
This is why I use Python
disp('Hello World!')
MATLAB truly is the language of patricians.
>>54235449
>using python
Justify that shit
>>54235454
print("Hello World!")
>>54235454print ("Hello World!")
It just werks
<h1>Hello World!</h1>
AbstractLogInterface abstractLogInterface = AbstractLogInterfaceFactory.createDefaultLogger(System.out);
abstractLogInterface.loadPajeetXML(new XMLParserFactory(XMLParser.CONFIG), new File(logConfigFile.getAbsolutePath())).
abstractLogInterface.log(LogLevel.INFO, abstractResouceBundleHandler.translate("PAJEET_PRINT_HELLO_GOOD_ENLISH", Language.EN_EN));
Justify this shit
main(){
puts("hello world");
}
C is life
C or C++?
Which is better for an engineer to learn?
let main () =
let chars =
[0x48; 0x65; 0x6C; 0x6C; 0x6F; 0x20;
0x77; 0x6F; 0x72; 0x6C; 0x64; 0x21] in
let action =
List.fold_left
(fun action c ->
fun () -> action (); print_char (char_of_int c))
(fun () -> ())
chars in
let action () =
action ();
print_newline () in
action ()
;;
let () = main ();;
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Justify that shit.
>>54235496
C is the universal assembler, mate.
>>54235534
>>+<
Angry smiley?
>>54235449
>I use Python
I will fucking wreck you bitch
nigger
>>54235512
C for embedded stuff. C++ for computer applications.
>>54235476
>>54235477
Now print something that doesn't append a new line without you explicitly ask for it.
>>54235512
If you learn c ,then you are half way learning c++ . if you want to learn c# forget what you known and learn java or better learn c#
>>54235534
Justify a joke
puts "Hello world!"
Justify that shit.
>>54234818
printf("%s\n", "Hello World");
print "hello world"
>>54235395
>sizeof(char)
>>54236255
>implying you don't need new line in 95% cases
>>54235485
Kek
>>54236255
print("Hello world"),
Step back, plebs, and make way for the Emperor.<html>Hello World</html>
Output streams are powerful if you need something powerful
But yeah, they suck for simply outputting strings, which is what you're usually going to do. There are some good third-party replacements, though. And in most non-fizzbuzz applications, you never directly write anything to stdout directly anyway.
>>54236255
Well you need to ask for things for them to happen you dumb fag
print("faggot", end="")
"Hello world!"
Why do so many languages make it harder than it has to be?
>Not using elisp(message "Hello world!")
>command line
Justify this shit.
>>54239870
I seriously hope
>>54239024
Can you post an example?
Get on my level noobs.
$(document).ready(function(){$("#msgid").html("Hello World!");});
>>54239957<script>
document.write("Hello world!"0;
</script>
>>54239987
>"0;
You dun goofed.
>>54234818main = do putStrLn "Hello World"
and that is haskell
it's over, evene john carmack does not use c++ anymore
>using a language other than PHP for anything at all
>>54239957
>not jquery
you fucked up
>>54234818
It's idiotic.
C++ fell victim to cleverness. The whole thing started out as a clever way to tack OOP behavior onto more-or-less C syntax. Ostensibly, this was to create a direct path forward for C, which becomes a bit unwieldy with the larger software projects of the 1990s.
As time went on, the standards committee and prominent programmers (e.g. Andrei Alexandrescu) reveled in the retarded levels of cleverness they could implement with the shitty preprocessor and dumb template tricks.
So C++ reached a point where it caved in on itself. Libraries had become absurdly clever (e.g. WTL). The Standard Template Library -- which was nowhere near standard for *years* -- was a hideous mess of pointless clever obsession over iterators, weird function names, absolutely hideous implementation code making actually understanding it virtually impossible, and effective prohibition of extension-via-inheritance for no good reason.
Hell, I'd say 90% of engineers I've met don't actually understand what polymorphic inheritance is, how it works, or how it can be used effectively. They just want predictable code and simple APIs.
So everyone abandoned C++. Now, hipster kids see C++, see that people avoid it, and come to the conclusion that they avoid it because it's "hard", "hard == elite", thus "I know C++ == I'm elite". No, it means you wasted time on a horrible language.
Sincerely,
A Long Time C++ Programmer
>>54235496
>puts
>not printf
>>54234818
>not just typing Hello World into a console and taking a screenshot
lmao
>>54240017
>Hell, I'd say 90% of engineers I've met don't actually understand what polymorphic inheritance is, how it works, or how it can be used effectively. They just want predictable code and simple APIs.
"I think I'm smarter than everyone" - the post
>>54236265
>if you want to learn c# [...] better learn c#
/g/
>>54240064
This is an objectively true statement tho.
>>54240013
>john carmack does not use c++ anymore
[citation needed]
>>54240043
What if he is smarter than everyone? You ever think of that shit? Dumbshit.
>>54240110
>mentions inheritance
>thinks he's smart
lmao, composition>inheritance
>>54240110
Yeah but did the person who invented college go to college?
>>54240127
If he substituted composition for inheritance you would be making some comparable statement in the post about how x>composition
You a dumbshit.
>>54240103
http://sdtimes.com/oculus-cto-john-carmack-is-developing-scheme-scripting-language-for-vr/
he avoids c++ now and wants nobody ever to have to learn it
>>54240150
not as dumb as him lmao
>>54240172
lmao ur rite
>>54240043
>"I think I'm smarter than everyone" - the post
Not even close.
Honestly, I have no idea why so many people seem to simply *not understand* polymorphism. I understand why it was often times avoided in the past, due to the (slight) performance hit, but it's not even really an issue anymore. Yet C++ has morphed into a heavily indoctrinated society of anti-inheritance, composition-only robots. I haven't met one yet who seemed to actually grasp polymorphism and how to effectively implement inheritance to promote code reuse.
>>54240168
hmm
gamedev still revolves around C++ (Unreal4, CryEngine5) and C# (Unity, CryEngine5)
>>54240334
I'm sure you believe you aren't pretentious as fuck lmao
>>54240369
I'm not lmao.
lmao amirite
>>54237825
<y>what's up?</y>
>>54235395
>(char*)
>Printf
o i m laffin
>>54234818
what about it
>>54235270
what a disgrace
>>54235449
Because you've never written a more complicated program than Hello World?
>>54240022
puts appends a newline and is like a quarter of a millisecond slower than putting \n after the text with printf.
it's a good convenience function.
>>54240864
Well, very indirectly, it does.
But that bitch is clueless.
>>54240912
No it's probably because you have to jump archaic hoops to get anything done. You don't make money sitting on your ass
alert('hello world')
:^)
>>54239828'hello, world'.
guess the language
>>54236255
io.stdout:write in lua
>>54240970
Prolog
>>54240975
pretty sureprint"hello world"works too.
>>54241015
>>54240975
>>54240982
erlang was what i had in mind, but you did gud
>>54235315
>notconst char *
off yourself
>>54239850
this
or any of thesewrite(6,*) 'ayy lmango'
write(6,'(A)') 'hello memes'
print *, 'nigger faggot edition, I bet you use implicit'
Delicious FORTRAN 95
>>54239828
What are you doing with that string? Shoving it into *0? Writing it into /dev/null? Interpreting it as x86 ASM?
>>54240013
>do on a single value
If we're going for redundancy, why not something like this?main = foo
foo = do (id id) (id x)
x = putStrLn $ id str
where str = "Hello" ++ " world"
>>54240017
>lmao if I say I know the language they'll believe my lies XDDD
.386
.model small,c
.stack 1000h
.data
msg db "Hello World!",0
.code
includelib MSVCRT
extrn printf:near
extrn exit:near
public main
main proc
push offset msg
call printf
push 0
call exit
main endp
end main
Justify this shit.
printf("Fuck yourself");
Justify, faggots.
echo hello world
Justify this shit
>>54241121
You can refer to it as Fortran. This isn't the seventies.
Now this is /g/-tier programming!
>programming
Justify this shit
>>54241224
>pushing arguments
64-bit master race reporting in, please take your history lesson elsewhere
What language most effectively utilizes 64 bit?
>>54241262
yeah, it's the mid-90s.
jokes aside I'm explicitly ruling out the millennial versions because the new features presented, especially OOP, are a terrible idea to add to fortran, if you ask me.
>>54241353
Assembly, followed by C
>>54241364
My point was that it's not stylized as FORTRAN anymore.
>>54241391
>MY POINT WAS THAT IT'S NOT STYLIZED AS FORTRAN ANYMORE.
WHAT ARE YOU TALKING ABOUT?
>>54241391
Well fuck, you're right. I dunno though, it has it's charm at times, but cruise control in code is an absolute no-go
>>54241026
Is that a text editor?
>>54241467
no, just an alternative terminal
>>54241482
Oh I see, thanks
>>54241496
ConEmu, if you wanted the name,
>>54241503
Thanks again, I thought lua was the name lol
p "hello world"
Justify this shit !1!!
>>54241145
He wrote it into an HTML document, to be posted on 4chan, he's basically saying "You need to write all that programming when I can just get my keyboard and type it out", I think.
>>54241770
Then why'd he include the "s?
>>54241371
Weren't those languages optimized for the days of 16 bit computing though?
>>54234818
what's wrong with this?
>>54240022
theres nothing to format in there? why use printf?
>>54240864
...is that a battery?
wait is this for real? you are complaining about c++ by saying the standard output has shit design? the language is a fucking mess but it doesn't start or end at the fucking standard output format. who gives a fuck about how standard out is formatted? Unfortunately c++ adds a lot of actually useful things to C so its standard in a lot of industries.
>>54241459
He means write fortran in lower case.
>>54241026
Hell yeah, ConEmu.
>>54242399
yes
>>54241121
Give me a screencap of FORTRAN 95 on Windows 95.
>>54239828
In Russian they don't use Hello world, they say "Я был coдoмии мeдвeдь" which means "Let my will be done" and I think that's beautiful.
>>54242475
That's pretty cool to be honest
>>54242433
fucking sexist asshole! Women are taking over tech and theres nothing you can do about it, no more boys club for you fucker. Women make MUCH better programmers than men. Men belong on construction sites while women build the important things.
>>54242586
>inb4 people reply
I'll believe it when I see it
>>54242433
Wait, was that even a woman?
>>54235395
>sizeof(char)
>casting malloc
>no quotes around char literals
>capital printf
I kek'd, underrated post
>>54240982
Prolog would be
>write("Hello world!")
>>54242600
pfft, the classic response from the beta-male.. ooooooh you have a different opinion than me,you must be baiting!! nobody in the world as an opinion different from mine!!!
Well NEWS FLASH WHITE MALES!! we're coming to take you off your throne of BONES AND DEATH AND OPPRESSION. we are going to take our country back you fucking racist, sexist pieces of shit. watch when bernie gets elected, then you'll really see. when bernie is elected you fucking white pieces of TRASH, HORRIBLE. BULLIES. wiill finally be put in your proper place and the world will become a fair place for everybody.
I AM ABSOLUTELY AND COMPLETELY SICK. AND. TIRED. OF WHITE MALES THINKING that they are for some reason better than me just because they are men and Im a woman. News flash IDIOTS. women and men are equal, okay? OKAY!>!>!>!>!?>!?!?!?!?!?! YOU FUCKERS!?!?!?1 I fucking cant believe how terrible you people are some times, I see all these FUCKING SEXIST, MISOGYNIST FUCKING THREADS HERE all fucking day and it makes me so fucking mad that I want to cry, sometimes I do actually cry because it makes me feel INFERIOR. THATS RIGHT. you make me fucking cry becAUSE YOU ARE FUCKING AFRAID OF WOMEN IN YOUR FUCKING BOYS CLUB. YOU ARE DISGUSTING PIECES OF SHIT. HONESTLY. I cannot fucking wait until the revolution in tech where men are KICKED THE FUCK OUT and we make incrredibly PROFOUND AND IMPORTANT progress that we've been MISSING BECAUSE of fucjking misogynists in tech. fuck all of you fucking privledged misogynists
>>54239957
get your javascript out of this topic, we're having an adult conversation.
>>54242433
rly dude? pic related is mfw
>>54242406
It's important though anon. Writing to stdout is literally crucial for most terminal applications, and the stdlib's syntax for it is fucking horrible. The idea behind streams is great (extensibility especially) but the decision to use that syntax simply baffles me. It's like manually concatenation strings together instead of using printf, but worse because they overload the bitshift operator for no other reason besides "fuck you"
>>54242711
here's your (You)
>>54242715
Your post amuses me considering the one above yours
>>54242550
It is also at least two lies
>>54242711
Saved
>>54240168
Hasn't most of his stuff been done via custom scripting/super scripting based on C/C++ anyway?
>>54242351
everything
>>54241224
What's with the 0?
>>54244581
lmao have a load of that noob
>>54244733
it's get a load of this noob you retard, at least get your memes right before shittalking anyone else
>>54235395
>using c
>what a faggotMV*()>SDk+!^ &@P&]JEA
>>54235395
Will that work - That's not null terminated my dude
>>54234828
<< is left shift
don't fucking change things
This is why i use printf in C++
>>54236961
>Being autistic enough to memorize the sizes of all the objects when a perfectly fine sizeof method is available
>>54242586
kill yourself
>>54242433
lmao
Women shouldn't be allowed to have stem jobs
>>54235404
PHP is the craziest.
>>54235395
Quality shit post. My colleagues are gonna have a fucking good day with this. Thanks Pajeet.
>>54240013
>domain = print "I fucking hate hello world as the first example when learning a language"
or use putStrLn if you're autistic and want the output without quotes
>Explain this ?
begin
writeln('Hello, World');
end.
>>54241224
>Writing ASM that writes to a modern OS
nah
write functions that do calculations
or leave that shit for retro computing if you're doing more than that
>>54244915
LMAO YOU MAD BRO ?
>>54235395#include <stdio.h>
#include <stdlib.h>
#define SIZE 7
int main(void)
{
char *helloWorld = calloc(SIZE,sizeof(char));
helloWorld = "faggot";
for(register short x = 0;x<SIZE;x++)
{
printf("%c",helloWorld[x]);
}
return ~0xFFFFFFFF;
}
>>54240965
>alert
talk about useful function names
>def asshole(width, *worms)
explain this shit
>>54235270
What's so bad about that?
>>54245530
Yes!!
>>54245707
Uppercase 's' in string is retarded.
>>54235512
It depends on exactly why you need to program as an engineer. If you're doing low-level systems programming, you need C. If you need it to run simulations and stuff, C++ is better. Although, if you learn either one, the other should be easy. There's plenty of C++ programming tasks that DON'T depend on C++ special features (like classes), and differ only from C in that you tend to use different libraries for things like input and output. Though there's no reason why you CAN'T use things like printf() in C++, there's just usually no reason to when cout << is more powerful.
>your parents didn't have you aborted
Justify this shit.
>>54236255
Doesn't Java provide that functionality with separate print() and println() operations?
>>54242307
They're low-level languages, so there's no need to optimize anything (unless the compiler uses unnecessary abstractions, which would just be silly as there's no benefit). Optimizing just means converting the source code to the most efficient machine instructions that will do the job. If your language doesn't include much abstraction in the first place, there's really not much room for optimization.
>>54242775
Just add the following function to your programvoid println(std::string aString) {
std::cout << aString << std::endl;
}
And call that each time rather than using cout.
DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP
Justify this shit.
>>54242475
Get that shitty tumblr meme out of here
>>54242475
Speaking of which, are programming languages translated in non-English speaking countries? Like are basic built-in language terms like "int", "double", "for", "while", "class", "struct" translated into Spanish, Russian, Chinese etc? Or do they use the English terms even in those countries?
>print "Hello World"
justify this shit
>>54235315
>not closing stdout and checking the return value of fclose
What if your disk is full and the write to stdout failed, huh? Bet you didn't think of that one!
>>54245740
This.
>>54234818
Easy.
Imagine you have a keyboard attached to a processor which in some way has managed a lexical interpretation of what you have on screen.
std::cout becomes a call to an object ( or some chip on the board ) that prints out.
<< denotes that a shift of data in current table is going to take place. So something will be shifting into the cout chip. Like when a vending machine takes your dollar.
"Hello World" is the primitive speech you are positing.
<< is yet another shift of the datum
std::endl is the datum to be shifted into the primitive speech. Why endl? Because there is no corresponding key on the keyboard. Carriage return adds a newline, sure, but it also moves the carat on screen.
>>54245740
It's a call to an object rather than a primitive. It's the point of differentiation. Didn't you take calculus?
>>54246695
Why would you assume a programmer knows calculus?
>>54235270
>https://en.wikipedia.org/wiki/Static_import
>a massive faggot
justify this shit
>>54234818
Justify what?
>>54246123
To my knowledge, English is generally used.
>>54246786
6/10
>>54234818
I use C++, but I've never found any use for their weird stream stuff for output, input, file reading, or anything.
printf>cout
>>54247461
It's actually used for automation.
Imagine a dollar bill is your string and cout is a vending machine. Shift the dollar into the vending machine and then operator overloading takes effect and just sucks up the whole dollar and does something with it.
>>54235404
best language.
$var = 1;
$var = "one";
don't have to define shit
fuck you faggots
>>54239498
>print("faggot", end="")print("dumb faggot", end="")
:^)
(=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc
justify this shit, it's almost as if malbolge is trying to work against me programming
it is a cutting edge meme language though so we're using it in our startup
>>54239828
>>54240970
>>54240982
>>54241032
In Holy C:"Hello CIA niggers!\n"
>>54247606
>it is a cutting edge meme language though so we're using it in our startup
hearty kek
C++ namespaces are ugly, I agree, but it was too early in computing to consider using the same syntax for namespaces as classes. C# shines here, that dot operator because as useful as the parentheses in lisp.
>people thinking the problem is with the "std::" shit
>not identifying the problem as C++ streams redefining bitshift operators to not shift bits.
Honestly though who cares.
>>54242475
Thanks google
>>54250030
clearly the problem is with std::endl implicitly flushing.
>>54242711
A for effort there champ
>>54246123
I program in a trilingual country (Dutch, French, German).
English is always used, even for documentation and I have never seen built-ins or literals translated.
Worst I've seen on github once was Spanish written code where all vars and named entities were in Spanish.