text:
ASCII-art videogame edition
I thought it might be fun to throw this on here.
Generate an ASCII-art for one of your favorite videogames.
What you want to generate is up to you but it should meet 2 requirements.

It should be able to identify the game. So either a logo or
something familiar like the triforce in Zelda. a pokeball for
pokémon or an actual pokémon.
Make it solid.

I'm guessing the second requirement is a bit vague, I just dont know how to explain it so let me show you with the triforce.
Wrong
       /\
      /__\
     /\  /\
    /__\/__\

Right
           #
          ###
         #####
        #######
       #       #
      ###     ###
     #####   #####
    ####### #######

This is a popularity-contest, so be creative and dont worry about the length of your code.
Rules

No external resources
You can use any language you like

Edit
You are meant to write some kind of algorithm that will create your ascii art rather than simply arranging the characters.
Sorry for changing the question
Happy Coding!

This question appears to be off-topic because it is an art contest, not a programming contest.

I will make this more clear in the question, ofcourse youre supposed to program it instead of simply arranging the characters manually.

Why was this closed? The edit was not enough? After the question was edited, it is looking like a programming contest for me, not simply an art contest.

Bash
An actual pokémon? Ok. I present the Voltorb, seen from behind.
#!/bin/bash
echo -e '\e[31m'    # escape character for red font
s=6
for i in `seq 8 2 16`; do
    if [ $i -ne 10 ]; then
        for j in `seq $s`; do
            echo -n ' '
        done
        for j in `seq $i`; do
            echo -n '#'
        done
        echo
    fi
    s=`expr $s - 1`
done
echo -e -n '\e[97m'    # escape character for white font
s=2
for i in `seq 16 -2 8`; do
    if [ $i -ne 10 ]; then
        for j in `seq $s`; do
            echo -n ' '
        done
        for j in `seq $i`; do
            echo -n '#'
        done
        echo
    fi
    s=`expr $s + 1`
done
echo -e '\e[0m'    # escape character for default font color

Output:

Javascript
Invaders !
for(j=8,o='';j--;o+='\n')for(i=11;i--;)o+=1&"ĎĘƾŭĽļĽŭƾĘĎ".charCodeAt(i)>>j?'##':'  '

Output :
    ##          ##
      ##      ##
    ##############
  ####  ######  ####
######################
##  ##############  ##
##  ##          ##  ##
      ####  ####

Triforce
for(j=8,o='';j--;o+='\n')for(i=15;i--;)o+=1&"āăćďėĳűǰűĳėďćăā".charCodeAt(i)>>j?'##':'  '

Output :
              ##
            ######
          ##########
        ##############
      ##              ##
    ######          ######
  ##########      ##########
##############  ##############

Any 8-lines (can be extended to 16 easily) logo can be displayed with that code, you have to change only the encoding string.
Each character of the string corresponds to a column.
You can also declare a generic function :
function f(s){for(j=8,o='';j--;o+='\n')for(i=s.length;i--;)o+=1&s.charCodeAt(i)>>j?'##':'  ';return o}
f('ĎĘƾŭĽļĽŭƾĘĎ'); //invaders
f('āăćďėĳűǰűĳėďćăā'); //triforce

To encode the column (8bits), use parseInt, specify the bits with a 1 at the start to enforce unicode.
Example for the first part of the triforce :
String.fromCharCode(parseInt('100000001',2),parseInt('100000011',2),parseInt('100000111',2),parseInt('100001111',2),parseInt('100010111',2),parseInt('100110011',2),parseInt('101110001',2),parseInt('111110000',2))

Output: "āăćďėĳűǰ"

That's brilliant! Even though you're using Unicode, I'll +1 for the clever use of bitwise and char operations.

Python 2.7
#!/bin/python2

a,b=[[78,20],[2,20,47,28],[5,20,40,27],[0,23,37,23],[2,21,14,28],[0,24,29,32],[2,22,21,40],[4,19,20,42],[8,14,13,49],[7,75],[6,66],[5,65],[3,58],[2,48],[2,33],[2,30],[2,28],[1,28],[1,28],[1,28],[1,28],[1,27],[1,27]],[]
for l in a:
    c=' '
    b.append([])
    for i in l:
    b[-1].append(c*i)
        c=[' ','#'][c==' ']
b[4]=b[4][:2]+['        OBJECTION!!']+b[4][2:]
for l in b: print ''.join(l)

Output
                                                                              ####################
  ####################                                               ############################
     ####################                                        ###########################
#######################                                     #######################
  #####################        OBJECTION!!              ############################
########################                             ################################
  ######################                     ########################################
    ###################                    ##########################################
        ##############             #################################################
       ###########################################################################
      ##################################################################
     #################################################################
   ##########################################################
  ################################################
  #################################
  ##############################
  ############################
 ############################
 ############################
 ############################
 ############################
 ###########################
 ###########################

Of course, based on:

It's not a particularly novel method of generating the output, nor is it fantastic ASCII art (it looks more like a gun than a pointer finger, and the spiky hair doesn't come across great), but there isn't enough Ace Attorney in here! :)

Game Maker Language
a="    "
b=a+a+a
c=b+b
d="------"
show_message(a+"  _=====_"+c+a+"   _=====_# "+a+"/ _____ \"+c+a+" / _____ \#   +.-'_____'-."+d+d+d+d+"---.-'_____'-.+#  /   |     |  '."+a+a+"S O N Y+a+a+"'  |  _  |   \# / ___| /|\ |___ \"+b+a+a+" / ___| /_\ |___ \#/ |      |      | ;  __"+a+a+"   _   ; | _         _ | ;#| | <---   ---> | | |__|"+a+a+" |_:> | ||_|   "+a+"(_)| |#| |___   |   ___| ;SELECT"+a+"   START ; |___   "+a+"___| ;#|\    | \|/ |    /  _"+a+" ___  "+a+"_   \    | (X) |    /|#| \   |_____|  .','' '', |___|  ,'' '', '.  |_____|  .' |#|  '-.______.-' /       \ANALOG/   "+a+"\  '-._____.-'   |#|"+b+"   |   "+a+"|"+d+"|"+a+"   |"+b+a+"#|"+b+"  /\   "+a+"/ "+a" \   "+a+"/\   "+b+"|#|"+b+" /  '.___.'"+a+a+"'.___.'  \"+b+"  |#|"+b+"/"+c+a+"\"+b+" |# \  "+a+a+"/  "+c+a+"\"+a+a+"   /#  \________/"+c+a+a+"\_________/")

Result (SE has too much whitespace, try copying to Notepad)
      _=====_                               _=====_
     / _____ \                             / _____ \
   +.-'_____'-.---------------------------.-'_____'-.+
  /   |     |  '.        S O N Y        .'  |  _  |   \
 / ___| /|\ |___ \                     / ___| /_\ |___ \
/ |      |      | ;  __           _   ; | _         _ | ;
| | <---   ---> | | |__|         |_:> | ||_|       (_)| |
| |___   |   ___| ;SELECT       START ; |___       ___| ;
|\    | \|/ |    /  _     ___      _   \    | (X) |    /|
| \   |_____|  .','' '', |___|  ,'' '', '.  |_____|  .' |
|  '-.______.-' /       \ANALOG/       \  '-._____.-'   |
|               |       |------|       |                |
|              /\       /      \       /\               |
|             /  '.___.'        '.___.'  \              |
|            /                            \             |
 \          /                              \           /
  \________/                                \_________/


text:
Prepare data for JS renderer
It's asked to write a script to generate a source data to feed a JavaScript renderer.
JS Renderer documentation
The JS renderer is this script:
function o(x){
  r=x.split(' ');
  (d=document).write('');
  for(i=0;i<r.length;++i){c=r[i].split(',');d.write('')
  }
}

It takes as input a list of X/Y coordinates separated by spaces and commas and prints on DOM the points as 10×10 pixel squares.
For example, if you call the script with:
o('0,0 10,0 20,0 30,0 40,0 20,10 20,20 0,30 10,30 20,30 30,30 40,30 0,50 10,50 20,50 30,50 40,50');

It will print:

Notice that the values can be expressed as calculations, so it will accept:
o('10*2,50/5');

Your task
Write a script that, given as input a string of characters ([A-Z0-9 ]; uppercase letters, numbers, spaces) prints on stdout the coordinates to feed the JS renderer.
Rules

The "line-height" of the characters should be of at least 50px
Your script doesn't need to run the JS parser
The expected output format is: x,y x,y x,y x,y
The shortest code wins

Bonus: if you could reduce the length of the JS renderer without changing the behavior would be great :)

Do the letters have to be all uppercase? or just readable?

all uppercase, I've made it clearer in the description.

Your rules say expected output is x,y but your code produces 'top:'+eval(cp[0])+';left:'+eval(cp[1]) which is the opposite. Which one is right?

Unhandled Error: Security error: attempted to read protected variable: i --> result of running your code on opera 12.16 on windows 8 pro 64bits.

Sorry but your code is a "disaster" in terms of performance and good practices in Javascript. Besides, it throws an exception on opera 12.16. Here is an improved (and longer) version: function o(x){  (d=document).head.innerHTML='';  for(var i=0,r=x.split(' '),l=r.length,e=eval,c;i<l;++i)  {   c=r[i].split(',');d.body.innerHTML+=('');  } }. This reduces the performance hits and gets rid of the document.write and the exception, maintaining a perfect DOM tree.

It's a golfed code, it's normal that it throws warnings :)  Tobia: x and y are just conventions, just follow the examples

Removed 23 chars: function o(x){r=x.split(' ');(d=document).write('');for(i=0;i<r.length;++i){c=r[i].split(',');d.write('')}}

Is html+javascript out not having a stdout?

@edc65 generally alert/prompt are accepted for JS STDIN/STDOUT

Mathematica - 164 bytes
I'm happy to agree if you call this cheating, but it wasn't ruled out in the question. I let Mathematica rasterise the string and then throw away all white pixels and generate instructions from the rest:
 g=""<>MapIndexed[If[#<1,"",{h,w}=ToString/@(10#2);h<>","<>w<>""]&,ImageData@Rasterize[#,RasterSize->(n=5StringLength@#),ImageSize->n]/.{(1.)..}->0/.{_,_,_}->1,{2}]&

It could probably be golfed down even further. Especially the /.{(1.)..}->0/.{_,_,_}->1 looks suspiciously like it could be simplified.
Slightly ungolfed:
g[str_] := (
    n = 5*StringLength[str];
    pixels = ImageData[Rasterize[str, RasterSize->n, ImageSize->n]]
                /. {1., 1., 1.} -> 0
                /. {_, _, _} -> 1;
    StringJoin[
      MapIndexed[
        If[#1 < 1,
           "",
           {h, w} = Map[ToString, 10*#2];
           h <> "," <> w <> ""
        ] &,
        pixels,
        {2}
      ]
    ]
);

This will handle really any characters in the string, and you can tweak the size by adjusting the 5 (which means letters are 5 pixels wide, which meets your requirement of them being 50 actual pixels tall).
Here is some example output using a resolution of 7:

And here using a resolutiong of 9:

And 12:

(The screenshots are somewhat minified to fit SE's column width, of course.)

APL, 196 chars
f←37 5 3⍴(555/2)⊤95x⊥32-⍨⎕UCS'ne,[9fkO!|UUmYb~qu"*5n2wJgBe1P~P+E)$?ZGHb4{W(:edC2JdpirhX4I@m/K/q,ww <=:N%(euf9AJ"'
⎕←1↓∊{⍕¨' '⍺','⍵}/¨↑,/{10×(2↑4×⍵-1)∘+¨1-⍨a/⍥,⍳⍴a←⍉f[(' ',⎕A,∊⍕¨0,⍳9)⍳⍵⌷s;;]}¨⍳⍴s←⍞

Dialect is Nars2000.
The first line produces the font, which I took from this page. I've encoded it in base 95 as printable ASCII characters, so the first line decodes it and turns it into a 37×5×3 bitmap.
The second line reads a line of input. For each character it extracts the right bitmap from the font, produces a list of coordinates of the 'on' bits, adds an offset to the first coordinate (x) depending on the position in the string, multiplies by 10, formats the result as required, and outputs it.
Here is the output for HELLO WORLD 9
0,0 0,10 0,20 0,30 0,40 10,20 20,0 20,10 20,20 20,30 20,40 40,0 40,10 40,20 40,30 40,40 50,0 50,20 50,40 60,0 60,20 60,40 80,0 80,10 80,20 80,30 80,40 90,40 100,40 120,0 120,10 120,20 120,30 120,40 130,40 140,40 160,10 160,20 160,30 170,0 170,40 180,10 180,20 180,30 240,0 240,10 240,20 240,30 240,40 250,30 260,0 260,10 260,20 260,30 260,40 280,10 280,20 280,30 290,0 290,40 300,10 300,20 300,30 320,0 320,10 320,20 320,30 320,40 330,0 330,20 330,30 340,10 340,20 340,40 360,0 360,10 360,20 360,30 360,40 370,40 380,40 400,0 400,10 400,20 400,30 400,40 410,0 410,40 420,10 420,20 420,30 480,0 480,10 480,20 480,40 490,0 490,20 490,40 500,0 500,10 500,20 500,30 500,40

And here it is turned into an image:

It could probably be golfed a bit more here and there, but the main gain would come from a smarter font encoding.
I can explain the code in more detail if anyone asks.

I'm sorry to give bad news but it shows 90º rotated clock-wise and horizontally inverted. Other than that, it looks awesome

@IsmaelMiguel Yeah, I posted a comment earlier on the question above. His rules tell to output x,y, but his demo code reads the numbers as y,x. I chose to go with the rules and flipped cp[0] and cp[1] to take the screenshot. But in case it turns out to be y,x, I'll just have to flip one symbol in my code.

I made an "improved" version of the code and it prints perfectly using the example he gave. MAYBE you should do like in the example. And add a comment to the code, regarding this issue. This is my opinion, you are free to go ahead and do what you want. The only thing is that he is using it in Javascript and the result looks perfect except for that tiny difference I told in the last comment. But other than that, you did a nice work.

Javascript (E6) 274
(261 function + 13 console output)
Not so short, but any font, any size, any character
F=(m,f="50",F="Georgia")=>{d=1024;e=document.createElement("canvas");c=e.getContext("2d");e.height=e.width=d;c.font=f+"px "+F;c.fillText(m,0,f);
i=c.getImageData(0,0,d,d).data;q='';for(p=d*d*4;p;p-=4)i[p-1]&&(q+=(p>>12)+'0,'+((p>>2)&(d-1))+'0 ');return q.trim()}

Ungolfed
function F(m, f="50", F="Georgia") {
  d = 1024
  e = document.createElement("canvas")
  c = e.getContext("2d")
  e.height = e.width=d
  c.font = f + "px " + F
  c.fillText(m,0,f);
  i = c.getImageData(0,0,d,d).data;
  q=''
  for (p = d*d*4; p; p-=4)
    i[p-1] && (q += (p >> 12)+'0,'+((p>>2) & (d-1))+'0 ');
  return q.trim()
}

Usage
console.log(F('HELLO WORLD'))
console.log(F('Bonjour, monde',30,'Garamond'))

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Tips for Golfing in Batch
Windows Batch (CMD) is probably the least suitable language for code golfing.
Avoid newline characters. If you're looking for the shortest code in bytes, as opposed to characters, you will want to get rid of all unnecessary carriage returns (newline characters = 2 bytes). You can use the & operation to do this, trimming one byte for each command.
echo Hello&echo World.

Setting variables. When setting variables using switches, the set parser will ignore spaces.
set /a a+=1
set /p b="User Input: "
:: Will be handled the same as..
set/aa+=1
set/pb="User Input: "

Note that the same parser rules do not apply to all commands - as an example, for loops require spaces. Except between the set, string, or command (i.e. what is inside the brackets) and the word do.
for /f %%a in (file.txt)do ...

Simple mathematical expressions. Also, notice the expression that I used for incrementing in the set /a command. For simple mathematical expressions use += -= *= /= instead of (for example) set /a a=%a%+1.
Gathering command output. To get the output of a command, it can sometimes be useful to output to and read from a file, where you otherwise might have used a for loop to gather the output:
for /f %%a in ('echo test') do set a=%%a
:: Can be shortened to
echo test>f&set/pa=<f

echo test send stdout to a file called f, >f, start a new command & and get the contents of the file in a variable set/pa=<f. Obviously this isn't always useful. But it can be when all you need is a single line of output.
Command output. When suppressing command output, use @ before the commands, unless you need to suppress more than 9 commands, in which case, use @echo off at the start of your script. @echo off is 9 bytes long, and therefore will generally save more bytes with longer scripts.
Commands often do more than just what is obvious - think about what your commands are doing. For example; if you need to set a variable and echo another variable, instead of:
set a=OUTPUT
echo %a%
echo test>f
set /p b=<f

You can use the set command with the /p switch to output %a% for you.
set a=OUTPUT
echo test>f
set /p b=%a%<f

Completely golfed...
set a=OUTPUT&echo test>f&set/pb=%a%<f

A couple of expamples - Count sum of all digits - Goldbach's conjecture.
Any other tips are more than appreciated - I'll keep updating this if I think of anything else.

Please post the answer parts of this as an answer, not as part of the question.

@Charles I'm fairly sure how I've done this is an acceptable format for a 'tips question'. Other people can add answers with tips of their own.

Counters
Whenever you have a variable that will act as a counter starting from 0 you might want to write
set count=0
set/acount+=1

; however, you can eliminate the first lines because whenever set/a is used with an unset variable its value is assumed to be 0
set/acounter+=1

Code Blocks
There a number of ways you can shave off a few bytes when you have to used blocks of code.
Whenever you open a code block, you do not need to insert a line break before the first line of code in that block. The closing parentheses does not have to be on a line of its own either.
If %a%==%b% (
     echo true
) else (
    echo false
)

can be golfed to
If %a%==%b% (echo true)else (echo false)

Printing Without Trailing New Line
The common pattern for this is
echo|set/p=text

but, you can save 2 bytes changing echo to cd
cd|set/p=text

@ankp-morpork Hey, I'm a bit late. But I want to inform you that the if statement can be golfed further. The best one should be: if %a%==%b% (echo true)else echo false

Directly print the result of a numeric calculation
If the challenge requires you to output a number that needs to be calculated, you can use cmd/c set/a to output the result of the calculation directly instead of saving the calculation and then echoing it. Example:
@set/a a=%1+%2
@echo %a%

becomes
@cmd/cset/a%1+%2

Edit: Apparently no spaces are necessary at all, saving 2 more bytes.

Furthermore, the result is printed without an additional CRLF.

Further-furthermore, if the rules allow trash output, @goto&set/a%1+%2 also works.

Ampersands
Although &'s make the code seem shorter, as it uses less lines, it uses just as many characters as a newline.  This means that
echo a&echo b

is as long as
echo a
echo b

so your code can stay readable without wasting characters.
There may be exceptions because some text editors combine line feed and carridge return for each new line.

I included this in the original post because a newline counts for two bytes in every text editor I use. Thanks for adding this clarification.

Window's carraige return linefeed is two characters and many text editors will count it as two, but when I first started answering golf questions one of the comments left said that in PPCG line endings are always counted as one character.

Unix style linefeeds will work just fine in CMD scripts, at least in recent versions of Windows.

In fact, CMD even removes CR characters before parsing: https://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/4095133#4095133

Delayed Expansion
Instead of using the lengthy setLocal enableDelayedExpansion you can use cmd /v on (or cmd/von) which will start a new interpreter with delayed variable expansion enabled.
I have yet to implement this so I don't have any examples, but you could use this in conjunction with the /c switch. Example:
@cmd/von/cset test=test^&echo !test!

Notice the use of the carat before the ampersand. if you need to use multiple ampersands or any other special characters, you may be better off enclosing everything after the /c switch in quotation marks:
@cmd/von/c"set test=test&set test1=test1&echo !test! !test1!"

This method also has the advantage of only having to use one @ character to mask all input, and can therefore be used, without /von, as a shorter alternative to @echo off (or multiple @ symbols).
9 characters: @echo off
6 characters: @cmd/c
For more lengthy scripts, which you can't do on one line, you can do the following to save some bytes:
@!! 2>nul||cmd/q/v/c%0&&exit/b

Or, ungolfed:
@!! 2>nul || cmd /q /v on /c %0 && exit/b

Replace @echo off&setLocal enableDelayedExpansion with the above.
When you first run your script !! will not expand at all, so you recieve an error because "!!" is not a command. The error output is then piped to nul (2>nul). When this first 'command' fails (||), it calls a new instance of cmd, which calls the batch file itself (using /v (on) to enable delayed expansion, and /q to turn echo off). Then !! will expand to nothing, as there is no variable called <NULL>. The rest of your script then runs. After which it will return to the original instance of cmd, and (&&) exit with the /b condition to keep the window open (the exit is so it doesn't continue to run through your script in the context of the first cmd instance, with echo on and delayed expansion off).

For this, running batch files with cmd /q /v on /c <filename> should only count as 2 bytes because they are two "flags" similar to the Perl flags like -pI which would only count as 2 extra bytes.

Start of a string
The notation %var:~start,end% extracts a substring of the variable var. However if start is 0 then you can omit it entirely. We already know that you can omit ,end if you want the rest of the string, which makes %var:~% an almost useless synonym for %var%, except that it returns ~ when %var% is empty. (Perhaps you could use it in a test: if %var:~%==~?)

I like your last sentence reminding us this will save up some quotes :) +1 for that.

Repetitive strings
Set repetitive code blocks in variables, where the number of bytes used to set the variable + the number of bytes to output the variable are less than the number of bytes to just call the code directly.
For an example, see: Draw the combinations that add up to 100
You save 1 byte per usage of the set command, if you create a variable (named with one character, like "s") which contains set<space>. This only generates value if you use the set command more than 12 times. (Note there is a  character at the end of the string set s=set).
set s=set
%s%a=1
%s%b=2
%s%c=3
%s%d=4
%s%e=5
%s%f=6
%s%g=7
%s%h=8
%s%i=9
%s%j=10
%s%k=11
%s%l=12
%s%m=13

The above is 1 byte shorter than..
set a=1
set b=2
set c=3
set d=4
set e=5
set f=6
set g=7
set h=8
set i=9
set j=10
set k=11
set l=12
set m=13

This is probably a pretty poor example - but it gets the point across.

or set/aa=1,b=2,c=3,d=4,e=5,f=6,e=7... (there are much more efficient ways than this)

Shortening IF EQU statements
if %a% equ %b% do_something
if %a%==%b% do_something

Using == instead of  equ  saves 3 bytes.

Shortening quotes in IF statements
This is a traditional so-called "safer" if comparsion.
if "%a%"=="%b%" do_something

To shorten this statement, do the following when the input can only be alphanumerical/empty:
if %a%.==%b%. do_something

Saving a total of 2 bytes.

Challenges that require output
If the question says something like:

Outputs at least 1 visible character.

then you could just do this:
cd

The cd shows the current directory to STDOUT.

GOTOing a label
Here's some methods of gotoing a label, ordered in descending order of bytes.
goto :l
goto l
goto:l

The above method saves 1 byte.

Alternatively you could do goto:l which saves the same 1 byte and has the added bonus of keeping your colon intact

@MatheusAvellar: I have added the content accordingly to your comment

Furthermore, even though goto:nonexistant_label is a fatal error for the cmd.exe parser, commands can still be executed after if they are concatenated, unlike FOR or IF. Bonus: the command is executed as if it were the console: goto&set/a5 actually prints 5!

Omitting space between command and parameters with slashes
Sorry about the uninformative title. What I'm trying to get at is that for some (not all) Windows command, you can omit the space in between the command/program name and the parameter, as long as that parameter starts with a slash. For example:
for /f %%G in ...

becomes
for/f %%G in ...

-1 Byte!

Piping output instead of using ERRORLEVEL
Using ERRORLEVEL to determine whether a command ran correctly is not the shortest or most elegant method. Instead, you can pipe output. This works as follows (remember that any command after the && operator only executes if the command before the && ran without errors. Any command after the || operator, on the other hand, will run only if the command before it did NOT run properly. My example is:
net session>nul
if %errorlevel%==0 (echo 1) else (echo 0)

This could be replaced with:
net session>nul&&echo 1||echo 0

-26 Bytes, wow! Note that this does not work with commands like choice, where the ERRORLEVEL has a special value according to some input.
Regards,Gabe

Using parentheses effectively
Hi again,
Sorry to post a second answer but I felt this one deserved it. I have noticed that people often use one of the following methods to display command output without displaying that pesky C:\Windows\System32>echo foo line before each command.
The first method (using echo off):
@echo off
echo foo
echo bar
echo foobar
echo barfoo

The second method:
@echo foo
@echo bar
@echo foobar
@echo barfoo

However, neither of these methods are as short as the following:
@(echo foo
echo bar
echo foobar
echo barfoo)

Pretty handy, right? On another note, this can be used to pipe multiple lines of output to a file or device easily. For example, this lengthy code:
echo foo>file.txt
echo bar>file.txt
echo foobar>file.txt
echo barfoo>file.txt

becomes significantly shorter:
(echo foo
echo bar
echo foobar
echo barfoo)>file.txt

Thanks for reading this rather lengthy answer, and I hope this helps you.
Regards,
Gabe

Posting multiple answers to [tag:tips] questions isn't bad.

-10 bytes: https://pastebin.com/ebQY0H87. use \r line terminators.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Write code to determine the accepted answer
Post an answer to this question that evaluates any answer to this question and determines whether it wins.
Who wins:

Winner is the answer that wins according to the most answers at 1700 UTC, Sunday, March 2nd.
You are welcome to and encouraged to change your own answer as the contest progresses.  Please do not change others'.
Ties are determined by the shortest code.
Regardless of how much sockpuppeting you might normally do, if something's fishy, I'm gonna disqualify you.
I will not accept my own answer, but I will use it to evaluate yours.

Rules:

Your calculation must provide a numeric score for any arbitrary answer (to make it easy, the input to your algorithm is either the id of the answer or the markdown of the answer on the page).
Your score must have at least one winner, and it must be possible for an answer besides yours to win.
Your algorithm cannot use something very specific to your answer, nor can username or timestamps be used at all.  I will be the final judge of what "very specific" means, but I encourage community policing and public shaming.
Your code must compile, run, and give a score given any answer.
Please include a link to a way to execute your code if it is not listed on Ideone.  See below.

Any special reason for the "Please only contribute one answer" restriction? If I develop two very different algorithms with two very different criteria, can't I post both?

@Victor I guess you're right.  I can ease up on that rule, but I will shut folks down for stacking the deck.

Should the winner correctly determine that it is itself the winner? I.E, if answers A, B and C says that D is the winner, but D says that A is the winner, is D the winner even if it is a wrong answer?

@Victor The winner doesn't have to be correct.  That would be way too hard.

Since when does Ideone allow network access?

R, 1 char
1

You can supply the id of an answer as a command line argument if you wish. :)
Link to ideone.
Further elaboration
Since it is not practical for an answers to execute other answers (different languages, etc.) and evaluate them based on their result the only remaining way I can see for them to give a score is to use some code metric.
I have noticed that all other answers so far give a higher score to shorter programs. I believe this is the shortest code possible so it should rank high in the result of other answers.
How and what answer my code gives for other answers seams to be less relevant. The only important aspect is that others rank my answer high.

Please elaborate.

@rahulroy9202 Updated answer with my reasoning.

:D good point. Your assumptions are logical. Unless someone figures out a way to print 1 with no code at all. :D

@rahulroy9202 I think it is not possible to post a blank code block so even if this is possible in a language you could not post the "code" here. :D

try  inside answer and my code will read it as 0 char answer. :D

@Andris

LOL -- Very clever! I like it.

What? How does this even make sense?

R, 1 char
0

Following up on @Andris's answer, there are now two codes that have a single character: Andris's and mine. Since we tie in the eyes of the other answers, neither of us have "won" outright, so my answer won't "win". :-)

Ruby, 368 char
require 'json'
require 'open-uri'
v='body';w="#{v}_markdown";s='comments'
x=if(d=JSON.parse(open("http://api.stackexchange.com/2.2/answers/#{ARGV[0]}?site=codegolf&filter=!%29r%28UkmOhmCPjXru-TDty").read)['items'][0]).include?(s) then d[s].map{|c|c[w].length*[1,c[w].index('`')||1,c[w].index('\n')||1].max}.reduce(:+) else -2 end
puts d['score']*150+5*(d[v].match(/<(..).*?\1.*?\1/m))[0].ord+x-$~.end(0)

Good luck!

JavaScript- 190 char
Assumption: The first code block is the answer.
var ans=$('.answer'),s=999,sa;
for(i=0;i<ans.length;i++){
    var x =  ans[i].getElementsByTagName('code');
    var z = x[0].innerHTML.replace(/\s/g,'').length;
    if(s>z){
        s=z;
        sa=ans[i];
        }
}
console.log(sa);

Can be tested in browser console.
It assumes the shortest answer to be the correct answer.
How to execute- On Chrome/Firefox open console while on this page and paste code and execute.

It also works in the IE 11 console :)


text:
Create an analogue clock
Create an analogue clock
Goal: To create a working analogue clock using any programming language.
Requirements:

Your clock should feature at least the hour and minute pointers.
The produced clock could be in the form of an image, an animation or ASCII-art.
It is expected that the clock shows local time.

Optional:

You might make your clock to show the seconds pointer in addition to the minutes and hours pointers.
You might also make the timezone to be configurable if you wish.
You are free to choose if you may either neglect or handle issues about leap seconds.
You might think about what happens to your program if the user adjusts the system clock or if a daylight change occurs.

Since this is a popularity-contest, please be creative and draw some nice and beautiful clocks to deserve the upvotes. Most upvoted answer wins, with the exception that I will not accept my own answer.
Finally, it is recommended (but not required) that you post at least one screenshot (or text output in case of ASCII-art) of your clock in your answer. This way, people will not need to compile and run it to see what it is.

This question is intended to be a revival of a deleted question.
Note that it is not a duplicate of this other question. That question was a code-golf asking for ASCII-art. This one is not restricted to ASCII-art and is a popularity-contest instead, so the answers are expected to be very different.

My shell solution: xclock. Requires xclock to be installed.

SVG + Javascript

▶▶▶ Live demo here ◀◀◀
This uses SVG's built-in animation functions to turn the hands, with a bit of additional Javascript to fetch the local time and set the initial hand positions. It works OK in Chrome and Safari, and should be compatible with most modern browsers as it doesn't use any filter effects.
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 400 400" width="400" height="400" version="1.0">
  <defs>
    <linearGradient id="a" x1="0%" y1="100%" x2="0%" y2="0%">
      <stop offset="0%" style="stop-color:#777799"/>
      <stop offset="100%" style="stop-color:#ffffff"/>
    </linearGradient>
    <linearGradient id="b" x1="0%" y1="100%" x2="0%" y2="0%">
      <stop offset="0%" style="stop-color:#ffffff"/>
      <stop offset="25%" style="stop-color:#b6b6cc"/>
      <stop offset="40%" style="stop-color:#515177"/>
      <stop offset="48%" style="stop-color:#ffffff"/>
      <stop offset="56%" style="stop-color:#ffffff"/>
      <stop offset="75%" style="stop-color:#8b8baa"/>
      <stop offset="98%" style="stop-color:#efeff4"/>
      <stop offset="100%" style="stop-color:#fbfbfc"/>
    </linearGradient>
    <linearGradient id="c" x1="0%" y1="100%" x2="0%" y2="0%">
      <stop offset="0%" style="stop-color:#ffffff"/>
      <stop offset="100%" style="stop-color:#777799"/>
    </linearGradient>
    <radialGradient id="d" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
      <stop offset="0%" style="stop-color:#ffffff"/>
      <stop offset="40%" style="stop-color:#ffffff"/>
      <stop offset="70%" style="stop-color:#e6e6ee"/>
      <stop offset="92%" style="stop-color:#b6b6cc"/>
      <stop offset="100%" style="stop-color:#636388"/>
    </radialGradient>
    <radialGradient id="e" cx="50%" cy="150%" r="200%" fx="50%" fy="150%">
      <stop offset="0%" style="stop-color:#ffffff;stop-opacity:0"/>
      <stop offset="59%" style="stop-color:#ffffff;stop-opacity:0"/>
      <stop offset="60%" style="stop-color:#ffffff;stop-opacity:0.6"/>
      <stop offset="70%" style="stop-color:#ffffff;stop-opacity:0.3"/>
      <stop offset="100%" style="stop-color:#ffffff;stop-opacity:0.0"/>
    </radialGradient>
  </defs>
  <g transform="translate(200 200)">
    <circle cx="0" cy="0" r="200" fill="#cecedd"/>
    <circle cx="0" cy="0" r="196" stroke="url(#a)" stroke-width="5" fill="url(#b)"/>
    <circle cx="0" cy="0" r="170" stroke="url(#c)" stroke-width="4" fill="url(#d)"/>
    <circle cx="0" cy="0" r="172" stroke="#ffffff" stroke-width="0.5" fill="none"/>
    <circle cx="0" cy="0" r="193.5" stroke="#ffffff" stroke-width="0.5" fill="none"/>
    <g id="O">
      <polygon points="4,155 4,130 -4,130 -4,155" style="fill:#777799;stroke:#313155;stroke-width:1"/>
      <polygon points="4,-155 4,-130 -4,-130 -4,-155" style="fill:#777799;stroke:#313155;stroke-width:1"/>
    </g>
    <g transform="rotate(30)"><use xlink:href="#O"/></g>
    <g transform="rotate(60)"><use xlink:href="#O"/></g>
    <g transform="rotate(90)"><use xlink:href="#O"/></g>
    <g transform="rotate(120)"><use xlink:href="#O"/></g>
    <g transform="rotate(150)"><use xlink:href="#O"/></g>
    <polygon id="h" points="6,-80 6,18 -6,18 -6,-80" style="fill:#232344">
      <animateTransform id="ht" attributeType="xml" attributeName="transform" type="rotate" from="000" to="000" begin="0" dur="86400s" repeatCount="indefinite"/>
    </polygon>
    <polygon id="m" points="3.5,-140 3.5,23 -3.5,23 -3.5,-140" style="fill:#232344">
      <animateTransform id="mt" attributeType="xml" attributeName="transform" type="rotate" from="000" to="000" begin="0" dur="3600s" repeatCount="indefinite"/>
    </polygon>
    <polygon id="s" points="2,-143 2,25 -2,25 -2,-143" style="fill:#232344">
      <animateTransform id="st" attributeType="xml" attributeName="transform" type="rotate" from="000" to="000" begin="0" dur="60s" repeatCount="indefinite"/>
    </polygon>
    <circle cx="0" cy="0" r="163" fill="url(#e)"/>
  </g>
  <script type="text/javascript"><![CDATA[
    var d = new Date();
    var s = d.getSeconds();
    var m = d.getMinutes() + s/60;
    var h = (d.getHours() % 12) + m/60 + s/3600;
    document.getElementById('st').setAttribute('from',s*6);
    document.getElementById('mt').setAttribute('from',m*6);
    document.getElementById('ht').setAttribute('from',h*30);
    document.getElementById('st').setAttribute('to',360+s*6);
    document.getElementById('mt').setAttribute('to',360+m*6);
    document.getElementById('ht').setAttribute('to',360+h*30);
  ]]></script>
</svg>

Wow! All it's missing to look super-skeuomorphic are shadows under the hands!

It looks good with drop shadows, but the animation can get a bit glitchy in Chrome.

Cool. I had no idea that SVGs could do such things.

Java 8
I made a clock that changes its colors accordingly to the hour of day, showing local time. As the time passes, it will slowly change it colors, using brighter colors at day and darker colors at night.
The window is resizable and the clock will resize automatically to whatever size you choose.
Further, if the user adjusts the system clock or if a daylight time change happens, the clock will automatically reflect that.
There are two forms to run it:

Running the ClockDemo file, i.e. java clock.ClockDemo. This will open a window and you will see the clock there.
Running the ClockSave file, i.e. java clock.ClockSave filename width height [HH:mm:ss]. This will just save the clock in a PNG file with the given file name, width and height. The clock will be draw with the given time, or if that is omitted, with current time. For example, if you run it as java clock.ClockSave clock.png 600 500 12:38:24 it will save the clock in a 600x500 image in a clock.png file and the clock will be showing 12:38:24 AM. Use hours in the 00-23 interval.

Screenshots
Here are some screenshots and generated files:
00:36:50 AM:

02:38:51 AM:

06:42:13 AM:

11:15:28 AM:

05:02:37 PM:

07:11:30 PM:

09:29:34 PM:

Source code
I separated the source in five different files in a package called clock.
Also available at GitHub.
ClockDemo.java
package clock;

import java.awt.EventQueue;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;

public class ClockDemo {
    public static void main(String[] args) {
        EventQueue.invokeLater(ClockDemo::runIt);
    }

    private static void runIt() {
        final JFrame j = new JFrame();
        j.setTitle("JClock");
        final JClock clock = new JClock(new CoolPaint());

        j.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                clock.stop();
                j.dispose();
            }
        });

        j.add(clock);
        j.setBounds(20, 20, 600, 500);
        j.setVisible(true);
        clock.start();
    }
}

ClockSave.java
package clock;

import java.io.IOException;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;

public class ClockSave {
    public static void main(String[] args) {

        // Too much arguments.
        if (args.length < 3 || args.length > 4) {
            System.out.println("Bad usage: Should be java clock.ClockSave filename width height [HH:mm:ss]");
            return;
        }

        // Parse the image size.
        int h, w;
        try {
            w = Integer.parseInt(args[1]);
            h = Integer.parseInt(args[2]);
        } catch (NumberFormatException e) {
            System.out.println("Bad usage: Should be java clock.ClockSave filename width height [HH:mm:ss]");
            return;
        }

        // Parse the intended time.
        LocalTime time;
        if (args.length == 4) {
            try {
                DateTimeFormatter df = DateTimeFormatter.ofPattern("HH:mm:ss");
                time = LocalTime.parse(args[3], df);
            } catch (DateTimeParseException e) {
                System.out.println("Bad usage: Should be java clock.ClockSave filename width height [HH:mm:ss]");
                return;
            }
        } else {
            time = LocalTime.now();
        }

        // Save to an image.
        try {
            new CoolPaint().saveClock(w, h, time, args[0]);
        } catch (IOException e) {
            System.out.println("Error on image output: " + e.getMessage());
        }
    }
}

JClock.java
package clock;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.time.LocalTime;
import java.time.temporal.ChronoField;
import javax.swing.JComponent;

public class JClock extends JComponent {
    private static final long serialVersionUID = 1L;

    private final CoolPaint paint;
    private final Object lock;
    private Thread updater;

    public JClock(CoolPaint paint) {
        this.paint = paint;
        this.lock = new Object();
    }

    private void runClock() {
        int lastTime = -1;
        try {
            while (isRunning()) {
                Thread.sleep(10);
                int t = time();
                if (t != lastTime) {
                    lastTime = t;
                    repaint();
                }
            }
        } catch (InterruptedException e) {
            // Do nothing, the thread will die naturally.
        }
    }

    private int time() {
        return LocalTime.now().get(ChronoField.SECOND_OF_DAY);
    }

    private boolean isRunning() {
        synchronized (lock) {
            return updater == Thread.currentThread();
        }
    }

    public void start() {
        synchronized (lock) {
            if (updater != null) return;
            updater = new Thread(this::runClock);
            updater.start();
        }
    }

    public void stop() {
        synchronized (lock) {
            updater = null;
        }
    }

    @Override
    public void paintComponent(Graphics g) {
        paint.paintClock(getWidth(), getHeight(), time(), (Graphics2D) g);
    }
}

ClockPaint.java
package clock;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.time.LocalTime;
import java.time.temporal.ChronoField;
import javax.imageio.ImageIO;

public interface ClockPaint {

    public void paintClock(int width, int height, int seconds, Graphics2D g2);

    public default void paintClock(int width, int height, LocalTime time, Graphics2D g2) {
        paintClock(width, height, time.get(ChronoField.SECOND_OF_DAY), g2);
    }

    public default void paintClock(int width, int height, Graphics2D g2) {
        paintClock(width, height, LocalTime.now(), g2);
    }

    public default void saveClock(int width, int height, String fileName) throws IOException {
        saveClock(width, height, LocalTime.now(), fileName);
    }

    public default void saveClock(int width, int height, LocalTime time, String fileName) throws IOException {
        saveClock(width, height, time.get(ChronoField.SECOND_OF_DAY), fileName);
    }

    public default void saveClock(int width, int height, int seconds, String fileName) throws IOException {
        BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
        paintClock(width, height, seconds, (Graphics2D) image.getGraphics());
        String f = fileName.endsWith(".png") ? fileName : fileName + ".png";
        ImageIO.write(image, "png", new File(f));
    }
}

CoolPaint.java
package clock;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.RadialGradientPaint;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;

public class CoolPaint implements ClockPaint {

    private static final int SECONDS_IN_MINUTE = 60;
    private static final int SECONDS_IN_HALF_HOUR = 30 * SECONDS_IN_MINUTE;
    private static final int SECONDS_IN_HOUR = 60 * SECONDS_IN_MINUTE;
    private static final int SECONDS_IN_12_HOURS = 12 * SECONDS_IN_HOUR;

    private static final int AM_0_00 = 0;
    private static final int AM_3_00 = 3 * SECONDS_IN_HOUR;
    private static final int AM_4_30 = 4 * SECONDS_IN_HOUR + SECONDS_IN_HALF_HOUR;
    private static final int AM_7_30 = 7 * SECONDS_IN_HOUR + SECONDS_IN_HALF_HOUR;
    private static final int AM_12_00 = 12 * SECONDS_IN_HOUR;
    private static final int PM_4_30 = 16 * SECONDS_IN_HOUR + SECONDS_IN_HALF_HOUR;
    private static final int PM_7_30 = 19 * SECONDS_IN_HOUR + SECONDS_IN_HALF_HOUR;
    private static final int PM_9_00 = 21 * SECONDS_IN_HOUR;
    private static final int PM_12_00 = 24 * SECONDS_IN_HOUR;

    private static final Color BLACK = new Color(0, 0, 0);
    private static final Color DARK_GRAY = new Color(32, 32, 32);
    private static final Color DARK_BLUE = new Color(0, 0, 128);
    private static final Color PURPLE = new Color(128, 0, 128);
    private static final Color CYAN = new Color(0, 255, 255);
    private static final Color YELLOW = new Color(225, 225, 0);
    private static final Color PALE_YELLOW = new Color(224, 224, 64);
    private static final Color RED = new Color(255, 0, 0);
    private static final Color GREEN = new Color(0, 255, 0);
    private static final Color LIGHT_BLUE = new Color(128, 128, 255);
    private static final Color SKY_CYAN = new Color(48, 224, 224);

    private static final Color[] COLOR_CYCLE = {
        DARK_GRAY, LIGHT_BLUE, RED, PALE_YELLOW, GREEN, SKY_CYAN, LIGHT_BLUE, DARK_GRAY
    };

    private static final int RADIAL_PERIOD_LENGTH = PM_12_00 / COLOR_CYCLE.length;
    private static final String[] ROMAN = {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII"};

    private static class Painter {
        private final int width;
        private final int height;
        private final int seconds;
        private final int radius;
        private final Graphics2D g2;
        private final int cx;
        private final int cy;
        private final int secondColorIndex;
        private final int secondsInPeriod;
        private final Color pointersAndNumbersColor;

        public Painter(int width, int height, int seconds, Graphics2D g2) {
            this.width = width;
            this.height = height;
            this.seconds = seconds;
            this.radius = Math.min(width / 2, height / 2);
            this.cx = width / 2;
            this.cy = height / 2;
            this.g2 = g2;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            this.secondColorIndex = seconds / RADIAL_PERIOD_LENGTH;
            this.secondsInPeriod = seconds % RADIAL_PERIOD_LENGTH;

            int startIndex = (secondColorIndex + COLOR_CYCLE.length + 5) % COLOR_CYCLE.length;
            int endIndex = (secondColorIndex + COLOR_CYCLE.length + 6) % COLOR_CYCLE.length;
            Color color1 = COLOR_CYCLE[startIndex];
            Color color2 = COLOR_CYCLE[endIndex];
            this.pointersAndNumbersColor = mixColors(color1, color2, 0, RADIAL_PERIOD_LENGTH, secondsInPeriod);
        }

        private int mixColorComponent(int startComponent, int endComponent, double position) {
            int difference = endComponent - startComponent;
            return startComponent + (int) (difference * position);
        }

        private Color mixColors(Color startColor, Color endColor, int startTime, int endTime, int currentTime) {
            double normalized = (currentTime - startTime) / (double) (endTime - startTime);
            return new Color(
                    mixColorComponent(startColor.getRed(), endColor.getRed(), normalized),
                    mixColorComponent(startColor.getGreen(), endColor.getGreen(), normalized),
                    mixColorComponent(startColor.getBlue(), endColor.getBlue(), normalized));
        }

        private Color upperBackgroundColor() {
            if (seconds < 0) throw new IllegalArgumentException();
            if (seconds <= AM_3_00) return BLACK;
            if (seconds <= AM_4_30) return mixColors(BLACK, DARK_BLUE, AM_3_00, AM_4_30, seconds);
            if (seconds <= AM_7_30) return mixColors(DARK_BLUE, CYAN, AM_4_30, AM_7_30, seconds);
            if (seconds <= AM_12_00) return CYAN;
            if (seconds <= PM_4_30) return CYAN;
            if (seconds <= PM_7_30) return mixColors(CYAN, DARK_BLUE, PM_4_30, PM_7_30, seconds);
            if (seconds <= PM_9_00) return mixColors(DARK_BLUE, BLACK, PM_7_30, PM_9_00, seconds);
            if (seconds <= PM_12_00) return BLACK;
            throw new IllegalArgumentException();
        }

        private Color lowerBackgroundColor() {
            if (seconds < 0) throw new IllegalArgumentException();
            if (seconds <= AM_3_00) return mixColors(BLACK, DARK_BLUE, AM_0_00, AM_3_00, seconds);
            if (seconds <= AM_4_30) return mixColors(DARK_BLUE, PURPLE, AM_3_00, AM_4_30, seconds);
            if (seconds <= AM_7_30) return mixColors(PURPLE, YELLOW, AM_4_30, AM_7_30, seconds);
            if (seconds <= AM_12_00) return mixColors(YELLOW, CYAN, AM_7_30, AM_12_00, seconds);
            if (seconds <= PM_4_30) return mixColors(CYAN, YELLOW, AM_12_00, PM_4_30, seconds);
            if (seconds <= PM_7_30) return mixColors(YELLOW, PURPLE, PM_4_30, PM_7_30, seconds);
            if (seconds <= PM_9_00) return mixColors(PURPLE, DARK_BLUE, PM_7_30, PM_9_00, seconds);
            if (seconds <= PM_12_00) return mixColors(DARK_BLUE, BLACK, PM_9_00, PM_12_00, seconds);
            throw new IllegalArgumentException();
        }

        private void paintBackground() {
            Point2D p1 = new Point2D.Double(width / 2, 0);
            Point2D p2 = new Point2D.Double(width / 2, height);
            g2.setPaint(new GradientPaint(p1, upperBackgroundColor(), p2, lowerBackgroundColor()));
            g2.fillRect(0, 0, width, height);
        }

        private RadialGradientPaint colorOnCycle(Point2D center, float radius) {
            Color baseColor1 = COLOR_CYCLE[(secondColorIndex + COLOR_CYCLE.length - 1) % COLOR_CYCLE.length];
            Color baseColor2 = COLOR_CYCLE[secondColorIndex];
            Color baseColor3 = COLOR_CYCLE[(secondColorIndex + COLOR_CYCLE.length + 1) % COLOR_CYCLE.length];
            Color baseColor4 = COLOR_CYCLE[(secondColorIndex + COLOR_CYCLE.length + 2) % COLOR_CYCLE.length];

            Color start = mixColors(baseColor1, baseColor2, 0, RADIAL_PERIOD_LENGTH, secondsInPeriod);
            Color end = mixColors(baseColor3, baseColor4, 0, RADIAL_PERIOD_LENGTH, secondsInPeriod);
            float index2 = (RADIAL_PERIOD_LENGTH - secondsInPeriod) / (float) RADIAL_PERIOD_LENGTH / 2;
            float index3 = 0.5f + index2;
            float[] positions = index3 == 1.0 ? new float[] {0.0f, index2, 1.0f}
                    : new float[] {0.0f, index2, index3, 1.0f};
            Color[] colors = index3 == 1.0 ? new Color[] {start, baseColor2, end}
                    : new Color[] {start, baseColor2, baseColor3, end};

            return new RadialGradientPaint(center, radius, positions, colors);
        }

        private void paintClockArea() {
            Point2D center = new Point2D.Double(width / 2, height / 2);
            g2.setPaint(colorOnCycle(center, radius));
            g2.fillOval(width / 2 - radius, height / 2 - radius, radius * 2, radius * 2);
        }

        private double pointerRevolutionsToRadians(double angle) {
            return Math.toRadians((450 + angle * -360) % 360.0);
        }

        private void paintPointers() {
            double hAngle = pointerRevolutionsToRadians(seconds % SECONDS_IN_12_HOURS / (double) SECONDS_IN_12_HOURS);
            double mAngle = pointerRevolutionsToRadians(seconds % SECONDS_IN_HOUR / (double) SECONDS_IN_HOUR);
            double sAngle = pointerRevolutionsToRadians(seconds % SECONDS_IN_MINUTE / (double) SECONDS_IN_MINUTE);

            g2.setStroke(new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
            g2.drawLine(cx, cy, (int) (cx + Math.cos(hAngle) * radius * 0.55), (int) (cy - Math.sin(hAngle) * radius * 0.55));
            g2.drawLine(cx, cy, (int) (cx + Math.cos(mAngle) * radius * 0.85), (int) (cy - Math.sin(mAngle) * radius * 0.85));
            g2.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
            g2.drawLine(cx, cy, (int) (cx + Math.cos(sAngle) * radius * 0.85), (int) (cy - Math.sin(sAngle) * radius * 0.85));
        }

        private void paintNumbers() {
            Font originalFont = g2.getFont();
            double amplification = (int) Math.max(radius * 0.08, originalFont.getSize()) / (double) originalFont.getSize();
            AffineTransform at0 = AffineTransform.getScaleInstance(amplification, amplification);
            Font amplifiedFont = originalFont.deriveFont(at0);
            g2.setFont(amplifiedFont);
            FontMetrics fm = g2.getFontMetrics();

            for (int i = 1; i <= 12; i++) {
                double angle = pointerRevolutionsToRadians(i / 12.0);
                double textInclination = Math.toRadians(30 * i);
                AffineTransform at = AffineTransform.getRotateInstance(textInclination);
                at.scale(amplification, amplification);
                Font derivedFont = originalFont.deriveFont(at);
                g2.setFont(derivedFont);
                int pixelsOffset = fm.stringWidth(ROMAN[i]) / 2;
                int xPlot = (int) (cx + Math.cos(angle) * radius * 0.9 - pixelsOffset * Math.cos(textInclination));
                int yPlot = (int) (cy - Math.sin(angle) * radius * 0.9 - pixelsOffset * Math.sin(textInclination));
                g2.drawString(ROMAN[i], xPlot, yPlot);
            }
            g2.setFont(originalFont);
        }

        private void paintDots() {
            for (int i = 1; i < 60; i++) {
                if (i % 5 == 0) continue;
                double angle = pointerRevolutionsToRadians(i / 60.0);
                g2.fillRect((int) (cx + Math.cos(angle) * radius * 0.9) - 1, (int) (cy - Math.sin(angle) * radius * 0.9) - 1, 3, 3);
            }
        }

        public void paintClock() {
            paintBackground();
            paintClockArea();

            g2.setColor(pointersAndNumbersColor);
            g2.setPaint(pointersAndNumbersColor);
            paintNumbers();
            paintDots();
            paintPointers();
        }
    }

    @Override
    public void paintClock(int width, int height, int seconds, Graphics2D g2) {
        new Painter(width, height, seconds, g2).paintClock();
    }
}

I have become frustrated with various desktop clocks ( I need one :)), so decided to use your code as the base for a simple clock. Do you by any chance have a Github repo for this code?

@ipolevoy As you wished, I added it to GitHub.

appreciate the effort!

Freepascal
This clock displays the time, date and phase of the moon. However unlike mechanical clocks that have a small window for displaying the phase of the moon, in my clock the whole face is used to display it. Today Feb 14 is a full moon. You can see the expected output over the next few days below.
uses graph,sysutils;

const hemisphere=-1; {-1=north,1=south}
MonthStr : array[1..12] of string [3] =
('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep ','Oct','Nov','Dec');

var yy,dd,mm,hh,mn,ss,ms: word;
var s: string; d2fullmoon,hour,min:real; sec:word;

var gd, gm, n : integer;
var right, left, centre: word;

begin

  gd := D4bit;
  gm := m640x480;
  initgraph(gd,gm,'');
  setbkcolor(blue);cleardevice; setbkcolor(black);
  setlinestyle(0,0,3);
  settextjustify(centertext,centertext);
  settextstyle(defaultfont,horizdir,2);

  while true do begin

    {output to console}

    DecodeDate(Date,YY,MM,DD);
    Writeln (Format ('Today is %d/%d/%d',[dd,mm,yy]));

    DecodeTime(Time,HH,Mn,SS,MS);
    Writeln (format('The time is %d:%d:%d.%d',[hh,mm,ss,ms]));

    d2fullmoon:=yy*(365*3+366)/4+mm*365/12+dd-2014*(365*3+366)/4-2*365/12-14;
    writeln ('days since full moon 14 feb 2014 ',d2fullmoon);

    if ss mod 15=0 then begin {Refresh display every 15 sec. Only the second hand is refreshed every sec.}

      {Draw circle and 180deg pie in yellow/black. Draw yellow or black ellipse on top. Add boxes for date}

      if sin(d2fullmoon/29.530588853*2*pi)*hemisphere>0 then right:=yellow else right:=black;
      left:=yellow-right;

      setcolor(right);setfillstyle(solidfill,right);
      fillellipse(320,240,200,200);

      setfillstyle(solidfill,left);setcolor(left);
      pieslice(320,240,90,270,200);

      if cos(d2fullmoon/29.530588853*2*pi)>0 then centre:=yellow else centre:=black;
      setcolor(centre); setfillstyle(solidfill,centre);
      fillellipse(320,240,abs(trunc(200*cos(d2fullmoon/29.530588853*2*pi))),200);

      setcolor (blue); setfillstyle(solidfill,blue);
      bar (270,135,370,165); bar (270,345,370,315);

      {fill in numbers}

      for n:=1 to 12 do begin
        setcolor(blue); setfillstyle(solidfill,blue);
        fillellipse(319+trunc(170*sin(n*pi/6)),240-trunc(170*cos(n*pi/6)),15,15);
        fillellipse(320+trunc(170*sin(n*pi/6)),240-trunc(170*cos(n*pi/6)),15,15);

        moveto(322+trunc(170*sin(n*pi/6)),240-trunc(170*cos(n*pi/6)));
        setcolor(white);
        str(n,s);outtext(s);
      end;

      {fill in date}

      str(yy,s);
      moveto(320,330);outtext(s);
      str(dd,s);
      moveto(320,150);outtext(s+monthstr[mm]);

      {draw hour and minute hands}

      hour:=hh+mn/60; min:=mn+ss/60;
      setcolor(cyan) ;setfillstyle(solidfill,cyan);
      moveto(320,240);
      linerel(trunc(140*sin(min*pi/30)),trunc(-140*cos(min*pi/30)));
      fillellipse(320+trunc(140*sin(min*pi/30)),240+trunc(-140*cos(min*pi/30)),7,7);
      moveto(320,240);
      linerel(trunc(100*sin(hour*pi/6)),trunc(-100*cos(hour*pi/6)));
      fillellipse(320+trunc(100*sin(hour*pi/6)),240+trunc(-100*cos(hour*pi/6)),7,7);
      fillellipse(320,240,10,10);

    end;

    {draw second hand in XOR mode, sleep for a second, then repeat to undraw}

    sec:=ss;
    setwritemode(xorput); setcolor(white);
    moveto(320+trunc(12*sin(sec*pi/30)),240+trunc(-12*cos(sec*pi/30)));
    linerel(trunc(150*sin(sec*pi/30)),trunc(-150*cos(sec*pi/30)));

    Sleep(1000);

    moveto(320+trunc(12*sin(sec*pi/30)),240+trunc(-12*cos(sec*pi/30)));
    linerel(trunc(150*sin(sec*pi/30)),trunc(-150*cos(sec*pi/30)));
    setwritemode(copyput);

  end;
  closegraph;
end.

Wonderful, I really liked this one.

A simple one my friend wrote in TI 84 BASIC:
StoreGDB 0
CoordOff
GridOff
AxesOff
LabelOff
ExprOff
ClrDraw
62->Ymax
0->Ymin
94->Xmax
0->Xmin
Func
FnOff 0,1,2,3,4,5,6,7,8,9
PlotsOff 1,2,3
Full
Xmax/2->Xmax
Ymax/2->Ymax
~Xmax->Xmin
~Ymax->Ymin
Degree

15->H
18->M
20->S

Circle(36,~22,7)
Circle(0,0,30)
For(X,1,12)
Text(28-int(cos(X*30)*25),46+int(sin(30*X)*25),X)
End

{0,0,0}->|LANG

While getKey=0
getTime->|LTIME
getDate->|LDATE

Text(0,0,"12 HR")
Text(50,0,"24 HR")
If |LTIME(1)>12:Then
Text(6,7,(|LTIME(1)-12))
Else
Text(6,7,|LTIME(1))
End

If |LTIME(1)<=9
Then
Text(56,4,"O")
Text(56,8,|LTIME(1))
Else
Text(56,4,|LTIME(1))
End

Text(29,4,|LTIME(2))

If |LDATE(2)=1
Text(0,70,"JAN")

If |LDATE(2)=2
Text(0,70,"FEB")

If |LDATE(2)=3
Text(0,70,"MAR")

If |LDATE(2)=4
Text(0,70,"APR")

If |LDATE(2)=5
Text(0,70,"MAY")

If |LDATE(2)=6
Text(0,70,"JUN")

If |LDATE(2)=7
Text(0,70,"JUL")

If |LDATE(2)=8
Text(0,70,"AUG")

If |LDATE(2)=9
Text(0,70,"SEP")

If |LDATE(2)=10
Text(0,70,"OCT")

If |LDATE(2)=11
Text(0,70,"NOV")

If |LDATE(2)=12
Text(0,70,"DEC"
Text(2,81,",")
Text(0,85,|LDATE(3))
Text(8,75,|LDATE(1))

If |LTIME(1)>=12
Then
Text(50,80,"PM")
Else
Text(50,80,"AM")
End

If |LTIME(3)!=|LANG(3)/6
Line(0,0,sin(|LANG(3))*S,cos(|LANG(3))*S,0)

If |LTIME(2)!=|LANG(2)/6
Then
Line(0,0,sin(|LANG(2))*M,cos(|LANG(2))*M,0)
Line(0,0,sin(|LANG(1))*H,cos(|LANG(1))*H,0)
End

|LTIME(1)*30+|LTIME(2)/2->|LANG(1)
|LTIME(2)*6->|LANG(2)
|LTIME(3)*6->|LANG(3)

Line(0,0,sin(|LANG(1))*H,cos(|LANG(1))*H
Line(0,0,sin(|LANG(2))*M,cos(|LANG(2))*M
Line(0,0,sin(|LANG(3))*S,cos(|LANG(3))*S
End

I would give this +100 if I could :)

Can you post a screenshot?

no, my TI-84 is broken and i can't find a good emulator for it

@Victor - got my hands on a TI, updating w/screenshot

@TheDoctor Nice. :)

@Timtech That's called a bounty.

Mathematica
A plain-vanilla, functioning clock that displays local time:
Dynamic@Refresh[ClockGauge@AbsoluteTime[], UpdateInterval -> 1]

Standard Options

Hand-drawn clock gauge
There are alternatives to the built-in clock gauge. Here is one.
Continuous sweep has been implemented for the hour and minute hands. They update together with the second hand.
u[i_, k_] := {Sin[2 \[Pi] i/k], Cos[2 \[Pi] i/k]};
Dynamic[{f = Date[], Clock[{1, 1}, 1]}]
Graphics[Dynamic@{Circle[{0, 0}, 1.175], Circle[{0, 0}, 1.2],

   (* tick marks at minutes *)
   Table[Text[".", u[i, 60]], {i, 60}],

   (* hour labels *)
   Table[Text[i, u[i, 12]], {i, 12}],

   (* hour hand *)
   {Darker@Red, Arrowheads[.12], Thickness[.0175], Arrow[{{0, 0}, .6 u[f[[4]]+f[[5]]/60, 12]}]},

   (*minute hand *)
   {Blue, Arrowheads[.08], Thickness[.0085], Arrow[{{0, 0}, .85 u[f[[5]]+f[[6]]/60, 60]}]},

   (*second hand *)
   {Thickness[.005], Arrow[{{0, 0}, .9 u[f[[6]], 60]}]}},
   BaseStyle -> 25]

You've orphaned a line of code at the top of your hand-drawn gauge code block. I'd edit it, but the system won't allow one-character edits and all it needs is a newline.

Postscript - originally written to help my children to learn to tell the time.  Page 1 shows the current time, pages 2-4 are pages for learners.  The pages for learners use rand to make random times, so they are different each time you process it.  Use Ghostscript to make a PDF version if you want to show the current time.  Sized for A4 paper.
%!PS-Adobe-3.0
%%Creator: Toby Thurston
%%Title: (Pages of pedagogical clocks)
%%CreationDate: (2014-02-14)
%%BoundingBox: 12 12 583 828
%%Pages: 1
%%EndComments
<< /PageSize [595 842] >> setpagedevice
%%BeginSetup
/clock {
  /mins exch def
  /hour exch def
  /r exch def % radius
  /cr r 100 div def
  % draw the minute marks
  12 { .5 setlinewidth 4 { 6 rotate r 0 moveto r 20 div 0 rlineto stroke } repeat
        2 setlinewidth     6 rotate r 0 moveto r 20 div 0 rlineto stroke } repeat
  % numbers
  /fontsize r 0.14 mul def
  /Helvetica findfont fontsize scalefont setfont
  /s 2 string def
  /rr r 0.9 mul def
  1 1 12 { /n exch def /theta 90 30 n mul sub def
  /st n s cvs def st stringwidth pop /dx exch 2 div neg def
  rr theta cos mul rr theta sin mul moveto dx fontsize 3 div neg rmoveto st show
  } for

  % draw hands (unless hour is negative)
  -1 hour lt {
      gsave % hour hand first
      90 60 hour mul mins add 2 div sub rotate
      newpath
      0 2 moveto
      15 cr mul  3 cr mul 33 cr mul   0 cr mul 50 cr mul  3 cr mul curveto
      55 cr mul 15 cr mul 60 cr mul   0 cr mul 76 cr mul  0 cr mul curveto
      60 cr mul  0 cr mul 55 cr mul -15 cr mul 50 cr mul -3 cr mul curveto
      33 cr mul  0 cr mul 15 cr mul  -3 cr mul  0 cr mul -2 cr mul curveto
      closepath 0 0 .677 setrgbcolor fill
      grestore
      gsave % minute hand on top
      90 6 mins mul sub rotate
      newpath
      0 2 moveto
      15 cr mul 3 cr mul 33 cr mul 0         50 cr mul  1 cr mul curveto
      65 cr mul 3 cr mul 83 cr mul 0         97 cr mul  0        curveto
      83 cr mul 0        65 cr mul -3 cr mul 50 cr mul -1 cr mul curveto
      33 cr mul 0        15 cr mul -3 cr mul 0         -2 cr mul curveto
      closepath .635 0 0 setrgbcolor fill
      grestore
  } if

  % finally do central dot (to cover starts of hands) and outer band
  .5 setlinewidth
  0 0 moveto 0 0 r 20 div   0 360 arc fill
             0 0 r 1.07 mul 0 360 arc stroke

} def
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
/pgsave save def
%%EndPageSetup
  297 480 translate
  120

  (%Calendar%) /IODevice resourcestatus {
   pop pop (%Calendar%) currentdevparams
   dup /Running get { dup /Hour get exch /Minute get }{ 0 0 } ifelse } { -1 -1 } ifelse

  clock
pgsave restore
showpage
%%Page: 2 2
%%BeginPageSetup
/pgsave save def
%%EndPageSetup
  75 -55 translate
  4 {
     5 { 0 165 translate % a page of clocks for learners
         50 rand 12 mod rand 60 mod clock
         % line underneath
         gsave [1 3] 0 setdash 50 neg dup 1.8 mul moveto 50 2 mul 0 rlineto stroke grestore
     } repeat
     146 5 165 mul neg translate
  } repeat
pgsave restore
showpage
%%Page: 3 3
%%BeginPageSetup
/pgsave save def
%%EndPageSetup
  75 -55 translate
  4 {
     5 { 0 165 translate    % whole multiple of five minutes only
         50 rand 12 mod rand 12 mod 5 mul clock
         gsave [1 3] 0 setdash 50 neg dup 1.8 mul moveto 50 2 mul 0 rlineto stroke grestore
     } repeat
     146 5 165 mul neg translate
  } repeat
pgsave restore
showpage
%%Page: 4 4
%%BeginPageSetup
/pgsave save def
%%EndPageSetup
  75 -55 translate
  4 {
     5 { 0 165 translate    % quarter hours only
         50 rand 12 mod rand 4 mod 15 mul clock
         gsave [1 3] 0 setdash 50 neg dup 1.8 mul moveto 50 2 mul 0 rlineto stroke grestore
     } repeat
     146 5 165 mul neg translate
  } repeat
pgsave restore
showpage
%%EOF

+1 for writing Postscript to teach your kids. You are one awesome parent.

Won't rand give you the same results each time? Unless you seed it it somehow, maybe (/dev/rand)(r)file read pop srand.

@luserdroog ...err no.  You only need srand if you want to fix your position in PS's sequence of pseudorandom numbers. To quote the PSLRM: "Executing srand with a particular value causes subsequent invocations of rand to generate a reproducible sequence of results."

Right, but the interpreter itself initializes with 1 srand before executing user programs. So you must introduce your own entropy to get a non-reproducible sequence. Haven't tested with Distiller, but this is what Ghostscript does. gsnd -q -dBATCH -c 'rand =' always gives me 16807.

Demo: http://jsfiddle.net/kelunik/Vuuq8/7/embedded/result/

var h = document.getElementById('h');
var m = document.getElementById('m');
var s = document.getElementById('s');

setInterval(function () {
    refreshClock();
}, 1000);

function refreshClock() {
    var time = new Date;

    deg = time.getSeconds() * 6 - 90;
    s.style.webkitTransform = s.style.MozTransform = s.style.msTransform = s.style.transform = "rotate(" + deg + "deg)";

    deg = time.getMinutes() * 6 - 90;
    m.style.webkitTransform = m.style.MozTransform = m.style.msTransform = m.style.transform = "rotate(" + deg + "deg)";

    deg = time.getHours() % 12 * 30 - 90;
    h.style.webkitTransform = h.style.MozTransform = h.style.msTransform = h.style.transform = "rotate(" + deg + "deg)";
}

window.onload = function () {
    refreshClock();
};
html, body {
    margin: 0;
    padding: 0;
    text-align: center;
}
#clock {
    width: 100vmin;
    height: 100vmin;
    border-radius: 50%;
    border: 1vmin solid #333;
    position: relative;
    box-shadow: 0 0 5vmin rgba(0, 0, 0, .3);
    box-sizing: border-box;
    margin: 0 auto;
    transform: scale(.8);
}
#h, #m, #s {
    top: 50vmin;
    left: 50vmin;
    position: absolute;
}
#h:before, #m:before, #s:before {
    content:"";
    position: absolute;
    left: 100%;
    height: 0;
    box-shadow: 0 0 2vmin rgba(0,0,0,.2);
    border-radius: 50%;
}
#h:before {
    width: 25vmin;
}
#m:before {
    width: 35vmin;
}
#s:before {
    width: 45vmin;
}
#h:before {
    background: black;
    height: 4vmin;
    transform: translateY(-2vmin);
}
#m:before {
    background: black;
    height: 2vmin;
    transform: translateY(-1vmin);
}
#s:before {
    background: red;
    height: 2vmin;
    transform: translateY(-1vmin);
}
<div id="clock">
    <div id="h"></div>
    <div id="m"></div>
    <div id="s"></div>
</div>

I get a clock, but the hour and minute (and second?) hands point straight to the right. Nothing is moving.

What browser do you use?

Google Chrome..

Your answer looks promising and interesting, but it is failing now. There is something wrong with the transform CSS property in the refreshClock function (but I don't know exactly what). Tried it in IE, chrome and firefox, did not work in anyone.

@Victor Seems to work just in Firefox right now, but there it's working.

@kelunik I think that I could fix it. Please, update your fiddle.

@Victor thanks for that fix, works in IE 11, FF 27 and 30 and Chrome.

Chrome seems to ignore values using viewport units in box-shadow and transform.

Here is one in processing:
int ax,ay,bx,by,cx,cy,dx,dy,last;
int q = 1;
float c = 0;
float h = 0;
float m = 0;

void setup() {
  size(displayWidth, displayHeight);
  background(0);
}

boolean sketchFullScreen() {
  return true;
}

void draw() {
  colorMode(HSB);
  fill(c,255,255,4);
  noStroke();
  rect(0,0,width,height);

  c+=0.4;
  if (c > 255) c = 0;

  colorMode(RGB);

  ax = int(random(displayWidth));
  ay = int(random(displayHeight));
  bx = ax + int(random(-50,50));
  by = ay + int(random(0,50));

  strokeWeight(1);

  if (random(0,1)>0.5) {
    fill(random(255),random(255),random(255));
    stroke(random(255),random(255),random(255));
  }
  else {
    noFill();
    stroke(random(255),random(255),random(255));
  }

  switch(int(random(6))) {
    case 0: // line
    line(ax,ay,bx,by);

    break;
    case 1: // bezier (arc)
    cx = int(random(ax-20,bx+20));
    cy = int(random(ay-20,by+20));
    dx = int(random(ax-20,bx+20));
    dy = int(random(ay-20,by+20));
    bezier(ax,ay,cx,cy,dx,dy,bx,by);

    break;
    case 2: // box
    quad(ax,ay,ax,by,bx,by,bx,ay);

    break;
    case 3: // ellipse
    ellipse(ax,ay,random(15,50),random(15,50));

    break;
    case 4: // triangle
    cx = int(random(ax-20,bx+20));
    cy = int(random(ay-20,by+20));
    dx = int(random(ax-20,bx+20));
    dy = int(random(ay-20,by+20));
    triangle(cx,cy,bx,by,dx,dy);

    break;
    case 5: // arc
    arc(ax,ay,random(15,50),random(15,50),random(2)*PI,random(2)*PI);

    break;
  }

  float s = map(second(), 0, 60, 0, TWO_PI) - HALF_PI;
  float m = map(minute() + norm(second(), 0, 60), 0, 60, 0, TWO_PI) - HALF_PI;
  float h = map(hour() + norm(minute(), 0, 60), 0, 24, 0, TWO_PI * 2) - HALF_PI;

  cx = width/2;
  cy = height/2;

  // Draw the hands of the clock
  stroke(255);
  strokeWeight(1);
  line(cx, cy, cx + cos(s) * 500, cy + sin(s) * 500);
  strokeWeight(2);
  line(cx, cy, cx + cos(m) * 400, cy + sin(m) * 400);
  strokeWeight(4);
  line(cx, cy, cx + cos(h) * 300, cy + sin(h) * 300);

}

void mouseMoved() {
  exit();
}
void keyPressed() {
  background(0);
}

It's so beautiful!

It says I cannot override method from PApplet?

@danmcardle: It's so ugly!

Simple MATLAB code, written mostly to appreciate 24-hr dial at work.

    while 1
        runWatch()
        pause(0.6);
    end
% 20160829 :: grapesh@gmail.com
function runWatch()
cla;

dialHours  = 24;   % You can set it to 12 but why?
midnightUp = true; % defines position of midnight

col.hr = 'k';
col.mn = 'b';
col.sc = 'r';

logoStr = ['Perpetuum'];

xo = 0; yo = 0;
RH  = 0.7;   RM  = 0.95; Rb = 0.5*(RH+RM);
RarrH = RH; RarrM = Rb; RarrS = RM;

fig_handle = findobj(allchild(0), 'flat', 'type', 'figure');

if isempty(fig_handle), set(gcf,'Position',[100 100 500 500]); end
hoursPhase = 3*pi/2; if midnightUp == true, hoursPhase = pi/2; end

hold on;
circle(xo, yo, RH,col.hr);
circle(xo, yo, RM,col.mn);% ,'b');
circle(xo, yo, (RH+RM)/2,col.mn); %0.5*[1 1 1]);

text (xo - 2.5*RH/8+0.003, yo - RH/2-0.003, logoStr,'Color',0.5*[1 1 1],'FontAngle','italic');
text (xo - 2.5*RH/8,       yo - RH/2,       logoStr, 'FontAngle','italic')
axis equal; axis off;

% Hour dial
dh = pi/dialHours; h = 0:-dh:-pi+dh;
xH = RH*cos(2*h+hoursPhase); yH = RH*sin(2*h+hoursPhase);
xHb= Rb*cos(2*h+hoursPhase); yHb= Rb*sin(2*h+hoursPhase);
for n=1:length(xH)
    plot([xH(n),xHb(n)],[yH(n),yHb(n)],col.hr);
end
% Minute dial
dm = pi/60; m = 0:-dm:-pi+dm;
xM = RM*cos(2*m+pi/2); yM = RM*sin(2*m+pi/2);
xMb= Rb*cos(2*m+pi/2); yMb= Rb*sin(2*m+pi/2);
for n=1:length(xM)
    plot([xM(n),xMb(n)],[yM(n),yMb(n)],'Color',col.mn);
end

% Labels Hour
dhl = pi/dialHours; hl = 0:-dhl:-pi+dhl;  ratioH = -dialHours/180;
xHl= 0.5*(Rb+RH)*cos(2*hl+hoursPhase);
yHl= 0.5*(Rb+RH)*sin(2*hl+hoursPhase);
for n=1:length(xHl)
    octagon (xHl(n), yHl(n), 0.3*(RH-Rb), 'w');
    text (xHl(n),yHl(n), num2str( rad2deg(hl(n)*ratioH) ),...
        'HorizontalAlignment','center','Rotation',rad2deg(2*hl(n)+hoursPhase-pi/2),...
        'FontWeight','b','FontSize',13,'Color',col.hr);

end

% Labels Minute
dml = pi/12; ml=0:-dml:-pi+dml;  ratioM = -60/180;
xMl= 0.5*(Rb+RM)*cos(2*ml+pi/2); yMl= 0.5*(Rb+RM)*sin(2*ml+pi/2);
for n=1:length(xMl)
    octagon (xMl(n), yMl(n), 0.3*(RM-Rb), 'w');
    text (xMl(n),yMl(n), num2str( rad2deg(ml(n)*ratioM) ),...
        'HorizontalAlignment','center','Rotation',rad2deg(2*ml(n)), ...
        'FontWeight','b','Color',col.mn);
end

octagon (xo, yo-0.5*(RH+Rb), 0.04, col.hr);
octagon (xo, yo-0.5*(RH+Rb), 0.03, col.mn);

[now_year, now_month, now_day, ...
    now_hour, now_minute, now_second] = datevec(now);

% Arrows
K = -2*pi/dialHours; D = hoursPhase;
now_hour = now_hour + now_minute/60;
xarrowh = RarrH*cos(K*now_hour+D);
yarrowh = RarrH*sin(K*now_hour+D);
plot([0,xarrowh],[0,yarrowh],'Color',col.hr,'LineWidth',6);
plot([0,xarrowh],[0,yarrowh],'Color',0.5*[1 1 1],'LineWidth',3);
arrowhead (xarrowh,yarrowh,0.02,atan2(yarrowh,xarrowh),col.hr);

K = -2*pi/60; D = pi/2;
now_minute = now_minute + now_second/60;
xarrowm  = RarrH*cos(K*now_minute+D);
yarrowm  = RarrH*sin(K*now_minute+D);
xarrowml = RarrM*cos(K*now_minute+D);
yarrowml = RarrM*sin(K*now_minute+D);
plot([0,xarrowml],[0,yarrowml],'Color','k', 'LineWidth',4);
plot([0,xarrowml],[0,yarrowml],'Color',col.mn, 'LineWidth',2);
arrowhead (xarrowml,yarrowml,0.02,atan2(yarrowml,xarrowml),col.mn);

K = -2*pi/60; D = pi/2;
now_second = round(now_second);
xarrows = RarrH*cos(K*now_second+D);
yarrows = RarrH*sin(K*now_second+D);
xarrowsl = RarrS*cos(K*now_second+D);
yarrowsl = RarrS*sin(K*now_second+D);
plot([0,xarrowsl],[0,yarrowsl],'Color',col.sc,'LineWidth',1);
arrowhead (xarrowsl,yarrowsl,0.02,atan2(yarrows,xarrows)-pi,col.sc);

text(0.7,1,...
    [pad_with(floor(now_hour),2,'0'), ':', pad_with(floor(now_minute),2,'0'), ':', pad_with(now_second,2,'0')],...
    'FontSize',8,'FontWeight','n','BackgroundColor','w');

% Dial center
plot(xo, yo, 'ko','MarkerSize',10,'MarkerFaceColor','k');
plot(xo, yo, 'ko','MarkerSize',8,'MarkerFaceColor',0.5*[0 1 1]);

end

function [XX,YY] = circle(varargin)
%x and y are the coordinates of the center of the circle
%r is the radius of the circle
%0.01 is the angle step, bigger values will draw the circle faster but
%you might notice imperfections (not very smooth)

col = 'k';
x = varargin{1};
y = varargin{2};
r = varargin{3};
if length(varargin) > 3
    col = varargin{4};
end

ang=0:0.01:2*pi;
xp=r*cos(ang);
yp=r*sin(ang);
XX = x+xp; YY = y+yp;
plot(XX,YY,'Color',col);
end

function octagon (xo, yo, R, col)

t = (1/16:1/8:1)'*2*pi;
x = R*cos(t);
y = R*sin(t);
fill(xo+x, yo+y,col,'EdgeColor','none')
end

% 20151001 :: grapesh@gmail.com
% Use :: str = pad_with (num, L, pad)
% function creates a string of L length
% padded with leading 'pad' symbol
% e.g., num=23,    L=4, pad='.' --> '..23';
% e.g., num='23W', L=4, pad=' ' --> ' 23W';
%
function str = pad_with (num, L, pad)

if ~ischar(num)
    num = num2str(num);
end
strL = length(num);
if L<strL, L = strL; end;
for n=1:L-strL, str(n) = pad; end;
c = 0;
for n=L-strL+1:L
    c = c+1; str(n) = num(c);
end
end

function [x, y] = arrowhead (xo, yo, height, alpha, col)

x(1) = xo + height*sin(alpha);
y(1) = yo - height*cos(alpha);

x(2) = xo - height*sin(alpha);
y(2) = yo + height*cos(alpha);

x(3) = xo + 2*height*cos(alpha);
y(3) = yo + 2*height*sin(alpha);

fill(x, y,col,'EdgeColor','none')
end

Welcome to PPCG! Nice first answer.

HTML + CSS3 + JS
I've used mostly CSS for this clock. There is a JS component that updates the attributes on the clock div with the current time, but outside of that the entire clock is CSS.

live demo here: http://jsbin.com/nuvag/3
source code over here: http://jsbin.com/nuvag/3/edit

GNUPLOT
unset clip points
set clip one
unset clip two
set bar 1.000000
unset border
set xdata
set ydata
set zdata
set x2data
set y2data
set timefmt x "%d/%m/%y,%H:%M"
set timefmt y "%d/%m/%y,%H:%M"
set timefmt z "%d/%m/%y,%H:%M"
set timefmt x2 "%d/%m/%y,%H:%M"
set timefmt y2 "%d/%m/%y,%H:%M"
set timefmt cb "%d/%m/%y,%H:%M"
set boxwidth
set style fill  empty border
set dummy t,y
set format x "% g"
set format y "% g"
set format x2 "% g"
set format y2 "% g"
set format z "% g"
set format cb "% g"
set angles radians
unset grid
set key title ""
unset key
unset label
unset arrow
unset style line
unset style arrow
set style histogram clustered gap 2 title  offset 0, 0, 0
unset logscale
set offsets 0, 0, 0, 0
set pointsize 1
set encoding default
unset polar
set parametric
unset decimalsign
set view 60, 30, 1, 1
set samples 100, 100
set isosamples 10, 10
set surface
unset contour
set clabel '%8.3g'
set mapping cartesian
set datafile separator whitespace
unset hidden3d
set cntrparam order 4
set cntrparam linear
set cntrparam levels auto 5
set cntrparam points 5
set size ratio 0 1,1
set origin 0,0
set style data points
set style function lines
set xzeroaxis linetype -2 linewidth 1.000
set yzeroaxis linetype -2 linewidth 1.000
set zzeroaxis linetype -2 linewidth 1.000
set x2zeroaxis linetype -2 linewidth 1.000
set y2zeroaxis linetype -2 linewidth 1.000
set ticslevel 0.5
set mxtics default
set mytics default
set mztics default
set mx2tics default
set my2tics default
set mcbtics default
set noxtics
set noytics
set noztics
set nox2tics
set noy2tics
set nocbtics
set title ""  offset character 0, 0, 0 font "" norotate
set timestamp bottom
set timestamp ""  offset character 0, 0, 0 font "" norotate
set rrange [ * : * ] noreverse nowriteback  # (currently [0.000000:10.0000] )
set trange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set urange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set vrange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set xlabel ""  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set x2label ""  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set xrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set x2range [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set ylabel ""  offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set y2label ""  offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set yrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set y2range [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set zlabel ""  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set zrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set cblabel ""  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set cbrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set zero 1e-008
set lmargin -1
set bmargin -1
set rmargin -1
set tmargin -1
set locale "C"
set pm3d explicit at s
set pm3d scansautomatic
set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
set palette rgbformulae 7, 5, 15
set colorbox default
set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 bdefault
set loadpath
set fontpath
set fit noerrorvariables
set arrow from 0,0 to sin(`date +%M`*3.1416/30),cos(`date +%M`*3.1416/30)
set arrow from 0,0 to sin((`date +%H`%12)*3.1416/6)/2,cos((`date +%H`%12)*3.1416/6)/2
plot sin(t),cos(t)
reread

+1 It even works in a Tektronix window. xterm -t -e "gnuplot -e 'set term tek40xx' clock.plot" (with annoying blinks)

To avoid the blinks you can add a "pause 60" just before reread

Click run. It displays only in increments of 30 minutes because the clock is a single emoji.

function updateTick(){let e=new Date,t=e.getSeconds()+60*e.getMinutes()+e.getHours()%12*60*60,n=parseInt(t/3600*2)+1;document.documentElement.style.setProperty("--tick",n)}let d=new Date;setTimeout(()=>{setInterval(updateTick,18e5)},1e3*(d.getMinutes()+d.getSeconds())%30),updateTick();
@counter-style item{system:cyclic;symbols:"" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""}span.tik-terk-clerk::before{content:counters(item, "", item);counter-reset:item calc(var(--tick,1))}span.tik-terk-clerk::before{font-size:72pt}
<span class="tik-terk-clerk"></span>

Python (with matplotlib)
Here's a very basic clock that runs on the desktop.  Change interval in the 2nd to last line to 1 for continuous motion instead of one tick per second.
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import datetime

plt.rcParams['toolbar'] = 'None'
fig = plt.figure(figsize=(4,4),facecolor='w')
ax = plt.subplot(111, polar=True)
plt.axes().get_yaxis().set_visible(False)

#12 labels, clockwise
marks = np.linspace(360./12,360,12, endpoint=True)
ax.set_thetagrids(marks,map(lambda m: int(m/30),marks),frac=.85,size='x-large')
ax.set_theta_direction(-1)
ax.set_theta_offset(np.pi/2)
ax.grid(None)

#hands
wids  = [.2,.03,.01]
lens  = [.75,.9,1]
clrs = plt.cm.winter(np.linspace(0, 1, 3))
factor = [12,60,60,1]

#convert time to radians
def timedata():
    x =  str(datetime.datetime.now().time())
    fig.canvas.set_window_title(x[:8])
    data = map(lambda n: float(n), x.split(':'))+[0]
    for i in range(3):
        data[i]=2*np.pi*(data[i]/factor[i]+data[i+1]/factor[i+1]/factor[i])
        data[i]-=(wids[i]/2)
    return data[:3]

#create hands
bars = ax.bar(timedata(), lens, width=wids, bottom=0.0, color=clrs, linewidth=0)
map(lambda b: b.set_alpha(0.5), bars)

#tick
def animate(i):
    map(lambda bt: bt[0].set_x(bt[1]), zip(bars,timedata()))
    return bars

ani = animation.FuncAnimation(fig, animate, np.arange(1, 200), interval=1000)
plt.show()

Mathematica
Using more demo code from the Mathematica help browser than I probably should, I get

with
Voltmeter3[v_, label_] :=
  Graphics[{{(*case*){EdgeForm[{Thickness[.007], GrayLevel[0]}],
      GrayLevel[.2],
      Rectangle[{-1.2, -1.1}, {1.2, 1.3},
       RoundingRadius -> .2]},(*case holes*){White,
      Disk[{-1, -.9}, .05], Disk[{1, -.9}, .05], Disk[{1, 1.1}, .05],
      Disk[{-1, 1.1}, .05]},(*case outer rim*){Black,
      Disk[{0, .1}, 1.15], GrayLevel[.5], Disk[{-.02, .12}, 1.13],
      GrayLevel[.2], Disk[{0, .1}, 1.11]},(*face highlight*)
     EdgeForm[{CapForm["Round"], Thickness[.02], Hue[.125, .7, .6]}],
     Hue[.125, 1, 1],
     Disk[{.02, .1},
      1, {1.1 Pi, -.1 Pi}],(*face shadow*){EdgeForm[{CapForm["Round"],
         Thickness[.01], Hue[.125, 1, 1]}], Hue[.125, 1, 1],
      Disk[{-.02, .12}, 1, {1.1 Pi, -.1 Pi}]},(*face*){EdgeForm[],
      Hue[.125, .5, 1],
      Rotate[Polygon[({.1, -.04} + # &) /@
         Flatten[{{{0, 0}, {0, 1}},
           Array[{Sin[2 Pi*(#/50)], Cos[2 Pi*(#/50)]} &, 30]}, 1],
        VertexColors ->
         Flatten[{Hue[.125, 0, 1],
           Array[Hue[.125, .5, 1] &, 50 + 1]}]],
       30/50 Pi, {0,
        0}]},(*case mid line highlight*){Hue[.125, .7, .6],
      Thickness[.025], CapForm["Round"],
      Line[{{-.95, -.2}, {0, .1}, {.95, -.2}}]},(*case mid disk \
highlight*){Hue[.125, .7, .6], Disk[{0, 0}, .25, {.95 Pi, .05 Pi}]}},
    Inset[
     AngularGauge[v, {0, 100}, GaugeFaceStyle -> None,
      GaugeFrameStyle -> None,
      GaugeMarkers ->
       Graphics[{Hue[0, 1, .7],
         Polygon[{{.1, .03}, {.1, -.03}, {.95, -.03}, {1,
            0}, {.95, .03}}]}],
      GaugeLabels -> {Placed[
         Style[label, FontFamily -> "Helvetica", Bold,
          FontSize -> Scaled[.08], White], {.5, .35}]},
      LabelStyle ->
       Directive[FontFamily -> "Helvetica", FontSize -> Scaled[.06]],
      ScaleOrigin -> {{.85 Pi, .15 Pi}, .9},
      ScaleDivisions -> {2, 10},
      ScaleRanges -> {{Scaled[.75], Scaled[1]}},
      ScaleRangeStyle -> Hue[0, 1, .7, .7], AxesStyle -> Opacity[0],
      TicksStyle -> {Thickness[.01], Thickness[.005]},
      ImageSize -> Automatic, ImagePadding -> None], {0, 0}, {0,
      0}, {1.75, Automatic}], {(*case mid disk*)GrayLevel[.2],
     Disk[{0, 0}, .2], GrayLevel[0], Disk[{0, 0}, .075],
     Disk[{-.85, -.4}, .05], Disk[{.85, -.4}, .05]}},
   PlotRangeClipping -> True];

Dynamic@Refresh[
  GraphicsRow[{Voltmeter3[DateList[][[4]], "Hour"],
    Voltmeter3[DateList[][[5]], "Minute"],
    Voltmeter3[DateList[][[6]], "Second"]}], UpdateInterval -> 1]

C+Cairo+xcb
Basically ripped-off the postscript solution and translated to Cairo. :)
Some gotchas in doing this: ps uses degrees, Cairo uses radians; ps orients the window with +y up, xcb orients it with +y down.
//xclock.c
//cc $(pkg-config --cflags --libs cairo xcb xcb-icccm) -o xclock xclock.c -lcairo -lxcb -lxcb-icccm
#include <math.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <cairo.h>
#include <cairo-xcb.h>
#include <xcb/xcb.h>
#include <xcb/xcb_image.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_icccm.h>

double deg_rad (double rad){
    return rad * (180.0/M_PI);
}

double rad_deg (double deg){
    return deg * (M_PI/180.0);
}

typedef struct {
    int width, height;
    int scrno;
    xcb_screen_t *scr;
    xcb_connection_t *connection;
    xcb_drawable_t win;
    unsigned int white;
    xcb_visualtype_t *visual_type;

    cairo_surface_t *surface;
    cairo_t *cr;
} Window;
Window window;

int makewindow()
{
    xcb_screen_iterator_t iter;
    xcb_depth_iterator_t depth_iter;
    uint32_t mask=0;
    uint32_t values[2];

    window.connection = xcb_connect(NULL,&window.scrno);
    iter = xcb_setup_roots_iterator(xcb_get_setup(window.connection));
    for (; iter.rem; --window.scrno, xcb_screen_next(&iter))
        if (window.scrno == 0)
        {
            window.scr = iter.data;
            break;
        }
    window.win = xcb_generate_id(window.connection);
    window.white = window.scr->white_pixel;
    mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK;
    values[0] = window.white;
    values[1] = XCB_EVENT_MASK_EXPOSURE;
    xcb_create_window(window.connection, XCB_COPY_FROM_PARENT,
            window.win, window.scr->root,
            0, 0,
            window.width, window.height,
            5,
            XCB_WINDOW_CLASS_INPUT_OUTPUT,
            window.scr->root_visual,
            mask,
            values);
    xcb_icccm_set_wm_name(window.connection, window.win, XCB_ATOM_STRING, 8, strlen("xcr"), "xcr");
    xcb_map_window(window.connection, window.win);
    xcb_flush(window.connection);

    depth_iter = xcb_screen_allowed_depths_iterator(window.scr);
    for (; depth_iter.rem; xcb_depth_next(&depth_iter)) {
        xcb_visualtype_iterator_t visual_iter;

        visual_iter = xcb_depth_visuals_iterator(depth_iter.data);
        for (; visual_iter.rem; xcb_visualtype_next(&visual_iter)) {
            if (window.scr->root_visual == visual_iter.data->visual_id) {
                window.visual_type = visual_iter.data;
                goto visual_found;
            }
        }
    }
visual_found: ;

    {
        window.surface = cairo_xcb_surface_create (window.connection,
                window.win, window.visual_type, window.width, window.height);
        window.cr = cairo_create (window.surface);

        //cairo_select_font_face (window.cr, "serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
        //cairo_set_font_size (window.cr, 32.0);
        cairo_set_source_rgb (window.cr, 0.0, 0.0, 0.0);
        cairo_translate(window.cr, window.width / 2, window.width / 2);
        cairo_scale(window.cr, 1, -1);
        //cairo_move_to (window.cr, 10.0, 50.0);
        //cairo_show_text (window.cr, "Hello, world");

        //cairo_surface_flush(window.surface);
        //xcb_flush(window.connection);
    }
    return 0;
}

int destroywindow() {
    cairo_destroy (window.cr);
    cairo_surface_destroy (window.surface);
    xcb_disconnect(window.connection);
    return 0;
}

int gettime(int *hour, int *min, int *sec) {
    time_t t;
    struct tm *tm;
    time(&t);
    tm = localtime(&t);
    *hour = tm->tm_hour;
    *min = tm->tm_min;
    *sec = tm->tm_sec;
    return 0;
}

void drawclock(int x) {
    int hour, min, sec;
    double radius, centradius;
    int i, j;

    (void)x;
    signal(SIGALRM, drawclock);
    //hour = 0; min = 30; sec = 30;
    gettime(&hour, &min, &sec);
    hour %= 12;
    //printf("%02d:%02d:%02d\n", hour, min, sec);
    radius = (double)window.width / 2.0;
    radius -= 10.0;
    centradius = radius / 100.0;

    // Erase
    cairo_set_source_rgb(window.cr, 1.0, 1.0, 1.0);
    cairo_paint(window.cr);
    cairo_set_source_rgb(window.cr, 0.0, 0.0, 0.0);

    // Ticks
    for (i = 0; i < 12; i++){
        cairo_set_line_width(window.cr, 1);
        for (j = 0; j < 4; j++){
            cairo_rotate(window.cr, rad_deg(6));
            cairo_move_to(window.cr, radius, 0);
            cairo_rel_line_to(window.cr, (double)radius / 20.0, 0);
            cairo_stroke(window.cr);
        }
        cairo_set_line_width(window.cr, 3);
        cairo_rotate(window.cr, rad_deg(6));
        cairo_move_to(window.cr, radius, 0);
        cairo_rel_line_to(window.cr, (double)radius / 20.0, 0);
        cairo_stroke(window.cr);
    }

    // Hour hand
    cairo_save(window.cr);
        cairo_rotate(window.cr, rad_deg(90.0 - (60.0 * (double)hour + (double)min)/2));
        cairo_new_path(window.cr);
        cairo_move_to(window.cr, 0, 2);
        cairo_curve_to(window.cr, 15.0 * centradius, 3.0 * centradius,
                                  33.0 * centradius, 0,
                                  50.0 * centradius, 3.0 * centradius);
        cairo_curve_to(window.cr, 55.0 * centradius, 15.0 * centradius,
                                  60.0 * centradius, 0,
                                  76.0 * centradius, 0);
        cairo_curve_to(window.cr, 60.0 * centradius, 0,
                                  55.0 * centradius, -15.0 * centradius,
                                  50.0 * centradius, -3.0 * centradius);
        cairo_curve_to(window.cr, 33.0 * centradius, 0,
                                  15.0 * centradius, -3.0 * centradius,
                                  0, -2.0 * centradius);
        cairo_close_path(window.cr);
        cairo_set_source_rgb (window.cr, 0.0, 0.0, 0.677);
        cairo_fill(window.cr);
    cairo_restore(window.cr);

    // Minute hand
    cairo_save(window.cr);
        cairo_rotate(window.cr, rad_deg(90.0 - 6.0 * (double)min));
        cairo_new_path(window.cr);
        cairo_move_to(window.cr, 0, 2);
        cairo_curve_to(window.cr, 15.0 * centradius, 3.0 * centradius,
                                  33.0 * centradius, 0,
                                  50.0 * centradius, centradius);
        cairo_curve_to(window.cr, 65.0 * centradius, 3.0 * centradius,
                                  83.0 * centradius, 0,
                                  97.0 * centradius, 0);
        cairo_curve_to(window.cr, 83.0 * centradius, 0,
                                  65.0 * centradius, -3.0 * centradius,
                                  50.0 * centradius, -1.0 * centradius);
        cairo_curve_to(window.cr, 33.0 * centradius, 0,
                                  15.0 * centradius, -3.0 * centradius,
                                  0, -2.0 * centradius);
        cairo_close_path(window.cr);
        cairo_set_source_rgb (window.cr, 0.635, 0.0, 0.0);
        cairo_fill(window.cr);
    cairo_restore(window.cr);

    cairo_surface_flush(window.surface);
    xcb_flush(window.connection);

    //printf("alarm in %d\n", 60 - sec);
    alarm(60 - sec);
}

int main(int argc, char **argv)
{
    xcb_generic_event_t *e;
    window.width = window.height = 200;
    signal(SIGALRM, drawclock);

    makewindow();
    while (e = xcb_wait_for_event(window.connection)){
        switch(e->response_type & ~0x80){
        case XCB_EXPOSE:
            drawclock(0);
        }
        free(e);
        //sleep(1);
    }
    destroywindow();

    return 0;
}

You are late to the party, but it is a nice answer. +1

Thanks. It's a fun question. I had to learn a bunch of xcb to do this. I wrote the Hello World window as a stepping stone towards this.

@luserdroog Nice job. I liked it. I added it a second hand, but the clock flickers a few times in a minute. I coded a pycairo clock, I took tick method from your clock.

Creating analog clocks has some sort of attractions with people learning programming. As a matter of fact I teach a JavaScript class this year and my students had ton of fun when we implemented an analog clock using p5.js...

The source code for the analog clock is available at https://github.com/mveteanu/JSCourse

Welcome to PPCG! Instead of only posting a link to the code, you should include the code in the answer.

Hello, and welcome to the site.  This looks like a proper answer, however we generally prefer if the code was put in the answer rather than a link.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/