Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 9424

This challenge involves creating or parsing pictures using text characters as the paint. Typically this uses only 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963.

1 vote

Very Simple Triangles

Bash, 166 127 125 119 105 bytes printf -v l %$[$1/2]s;(($1%2))&&r= j=$l\ ||r=/ j=$l;echo " ${l// /____} ${j// / /\ } $r ${j// //__\\}"$r In a function: triangle() { printf -v l %$[$1/2]s;(($1%2) …
F. Hauri  - Give Up GitHub's user avatar
1 vote

UTF-8 Reduce Ascii art

Bash (203, 197 chars) #!/bin/bash r=" ▝▘▀▗▐▚▜▖▞▌▛▄▟▙█" IFS=;while read -r m;do read -r n o;for((l=${#m}>${#n}?${#m}:${#n},i=0; i<l; i+=2)){ printf -ve %-2s "${n:i:2}" "${m:i:2}";e=${e//[^ ]/1};o+=${r: …
F. Hauri  - Give Up GitHub's user avatar
1 vote

UTF-8 Reduce Ascii art

Perl (192 chars) #!/usr/bin/perl -CS use utf8;my$r=" ▘▝▀▖▌▞▛▗▚▐▜▄▙▟█";while($v=<>){$w=<>;foreach my$i(0..length($v)/2){($x=substr($v,$i*2,2).substr($w,$i*2,2))=~s/\S/1/g;$x=~s/ /0/g;print substr($r,or …
F. Hauri  - Give Up GitHub's user avatar
0 votes

Draw an ASCII-art rainbow

Bash, 53 bytes printf -v v %$1s;echo -e " ${v// /_} \n/$v\\\\\n|$v|" Try it online!
F. Hauri  - Give Up GitHub's user avatar
8 votes

Build an analog clock

100% pure bash only! Without fork! A finalized and upgraded version could be found there or on this page: ascii-clock for geeks. But don't use it! Read the note at end of this answer, you've been war …
F. Hauri  - Give Up GitHub's user avatar
2 votes

Code Golf Christmas Edition: How to print out a Christmas tree of height N

Bash: 126120 As there is no bash purpose, there is one: for((z=$1-1;z;z--)){ printf -v s "%$((($1-z)*2-1))s" "" printf "%$((2*$1-z))s\n" "${s// /*}";};printf "%$((1+$1))s\n" \* This could be writt …
F. Hauri  - Give Up GitHub's user avatar
2 votes

Build an analog clock

Javascript 2169 - 434 = 1735 Ok, it's a lot, but they are fine and work same as my previous variant in previous posts (bash and perl). This version is more obfuscated than the one you may find on my …
F. Hauri  - Give Up GitHub's user avatar
5 votes

Build ASCII ladders

Pure bash, 132 130 128 127 bytes Yes I could drop 1 more byte replacing last ${p% *}, but I prefer this: p=printf\ -v;$p a %$1s;$p b %$2s;o="|$a|\n";h=+${a// /-}+\\n v=${a// /$o} a=${b// /$h$v}${h// …
F. Hauri  - Give Up GitHub's user avatar
3 votes

Build an analog clock

Perl 5 x 65 = 325 - 65(20%) = 260 chars!! Clean, circular, with a second tick and updated every seconds. perl -E ' $r=11;$p=atan2(1,1)/7.5;sub c{($A,$R,$C)=@_;$a[$r-$R*cos($A*$p)][ $r+$R*sin($A*$p)]=$ …
F. Hauri  - Give Up GitHub's user avatar
15 votes
6 answers
2k views

UTF-8 Reduce Ascii art

This challenge is a cut'n paste from Enlarge ASCII art, but reversed, using PetSCII based half-block chars: string=" ▝▘▀▗▐▚▜▖▞▌▛▄▟▙█" There, PetSCII is emulated by using UTF-8 characters, you may fou …
F. Hauri  - Give Up GitHub's user avatar
1 vote

Binary Slashes Display

Pure bash 170 Reading other answers here and re-reading request, there is a version without integer to binary conversion: l=${1//1};t=${#1};printf -vk '%*s' $[t+${#l}-1];p=;for((c=t;c--;)){ ((${1:c:1} …
F. Hauri  - Give Up GitHub's user avatar
2 votes

I-Ching pair binary computer

Pure bash 252 u=(▅▅▅{' ',▅}▅▅▅);m=_yWgXUL8CMB1Dxief5HaN@6mKAbIrjPG;s=$[($1-1)/2];r=$[64#${m:s:1}];for i in {0..5};do echo ${u[(r>>i)&1]} ${u[((r>>5)%2==r%2)&((r>>4)%2==(r>>1)%2)&((r>>3)%2==(r>>2)%2)? …
F. Hauri  - Give Up GitHub's user avatar
2 votes

Blinking twelve

Javascript (in browser), 174 160 159 122 112 111 109 107 66 (91) bytes I've taked of pre because using monotyped font is not part of requirement, so my new count is 66. Some chars are added to use mo …
F. Hauri  - Give Up GitHub's user avatar
10 votes
3 answers
477 views

I-Ching pair binary computer

Introduction I Ching is an ancient divination text and the oldest of the Chinese classics. It uses a type of divination called cleromancy, which produces apparently random numbers. The basic unit of …
F. Hauri  - Give Up GitHub's user avatar
11 votes

Blinking twelve

bash, 58 56 45 41 bytes New version 2022, (not very system friendly), but... bash <(yes "read -t.5 -p"{--:--,12:00}\;) or with newline: 45 bash <(yes "read -t.5 -p' "{--:--,12:00}"';") or with carri …
F. Hauri  - Give Up GitHub's user avatar

15 30 50 per page