text:
Sign that word!
What is a Word Signature?
The signature of a word are all of it's letters put in order - the signatures of this, hist and hits are all hist.
The Challenge
Write a program program should ask for an input, then print out the signature of that word. So an example program run might look like this:
Give me a string: this
The signature signature of 'this' is hist.

There is no required interaction, as long as it takes an input and prints the signature, it is OK.
Scoring
The program with the smallest byte count wins!
Leaderboard
Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
# Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
# Ruby, <s>104</s> <s>101</s> 96 bytes

var QUESTION_ID=54945;function answersUrl(e){return"http://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),e.has_more?getAnswers():process()}})}function shouldHaveHeading(e){var a=!1,r=e.body_markdown.split("\n");try{a|=/^#/.test(e.body_markdown),a|=["-","="].indexOf(r[1][0])>-1,a&=LANGUAGE_REG.test(e.body_markdown)}catch(n){}return a}function shouldHaveScore(e){var a=!1;try{a|=SIZE_REG.test(e.body_markdown.split("\n")[0])}catch(r){}return a}function getAuthorName(e){return e.owner.display_name}function process(){answers=answers.filter(shouldHaveScore).filter(shouldHaveHeading),answers.sort(function(e,a){var r=+(e.body_markdown.split("\n")[0].match(SIZE_REG)||[1/0])[0],n=+(a.body_markdown.split("\n")[0].match(SIZE_REG)||[1/0])[0];return r-n});var e={},a=1,r=null,n=1;answers.forEach(function(s){var t=s.body_markdown.split("\n")[0],o=jQuery("#answer-template").html(),l=(t.match(NUMBER_REG)[0],(t.match(SIZE_REG)||[0])[0]),c=t.match(LANGUAGE_REG)[1],i=getAuthorName(s);l!=r&&(n=a),r=l,++a,o=o.replace("{{PLACE}}",n+".").replace("{{NAME}}",i).replace("{{LANGUAGE}}",c).replace("{{SIZE}}",l).replace("{{LINK}}",s.share_link),o=jQuery(o),jQuery("#answers").append(o),e[c]=e[c]||{lang:c,user:i,size:l,link:s.share_link}});var s=[];for(var t in e)e.hasOwnProperty(t)&&s.push(e[t]);s.sort(function(e,a){return e.lang>a.lang?1:e.lang<a.lang?-1:0});for(var o=0;o<s.length;++o){var l=jQuery("#language-template").html(),t=s[o];l=l.replace("{{LANGUAGE}}",t.lang).replace("{{NAME}}",t.user).replace("{{SIZE}}",t.size).replace("{{LINK}}",t.link),l=jQuery(l),jQuery("#languages").append(l)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",answers=[],page=1;getAnswers();var SIZE_REG=/\d+(?=[^\d&]*(?:<(?:s>[^&]*<\/s>|[^&]+>)[^\d&]*)*$)/,NUMBER_REG=/\d+/,LANGUAGE_REG=/^#*\s*([^,]+)/;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Challenged Finished!
WINNER: jimmy23013

We don't have to print the sentences Give me a string: and The signature signature of 'this' is right? We can just take the input directly and print the result?

Also are inputs consisting only of lowercase characters or can there be uppercase letters?

What about duplicate letters? e.g. is the signature of broom bmoor or bmor?

@Fatalize Yes, there is no required interaction with the user. Just take the input and print the result.

@samgak bmoor. Duplicates are put in.

I'm voting to close this as too broad/trivial.

@isaacg why are you?

This looks essentially like a duplicate of this question.

@Tim I don't think we should have challenges that are this straightforward. I'll ask about it on meta - it's not really about this question in particular.

Well, I'm a few hours late, and every competitive language I know has already been done. :/

I think this would have been a more interesting challenge if you couldn't use built-in sorting functions.

@GlenO, or duplicate letters and multicase need to be supported.

@JamesWebster Duplicate letters do.

These suggestions will be addressed in Sign that word 2, being posted soon. That one will have a stricter set of rules.

Added second edition. http://codegolf.stackexchange.com/questions/55090/sign-that-word-2 Not a duplicate because the answers from this question are not transposable to that one.

GolfScript, 1 byte
$

Yes, only 1 byte.
Try it here.

Marked as correct because no-one can beat 1 byte.

@Kslkgh In theory, maybe someone can find a language that can do it in 0 bytes?

OK then, fair enough, will mark as correct in 1 week!

SERIOUSLY?!    _____

I would say that this fails for "Hello"

Seems to break for anything with a capital, but guess it was never specified

Capitals don't break the code.  It first sorts capitals then lowercase.  i.e. cbaCBAfed -> ABCabcdef

Congratulations to @jimmy23013, you win!

C (with x86), 61 bytes
s[];main(){qsort(s,read(0,s,99),1,"YXZQQQ\x8a\x00*\x02\x0f\xbe\xc0\xc3");puts(s);}

That string contains raw bytes, not actual \x.. codes, and it's a raw machine code callback passed to qsort. Works on x86 only:
59         pop   ecx
58         pop   eax
5a         pop   edx
51         push  ecx
51         push  ecx
51         push  ecx
8a 00      mov   al,  BYTE PTR [eax]
2a 02      sub   al,  BYTE PTR [edx]
0f be c0   movsx eax, al
c3         ret

Which is essentially:
int func(char *a, char *b) { return *a - *b; }

See p6-7 of this pamphlet in Japanese by shinh.

This is not generic C language, as it targets a specific architecture. That should be specified in the heading

Stuck, 4 bytes
sc$d

This language was documented on the wiki just yesterday! Mmm, fresh esolangs.

Nicely done! :)

Stuck, 5 Bytes
I finally get to use my language, Stuck! :D
s$""j

This takes an input via stdin, sorts, joins, and implicitly prints. This did give me some ideas for changes though.
Edit: Oh wow, someone already posted and beat me in my own language!

GOTO++, 432 430 bytes
GOTO++ project site.
niveaugourou 0
s=ENTRETONTEXTE()
§2 a=LeCaracNumero()&s *(1)
n=*(1)
costaud i=*(2)/&i infeg NombreDeLettres(&s)/i=+*(1)
b=LeCaracNumero()&s &i
GOTONULPOURLESNULS %1 }&b inf &a{
a=&b
n=&i
§1 faiblard
GOTOPRINTDUTEXTE()&a
t=PrendsUnMorceau()&s *(0) &n
u=PrendsUnMorceau()&s }&n+*(1){ *(0)
e=BOITEAPINGOUINS()&t &u
s=Marijuana()&e «»
GOTONONNULPOURLESNULS %3 }NombreDeLettres(&s) eg *(1){
GOTOPASMALIN %2
§3 GOTOPRINTDUTEXTE()&s

Not sure why I inflicted this to myself, but I did

gs2, 1 byte
/

Same as the GolfScript answer, but gs2 uses a different operator for sorting.

Perl, 18 bytes
print sort<>=~/./g

Thanks to Dom Hastings for helping me save 3 bytes.

you can save a few bytes using a /./g instead of split'',: print sort<>=~/./g!

With -nE, you can do say sort/./g.

Haskell, 35 bytes
import Data.List;main=interact sort

C#, 114 110 characters
Takes input from a command line argument. Not a very short program, but well... it's C#. :P
namespace System.Linq{class P{static void Main(string[]a){Console.Write(string.Concat(a[0].OrderBy(x=>x)));}}}

Thanks to Abbas for saving 4 bytes!

You can save 4 chars by using Write instead of WriteLine. ;)

@Abbas Thanks! Totally missed that one ;p

Pyth, 2 bytes
Sw

DEMO HERE.
Details-
S - for sorting
w - Python 3's input()

J, 3 bytes
/:~

For example: /:~'this'

Brainfuck, 40 bytes
,[>>+>>,]<<[[<<]>>[-[<]>>[.<<->]>+>>]<<]

This uses the counting sort algorithm, which makes this an O(n) solution.
The code requires a left-infinite or wrapping tape of 8 bit cells. Try it online!
How it works
,          Read a char from STDIN.
[          While the byte under the pointer (last read char) is non-zero:
  >>+        Move the pointer two steps to the right and increment.
  >>,        Move the pointer two steps to the right and read a char.
]
<<         Move the pointer two steps to the left.

           If the input was "sort", the tape now contains the following:
           0 0 115 0 1 0 111 0 1 0 114 0 1 0 116 0 1 0 0
                                                   ^

[          While the byte under the pointer is non-zero:
  [<<]       Advance two steps to the left until a null byte is encountered.
  >>         Advance two steps to the right.

             This will place the pointer on the first input character.

  [          While the byte under the pointer is non-zero:
    -          Decrement.
    [<]        Move the pointer to the left until a null byte is encountered.
    >>         Move the pointer two steps to the right.

               If the decremented character is non-zero, [<] will move to the
               null byte before it, so >> brings the pointer to the null byte
               after it. If the decremented character is zero, [<] is a no-op, so
               >> advances two steps to the right, to a non-zero byte.

    [          While the byte under the pointer is non-zero:
      .          Print the char under the pointer.
      <<-        Move the pointer two steps to the left and decrement.
      >          Move the pointer to the right.
    ]

               If the decremented character gave zero, this will print the value
               of the accumulator after it, and decrement the character once more
               to make it non-zero, then place the pointer to the right of the
               character, thus exiting the loop.

    >+         Move the pointer to the right and increment.

               This increments the accumulator each time an input character is
               decremented.

    >>         Move the pointer two steps to the right.

               This moves the pointer to the next character.
  ]
  <<         Move the pointer two steps to the left.

             This moves the pointer to the accumulator of the last character.
]

             After 255, th accumulator wraps around to 0, and the loop ends.

CJam, 2 bytes
l$

Reads a line of input (l) and sorts it ($).

Coreutils, 24 23
fold -w1|sort|tr -d \\n

Python 3, 31 Bytes
print("".join(sorted(input())))

That looks like 29 bytes to me

@muddyfish it's 31 chars, when I counted :)

Ruby, 17 bytes
$><<$<.chars.sort

Java 8, 119 bytes
This is basically only competitive with the C# answer, because, well, Java.
(At least this beats GOTO++. Not really an accomplishment...)
class C{public static void main(String[]s){s=s[0].split("");java.util.Arrays.sort(s);System.out.print("".join("",s));}}

Thanks to ProgramFOX for saving 1 byte, rink.attendant for saving 2 bytes.

You can save one char by removing the space between String[] and s.

Oh, I forgot about that. Now my byte count is a nice square number. Thanks!

I think you can use System.out.print instead of println

Thank you! This is my first attempt at code golf, so I still have to learn stuff like that.

You could save 12 characters with public static void main(String[]s){s[0].chars().sorted().forEach(i->System.out.print((char)i));}

Ostrich, 2 bytes
G$

In Ostrich G reads a line of input from STDIN and $ sorts it.

JavaScript (ES6), 32 bytes
Demo only works in Firefox and Edge at time of writing, as Chrome/Opera does not support ES6 by default:
Edit: I didn't look at the answers prior to posting but now I realize it's pretty much the exact same as the one by NinjaBearMonkey.

f=x=>alert([...x].sort().join``)
<form action=# onsubmit='f(document.getElementById("I").value);return false;'>
  <input type=text pattern=\w+ id=I>
  <button type=submit>Sort letters</button>
</form>

Julia, 21 bytes
s->join(sort([s...]))

And for fun, here's how you might do it without using an inbuilt sorting function, for 53 bytes:
f=s->s>""?(k=indmax(s);f(s[k+1:end]s[1:k-1])s[k:k]):s

SWI-Prolog, 34 bytes
a(X):-msort(X,Y),writef("%s",[Y]).

Called as such:a(`this`).

Scala, 21 bytes
print(args(0).sorted)

run from command line example:
$ scala -e "print(args(0).sorted)" this
hist

Powershell, 44 37 Bytes
-join((Read-Host).ToCharArray()|sort)

also +1 for powershell use, but i beatcha :)

JavaScript, 34 bytes
alert([...prompt()].sort().join``)

The reason this is so long is that JavaScript can only sort arrays, so the string must be split into an array, sorted, and then joined back into a string. This is ECMAScript 6; the equivalent in ES5 is:
alert(prompt().split('').sort().join(''))

Should specify EcmaScript 6 as it's using ... and template strings

@edc65 You're right, I forgot. Done.

Python 2, 33 32 bytes
print`sorted(raw_input())`[2::5]

Heavily inspired by @Kamehameha's answer. Converted to python 2. Can't golf much more.

You can use repr to bring it down another byte (Now you know why I chose Python 3 version of the solution :P) - print\sorted(raw_input())`[2::5]` (Those are backticks, not single quotes)

APL, 7 characters
Doesn't work on ngn-apl for me, but should work in theory:
X[⍋X←⍞]

⍞ reads a line from standard input, which is assigned to X. ⍋X is the indices of X which yield an ascending order, and X[...] actually sorts X by these indices.

Works on Dyalog (desktop version, not TryAPL).

JavaScript, 54 bytes
call js file with node
console.log(process.argv[2].split('').sort().join(''))

Nim, 102 101 79 73 bytes
let s=stdin.readAll
for i in 1..'~':
 for j in s:(if i==j:stdout.write j)

Still learning Nim and working out golf tricks. Apparently it's better not to use the builtin sort, which would require a lot of imports (thanks @Mauris)

let s=stdin.readAll;for i in 1..'~':(for j in s:(if i==j:echo j)) is 65 bytes.

@Mauris Wow, I didn't think that not using the builtin sort would be shorter! Only problem though - is there a way to echo without the trailing newline?

Oh, oops, of course. stdout.write j seems to work, and is slightly shorter than your &= loop.

@Mauris Indeed, it seems to work - thanks :)

Matlab, 13 5 bytes
The code simply defines a function handle to the sort function:
@sort

To call it, use ans('this'), where 'this' represents the input string (thanks to Alex A. and Stewie Griffin):
>> @sort
ans =
    @sort
>> ans('this')
ans =
hist

Gotta love f('this'). I don't think you need to count the name of the function in your byte count though, since unnamed functions are generally acceptable.

@AlexA Thanks! But if I define the function without the function handle f , i.e. just @(x)sort(x), then the call can't (obviously) be f('this'). It needs to be the uglier and cumbersome feval(@(x)sort(x),'this'). Do you think that would be acceptable?

Yep, that's very common. Often folks just say, "to call the function give it a name."

I don't like this at all, but you can actually do: @(x)sort(x), and then ans('this'). I guess you don't need to count the bytes for ans..? Obviously this only works one time, but nothing in the rules prevent this. Also, I would claim sort('this') should suffice, seeing that everyone else just uses the built in sort functions without giving it a different name first.

@StewieGriffin Hey, good idea to use ans! I agree it's ugly, but the very purpose of code golf is to abuse language. As for your second proposal, I wouldn't know how many bytes to count then :-)

Processing, 40 bytes
print(join(sort(args[0].split("")),""));

jq, 20 bytes
explode|sort|implode

try it here

PowerShell, 27 bytes
%{([char[]]$_|sort)-join''}

Nicely done with taking pipeline input.

PHP, 47 bytes
$a=str_split($argv[1]);asort($a);echo join($a);

C++, 135 bytes
#include <iostream>
#include <string>
#include <algorithm>
main(){std::string s;std::cin>>s;std::sort(s.begin(),s.end());std::cout<<s;}

http://coliru.stacked-crooked.com/a/7c9d5c37c2783a23
I payed for what I used :P

The downvote wasn't mine, but it may have something to do with this not being valid C++ because main() must have an int return

@Tas The question doesn't specify that it must be strictly valid code. If it works, it works.

payed paid...

pb (INVALID), 179 bytes
^w[B!0]{w[B!0]{>}<t[B]^b[T]vb[0]<[X]<vb[B+1]^>}^w[B!0]{w[B!0]{>}<t[B]b[0]<[X]v[T+2]w[B!0]{>}b[T]<[X]^[Y+2]}vv<w[B!0]{>vw[B=0]{v}w[B!0]{>}<t[B]b[0]^[Y]<[X]w[B!0]{>}b[T]<[X]<b[B-1]}

Answers on this site are only considered valid if the language they're written in was available (e.g. there was an interpreter) at the time the question was posted. I didn't finish pb's interpreter until the day after, so this answer is just for fun and is ineligible to win (not that it was going to). That's also why I formatted the header of this answer incorrectly; I don't want to show up in the leaderboard snippet :)
Here's the code with comments, though I'm not sure they'll be helpful to anyone trying to decipher this. I just wrote them to keep my thoughts straight while writing the program, so they're kind of redundant and all over the place.
^w[B!0]{                     # while there's something at (0, -1)
    w[B!0]{>}<t[B]^b[T]vb[0] # move last byte of input up by 1
    <[X]<v                   # go to (-1, 0)
    b[B+1]                   # increase by 1
    ^>}                      # restart loop
^w[B!0]{                     # while there's something at (0, -2)
    w[B!0]{>}<t[B]b[0]       # save last byte of input and erase it
    <[X]                     # go to (0, -2)
    v[T+2]                   # go down T+2
    w[B!0]{>}b[T]            # go right until there's nothing there. write T
    <[X]^[Y+2]}              # restart loop
vv<w[B!0]{                   # while there's something at (-1, 0)
    >vw[B=0]{v}              # go down the X=0 column until you find something
    w[B!0]{>}<t[B]b[0]       # save the rightmost thing and erase it
    ^[Y]<[X]w[B!0]{>}b[T]    # add the thing you got to Y=0, to be outputted
    <[X]>,----------]<<[[<<]>>>>[[<<[[-<+>]>>>+<<<]<[->+<]>>>>[-<-<+<->>>>>+<<]>>-[+<<<[-<<+>>]>>>]<<<]<[-<+>>+<]>>>]<<.[-]<<]

Explanation:
Program loads whole line and performs bubble sort. After each sort iteration prints and removes last character. It's always the smallest one, because bubble sort guarantees, that after every iteration the lowest value is in the end. Stops after removal of all characters.
#read line
----------[++++++++++>>,----------]<<

#MEMORY MODEL OF WHOLE PROGRAM:
# 0|0|?|0|?|0|?|0|?|0|0
#     C   C   C   C
# C-character from input

#iterate if there are characters
[
    #go to first letter
    [<<]>>

    #MEMORY MODEL OF TWO SORTED CHARACTERS:
    # 0|?|0|?|0|?|0|?
    # S L M R F   G
    # S - swap of left during left 0 check
    # L - left character
    # M - middle, difference between left and right
    # R - right character
    # F - flag, set if left was not 0
    # G - next flag, set if left was 0

    #sort two characters if there are at least two
    >>[
        #while right is not 0
        [
            #if left is not 0
            <<[[-<+>]
                #set flag
                >>>+<<<
            #clean up after left's 0 check
            ]<[->+<]>

            #if flag is set, so left is not 0
            >>>[-
                #move 1 from left and right to the middle
                <-<+<->>>
                #set next flag
                >>+<<
            ]

            #if next flag is not set, so left was 0
            >>-[+
                #transfer right to left
                <<<[-<<+>>]>>>
            ]

        #while right is not 0
        <<<]

        #distribute middle to left and right
        <[-<+>>+<]>

    #end if it was the last character
    >>]
    #write and clear last character
    <<.[-]
#end if no more characters
<<]

05AB1E, 1 byte
{

Try it online or verify a few more test cases.
Also works in 05AB1E (legacy) or 2sable, which are older versions of 05AB1E.
Explanation:
{  # Sort the characters of the (implicit) input-string
   # (after which the result is output implicitly)

Idris, 46 bytes
main:IO();main=putStr$pack$sort$unpack!getLine

Lua, 79 bytes
t=table for c in({...})[1]:gmatch"."do t:insert(c)end t:sort()print(t:concat())

Obviously, I could save a few bytes if the string was already in a variable (say, s):
t=table for c in s:gmatch"."do t:insert(c)end t:sort()print(t:concat())

64 bytes: s=io.read()t={s:byte(1,-1)}table.sort(t)print(s.char(unpack(t)))

64 is probably the minimum, too.

Bash + coreutils (49 bytes)
Bash was not yet submitted, here is a script (needs to be in a file, as it recurses):
[ $1 ]&&(echo ${1::1};$0 ${1:1})|sort|tr -d '\n'

I just recursively output head, call the script with the tail of the word in order to  split the input word ($1) to single chars and then use sort util.
However I believe a shorter solution using bash+coreutils exists... Any ideas?

Lua, 91 bytes
a=table t={}for c in arg[1]:gmatch(".") do t[#t+1]=c end a.sort(t)print(a.concat(t))

Lua has no string sort function or split/explode function, so it was a struggle

Clojure, 35 Bytes
(print(apply str(sort(read-line))))

This will prompt the user for input, sort the characters, rejoin them back into a string and print it.
However, we can make it 3 bytes smaller if we allow the result to include quotations:
(pr(apply str(sort(read-line))))

pr is a debugging tool that prints the object it's given rather than its contents, so instead of showing hist in the console, it will show "hist".

C++, 101 Bytes
#include<bits/stdc++.h>
using namespace std;main(){string s;cin>>s;sort(s.begin(),s.end());cout<<s;}

Thunno, 2 bytes
z:

Attempt This Online!
Output as a list of characters. Add the J flag if you want a string.

Thunno 2, 1 byte
Ṡ

Try it online!
Built-in for "sort".


text:
Convert a Point of the Compass to Degrees
I came up with this challenge independently, but it turns out to be the inverse to this challenge by Doorknob. As I really like his spec, I decided to steal large parts of it instead of cooking up my own explanations.
The Challenge
Given the abbreviation of one of the 32 points on the compass, print the corresponding degrees. Feel free to skip ahead to the table below if you're not interested in an explanation of the 32 points.
Here is the full compass:

By Denelson83 (Own work) [GFDL or CC-BY-SA-3.0], via Wikimedia Commons
Each direction is 11.25 (360 / 32) degrees farther than the previous. For example, N (north) is 0 degrees, NbE (north by east) is 11.25 degrees, NNE (north-northeast) is 22.5 degrees, etc.
In detail, the names are assigned as follows:

0 degrees is N, 90 degrees is E, 180 degrees is S, and 270 degrees is W. These are called cardinal directions.
The halfway points between the cardinal directions are simply the cardinal directions they're between concatenated. N or S always go first, and W or E always are second. These are called ordinal directions. The ordinal and cardinal directions together form the principal winds.
The halfway points between the principal winds are the directions they're between concatenated. Cardinal directions go first, ordinal second. These are called half winds.
The halfway points between principal and half winds are the adjacent principal wind "by" the closest cardinal direction away from the principal wind. This is denoted with a b. These are called quarter winds.

This results in the following chart:
#   Degrees  Abbrv.  Name
1   0        N       North
2   11.25    NbE     North by east
3   22.5     NNE     North-northeast
4   33.75    NEbN    Northeast by north
5   45       NE      Northeast
6   56.25    NEbE    Northeast by east
7   67.5     ENE     East-northeast
8   78.75    EbN     East by north
9   90       E       East
10  101.25   EbS     East by south
11  112.5    ESE     East-southeast
12  123.75   SEbE    Southeast by east
13  135      SE      Southeast
14  146.25   SEbS    Southeast by south
15  157.5    SSE     South-southeast
16  168.75   SbE     South by east
17  180      S       South
18  191.25   SbW     South by west
19  202.5    SSW     South-southwest
20  213.75   SWbS    Southwest by south
21  225      SW      Southwest
22  236.25   SWbW    Southwest by west
23  247.5    WSW     West-southwest
24  258.75   WbS     West by south
25  270      W       West
26  281.25   WbN     West by north
27  292.5    WNW     West-northwest
28  303.75   NWbW    Northwest by west
29  315      NW      Northwest
30  326.25   NWbN    Northwest by north
31  337.5    NNW     North-northwest
32  348.75   NbW     North by west

Here is a more detailed chart and possibly better explanation of the points of the compass.
Your task is to take as input one of the 32 abbreviations from the third column and output the corresponding degrees in the second column.
You may assume that input will always be exactly one of those 32 strings (and you may optionally but consistently expect a single trailing newline). Output should also be given exactly as listed above, although trailing zeroes are allowed. You may optionally output a single trailing newline.
You may write a program or function, taking input via STDIN (or closest alternative), command-line argument or function argument and outputting the result via STDOUT (or closest alternative), function return value or function (out) parameter.
This is code golf, so the shortest answer (in bytes) wins.

Pyth, 47 bytes
c*45x"NuMD¢¼Ew
XSj.{§/gWbZ¹°"C%CzC\½4

Hexdump, due to unprintable characters:
0000000: 632a 3435 7822 4e86 754d 0344 a2bc 4504  c*45x"N.uM.D..E.
0000010: 770a 9518 1c58 536a 2e7b a77f 2f67 5762  w....XSj.{../gWb
0000020: 5ab9 15b0 8798 2243 2543 7a43 5cbd 34    Z....."C%CzC\.4

Test harness
Due to a bug in the official command line compiler, this code only works via the online compiler, linked above, or the -c flag of the offline compiler. (The bug was fixed after the question was asked.)
This solution is very similar to @Dennis's CJam answer, using the process of hashing the input, looking up the result in a 32 byte lookup string, and then multiplying by 11.25.
The hash function I use is converting the input to a string as if it was a base 256 integer with C, taking the result modulo C of ½, which is 189, but saves a byte due to superior parsing, and converting that back to a string with C again.
Multiplying by 11.25 is accomplished by multiplying by 45, then dividing by 4, which saves a byte.

Ruby, 118 106
Thanks to Martin Büttner for 12 bytes saved.
This is currently the same length regardless of whether it's a function or a program.
lambda function
->s{n=4
d=0,0
s.chars{|e|c="SWNE".index e
c ?d[c%2]+=c/2*2*n-n :n=1}
(Complex(*d).arg*5.1).round%32*11.25}

program
n=4
d=0,0
gets.chars{|e|c="SWNE".index e
c ?d[c%2]+=c/2*2*n-n :n=1}
p (Complex(*d).arg*5.1).round%32*11.25

This is a cartesian walk through the points. The characters NSEW add or subtract 4 from the x and y coordinates stored in d[]. After a b (or any symbol other than NSEW) is encountered, this is reduced to 1.
The x and y data is then treated as a complex number to extract the angular argument. This is multiplied by 16/PI=5.1 . Although there are some geometrical errors in the approach, rounding this angle is sufficient to give the correct number -15..+16. Modulo is used to correct this to 0..31 (in Ruby % always returns positive.) Finally the result is multiplied by 11.25.

What a clever idea with rounding! You get the arctan of the angle instead of the angle, taken relative to the nearest orthogonal direction, but that turns out close enough.

@xnor without the rounding I get NbE  14.05 (+2.8), NNE 26.60 (+4.1), NEbE 51.41 (-4.84) so I had some leeway with the values of n but I did have to choose them carefully.

Javascript (ES6), 153 bytes
Just wanted to get the ball rolling with a simple one.
x=>'N NbE NNE NEbN NE NEbE ENE EbN E EbS ESE SEbE SE SEbS SSE SbE S SbW SSW SWbS SW SWbW WSW WbS W WbN WNW NWbW NW NWbN NNW NbW'.split` `.indexOf(x)*45/4

Not particularly innovative, but it works, and perhaps there's some tips that could be derived from it. Don't worry, I'll think of another (hopefully better) technique.

Perhaps you can compress the string?

Amazingly, it's still shorter than my (not submitted) solution in Python, which uses algorithmical approach.

CJam, 49 bytes
0000000: 72 34 62 32 35 33 25 63 22 4e bf 6f f1 80 e8 dc 38  r4b253%c"N.o....8
0000011: 45 3d f0 2e 94 3c d3 12 53 24 e5 5f a6 63 28 60 57  E=...<..S$._.c(`W
0000022: 5b 14 20 92 17 81 d1 22 23 31 31 2e 32 35 2a        [. ...."#11.25*

The above is a hexdump, which can be reversed with xxd -r -c 17 -g 1.
Try it online in the CJam interpreter.
How it works
r      e# Read a token from STDIN.
4b     e# Convert the string (array of code points) from base 4 to integer.
253%   e# Take the result modulo 253.
c      e# Cast to character.
"…"    e# Push a 32 byte lookup table.
#      e# Find the index of the character.
11.25* e# Multiply the index by 11.25.

Haskell, 206 bytes
c l=11.25*(fromIntegral$b$l)
b l|(p y l)<0=a l+16|0<1=mod(a l)32
a l=round$(16/pi*)$atan$d$l
d l=p x l/p y l
p z[]=0.0
p z('b':[r])=z r/4
p z(a:r)=z a+p z r
x 'E'=4
x 'W'=(-4)
x c=0
y 'N'=4
y 'S'=(-4)
y c=0

Convenient test:
*Main> map c ["N","NbE","NNE","NEbN","NE","NEbE","ENE","EbN","E","EbS","ESE","SEbE","SE","SEbS","SSE","SbE","S","SbW","SSW","SWbS","SW","SWbW","WSW","WbS","W","WbN","WNW","NWbW","NW","NWbN","NNW","NbW"]
[0.0,11.25,22.5,33.75,45.0,56.25,67.5,78.75,90.0,101.25,112.5,123.75,135.0,146.25,157.5,168.75,180.0,191.25,202.5,213.75,225.0,236.25,247.5,258.75,270.0,281.25,292.5,303.75,315.0,326.25,337.5,348.75]

Java, 653 (characters)
I know Java can't win but I like to make the effort anyway.
class C{float c=1/8f;int n=0;float a;public C(String s){if(s.contains("W"))n=4;switch(s.length()){case 1:p(d(s));case 2:p(e(s));case 3:if(s.contains("b"))f(s,1);g(s);}f(s,2);}int v(char x){switch(x){case 'N':return n;case 'E':return 1;case 'S':return 2;}return 3;}int d(String s){return v(s.charAt(0));}float e(String s){return (v(s.charAt(0))+v(s.charAt(1)))/2f;}void f(String s,int i){if(i<2)a=v(s.charAt(0));else a=e(s.substring(0,i));if(v(s.charAt(1+i))<a)c=-c;p(a+c);}void g(String s){p((d(s.substring(0,1))+e(s.substring(1)))/2f);}void p(float x){System.out.printf("%.2f",x*90);System.exit(0);}public static void main(String[]r){C c=new C(r[0]);}}

It takes input from the commandline and outputs to the console.
Ungolfed version:
class Compass
{
    float c = 1/8f;
    int n = 0;
    float a;

    public Compass( String s )
    {
        if( s.contains( "W" ) )
        {
            n = 4;
        }
        switch( s.length() )
        {
            case 1:
                print( parse1( s ) );
            case 2:
                print( parse2( s ) );
            case 3:
                if( s.contains( "b" ) )
                {
                    parse3b4( s , 1 );
                }
                parse3( s );
        }
        parse3b4( s , 2 );
    }

    int getValue( char x )
    {
        switch( x )
        {
            case 'N':
                return n;
            case 'E':
                return 1;
            case 'S':
                return 2;
        }
        return 3;
    }

    int parse1( String s )
    {
        return getValue( s.charAt( 0 ) );
    }

    float parse2( String s )
    {
        return ( getValue( s.charAt( 0 ) ) + getValue( s.charAt( 1 ) ) ) / 2f;
    }

    void parse3b4( String s , int i )
    {
        if( i < 2 ) a = getValue( s.charAt( 0 ) );
        else a = parse2( s.substring( 0 , i ) );
        if( getValue( s.charAt( 1 + i ) ) < a )
        {
            c = -c;
        }
        print( a + c );
    }

    void parse3( String s )
    {
        print( ( parse1( s.substring( 0 , 1 ) ) + parse2( s.substring( 1 ) ) ) / 2f );
    }

    void print( float x )
    {
        System.out.printf( "%.2f" , x * 90 );
        System.exit( 0 );
    }

    public static void main( String[] args )
    {
        Compass compass = new Compass( args[ 0 ] );
    }
}

It works by assigning 0-3 to N-W (or 4 for N if W is involved).
It recognizes 4 different situations:

parse1 is for single letter points, it just returns the value.
parse2 is for double letter points, it averages the values of the 2 points.
parse3 is for triple letter points, it takes the average of the average of the double and the single points.
parse3b4 is for all the ones with a 'b' in them, it calculates the value of the point before the 'b' and adds or subtracts 1/8 based on the 'direction' of the point after the 'b'.

In print() the value is multiplied by 90 to get the actual angle.

Is it necessary to write C c=new C(r[0]);? Maybe new C(r[0]); is sufficient?

Python 3, 149 bytes
I tried a recursive algorithmic approach. The quarter winds were harder to handle than I thought at first, so this solution grew relatively long.
def f(s):
 if'W'in s:s=s.replace(*'Nn')
 a=(len(s)-2)/8;return'b'in s and(1-a)*f(s[:-2])+a*f(s[-1])or a>=0and(f(s[0])+f(s[1:]))/2or'NESWn'.find(s)*90

Ungolfed:
def f(s):
    if 'W'in s:
        s = s.replace('N','n')
    a=(len(s)-2)/8
    if 'b' in s:
        a = 1/8 if len(s)==3 else 1/4
        return (1-a)*f(s[:-2])+a*f(s[-1])
    else:
        if len(s)==1:
            return 'NESWn'.find(s)*90
        else:
            return (f(s[0])+f(s[1:]))/2

Golfed version returns a decimal that needs to be multiplied by 10 (f("NbW") returns 34.875 instead of 348.75)

@viktorahlström, are you sure? It returns the correct value for me. Maybe you missed the last zero when copying and pasting the code?

Oh, sorry, apparently it was that - my mistake, sorry!

PowerShell      -          350

Add-Type -AssemblyName *sys*forms*
$f=new-object windows.forms.form
$c=new-object windows.forms.combobox
$c.DataSource=(-split"N NbE NNE NEbN NE NEbE ENE EbN E EbS ESE SEbE SE SEbS SSE SbE S SbW SSW SWbS SW SWbW WSW WbS W WbN WNW NWbW NW NWbN NNW NbW")
$c.Parent=$f
$c.Add_SelectedValueChanged({$f.text=$c.SelectedIndex*11.25})
$f.ShowDialog()

Julia, 151 147 142 bytes
t=strchr
p=s->if ""==s 0;else i=t(s,'b')
(32/2^i)^sign(i)*p(i>0?s[1:i-1]:s[2:])+im^t("ESWN",s[i+1])end
f=s->90int(16mod(angle(p(s)),2pi)/pi)/8

A bit ungolfed:
# return approx. direction in term of complex number of absolute value 1,
# whose argument is the direction:
# N -> 0, E -> 0+1j, S -> -1, W -> 0-1j
function p(s)
    if ""==s 0;
    else
        i=strchr(s,'b');
        if i!=0
            # if 'b' is 2nd in the word, following direction weight is 1/8,
            # if 'b' is 3rd in the word, following direction weight is 1/4.
            weight=2^(5-i)
            # the first term to count avg is all before 'b'
            first_term=s[1:i-1]
        else
            # weights are equal for the counted and the new (eg. 'NNW <= avg(N, NW)')
            weight=1
            # the first term to count avg is all after the first character
            first_term=s[2:]
        end
        # the return value - average of two vectors
        # s[i+1] evaluates to FIRST character if 'b' didn't occur
        # or to the LAST CHARACTER (after 'b') if it did.
        e^(im*angle(weight*p(first_term)+im^t("ESWN",s[i+1])));
    end
end

# ... And the proper function for returning angle
# there are errors (sic!) in the counted direction, but dividing by 11.25,
# rounding and remultiplying by 11.25 filters them out
f=s->int32(mod(angle(p(s)),2pi)/pi*16)*11.25

In the ungolfed code, I count the average of two vectors as  in order to have the vector still normalized. However, the errors due to elongation of the first vector are not yet accumulating with so little additions in our recursion, so while golfing the normalization step was removed and the computation goes simply. Errors less than 1/64 of full circle are filtered out by rounding.

source: Stack Exchange

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

sort: votes


text:
Ich ne know pas
Challenge
You must write a program which correctly identifies the language a passage is written in.
Rules
The passage will be a string passed to your program either via STDIN or function arguments.
You may not use any external sources except for a local text file with words. The length of the text file must be included in your overall program length.
To know that your program meets the spec, it should correctly identify the languages of the following websites:
<code>.wikipedia.org/wiki/<Word for Wikipedia>
<code>.wikipedia.org/wiki/<Language name>

Where <code> is replaced by the language's code. For example, in English:
en.wikipedia.org/wiki/Wikipedia
en.wikipedia.org/wiki/English

For Lojban:
jbo.wikipedia.org/wiki/uikipidias
jbo.wikipedia.org/wiki/lojban.

You are strictly forbidden to hardcode any of the content or HTML code of the links.
To make sure that changes to the wiki don't affect your results, you should use the latest edit to the wiki page before the 15th August 2015, 21:00 BST (GMT+1).
If your language cannot identify the language in which the passage is written, you must return the following phrase:
Ich ne know pas

You can only identify languages which are on this list.
When you return the language name, you should return its English name, and in brackets its name in its own language.
In your answer, you should have a list of the languages that you identify.
Examples
French (Français)

Une baguette de pain ou simplement baguette, ou encore pain français (québécisme et belgicisme), est une variété de pain, reconnaissable à sa forme allongée. Cette forme de pain est emblématique de la France, et l'était déjà avant l'invention de la baguette, quand les pains longs étonnaient les visiteurs. La baguette est aussi typique de l'Algérie.

German (Deutsch)

Die Wurst war und ist auch heute noch das Produkt des Wunsches nach einer möglichst großen Verwertung eines (geschlachteten) Tieres. Durch die Verarbeitung zur Wurst kann so auch das Fleisch länger haltbar gemacht werden. Die ersten Würste, wenn auch nicht im heutigen Sinne, wurden vermutlich bereits in der Antike oder sogar schon vorher hergestellt; siehe dazu auch Haggis oder Saumagen. Erste chinesische Erwähnung findet sich um das Jahr 589 v. Chr. zu einer Wurst, bei der Lamm- und Ziegenfleisch verwendet wurden.

Welsh (Cymraeg)

Bara llaith o Gymru sy'n cynnwys cyrens, rhesins neu syltanas, croen candi, a sbeis melys yw bara brith. Gweinir yn dafellau gyda menyn gan amlaf, am de'r prynhawn neu de mawr. Teisen furum yw bara brith yn draddodiadol, ond mae nifer o ryseitiau modern yn defnyddio ychwanegion megis soda pobi i'w lefeinio.

English (English)

A steak pie is a traditional meat pie served in Britain. It is made from stewing steak and beef gravy, enclosed in a pastry shell. Sometimes mixed vegetables are included in the filling. In Ireland Guinness Stout is commonly added along with bacon and onions, and the result is commonly referred to as a Steak and Guinness Pie (or Guinness Pie for short). A Steak and Ale pie is a similar creation, popular in British pubs, using one of a variety of ales in place of the Guinness. The dish is often served with "steak chips" (thickly sliced potatoes fried, sometimes fried in beef dripping). Steak pies are also available from chip shops, served with normal chips, referred to in Scotland as a steak pie supper.

Scoring
Your score is the length in bytes of your program and any text files that you use divided by the number of languages that you support. The person with the lowest score wins.
score = (length of program + length of text file)/number of languages

What do you mean by cannot identify? Most (all?) approaches would be probabilistic and if the input is in an unidentifiable language, the only thing that would happen would be that the probabilities for all the languages would be really low.

@Maltysen Why do you think it's probabilistic?

https://en.wikipedia.org/wiki/Language_identification All of them involve making probability models on letters. Unless you were going for the angle of storing dictionaries for each language. Then it becomes a compression challenge.

You haven't yet addressed the issues raised in chat: what do you mean by "the languages of the following websites"? How are you going to ensure that changes to publicly editable wiki pages don't make answers which met the criteria cease to meet them?

@PeterTaylor Well I'd hope that the moderators of Wikipedia would keep the pages correct, especially for these pretty important pages

@Maltysen I had the second method in mind, but of course another method could be shorter

Changes to the content can affect the statistics of the text without diminishing its relevance or accuracy.

@PeterTaylor I've added a sentence accounting for edits to the wiki page

///, 8
Correctly identifies one language, Twi. Uses no text file.
Twi[Twi]

How does this work?

I don't know ///, but it was the first language I could find to directly output its source, and Twi is the shortest language name I could find.

I see :P. Do you mind if I add a rule into the question?

I don't mind, but if all you do is add one rule, a different trivial answer will win.

It would be that the program has to fail on all languages which it isn't said to recognise

I see several problems with that, the most important being that you've still insufficiently specified what hardcoding is. There's no clear way to resolve it. Assuming you're using only the Wikipedia articles as test cases, the shortest answer will always be the most hardcoded that doesn't break your rules.

You should have used rs; the name's a byte shorter.

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


text:
Tournament Format Synonyms
I spent all of today at a Super Smash Bros. tournament, and I started thinking about some of the terminology we use when describing sets. These are the three kinds of sets that I see played at tournaments:

Best of 3 (Bo3)

Three games are played. The winner of the set is the player who won the majority of the games.
If a single player wins two games of the set, they are immediately declared the winner, because it would be impossible for the opponent to catch up.

Best of 5 (Bo5)

Five games are played. The winner of the set is the player who won the majority of the games.
If a single player wins three games of the set, they are immediately declared the winner, because it would be impossible for the opponent to catch up.

First to 5 (Ft5)

Okay, I cheated a bit with my wording earlier. This kind of set isn't part of a tournament, but you'll often see them happening in the venue. This is traditionally the kind of set you'll play if you've challenged another player and money is on the line.
It's as simple as it sounds: The players repeatedly play games until one of them has won five, and that player is declared the winner.

Obviously, Bo3 and Bo5 are very similar, differing only in the number of games played. But Ft5 is clearly different... right? Not really! No matter how a Bo3 set goes down, the winner will have won exactly two games. The winner of a Bo5 set will have won exactly 3 games. Why not call them Ft2, or Ft3? The same logic, applied in reverse, will show that Ft5 is exactly the same as Bo9.
The objective of this challenge is to determine the synonym of a set format.
Specification
Your program or function will take a single string from input. The first two characters will be Bo or Ft, and they will be followed by a number. The program/function will output a string with the opposite prefix and a number such that the input and output strings mean the same thing.
Any string beginning with Bo will end in an odd number.
You may assume that the number in the input string will never be greater than 200. You may also assume that you will never receive input for which the correct output would include a number greater than 200. Likewise, the input and correct output numbers will always be greater than 0.
Examples
Bo3 -> Ft2
Ft2 -> Bo3

Bo5 -> Ft3
Ft3 -> Bo5

Bo9 -> Ft5
Ft5 -> Bo9

Bo51 -> Ft26
Ft26 -> Bo51

Bo199 -> Ft100
Ft100 -> Bo199

Code golf and melee? We could be friends! Unless you're talking about an inferior SSB

@aks. of course melee ;)

frikin meleetists...

@aks. There's nothing wrong with project m ;(

@doorhandle except legally speaking. RIP

@undergroundmonorail RIP indeed... it's still standing strong, though (ignoring the fact that its development has stopped, it's very strong in my area and basically the only game played in my high school's smash club. It must be just that good)!

Pyth, 23 bytes
@,/hKsttz2tyKCp-"BoFt"z

Test suite.
How it works:
First, to find the Bo or Ft, the program filters out the characters in the input from BoFt, with -"BoFt"z.
This is immediately printed with p. p also returns its input. That string is converted to a number interpreting the bytes as base 256. The result is 17007 if the string was Bo, and is 18036 if the string was Ft.
Next, it calculates both possible results, num * 2 - 1 and (num + 1)/2 and puts this in a 2 entry list. Then, the program indexes into that list with the above number, 17007 or 18036. Due to Pyth's modular indexing, this selects the proper number. The result is then printed automatically.
Since p prints with no trailing newline, but the implicit printing does have the trailing newline, the two successive prints come out in exactly the right format.

Python 2, 59
lambda s:'FBto'[s>'C'::2]+`eval(s[2:]+'/*22+-11'[s>'C'::2])`

In short challenges where functions are allowed, the brevity of lambda usually wins out even when the code must repeat itself due to the inability to assign variables.
We check which case we're in with string comparison s>'C'. Then, get the right prefix with the list slicing trick 'FBto'[s>'C'::2].
To get the number, we must evaluate the characters beyond the second and do either *2+1 or /2-1 to it. We do this by tacking on either of those two expressions as strings, again chosen by list slicing, evaluating the result, and turning that number into a string.
Edit: Saved one char (59):
lambda s:eval("''FBto''++``%%ss/*22+-11``"[s>'C'::2]%s[2:])

Don't even ask...

You can assign variables inside lambdas. Example: lambda a:(lambda b:b*b)(a+3). It's not particularly short however.

C++11 Template Metaprogramming, 305 bytes
Edit: Got another 100 bytes off
Do I get any kind of handicap for my choice of language? :p
#define C wchar_t
#define T };template<C p
#define L C...l>struct
#define X l...>
C a{T,L I{T,C c,L I<p,c,X:I<10*p+c-'0',X{T>struct I<p>{enum E{v=p};T,L S{T,C c,C d,L G:G<p/10,c,d,p%10+'0',X{T,L G<0,p,X{typedef S<p,X t;T,L F{T,L F<p,'o',X:G<(I<0,X::v+1)/2,'F','t'>{T,L F<p,'t',X:G<I<0,X::v*2-1,'B','o'>{};

Examples:
#include <type_traits>
static_assert(I<0,'5'>::v == 5, "fail");
static_assert(I<0,'1','0','5'>::v == 105, "fail");
static_assert(I<0,'5','1'>::v == 51, "fail");
static_assert(std::is_same<typename G<5,'B','o'>::t, S<'B','o','5'>>::value, "fail");
static_assert(std::is_same<typename G<51,'F','t'>::t, S<'F','t','5','1'>>::value, "fail");
static_assert(std::is_same<typename F<'B','o','3'>::t, S<'F','t','2'>>::value, "fail");
static_assert(std::is_same<typename F<'F','t','2'>::t, S<'B','o','3'>>::value, "fail");
static_assert(std::is_same<typename F<'B','o','5'>::t, S<'F','t','3'>>::value, "fail");
static_assert(std::is_same<typename F<'F','t','3'>::t, S<'B','o','5'>>::value, "fail");
static_assert(std::is_same<typename F<'B','o','7'>::t, S<'F','t','4'>>::value, "fail");
static_assert(std::is_same<typename F<'F','t','4'>::t, S<'B','o','7'>>::value, "fail");
static_assert(std::is_same<typename F<'B','o','1','1'>::t, S<'F','t','6'>>::value, "fail");
static_assert(std::is_same<typename F<'F','t','6'>::t, S<'B','o','1','1'>>::value, "fail");
static_assert(std::is_same<typename F<'B','o','1','0','5'>::t, S<'F','t','5','3'>>::value, "fail");
static_assert(std::is_same<typename F<'F','t','5','3'>::t, S<'B','o','1','0','5'>>::value, "fail");
static_assert(std::is_same<typename F<'B','o','1','9','5'>::t, S<'F','t','9','8'>>::value, "fail");
static_assert(std::is_same<typename F<'F','t','9','8'>::t, S<'B','o','1','9','5'>>::value, "fail");
int main() {}

CJam, 29 bytes
l('B=\1>i"Ft"1$)2/+"Bo"@2*(+?

Try it online
Nothing very elaborate here. Calculating the two possible results, and picking one of the two based on the first letter in the input. Will update if I come up with something better.
Explanation:
l     Get input.
(     Pop off first character.
'B=   Compare with 'B.
\1>   Get rest of input to top of stack, and slice off first character.
i     Convert to integer.
"Ft"  String part of first possible output.
1$    Copy input value to top.
)2/   Increment, and divide by 2.
+     Concatenate with string part.
"Bo"  String part of second possible output.
@     Move input value to top.
2*(   Multiply by 2, and decrement.
+     Concatenate with string part.
?     Ternary to pick one of the two constructed outputs, based on comparison
      of first input character with 'B.

CJam, 27 bytes
4 27]r.^(_o'B=\(oi_2*(\)2/?

This makes use of the fact that 'B' ^ 'F' == 4 and 'o' ^ 't' == 27.
Try it online in the CJam interpreter.

Javascript (ES6), 50 47 chars
Very simple solution: (Thanks to undergroundmonorail for removing one byte!)
x=>(y=x.slice(2),x<'C'?'Ft'+-~y/2:'Bo'+(y*2-1))

Ungolfed:
function(x){
  y = x.slice(2); // everything after the 'Ft' or 'Bo'
  return x<'C' ? 'Ft'+Math.ceil(y/2) : 'Bo'+(y*2-1)
}

For once my answer was only ~2x the length of the best Pyth answer!

I mentioned this in chat but you should be able to replace y/2+.5 with -~y/2 to save a byte.

@undergroundmonorail Thanks for the tip! BTW, I like this challenge because it's simple compared to most challenges, so my answer turns out much shorter than usual.

Haskell, 69 bytes
f('B':_:x)="Ft"++show(div(read x)2+1)
f(_:_:x)="Bo"++show(2*read x-1)

Reasonably straight-forward.

Powershell, 111
The wordiness of PowerShell and required parentheses are its downfall again. Even golfing the .Substring(0,2) to [0..1]-join'' only saves 2 bytes each, and another couple bytes saved with an implied Else thanks to the exit command. Oh well. Good refresher on separating strings.
Code:
$b=($a=$args[0])[0..1]-join'';$c=+($a[2..($a.Length-1)]-join'');if($b-eq"Bo"){"Ft"+($c+1)/2;exit};"Bo"+(2*$c-1)

Usage:
PS C:\Scripts\Golfing> .\ssb_tourney.ps1 Bo199
Ft100

Explanation
$b=($a=$args[0])[0..1]-join''      # Take in the command-line argument as $a, recast as
                                   # array, suck out the first two characters, save as $b
$c=+($a[2..($a.Length-1)]-join'')  # Do a similar trick with the right-hand side of $a,
                                   # re-cast it as an integer with the +
if($b-eq"Bo"){                     # If the first letters are "Bo"
    "Ft"+($c+1)/2                  # Implied write of the answer
    exit
}
"Bo"+(2*$c-1)                      # Implied write of the other answer, only reached if
                                   # the input is "Ft", else we would have hit the exit

Not ridiculously short like the others, but that's my first post:
JS, 143 bytes
f=prompt("","");n=parseInt(f.match(/\d{1,}/));s=0;r=0;if(f.match(/B/)){r=(n+1)/2;s="Ft"+r;}if(f.match(/F/)){r=n*2-1;s="Bo"+r;}alert(f+" : "+s);

Ungolfed Version:
var f = prompt("", "");
var n = parseInt(f.match(/\d{1,}/));
var s = 0;
var r = 0;

if (f.match(/B/)) {
  r = (n + 1)/ 2;
  s = "Ft"+r;
 }
if (f.match(/F/)) {
  r = n * 2 - 1;
  s = "Bo"+r;
 }
alert(f+" : "+s);

Welcome to Programming Puzzles and Code golf! There are a couple of ways to shorten your code considerably, so here are a few. 1) Almost all whitespace in JavaScript is unnecessary, 2) you don't need the var keyword, and 3) statements can be separated with a semicolon or a newline, so you don't need both. For more general tips have a look at Tips for golfing in JavaScript.

PHP, 85 79 75 Bytes
<?php
$f=$argv[1];$s=substr($f,2);echo strpos($f,Bo)===0?Ft.($s+1)/2:Bo.($s*2-1);

Usage:

Call the script with an argument: php -d error_reporting=0 script.php Bo5

Ruby, 82 Bytes
x=$*[0]
y=x.match(/..(\d*)/)[1].to_i
x=~/Bo/?(puts"Ft#{y/2+1}"):(puts"Bo#{y*2-1}")

Called with an argument to knock off a few bytes.
First post, suggestions welcome. :)
EDIT: Got rid of 12 bytes by changing up my math. Since the Bo numbers are odd they will always have a decimal after dividing by 2, meaning I can just truncate and add 1 instead of using ceil to round up.

You can save two bytes by removing the space after puts.

@ProgramFOX don't know how I missed those, thank you. also, I somehow managed to mess up the edits but I think it's fixed now, haha.

We were editing the post at the same time, which caused an edit conflict. Because you submitted later, your edit overwrote mine. I know, edit conflicts are a bit tricky :P

Pyth - 31 bytes
Pretty simple, uses zip and modular indexing to get the switch. The actual calculation is really easy.
s@C,Jc"FtBo"2,h/Ksttz2tyKhxJ<z2

Test suite.

Matlab, 95 bytes
function f(s)
t='Bo';a=2;b=-1;if s(1)<70
t='Ft';a=.5;b=a;end
[t num2str(str2num(s(3:end))*a+b)]

Examples:
>> f('Ft5')
ans =
Bo9
>> f('Bo51')
ans =
Ft26

Julia, 63 bytes
x->(y=int(x[3:end]);join([x<"C"?"Ft":"Bo",x<"C"?(y+1)÷2:2y-1]))

Ungolfed:
function f(x::String)
    # Extract the number at the end
    y = int(x[3:end])

    # If x is lexographically less than "C", we have
    # "best of," so we need "first to." Otherwise we
    # need "best of."
    if x < "C"
        join(["Ft", (y+1)÷2])
    else
        join(["Bo", 2y-1])
    end
end

FSharp - 153 143 bytes
let t(s:string)=
 let c=s.[2..]|>Seq.map string|>Seq.reduce(+)|>float
 if s.[0]='B'then sprintf"Ft%.0f"(ceil(c/2.)) else sprintf"Bo%.0f"(c*2.-1.)

Updates

Knocked a few bytes off by switching from pattern matching to a simple if ... then ...

Perl 5, 38 bytes (37 + 1 for -p)
$_=/Bo/?Ft.(.5+$'/2):Bo.(2*s/Ft//r-1)

Usage: save as 54768.pl and run as:
perl -p 54768.pl <<< 'Bo3'
# Ft2

or interactively:
perl -p 54768.pl
Bo199
# Ft100

-p implies -n. You don't need both.

@Dennis, indeed I don't! Thank you!

R, 144 bytes
New to code-golfing, R, and this site. So here goes:
a=function(){n=readline();z="Bo";p=(as.numeric(gsub("[^0-9]","",n)));if(grepl(z,n)==TRUE){x="Ft";b=(p+1)/2}else{x="Bo";b=p*2-1};cat(x);cat(b)}

I don't know R but I bet you could get rid of the whitespace.

@undergroundmonorail you're right, R doesn't really use whitespace. I had just written it like that to make it nicer to look at =P the size of the file without the whitespace is 144 bytes, I wasn't sure which number to put so I put the lowest one I could fit that code into.

Oh, okay :) For the record, it's generally preferable to post the exact code you used for your score, just to make it as easy as possible to verify, though people often include "ungolfed" versions to make it easier to read. The extent of the ungolfing ranges from adding indentation and newlines, to renaming variables, to abstracting chunks of code into functions and generally making the code cleaner. None of that is required, but it's fine so long as the fully golfed version is there.

C#, 110 bytes
string f(string s){var b=s[0]=='B';var o=s.Remove(0,2);int i=int.Parse(o)/2;return b?"Ft"+(i+1):"Bo"+(4*i-1);}

Welcome to PPCG! Please include the exact code you have counted in your answer so people can easily check your score (it appears you've counted the code without the unnecessary whitespace). You can always include an ungolfed/readable version in addition to that.


text:
Help, I'm trapped in an infinite factory!
This challenge is loosely inspired by the Zachtronics game Infinifactory.
You are given a top-down view of a rectangular grid of conveyors, represented by >v<^. There may be cells without conveyors, represented by spaces. Here is an example:
> <vv    <
 v ^ >v v
  >v^^>vv^
    ^>^ v
>  v<v  >>
  >v v<^

This setup is implicitly surrounded by an infinite number of spaces.
Furthermore, you are given the dimensions of a rectangular piece of cargo which is placed onto the conveyors in the top left corner of the grid. Your task is to figure out whether the cargo ever comes to rest or whether it will end up moving in a loop.
Of course, the cargo is likely to cover several conveyors at once, so here are the rules for figuring out the direction of the cargo in each step:

Opposite conveyors cancel each other. So if a 3x2 cargo covers any of the following patches (outlined with hyphens and pipes for clarity), the result would be the same:
+---+   +---+   +---+
|>>^|   |  ^|   |v^^|
|^<<|   |^  |   |^^v|
+---+   +---+   +---+

The same goes for these:
+---+   +---+   +---+
|v^<|   |   |   |><>|
|>>>|   |>> |   |>><|
+---+   +---+   +---+

Since the exact position of a conveyor underneath the cargo is irrelevant, it doesn't matter which pairs you cancel.
This cancellation is applied before the other rules. Therefore, for the other rules there will only be conveyors in at most two directions.
If the cargo doesn't cover any conveyors at all (either because all conveyors cancel, because it covers only spaces or because it moved fully off the grid), it comes to rest.
If the cargo covers more conveyors of one direction than of the other, the cargo moves in that direction. E.g., if a 3x2 cargo covered the following patch
>>
^>^

it would move to the right, because there are more > than ^. On the other hand, if it covered
>>^
  ^

this rule would not apply, because there's a tie between > and ^.
This leaves only cases in which there is a tie between adjacent directions (a tie between opposite directions would have cancelled). In this case, the cargo keeps moving along the axis it is already moving in. E.g. if a right-moving or left-moving 3x2 cargo is now covering the patch
>>^
^

it would move to the right. If it had arrived on this patch moving up or down, it would now move up instead. If this kind of conflict occurs on the very first step of the simulation, assume that the cargo had been moving to the right.

Detailed Examples
Consider the conveyor grid at the top and a 3x2 cargo. The following is a step-by-step visualisation of the process. Each step consists of the grid, with the cargo represented by #, a small box which shows the conveyors covered by the cargo, another box with the conveyors after cancellation, and the rule that determines where the cargo moves:
 ###vv    <    > <vv    <    > <vv    <    > <vv    <    > <vv    <    > <vv    <
 ###^ >v v     ###^ >v v      v ^ >v v      v ^ >v v      v ^ >v v      v ^ >v v
   >v^^>vv^    ###v^^>vv^    ###v^^>vv^     ###^^>vv^      ###^>vv^      >###>vv^
     ^>^ v         ^>^ v     ### ^>^ v      ###^>^ v       ###>^ v        ###^ v
 >  v<v  >>    >  v<v  >>    >  v<v  >>    >  v<v  >>    >  v<v  >>    >  v<v  >>
   >v v<^        >v v<^        >v v<^        >v v<^        >v v<^        >v v<^

+---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+
|> <|  |   |  | v |  | v |  |  >|  |  >|  | >v|  | >v|  |>v^|  |> ^|  |v^^|  | ^^|
| v |  | v |  |  >|  |  >|  |   |  |   |  |   |  |   |  |  ^|  |   |  | ^>|  |  >|
+---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+  +---+

   Rule 3        Rule 4        Rule 3        Rule 4        Rule 4        Rule 3

 ================================================================================

 > <vv    <    > <###   <    > <vv    <
  v ###v v      v ###v v      v ###v v
   >###>vv^      >v^^>vv^      >###>vv^
     ^>^ v         ^>^ v         ^>^ v
 >  v<v  >>    >  v<v  >>    >  v<v  >>
   >v v<^        >v v<^        >v v<^

+---+  +---+  +---+  +---+  +---+  +---+
|^ >|  |  >|  |vv |  | v |  |^ >|  |  >|
|v^^|  | ^^|  |^ >|  |  >|  |v^^|  | ^^|
+---+  +---+  +---+  +---+  +---+  +---+

   Rule 3        Rule 4        Rule 3

At this point, the cargo enters a loop between the last two frames.
Now consider a 2x3 cargo instead:
 ##<vv    <    >##vv    <    > <vv    <    > <vv    <    > <vv    <    > <vv    <
 ## ^ >v v      ##^ >v v      ##^ >v v      v ^ >v v      v ^ >v v      v ^ >v v
 ##>v^^>vv^     ##v^^>vv^     ##v^^>vv^     ##v^^>vv^      ##^^>vv^      >v^^>vv^
     ^>^ v         ^>^ v      ## ^>^ v      ## ^>^ v       ##^>^ v       ##^>^ v
 >  v<v  >>    >  v<v  >>    >  v<v  >>    >##v<v  >>    > ##<v  >>    > ##<v  >>
   >v v<^        >v v<^        >v v<^        >v v<^        >v v<^        ## v<^

 +--+  +--+    +--+  +--+    +--+  +--+    +--+  +--+    +--+  +--+    +--+  +--+
 |> |  |> |    | <|  |  |    |v |  |v |    | >|  | >|    |>v|  |>v|    |  |  |  |
 | v|  | v|    |v |  |v |    | >|  | >|    |  |  |  |    |  |  |  |    | v|  | v|
 |  |  |  |    | >|  |  |    |  |  |  |    |  |  |  |    | v|  | v|    |>v|  |>v|
 +--+  +--+    +--+  +--+    +--+  +--+    +--+  +--+    +--+  +--+    +--+  +--+

   Rule 4        Rule 3        Rule 4        Rule 3        Rule 3        Rule 3

 ================================================================================

 > <vv    <    > <vv    <    > <vv    <
  v ^ >v v      v ^ >v v      v ^ >v v
   >v^^>vv^      >v^^>vv^      >v^^>vv^
     ^>^ v         ^>^ v         ^>^ v
 > ##<v  >>    >  v<v  >>    >  v<v  >>
   ## v<^        ## v<^        >v v<^
   ##            ##            ##
                 ##            ##
                               ##

 +--+  +--+    +--+  +--+    +--+  +--+
 | v|  | v|    |>v|  |>v|    |  |  |  |
 |>v|  |>v|    |  |  |  |    |  |  |  |
 |  |  |  |    |  |  |  |    |  |  |  |
 +--+  +--+    +--+  +--+    +--+  +--+

   Rule 3        Rule 4        Rule 2

In the last step, rule 2 applies because the cargo has moved off the grid, so it comes to rest and there won't be a loop.
Rules and Assumptions
Your input will be the conveyor grid as described above along with the width and height of the cargo. You may take these three parameters in any convenient order and format. For the grid, this means that you can read a single string with lines separated by newlines or other characters, or an array of strings, or an array of arrays of characters, as long as the individual grid cells are still represented by the characters >v<^ and spaces.
You should output a truthy value if the setup results in a loop of at least two frames or a falsy value if the cargo will come to rest.
You may assume that the grid will be padded to a rectangle with spaces, and that the cargo will initially fit into the grid.
You may write a program or function, taking input via STDIN (or closest alternative), command-line argument or function argument and outputting the result via STDOUT (or closest alternative), function return value or function (out) parameter.
This is code golf, so the shortest answer (in bytes) wins.
Test Cases
The test cases are grouped by grids.
Grid (2x2):

>v
^<

Width  Height  Loop?
1      1       True
1      2       True
2      1       True
2      2       False

Grid (3x3):

> v

^ <

Width  Height  Loop?
1      1       False
1      2       False
1      3       False
2      1       False
2      2       True
2      3       True
3      1       False
3      2       True
3      3       False

Grid (4x3):

>^>v
v^v
^ <<

Width  Height  Loop?
2      2       False

Grid (6x5):

>v>v>v
^v^v^v
^v^v^v
^>^>^v
^<<<<<

Width  Height  Loop?
1      1       True
1      2       False
2      1       True
2      2       True
2      4       True
2      5       False
3      1       False
3      2       True
3      3       True
3      5       True
6      2       False
6      3       True
6      5       False

Grid (10x6):

> <vv    <
 v ^ >v v
  >v^^>vv^
    ^>^ v
>  v<v  >>
  >v v<^

Width  Height  Loop?
1      1       False
2      3       False
2      6       False
3      2       True
5      4       False
6      1       True
10     6       False

As an additional set of test cases, consider that any input where the grid consists solely of spaces must yield a falsy result.
I've checked all the test cases manually, so let me know if you think I've made a mistake.

Fitting music

@Fatalize I'm getting Twitch Plays Pokemon flashbacks...

"Your input will be the conveyor grid as described above along with the width and height of the cargo. You may take these three parameters in any convenient order and format." - does this mean we can have the conveyor grid taken in as an array of arrays? That is, a 2x2 grid with [^^/v<] becomes [[0,1] [0,1];[0,-1] [-1,0]]? Or do you mean it's up to us whether it's STDIN, a string input, a char array input, etc, but it still has to be in the form of ^, v, >, and <?

@GlenO You can take a newline (or other character) separated string, an array of strings, or an array of arrays of characters, but each cell should still be represented by the characters ><^v or a space. I'll clarify that.

So what happens if the cargo moves onto a conflict where the continued direction is not one of the choices? That is, if it was moving right, and now must choose between up and left.

@Joshua What's important is the axis the cargo was moving on, not the direction. So in your example it would then move to the left, because it was moving along the left-right axis.

At first sight, I had read "the direction", instead of "the axis". What matters is in fact the direction — in the maths sense.

Your task is to figure out whether the cargo ever comes to rest or whether it will end up moving in a loop. Did you seriously just ask us to solve the Halting Problem in a Code Golf exercise? ;)

@MasonWheeler Nope, not really. :P

Ruby, 306 298 251 204 198
->g,w,h{m=->y,x,d,v=[]{q=y,x
r=->s{([""]*h+g)[y+h,h].map{|l|(?x*w+l)[x+w,w]}.join.count s}
z=k=r[?v]-r[?^],j=r[?>]-r[?<]
q[d=[d,1,0][j*j<=>k*k]]+=z[d]<=>0
v&[q<<d]!=[]?q!=v[-1]:m[*q,v<<q]}
m[0,0,1]}

Edit: Thanks a lot to Ventero who shortened the code a lot by applying some amazing tricks!
Input and output
The code represents a ruby function that takes three parameters:

the grid, represented as an array of strings (each row is a different string)
the width of the cargo
the height of the cargo

It returns 1 (truthy) in case there's a loop, or nil (falsy) in case the cargo rests.
Tests
Here it is passing all of Martin's tests: http://ideone.com/zPPZdR
Explanation
There are no clever tricks in the code; it's a pretty straightforward implementation of the rules.
In the code below, move is a recursive function that makes a move according to the rules, and:

returns truthy in case of a loop
returns falsy in case of a rest
otherwise calls itself to execute the next move

A more readable version is available here.
Note: the golfed code has undergone several modifications and is no longer similar to the readable version.

Since it doesn't matter whether r contains additional entries besides the four directions, r[y>=0&&x>=0&&g[y]&&g[y][x]]+=1 should save a few bytes.

I took the liberty of golfing things a little further, hope you don't mind: http://ideone.com/k69BmH

@Ventero Wow, you've done amazing things to the code. I would never have thought about transforming the hash into a lambda. I was trying out some of my ideas to shorten the program, but was nowhere near what you did. Thanks a lot!

Updated the code to include a fix for otherwise incorrect cycle detection (the previous version would not look at the axis the cargo was moving on when trying to detect cycles). Unfortunately that fix cost 1 byte...

Got it down to 200 through slightly shorter handling of negative indices, guess I'll leave it at that for now: http://ideone.com/k69BmH

Actually, 198: http://ideone.com/ptKrzf :)

Julia - 394 300 246 214 bytes
f(A,x,y)=(Z=sign;(S,T)=size(A);X=x+1;Y=y+1;G=fill(5,S+2y,T+2x);G[Y:S+y,X:T+x]=A;C=0G;D=1;while C[Y,X]!=D C[Y,X]=D;i,j=sum(i->1-[19 8]i%82%3,G[Y:Y+y-1,X:X+x-1]);D=Z(2i^2-2j^2+(i!=0)D);X+=Z(i+D*i);Y+=Z(j-D*j)end;D^2)

Returns 1 if the cargo loops, and 0 if it comes to a stop. It's not "strictly" truthy/falsy, in that Julia doesn't permit 0 and 1 in boolean contexts... but I consider values x for which bool(x)==true are truthy and bool(x)==false are falsy.
Input A should be of the form of a character array. If you're copy/pasting the conveyor grid, you'll need to get it into the appropriate form. To save you from having to manually handle it, use the following:
A=foldl(hcat,map(collect,split("""(PASTE GRID HERE)""","\n")))'

Where obviously, (PASTE GRID HERE) should be replaced with the grid itself. Double-check the spaces at the end of each line, to make sure it actually has all of the spaces (it doesn't check to make sure that all lines are equal length). Note that this line isn't part of the actual solution code, just a convenient piece of code to make using the solution code a bit easier.
Ungolfed:
function f(A,x,y)
  # Determine size of grid for use later
  (S,T)=size(A)
  # Initialise starting position (performed here to save characters)
  X=x+1
  Y=y+1
  # Create an expanded field that is functionally "spaces" (to provide
  # spaces at edges for the cargo to stop in)
  G=fill(5,S+2y,T+2x)
  # Put the conveyor grid into centre of the expanded field
  G[Y:S+y,X:T+x]=A
  # Create an array storing the most recent movement direction:
  # will use 1=horizontal, -1=vertical, 0=stopped
  C=0G
  # Initialise current direction (same system as C)
  D=1
  # Loop until it finds itself repeating a coordinate/direction pair
  while C[Y,X]!=D
    # Mark current coordinate/direction pair in array
    C[Y,X]=D
    # Determine the net coordinate pairing, stored in two variables
    # for golf purposes *SEE NOTE*
    i,j=sum(i->1-[19 8]i%82%3,G[Y:Y+y-1,X:X+x-1])
    # Determine new movement axis (if D=0, cargo stopped)
    D=sign(2i^2-2j^2+(i!=0)D)
    # Update X or Y depending on signs of D and the appropriate direction
    X+=sign(i+D*i)
    Y+=sign(j-D*j)
  end
  # if D=±1, return 1 (cargo is still moving), otherwise return 0
  return D^2
end

Note: 1-[19 8]i%82%3 has been chosen to map the five possible characters to the appropriate coordinate pairs by the most efficient method I could find. This is also the reason for using 5 to fill the spaces when creating G - it's a single-digit character that maps to [0 0].
Example of usage:
julia> A=foldl(hcat,map(collect,split(""">v>v>v
       ^v^v^v
       ^v^v^v
       ^>^>^v
       ^<<<<<""","\n")))';

julia> f(A,2,1)
true

julia> f(A,3,3)
true

julia> f(A,5,2)
false

f(A,x,y)= is shorter than f=(A,x,y)->.

@AlexA. - true, but then, I'll probably remove the f= and make it an anonymous function when I finish golfing it.

It'll be the same length if it's a named function versus an anonymous function when there are multiple parameters. f()= versus ()->.

Python 2, 207 bytes
def f(L,w,h,u=0,v=0,D=1,S=[]):a,b,c,d=map(`[r[u*(u>0):u+w]for r in L[v*(v>0):v+h]]`.count,"v^><");D=cmp(abs(a-b),abs(c-d))<D;T=u,v,D;return T in S or a-b|c-d and f(L,w,h,u+cmp(c,d)*D,v+cmp(a,b)*0**D,D,S+[T])

Input the grid as a list of rows, e.g.
['>v>v>v', '^v^v^v', '^v^v^v', '^>^>^v', '^<<<<<']

followed by the width and height. Returns 0 or True accordingly.
Explanation
def f(L,          # Grid
      w,h,        # Width, height of cargo
      u=0,v=0,    # Position of top-left of cargo, initially (0, 0)
      D=1,        # Moving left/right = 1, up/down = 0
      S=[]        # Seen (pos, axis) pairs, initially empty
     ):

     # Arrows under cargo - no need for "".join since we only need to count v^<>
     A = `[r[u*(u>0):u+w]for r in L[v*(v>0):v+h]]`

     # Count for each arrow
     a,b,c,d=map(A.count,"v^><")

     # Golfed form of abs(a-b) < abs(c-d) or (abs(a-b) == abs(c-d) and D == 1)
     D=cmp(abs(a-b),abs(c-d))<D
     T=u,v,D

     return (T in S                # Return True if (pos, axis) previously seen
             or a-b|c-d               # Return 0 if all conveyors cancel
             and f(L,w,h,             # Otherwise, recurse
                   u+cmp(c,d)*D,      # Update u if moving left/right
                   v+cmp(a,b)*0**D,   # Update v if moving up/down
                   D,
                   S+[T]          # Add (pos, axis) to seen
                  )
            )

Can't you shorten it by assigning cmp to a variable?

Is it sufficient to detect cycles by checking for already visited positions? Based on rule 4, the next step can also be influenced by the previous direction. So it seems possible that you could arrive at the same position twice, but not have a cycle because you move in different directions based on different previous directions.

@muddyfish That'd just break even

@RetoKoradi Hopefully fixed

Yes, adding D to the position key should do it.


text:
Shortening a long number
When dealing with long numbers when code golfing, getting the length of your code down can be difficult, so do you have any tips for making a number shorter and easier to manage?
For example, the following Pyth code prints "Hello world", but at 44 bytes, that is unsatisfactory:

Vcjkj85942000775441864767076 2 7=k+kCiN2)k

So how would I shorten the long number, 85942000775441864767076?

Perfect timing for this question. @isaacg just added a new feature today, that allows to shorten such numbers immensely.
The basic technique is to convert the number to base 256 and convert it to chars. You can do this using the code ++NsCMjQ256N. You can then use the resulting string in combination with C, which does exactly the opposite (convert chars to int and interpret the result as base-256 number). So you get 13 chars: C"2ìÙ½}ü¶d". Some of the chars are unprintable.
But notice that I said 13 CHARS, not bytes. If I copy the chars and count the with https://mothereff.in/byte-counter, it says 13 chars and 18 bytes. This is due the character encoding of chars, which is UTF-8 by default. And UTF-8 only allows 2^7 different 1-byte character. Every char c with ord(c) > 127 actually gets stored using two bytes instead of one.
And here come's @isaacg's new feature into play. He changed the default code-format from UTF-8 to iso-8859-1. iso-8859 can represent 256 characters with only 1 byte. So now you can actually reach 13 BYTES. This is only possible with the standard compiler though, this doesn't work in the online compiler.
First you want to convert the number to hex-values by using this script: jdm.[2.Hd"0"jQ256. This gives you  12 32 ec d9 bd 07 7d fc b6 64.  Afterwards copy those numbers into your code-file using a hex-editor (e.g. hexedit for linux).

Notice:

Obviously you remove the " at the end, if the string is the last part of the code.
This only works if there is no 34 (the byte 22) in the base-256 representation of you numbers, since this is the " char and will end the string. Escaping works though (5C 22).
Btw, when you open a file with a hex-editor you will likely see the byte 0A or 0d 0a at the end, which you can remove. This only indicates the end of the line.

I'll have to put the offline interpreter on my machine, but this is brilliant, thanks! :)

The string also can't include the null byte, of value 00. In addition, \, byte 5c, may or may not need to be escaped with another \, depending on the byte after it.