text:
Solitaire no-win states
NOTE: SIMILIAR TO Solitaire Dreams - Creating a winnable solitaire starting hand
Find a minimum of 5 deck orders where if the cards were dealt out would create a game of Klondike Solitaire where there is absolutely no possible winning state. Assume the game is 3 card draw, infinite times through the deck.
As always, the shorter the program the better.

Solutions to Solitaire Dreams - Creating a winnable solitaire starting hand could be edited into solutions to the core of this with one character change, and making them repeat 5 times doesn't add anything.

@PeterTaylor given that the only answer given to the duplicate question is also a cheating one, I don't think it is obvious this is actually a duplicate.

J, 37 (or 0; see below) characters
(i.5)A.(52$'cdsh'),.4#'kqajt98765432'

For a much better view, prepend ,"2 and change the suits to uppercase. For an even better view, prepend ,"2' ',"1 instead. For more decks, change i.5 to a higher value, up to at least 24 factorial (6.2*10^23).

The trick here is twofold: Make the piles solid (enough) with (enough) aces built safe within, and to do that easily. If we deal the standard unshuffled deck, there is one rank that is never exposed. Let's move the aces there. There are several possible moves depending on the color assignment, but in order to prevent exposing the easy ace, order the colors such that this move is not possible. We are dealt this tableau (black colors in uppercase):
kC kd kS kh qC qd qS
   qh aC ad aS ah jC
      jd jS jh tC td
         tS th 9C 9d
            9S 9h 8C
               8d 8S
                  8h

The only moves possible are

qh-kC exposing kd
tS-jd/jS-qh freeing diamonds up to 8d (if the stock is good)
8h-9S exposing 8S
8d-foundation/9h-tS or 8d-9S/9h-tS exposing 9C.

When these moves are performed, we're left with this solid tableau:
kC kd kS kh qC qd qS
qh    aC    aS ah jC
jS    jd    jh tC td
      tS    th 9C 9d
      9h    9S    8C
            8h    8S

The eight of hearts can be moved between the two black nines and the cards from the deck can be stacked on top, but no more aces can be freed.
Now, we can replace 8h, 8S and even 8h with a different card in the the stock and the game stays unwinnable. This pushes the number of known unwinnable decks up to 27! at least. Removing 8C opens up additional moves, but I believe the game is still unwinnable.
Note that if merely discovery is sufficient, then my score is zero as I didn't need a computer to verify the unwinnability of these 27! decks.

Or, if you want to be especially evil, find a solution involving every draw-three player's nightmare - an ace on the 1st, 4th, 7th, and 10th cards in the stockpile.


text:
Generate a "random" color set
Your challenge is to write a program that takes input from stdin, creates a set of 1 to ncolors and outputs them on stdout, formatted as a 6-digit-hex value with a prefixed #.

The starting color should have following values (in a hsv colorspace) (pesudocode)

h=rand(), s=0.5, v=0.95.

Every subsequent color should have its hue value increased by

1/Φ

After every 5th color, the saturation and value for the forthcoming colors should be

saturation - increased by 0.1
value - decreased by 0.2

e.g.
Color  #    h         s       v
       1  0.5        0.5     0.95
       2  0.118...   0.5     0.95
      11  0.680...   0.7     0.55

Input
Your program shall receive an Integer nas input (stdin), which defines the number of colors, to be generated. Where 0 < n < 16
Output

On each call, the hues' start value  should be different from the last call (Don't just take the same random start number on every call)
Output should be on stdout with one color per line.
The array shall contain n different hex codes.
The hex codes should be prefixed with a "#" and be padded with a "0", such that you always get a 7 character string like "#FFFFFF"

Additional Rules

The use of built in functions/tools/etc  for the following conversions is forbidden

HSV->RGB
RGB->HEX representation of RGBa function which specifically converts rgb to hex, generic tools like sprintf are ok.
HSV->HEX representation of RGBjust to make sure...

Scoring
The size of your code in bytes.
Test Cases(result of rand() in parantheses)
3 (0.35389856481924653) ->
    #79f388
    #f3798e
    #79b1f3

8 (0.763850917108357) ->
    #c079f3
    #79f39d
    #f37979
    #4c6ec0
    #90c04c
    #c04cb1
    #4cc0ac
    #c08b4c

15 (0.10794945224188268) ->
    #f3c879
    #a479f3
    #79f381
    #f37995
    #79b8f3
    #aac04c
    #b44cc0
    #4cc092
    #c0704c
    #4f4cc0
    #448c2a
    #8c2a61
    #2a7e8c
    #8c7e2a
    #612a8c

for a visualization of the codes, you can paste your output here
I will change the accepted Answer, as soon as new appear

Could you include the value received from rand() in the test cases to make testing easier?

Can you define "rgb->hex tool"? Does sprintf("%2x"*3,r,g,b) count?

@JanDvorak I think sprintf is definetly eligible

@flornquake Yupp, i'll update the question

Please clarify what 1/Φ means.

@DavidCarraher Φ is the Golden Ratio, approximately 1.618. Hue is defined on [0, 1], the value one being exactly once around the unit circle. 1/Φ (or equivalently Φ-1) is approximately 3.883 radians, or 222.5 degrees.

Python 184 bytes
from random import*
h,s,v=random()*6,.5,243.2
for i in range(input()):
 h+=3.708;print'#'+'%02x'*3%((v,v-v*s*abs(1-h%2),v-v*s)*3)[5**int(h)/3%3::int(h)%2+1][:3]
 if i%5/4:s+=.1;v-=51.2

The HSV ⇒ RGB conversion is taken directly from wikipedia.
A few implementation notes.

h is defined as its proper value times 6, which simplifies region determination.
v is defined as its proper value times 256, which propagates through to all three RGB values.
6/Φ  (approximately ~3.708) is used instead of 1/Φ, in agreement with the scaling of h. Similarly, the decrement value for v is also scaled by 256.
The bit of magic
((v,v-v*s*abs(1-h%2),v-v*s)*3)[5**int(h)/3%3::int(h)%2+1][:3]
is logically equivalent to
c=v*s;m=v-c;x=c-c*abs(1-h%2)+m;c+=m;[(c,x,m),(x,c,m),(m,c,x),(m,x,c),(x,m,c),(c,m,x)][int(h)%6]

Sample usage:
$ echo 3 | python color-set.py
#f37994
#79b8f3
#dbf379

$ echo 8 | python color-set.py
#d2f379
#f079f3
#79f3cc
#f3a979
#8579f3
#62c04c
#c04c84
#4ca6c0

$ echo 15 | python color-set.py
#7984f3
#a8f379
#f379cb
#79eff3
#f3d379
#804cc0
#4cc05e
#c04c5c
#4c7dc0
#9fc04c
#8b2a8c
#2a8c6f
#8c522a
#352a8c
#3b8c2a

A visualization of the values for n = 15:

and the corresponding html.

Nice solution! And Thanks for the update about the HSV to RGB conversion and the visualization =)

As I saw by other People, i start with my own solution
Javascript, 418433
a=prompt();x=0.6180339887;r=[];m=Math.random;p=[m(),0.5,0.95];function h(c,g,d){k=~~(6*c);b=6*c-k;c=d*(1-g);l=d*(1-b*g);g=d*(1-(1-b)*g);f=e=b=255;1>k?(b=d,e=g,f=c):2>k?(b=l,e=d,f=c):3>k?(b=c,e=d,f=g):4>k?(b=c,e=l,f=d):5>k?(b=g,e=c,f=d):(b=d,e=c,f=l);return"#"+[b,e,f].map(function(c){return 16>(c=0|256*c)?0:""+c.toString(16)}).join("")}for(;a--;)r.push(h.apply(h,p)),p[0]+=x,p[0]%=1,!(a%5)&&(p[1]+=0.1,p[2]-=0.2);console.log(r.join("\n"))

Damn, i did something wrong in the previous versioon when inlining the function, i shouldn't write the code golfed from beginning
Sample Output

#79f3a0
#f37d79
#7999f3
#bcf379
#f379e0
#4cc0b0
#c08e4c
#6d4cc0
#4ec04c
#c04c6f
#2a648c
#818c2a
#7b2a8c
#2a8c5e
#8c412a

source: Stack Exchange

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

sort: votes


text:
C without the braces
My challenge is language-specific, but needs a lot of creativity: write a valid C program with only one pair of braces {} and none of the keywords if, for, while (all checked after preprocessing, and after substituting trigraphs). I'm looking for preprocessor abuse (but other methods are also welcome) to define a new pseudo-language which supports at least if/else, then use that language to do something cool.
That's pretty easy, and I'll just score this by upvotes since any scoring would be rather arbitrary, but here are some things which would be impressive:

function calls (also arguments, return values);
else if;
switch/case (also default, fall-through);
for or while (super-impressive. Also break, continue);
having only one semicolon ; (This one makes the challenge a bit different);
an interesting program;
full portability (portable in practice is good, portable in theory is even better).

This isn't about obfuscation. The preprocessor statements will probably be a bit hairy, but the actual code should be very easy to follow.
goto is allowed, but I believe it won't help much.

To avoid braces, use goto statements.

Just a pedantic point that is really bugging me. There are no "implied braces" in a one line if/else construct. That thing works on single statements by design. The braces are a trick for making it work on multiple statements not the other way 'round. In any case, I'm with joe, c supports goto which means it supports unstructured programming. Welcome back to the big ball o'mud.

Like dmckee, I don't get the implied braces idea. Are you forbidding if? Also, if braces are not allowed after preprocessing, what good will preprocessor abuse do?

Uh... [! Nobody mention trigrams. ]

Trigrams is a good point. Oops. (Unless those are handled by the pre processor, I'm not sure). @dmckee I did consider goto, but it won't help you unless you can get if working. And as for "implied braces", I see your point, so I suppose really I'm banning the native if, else, for, etc. (again after preprocessing). The intent of the challenge is to defining a pseudo-language which uses something other than braces to mark blocks. It's possible in at least one way, and I found it an interesting challenge; thought others might too.

@luserdroog pre processor abuse is really just to make the thing readable. I see your point about braces, so: yes. I am forbidding if, for, etc. (after preprocessing & trigraph substitution)

I feel I should restrict assembly too, but frankly, if somebody can make a portable, readable answer which uses assembly, I'm all for it.

Doesn't seem too hard....
#include <stdio.h>

int main(void) {
  printf("I only used one pair of braces!\n");
  printf("This is easy...\n");
  printf("Lalalalala\n");
  getchar();
  return 0;
}

having only one semicolon ; (This one makes the challenge a bit different);

Oh, also easy:
int main(void) {
  return 0;
}

else if;

How about goto and ternary operator abuse?
#include <stdio.h>

int main(void) {
  int testNum = 5;
  void *whichSection = testNum < 0 ? &&ifSection :
                       (testNum == 0 ? &&elseIfSection : &&elseSection);
  goto *whichSection;
  ifSection:
    printf("Number is negative\n");
    goto end;
  elseIfSection:
    printf("Number is zero\n");
    goto end;
  elseSection:
    printf("Number is positive and nonzero\n");
    goto end;
  end:
    return 0;
}

switch/case (kinda) (also default (kinda), fall-through (yes))
for (no) or while (no) (super-impressive. Also break (yes), continue (no));

My above solution is a bit like that - the goto is break, the elseSection is default, fall-through works, etc.

full portability (portable in practice is good, portable in theory is even better).

All of my solutions have this.

we code golfers are infamous for bending the rules :D

hey hey now, I thought of that: "I expect … to define a new pseudo-language which supports at least if/else, then use that language to do something cool.". Admittedly I suppose that wasn't actually phrased as a rule. Hmm.

@Dave Yep, bending the rules is our specialty :D

the goto stuff is more interesting! Although as I pointed out to Joe Z, it means your code isn't portable any more. Very cool though.

No braces
Doesn't answer the question, but does answer its title - C without braces
main=195;

Works on x86 (32bit and 64bit). Does nothing exciting, but starts and terminates without error.

We can simulate a conditional branch in this manner:
int condition = /* insert some condition here, like a == b */ ;

void* if_branch[2];
if_branch[1] = &&ifcode;
if_branch[0] = &&elsecode;

goto if_branch[!!condition];

ifcode:
    /* code if (condition) is met */
    goto afterif;
elsecode:
    /* code if (condition) is not met */
afterif:

While convoluted, this shows that you can implement conditional branching without using if statements, ternary statements, or any other form of abuse other than goto pointers.
With conditional branching and goto (and all that other good stuff that doesn't require braces like addition, subtraction, etc.), you can build a machine language, and thereby implement all that other stuff that requires braces or "implied" braces, and could (theoretically, anyway) create any C program in this form without using more than one set of braces.

nice, I didn't know you could take pointers to labels.

one thing I will mention: I believe labels need unique names, so this method will struggle as far as making the code really easy to follow (i.e. it's impossible to hide all the details behind defines). But I still like it a lot.

The label pointers were also included in Doorknob's answer. I just generalized it a bit and showed that you could make any program like that.

Ah that answer's been updated. I hadn't noticed. Also I've been looking it up and this is a GCC extension, so it doesn't quite meet all the points I listed (not portable).

Well it's the best we've got, basically.

sure; I don't know any solution which meets every single point (my own solution doesn't support break or continue in loops, and the syntax for loops is odd). I'm just saying there's room for something more. I still think this one is very cool though.

Yeah, there's room for more, although as to whether it'll be portable or not also remains to be seen. Eventually if you want the sort of flexibility you're looking for, you need to build a machine language, which requires some form of conditional branching.

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


text:
Manage a pie shop!
Summary
Code golf is good. Pie is good. When you put the two together, only good stuff can happen.
Specifications
In this challenge you will manage a pie shop. The user will be able to input five different commands: list, count, buy, sell, and exit. Here are the specifications for each:

list

Print a list of all the pies owned, and how many. Separate with | and pad with a space on either side. |s must be aligned. Pie amount may be negative (that means you owe pie to someone :(). For example:
| apple     | 500 |
| blueberry | 2   |
| cherry    | -30 |

count [type]

Print how many {{type}} pies there are. Print "There is no {{type}} pie!" if there is none. {{type}} will always match the regex \w+ (i.e, it will always be a single word). For example, if I had the amount of pies shown in the above example list, then
> count apple
500
> count peach
There is no peach pie!

buy [n] [type]

Add {{n}} to the count of {{type}} pie, and print it. Create {{type}} pie if it does not exist. {{n}} will always match the regex [0-9]+ (i.e, it will always be a number). Here's another example (with the same pie inventory as the previous examples):
> count blueberry
2
> buy 8 blueberry
10

sell [n] [type]

Subtract {{n}} from the count of {{type}} pie, and print it. Create {{type}} pie if it does not exist. Pie can be negative (oh no, that would mean you owe someone pie!).
> sell 15 blueberry
-5
> buy 5 blueberry
0

exit

Print "The pie store has closed!" and exit the program.
> exit
The pie store has closed!

Further clarifications

If a non-existing function is called (the first word), then print "That's not a valid command."
If an existing function is called with invalid arguments (the words after the first word), how your program behaves doesn't matter. "Invalid arguments" includes too many arguments, too little arguments, {{n}} not being a number, etc.
Pie is good.
Your input must be distinguished from your output. If you are running the program on the command line/terminal/shell/other text-based thing, you must prefix input with "> " (a "greater than" sign and a space) or some other shell input prefix thing.
Pie is good.
If all of these clarifications are not good enough, here's some sample output:
> list
> buy 10 apple
10
> sell 10 blueberry
-10
> list
| apple     | 10  |
| blueberry | -10 |
> count apple
10
> count peach
There is no peach pie!
> exit
The pie store has closed!

If you buy/sell pie and the net count becomes 0, you can either keep it in the list or not, and you can either return 0 or There is no {{type}} pie! when you count it.
This is code-golf; shortest code wins.
Did I mention that pie is good?

So just to clarify... is pie good?

Is it acceptable to keep a pie in the list with a count of zero? Like if you do buy 1 apple and sell 1 apple. And would it then be valid for count apple to return 0 instead of There is no apple pie!?

@IgbyLargeman Darn it, I thought I clarified everything! :P Added new test case to additional clarifications

@Doorknob hey! I'm outputting "there is no apple pie" after the last one has been sold.

@JanDvorak Alright, I suppose either way will work. Updated again

umm... I keep it in the list and I display "there is no apple pie"

@JanDvorak I keep getting the wording vague :P Edited once again

Could you please clarify if the numbers in the list have to be justified, and if extra spaces are allowed?

@WolframH It's up to you to interpret the rules however you want. Some people have added extra spaces, and that's okay; we code golfers are notorious for bending the rules :D

Ruby, 335 330
h=Hash.new 0
loop{$><<"> "
puts case gets when/^list/
h.map{|x|?|+" %%%ds |"%h.flatten.map{|e|e.to_s.size}.max*2%x}when/^count (.*)/
h[$1]!=0?h[$1]:"There is no #{$1} pie!"when/^buy#{m=" (.*)"*2}/
h[$2]+=$1.to_i when/^sell#{m}/
h[$2]-=$1.to_i when/^exit/
puts"The pie store has closed!"
break else"That's not a valid command."end}

Some tricks here:
?|+" %%%ds |"%[*h].flatten.map{|e|e.to_s.size}.max*2%x

Doorknob's idea to use a formatter is taken a step further here, literally. First, the longest string in the hash among all keys and values is formatted using " %%%ds |" to produce a string like " %6s |". Yep, no shrinkwrapping each column separately. There was never the requirement to. One size fits all. Then this string is duplicated and used as a formatting string for the two-element array containing the current row. Finally, the + near the start gets its word and prepends a single leading pipe. Oh, and puts has a nice handling of arrays.
Ruby has interpolation in regex literals. It's a tight save, but it does save a little.
Ruby requires semicolons after the when expression, but not before the keyword. This leads to a weird rendering artifact when the semicolon is replaced with a newline.
And, of course, perlism known as magic globals and automatic matching of regex literals against them.
Also, most statements including case are expressions.

Very clever tricks! +1

Hmm, but why Hash.new(0) instead of {}?

@Doorknob Ruby's hashes can have default values (if you pass an object) or even generators (if you pass a block (key, hash -> value). If you don't pass either, the default value is nil (which doesn't allow addition). The literal uses nil as the default value.

Could save a few characters with h=Hash.new(0) => h=Hash.new 0, print"> " => $><<'> ', and I think [*h] can just be h.  I tried putting together a version without the switch statement since all that boilerplate text really adds up:  https://gist.github.com/chron/6315218.  I was trying to make something work with ruby -ap but the requirement for the prompt makes it hard :<

@chron thanks! Can't believe I missed the first one, and I'm not sure why I thought $><< printed a newline. As for the last suggestion... unfortunately, hashes don't have a "flatten" method.

@JanDvorak I guess it depends on your version, it works for me.  Maybe only 1.9.3 and later: http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-flatten

@chron thanks! you are right; observation error (facepalm). I was looking at the class methods. Hash.flatten, indeed, does not exist.

Ruby, 427 384 characters
alias x puts
p={}
loop{
print'> '
case(u=gets.chop.split)[0]when'exit'
x'The pie store has closed!'
exit
when'list'
p.each{|k,v|printf"| %-#{p.keys.map(&:size).max}s | %-#{p.map{|e,a|a.to_s.size}.max}s |\n",k,v}
when'count'
x p[t=u[1]]||"There is no #{t} pie!"
when/sell|buy/
m=(u[0]<?s?1:-1)*u[1].to_i
if p[t=u[2]]
x p[t]+=m
else
x p[t]=m
end
else x"That's not a valid command."
end}

Thanks to Jan Dvorak of huge improvement from 427 to 384 (!)

You can use loop{...} instead of while 1do...end.

You can use split without its argument. By default, it splits by whitespace (or $; if that is set)

p.keys.group_by(&:size).max[0] -- are you looking for p.keys.map(&:size).max or p.map{|x,_|x.size}.max? Here: [(t=p.values).max.to_s.size,t.min.to_s.size].max are you looking for p.map{|_,x|x.to_s.size}.max? I'm gonna take your idea and abuse the formatter, though :-)

p[t]=p[t]+m is equivalent to p[t]+=m (except p[t] is evaluated twice instead of once) and longer. Use the latter.

@JanDvorak Oooh, thanks for all the tips :D I thought Ruby didn't have a += operator; that's why I didn't use it. Maybe that's just for ++. I will edit my post shortly

Python Pie-thon 437
I'm sure there is some slack on the second last line, but the requirement to align the bars for both the pie type and number is a doozy.
p,C,l={},"count",len
while 1:
 a=raw_input("> ").split();c=a.pop(0)
 if"exit"==c:print"The pie store has closed!";break
 if"sell"==c:a[0]=int(a[0])*-1
 if c in[C,"buy","sell"]:
  y=a[-1]
  if c!=C:p[y]=p.get(y,0)+int(a[0])
  print p.get(y,"There is no %s pie!"%y)
 elif"list"==c:
  for i in p:print"| %s | %s |"%(i.ljust(l(max(p.keys(),l))),str(p[i]).rjust(max([l(str(x)) for x in p.values()])))
 else:print"That's not a valid command."

As per Igby Largeman's comment the rules are unclear around what to do if there was a pie of a specific type, but there are 0 now. So I've interpreted it in my favour.
Sample output:
> buy 10 apple
10
> sell 1 blueberry
-1
> buy 1 keylime
1
> sell 3 apple
7
> buy 5 blueberry
4
> list
| keylime   | 1 |
| apple     | 7 |
| blueberry | 4 |
> sell 1 keylime
0
> count keylime
0

Sorry, but in this one > count potato produces That's not a valid command. instead of There is no potato pie!

@Doorknob Are you running it in IDLE?

Yes. I'll try in a file

Actually, count doesn't seem to be working at all. Actually it works sometimes but sometimes it doesn't. It's very odd...

Aha! count breaks after listing. image (also your count is missing an exclamation point if it can't find the pie)

Very odd. Such is the trobule with code golf. I'll fix it up.

@Doorknob HAHAHAHA, its becuase I used x as shorthand for "count" and as a loop variable.

Hehe, I knew it was a naming clash of some kind :P +1 Oh and also, my file for your program had an amusing name: pie.py :P

C# - 571 568 559
Bringing up the rear as usual with the hopelessly verbose C#.
using C=System.Console;class Z{static void Main(){var P=new
System.Collections.Generic.Dictionary<string,int>();int i=0,n;a:C.Write
("> ");var I=C.ReadLine().Split(' ');var c=I[0];object s=c=="exit"?
"The pie store has closed!":"That's not a valid command.";if(c==
"count")try{s=P[c=I[1]];}catch{s="There is no "+c+" pie!";}if(c==
"buy"||c=="sell"){n=int.Parse(I[1]);n=c=="sell"?-n:n;try{n+=P[c=
I[2]];}catch{}s=P[c]=n;i=(n=c.Length)>i?n:i;}if(c=="list")foreach(
var p in P.Keys)C.Write("| {0,"+-i+"} | {1,11} |\n",p,P[p]);else C.
WriteLine(s);if(c!="exit")goto a;}}

I took some liberty with the rule about list output. To save some characters I hardcoded the width of the count column to the maximum width of an integer value. (The rules didn't say extra spaces weren't allowed.)
Formatted:
using C = System.Console;
class Z
{
    static void Main()
    {
        var P = new System.Collections.Generic.Dictionary<string, int>();
        int i = 0, n;
    a:
        C.Write("> ");
        var I = C.ReadLine().Split(' ');
        var c = I[0];
        object s = c == "exit" ? "The pie store has closed!"
                               : "That's not a valid command.";

        // allow Dictionary to throw exceptions; cheaper than using ContainsKey()
        if (c == "count")
            try { s = P[c = I[1]]; }
            catch { s = "There is no " + c + " pie!"; }

        if (c == "buy" || c == "sell")
        {
            n = int.Parse(I[1]);
            n = c == "sell" ? -n : n;

            try { n += P[c = I[2]]; }
            catch { }

            s = P[c] = n;
            i = (n = c.Length) > i ? n : i;
        }

        if (c == "list")
            foreach (var p in P.Keys)
                C.Write("| {0," + -i + "} | {1,11} |\n", p, P[p]);
        else
            C.WriteLine(s);

        if (c != "exit") goto a; // goto is cheaper than a loop
    }
}

+1, I'm surprised that you can get such a low character count with such a verbose language :D

My goal with the Java is only to beat the C# implementation.  Haha.  Nice job with this one.

Java - 772 751 739 713 666 619
I know it's not winning the contest, but just for fun!
import java.util.*;class a{static<T>void p(T p){System.out.print(p);}public static
 void main(String[]s){z:for(Map<String,Long>m=new HashMap();;){p("> ");s=new
 Scanner(System.in).nextLine().split(" ");switch(s[0]){case"list":for(Map.Entry
e:m.entrySet())System.out.printf("|%12s|%6s|\n",e.getKey(),e.getValue());break;
case"count":p(m.get(s[1])!=null?m.get(s[1]):"There is no "+s[1]+" pie!\n");break;
case"buy":case"sell":long r=(s[0].length()==3?1:-1)*new Long(s[1])+(m.get(s[2])!=null?
m.get(s[2]):0);p(r+"\n");m.put(s[2],r);break;case"exit":p("The pie store has
 closed!");break z;default:p("That's not a valid command.\n");}}}}

With line breaks and tabs:
import java.util.*;

class a{

    static<T>void p(T p){
        System.out.print(p);
    }

    public static void main(String[]s){
        z:for(Map<String,Long>m=new HashMap();;){
            p("\n> ");
            s=new Scanner(System.in).nextLine().split(" ");
            switch(s[0]){
            case"list":
                for(Map.Entry e:m.entrySet())
                    System.out.printf("|%12s|%6s|\n",e.getKey(),e.getValue());
                break;
            case"count":
                p(m.get(s[1])!=null?m.get(s[1]):"There is no "+s[1]+" pie!");
                break;
            case"buy":
            case"sell":
                long r=(s[0].length()==3?1:-1)*new Long(s[1])+(m.get(s[2])!=null?m.get(s[2]):0);
                p(r);
                m.put(s[2],r);
                break;
            case"exit":
                p("The pie store has closed!");
                break z;
            default:
                p("That's not a valid command.");
            }
        }
    }

}

+1 for a non-traditional golfing language :). With C# I found that the switch statement is more expensive than simple if{} constructs. This should be true for Java too.

@IgbyLargeman Yeah, I kept trying to get if/else to be less expensive, but due to the fact that I'd have to do s[0]=s[0].intern() in order to compare with ==, it always ends up being more.  I know, very counterintuitive.

Python 3, 310
p={}
c=G=p.get
while c:
 l=("exit list buy count sell "+input("> ")).split();c=l.index(l[5]);*_,n=l
 if~-c%2*c:p[n]=(3-c)*int(l[6])+G(n,0)
 print(["The pie store has closed!","\n".join("| %*s | %9s |"%(max(map(len,p)),k,p[k])for k in p),G(n),G(n,"There is no %s pie!"%n),G(n),"That's not a valid command."][c])


text:
Recreation of Piet Mondrian Composition
Good Afternoon,
Your goal is to, in the least amount of source code bytes, recreate any of Piet Mondrian's 'Composition' paintings (for instance, Composition #10).
The recreation can either use the actual colors, or replace it with the appropriate colours from the Windows Default 16 Color Palette.
Your recreation can be outputted in PNG, BMP or NetPBM, either to a file or to STDOUT, or directly to the screen.
Your recreation must be a resolution of 512x512 or higher.
Your recreation must not access the internet. If your program requires data files, then their size will be added to the size of your source.
Your score will be the size of your source file in bytes.
Please state with your entry which painting you're recreating, and provide a link to the original and a picture of your recreation.
Good Luck.

Step one: find a language with a built-in PNG, BMP or NetPBM encoder.

I'm OK with that. In fact, I chose those formats because in PNG and BMPs case, lots of languages already support it, and in NetPBM's case, you don't really need an encoder - it has an ascii format which is a series of space separated numbers.

Relevant: Piet

It's a difficult language to work in... every now and then I attempt to do a Quine outputting NetPBM... but yeah. I'll be very impressed if anybody can recreate Piet Mondrian in Piet!

Can we output character art using terminal color escapes and block drawing characters? (eg. ▃▃▌) Or is this best posed as a different challenge?

@lochok I would offer a bounty for a Piet answer if anybody was seriously interested in trying.

Is there any limit on how similar our image has to be to the original?

Generally speaking, as close as possible - using either the correct colours or the 16 Windows colours. If it looks nothing like it - my suspicion is that people would be able to tell.

What about things like line thickness and position?

Tikz, 175 bytes
Composition III in Black and White, 175 bytes
\documentclass[tikz]{standalone}\begin{document}\tikz{\def\b{;\draw[line width=}\def\a{)--(}\clip(1,1\a1,5\a5,5\a5,1)\b2mm](0,4\a6,4\a6,3\a4,3)\b1mm](4,0\a4,5);}\end{document}

Verify it in the Blogosphere
This is perhaps one of Mondrian's most minimalistic works and I am surprised no one has found it yet.  It is not however particularly interesting so I have included several other paintings in my answer.
Explanation
There is a bit of a wrapper that is associated with every tikz answer.  The wrapper is:
\documentclass[tikz]{standalone}\begin{document}\tikz{
}\end{document}

Once you get past the wrapper there are a few \def statements that save bytes but unfortunately obfuscate the code:
\def\b{;\draw[line width=}\def\a{)--(}

If we make all the proper substitutions our code comes out looking like:
\clip(1,1)--(1,5)--(5,5)--(5,1);
\draw[line width=2mm](0,4)--(6,4)--(6,3)--(4,3);
\draw[line width=1mm](4,0)--(4,5);

The first bit is a \clip and is very important, but we will skip over it for the time being.
Now we draw the first line on the blank canvas,  This line is rather thick so we use [line width=2mm] to set the thickness to 2mm:
\draw[line width=2mm](0,4)--(6,4)--(6,3)--(4,3);

This connects a couple of nodes and produces this shape:

Next we \draw a second stroke, however this stroke is thinner so we have to set the line thickness to 1mm:
\draw[line width=1mm](4,0)--(4,5);

Now our painting looks like:

This is close to the original but not quite, so here is where the \clip comes into play.  We use the \clip to remove all the extra lines from our canvas and set the canvas to the correct size.  With the canvas resized we get the image:

Composition With Yellow Patch, 214 bytes
\documentclass[tikz]{standalone}\begin{document}\tikz[line width=2mm]{\clip(1,1)rectangle(7,7);\draw(0,8)rectangle(4,3.5)rectangle(6.5,1.2)rectangle(4,0);\draw[fill=yellow](6.5,3.5)rectangle(8,2.5);}\end{document}

Evaluate it in CyberSpace
Explanation to come

Composition II in Blue and Yellow, 225 bytes
\documentclass[tikz]{standalone}\begin{document}\tikz[line width=2mm]{\clip(1,1)rectangle(7,10);\draw(8,9)rectangle(3,6)rectangle(0,0);\draw[fill=yellow](0,0)rectangle(3,2);\draw[fill=blue](0,11)rectangle(3,9);}\end{document}

Assess it over the Webbernetz!
Explanation to come

Composition B (No. 2) in Red, 232 bytes
\documentclass[tikz]{standalone}\begin{document}\tikz[line width=2mm]{\clip(1,1)rectangle(10,13);\draw[line width=1mm](1.2,5)--(1.2,9);\draw[fill=red](0,14)rectangle(5,9);\draw(0,9)rectangle(11,5)(7,0)rectangle(5,14);}\end{document}

Attempt it within the Internet!
Explanation
First here is the code with line breaks inserted to make it more readable:
\documentclass[tikz]{standalone}
\begin{document}
\tikz[line width=2mm]{
\clip(1,1)rectangle(10,13);
\draw[line width=1mm](1.2,5)--(1.2,9);
\draw[fill=red](0,14)rectangle(5,9);
\draw(0,9)rectangle(11,5)(7,0)rectangle(5,14);
}
\end{document}

The first command of interest is
\draw[fill=red](0,14)rectangle(5,9);

This draws a red rectangle with a black outline.  For the upper left hand corner of the painting.

We then draw two more rectangles with white interiors and black outlines to create the grid pattern on the painting
\draw(0,9)rectangle(11,5)(7,0)rectangle(5,14);

We then draw in a thin line
\draw[line width=1mm](1.2,5)--(1.2,9);

And crop the image to the proper size
\clip(1,1)rectangle(10,13);

Composition II in Red, Blue and Yellow, 251 bytes
\documentclass[tikz]{standalone}\begin{document}\tikz[line width=1mm]{\clip(1,1)rectangle(9,9);\draw[fill=yellow](8.5,6)--(0,6)--(8.5,6)--(8.5,2)rectangle(10,0);\draw[fill=red](3,3)rectangle(10,10);\draw[fill=blue](0,0)rectangle(3,3);}\end{document}

Test it upon the World Wide Web!
Explanation
First I will insert some line breaks to make my code readable
\documentclass[tikz]{standalone}
\begin{document}
\tikz[line width=1mm]{
\clip(1,1)rectangle(9,9);
\draw[fill=yellow](8.5,6)--(0,6)--(8.5,6)--(8.5,2)rectangle(10,0);
\draw[fill=red](3,3)rectangle(10,10);
\draw[fill=blue](0,0)rectangle(3,3);
}
\end{document}

The first line of importance is:
\draw[fill=yellow](8.5,6)--(0,6)--(8.5,6)--(8.5,2)rectangle(10,0);

This draws the following shape:

This strange shape is the yellow rectangle in the lower right corner and the two lines that are no the edge of a colored rectangle.  Next we insert the red square and cover up the extra lines made by the last shape:
\draw[fill=red](3,3)rectangle(10,10);

This comes out looking like:

Now we insert our blue square:
\draw[fill=blue](0,0)rectangle(3,3);

Now all that is left is to crop out all the unnecessary parts of the image using a \clip
\clip(1,1)rectangle(10,10);

Composition II, 308 bytes
\documentclass[tikz]{standalone}\begin{document}\tikz[line width=2mm]{\clip(1,1)rectangle(12.6,13);\draw(0,0)rectangle(10,4)rectangle(2,12)--(0,12);\draw[fill=red](10,1.6)rectangle(14,0);\draw[fill=yellow](6,12)rectangle(10,14);\draw[fill=blue](0,4)rectangle(2,8);\fill(10,10)rectangle(14,14);}\end{document}

Check it out on the Information-Super-Highway
Explanation to come

Mathematica 202  287 bytes.
Just For Fun!  330 bytes: Mondrian with "Boogie Woogie" in Its Title
Column[{"Boogie Woogie", Grid[{{"",i["",b->Red],\[SpanFromLeft]},{"",\[SpanFromAbove],\[SpanFromBoth]},{i["",b->Blue],"",""},{\[SpanFromAbove],\[SpanFromAbove],i["",b -> Yellow]}},Dividers->{{2->t@5,3->t@6},{2->t@9,3->t@7,4->t@6}},ItemSize->{{1->3,2->9,3->1},{1->6,2->6,3->2,4->2}}]},Alignment->Center]

Actual Submission [287 bytes]
\[SpanFromLeft] and similar expressions take up roughly 85 bytes.  In mathematica each such expression has its dedicated one character symbol.
t=Thickness;b=Background;i=Item;
Grid[{{"",i["",b->Red], \[SpanFromLeft]},{"",\[SpanFromAbove],\[SpanFromBoth]},{i["",b->Blue],"",""},{\[SpanFromAbove],\[SpanFromAbove],i[ "",b->Yellow]}},
Dividers->{{2->t@5, 3->t@6},{2->t@9,3->t@7,4->t@6}},ItemSize->{{1->3, 2->9, 3->1},
{1->6, 2->6, 3->2, 4->2}}]

Output on left; photo of Piet Mondrian, Red Blue Yellow Composition on right.

Nice try.  You're not getting the bounty that easily.

Ruby, 112 (111) characters
Piet Mondrian - composition in B (No.II) with Red
b="0 "*9
w="2 "*9
puts"P3 609 771 2",["1 0 0 "*267,w*8+b*2+w*79,w*89].map{|x|(x+b*3+w*42+b*3+w*66)*249}*(b*2436)

my production on the left, the upscaled reference on the right.

The colors can be tweaked slightly - up to a precision of 1/9 - without loss of score by tweaking the max-value in PPM. I've chosen the "suitable Win16 color" approach. 8/9 white is probably closer to the canvas original color, but 9/9 is closer to the author's intention.
One character can be saved if we replace "1 0 0 " with (w+b+b) (#F00 red). I believe that counts as "close enough"
file ouptut version (not golfed)
File.open "tmp.ppm", ?w do |f|
    b="0 "
    w="2 "
    s=b*27+w*378+b*27+w*594
    f.puts"P3 609 771 2",["1 0 0 "*267,w*72+b*18+w*711,w*801].map{|x|(x+s)*249}*(b*21924)
end

An easy one: "0 " -> b

@Howard damn. Missed this one while minifying. Thanks

And some more if you change w="2 " to w="2 "*9 and b also.

umm... I get this (it goes on forever)

@Doorknob save that as a ppm file and open in an image editor

@Doorknob "Your recreation can be outputted in ... NetPBM, ... to STDOUT, ..."

SmileBASIC, 2774 1892 bytes
Broadway Boogie Woogie
GCLS-920851D$="w$BȜąr:BȂąr7?Ƣǘy1SƑǘb<?ŵǘw-/ƶvyFMƮeb<<ŶIr:,ėǭy:Sėǘw-LŒƄw7;ėƎrkLćƄrBMĜey26ğ¸bKBē²y,Bć²w<Dđïw+DüïyDÒïw--çvyU8Òpw.1±syBM¨eb;<Iy28¥żrJNůbwN{ůr?@Ǣb3>Sǭw.Fb¤w24DrMF5¤w,7Nnr[75ny1X=e
FOR I=1TO 36G A(),A(),A(),A(),A()NEXT
D$=" w*+r6,r1+b<*w1+b/+b++r(+w*+w,Br )b+*b()w0,w=+b,,r5+b1+r ,w24-Ȃ  w  w#.r-#-Ǥ  w*+r4,b3+r6*w2+b,-r-,b++r*+b**r(*b(*r*+b<-w@+b -w ,r4+b1+b%-w,5-ǔ  w +r)+w?#-ƹǘ w +r%-b,#-ƭ +w *r +w/,b2,r1-b;-w7+b*.w5+r1+r +-ƒ> w +r'-b*#-ž *r+)w +r?+b:+b1-b2+w:+w*+w3-b4-r4-b6,w2+r--w3+b1+r )w52-ş  w*+r )w ,b>+r7+b :w -b,+r:+w*+w7,r 6w ,r7-r0.w/+bM+b1+b ,w24-ľ *w +r)+r *w5+r9,b7.w++w ,r.+w*+w6*b Dw *r06w -r5+b *w8+w +r1+b ,w *r(7-ü  w*+w )b +w*+r*+bD-rC/r7+b*+r5+bD-r,.b/.w.+b *w8+r +w1+b'+r,4-Ò  w*+b )w+*r+*w +b )w<0wX-w +r*+b /wd-w/.b/*w+-r 7w)+bC+r,3-p *w+)w +b*+w*+b )w@2wU*w+*w++wx-wQ-w.,bT+b,.-* +w +r++r5,w6+w %|üŭ w3+r1*w(+r0+r7*b (w )r3*w+*w,+r-*w +b5+r )w6+w.,r1+w *b*-w +b *w(,r()w ,r+*r :| ȋ+w7*b 1w4)w +r %|şǷ+r,*w)+w.*w*)w ?r -w+'|pǷ)w,)w +b*#| Ƿ+r/+b()w ?r -w+*w),r(*w *b +w *r +| Ǣ w+(w +b1*w(+r0+b7)b *w *r2)w +b *w,+r7+b5+r )w6+b/+b )w1,r7+b.*b9*w +b*8| Ǎ w3+w )b0*w +r4)w +r/+w**w**b +w6+w )r1*b3+w /|üň+b-*w1+w%*r(-w +r *w.+w')r (w5*| ň w3+w )r0*w +b )r5*b/+w3+w *r +w *r,+w9+r3+w-*b (w +r,+b2,w /r3+b0)r *b+-w+*r :| ĳ w3+b )w)*r 'w +b (w+)w *r1+b0*w.+r6+b )w0)w,)w +b4+w +b0)w'*r1*b))w+*b.*b1(w+*r ;| 3w +b )w*)b 'w +b.)r 'w )b0+r <b,+b6+b.,b=+r 3w ,b +w *b 6w *r);b)+b7+b 1w=9| Z w3+r (w.-w +b1+w +r0+r )w +r (w,+r6+b *w),r8+b?+bJ*w:)w+)w.*r1)w+*r 7| >+r )w6+r2*b1+r6*b1*w +b*(| ,
FOR Q=1TO 27S=A()T=A()R=A()L=A()FOR I=1TO L
R A(),89R A(),A()NEXT
NEXT
DEF A()RETURN-32+ASC(POP(D$))END
DEF R L,C
IF L THEN IF R-13THEN G C,L,11,T,S:T=T+L ELSE G C,11,L,T,S:S=S+L
END
DEF G C,H,W,Y,X
GFILL X,Y,X+W-1,Y+H-1,-1716698*(C>88)-2302505*(C==87)-6080725*(C==82)-14597488*(C<67)END

Each of the "lines" in the image is stored in this format:
x,y,direction,numberOfSegments,
yellowLength,nextColor,colorLength,
yellowLength,nextColor,colorLength,...

All the numbers are stored as CHR$(number+32), colors are stored as one character; w,y,r, or b, and direction is stored as | or -
The extra rectangles are just stored as:
x,y,width,height,color,
x,y,width,height,color,...

In the same way.

Nice! I was thinking about doing QBasic, but there isn't a 512x512 screen mode.

I got very lucky; SmileBASIC's graphics pages are exactly 512x512 pixels

SVG - 455 480 - Mondrian Composition II in Red, Blue, and Yellow
If you can embed Javascript into SVG and make it dynamic, its a programming language. Ergo, this is a program. Turns out if an x or y coord is missing in SVG it defaults to 0. Also red is shorter than #f00!
<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg"><rect x="145" fill="red" width="455" height="440"/><rect y="432" fill="#00F" width="150" height="168"/><rect x="550" y="517" fill="#FF0" width="50" height="83"/><rect x="140" width="16" height="600"/><rect y="430" width="600" height="16"/><rect y="180" width="140" height="25"/><rect x="550" y="430" width="15" height="170"/><rect x="550" y="515" width="50" height="16"/></svg>

Pretty Printed:
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg">
  <rect x="145" fill="red" width="455" height="440"/>
  <rect y="432" fill="#00F" width="150" height="168"/>
  <rect x="550" y="517" fill="#FF0" width="50" height="83"/>
  <rect x="140" width="16" height="600"/>
  <rect y="430" width="600" height="16"/>
  <rect y="180" width="140" height="25"/>
  <rect x="550" y="430" width="15" height="170"/>
  <rect x="550" y="515" width="50" height="16"/>
</svg>

Wait, I thought Composition B (No.II) with Red 1935 was #2

@JanDvorak I don't know, I just looked him up on Wikipedia. Honestly, Piet was a pretty lazy painter. They all look the same.

I think you can avoid most of the double quotes and still work in most browsers. Not sure about compliance, though.

@LegoStormtroopr Lazy?  That's pretty rich, coming from a guy who hangs out on a website devoted to writing short programs.

@boothby Touche. I was going to argue that I've learned a lot from code golf due to its hyperminimalist approach. But... the same could be argued of Piet's work too.

huh... the SVG renders cropped on the bottom in latest Chrome when I append it directly into the document after this answer. Renders just fine if I set the height explicitly.

You can get rid of the xml version and encoding line, it isn't required.

Processing, 15,447 15,441 15,439 bytes
String i="data:image/jpeg;base64,[encoded data, 15360 characters]";PImage x=loadImage(i);void draw(){image(x);}

Brute force, and I haven't managed to find a way to remove the draw function.
It errors in the main processing engine, I think because it's too big of a b64. You can test it here.
JS fiddles does crop it though, to 100*100px. My base64 works, but the online environment doesn't. :(

You can golf this by using PImage x=loadImage(i); instead

The question demands a resolution of 512x512 or higher, but the canvas in your fiddle is only 100x100. Is this a quirk of JSFiddle?

@Dennis It's not only the canvas size. The image is cut off on both the right and the bottom, making the result incorrect.

@Dennis Yeah, it is. Manually setting it to 512*512 px still crops it to the same size. It's just JS fiddle, and the b64 I used is greater than 512.

data:;base64 works just as well

PImage x=loadImage("data:;... is shorter than  declaring the String

@KritixiLithos ah, thanks. Can't edit right now but will do.

SmileBASIC, 67 bytes
GCLS-1GFILL 353,0,367,#R,0GFILL.,121,#R,156,0GFILL 367,266,#R,293,0

I picked an easy one: Composition III in Black and White
Luckily SB's graphics page is exactly 512x512 pixels, but it won't all fit on the 400x240 screen so I can't get a screenshot easily.
Explained:
GCLS -1 'fill screen with &HFFFFFFFF (white)
GFILL 353,0,367,511,0 'draw vertical line in &H00000000 (black)
GFILL 0,121,#R,156,0 'draw horizontal line
GFILL 367,266,#R,293,0 'draw small horizontal line

Love2D, 4956 + 395 + 1 = 5351 bytes
f=io.open("d","rb")s=f:read("*a"):gsub("(.)(.)",function(a,b)return a:rep(b:byte())end)o=love.image.newImageData(512,512)c={{244,243,248},{173,24,0},{250,209,5},{30,64,164}}o:mapPixel(function(x,y)i=math.floor((x+math.floor(y/4)*512)/4)O=3-i%4 n=s:sub(math.floor(i/4)+1,math.floor(i/4)+1)if n and#n>0 then b=math.floor(n:byte()/(4^O))%4 else b=0 end return unpack(c[b+1])end)o:encode("png","o")

The Data file is stored HERE
Output:

Original:

Explanation
f = io.open("d","rb")                                                   -- Open the image in raw format.
s = f:read("*a"):gsub("(.)(.)",function(a,b)return a:rep(b:byte())end)  -- And read it's contents.
o=love.image.newImageData(512,512)                                      -- Make the output image
c = {{244,243,248},{173,24,0},{250,209,5},{30,64,164}}                  -- Build the Pallet
o:mapPixel(function(x,y)                                                -- Fill the image, based on a function
    i = (x+y*512)                                   -- The position this pixel exists on the string, 0 indexed.
    O = 3-i%4                                       -- The offset. The byte stores 4 pixels, so this is the id among a group of 4.
    n = s:sub(math.floor(i/4)+1,math.floor(i/4)+1)  -- And this gets the byte itself.
    if n and #n > 0 then                            -- Sometimes this is null and I don't like it.
        b = math.floor(n:byte()/(4^O))%4            -- /4^offset % 4 gives us the value of the index on the pallet.
    else
        b = 0                                       -- Fallback plan.
    end
    return unpack(c[b+1])                           -- Set the pixel to the colour required.
end)
o:encode("png","o") -- Store it in Appdata as "o", which is a png file.

The Encoder.
This is just the script I used to encode the image.
Gif worked out more compressed, but I wasn't challenged to display a gif.
img = love.image.newImageData("mondrian.jpg")
-- white    0
-- blue     3
-- yellow   2
-- red      1

cols = {{244,243,248},{173,24,0},{250,209,5},{30,64,164}}

local s = ""
for y = 0, 511 do
    for x = 0, 511 do
        local r,g,b = img:getPixel(x,y)
        local n = 0
        local D = math.huge
        for k,v in pairs(cols) do
            local d = (v[1]-r)^2 + (v[2]-g)^2 + (v[3]-b)^2
            if d < D then
                n = k-1
                D = d
            end
        end
        s = s .. n
    end
end
-- Convert base 4 to base 256
-- How many digits do we need- Every 4 digits
encd = ""
for str in s:gmatch"...." do
    local n = str:sub(1,1) * 4^3 +
              str:sub(2,2) * 4^2 +
              str:sub(3,3) * 4^1 +
              str:sub(4,4) * 4^0
    encd = encd .. string.char(n)
end

f = io.open("stored.dat","wb")

smlr = ""
lst = ""
c = 0
for s in encd:gmatch"." do
    if s == lst then
        c = c + 1
        while c > 255 do
            smlr = smlr .. lst .. string.char(255)
            c = c - 255
        end
    else
        if c > 0 then
            smlr = smlr .. lst .. string.char(c)
        end
        lst = s
        c = 1
    end
end

f:write(smlr)

Mostly competing for the bounty. There are likely better ways to do this, but I thought it would be interesting to try to use a simple pallet and run length decoding.
EDIT:
Input image was simplified, slightly less accurate, but a magnitude less bytes.

Why do parts of your output look like they're made of puzzle pieces? Is that what you meant by "slightly less accurate, but a magnitude less bytes"? It seems to me that the resulting gaps in the color strips make this not a valid recreation.


text:
change two bits by using only bitwise operations
try to write shortest possible variant of logic which converts binary input by this table:
00 -> 00
01 -> 10
10 -> 01
11 -> 11

You can use only bitwise and bitshift operations. I calculate only operations and don't care brackets, spaces, constants and etc. But you can't use any control (if, while, ternary) and arithmetic operations.
If you are using bitwise and bitshift operations, your operations number will be multipled by two:
op_num = (your_op_num << types_of_operation_num) >> 1

edit: sorry, this is not real code-golf, because I calculate operations in logic, not characters.

In x86 assembly, I think rol would do this in one instruction (if it could operate on only 2 bits).

Ok, so how do we count score exactly? One or two examples, maybe?

The problem is: With only bitwise operators, you can't combine numbers. And the bitwise operators can only affect bits at the same position. (1x & 1y - x and y can't affect the result of the first bit.). So every logic based solution has to use both of them.

I offer a boonty of 50 rep for the first solution that uses only bitwise operators or bitshift operators that operate on inifite range.

@JohannesKuhn Infinite range? The question is about 2 bit numbers, isn't it? Or am I misunderstanding?

I don't like to see solutions like i<<1 and claiming that it does roate without carry on a 2-bit space.

It's pretty trivial to show that this cannot be done with bitwise operators alone. You have to use at least one bitshift operator (since arithmetic and other operators are forbidden).

6 operations
216>>i>>i&3

Same idea:
216>>(i<<1)&3

8 operations (4 * 2)
Ok, here a real answer:
(i&1)<<1|i>>1

I think meant is, use as less different and total operators as possible.

Because using and bitshift operations is much more easiest.

Who knows? It is tagged as [tag:code-golf] so characters/bytes should count.

@JohannesKuhn Yup definetly tagged wrong.

Sorry, I don't read carefull. This is not real code-golf.

Javascript, 0 operators
alert(prompt().split('').reverse().join(''))

This is [tag:code-golf]. Characters count.

@JohannesKuhn I was confused, [tag:codegolf] vs If you are using bitwise and bitshift operations, your operations number will be multipled by two:

Tcl, 0 operators
string rev $i

Mathematica 0 operators?
If a string, s, is input, any of the following should work:
StringReverse[s]

StringRotateLeft[s]

StringRotateRight[s]

If the input is a list of digits (the standard way to represent binary digits in Mathematica), this will work:
(# /. {{0,1} -> {1,0}, {1,0} -> {0,1}}) &


text:
Write a program which performs brute force letter combination until the word "password" is found
The program should print every letter combination (lowercase or uppercase, it doesn't matter) in alphabetic order. It must start with a and the last printed combination should be password.
The output should be:
a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ... passwora passworb passworc password

Do the separators have to be spaces, or can I use newlines?

Yes you can, it is just a minor change.

Perl, 19 chars
say for a..password

Uses newlines as delimiters, per clarification above.  Run with perl -M5.010 (or just perl -E 'say for a..password') to enable the Perl 5.10+ say feature.  Per meta, this doesn't count as extra chars.
(If you insist on spaces as delimiters, $,=$";say a..password is only two chars longer.  However, it's also very slow and wasteful of memory, to the point of being unusable in practice, since it tries to build the entire list in memory before printing it.)

Ruby, 33 chars (optimal but longer version)
?a.upto('password'){|c|$><<c+' '}

I like the 'a'.upto('password'); it tells you exactly what it's doing. Ruby is great and expressive like that. :D
Of course, print c,' ' would also be much clearer, but using $> is two characters shorter.
Ruby, 29 25 chars (slow version)
$><<[*?a..'password']*' '

This one's shorter, but it prints all of the tokens at once, so it takes a long, long time to run!

Nice, especially the first.

In the slow version, (?a..'password').to_a can be shortened to [*?a..'password']

Perl, 33 32 24 characters
A solution in 32 characters:
$_=a;print$_++,$"until/passwore/

Not much to say about this one. I could reduce this to 27 characters if I could use newlines instead of spaces to separate the entries.
Ilmari Karonen points out that .. internally calls ++, so a better solution (25 characters) would be:
print$_,$"for a..password

By taking advantage of Perl's command-line options, here's an equivalent 24-character solution:
perl -l40e 'print for a..password'

The rules for counting perl flags is here, for those who aren't familiar with them.
Of course, Ilmari's 21-character solution is shorter still, but it requires a machine that can allocate an array of 129,052,722,140 strings.

Wouldn't .$" instead of ," " save a character?

Yep, total oversight on my part. Thanks.

Perl 6, 20 chars
say "a".../password/

You don't need other things

Python 2, 91
b=lambda n:n*' 'and b(n/26-(n%26<1))+chr(~-n%26+97)
i=0
exec"i+=1;print b(i);"*129052722140

PHP 38 37 36 characters
<?for($w=a;$w<passwore;)echo$w++,~ß;

You have to set the encoding to ISO 8859-1 and disable warnings.

I didn't test that, but does it really do that???

@ST3 It's a simple loop. The variable $w is initially set to 'a' and then is incremented until it reaches the first value after 'password' (the last string is not printed).

It looks suspicious for me, did you made a test? (I know it would be very long, so just to make from a to aa and from passwoqz to password). So is it tested or you think it should do the work?

@ST3 It is a regular for loop. There is nothing strange in this code, except for the last 2 characters, which are a bitwise-inverted whitespace. Anyway, yes, I tested it up to a shorter word.

I just checked that, it does nothing.

@ST3 Here is a test from passwoqs to password. Because the encoding of codepad is not ISO 8859-1, I had to replace ~ß with a whitespace.

@ST3 And this one is from a to az.

I have to admit, it works. However I tested it in my own computer and it did nothing, probably it depends on php version and settings. So now agree that your answer is correct.

@ST3 Maybe you have short_open_tag set to false in your configuration.

I'm not sure, because I'm not a php developer, so know only basics about it...

You can save a char with $w<passwore in stead of $w!=passwore.

@fireeyedboy Thanks I changed it!

It doesn't work with < passwore. In a test from a to ba it stops a b, with != it works again.

Ruby (40 characters)
Interpret a string of a-z letters as a number in base 26, with a = 1, b = 2,
..., z = 26.
So "password" can be thought of as the number N =
16*(26**7) +
1*(26**6) +
19*(26**5) +
19*(26**4) +
23*(26**3) +
15*(26**2) +
18*(26**1) +
4*(26**0)

If we let s = "a" (that is: 1) and we make (N-1) calls to s.succ!, s will be "password" (N). In other words, N = 1 + (N-1).
For an example that will run more quickly, to prove the calculation of N is correct, consider "pass" as the target, where N is
16*(26**3) +
1*(26**2) +
19*(26**1) +
19*(26**0)

and
s = "a"
(N-1).times { s.succ! }
puts s #== "pass"

Since we want to print "a" too, we need
s = "`"
N.times { print(s.succ! + " ") }

So back to the full "password". N = 129052722140, leaving:
s=?`;0x1e0c2443dc.times{$><<s.succ!+" "}

I hunted for a more compact form of 129052722140 == 0x1e0c2443db but couldn't find one.
(Updated to fix the lack of printing "a", thanks to Cary.)

Adam, that must have been you in my mind-meld.  Don't you want s to start one before 'a'?

I think what you're getting at is that I've used N instead of N-1 in my iterations! Thanks, I'll edit to fix. (Although 129052722140 is an interesting number to Google :).)

0x1e0c2443db is just as many chars as 129052722139.

What I meant was that if s=?a, s.succ! starts at 'b'`.

Does anything other than the value of N change if you start one before "a"? I don't think this would lead to a shorter version.

With s=?a and N-1 you get 'b c...password'; with s = and N you get 'a b...password'.  The SO requested the output to begin with 'a'. That's all.

D'oh. I'm an idiot. Edited yet again to fix.

Javascript, 73
Here is a 73 character version of @Briguys' code, which prints only letter combinations
for(i=s=0;1982613533018>i++;s=i.toString(36))/\d/.test(s)||console.log(s)

APL(Dyalog), 46 34
{∇{'PASSWORD '≡⍞←⍵:→⋄⍵}¨⎕A∘.,⍵}' '

Theoretically, it would print until PASSWORD, but I encountered a work space full error after ZZZZ: 5-dimensional array is just too awesome.
EDIT: Must have been too long since I last fiddled with APL. How dare I missed the identity comparision (≡)!!!
Explanation
{...}: Declares a function which...
⎕A∘.,⍵: Takes the outer product over concatenation (Every combination of an element of the left operand concatenated with an element of the right operand, just like Cartesian Product) between the 26 uppercase alpha (⎕A) and the argument (⍵)
{...}¨: And for each element of the resulting set, plug that into a function which...
⍞←⍵: prints it out
'PASSWORD '≡ and compare it with 'PASSWORD '
→: If the comparison returns true (1), then abort the program.
⍵: Else just return the printed string.
∇: Finally, the outer function recurse itself.
(Then you are taking outer product over concat between the 26 alpha and the 26 alpha, which gives all the 2-letter combinations, and then outer product over concat between the 2-letter combinations and the 26 alpha, etc... Until you reach PASSWORD which triggers the abort)
' ': The spark!! That kick-start the recursive function with the space character.

Python 2 - 153 152 151 149 bytes
from itertools import*;R=range
for l in iter(chain(*[product(*((map(chr,R(65,91)),)*n))for n in R(1,9)]).next,tuple("passwore")):print ''.join(l)

Saved one byte by using UPPERCASE and one by using newlines instead of spaces.

Golfscript 41
For lack of 'z'+1 == 'aa' logic Golfscript can't win this one.
168036262484,(;{27base{96+}%' '+.96?0<*}%

168036262484, create array from 0 to 168036262483
(; drop the 0
{ .. }% iterate over array
27base convert element to base 27 array
{96+}% add 96 to each digit
' '+ convert to string and add a space to the end
.96?0<* truncate string to zero if it contains char 96

In Ruby, 39 40.
a=&`
0x1e0c2443dc.times{$><<a.succ!+' '}

..or 129052722140.  (Edit: formerly I had 129052722.  I had lost some digits cutting and pasting.  Previous hex (0x7B13032) was for incorrect number.). Borrowed a=?` from @Doorknob to saves a character.

I tried to fix the a=?`  thing, it looks kinda weird and has an extra space at the end but at least it works :P

So where does the number 129052722 come from? By my calculation, that would seem to give you the range "a" to "kwkokg" ... a bit small.

@Breadbox I calculated that number with the following method (sorry for the formatting, but comments have limitations, eh?): ORD_BASE_ASCII = 'a'.ord-1; def nbr(word);   len = word.size;   word.split('').inject(0) {|t,c|     offset = c.ord - ORD_BASE_ASCII;      t + offset*(26**(len -= 1))}; end It's easy to confirm this is correct by just printing out some sequences.

@breadbox You were right. See edit. Method I gave in comment is OK.

Fencepost errors. Your script is calculating using a=1..z=26. You need to calculate a=0..z=25 to get the right count. Removing the -1 from the first line, you'll get 120699639557, which (adding one for the zeroth entry) matches my calculation.

@breadbox Try this with the method nbr() in my earlier comment:
def pr(word); a = '<backtick>'; n = nbr(word); puts "n = #{n}"; n.times{$><<a.succ!+' '}; end
For example, pr('diva') => a b ...  diuz diva.  (diva? My dog.)

Yeah, I'm completely wrong. z winds up playing the role of the zero value. (Because a != aa != aaa, etc.) Ignore me.

Javascript:  57 56 characters (thanks C5H8NNaO4)
Here's a solution that includes numbers as possible characters ("0", "1", "2", .., "passwor9", "passwora", "passworb", "passworc", "password")
for(i=-1;i++<1982613533017;console.log(i.toString(36)));

Here's a fiddle for testing (with only the last 100 iterations so it doesn't lock up your browser).

This solution is wrong, it doesn't follow the specification.

@Doorknob - Yes, I mentioned that in my answer.  It still prints all cases from the original requirements, but prints all alpha-numeric cases as well.

Also, after re-reading the question, if I set i to 9 in my code, it would meet ALL the question's requirements except for his example output, which he has already given an exception for (and it would bring the code to 56 characters).

@Briguy37 The spec says print every **letter** combination
Anyway, save a character: {} -> ;

@C5H8NNaO4:  Which letter combination does my solution not print?  Thanks for the tip!

@Briguy37 It's not printing only letter only combination, I don't think it goes with the spec even if you don't print the first 9 numbers. You're welcome :)

@C5H8NNaO4:  I know it is nit-picky and I feel like a weasel, but the specs say "print every letter combination", not "print only letter combinations", so I disagree.

@Briguy I would not see a number as letter but well, it can't be made clear until the spec would be updated. If you want you can put my answer into yours, as addition for completeness' sake, I would then delete mine and +1 yours'

Haskell, 101
main=putStrLn.concat.takeWhile(/="passwore ").tail.concat.iterate(\k->[x:y|x<-['a'..'z'],y<-k])$[" "]

JavaScript 80 76
for(i=s=0;s!="password";i++){s=i.toString(36).replace(/[0-9]/,'');console.log(s)}

fiddle - stops at "pa".
however this does repeat things.

You can initialize the loop with i=s=0 to save three more characters.

@minitech done.

Why keep the var? i was a global before; now s is a global. You can just keep both globals in code golf, usually.

Befunge (72)
<_v#:/*2+67\+++88*99%*2+76:
^ >$>:#,_84*+,1+:0\:" Lr$W~"67++**1+***6+`#@_

Prints strings 'a' to 'password' separated by spaces, then exits.
Below is a version that prints only the first 9*9 = 81 words ('a' to 'dd'), for comparison.  The 99* is the number of iterations to perform.
<_v#:/*2+67\+++88*99%*2+76:
^ >$>:#,_84*+,1+:0\:99*`#@_


text:
Generate information cards with titles
You must take input in the form of
title|line1|line2|(...)|line[n]

And output an information card. It's hard to explain how to make the card, so here's a quick example:
Input
1234567890|12345|1234567890123|pie|potato|unicorn

Output
/===============\
|  1234567890   |
|===============|
| 12345         |
| 1234567890123 |
| pie           |
| potato        |
| unicorn       |
\---------------/

Detailed specifications:

The title must be centered (if there are an odd number of characters you can decide whether to put an extra space after or before it).
The remaining lines must be left-aligned.
All of them must have at least one space of padding before and after.
Each line must be the same length.
The lines must be the smallest length possible in order to fit all of the text.
The first and last character of each row (except for the first and last rows) must be a |.
There must be a /, a row of =s, and a \ in the line right before the title. (the first line)
There must be a |, a row of =s. and a | in the line right after the title. (the third line)
There must be a \, a row of -s, and a / in the last line.
For the example input provided, your program's output must exactly match the example output provided.
The input will always contain at least one |; your programs behaivior when a string like badstring is input does not matter.

This is code-golf so the shortest code in character count wins.

In python input() interprets the input as python code. Is it ok to use input and take the input in quotes, if so do we need to add 2 for the quotes?

@LegoStormtroopr I suppose that's okay, but add +2 for quotes then

GolfScript, 97 characters
'|'/{'  ':!{1/*}:E~}%.{,}%$-1=:L'='*:§'/\\'E\(.,L\-)2/{!E}*L<'||':^E§^E@{!L*+L<^E}/L'-'*'\\/'E]n*

Example:
> 1234567890|12345|1234567890123|pie|potato|unicorn

/===============\
|   1234567890  |
|===============|
| 12345         |
| 1234567890123 |
| pie           |
| potato        |
| unicorn       |
\---------------/

§ that's an interesting variable name. :P

Ruby, 153 147 140 characters
h,*d=s=gets.chop.split(?|)
puts"/%s\\
|%s|
|%s|"%[e=?=*k=2+l=s.map(&:size).max,h.center(k),e]
d.map{|x|puts"| %%-%ds |"%l%x}
$><<?\\+?-*k+?/

Double format string in the second-to-last line :D

l=s.map(&:size).max saves 4

Also no need for parentheses around k=l+2 (2 chars), center(k) (2 chars), k=2+l=s.... (2 chars).

@Howard I fixed the first one, but I'm not sure where you're seeing the second or third ones...?

"| %s |"%h.center(l) -> "|%s|"%h.center(k) which removes 2 spaces. And l=s.map(&:size).max;e=?=*k=l+2" -> e=?=*k=2+l=s.map(&:size).max

@How Thanks, but the last one will break if the title is the longest word. Fixed the first.

I can't see that it breaks anything. Also you can save more chars if you move the assignments (e.g. s= into the second line - 1 char and e=.. into the %[e=... thing - 2 chars).

For the second, I think Howard means change center(l) to center l, which saves a space.

@Howard If the title is the longest word with your improvement, it will lose the padding on both sides. The s= cannot be moved because it gives an error, but I did use your e= thing.

@CarySwoveland Then it parses as h.center(l,e)

@Doorknob but isn't k always 2 more than the length of the longest string? So it should still be padded.

@Vola Oh yes, good point. Edited

The s= thing can be fixed if you put parenthesis around, i.e. h,*d=s=gets.chop.split(?|) which is still one char shorter.

Python 2.7 - 168 = 166 + 2 for quotes.
This assumes we can accept the input with surrounding quotes, hence the possible +2. Either way +2 is better than the +4 required if you use raw_input() vs. just input().
b="|"
s=input().split(b)
w=max(map(len,s))
x=w+2
S="| %s |"
print"\n".join(["/"+"="*x+"\\",S%s[0].center(w),b+"="*x+b]+[S%i.ljust(w)for i in s[1:]]+["\\"+"-"*x+"/"])

Thanks to Volatility for the max(map(len,s)) tip. A very cool tip.
edit: Corrected top row problem.
And the above outputs this:
> python i.py
"1234567890|12345|1234567890123|pie|potato|unicorn"
/===============\
|   1234567890  |
|===============|
| 12345         |
| 1234567890123 |
| pie           |
| potato        |
| unicorn       |
\---------------/

This doesn't work in either Python 2 or 3. You should either change input to raw_input or use print as a function. Also, change len(max(s,key=len)) into max(map(len,s)) and get rid of the space before for i in s[1:] to save 5 chars

I've checked in the past using input() and assuming the text is entered as a string is usually permissable. I'll squeeze your other suggestions in later. Thanks :)

@LegoStormtroopr If you assume the input in a slightly different format you should: 1) Ask if it is admissable to the OP, 2) State it somewhere. Also, when doing this, I think it would be correct to also provide a sample that uses the format explained in the question.

@Bakuriu Done!!

I count 165 characters (+2=167 total).

@Doorknob Top row should be = symbols, not -, correct?

@Jeff Yes, that's what it says in the spec.

@Doorknob Thats been fixed, no change in score!

@Lego Ok, but I still count 165, not 166.

Charcoal, 66 bytes
≔∕Ｓ|ι≔⁺⌈ＥιＬκ²ς/×=ς↓\↓⁺Ｌι¹←/←ς↑\↑⁺Ｌι¹↘Ｍ∕⁻ςＬ§ι⁰¦²→Ｐ§ι⁰Ｍ±²¦¹Ｐ×=ςＭ↘✂ι¹

My first Charcoal answer!
I wasn't getting a proper result with reflection, so I made the box manually.
Try it online!
Charcoal (Verbose), 385 bytes
Assign(Divide(InputString,"|"),i)
Assign(Add(max(Each(i,Length(k))),2),v)
Print("/")
Print(Times("=",v))
Print(:Down,"\\")
Print(:Down,Length(i)+1)
Print(:Left,"/")
Print(:Left, v)
Print(:Up, "\\")
Print(:Up,Length(i)+1)
Move(:DownRight)
Move(Minus(v,Length(AtIndex(i,0)))/2,:Right)
MultiPrint(AtIndex(i,0))
Move(Negate(2),1)
MultiPrint(Times("=",v))
Move(:DownRight)
Print(Slice(i,1))

Try it online!

Nice answer! Unrelated: How many of you got my 1+ Christmas gift on 12/25/2020?

I don't remember getting one, I think

That's pretty sad, I worked hard on that one :( it's an 1+ chirstmas tree program I posted on twtxt :)

@null haven't checked twtxt in a while. I'll see it!

Tell Lyxal I'm back ;)

Haskell, 292
import Data.List.Split
z=replicate
l=length
p w s=' ':s++z(w-l s)' '
c w s=p w$z(div(w-l s-1)2)' '++s
t(i:s)=let r=z m;m=(+)1$maximum$map l(i:s)in"/="++r '='++"\\\n"++"|"++c m i++"|\n|="++r '='++"|\n"++concat['|':p m x++"|\n"|x<-s]++"\\-"++r '-'++"/"
main=do l<-getLine;putStrLn$t$splitOn"|"l

… I’m a little new to this one :D

Vyxal, 60 bytes
\|/DvLG⇧D\=*\/p\\+,„h⋏\|pǏ,:\|$-Ǐ,‹£Ḣƛ¥↲ðp\|pǏ,;¥›\=*\\p\/+,

Try it Online!
Longer than I'd like...

C# 4.5 - 375 347 chars
;) [If someone is interested to see how C# differs from others]

var c = input.Split('|').ToList();
int l = c.Select(s => s.Length).Max() + 2;
Console.WriteLine("/{0}\\\r\n| {1} |\r\n|{0}|\r\n{2}\r\n\\{3}/\r\n", "=".PadRight(l, '='), c[0].PadLeft(c[0].Length + ((l - c[0].Length) / 2)-1).PadRight(l-2), string.Join("\r\n", c.Select(s => "| " + s.PadRight(l - 2) + " |").Skip(1)), "-".PadRight(l, '-'));

You can save a LOT of characters by using one-char variable names and removing all that whitespace...

I might be wrong but I always assume that a complete program is required unless the OP states that a code snippet is acceptable. This is a long way from a complete program.

Brought it down to 305 simply by renaming variables and removing whitespace: var c=input.Split('|').ToList();int l=c.Select(s=>s.Length).Max()+2;Console.WriteLine("/{0}\\\r\n| {1} |\r\n|{0}|\r\n{2}\r\n\\{3}/\r\n","=".PadRight(l,'='),c[0].PadLeft(c[0].Length+((l-c[0].Length)/2)-1).PadRight(l-2),string.Join("\r\n",c.Select(s=>"| "+s.PadRight(-2)+" |").Skip(1)),"-".PadRight(l,'-'));

Thanks Doorknob. Can't we recognize minimum functions calls instead of total chars? That helps us [includes solutions providers also]. Because after sometime [after a year], it would be hard to understand code written by me and that also helps others to understand code easily.

The whole point of code golf is to solve a task in the least amount of characters... http://en.wikipedia.org/wiki/Code_golf

Please somebody edit the initial answers. This is god damned goal of the code golf to use a minimum amount of chars. Not to preserve readability and maintainability over the years

Javascript, 373 364
l="length";m=" ";a="\\";b="/";c="|";p=m+c;v="join";u="concat";o=[];q=Array;i=prompt().split(c);j=i.slice().sort(function(d,e){return e[l]-d[l]})[0][l]+3;i=i.map(function(d,e){s=q(o[l]=0|(e?j-d[l]-1:(j-d[l])/2))[v](m);return(e?p:c+s+(d[l]&1?m:""))+d+(e?s:s+m)+p});x=q(o[l]=j)[v]("=");r=[b+x+a,i.shift(),c+x+c][u](i)[u](a+q(o[l]=j)[v]("-")+b);console.log(r[v]("\n"))

Output
/===============\
|  1234567890   |
|===============|
| 12345         |
| 1234567890123 |
| pie           |
| potato        |
| unicorn       |
\---------------/

Edit Notes:
Thanks @Doorknob!: -9 Characters =)

There should be a lot of space for golfing left

Some things I see: o={length:0} --> o=[] (-8 chars), p="| " --> p=c+m (-1 char)

@Doorknob Oh... thanks =), i just wonder right now why i added length at all, that makes no sense.

Java - 549 492 468 453 432
class a{static<T>void p(T p){System.out.println(p);}public static void main(String[]a){String b="/=";int l=0,t,i;a=a[0].split("\\|");for(String s:a)l=(t=s.length())>l?t:l;for(t=0;t<l;t++)b+="=";b+="=\\";p(b);i=a[0].length();p(String.format("| %"+(l+i)/2+"s%"+(l-i)/2+"s |",a[0]," "));b="|=";for(t=0;t<l;t++)b+="=";b+="=|";p(b);for(t=1;t<a.length;t++)p(String.format("| %-"+l+"s |",a[t]));b="\\-";for(t=0;t<l;t++)b+="-";b+="-/";p(b);}}

With line breaks and tabs
class a{

    static<T>void p(T p){System.out.println(p);}

    public static void main(String[]a){
        a=a[0].split("\\|");
        String b="/=";
        int l=0,t,i;

        for(String s:a)l=(t=s.length())>l?t:l;

        for(t=0;t<l;t++)b+="=";
        b+="=\\";
        p(b);

        p(String.format("| %"+(l+i)/2+"s%"+(l-i)/2+"s |",a[0]," "));

        b="|=";
        for(t=0;t<l;t++)b+="=";
        b+="=|";
        p(b);

        for(t=1;t<a.length;t++)p(String.format("| %-"+l+"s |",a[t]));

        b="\\-";
        for(t=0;t<l;t++)b+="-";
        b+="-/";
        p(b);
    }
}

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


text:
Today (September 24) is HONDA birthday
today (24 of September) is birthday of company HONDA. Originally their company name is
本田技研工業株式会社
I want to ask to make a gift for HONDA. The task is to make program print company name. You can do it any way you want, but there is only one rule, Unicode is not allowed. It should be ASCII art.
I want to ask to post code and output. As always to determine winner I'll look at the length of code, however portrait in this case is also important.
EDIT: output have to look similar into this: 本田技研工業株式会社

Alright, so what's stopping us from using 'HONDA' and claiming it prints the company name in GolfScript? (I'm just trying to point out some loopholes). Also, is this meant to be tagged as [tag:code-golf]?

@Volatility I've made edit after your comment.

Unicode is not allowed where?  At the output (sounds reasonable)? As script? As internal representation in your script?

@JohannesKuhn I meant none of printed characters cannot be UNICODE, in script you can use it but output should be on ASCII table chars.

Ohh, then fine.

The spec is too vague to allow an objective determination of whether a program meets it or not.

Ok, now we got a "Text->Image->Ascii Art" Question here.

Mathematica
Here the characters are individually rasterized.  The zero's of the binary image data of a reduced image are then replaced with asterisks and the array itself is then printed.
GraphicsGrid[ImageData@ImageResize[Binarize@Rasterize@Style[#, 136], 30]
/. {1 -> "", 0 -> "*"}] & /@ Characters["本田技研工業株式会社"]

Below all characters were rasterized as a single image. The asterisks are a bit more difficult to recognize as asterisks in this case.
GraphicsGrid[ImageData@ImageResize[Binarize@Rasterize@Style[#, 136], 300]
/. {1 -> "",  0 -> "*"}, ImageSize -> 1500] &["本田技研工業株式会社"]

Very, very nice

Wow. Looks very good. One of the requirements was visual portrait and your solution has very high quality of that, so that's way I'm accepting your answer.

Tcl
Well, a probably crazy approach.
package r Tk
package r Img
pack [label .l -text 本田技研工業株式会社 -fg #000000 -bg #ffffff]
update
puts [join [lmap line [[image create photo -data .l] data] {join [lmap pixel $line {expr {$pixel ne {#ffffff}?"@":" "}}] {}}] \n]
exit

Here a screenshot:

Does output same as 本田技研工業株式会社?

Well 研 and 会 do not look very good, but all in all good solution.

I don't output any unicode characters. I just take a photo of them and render that as Ascii. Well, b/w.

I could more different characters to display shades. (At the cost of the progam size)

JavaScript + HTML, interactive version (275 + 90 = 365 chars)
Many ideas inspired by Austin's answer, but this one is interactive; you can change the font size! (also the character count is actually correct)

Screenshot
Pressing the - and + buttons change the font size. Image is cut off, but you get the idea.

Fiddle (try it yourself!)
Here is a JSFiddle where you can run the code yourself.

JS, 275
h=30,(r=function(){for(x=document.createElement('canvas').getContext('2d'),x.font=h+'px sans-serif',x.fillText('本田技研工業株式会社',0,h),d=x.getImageData(0,0,w=h*10,h).data,s='',a=0;a<h;a++){for(b=0;b<w;b++)s+=d[3+w*4*a+4*b]?0:' ';s+='\n'}document.getElementById('p').innerHTML=s})()

HTML, 90
<button onclick='h--;r()'>-</button><button onclick='h++;r()'>+</button>

Hi-resolution version
http://jsfiddle.net/UjTbK/1/

r=function(h){for(x=document.createElement('canvas').getContext('2d'),x.font=h+'px sans-serif',x.fillText('本田技研工業株式会社',0,h),d=x.getImageData(0,0,w=h*10,h).data,s='',a=0;a<h;a++){for(b=0;b<w;b++)s+=d[3+w*4*a+4*b]?0:' ';s+='\n'}document.getElementById('p').innerHTML=s} (30) is three bytes shorter.

Javascript,  261 characters, 226 minified
special thanks to jsacii for inspiring this solution.
c = document.createElement('canvas').getContext('2d');
c.font="30px sans-serif";c.fillText("本田技研工業株式会社", 0,30);d=c.getImageData(0,0,305,40).data;
s="";
for(var y = 0; y<40;y+=2){
    for(var x=0;x<305;x++)
        s += d[3+4*x+1220*y]? "*" : " ";
    s+="\n";
}

minified
c=document.createElement("canvas").getContext("2d");c.font="30px sans-serif";c.fillText("本田技研工業株式会社",0,30);d=c.getImageData(0,0,305,40).data;s="";for(var y=0;y<40;y+=2){for(var x=0;x<305;x++)s+=d[3+4*x+1220*y]?"*":" ";s+="\n"}

and the output
             ****                                                ****        ****                                                                                ***  ***                ****        ****                           **                       ****                  ****         ****
             ****               **************************       ****        ****          *****************************                                  ****   ***  ***   ****         ****    ********                          ********                 ******                 ****         ****
             ****               **************************       ****        ****      *    ** ******* ****** ****** **    *************************       ****  ***  ***  ****          ****   **** ****                          **** *****             **********                ***         ****
 ****************************   ****       ****       ****   ****************************     ****       ****   ****       ************************    ****************************  ***************************   ****************************        ******    ******        *************    ****
  ***************************   ****       ****       ****   ***********     ****             ****       ****   ****                 ****                     ****      ****         ***************************   ****************************     *******        *******             ****     ****
          *********             ****       ****       ****       ****        ****            ****        ****   ****                 ****               **************************      **********   ****                          ****          *****************************       *********************
         ************           **************************       **** *****************     ****************************             ****               **************************      *************************    ******************          ****  ****************  *****      ****   **** **********
       ***** **** ****          **************************       ******* ****      ****    ******  ********************              ****                 **********************       **************************    ******************                                           *******       ****
      *****  ****  *****        ****       ****       ****   ********    *****   *****    *******  ***   ****   ****                 ****                 **********************      *******      ********               ****      ****         ****************************  *************    ****
   ******    ****    ******     ****       ****       ****   ********      **** ****       * ****  ***   ****   ****                 ****              **************************** *********     ***********             ****      ****           *      ****     *      **   **** *** ****    ****
 *****************************  ****       ****       ****       ****       *******          ****  ***  ****    ****                 ****              ****************************  **  ****   ********* *****           ****     * ****   ***          ****    *****              ***         ****
 ****   *    ****        ****   ****       ****       ****       ****      *********         ********* *****    ****     ****************************        ****************            **********  ****  ******         *********** ****  ****        ****       *****            ***         ****
             ****               **************************       ****  *******  *******      **************     ****     ****************************  **********  ****  ***********     ********    ****    ****  **************      ********    ***********************          ***  *******************
             ****               ****                  ****   **************        *******   ****    *****      ****                                   ******      ****       *****      ****        ****           ***                 ******    ****************     *****       ****  *******************
             ***                                                 *                     *              **         **                                                ****                  ****         ***                                                               **          ***

I think first output line should be fixed.

That was just from pasting into the editor, fixed in edit

That's 261 characters, by my count...

@Doorknob i posted the minified count, changed in update

You can remove the var statements from the for loops and you can replace (if you want) "*" with a number.

Java, 267 260 characters
Alright, I guess my solution is not all that different from Johannes Kuhn's answer, but as it seems this is a problem that can be handled nicely in Java; my solution is not much longer; and the output is slightly different, I'll post it nevertheless:
class A{public static void main(String[]a){java.awt.image.BufferedImage b=new java.awt.image.BufferedImage(130,16,2);b.createGraphics().drawString("本田技研工業株式会社",0,13);for(int y=0;y<2080;System.out.print((b.getRGB(y%130,y/130)<0?"#":" ")+(++y%130<1?"\n":"")));}}

Formatted as:
class A {
    public static void main(String[]a) {
        java.awt.image.BufferedImage b = new java.awt.image.BufferedImage(130, 16, 2);
        b.createGraphics().drawString("本田技研工業株式会社", 0, 13);
        for (int y = 0; y < 2080; System.out
                .print((b.getRGB(y % 130, y / 130) < 0 ? "#" : " ")
                        + (++y % 130 < 1 ? "\n" : "")))
            ;
    }
}

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

@Bakuriu Use a different font. @ memo: you can save 6 characters by NOT importing. (importing costs 36 chars, using the full qualified name costs 15 chars for each use).

@Johannes Kuhn: You are absolutely right. I've updated the answer accordingly, and also found another redundant blank in the array declaration.


text:
Make a JavaScript/jQuery slideshow
I am working on making a minimalistic personal testing website to conduct various experiments for my role at work. I'd like to add a couple of bells and whistles to it, particularly a slideshow that cycles between several images. I could just as easily grab a plug-in, but I'd like to promote this Stack Exchange beta site and offer a simple challenge with concrete rules.
Rules:

JavaScript and jQuery are allowed. The jQuery library is assumed to be included.
The function of the code is to take three images and fade-cycle through each of them at regular intervals of five seconds indefinitely. Fade time is one second.
Must be compatible with Internet Explorer 9 (and later), Chrome, and Firefox.
The code golf submission is the total number of characters between the inline script. Characters in externally referenced files are also included.

HTML is the following, pretty-printed as it's not part of the challenge:

    <title>JS Slideshow code golf</title>

Full attribution will be given to the author on any code I end up using.

is the size of HTML counted? Or, are we even forced to create the respective elements from code starting from only an element with a known ID somewhere in the document? How much may we assume about the HTML?

Excellent clarification. You can assume basic HTML markup is already there, such as the image tags and any necessary div tags to support the code.

If HTML is free, exactly how much can I put in there? Can I just do eval($("i").data("c"))? If not, why?

Another question: are we allowed to use ES6, which Chrome does not yet support, or we need to support all modern browsers? What about IE?

Thanks Jan for the additional specifications. I've included an HTML template and exactly what qualifies as a submission.

Please use the sandbox the next time. You're making significant changes to the question. That's bad.

umm... is the CSS really a part of the challenge? I don't think there's much to come up with. Also, adding CSS styles  is not normally what you do from javascript. If CSS needs to be added from javascript, do you mind a flash of unstyled content? If you do, we need to create style elements in code. Not a nice thing to want from us.

70 68(JS) + 22(CSS) characters
setInterval('$(".s").append($(".s :first").hide().fadeIn(1e3))',5e3)

CSS:
img{position:absolute}

jsfiddle: http://jsfiddle.net/QACAY/
pure jQuery. The only browser-stuff is setInterval, which dates as far back as IE4. jQuery support doesn't reach that far. Javascript syntax here is ancient as well.
Of course, in practice, do not pass strings to setInterval! It is ten characters shorter (fewer with es6 arrow functions), but it's unreadable (madness? This is code golf!), it forces you into the global scope (which we don't mind here), it's slower (but we are far from being concerned with performance of calling jQuery code) and it won't pass any decent code review.
Works best if all images have the same shape. But, it will work just as fine with semitransparent images as long as visible stacking counts as fine and no more background is visible when any single image is removed.
Since this does not wait for DOM ready, there's a tiny chance that only some of the image elements inside a gallery are loaded when an interval fires. In this case, the stack of images will get reordered. I don't think it's a problem. In fact, I kinda like it.
After slight tweaking, it looks like code that could easily pass through a code review and get into production (also, be sure to modify the CSS to not be too aggressive):
$(function(){
  $(".s").each(function(_, s){
    setInterval(function(){
      $(":first", s).hide().appendTo(s).fadeIn(1000);
    }, 5000);
  });
});

Can you use 1e3 and 5e3?

I think :first could be :eq()


text:
Do not use the same code again
I want to give a task. The main rule is not to use the same code again, it means no loops, no jumps, no goto, no recursion, if you declare procedure it can be called only once and etc. Also if you call some standart function it should meet the requirements inside.
The main point of this task is to write the shorter code which prints the longest output.
NOTE: printing functions, for example printf probably do not meat requirements but it is allowed to use this kind of functions.
EDIT: after reading some comments I have to tell that output needs to be longer then input. Also you cannot use the same function twice because it means you are using the same code, sorry for not very clear requirements.

This seems to be asking for code which produces output longer than itself with no looping of any kind, even if hidden. This is simply impossible, so it's not at all clear what you're asking for.

can we use string concatentaion? Also, what's the primary objective winning criterion? Code length with output having to be longer than input? output/input length ratio?

After the edit - does my golfscript solution (1 character) qualify?

@JanDvorak I'm not into golfscript but I think version 1->2 meets requirements, but the way you got n->2^n doesn't meet requirements.

@ST3 does my C++ solution qualify? But if the focus is on code length rather than output length, then the golfscript solution - if it qualifies - is better anyways.

javascript alert(Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()+''+Math.random()) - cant put a answer b/c this is on hold.

@tryingToGetProgrammingStraight it would illegal answer anyway, because you call random more then once

@ST3 would outputting a error count? if so a = ReferenceError: a is not defined [Break On This Error] a

@tryingToGetProgrammingStraight that would count, it is output anyway.

Python: 11 characters → 857 characters
import this

Sample run:
>>> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Or I could write python -c 'import sys;help(sys)': 20 → 12106 characters. But then someone would come up with man zshall: 10 → 1668174 characters. (Or man -t zshall: 13 → 2224815 characters.) So we better skip displaying documentations.

Golfscript, 1 -> 2
`

if the requirement is to produce the shortest code with an output longer than input, this is the winner (unless we count error messages of languages where an empty source is invalid program). Backtick means "inspect/uneval". Since the empty string (input) happens to be already present on the stack, this produces a string containing only two double quotes, which is then printed out.
C++, 22 -> 2^31-1 (= 2147483647)
printf("%*i",~0u>>1,0)

It's hard to argue that string concatenation or infinite precision arithmetic doesn't loop internally. In such case, we are restricted to built-in finite precision data types. However, the best place for a large value is the output precision, not the value to be printed. In C++, the variable precision type is int, so we can print with no more than 2^31-1 digits of precision. Sure, the printing routine will loop a bit, but printing routines are allowed to. But, if built in operators (but not library functions) are allowed to loop as well,
J, (extreme growth)
!9
!!9
!!!9
!!!!9

the factorial of an n-digit number has in the order of e^n digits for some small e. This means the sequence factorial of (factorial of(factorial of ... (factorial of 9) ...))) grows very quickly.
It's unclear what "same code twice" exactly means, but I'll assume that two invocations of the same system function are allowed as long as the function itself is allowed. "if you declare procedure it can be called only once"
Of course, if function exponentiation doesn't count as iteration, we can grow much more quickly than that:
!^:(!^:]9)9

this will apply factorial to nine nine times, then use that as the number of applications of factorial to (another) nine. Of course, these can be nested ad lib. Say, we could take the factorial of !^:9]9 !^:9]9 times. We'll also shorten !^:9]9 to just !^:]9.
!^:]!^:]9

Ninth composition of !^:] can be shortened to !^:]^:9. The argument'th composition is !^:]^:]. Unfortunately, function power cannot be applied to conjunctions like function power, so let's stop here for now (arg compositions of (arg compositions of (arg compositions of ... factorial))):
!^:]^:]^:]^:]

We could apply "eval" here, but we're way so far off the realm of definitely not iterating I better stop here and not get to stuff like string multiplication and evaluation in order to crank up this immense number even higher.
Golfscrcript, n -> theta(2^n)
````````````...

Languages without built-in infinite precision arithmetic can still achieve exponential growth via string concatenation (twofold increase in two characters). Or, we could inspect the inspection of the inspection of ... yielding twofold increase in just a single char.

Even better. Use the empty program in GolfScript which will give you a newline. This is a growth factor of 1/0. ;-)

@Howard why so? I don't see that in the spec, is that an interpreter feature?

It's not explicitely in the spec, but implementations use puts aka {print n print}:puts;.

My code is: help and it is Windows batch script. Output is:
For more information on a specific command, type HELP command-name
ASSOC          Displays or modifies file extension associations.
ATTRIB         Displays or changes file attributes.
BREAK          Sets or clears extended CTRL+C checking.
BCDEDIT        Sets properties in boot database to control boot loading.
CACLS          Displays or modifies access control lists (ACLs) of files.
CALL           Calls one batch program from another.
CD             Displays the name of or changes the current directory.
CHCP           Displays or sets the active code page number.
CHDIR          Displays the name of or changes the current directory.
CHKDSK         Checks a disk and displays a status report.
CHKNTFS        Displays or modifies the checking of disk at boot time.
CLS            Clears the screen.
CMD            Starts a new instance of the Windows command interpreter.
COLOR          Sets the default console foreground and background colors.
COMP           Compares the contents of two files or sets of files.
COMPACT        Displays or alters the compression of files on NTFS partitions.
CONVERT        Converts FAT volumes to NTFS.  You cannot convert the
               current drive.
COPY           Copies one or more files to another location.
DATE           Displays or sets the date.
DEL            Deletes one or more files.
DIR            Displays a list of files and subdirectories in a directory.
DISKCOMP       Compares the contents of two floppy disks.
DISKCOPY       Copies the contents of one floppy disk to another.
DISKPART       Displays or configures Disk Partition properties.
DOSKEY         Edits command lines, recalls Windows commands, and
               creates macros.
DRIVERQUERY    Displays current device driver status and properties.
ECHO           Displays messages, or turns command echoing on or off.
ENDLOCAL       Ends localization of environment changes in a batch file.
ERASE          Deletes one or more files.
EXIT           Quits the CMD.EXE program (command interpreter).
FC             Compares two files or sets of files, and displays the
               differences between them.
FIND           Searches for a text string in a file or files.
FINDSTR        Searches for strings in files.
FOR            Runs a specified command for each file in a set of files.
FORMAT         Formats a disk for use with Windows.
FSUTIL         Displays or configures the file system properties.
FTYPE          Displays or modifies file types used in file extension
               associations.
GOTO           Directs the Windows command interpreter to a labeled line in
               a batch program.
GPRESULT       Displays Group Policy information for machine or user.
GRAFTABL       Enables Windows to display an extended character set in
               graphics mode.
HELP           Provides Help information for Windows commands.
ICACLS         Display, modify, backup, or restore ACLs for files and
               directories.
IF             Performs conditional processing in batch programs.
LABEL          Creates, changes, or deletes the volume label of a disk.
MD             Creates a directory.
MKDIR          Creates a directory.
MKLINK         Creates Symbolic Links and Hard Links
MODE           Configures a system device.
MORE           Displays output one screen at a time.
MOVE           Moves one or more files from one directory to another
               directory.
OPENFILES      Displays files opened by remote users for a file share.
PATH           Displays or sets a search path for executable files.
PAUSE          Suspends processing of a batch file and displays a message.
POPD           Restores the previous value of the current directory saved by
               PUSHD.
PRINT          Prints a text file.
PROMPT         Changes the Windows command prompt.
PUSHD          Saves the current directory then changes it.
RD             Removes a directory.
RECOVER        Recovers readable information from a bad or defective disk.
REM            Records comments (remarks) in batch files or CONFIG.SYS.
REN            Renames a file or files.
RENAME         Renames a file or files.
REPLACE        Replaces files.
RMDIR          Removes a directory.
ROBOCOPY       Advanced utility to copy files and directory trees
SET            Displays, sets, or removes Windows environment variables.
SETLOCAL       Begins localization of environment changes in a batch file.
SC             Displays or configures services (background processes).
SCHTASKS       Schedules commands and programs to run on a computer.
SHIFT          Shifts the position of replaceable parameters in batch files.
SHUTDOWN       Allows proper local or remote shutdown of machine.
SORT           Sorts input.
START          Starts a separate window to run a specified program or command.
SUBST          Associates a path with a drive letter.
SYSTEMINFO     Displays machine specific properties and configuration.
TASKLIST       Displays all currently running tasks including services.
TASKKILL       Kill or stop a running process or application.
TIME           Displays or sets the system time.
TITLE          Sets the window title for a CMD.EXE session.
TREE           Graphically displays the directory structure of a drive or
               path.
TYPE           Displays the contents of a text file.
VER            Displays the Windows version.
VERIFY         Tells Windows whether to verify that your files are written
               correctly to a disk.
VOL            Displays a disk volume label and serial number.
XCOPY          Copies files and directory trees.
WMIC           Displays WMI information inside interactive command shell.

For more information on tools see the command-line reference in the online help.

I didn't count size of output because it is my own question and I'm not willing to win.

Mathematica
RandomInteger[{10^980, 10^990}]

Ruby, 13 chars, 599994 char output, ~46153:1 ratio
999999**99999

Simply raises a very large number to the power of another very large number. Takes about ten seconds to run. I could increase the numbers, but that would make the running time even longer.

Do you think ** has no jumps, no loops as required? ;-)

@Howard Well by that logic @ manatwork's solution is invalidated since it uses loops behind-the-scenes, the OP's solution is invalidated as help probably uses loops too, and @ David's solution is invalidated because RandomInteger probably uses loops. :P

Of course you're right. Maybe an indication of a not well-formed challenge?

@Howard correct. Yet, for some reason the question didn't manage to get five closevotes yet.