Write language name in 3D ASCII: Difference between revisions

m
m (syntax highlighting fixup automation)
 
(9 intermediate revisions by 5 users not shown)
Line 523:
for %%b in (
""
" /$$$$$$$####### /$$$$$$ ###### /$$$$$$$$######## /$$$$$$ ###### /$$## /$$##"
"| $$##__ $$|## $$/##__ $$##|__ $$##__/| $$/##__ $$##| $$## | $$##"
"| $$## \| $$##| $$## \| $$## | $$## | $$## \__/| $$## | $$##"
"| $$$$$$$####### | $$$$$$$$######## | $$## | $$## | $$$$$$$$########"
"| $$##__ $$##| $$##__ $$## | $$## | $$## | $$##__ $$##"
"| $$## \| $$##| $$## | $$## | $$## | $$ ## $$/##| $$## | $$##"
"| $$$$$$$#######/| $$## | $$## | $$## | $$$$$$######/| $$## | $$##"
"|_______/ |__/ |__/ |__/ \______/ |__/ |__/"
""
Line 609:
 
</pre>
 
=={{header|Binary Lambda Calculus}}==
 
Using the fact that an asterisk at the start of a program copies the rest to stdout:
 
<pre>* ____
/\ _`\ __
\ \ \L\ \ /\_\ ___ __ _ __ __ __
\ \ _ <'\/\ \ /' _ `\ /'__`\ /\`'__\/\ \/\ \
\ \ \L\ \\ \ \/\ \/\ \/\ \L\.\_\ \ \/ \ \ \_\ \
\ \____/ \ \_\ \_\ \_\ \__/.\_\\ \_\ \/`____ \
\/___/ \/_/\/_/\/_/\/__/\/_/ \/_/ `/___/> \
__ __ __ /\___/
/\ \ /\ \ /\ \ \/__/
\ \ \ __ ___ ___\ \ \____ \_\ \ __
\ \ \ __ /'__`\ /' __` __`\ \ '__`\ /'_` \ /'__`\
\ \ \L\ \/\ \L\.\_/\ \/\ \/\ \ \ \L\ \/\ \L\ \/\ \L\.\_
\ \____/\ \__/.\_\ \_\ \_\ \_\ \_,__/\ \___,_\ \__/.\_\
\/___/ \/__/\/_/\/_/\/_/\/_/\/___/ \/__,_ /\/__/\/_/
____ ___ ___
/\ _`\ /\_ \ /\_ \
\ \ \/\_\ __ \//\ \ ___ __ __\//\ \ __ __ ____
\ \ \/_/_ /'__`\ \ \ \ /'___\/\ \/\ \ \ \ \ /\ \/\ \ /',__\
\ \ \L\ \/\ \L\.\_ \_\ \_/\ \__/\ \ \_\ \ \_\ \_\ \ \_\ \/\__, `\
\ \____/\ \__/.\_\/\____\ \____\\ \____/ /\____\\ \____/\/\____/
\/___/ \/__/\/_/\/____/\/____/ \/___/ \/____/ \/___/ \/___/</pre>
 
=={{header|Brainf***}}==
Line 1,710 ⟶ 1,736:
 
</pre>
 
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
_window = 1
begin enum 1
_asciiField
end enum
 
void local fn BuildWindow
CGRect r = fn CGRectMake( 0, 0, 610, 140 )
window _window, @"Rosetta Code — FutureBasic in 3D ASCII", r, NSWindowStyleMaskTitled + NSWindowStyleMaskClosable
WindowSetBackgroundColor( _window, fn ColorBlack )
CFStringRef asciiFB = @" ¬
/$$$$$$$$ / $$ /$$$$$$$ /$$ \n¬
| $$_____/ | $$ | $$__ $$ |__/ \n¬
| $$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$ | $$ \\ $$ /$$$$$$ /$$$$$$$ /$$ /$$$$$$$\n¬
| $$$$$ | $$ | $$|_ $$_/ | $$ | $$ /$$__ $$ /$$__ $$| $$$$$$$ |____ $$ /$$_____/| $$ /$$_____/\n¬
| $$__/ | $$ | $$ | $$ | $$ | $$| $$ \\__/| $$$$$$$$| $$__ $$ /$$$$$$$| $$$$$$ | $$| $$ \n¬
| $$ | $$ | $$ | $$ /$$| $$ | $$| $$ | $$_____/| $$ \\ $$ /$$__ $$ \\____ $$| $$| $$ \n¬
| $$ | $$$$$$/ | $$$$/| $$$$$$/| $$ | $$$$$$$| $$$$$$$/| $$$$$$$ /$$$$$$$/| $$| $$$$$$$\n¬
|__/ \\______/ \\___/ \\______/ |__/ \\_______/|_______/ \\_______/|_______/ |__/ \\_______/\n"
r = fn CGRectMake( 22, 20, 582, 100 )
textfield _asciiField, YES, asciiFB, r, _window
TextFieldSetTextColor( _asciiField, fn ColorYellow )
TextFieldSetBordered( _asciiField, NO )
TextFieldSetBackgroundColor( _asciiField, fn ColorBlack )
ControlSetFontWithName( _asciiField, @"Menlo", 9.0 )
end fn
 
void local fn DoDialog( ev as long, tag as long, wnd as long )
select ( ev )
case _windowWillClose : end
end select
end fn
 
on dialog fn DoDialog
 
fn BuildWindow
 
HandleEvents
</syntaxhighlight>
{{output}}
[[File:FutureBasic in ASCII Art.png]]
 
 
 
=={{header|Go}}==
Line 2,816 ⟶ 2,890:
///\/ ///\/ ////////////\ ////////////\/ ////////////\ ///\/ ////////////\/ ///\/
\\\/ \\\/ \\\\\\\\\\\\/ \\\\\\\\\\\\/ \\\\\\\\\\\\/ \\\/ \\\\\\\\\\\\/ \\\/
</pre>
 
=={{header|Plain English}}==
<syntaxhighlight lang="text">
To run:
Start up.
Print the language name in 3D ASCII.
Wait for the escape key.
Shut down.
 
To print the language name in 3D ASCII:
Write "Osmosian Order of" to the console.
Write " ____ _ _" to the console.
Write "/___ \ /_/| /_/|" to the console.
Write "| \ \| || ____ |_|/ _____" to the console.
Write "| |\ \|| || /___/| _ /____/\" to the console.
Write "| | | || || / ||/_/|| \ \" to the console.
Write "| |/ / | ||/ /| ||| ||| |\ \/" to the console.
Write "| __/ | ||| | | ||| ||| | | ||" to the console.
Write "| || | ||\ \| ||| ||| | | ||" to the console.
Write "|_|/ |_|/ \____|/|_|/|_| |_|/" to the console.
Write " ______ _ _ _" to the console.
Write "/_____/| /_/|/_/| /_/|" to the console.
Write "| ___|/ _____ ____ | |||_|/ _______| ||__" to the console.
Write "| ||___ /____/\ /___/|| || _ /______/| /__/\" to the console.
Write "| |/__/|| \ \ / ||| ||/_/|/ ___|/| \ \" to the console.
Write "| ___|/| |\ \// /| ||| ||| ||| |___/\| |\ \/" to the console.
Write "| ||___ | | | ||| | | ||| ||| ||\____ \|| | | ||" to the console.
Write "| |/__/|| | | ||\ \| ||| ||| ||____| || | | ||" to the console.
Write "|_____|/|_| |_|/ \__ |||_|/|_|/|_____/ |_| |_|/" to the console.
Write " ___| ||" to the console.
Write " /___/ //" to the console.
Write " |____//" to the console.
Write "Programmers" to the console.
</syntaxhighlight>
{{out}}
<pre>
Osmosian Order of
____ _ _
/___ \ /_/| /_/|
| \ \| || ____ |_|/ _____
| |\ \|| || /___/| _ /____/\
| | | || || / ||/_/|| \ \
| |/ / | ||/ /| ||| ||| |\ \/
| __/ | ||| | | ||| ||| | | ||
| || | ||\ \| ||| ||| | | ||
|_|/ |_|/ \____|/|_|/|_| |_|/
______ _ _ _
/_____/| /_/|/_/| /_/|
| ___|/ _____ ____ | |||_|/ _______| ||__
| ||___ /____/\ /___/|| || _ /______/| /__/\
| |/__/|| \ \ / ||| ||/_/|/ ___|/| \ \
| ___|/| |\ \// /| ||| ||| ||| |___/\| |\ \/
| ||___ | | | ||| | | ||| ||| ||\____ \|| | | ||
| |/__/|| | | ||\ \| ||| ||| ||____| || | | ||
|_____|/|_| |_|/ \__ |||_|/|_|/|_____/ |_| |_|/
___| ||
/___/ //
|____//
Programmers
</pre>
 
Line 2,856 ⟶ 2,990:
<b>Implementation 1:</b> based on the Scala type idea of 'fleshing out' a 2D banner version.
<syntaxhighlight lang="python">py = '''\
##### # # ##### # # #### # #
# # # # # # # # # ## #
# ### # # ###### # # # # #
##### # # # # # # # # #
# # # # # ### # # ##'''
 
# # # # # #### # #
lines = py.replace('#', '<<<').replace(' ','X') \
'''
.replace('X', ' ').replace('\n', ' Y') \
.replace('< ', '<>').split('Y')
 
lines = py.replace('#', '<<<').replace(' ','X').replace('X', ' ').replace('\n', ' Y').replace('< ', '<>').split('Y')
for i, l in enumerate(lines):
print( ' ' * (len(lines) - i) + l)</syntaxhighlight>
 
{{out}}
<pre> style="overflow-x: auto; white-space: pre;"> <<<<<<<<<<<<<<<> <<<> <<<> <<<<<<<<<<<<<<<> <<<> <<<> <<<<<<<<<<<<> <<<> <<<>
<<<> <<<> <<<> <<<> <<<> <<<> <<<> <<<> <<<> <<<<<<> <<<>
<<<> <<<<<<<<<> <<<> <<<> <<<<<<<<<<<<<<<<<<> <<<> <<<> <<<> <<<> <<<>
<<<> <<<<<<<<<<<<<<<> <<<> <<<> <<<> <<<> <<<> <<<> <<<> <<<> <<<>
<<<> <<<> <<<> <<<> <<<> <<<<<<<<<> <<<> <<<> <<<<<</pre>
<<<> <<<> <<<> <<<> <<<> <<<<<<<<<<<<> <<<> <<<></pre>
 
<b>Implementation 2:</b>
<syntaxhighlight lang="python">charWidth = 10
charHeight = 8
 
# char table is split into sets to prevent very long lines...
charSet1 = [
" / ###### /####### / ###### /###### /######## /######## / ###### /## /##",
"| /##__ ##| ##__ ##| /##__ ##| ##__ ## | ##_____/| ##_____/| /##__ ##| ## | ##",
"| ## \| ##| ## \| ##| ## \__/| ## \ ##| ## | ## | ## \__/| ## | ##",
"| ########| ####### | ## | ## | ##| ########| ########| ## #####| ########",
"| ##__ ##| ##__ ##| ## | ## | ##| ##_____/| ##_____/| ##|_ ##| ##__ ##",
"| ## | ##| ## \| ##| ## /##| ## /##/| ## | ## | ## | ##| ## | ##",
"| ## | ##| #######/| ######/| ######/ | ########| ## | ######/| ## | ##",
"|__/ |__/|_______/ \______/ |______/ |________/|__/ \______/ |__/ |__/",
Line 2,893 ⟶ 3,027:
 
charSet2 = [
" /######## /## /## /## /## /### / ### /## /## / ###### /####### ",
"|__ ##__/ | ##| ## /##/| ## | ########| ### | ##| /##__ ##| ##__ ##",
" | ## | ##| ## /##/ | ## | ## ## ##| ####| ##| ## \| ##| ## \| ##",
" | ## | ##| #####/ | ## | ## ## ##| ## ## ##| ## | ##| #######/",
" | ## | ##| ## ## | ## | ## ## ##| ## ####| ## | ##| ##____/ ",
Line 2,904 ⟶ 3,038:
 
charSet3 = [
" / ###### /####### / ###### /######## /## /## /## /## /## /## /## /##",
"| /##__ ##| ##__ ##| /##__ ##|__ ##__/| ## | ##| ## | ##| ## | ##\ ## /##/",
"| ## \| ##| ## \| ##| ## \__/ | ## | ## | ##| ## | ##| ## ## ## \ ####/ ",
"| ## | ##| #######/ \ ###### | ## | ## | ##| ## | ##| ## ## ## \ ##/ ",
"| ## ## ##| ## ## \___ ## | ## | ## | ##| ## / ##/| ## ## ## / #### ",
"| ##\ ###/| ##\ ## /## \ ## | ## | ## | ## \ ####/ | ######## / ## ## ",
"| #### ##| ## \ ##\ ######/ | ## | ######/ \ ##/ | ###| ###/ ## \ ##",
Line 2,915 ⟶ 3,049:
 
charSet4 = [
" /## /## /######## / ###### ",
"\ ## /##/|____ ##/| /##__ ## ",
" \ ####/ / ##/ | ## \| ## ",
" \ ##/ / ##/ |__//####/ ",
" | ## / ##/ | ##_/ ",
Line 2,935 ⟶ 3,069:
if not text:
text = "PYTHON"
 
for i in range(charHeight):
lineOut = ""
Line 2,952 ⟶ 3,086:
 
{{out}}
<pre> /####### /## /## /######## /## /## / ###### /## /##
| ##__ ##\ ## /##/|__ ##__/| ## | ##| /##__ ##| ### | ##
| ## \| ## \ ####/ | ## | ## | ##| ## \| ##| ####| ##
| #######/ \ ##/ | ## | ########| ## | ##| ## ## ##
| ##____/ | ## | ## | ##__ ##| ## | ##| ## ####
Line 3,965 ⟶ 4,099:
=={{header|Wren}}==
This uses the 3D ASCII letter font [https://github.com/arpan98/3dwrite/blob/master/3d_font.txt here].
<syntaxhighlight lang="ecmascriptwren">var w = """
____ ____ ____
|\ \ |\ \ |\ \
56

edits