SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
API Hour #40 — 8 janvier 2019
Richard Degenne
Les langages ésotériques
Sommaire
• Définitions
• Tour d’horizon
Définition
Langage de programmation
Notation conventionnelle destinée à formuler des
algorithmes et produire des programmes informatiques qui
les appliquent.
— Wikipédia, Langage de programmation
Définition
Ésotérisme
Ensemble d’enseignements secrets réservés à des initiés.
Ce terme est parfois utilisé dans la culture populaire pour
parler de courants de pensée marginaux à composante
secrète ou étrange.
— Wikipédia, Ésotérisme
Définition
Langage de programmation ésotérique
• Langages « traditionnels »
– Expressifs
– Puissants
– Simples
– Performants
• Être utile dans des cas pratiques
• Langages « ésotériques »
– Originaux
– Difficiles
– Absurdes
• Repousser les limites de la définition
• Proposer un défi intellectuel
• Faire des blagues entre barbus
Tour d’horizon
Ressources complémentaires
• esolangs.org
• codegolf.stackexchange.com
++++++++++[>+>+++>++++>+++++++>++++++++>+
++++++++>++++++++++>+++++++++++>+++++++++
+++<<<<<<<<<-
]>>>>+.>>>>+..<.<++++++++.>>>+.<<+.<<<<++
++.<++.>>>+++++++.>>>.+++.<+++++++.------
--.<<<<<+.<+++.---.
Brainfuck
++++++++++[>+>+++>++++>+++++++>++++++++>+
++++++++>++++++++++>+++++++++++>+++++++++
+++<<<<<<<<<-
]>>>>+.>>>>+..<.<++++++++.>>>+.<<+.<<<<++
++.<++.>>>+++++++.>>>.+++.<+++++++.------
--.<<<<<+.<+++.---.
Brainfuck
• > Pointeur vers la droite
• < Pointeur vers la gauche
• + Incrémenter la valeur
• - Décrémenter la valeur
• . Afficher le caractère
• , Lire un caractère
• [ Sauter après ] si la valeur est 0
• ] Revenir à [ si la valeur est différente de 0
++++++++++[>+>+++>++++>+++++++>++++++++>+
++++++++>++++++++++>+++++++++++>+++++++++
+++<<<<<<<<<-
]>>>>+.>>>>+..<.<++++++++.>>>+.<<+.<<<<++
++.<++.>>>+++++++.>>>.+++.<+++++++.------
--.<<<<<+.<+++.---.
0 0 0 0 0 0 0 0 …
Whitespace
• Mémoire classique, registre sous forme de pile
• Instructions regroupées par catégorie
– [Espace] Manipulation de la pile
– [Tab][Espace] Arithmétique
– [Tab][Tab] Accès mémoire
– [Entrée] Conditions, boucles…
– [Tab][Entrée] Entrée / Sortie
• Représentations numériques
– [Espace] 0
– [Tab] 1
– [Entrée] Fin
&>:1-:v v *_$.@
^ _$>:^
Befunge
&>:1-:v v *_$.@
^ _$>:^
• Le code source n’est pas un texte
Befunge
&>:1-:v v *_$.@
^ _$>:^
& > : 1 - : v v * _ $ . @
^ _ $ >  : ^
Befunge
&>:1-:v v *_$.@
^ _$>:^
• Le code source n’est pas un texte
& > : 1 - : v v * _ $ . @
^ _ $ >  : ^
>v
^<
Befunge
&>:1-:v v *_$.@
^ _$>:^
• Une instruction, 4 contextes
• Auto-modifiant
– p(x, y, v) Remplace le caractère (x, y) par v
& > : 1 - : v v * _ $ . @
^ _ $ >  : ^
>v
^<
• Le code source n’est pas un texte
Piet
Piet
• Le code source n’est plus un texte (!)
• 20 couleurs
– 6 niveaux de teintes
– 3 niveaux de luminosité
– Noir et blanc
• Instructions
– Transitions d’une couleur à une autre
• Représentations numériques
– Bloc contigu de n pixels de la même couleur
Piet
• Le code source n’est plus un texte (!)
• 20 couleurs
– 6 niveaux de teintes
– 3 niveaux de luminosité
– Noir et blanc
• Représentations numériques
– Bloc contigu de n pixels de la même couleur
• Instructions
– Pointeur
– Transitions d’une couleur à une autre
Lightness change
Hue change None 1 Darker 2 Darker
None push pop
1 Step add subtract multiply
2 Steps divide mod not
3 Steps greater pointer switch
4 Steps duplicate roll in(number)
5 Steps in(char) out(number) out(char)
Piet
Exemples
Hello world
Approximation de π Interpréteur Brainfuck “Jeu de la vie” de Conway
Le boss de fin
('&%:9]!~}|z2Vxwv-
,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-
,jcL(I&%$#"`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbC
BA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
Malbolge
Le boss de fin
('&%:9]!~}|z2Vxwv-
,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-
,jcL(I&%$#"`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbC
BA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
Malbolge
Le boss de fin
• Mémoire sous forme de bande
– Code et données dans le même espace
– Utilise des mots de 10 trits
• Trois registres (un mot chacun)
– C Code
– D Données
– A Accumulateur
('&%:9]!~}|z2Vxwv-
,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-
,jcL(I&%$#"`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbC
BA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
Malbolge
Le boss de fin
• (C + &C) % 94
• 4, 5, 23, 39, 40, 62, 68, 81
– Exécution de l’instruction
• Si la valeur pointée par C est comprise entre 33 et 126
– Elle est transformée selon la table ci-dessous
• C et D sont incrémentés de 310
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
5z]&gqtyfr$(we4{WP)H-Zn,[%3dL+Q;>U!pJS72FhOA1CB6v^=I_0/8|jsb9m<.TVac`uY*MK'X~xDl}REokN:#?G"i@
Tour d’horizon
Ressources complémentaires
• esolangs.org
• codegolf.stackexchange.com
Merci pour votre attention !

Contenu connexe

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Les langages ésotériques