[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / w / wg] [i / ic] [r9k] [cm / hm / y] [3 / adv / an / cgl / ck / co / diy / fa / fit / hc / int / jp / lit / mlp / mu / n / po / pol / sci / soc / sp / tg / toy / trv / tv / vp / x] [rs] [status / ? / @] [Settings] [Home]
Board:  
Settings   Home
4chan
/g/ - Technology
Text Board: /tech/


Posting mode: Reply
Name
E-mail
Subject
Comment
Verification
reCAPTCHA challenge image
Get a new challenge Get an audio challengeGet a visual challenge Help
File
Password (Password used for file deletion)
  • Supported file types are: GIF, JPG, PNG, PDF
  • Maximum file size allowed is 3072 KB.
  • Images greater than 250x250 pixels will be thumbnailed.
  • Read the rules and FAQ before posting.
  • このサイトについて - 翻訳
  • You may highlight syntax and preserve whitespace by using [code] tags.


New HTML/CSS rolled out two weeks ago. Be sure to check out the new mobile-optimized layout for phones, and inline extension features.

We also added two new themes (first time in 4.5 years!). Thanks to seaweed for porting them over from OneeChan!

We are still working through a few bugs with the new code. Please report any bugs you find to newhtml@4chan.org.

File: 1338169214532.jpg-(451 KB, 1600x1200, helloworld1600.jpg)
451 KB
To celebrate moot _finally_ putting in code tags, Hello World thread!

Post Hello World in your language of choice.


#include stdio.h
void main()
{
printf("Hello, World!");
}
>>
Bonjour monde!

Problème, nouvellefag?
>>
>>25143579
Fuck you, I was just about to do that

Goddag verden!
>>
#include <iostream>

int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
>>
>>25143569


hello : function(msg){
console.log("hello" + msg);
}

hello("world");

>>
>>25143579
>using "nouvellefag" as a translation of "newfag"

neufag you fucking English speaker.
>>
'Hello World'
>>
>>25143636
fuck syntax error lol
>>
>When the first caveman programmer chiseled the first program on the walls of the first cave computer, it was a program to paint the string `Hello, world' in Antelope pictures. Roman programming textbooks began with the `Salut, Mundi' program. I don't know what happens to people who break with this tradition, but I think it's safer not to find out.
>>

print "Hello World!"

>>
Perl.

Also, fuck typing code atm.
>>
>>25143642
>Calling an English speaker an English speaker in English
Brofag; ya just wen full fucktard!
>>
$ irb --simple-prompt
>> puts "Hello world"
Hello world
=> nil
>>
Code tags have added a lot of ``programming'' threads to /g/.
>>
+++++ +++++
[
> +++++ ++
> +++++ +++++
> +++
> +
<<<< -
]
> ++ .
> + .
+++++ ++ .
.
+++ .
> ++ .
<< +++++ +++++ +++++ .
> .
+++ .
----- - .
----- --- .
> + .
>>
 Hello World!

-Posted from my iPhone-
>>
with Ada.Text_IO;

procedure Hello is
begin
Ada.Text_IO.Put_Line("Hello, world!");
end Hello;
>>
@echo Hello world
@pause
@exit


U mad, linuxfags?
>>
>>25143681
Don't taint a good language with your filthy keyboard.
>>
>>25143709
>Brainfuck

Fuck yes!
>>
main = putStrLn "Hello, World!"
>>
 '(hello world) 


Common Lisp, aw yeah

also, there's
 (princ "hello world") [\code], but that kinda returns it twice
>>
>>25143753
>backslashes
>>
>>25143743
Damn, beat me!
>>
>>25143734
>Implying that English is any good
>Jelly because someone else knows French better than him
>Butthurt
>2012
Brofag; ya just went full fucktard?
>>
 

#include <iostream>

int main ()
{

cout << "I'm 200%" << endl;


system("pause")
return 0;

}

>>
>>25143709
>Brainfuck

Alrighty, then.
>>
>>25143767
You obviously have no idea what's going on.
I was implying that French is good and I was butthurt because that other guy's French was shit.

Apparently you people can't write or read.
>>
>>25143763
shit son, apparently I'm bad at this
>>
>>25143569
>void main()
>no angle brackets around stdio.h

The fuck, OP.

#include <stdio.h>

int main(void) { printf("hello world\n"); return 0; }
>>
>>25143794
>Implying anyone on 4chan has a clue about what's going on
>Especially outside their basements
Nice try, newfaggot.
>>
>>25143811
You didn't need to return 0 since you used void main(void) you idiot.
>>
#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}
>>
+++++ +++++             initialize counter (cell #0) to 10
[ use loop to set the next four cells to 70/100/30/10
> +++++ ++ add 7 to cell #1
> +++++ +++++ add 10 to cell #2
> +++ add 3 to cell #3
> + add 1 to cell #4
<<<< - decrement counter (cell #0)
]
> ++ . print 'H'
> + . print 'e'
+++++ ++ . print 'l'
. print 'l'
+++ . print 'o'
> ++ . print ' '
<< +++++ +++++ +++++ . print 'W'
> . print 'o'
+++ . print 'r'
----- - . print 'l'
----- --- . print 'd'
> + . print '!'
> . print '\n'
>>
>>25143569


#include <stdio.h>

int main()
{
printf("Hello, world!\n");
return 0;

}
>>
Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.


Yes, Ook! is a programming language.
>>
File: 1338170201570.jpg-(664 KB, 500x500, 1303794893065.jpg)
664 KB
main()
{
printf("Hello world lol!");
}


>Not writing your C hello world program like this
>>
>>25143828

I didn't use void main(void), you idiot.
>>
>>25143569
>>25143770
nubs r doin it rong.
>>
>>25143834
see
>>25143709
>>
 ('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
>>
>>25143872
but that faggot didn't comment
>>
<script type="text/javascript">
document.write("Hello World!")
</script>
>>
>>25143770
Don't use system("pause"), it uses window's "pause" program which uses too many resources. Use getChar or put a breakpoint there instead.
>>
File: 1338170332467.png-(14 KB, 435x56, Screen Shot 2012-05-27 at 8.58(...).png)
14 KB
>>25143853
>>
public class Test{

public static void main(String args[]){

System.out.println("Hello, World");
}
}
>>
<?php echo 'hello world'; ?>
>>
WHERE MUH VB AT

Module Hi
Sub Main()
MsgBox("Hello world!")
End Sub
End Module
>>
>>25143907
int main(void) != void main(void)
>>
>>25143907

I used void as a parameter, not a return type, dipshit.
>>
>>25143906
Not to mention forgetting the cstdlib header and a semi colon.
>>
InterCal

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
>>
>>25143794
>>25143767

print("Russkiy rasy gospod zdes, pochemu vy ne govorite po-russki?")
>>
print "Hello World"
I started with C++ but dropped it and chose Python.
Dumb move?
>>
>>25144086
Forgot code tags
Hello World
>>
>>25143569

#include <iostream>

Void Hello(){

cout << "Hello World\n";
return 0;
>>
msgbox "Hello World",,"Hello World Box"


Fuck you. VB6
>>
<?php
while (true){
echo "hello world! <br/>";
}
?>
>>
File: 1338171202796.gif-(858 KB, 240x228, 1337808353886.gif)
858 KB
>>25144116

I forgot the fucking }
>>
code
<html>
<body>
<h1> Hello World> </h1>
</body>
</html>
>>
#include "stdio.h"
int main()
{
// fuck da police
char *phrase = "Hello world!\n";
while (*phrase != '\0') putchar(*phrase++);
return 0;
}
>>
>>25144153

>Write php to be executed by a webserver
>Write in a way that can never be returned by a webserver..

herpaderp.
>>
>>25144159
>No main.
>Not std::cout or "using namespace std;"
I think the brace was the least of your worries
>>
>>25144086
extremely dumb move
>>
>>25144086

How does one "drop" languages?

Hit self on head with hammer?
>>
10 print "Hello world"
>>
x86 assembly in position independent ROP, you know, just in case you want to say hello to the world while you're cleaning up your shellcode...

BITS 32

extern printf
extern exit
global main

section .text
main:
jmp _datapos
_start:
push exit
push printf
ret
_datapos:
call _start
mesage_data:
message db "Hello World", 0x0A, 0x00
>>
>>25143709
love me some brainfuck
>>
>>25143914
You aren't the only PHP developer here.
<?php
abstract
class GlobalGeneratorFactoryWorldMaker2012ProfessionalEdition
{ static private $enterprise_world_generated_content = 'world!'
; protected function generate_world_factory_identity_getter ()
{ return GlobalGeneratorFactoryWorldMaker2012ProfessionalEdition::$enterprise_world_generated_content
;}}

abstract
class EnterpriseHelloWorldGeneratorFactory
extends GlobalGeneratorFactoryWorldMaker2012ProfessionalEdition
{ public function __construct()
{ /***/
} static public function setGeneratorWorldFactoryInitializer ( $enterprise_string )
{ echo $enterprise_string, ' ', parent::generate_world_factory_identity_getter()
;}}

EnterpriseHelloWorldGeneratorFactory::setGeneratorWorldFactoryInitializer('Hello');
>>
>>25143624
>std::cout
Is there a reason people don't use use namespace std when they're not using another namespace
>>
>>25144236

because namespaces are good you retard.
>>
>>25144197
Fuck me.
>>
#include "stdio.h"

int main()
{
printf("Implying I know how to use code tags.\n");
return 0;
}
>>
#!/bin/sh
echo Hello world
>>
File: 1338171565802.jpg-(138 KB, 458x357, MY_SIDES..jpg)
138 KB
>>25144235
>>
def print_backwards(x):
if not x:
return ''
return x[-1] + x[:-1]

print print_backwards('apple')
>>
>>25144245
>because namespaces are good you retard.
so why don't people use them?
>>
int main() {
puts("Hello, 4chan.");
return 0;
}
>>
>>25144269
>function named print_backwards
>doesn't print, just returns something

Terrible naming general
>>
>>25144273

Because C++ users don't know how to into programming
>>
>>25144269

u dun goof'd
>>
>>25144215
I stopped studying it and shifted to Python instead.
>>
>>25144235

This is worse than Java
>>
 
class Printer():
def __init__ ( self, str_print ):
if len ( str_print ) > 100:
raise SyntaxError ( "Can't input string with more of 100 characters" )
self.printStr ( str_print )
def printStr ( self, str_ ):
print str_

a = Printer( "Hello World" )
d = raw_input( "-->" )
>>
#include <stdio.h>

int main(){
printf("Hello World!");

return 0;
}
>>
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE


Get on my level.
>>
 print("Hello world")
>>
cat helloworld.txt
>>
>>25144197
>He thinks HTML is a programming language
You failed as expected
>>
program ObjectPascalExample;

type
THelloWorld = object
procedure Put;
end;

var
HelloWorld: THelloWorld;

procedure THelloWorld.Put;
begin
WriteLn('Hello, World!');
end;

begin
New(HelloWorld);
HelloWorld.Put;
Dispose(HelloWorld);
end.


I feel dirty
>>
>>25143569
>Post Hello World in your language of choice.

こんにちは世界

I doubt that actually makes any sense.
>>
>>25144326
 ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.&
lt;<+++++++++++++++.>.+++.------.--------.>+.>.
>>
>>25144362
see
>>25143709 and >>25143834
>>
import <iostream>
use thing std;
number program() (*
say <-- "Hello World!" <-- eol;
mail 0;
*)
>>
PROGRAM:HELLO
:Disp "Hello world"
:Clear
>>
>>25144340
OP wrote language, not programming language. I'd say HTML qualifies.

#!/bin/sh
echo Hello, World!
>>
[code=c]#include <stdio.h>
int main(void){
printf("fuck your shit");
return 0;}[/code]
>>
File: 1338172188200.png-(195 KB, 450x337, 1317565283993.png)
195 KB
>>25144340
>if your favorite language
>mfw you dont know HTML is a markup language
>>
>>25144420
>[code=c
We can do that?
>>
trace ("Hello World!");


Heaters gonna heat.
>>
YOU WILL NEVER BE _THIS_ ENTERPRISE

http://codepad.org/hdwUZ3Ef
>>
>>25144448
by the looks of it, no. that doesn't look like it worked too well to me
>>
masm

include \masm32\include\masm32rt.inc

.code
start:
print "Hello World",13,10
end start
>>
System.out.println("Hello World")

or something
>java
>>
<?php
echo 'Hello World!';
?>
>>
>>25144514
eww masm. at least it isn't gas with AT&T syntax
>>
<html>
<head>
<title> /g/ </title>
</head>
<body>
Hello World
</body>
</html>
>>
>>25144541
echo 'Hello World!';
>>
>>25144514
>masm

Jesus Christ evenyone in my ASM classed tried using that worthless piece of shit.

section .data
hw: db 'Hello World!',0Ah
size: equ $-hw

section .text
  mov eax,4
  mov ebx,1
  mov ecx,hw
  mov edx,size
  int 80h
  mov eax,1
  mov ebx,0
  int 80h
>>
program HelloWorld;

begin
writeln('Hello World');
end.
>>
echo 'Hello World!'
>>
(print "Hello world")
>>
>>25144545
It's nice for basic things. That hello world program assembles to 1.5kb on Windows.

>>25144560
What makes it bad?
>>
 <!DOCTYPE html>

<html>
<body>
<h1>Hello World!</h1>
</body>
<head>


</html>
>>
using System;

class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello, World!");
}
}
>>
>>25144581
>What makes it bad?
For starters Assembly on windows is ugly and clunky shit

MASM is bad though because it macros fucking everything for you. My teacher was using if statements in his code for Christ's sake. it's hardly even assembly
>>
'Hello World' print
>>
 sudo su apt-get install gentoo
>>
>>25144633
What the fuck is the su for
>>
MIPS assembly.
# helloworld.s    Happy Birthday, moot.

.data
helloworld: .asciiz "Hello World!\n"

.text
.globl main
main:
la $a0, helloworld
li $v0, 4
syscall
jr $ra
>>
>>25144581
yea, I guess, but it seems like they macro away all the flexibility. whenever I use it, I just feel like I might as well be just writing in C. I guess its just an acquired taste. I write a lot of stuff that I want to assemble in binary format, and masm isn't too keen on that.
>>
 привет мир 
>>
>>25144616
It's actually a lot similar to C. In fact, I think you can do system(), printf(), and other shit like that in it. Of course, windows API shit too.


Delete Post [File Only] Password
Style
[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / w / wg] [i / ic] [r9k] [cm / hm / y] [3 / adv / an / cgl / ck / co / diy / fa / fit / hc / int / jp / lit / mlp / mu / n / po / pol / sci / soc / sp / tg / toy / trv / tv / vp / x] [rs] [status / ? / @] [Settings] [Home]
[Disable Mobile View / Use Desktop Site]

- futaba + yotsuba -
All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.