Tema Libero

ciao mondo!, un viaggio fra i linguaggi di programmazione...

« Older   Newer »
  Share  
view post Posted on 8/4/2007, 23:51     +1   -1

viaggiare o stare fermi è solo un'intenzione

Group:
Administrator
Posts:
10,231
Rating:
+1
Location:
una ridente località nella brughiera lombarda

Status:


quando si incontra un linguaggio di programmazione, il primo programma che viene presentato è in genere il cosiddetto "hello, world!" ne presento una carrellata, se qualcuno lo sa scrivere in altri linguaggi, aggiunga pure!

c

CODICE
#include <stdio.h>
   
  int main(void)
  {
    printf("Hello World!\n");
    return 0;
  }


c++

CODICE
#include <iostream>

  int main()
  {
    std::cout << "Hello World!\n";
  }


bash

CODICE
#!/bin/bash
  echo "Hello World!";


assembly x86

CODICE
IDEAL
  MODEL SMALL
  STACK 100h
  DATASEG
      HW      DB      "hello, world", 13, 10, '$'
  CODESEG
  Begin:
      MOV AX, @data
      MOV DS, AX
      MOV DX, OFFSET HW
      MOV AH, 09H
      INT 21H
      MOV AX, 4C00H
      INT 21H
  END Begin


ed ora passiamo ai linguaggi più bizzarri!

brainfuck

CODICE
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  +++++++.+++++++++++++++++++++++++++++.+++++++..+++.--------------
  -----------------------------------------------------.-----------
  -.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  ++++++++++++++++++++++++.--------.+++.------.--------.-----------
  --------------------------------------------------------.


malbolge (il più difficile linguaggio mai creato!)

CODICE
(=<`$9]7<5YXz7wT.3,+O/o'K%$H"'~D|#z@b=`{^Lx8%$Xmrkpohm-kNi;gsedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543s+O<oLm


linguine (che, ovviamente, deriva da un altro linguaggio chiamato spaghetti... -_-)

CODICE
1[0=72,0$,0+29,0$,0+7,0$,0$,0+3,0$,1=32,1$,0-24,0$,0+24,0$,0+3,0$,0-6,0$,0-8,0$,1+1,1$,1-23,1$]0


befunge

CODICE
"!dlrow ,olleH">:v
                    ^,_@


o, in modo decisamente -_- più leggibile

CODICE
>                 v
v  ,,,,,"Hello" <
>4 8 * ,        v
v,,,,,,"World!"<
>2 5 * ,@


prossimamente altri! :tl_spav:
 
Top
g@sp
view post Posted on 9/4/2007, 08:51     +1   -1




tu a volte mi fai paura, sallo... -_-

ma tanta tanta tanta, eh? :o:
 
Top
Insel
view post Posted on 9/4/2007, 09:09     +1   -1




A chi lo dici!... :lol: certo che, come pensieri notturni, non c'è male... :P
 
Top
g@sp
view post Posted on 9/4/2007, 09:25     +1   -1




davvero, eh? :lol:
per me "hello" vuol dire solo "ciao"... tutto il resto di ciò che hai scritto, ste... beh, se tu mi dicessi che si tratta non di robe strane per il computer, ma di cirillico, oppure esperanto, o magari uno strano dialetto neo zelandese... beh, io ci credo, ecco! :unsure:
 
Top
view post Posted on 9/4/2007, 13:44     +1   -1
Avatar

In un mondo di John e di Paul io sono Ringo Starr

Group:
Moderatori
Posts:
19,836
Rating:
+27
Location:
Un anonimo centro della Bassa Padovana

Status:


Qualcosa di più "terra-terra"?
No, eh?...
 
Top
view post Posted on 10/4/2007, 15:52     +1   -1

viaggiare o stare fermi è solo un'intenzione

Group:
Administrator
Posts:
10,231
Rating:
+1
Location:
una ridente località nella brughiera lombarda

Status:


CITAZIONE (Oderico @ 9/4/2007, 14:44)
Qualcosa di più "terra-terra"?
No, eh?...

subito!

esiste un linguaggio chiamato hello, il cui unico comando è

CODICE
h


che dà come output proprio lo "hello world"!!!

:tl_denti1:
 
Top
Libre
view post Posted on 10/4/2007, 17:33     +1   -1




vb?
 
Top
view post Posted on 10/4/2007, 17:50     +1   -1

viaggiare o stare fermi è solo un'intenzione

Group:
Administrator
Posts:
10,231
Rating:
+1
Location:
una ridente località nella brughiera lombarda

Status:


vb 6.0

CODICE
MsgBox "hello world!"
 
Top
view post Posted on 10/4/2007, 18:08     +1   -1

viaggiare o stare fermi è solo un'intenzione

Group:
Administrator
Posts:
10,231
Rating:
+1
Location:
una ridente località nella brughiera lombarda

Status:


questo fa morire dal ridere!

shakespeare:

CODICE
The Infamous Hello World Program.

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.


                   Act I: Hamlet's insults and flattery.

                   Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
You lying stupid fatherless big smelly half-witted coward!
You are as stupid as the difference between a handsome rich brave
hero and thyself! Speak your mind!

You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer's
day. You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself! Speak your mind!

You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse. Speak your mind.

Speak your mind!

[Exit Romeo]

                   Scene II: The praising of Juliet.

[Enter Juliet]

Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his
black cat! Speak thy mind!

[Exit Juliet]

                   Scene III: The praising of Ophelia.

[Enter Ophelia]

Hamlet:
Thou art as lovely as the product of a large rural town and my amazing
bottomless embroidered purse. Speak thy mind!

Thou art as loving as the product of the bluest clearest sweetest sky
and the sum of a squirrel and a white horse. Thou art as beautiful as
the difference between Juliet and thyself. Speak thy mind!

[Exeunt Ophelia and Hamlet]


                   Act II: Behind Hamlet's back.

                   Scene I: Romeo and Juliet's conversation.

[Enter Romeo and Juliet]

Romeo:
Speak your mind. You are as worried as the sum of yourself and the
difference between my small smooth hamster and my nose. Speak your
mind!

Juliet:
Speak YOUR mind! You are as bad as Hamlet! You are as small as the
difference between the square of the difference between my little pony
and your big hairy hound and the cube of your sorry little
codpiece. Speak your mind!

[Exit Romeo]

                   Scene II: Juliet and Ophelia's conversation.

[Enter Ophelia]

Juliet:
Thou art as good as the quotient between Romeo and the sum of a small
furry animal and a leech. Speak your mind!

Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister! Speak
your mind!

[Exeunt]


:tl_roflt:
 
Top
SirLancillotto
view post Posted on 10/4/2007, 18:24     +1   -1




Vabbè, ma li metti tutti meno il famosissimo BASIC!!!!

CITAZIONE
10 PRINT "Hello World"
20 END

Vediamo, ASP

CITAZIONE
<%
Response.Write("Hello, World!")
%>

PHP

CITAZIONE
<?php
echo 'Hello World!';
?>

AWK

CITAZIONE
BEGIN {
print "Hello World!"
}

COBOL

CITAZIONE
IDENTIFICATION DIVISION.
PROGRAM-ID. CIAO-MONDO.

ENVIRONMENT DIVISION.

DATA DIVISION.

PROCEDURE DIVISION.
DISPLAY "Ciao Mondo!".
STOP RUN.

PLSQL :)

CITAZIONE
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World!');
END;

Tutti linguaggi con i quali programmo od ho programmato!
 
Top
g@sp
view post Posted on 11/4/2007, 07:30     +1   -1




sir.. io no parla manco tua lingua.... tu essere rientrato e non avere capito che coi noi, per lo più, prima mimare a gesti, poi insegnare come a bimbi piccoli di scuola... -_-
io no capire una cippa di queste cose.... -_-

ehm... 2 + 2 fa 4, vero? no, perché mi fermo più o meno a quelle cose lì, ecco...
ma ti so fare anche tante file di asticelle e dire tutto l'alfabeto!! :tl_yahoo:
e se non sei fiero di me, dovresti esserlo, sallo... -_-

(però adesso alemo vic non è il solo che mi fa paura... :o: ...)
 
Top
view post Posted on 11/4/2007, 11:53     +1   -1

viaggiare o stare fermi è solo un'intenzione

Group:
Administrator
Posts:
10,231
Rating:
+1
Location:
una ridente località nella brughiera lombarda

Status:


CITAZIONE (g@sp @ 11/4/2007, 08:30)
...
ehm... 2 + 2 fa 4, vero? no, perché mi fermo più o meno a quelle cose lì, ecco...
...

dipende... in malbolge 2+2=11!!! :tl_denti1:
 
Top
g@sp
view post Posted on 11/4/2007, 12:12     +1   -1




:cry:
va bene, basta... ci rinuncio... :cry:
 
Top
view post Posted on 11/4/2007, 12:24     +1   -1

viaggiare o stare fermi è solo un'intenzione

Group:
Administrator
Posts:
10,231
Rating:
+1
Location:
una ridente località nella brughiera lombarda

Status:


se ti dico che il compilatore di malbolge si comporta come una cpu ternaria va meglio? :tl_fischio:
 
Top
g@sp
view post Posted on 11/4/2007, 12:27     +1   -1




una cpu lo so che cos'è.... ma "ternaria"??? ha qualcosa a che fare con "ternana"? :wub:
altrimenti lo ignoro... -_-
 
Top
16 replies since 8/4/2007, 23:51   119 views
  Share