[HS] Quel genre de scripteur etez vous ?

Répondre
Partager Rechercher
Allez, je résiste pas, j'en connais ici que ca devrait faire sourire.

Messieurs les scripteurs, choisissez votre camp !

Le but de la manipulation est d'écrire un programme qui affichera "HELLO WORLD" à l'écran.


Terminale

Code PHP:

 10 PRINT "HELLO WORLD"
 
20 END 

DUT 1ère année

Code PHP:

 program HELLO(inputoutput)
 
begin
 writeln
('HELLO WORLD')
 
end

DUT 2ème année

Code PHP:

 (defun HELLO
 
(print
 (
cons 'HELLO (list 'WORLD))
 )
 ) 

Fraîchement sorti de l'école

Code PHP:

 #include <stdio.h>
 
void main(void)
 {
 
char *message[] = {"HELLO ""WORLD"};
 
int i;

 for(
02; ++i)
 
printf("%s"message[i]);
 
printf("\n");
 } 

Professionnel très expérimenté

Code PHP:

 #include <iostream.h>
 #include <string.h>
 
class string
 
{
 private:
 
int size;
 
char *ptr;
 public:
 
string() : size(0), ptr(new char('\0')) {}
 
string(const string &s) : size(s.size)
 {
 
ptr = new char[size 1];
 
strcpy(ptrs.ptr);
 }
 ~
string()
 {
 
delete [] ptr;
 }
 
friend ostream &operator <<(ostream &, const string &);
 
string &operator=(const char *);
 };
 
ostream &operator<<(ostream &stream, const string &s)
 {
 return(
stream << s.ptr);
 }
 
string &string::operator=(const char *chrs)
 {
 if (
this != &chrs)
 {
 
delete [] ptr;
 
size strlen(chrs);
 
ptr = new char[size 1];
 
strcpy(ptrchrs);
 }
 return(*
this);
 }
 
int main()
 {
 
string str;
 
str "HELLO WORLD";
 
cout << str << endl;
 return(
0);
 } 

Programmeur professionel émérite

Code PHP:

 [
 
uuid(2573F8F4-CFEE-101A-9A9F-00AA00342820)
 ]
 
library LHello
 
{
 
// bring in the master library
 
importlib("actimp.tlb");
 
importlib("actexp.tlb");

 
// bring in my interfaces
 #include "pshlo.idl"

 
[
 
uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820)
 ]
 
cotype THello
 
{
 interface 
IHello;
 interface 
IPersistFile;
 };
 };

 [
 
exe,
 
uuid(2573F890-CFEE-101A-9A9F-00AA00342820)
 ]
 
module CHelloLib
 
{

 
// some code related header files
 
importheader();
 
importheader();
 
importheader();
 
importheader("pshlo.h");
 
importheader("shlo.hxx");
 
importheader("mycls.hxx");

 
// needed typelibs
 
importlib("actimp.tlb");
 
importlib("actexp.tlb");
 
importlib("thlo.tlb");

 [
 
uuid(2573F891-CFEE-101A-9A9F-00AA00342820),
 
aggregatable
 
]
 
coclass CHello
 
{
 
cotype THello;
 };
 };


 
#include "ipfix.hxx"

 
extern HANDLE hEvent;

 class 
CHello : public CHelloBase
 
{
 public:
 
IPFIX(CLSID_CHello);

 
CHello(IUnknown *pUnk);
 ~
CHello();

 
HRESULT __stdcall PrintSz(LPWSTR pwszString);

 private:
 static 
int cObjRef;
 };


 
#include
 #include
 #include
 #include
 #include "thlo.h"
 #include "pshlo.h"
 #include "shlo.hxx"
 #include "mycls.hxx"

 
int CHello::cObjRef 0;

 
CHello::CHello(IUnknown *pUnk) : CHelloBase(pUnk)
 {
 
cObjRef++;
 return;
 }

 
HRESULT __stdcall CHello::PrintSz(LPWSTR pwszString)
 {
 
printf("%ws\n"pwszString);
 return(
ResultFromScode(S_OK));
 }


 
CHello::~CHello(void)
 {

 
// when the object count goes to zero, stop the server
 
cObjRef--;
 if( 
cObjRef == )
 
PulseEvent(hEvent);

 return;
 }

 
#include
 #include
 #include "pshlo.h"
 #include "shlo.hxx"
 #include "mycls.hxx"

 
HANDLE hEvent;

 
int _cdecl main(
 
int argc,
 
char argv[]
 ) {
 
ULONG ulRef;
 
DWORD dwRegistration;
 
CHelloCF *pCF = new CHelloCF();

 
hEvent CreateEvent(NULLFALSEFALSENULL);

 
// Initialize the OLE libraries
 
CoInitializeEx(NULLCOINIT_MULTITHREADED);

 
CoRegisterClassObject(CLSID_CHellopCFCLSCTX_LOCAL_SERVER,
 
REGCLS_MULTIPLEUSE, &dwRegistration);

 
// wait on an event to stop
 
WaitForSingleObject(hEventINFINITE);

 
// revoke and release the class object
 
CoRevokeClassObject(dwRegistration);
 
ulRef pCF->Release();

 
// Tell OLE we are going away.
 
CoUninitialize();

 return(
0); }

 
extern CLSID CLSID_CHello;
 
extern UUID LIBID_CHelloLib;

 
CLSID CLSID_CHello = { /* 2573F891-CFEE-101A-9A9F-00AA00342820 */
 
0x2573F891,
 
0xCFEE,
 
0x101A,
 { 
0x9A0x9F0x000xAA0x000x340x280x20 }
 };

 
UUID LIBID_CHelloLib = { /* 2573F890-CFEE-101A-9A9F-00AA00342820 */
 
0x2573F890,
 
0xCFEE,
 
0x101A,
 { 
0x9A0x9F0x000xAA0x000x340x280x20 }
 };

 
#include
 #include
 #include
 #include
 #include
 #include "pshlo.h"
 #include "shlo.hxx"
 #include "clsid.h"

 
int _cdecl main(
 
int argc,
 
char argv[]
 ) {
 
HRESULT hRslt;
 
IHello *pHello;
 
ULONG ulCnt;
 
IMoniker pmk;
 
WCHAR wcsT[_MAX_PATH];
 
WCHAR wcsPath[_MAX_PATH];

 
// get object path
 
wcsPath[0] = '\0';
 
wcsT[0] = '\0';
 if( 
argc 1) {
 
mbstowcs(wcsPathargv[1], strlen(argv[1]) + 1);
 
wcsupr(wcsPath);
 }
 else {
 
fprintf(stderr"Object path must be specified\n");
 return(
1);
 }

 
// get print string
 
if(argc 2)
 
mbstowcs(wcsTargv[2], strlen(argv[2]) + 1);
 else
 
wcscpy(wcsTL"Hello World");

 
printf("Linking to object %ws\n"wcsPath);
 
printf("Text String %ws\n"wcsT);

 
// Initialize the OLE libraries
 
hRslt CoInitializeEx(NULLCOINIT_MULTITHREADED);

 if(
SUCCEEDED(hRslt)) {


 
hRslt CreateFileMoniker(wcsPath, &pmk);
 if(
SUCCEEDED(hRslt))
 
hRslt BindMoniker(pmk0IID_IHello, (void **)&pHello);

 if(
SUCCEEDED(hRslt)) {

 
// print a string out
 
pHello->PrintSz(wcsT);

 
Sleep(2000);
 
ulCnt pHello->Release();
 }
 else
 
printf("Failure to connect, status: %lx"hRslt);

 
// Tell OLE we are going away.
 
CoUninitialize();
 }

 return(
0);
 } 

Administrateur Système

Code PHP:

 #include <stdio.h>
 
main()
 {
 
char *tmp;
 
int i=0;
 
/* on y va bourin */
 
tmp=(char *)malloc(1024*sizeof(char));
 while (
tmp[i]="HELLO WORLD"[i++]);
 
/* Ooopps y'a une infusion ! */
 
i=(int)tmp[8];
 
tmp[8]=tmp[9];
 
tmp[9]=(char)i;
 
printf("%s\n",tmp);
 } 

Apprenti Hacker

Code PHP:

  #!/usr/local/bin/perl
 
$msg="HELLO, WORLD.\n";
 if ($
#ARGV >= 0) {
 
while(defined($arg=shift(@ARGV))) {
 
$outfilename $arg;
 
open(FILE">" $outfilename) || die "Can't write $arg: $!\n";
 print (
FILE $msg);
 
close(FILE) || die "Can't close $arg: $!\n";

 }
 } else {
 print (
$msg);
 }
 
1

Hacker expérimenté

Code PHP:

 #include <stdio.h>
 #define S "HELLO, WORLD\n"
 
main(){exit(printf(S) == strlen(S) ? 1);} 

Hacker très expérimenté

Code PHP:

 cc -o a.out ~/src/misc/bv/bv.c
 
a.out 

Gourou des Hackers

Code PHP:

 cat
 HELLO
WORLD.
 ^


Directeur junior

Code PHP:

 10 PRINT "HELLO WORLD"
 
20 END 

Directeur

Code PHP:

  mail -"HELLO, WORLD." bob@b12 <mailto:bob@b12>
 
Henripourrais-tu m'écrire un programme qui écrit "HELLO, WORLD." À l'écran?
 
J'en ai besoin pour demain.
 ^D 

Directeur sénior

Code PHP:

  zmail Jean
 J
'ai besoin d'un programme "HELLO, WORLD." Pour cette après-midi

Président Directeur Général

Code PHP:

 letter
 letter
Command not found.
 % 
mail
 To
: ^^^C
 
help mail
 help
Command not found.
 % 
damn!
 !: 
Event unrecognized
 
logout 
Très très bon

Pour moi ce serait quelque chose comme :
Code PHP:

#include "thead.h"

void main(){
    
InitalizeGUI(100,200,"Hélo ouaurlde",GUI_TYPE_MSGBOX);
    
DisplayString("Hello world !");
    
CloseGUI();

Ou plus bourrinement
Code PHP:

void main(){
    
SpeakString("Hello world !");

Mais tout le monde s'en fout
pffffffffffffffffffffff
C'est vraiment pas sympa, réaliste certe mais pas sympa.
__________________
Congnois toy toy mesme. Nulle gloire dans le sang inutile
Arfeuh... attends, moi c'est du genre "Terminale"...

Code PHP:

10 PRINT "HELLO WORLD"
20 END 
LOL, ça me rapelle le Basic de mon bon vieil amstrad CPC 464 à K7 !!!:bouffon: :bouffon:

sinon, le "programmeur porfessionnel émérite" c'est le meilleur dans le genre, "pourquoi faire simple quand on peut faire compliqué !".
EH BEN MOI CA ME FAIT PAS RIRE DU TOUT !!! PASKE MES COLLEGUES SONT DANS LA CATEGORIE PROGRAMMEUR PROFESSIONNEL EMERITE ET QUE POUR CORRIGER LEURS BUGS, HEIN ?!?!?!

Eh, ne croyez surtout pas que j'exagère, piocher dans du C vieux de 15 ans avec des includes bourrés de variables globales, redéfinies dans d'autres includes et utilisée au bonheur la chance dans le main code, le tout embrouillé dans du C shell UNIX complètement pourri, ben ça désaoule !
Il y a une erreur, due à la balise vB [php]

C'est pas
Code PHP:

string &string:<img src="ubb/redface.gif" border="0" alt="">perator=(const char *chrs
mais
Code PHP:

string &string :: operator=(const char *chrs
*Chieur*
Code PHP:

 #MAXMODEL ASCII
# model: plc_text01
filedependancy Unknown
newmodel plc_text01
setsupermodel plc_text01 NULL
classification Character
setanimationscale 1.0
#MAXGEOM  ASCII
beginmodelgeom plc_text01
node dummy plc_text01
  parent NULL
endnode
node trimesh text01
  parent plc_text01
  position 
-0.0820635 0.151861 0
  orientation 0 0 0 0
  wirecolor 0.347656 0.347656 0.347656
  ambient 0.34375 0.777344 0.878906
  diffuse 0.34375 0.777344 0.878906
  specular 0 0 0
  shininess 1
  bitmap NULL
  verts 110
    5.5285 
-0.419 0
    5.5285 
-0.7 0
    5.7325 
-0.7 0
    5.7325 
-0.0095005 0
    5.5285 
-0.00950048 0
    5.5285 
-0.293 0
    5.0175 
-0.293 0
    5.0175 
-0.00950044 0
    4.8135 
-0.00950042 0
    4.8135 
-0.7 0
    5.0175 
-0.7 0
    5.0175 
-0.419 0
    3.69209 
-0.418 0
    4.4065 
-0.418 0
    4.4065 
-0.573 0
    3.69209 
-0.573 0
    3.69209 
-0.7 0
    4.4405 
-0.7 0
    4.6105 
-0.596922 0
    4.6105 
-0.113219 0
    4.4405 
-0.00900039 0
    3.69209 
-0.00900032 0
    3.69209 
-0.136 0
    4.4065 
-0.136 0
    4.4065 
-0.291 0
    3.69209 
-0.291 0
    3.4885 
-0.113219 0
    3.3185 
-0.00900029 0
    2.57009 
-0.00900022 0
    2.57009 
-0.136 0
    3.2845 
-0.136 0
    3.2845 
-0.7 0
    3.4885 
-0.7 0
    2.3665 
-0.113219 0
    2.1965 
-0.00900019 0
    1.44809 
-0.00900013 0
    1.44809 
-0.136 0
    2.1625 
-0.136 0
    2.1625 
-0.7 0
    2.3665 
-0.7 0
    1.2445 
-0.595781 0
    1.2445 
-0.113219 0
    1.07431 
-0.00900009 0
    0.495687 
-0.00900004 0
    0.325499 
-0.113219 0
    0.325499 
-0.595781 0
    0.495687 
-0.7 0
    1.07431 
-0.7 0
    1.0405 
-0.136 0
    1.0405 
-0.573 0
    0.529499 
-0.573 0
    0.529499 
-0.136 0
    
-0.347469 -0.00826559 0
    
-1.07352 -0.00826553 0
    
-1.24361 -0.111453 0
    
-1.24361 -0.7 0
    
-1.0395 -0.7 0
    
-1.0395 -0.135266 0
    
-0.812501 -0.135266 0
    
-0.812501 -0.7 0
    
-0.6085 -0.7 0
    
-0.6085 -0.135266 0
    
-0.3815 -0.135266 0
    
-0.3815 -0.7 0
    
-0.177376 -0.7 0
    
-0.177375 -0.111453 0
    
-1.4475 -0.595781 0
    
-1.4475 -0.113219 0
    
-1.61769 -0.00899986 0
    
-2.19631 -0.00899981 0
    
-2.3665 -0.113219 0
    
-2.3665 -0.595781 0
    
-2.19631 -0.7 0
    
-1.61769 -0.7 0
    
-1.6515 -0.136 0
    
-1.6515 -0.573 0
    
-2.1625 -0.573 0
    
-2.1625 -0.136 0
    
-3.4885 -0.595765 0
    
-3.31831 -0.7 0
    
-2.5695 -0.7 0
    
-2.5695 -0.0086404 0
    
-2.7735 -0.00864038 0
    
-2.7735 -0.291 0
    
-3.11417 -0.291 0
    
-3.2845 -0.00864034 0
    
-3.4885 -0.00864032 0
    
-3.31841 -0.291 0
    
-3.4885 -0.395234 0
    
-2.7735 -0.418 0
    
-2.7735 -0.573 0
    
-3.2845 -0.573 0
    
-3.2845 -0.418 0
    
-3.6915 -0.113218 0
    
-3.8615 -0.00899966 0
    
-4.60991 -0.0089996 0
    
-4.60991 -0.136 0
    
-3.8955 -0.136 0
    
-3.8955 -0.7 0
    
-3.6915 -0.7 0
    
-4.8135 -0.00899958 0
    
-5.56231 -0.00899951 0
    
-5.7325 -0.113218 0
    
-5.7325 -0.595781 0
    
-5.56231 -0.7 0
    
-4.8135 -0.7 0
    
-5.0175 -0.136 0
    
-5.0175 -0.573 0
    
-5.5285 -0.572999 0
    
-5.5285 -0.136 0
  faces 98
    9 10 11  1  0 0 0  0
    8 9 11  1  0 0 0  0
    6 7 8  1  0 0 0  0
    6 8 11  1  0 0 0  0
    5 6 11  1  0 0 0  0
    5 11 0  1  0 0 0  0
    3 4 5  1  0 0 0  0
    2 3 5  1  0 0 0  0
    2 5 0  1  0 0 0  0
    2 0 1  1  0 0 0  0
    24 25 12  1  0 0 0  0
    24 12 13  1  0 0 0  0
    21 22 23  1  0 0 0  0
    20 21 23  1  0 0 0  0
    19 20 23  1  0 0 0  0
    18 19 23  1  0 0 0  0
    18 23 24  1  0 0 0  0
    18 24 13  1  0 0 0  0
    18 13 14  1  0 0 0  0
    17 18 14  1  0 0 0  0
    16 17 14  1  0 0 0  0
    16 14 15  1  0 0 0  0
    31 32 26  1  0 0 0  0
    30 31 26  1  0 0 0  0
    30 26 27  1  0 0 0  0
    30 27 28  1  0 0 0  0
    29 30 28  1  0 0 0  0
    38 39 33  1  0 0 0  0
    37 38 33  1  0 0 0  0
    37 33 34  1  0 0 0  0
    37 34 35  1  0 0 0  0
    36 37 35  1  0 0 0  0
    48 40 41  1  0 0 0  0
    40 48 49  1  0 0 0  0
    48 41 42  1  0 0 0  0
    47 40 49  1  0 0 0  0
    46 47 49  1  0 0 0  0
    46 49 50  1  0 0 0  0
    45 46 50  1  0 0 0  0
    48 42 43  1  0 0 0  0
    51 48 43  1  0 0 0  0
    51 43 44  1  0 0 0  0
    44 45 50  1  0 0 0  0
    44 50 51  1  0 0 0  0
    63 64 65  1  0 0 0  0
    62 63 65  1  0 0 0  0
    62 65 52  1  0 0 0  0
    62 52 53  1  0 0 0  0
    61 62 53  1  0 0 0  0
    59 60 61  1  0 0 0  0
    58 59 61  1  0 0 0  0
    58 61 53  1  0 0 0  0
    57 58 53  1  0 0 0  0
    57 53 54  1  0 0 0  0
    57 54 55  1  0 0 0  0
    56 57 55  1  0 0 0  0
    74 66 67  1  0 0 0  0
    66 74 75  1  0 0 0  0
    73 66 75  1  0 0 0  0
    74 67 68  1  0 0 0  0
    74 68 69  1  0 0 0  0
    77 74 69  1  0 0 0  0
    77 69 70  1  0 0 0  0
    72 73 75  1  0 0 0  0
    72 75 76  1  0 0 0  0
    71 72 76  1  0 0 0  0
    70 71 76  1  0 0 0  0
    70 76 77  1  0 0 0  0
    78 90 91  1  0 0 0  0
    90 78 79  1  0 0 0  0
    90 79 80  1  0 0 0  0
    90 80 81  1  0 0 0  0
    89 90 81  1  0 0 0  0
    85 86 87  1  0 0 0  0
    84 85 87  1  0 0 0  0
    88 78 91  1  0 0 0  0
    88 91 92  1  0 0 0  0
    87 88 92  1  0 0 0  0
    84 87 92  1  0 0 0  0
    84 92 89  1  0 0 0  0
    83 84 89  1  0 0 0  0
    83 89 81  1  0 0 0  0
    82 83 81  1  0 0 0  0
    98 99 93  1  0 0 0  0
    97 98 93  1  0 0 0  0
    97 93 94  1  0 0 0  0
    97 94 95  1  0 0 0  0
    96 97 95  1  0 0 0  0
    106 100 101  1  0 0 0  0
    109 106 101  1  0 0 0  0
    105 100 106  1  0 0 0  0
    105 106 107  1  0 0 0  0
    104 105 107  1  0 0 0  0
    104 107 108  1  0 0 0  0
    103 104 108  1  0 0 0  0
    109 101 102  1  0 0 0  0
    102 103 108  1  0 0 0  0
    102 108 109  1  0 0 0  0
endnode
endmodelgeom plc_text01
donemodel plc_text01 
Non, pô taper, SVP pô taper, bobo! :bouffon:

MDR, est j'ai quand même remarqué que le syndrome du programmeur professionnel émérite frappait parfois certains membres du forum (mais je balancerais pas )

J'opterais plutôt pour la version bourrine de Tynril, simple, efficace


Code PHP:

void main()
{
    
SpeakString("Hello world !");

Jaha Effect
Moi j'ai mieux ... sa retourne des phrases aléatoires

*lance NWN*
*clique sur multijoueur*
*rejoins un module persistant*
>> L'écrant affiche chargement.
*appuis sur entrée*
/s HELLO WORLD !
*appuis sur entrée*

>> L'écrant affiche :
HELLO WORLD !
Salut Nermir !
Bonjour, sa va ?
YOSS
Stoppez le shoot !!!!
Tin vos gueules !
Arréte de crier pour rien !
C'est bon, elle ne fait que dire bonjour !
On vas se faire des gobs ?
Vous êtes lourds là, arrêtez de crier.

Et voila

Bon, ok, je sors
Pour ma part j'aime bien la méthode "Directeur"
__________________
"Pour l'Honneur de Dame Pounard et la sauvegarde la Couveuse Impériale, je me battrais jusqu'à mon dernier Couac !"

Mon site de modules pour NwN, de portraits pour BG et de fanfictions
Moi ça serrait plutot du genre:

Code PHP:

$mail pauvre_petit_developpeur_de_bas_d_echelle@i-tech-net.com
subject
hello world
il me faut un programme qui m
'ecrit Hello World
Vite, il me le fallait pour hier!!!!!!!!
.
cc: 
voila

Sinon, petite histoire trés connues dans le domaine de l'informatique, mais je la connaissais comme etant l'évolution du programmeur

Prophetia
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés