\$\begingroup\$Hello. Let's imagine that your technology is so advanced that it does not support ASCII. Would it be allowed to convert to the native character encoding, or would it have to convert ASCII to the native character encoding? I'm thinking ZX81 here.\$\endgroup\$
– Shaun BebbersApr 16 at 14:50

\$\begingroup\$You could substitute .join"" for *"" to save a few characters. You could also do it with gsub instead of split+map+join, something like: s.gsub(/\w+ ?/){$&.to_i(2).chr} (31 chars).\$\endgroup\$
– Paul PrestidgeJul 27 '14 at 23:41

2

\$\begingroup\$s.gsub(/\d+./){$&.to_i(2).chr} works and it's 30 chars, I have no idea why it works though. The . shouldn't match the last time but it does.\$\endgroup\$
– addisonJul 30 '14 at 4:58

regular expression /\d+./g : one or more digits followed by one different character - the g flag specify to search the pattern more than once

a function, here specified in arrow format, where the argument (x) wil be the found string (the sequence of digits eventually followed by a space) and the value of the function is what is replaced (in this case, the single character from the code).

It's worth noting that the at the end of the string the regexp matches the sequence of digits without a trailing space, in this case the dot matches the last digit. Try '123'.match(/(\d+)./) to verify.

(Still) one of the more verbose pieces of javascript ever...
(Assignment to string s not counted)

\$\begingroup\$The fact it does not use whitespace in the formatting (here's looking at you Python) is a major +1\$\endgroup\$
– PharapJul 27 '14 at 17:08

\$\begingroup\$@Pharap Yeah, one way of looking at Pyth is it's Python with all of the elements that make it take more characters removed, like whitespace, parenthesis, multi-character tokens, etc.\$\endgroup\$
– isaacgJul 27 '14 at 20:37

\$\begingroup\$I don't know Pyth, but would it not save 4 characters to use id2 in place of v+"0b"d? In any case, this is both unreadable and cool.\$\endgroup\$
– DLoscOct 5 '14 at 3:10

\$\begingroup\$@DLosc I added that function to Pyth after this question was asked, in large part due to this question. It would be shorter with present day Pyth, but present day Pyth is not allowed for this challenge.\$\endgroup\$
– isaacgOct 5 '14 at 3:38

\$\begingroup\$I see. I wondered if it might be something like that.\$\endgroup\$
– DLoscOct 5 '14 at 3:40

Explanation

The following layout is used:

+---+---+------+
| x | a | flag |
+---+---+------+

Where x is the ASCII byte to be printed, a is the a character from standard input and flag is 1 if a was a space.

>, Read a character a into the second cell
[ While not EOF:
32- Decrease a by 32 (a -= ' ')
>+< Set the flag to 1
[ If a was not a space:
16- Decrease by 16 more ('0' == 32+16)
<[>++<-] a += 2*x
>[<+>-] Move it back (x = a)
>-< Reset the flag, it was not a space.
]>
[ If a was a space (flag == 1):
<<.[-] Print and reset x
>>- Reset the flag
]
<, Read the next caracter a
]
<. Print the last character x

QBasic, 103

What? We have no fancy binary-to-decimal functions here. Do it yourself!

I'm counting the newline (which I think is necessary to get the if-then-else without an END IF) as one byte, per this meta post. I don't know whether QB64 on Windows would accept a code file that way or not. Probably doesn't much matter.

JavaScript 111

This does the number conversion without parseInt or eval. Reading the string backwards and counting bits it set's bit x if it's a one. When a space is found a the number is converted to a char and a new 0 number is started for setting bits.

map(chr.foldl1((+).(*2)).map digitToInt)$words s
$words s -- split s on spaces into a list
map digitToInt -- convert each digit in input string to int
((+).(*2)) -- a function that multiplies its first
-- argument by 2, then adds the second argument
foldl1((+).(*2)).map digitToInt -- fold the above over the list of ints:
-- in other words this is a function that reads strings as binary and gives the value as int
(chr.foldl1((+).(*2)).map digitToInt) -- cast to character
map(chr.foldl1((+).(*2)).map digitToInt)$words s -- map our function over the list of words

\$\begingroup\$Hopefully I've followed scoring conventions correctly regarding imports. Feel free to edit in a correction if I haven't. I treated the ":m +Data.Char" needed to import in ghci as 13.\$\endgroup\$
– ballesta25Jul 26 '14 at 2:30

Your Answer

If this is an answer to a challenge…

…Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.

…Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
Explanations of your answer make it more interesting to read and are very much encouraged.

…Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.

More generally…

…Please make sure to answer the question and provide sufficient detail.

…Avoid asking for help, clarification or responding to other answers (use comments instead).

Code Golf Stack Exchange is a site for recreational programming competitions, not general programming questions. Challenges must have an objective scoring criterion, and it is highly recommended to first post proposed challenges in the Sandbox.