| Bytes | Lang | Time | Link |
|---|---|---|---|
| 133 | Raku Perl 6 rakudo | 251002T152736Z | xrs |
| 158 | AWK | 251001T134615Z | xrs |
| 129 | Turtlèd | 160918T061424Z | Destruct |
| 064 | Vyxal | 220528T031317Z | naffetS |
| 871 | Deadfish~ | 210331T220309Z | emanresu |
| 076 | Husk | 201103T090222Z | Razetime |
| 063 | Stax | 180321T101138Z | Weijun Z |
| 031 | Charcoal | 170309T110857Z | ASCII-on |
| 142 | PHP | 180321T084126Z | iBug |
| 165 | JavaScript ES6 | 160921T091341Z | winner_j |
| 190 | Fourier | 160918T104924Z | Beta Dec |
| 105 | PowerShell | 170313T201628Z | AdmBorkB |
| 137 | Ruby | 160921T104128Z | Linus |
| 083 | Jelly | 160922T052054Z | Jonathan |
| 172 | Javascript | 160921T100515Z | Kajal Ch |
| 093 | Perl | 160917T113250Z | primo |
| 089 | Pyth | 160920T035530Z | insert_n |
| 152 | Lua | 160920T032834Z | ATaco |
| 175 | Qbasic | 160919T194514Z | anonymou |
| 171 | Python 2 | 160918T095736Z | ElPedro |
| 067 | MATL | 160917T133347Z | Luis Men |
| nan | C# 201 171* Bytes | 160918T105428Z | pinkfloy |
| 191 | Java 7 | 160919T073203Z | Kevin Cr |
| 176 | Python 2 | 160917T235736Z | acrolith |
| 153 | Bash | 160917T140131Z | Chris |
| 131 | Python 2 | 160918T122121Z | lynn |
| 170 | PHP | 160917T141519Z | Titus |
| 127 | /// | 160917T134105Z | Erik the |
| 174 | JavaScript ES6 | 160917T125159Z | Arnauld |
| 195 | Batch | 160917T115322Z | Neil |
Raku (Perl 6) (rakudo), 133 bytes
say "()"x 6,'
|\3.1415926|
|:\53589793|';
say " "x$_~($_ <7??"\\::\\"~[2384626,433832,79502,8841,971,69,3][$_]~"|"!!"\\__\\|")for ^8;
AWK, 158 bytes
END{i=8
for(print"()()()()()()\n|\\3.1415926|\n|:\\53589793|";i--;c+=i)
printf(i?"\\::\\":"\\__\\")substr("2384626433832795028841971693",c+1,i)"|\n%*s",++x,X}
Beats out the naive version by about 24 chars:
END{print"()()()()()()\n|\\3.1415926|\n|:\\53589793|\n\\::\\2384626|\n \\::\\433832|\n \\::\\79502|\n \\::\\8841|\n \\::\\971|\n \\::\\69|\n \\::\\3|\n \\__\\|"}
Turtlèd, 135 129 bytes
(the interpreter isn't really slightly buggèd (anymore :]), but it does not affect this program)
By restructuring and rewriting my program, I golfed... six bytes
And now I have to make new explanation...
Still could be shorter probs though
At least the best solution in this lang isn't just writing in the raw data ¯\(ツ)/¯
#3.141592653589793238462643383279502884197169#")()()()()()">10:[)'|l]:[)d'\l]d"(||"2uuu[|;"::"uuu];>"__"[|r'\d]dl[ l[|.+l][\r]ul]
Try it online Explanation
Honestly, this doesn't describe the actual program very well, but it does give hints about the commands, so you might understand a little better
#3.141592653589793238462643383279502884197169# Some pi. Set the string to thing between #s
the last digit was same as first, and the
string wraps, so digit could be removed
")()()()()()" Write this string, by writing char 1 to current cell, moving right, char 2...
> turn right
10 set register to ten
:[)'|l]: move right by amount in register, while current cell isn't ), write |
and move left. move right by amount in register
[)d'\l] while cell is not (, move down, write \, move left
d"(||" move down and string-write "(||"
2 set register to 2
uuu[|;"::"uuu] Move up three, and while the cell is not |, move down by
register (2), string-write "::", move up three
Just remember the turtle is currently pointing right, so up is right.
;>"__" move down by amount in register, turn right, string-write "__"
[|r'\d]dl while cell is not |{ move right, write \, move down}, move down, left
COMPLEX THING: NESTED LOOPS
[ l[|.+l][\r]ul]
While the current cell is not space {move left, execute loop:(While cell not |, write current char of string variable (remember that pi?), increment string pointer, move left), execute loop:(while cell not \, move right), move up, left}
Deadfish~, 871 bytes
{iiii}cicdcicdcicdcicdcicdcic{ddd}dc{{i}}{i}iiiic{ddd}ddc{dddd}dcdddddciiiciiicdddciiiiciiiic{d}iiiciiiic{{i}ddd}c{{d}}{d}ddddc{{i}}{i}iiiic{dddddd}ddddddc{iii}iiiic{dddd}icddciiciiicicddciicddddddc{{i}ddd}iiic{{d}}{d}ddddc{{i}dd}iic{ddd}ddddcc{iii}iiiic{dddd}ddciciiiiicddddciicddddciiiic{{i}ddd}c{{d}}{d}ddddc{ii}iic{iiiiii}c{ddd}ddddcc{iii}iiiic{dddd}cdcciiiiicdddddcdc{{i}ddd}iiiic{{d}}{d}ddddc{ii}iicc{iiiiii}c{ddd}ddddcc{iii}iiiic{dddd}iiiciicddddcdddddciic{{i}ddd}iiiic{{d}}{d}ddddc{ii}iiccc{iiiiii}c{ddd}ddddcc{iii}iiiic{ddd}ddddddccddddcdddc{{i}ddd}iiiiic{{d}}{d}ddddc{ii}iicccc{iiiiii}c{ddd}ddddcc{iii}iiiic{ddd}dddddcddcddddddc{{i}ddd}iiiiic{{d}}{d}ddddc{ii}iiccccc{iiiiii}c{ddd}ddddcc{iii}iiiic{dddd}iiciiic{{i}ddd}dddc{{d}}{d}ddddc{ii}iicccccc{iiiiii}c{ddd}ddddcc{iii}iiiic{dddd}dc{{i}ddd}iiic{{d}}{d}ddddc{ii}iiccccccc{iiiiii}ciiiccdddc{iii}iic{{d}}{d}ddddc
Just because.
Husk, 76 bytes
`:+R' 7"¦__¦|":*"()"6§+(mo:'|t↑2)↓2m↓3z+zR¢" "Nmo`:'|+"¦::¦"Cṫ9Γ·::'.ṁs↑54İπ
There's probably some interesing way to shorten this further.
Stax, 63 bytes
ü?½Pi<Θ*q}ü¿▒5Ç>cdƒ±<Gw►,─ô╟▒g•iâÑ♠514Φ⌂!Ñεùáèè♂ÑD╔«dÿ47¡ô#UV•╧
Shorter than the accepted MATL answer. It would definitely be shorter if more digits were stored as the constant pi in Stax.
(What is that Pi<0 in the code?)
Explanation
Uses the ASCII equivalent to explain, which is
.()6*PVP$2ME.|\a+"|:\"a+"!RNyb2L$-!mV=223w+&O-"!{"\::\"s$+mELr"\__\"]+|>m'|+
Expalantion:
.()6*PVP$2ME.|\a+"|:\"a+
.() "()"
6*P Print 6 times
VP$ First two lines of pi in the output
2ME Push the two lines separately on the stack
.|\a+ Prepend the first line with "|\"
"|:\"a+ Prepend the second line with "|:\"
"..."!{"\::\"s$+mELr"\__\"]+|>m'|+
"..."! [2384626,433832,79502,8841,971,69,3]
{"\::\"s$+m Convert each element to a string and prepend "\::\"
ELr Prepend the first two lines to array
"\__\"]+ Append "\__\" to the converted array
|> Right align text
m'|+ Append "|" to each array element and print
Charcoal, 31 bytes
×⁶()↙↓¹⁰↖↖¹⁰↓↓²↘⁸M↑__↖←¤:↗¤UGPi
You may be wondering: what is this sorcery? How can you fill with UGPi? Well, Charcoal is starting to get Wolfram Language support, in the hope that one day it can be competitive in more challenges!
Previous, 71 bytes
×⁶()↙↓¹⁰↖↖¹⁰↓↓²↘⁸M↑__↖←¤:↗¤3.141592653589793238462643383279502884197169
Verbose
Print(Multiply(6, "()"));
Move(:DownLeft)
Print(:Down, 10)
Move(:UpLeft)
Print(:UpLeft, 10)
Move(:Down)
Print(:Down, 2)
Print(:DownRight, 8)
Move(:Up)
Print("__")
Move(:UpLeft)
Move(:Left)
Fill(":")
Move(:UpRight)
Fill("3.141592653589793238462643383279502884197169")
Note that this is different as the deverbosifier automatically compresses strings and does not remove redundant commands.
With compressed strings, 52 bytes
×⁶¦()↙↓¹⁰↖↖¹⁰↓↓²↘⁸↑__↖←¤:M↗¤”i¶∧²uτ¶R› §Q´⌈#_⮌POÞ”
xxd output
0000000: aab6 ba28 291f 14b1 b01c 1cb1 b014 14b2 ...()...........
0000010: 1eb8 125f 5f1c 11ef 3acd 1def 0469 0a01 ...__...:....i..
0000020: b275 f40a 52be 0999 9fa4 d1e0 1a23 5f86 .u..R........#_.
0000030: d04f de04 .O..
PHP, 142 bytes
Sneaky-sneaky :) php just prints everything out without trying to interpret them as PHP code if it does not see any <?php ?> pairs.
()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|
JavaScript (ES6), 170 bytes 165 bytes
is a bit "cheated", since if run on the console, the return value would be displayed
v=0;("()()()()()()\n|9|:87654321".replace(/\d/g,(o)=>"\\"+(Math.PI+'2384626433832795028841971693').substr(v,o,v-=-o)+"|\n"+(o<9?" ".repeat(8-o)+(o>1?"\\::":"\\__\\|"):""))
After some teaking, the function looks like this(function must be called with parameter with the value 0):
v=>`()()()()()()
|9 |:87654321\\__\\|`.replace(/\d/g,o=>`\\${(Math.PI+"2384626433832795028841971693").substr(v,o,v-=-o)}|
${" ".repeat(9-o)+(o<9&o>1?"\\::":"")}`)
If you want to call the function 167 bytes:
z=v=>`()()()()()()
|9 |:87654321\\__\\|`.replace(/\d/g,o=>`\\${(Math.PI+"2384626433832795028841971693").substr(v,o,v-=-o)}|
${" ".repeat(9-o)+(o<9&o>1?"\\::":"")}`)
/*could be run like this or directly in the console*/
console.info("\n"+z(0));
Fourier, 196 190 bytes
New feature alert!
Code
|SaCaaSa|f|~Y0~jY(32aj^~j)|w6(40a41ai^~i)10a~N124a~W92a~S3o46a1415926oWaNaWa58a~CSa53589793oWaNaf2384626oWaNa1wf433832oWaNa2wf79502oWaNa3wf8841oWaNa4wf971oWaNa5wf69oWaNa6wf3oWaNa7wSa95aaSaWa
Explanation
This program is my first demonstration of functions in Fourier:
Functions are defined like so:
|code goes here|f
The first pipe starts the function declaration. You then put the code in between the pipes. The last pipe ends the function declaration. Finally, the f is the variable in which the function is stored. This can be any character, as long as it isn't a reserved function.
For example, in my code, one of the function s is:
|SaCaaSa|f
Where the variable S stores the number 92 and C stores the number 58.
When called, the function outputs the following:
\::\
Since it is the most repeated thing in the pie.
Similarly, to golf down the output, I have used a loop:
6(40a41ai^~i)
Which repeats the code 40a41a 6 times. 40a41a on its own outputs:
()
So repeating the code six times outputs:
()()()()()()
Thereby outputting the crust of the pie.
Because I haven't implemented functions in the Python interpreter, this program will not work on http://tryitonline.net
PowerShell, 105 bytes
'()'*6
'|\3.1415926|
|:\53589793|'
2384626,433832,79502,8841,971,69,3|%{" "*$i+++"\::\$_|"}
' '*7+'\__\|'
Not sure how I never answered this challenge ... I upvoted it and several of the other answers. Oh well, better late than never?
This puts six balanced parens as a string on the pipeline, then a literal string (saves two bytes) of the next two rows. Then, we loop through the rest of the numbers, each iteration incrementing the number of prepended spaces ($i) concatenated with \::<number>|. Finally, we create a string of the tip of the pie. Those strings are all left on the pipeline, and an implicit Write-Output sticks a newline between.
This is 39 bytes shorter than just printing the pie.
Ruby, 140 138 137 bytes
My solution to this problem in ruby, this is my first code golf answer :D
[0,2384626,433832,79502,8841,971,69,3,1].map{|n|puts n<1?"()"*6+"\n|\\3.1415926|\n|:\\53589793|":"\\#{n>1?"::\\#{n}":"__\\"}|".rjust(12)}
Readable version and explanation:
for n in [-1,2384626,433832,79502,8841,971,69,3,0]
if n < 0 # n == -1
puts "()"*6+"\n|\\3.1415926|\n|:\\53589793|"
else
if n > 0 # digits of pi
puts "\\::\\#{n}|".rjust(12)
else # edge of pie
puts "\\__\\|".rjust(12)
end
end
end
Nothing really clever, just using some simple loops :)
Output:
()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|
Jelly, 83 bytes
surely still quite golfabale
7Ḷ⁶ẋ;€“\::\”“|:\”ṭṙ7
⁾()ẋ6⁷⁾|\8ØPæp”|⁷8RUR€µ“⁾ḅ|Za"~ṅỵþȷ^ṇ⁷Ċ’Dṁ;€”|ż@¢Y⁷ø⁶ẋ7“\__\|”
How?
7Ḷ⁶ẋ;€“\::\”“|:\”ṭṙ7 - Link 1, left side padding and filling
7Ḷ - lowered range of 7 ([0,1,2,3,4,5,6])
“\::\” - filling ("\::\")
⁶ẋ;€ - space character repeated that many times and concatenate for each
“|:\” - top crust edge filling ("|:\")
ṭ - tack (append to the end)
ṙ7 - rotate to the left by 7 (move top crust filling to the top)
⁾()ẋ6⁷⁾|\8ØPæp”|⁷8RUR€µ - Main Link (divided into two for formatting)
⁾()ẋ6⁷ - "()" repeated 6 times and a line feed
⁾|\ - "|\"
ØP - pi
8 æp - round to 8 significant figures (top edge of the glaze)
”|⁷ - "|" and a line feed
8R - range of 8 ([1,2,3,4,5,6,7,8])
U - reverse ([8,7,6,5,4,3,2,1])
R€ - range for each ([[1,2,..8],[1,2,..7],...,[1,2],[1]])
µ - monadic chain separation
“⁾ḅ|Za"~ṅỵþȷ^ṇ⁷Ċ’Dṁ;€”|ż@¢Y⁷ø⁶ẋ7“\__\|” - Main link (continued)
“⁾ḅ|Za"~ṅỵþȷ^ṇ⁷Ċ’ - base 250 representation of the rest of the digits
D - decimalise (makes it a list)
ṁ - mould (into the shape of the array formed above)
”| - "|"
;€ - concatenate for each
¢ - call last link (1) as a nilad
ż@ - zip (with reversed operands)
Y⁷ - join with line feeds, and another line feed
ø - niladic chain separation
⁶ẋ7 - space character repeated 7 times
“\__\|” - "\__\|" the very bottom of the pie wedge
Javascript, 172 bytes
Paste into your console to run.
for(y=n=0,s=`()()()()()()
`;y<10;y++,s+=`|
`)for(x=-2;x++<9;)s+=x>y(Math.PI+'2384626433832795028841971693'[n++]:`\\${y>8?'__':x+1|y>1?'::':'||'}\\`[y-x]||' ';console.log(s)
Perl, 93 bytes
$_=bpi$=;printf'()'x6x!$`.'
%12s',F.ee x!$\--^substr"\32::\\$&|",-12while/.{$\}/g
Requires the command line option -l71Mbignum=bpi, counted as 14. The \32 should be replaced by a literal character 26.
Sample Usage
$ perl -l71Mbignum=bpi pi-slice.pl
()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|
Perl, 111 bytes
$_=bpi$_*($l=($.=$_)-3);printf'()'x($./2)x!$`."
%$.s",F.ee x!$l--^substr"\32::\\$&|",-$.while/.{$l}/g
Parameterized version. Requires the command line option -nMbignum=bpi, counted as 12.
Sample Usage
$ echo 10 | perl -nMbignum=bpi pi-slice.pl
()()()()()
|\3.14159|
|:\265358|
\::\97932|
\::\3846|
\::\264|
\::\33|
\::\8|
\__\|
$ echo 20 | perl -nMbignum=bpi pi-slice.pl
()()()()()()()()()()
|\3.141592653589793|
|:\2384626433832795|
\::\028841971693993|
\::\75105820974944|
\::\5923078164062|
\::\862089986280|
\::\34825342117|
\::\0679821480|
\::\865132823|
\::\06647093|
\::\8446095|
\::\505822|
\::\31725|
\::\3594|
\::\081|
\::\28|
\::\4|
\__\|
Pyth, 89 bytes
J_2K+.n0."09\07´\C2\84J\01£\07Nl:?í"*"()"6Vr9Zp*dJp?!Z\|?qZ9"|:""\::"p\\p:KZ+ZN\|=+ZN=hJ)p*dJ"\__\|"
Replace \xx (hexadecimal) with the corresponding ASCII character if you copy/paste the code from this answer; it contains unprintable characters in the packed string which SE filters out.
Explanation
J_2 Sets J to -2
.n0 Pi; returns 3.141592653589793
."(...)" Packed string; returns "2384626433832795028841971693"
+ Concatenation; returns "3.1415926535897932384626433832795028841971693"
K Sets K to that string
*"()"6 Repetition; returns "()()()()()()", which is implicitly printed with a newline
r9Z Range; returns [9, 8, 7, 6, 5, 4, 3, 2, 1] (Z is initialized to 0)
V Loop through r9Z, using N as the loop variable
*dJ Repetition; d is initialized to " " (returns an empty string if J <= 0)
p Print without a newline
?!Z Ternary; if not Z
\| then return "|"
?qZ9 else, ternary; if Z == 9
"|:" then return "|:"
"\::" else, return "\::"
p Print without a newline
\\ One-character string; returns "\"
p Print without a newline
:KZ+ZN Slice; returns K[Z:Z+N], not including K[Z+N]
p Print without a newline
\| One-character string; returns "|", which is implicitly printed with a newline.
=+ZN Adds N to Z
=hJ Increments J by 1
) Ends loop
*dJ Repetition; d is initialized to " "
p Print without a newline
"\__\|" Returns "\__\|", which is implicitly printed with a newline
Lua, 152 Bytes
print[[()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|]]
Try as I might I could not compress this pi.
Lua is just too verbose to do it, maybe a pi of greater size, but not this one.
Another solution, 186 Bytes.
s="()()()()()()\n|\\3.1415926|\n|:\\53589793|\n"i=0 for z in('2384626|433832|79502|8841|971|69|3|'):gmatch'.-|'do s=s..(' '):rep(i)..'\\::\\'..z.."\n"i=i+1 end print(s..' \\__\\|')
Annoyingly Lua's pi isn't accurate enough to even fill the pi. :(
Qbasic, 175 bytes
?"()()()()()()":?"|\3.1415926|":?"|:\53589793|":?"\::\2384626|":?" \::\433832|":?" \::\79502|":?" \::\8841|":?" \::\971|":?" \::\69|":?" \::\3|":?" \__\|"
Python 2, 183 171 bytes
p,d=[2384626,433832,79502,8841,971,69,3],"|\n"
c=("()"*6)+d[1]+"|\\"+`3.1415926`+d+"|:\\"+`53589793`+d
for x in range(7):c+=" "*x+"\\::\\"+`p[x]`+d
print c+" "*7+"\\__\\|"
Does't really do anything clever. Just builds up a big string then prints it out.
EDIT
Reduced to 171 after reading @Lynn's answer and learning. Sorry if it is wrong to (shamelessly) steal some bytes from you without you suggesting it. Please tell me if so and I will roll back the change.
Output
python pi.pie.py
()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|
MATL, 70 68 67 bytes
'()'12:)l10:&<toYP43Y$51hb(!10Xy'\::\'FFhZ++'|'3$Yc'||\'3:(95'Zd'o(
Explanation
What a mess. But hey, there's a convolution!
The explanation will be clearer if you can inspect the stack contents after a given statement. To do it, just insert X#0$% at that point. (This means: X# show stack contents, 0$ don't implicitly display anything else, % comment out rest of the code). For example, see the stack right after the convolution.
'()' % Push this string
12: % Range [1 2 ... 12]
) % Index into string (modular, 1-based): gives '()()()()()()'
l % Push 1 (will be used later)
10: % Range [1 2 ... 10]
&< % All pairwise "less than" comparisons. Gives matrix with "true"
% below the main diagonal, and the remining entries equal to "false"
to % Duplicate. Convert to numbers (true becomes 1, false becomes 0)
YP43Y$ % Compute pi with 43 significant digits (42 decimals). Gives a string
51h % Append last decimal, '3' (ASCII 51). This is needed to avoid rounding
b % Bubble up the true-false matrix, to be used as logical index
( % Fill the chars from the pi string into the 0-1 matrix, at the positions
% indicated by the true-false matrix. Thus each 1 is replaced by a char
% from the pi string. Entries that were 0 remain as 0. This is done in
% columm-major order...
! % ...so transpose to make it row-major
10Xy % Identity matrix of size 10
'\::\' % Push this string...
FFh % ...and append two zeros
Z+ % 2D convolution keeping size. The identity matrix convolved with the
% above string gives the diagonal bands with chars '\' and ':'
+ % Add to the matrix containing the digits of pi. At each entry, only one
% of the two matrices is nonzero
'|' % Push this string
3$Yc % Three-input string concatenation. This prepends the 1 (which was pushed
% a while ago) and appends '|' to each row of the matrix. This converts
% the matrix to char. Note that char 1 will be displayed as a space. We
% used char 1 and not char 0 (which would be displayed as a space too)
% because function `Yc` (`strcat`) strips off trailing space from the
% inputs, counting char 0 as space, but not char 1
'||\' % Push this string
3:( % Assign it to the first 3 entries of the matrix (column-major), that is,
% to the top of the first column
95 % Push ASCII for '_'
'Zd'o % Push string 'Zd' and convert to numbers: gives [90 100]. These are the
% (column-major) indices where the '_' char should appear in the last row
( % Fill those chars
% Implicitly display. (Chars 0 and 1 are displayed as space)
C# 220 213 209 208 202 201 (171*) Bytes
*I find this to be unoriginal and cheating
void F()=>Console.Write(@"()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|");
201 Bytes:
void f(){var s="()()()()()()\n";for(int i=0;i<9;)s+=(i<1?"|":i<2?"|:":"\\::".PadLeft(i+1))+$"\\{new[]{3.1415926,53589793,2384626,433832,79502,8841,971,69,3}[i++]}|\n";Console.Write(s+@" \__\|");}
220 bytes:
I'm sure that there is something to be golfed here
void f(){string s="()()()()()()\n",x=" ";for(int i=9,j=0;i>0;j+=i--)s+=(i>7?"|"+(i<9?":":"")+"\\":x.Substring(i)+@"\::\")+$"{Math.PI}32384626433832795028841971693".Substring(j,i)+"|\n";Console.Write(s+x+@"\__\|");}
Java 7, 260 236 191 bytes
String d(){return"()()()()()()\n|\\3.1415926|\n|:\\53589793|\n\\::\\2384626|\n \\::\\433832|\n \\::\\79502|\n \\::\\8841|\n \\::\\971|\n \\::\\69|\n \\::\\3|\n \\__\\|";}
Sigh, simply outputting the pie is shorter, even with all the escaped backslashes.. >.>
Here is previous answer with a tiny bit of afford, although still not very generic or fancy (236 bytes):
String c(){String n="\n",p="|",q=p+n,x="\\::\\",s=" ",z=s;return"()()()()()()"+n+p+"\\"+3.1415926+q+p+":\\53589793"+q+x+2384626+q+s+x+433832+q+(z+=s)+x+79502+q+(z+=s)+x+8841+q+(z+=s)+x+971+q+(z+=s)+x+69+q+(z+=s)+x+3+q+(z+=s)+"\\__\\|";}
A pretty boring answer, since simply outputting the result without too much fancy things is shorter in Java than a generic approach.
Ungolfed & test code:
class M{
static String c(){
String n = "\n",
p = "|",
q = p + n,
x = "\\::\\",
s = " ",
z = s;
return "()()()()()()" + n + p + "\\" + 3.1415926 + q + p + ":\\53589793" + q + x + 2384626 + q + s
+ x + 433832 + q + (z += s) + x + 79502 + q + (z += s) + x + 8841 + q
+ (z += s) + x + 971 + q + (z += s) + x + 69 + q + (z += s) + x + 3 + q
+ (z += s) + "\\__\\|";
}
public static void main(String[] a){
System.out.println(c());
}
}
Output:
()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|
Python 2, 193 176 bytes
P="3.1415926 53589793 2384626 433832 79502 8841 971 69 3".split()
f="()"*6+"\n|\%s|\n|:\%s|\n"%(P[0],P[1])
for s in range(7):f+=" "*s+"\::\\"+P[s+2]+"|\n"
print f+" "*7+"\__\|"
Or a shorter, more boring answer:
print r"""()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|"""
Bash, 153 bytes
cat << _
()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|
_
Python 2, 131 bytes
print'()'*6+'\n|\\3.1415926|\n|:\\53589793|'
for n in 2384626,433832,79502,8841,971,69,3,'':print'%11s|'%('\%s'*2%('_:'[n<'']*2,n))
Joint effort between Sp3000 and Lynn. Copper saved a byte, too! Ideone link.
PHP, 170 bytes
no arbritrary precision Pi in PHP? Calculating takes much more space than Copy&Paste. Doesn´t matter that the last digit here is cut, not rounded; but in 64 bit Pi the last digit gets rounded up.
for(;$i<11;)echo str_pad($i?["\\__\\","|\\","|:\\","\\::\\"][$i>9?0:min(3,$i)].[3.1415926,53589793,2384626,433832,79502,8841,971,69,3][$i-1]."|
":"
",13,$i++?" ":"()",0);
Run with php -r '<code>'
uncommented breakdown
for(;$i<11;)
echo str_pad($i?
["\\__\\","|\\","|:\\","\\::\\"][$i>9?0:min(3,$i)]
.[3.1415926,53589793,2384626,433832,79502,8841,971,69,3][$i-1]
."|\n"
:"\n"
,13,$i++?" ":"()",0);
///, 129 127 bytes
/-/\\\\//&/--::--//%/ //#/|
%//!/()()/!!!
|-3.1415926|
|:-53589793|
&2384626|
&433832#&79502# &8841#%&971#% &69#%%&3#%% -__-|
JavaScript (ES6), 187 174 bytes
This is 1 byte shorter than just displaying the plain text.
for(y=n=0,s=`()()()()()()
`;y<10;y++,s+=`|
`)for(x=-2;x++<9;)s+=x>y?(Math.PI+'2384626433832795028841971693')[n++]:`\\${y>8?'__':x+1|y>2?'::':'||'}\\`[y-x]||' ';console.log(s)
Batch, 195 bytes
@echo ()()()()()()
@echo ^|\3.1415926^|
@echo ^|:\53589793^|
@set i=\
@for %%d in (2384626 433832 79502 8841 971 69 3)do @call:l %%d
@echo %i%__\^|
@exit/b
:l
@set i= %i%
@echo%i%::\%1^|