Linked Questions

248
votes
143answers
78k views

Tips for golfing in Python

What general tips do you have for golfing in Python? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Python (e.g. "remove comments" is ...
148
votes
376answers
27k views

Implement a Truth-Machine

A truth-machine (credits goes to this guy for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does: Gets a ...
252
votes
63answers
70k views

We're no strangers to code golf, you know the rules, and so do I

Write the shortest program that prints the entire lyrics of "Never Gonna Give You Up" by Rick Astley. Rules: Must output the lyrics exactly as they appear in the above pastebin*. Here's the raw dump:...
42
votes
19answers
2k views

Tips for golfing in The Shakespeare Programming Language

What general tips do you have for golfing in The Shakespeare Programming Language? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to SPL ...
62
votes
105answers
9k views

Make a ;# interpreter

I recently created a new language called ;# (pronounced "Semicolon Hash") which only has two commands: ; add one to the ...
36
votes
73answers
5k views

Generate ;# code

Related to: Make a ;# interpreter In the above linked challenge the task was to create an interpreter for the esoteric language ;#. The ...
19
votes
10answers
3k views

Create a programming language interpreter [closed]

Task: You must create an interpreter that can parse snippets of a programming language. The language does not need to be complex, but it must include the following syntactical elements: Ability to ...
31
votes
3answers
668 views

Build a golfing language with me

A lot of PPCG users helped with the creation of this challenge, both in chat and the Sandbox, specifically Martin Ender, AdmBorkBork, Emigna and user202729 Our community has found it necessary to ...
14
votes
8answers
1k views

Tips for golfing in whitespace

What general tips do you have for golfing in Whitespace? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Whitespace (e.g. "remove ...
-6
votes
30answers
889 views

Introduce Your Language! [duplicate]

Your task is to write a program or function that takes a string as input, and prints Hello (input), I'm (language name). Examples Python: Input: ...
17
votes
97answers
4k views

Output the language name times the number of characters [closed]

Challenge: Your task is to use any language to output that language's name times the number of character's in its name. Use the common name or acronym of the language. If there are multiple ...
134
votes
28answers
11k views

Making Future Posts Runnable Online with Stack Snippets

Stack Snippets were recently added to PPCG! Reminiscent of JSFiddle, Stack Snippets allow HTML, CSS, and JavaScript to be run directly in posts! Here is a very simple Stack Snippet: ...
-2
votes
1answer
291 views

Import this into your own language [duplicate]

The Zen of Python must surely be one of the most beautiful Easter eggs in any language. (It is created by writing import this) So why not create a version for your ...
42
votes
24answers
6k views

Draw the Sawtooth Alphabet

A simple one today. Write the shortest program that draws a "sawtooth alphabet" given a positive integer for the height. You must write the name of your programming language when you come to the ...