Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve easter_egg logo resolution #987

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/irb/easter-egg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def render_frame(i)

private def easter_egg_logo(type)
@easter_egg_logos ||= File.read(File.join(__dir__, 'ruby_logo.aa'), encoding: 'UTF-8:UTF-8')
.split(/TYPE: ([A-Z]+)\n/)[1..]
.split(/TYPE: ([A-Z_]+)\n/)[1..]
.each_slice(2)
.to_h
@easter_egg_logos[type.to_s.upcase]
Expand All @@ -112,7 +112,8 @@ def render_frame(i)
when :logo
require "rdoc"
RDoc::RI::Driver.new.page do |io|
io.write easter_egg_logo(:large)
type = STDOUT.external_encoding == Encoding::UTF_8 ? :unicode_large : :ascii_large
io.write easter_egg_logo(type)
end
when :dancing
STDOUT.cooked do
Expand Down
112 changes: 75 additions & 37 deletions lib/irb/ruby_logo.aa
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
TYPE: LARGE
TYPE: ASCII_LARGE

-+smJYYN?mm-
HB"BBYT TQg NggT
9Q+g Nm,T 8g NJW
YS+ N2NJ"Sg N?
BQg #( gT Nggggk J
5j NJ NJ NNge
#Q #JJ NgT N(
@j bj mT J
Bj @/d NJ (
#q #(( NgT #J
5d #(t mT $d
#q @(@J NJB;
@( 5d ? HHH H HQmgggggggmN qD
5d #uN 2QdH E O
5 5JSd Nd NJH @d j
Fd @J4d s NQH #d (
#( #o6d Nd NgH #d #d
4 B&Od v NgT #d F
#( 9JGd NH NgUd F
#d #GJQ d NP $
#J #U+#Q N Q # j
j /W BQ+ BQ d NJ NJ
- NjJH HBIjTQggPJQgW N W k #J
#J b HYWgggN j s Nag d NN b #d
#J 5- D s Ngg N d Nd F
Fd BKH2 #+ s NNgg J Q J ]
F H @ J N y K(d P I
F4 E N? #d y #Q NJ E j
F W Nd q m Bg NxW N(H-
F d b @ m Hd gW vKJ
NJ d K d s Bg aT FDd
b # d N m BQ mV N>
e5 Nd #d NggggggQWH HHHH NJ -
m7 NW H N HSVO1z=?11-
NgTH bB kH WBHWWHBHWmQgg&gggggNNN
NNggggggNN
,,,;;;;;;;;;;;;;;;;;;;;;;,,
,,,;;;;;;;;;,, ,;;;' ''';;,
,,;;;''' ';;;, ,,;;'' '';,
,;;'' ;;;;;;;;,,,,,, ';;
,;;'' ;;;;';;;'''';;;;;;;;;,,,;;
,,;'' ;;;; ';;, ''''';;,
,;;' ;;;' ';;, ;;
,;;' ,;;; '';,, ;;
,;;' ;;; ';;, ,;;
;;' ;;;' '';,, ;;;
,;' ;;;; ';;, ;;'
,;;' ,;;;;' ,,,,,,,,,,,,;;;;;
,;' ,;;;;;;;;;;;;;;;;;;;;'''''''';;;
;;' ,;;;;;;;;;,, ;;;;
;;' ,;;;'' ;;, ';;,, ,;;;;
;;' ,;;;' ;; '';;, ,;';;;
;;' ,;;;' ;;, '';;,, ,;',;;;
,;;; ,;;;' ;; '';;,, ,;' ;;;'
;;;; ,,;;;' ;;, ';;;' ;;;
,;;; ,;;;;' ;; ,;;; ;;;
;;;;; ,,;;;;;' ;;, ,;';; ;;;
;;;;;, ,,;;;;;;;' ;; ,;;' ;;; ;;;
;;;;;;;,,,,,,,;;;;;;;;;;;;;;,,, ;;, ,;' ;; ;;;
;;' ;;;;;;;;;;'''' ,;';; ''';;;;,,, ;; ,;; ;; ;;;
;; ;;;'' ;; ';; ''';;;;,,,, ;;, ,;;' ;;, ;;
;; ;;;;, ;;' ';; ''';;;;,,;;;;' ';; ;;
;;;;;;';, ,;; ;; '';;;;, ;;,;;
;;; ;; ;;, ;; ;; ,;;' ';;, ;;;;;
;; ;;; ;;, ;;' ;; ,,;'' ';;, ;;;;;
;; ;; ;; ;; ;; ,;;' '';, ;;;;
;;,;; ;; ;;' ;; ,;;'' ';,, ;;;'
;;;; ';; ,;; ;;,,;;'' ';;, ;;;
';;; ';; ;; ,;;;;;;;;;;;;;,,,,,,,,,,,, ';;;;;
';, ';,;;' ,,,;;'' '''''''';;;;;;;;;;;;;;;;;;;
';;,,, ;;;; ,,,,;;;;;;,,,,,;;;;;;;;;;;;;;;;;;;''''''''''''''
''';;;;;;;;;;;;;;'''''''''''''''
TYPE: ASCII
,,,;;;;''''';;;'';,
,,;'' ';;,;;; ',
Expand All @@ -57,6 +57,44 @@ TYPE: ASCII
;;; '; ;' ';,,'' ';,;;
'; ';,; ,,;''''''''';;;;;;,,;;;
';,,;;,,;;;;;;;;;;''''''''''''''
TYPE: UNICODE_LARGE

⣀⣤⣴⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣤⣄⡀
⢀⣀⣤⣴⣾⣿⣿⣿⠿⣿⣿⣿⣿⣦⣀ ⢀⣤⣶⣿⠿⠛⠁⠈⠉⠙⠻⢿⣷⣦⡀
⢀⣠⣴⣾⡿⠿⠛⠉⠉ ⠈⠙⢿⣿⣷⣤⡀ ⣠⣴⣾⡿⠟⠉ ⠉⠻⣿⣦
⢀⣤⣶⣿⠟⠋⠁ ⢿⣿⣿⣿⣿⣿⣿⣧⣤⣤⣤⣀⣀⣀⡀ ⠘⢿⣷⡀
⢀⣠⣾⡿⠟⠉ ⢸⣿⣿⣿⠟⢿⣿⣯⡙⠛⠛⠛⠿⠿⠿⢿⣿⣿⣶⣶⣶⣦⣤⣬⣿⣧
⣠⣴⣿⠟⠋ ⢸⣿⣿⡿ ⠈⠻⣿⣶⣄ ⠉⠉⠉⠙⠛⢻⣿⡆
⣠⣾⡿⠛⠁ ⣼⣿⣿⠃ ⠈⠙⢿⣷⣤⡀ ⠈⣿⡇
⣠⣾⡿⠋ ⢠⣿⣿⡏ ⠙⠻⣿⣦⣀ ⣿⡇
⣠⣾⡿⠋ ⢀⣿⣿⣿ ⠈⠛⢿⣷⣄⡀ ⢠⣿⡇
⢀⣾⡿⠋ ⢀⣾⣿⣿⠇ ⠙⠻⣿⣦⣀ ⢸⣿⡇
⢀⣴⣿⠟⠁ ⢀⣾⣿⣿⡟ ⠈⠻⢿⣷⣄ ⣾⣿⠇
⢠⣾⡿⠃ ⣠⣿⣿⣿⣿⠃ ⣀⣀⣀⣀⣀⣀⣀⣀⣤⣤⣤⣤⣽⣿⣿⣿⣿
⣰⣿⠟ ⣴⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠿⠿⠿⠿⠿⠿⠿⠿⠛⠛⠛⠛⠛⠛⠛⠛⣿⣿⣿
⣼⣿⠏ ⢠⣾⣿⣿⣿⡿⣿⣿⢿⣷⣦⣄ ⣼⣿⣿⣿
⣼⣿⠃ ⢀⣴⣿⣿⣿⠟⠋ ⢸⣿⡆⠈⠛⠿⣿⣦⣄⡀ ⣰⣿⣿⣿⡇
⢀⣾⣿⠃ ⢀⣴⣿⣿⣿⠟⠁ ⣿⣷ ⠈⠙⠻⣿⣶⣄⡀ ⣰⣿⠟⣿⣿⡇
⢀⣾⣿⠇ ⢀⣴⣿⣿⣿⠟⠁ ⢸⣿⡆ ⠙⠻⢿⣷⣤⣀ ⣰⣿⠏⢠⣿⣿⡇
⢠⣿⣿⡟ ⢀⣴⣿⣿⡿⠛⠁ ⣿⣷ ⠉⠻⢿⣷⣦⣀ ⣴⣿⠏ ⢸⣿⣿⠃
⣿⣿⣿⡇ ⣠⣴⣿⣿⡿⠋ ⢸⣿⡆ ⠈⠛⢿⣿⣿⠃ ⢸⣿⣿
⢠⣿⣿⣿ ⢀⣴⣾⣿⣿⡿⠋ ⠈⣿⣧ ⢠⣾⣿⣿ ⢸⣿⣿
⢸⣿⣿⣿⡇ ⣀⣴⣾⣿⣿⣿⡿⠋ ⢹⣿⡆ ⣴⣿⠟⢹⣿⡀ ⢸⣿⡿
⢸⣿⡟⣿⣿⣄ ⣀⣤⣶⣿⣿⣿⣿⣿⡟⠉ ⠈⣿⣷ ⢠⣾⡿⠋ ⢸⣿⡇ ⣼⣿⡇
⢸⣿⡇⢹⣿⣿⣷⣦⣤⣤⣤⣤⣤⣴⣶⣾⣿⣿⣿⣿⡿⠿⣿⣿⣿⣿⣷⣶⣤⣤⣀⡀ ⢹⣿⡆ ⢀⣴⣿⠟ ⣿⣧ ⣿⣿⡇
⢸⣿⠃ ⢿⣿⣿⣿⣿⣿⣿⡿⠿⠿⠛⠛⠉⠉⠁ ⢰⣿⠟⣿⣷⡀⠉⠙⠛⠿⢿⣿⣶⣦⣤⣀⡀ ⠈⣿⣷ ⣠⣿⡿⠁ ⢿⣿ ⣿⣿⡇
⢸⣿ ⢀⣾⣿⣿⠋⠉⠁ ⢀⣿⡿ ⠘⣿⣷⡀ ⠉⠙⠛⠿⠿⣿⣶⣦⣤⣄⣀ ⢹⣿⡄ ⣠⣾⡿⠋ ⢸⣿⡆ ⣿⣿
⣸⣿⢀⣾⣿⣿⣿⣆ ⣸⣿⠃ ⠘⢿⣷⡀ ⠈⠉⠛⠻⠿⣿⣷⣶⣤⣌⣿⣷⣾⡿⠋ ⠘⣿⡇ ⣿⣿
⣿⣿⣾⡿⣿⡿⠹⣿⡆ ⢠⣿⡏ ⠈⢿⣷⡀ ⠈⠉⠙⣻⣿⣿⣿⣀ ⣿⣷⢰⣿⣿
⣿⣿⡿⢁⣿⡇ ⢻⣿⡄ ⣾⣿ ⠈⢿⣷⡀ ⢀⣤⣾⡿⠋⠈⠻⢿⣷⣄ ⢻⣿⢸⣿⡟
⣿⣿⠁⢸⣿⡇ ⢻⣿⡄ ⢸⣿⠇ ⠈⢿⣷⡀ ⣀⣴⣿⠟⠋ ⠙⢿⣷⣤⡀ ⢸⣿⣿⣿⡇
⣿⣿ ⢸⣿⠁ ⠈⢿⣷⡀ ⢀⣿⡟ ⠈⢿⣷⡀ ⢀⣤⣾⡿⠛⠁ ⠙⠻⣿⣦⡀ ⠈⣿⣿⣿⡇
⢸⣿⡄⣿⣿ ⠈⣿⣷⡀ ⣼⣿⠃ ⠈⢿⣷⡀ ⢀⣠⣶⣿⠟⠋ ⠈⠻⣿⣦⣄ ⣿⣿⣿⠇
⠈⣿⣷⣿⡿ ⠘⣿⣧ ⢠⣿⡏ ⠈⢿⣷⣄⣤⣶⣿⠟⠋ ⠈⠛⢿⣷⣄ ⢸⣿⣿
⠘⣿⣿⡇ ⠘⣿⣧ ⣾⣿ ⢀⣠⣼⣿⣿⣿⣿⣿⣷⣶⣶⣶⣶⣶⣶⣤⣤⣤⣤⣤⣤⣀⣀⣀⣀⣀⣀⡀ ⠙⢿⣷⣼⣿⣿
⠈⠻⣿⣦⡀ ⠹⣿⣆⢸⣿⠇ ⣀⣠⣴⣾⡿⠟⠋⠁ ⠉⠉⠉⠉⠉⠉⠛⠛⣛⣛⣛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⡿
⠈⠻⢿⣷⣦⣄⣀⡀ ⢹⣿⣿⡟ ⢀⣀⣀⣤⣤⣶⣾⣿⣿⣿⣯⣥⣤⣤⣤⣤⣶⣶⣶⣶⣶⣶⣶⣾⣿⣿⣿⣿⠿⠿⠿⠿⠿⠿⠿⠟⠛⠛⠛⠛⠛⠛⠛⠉⠉⠉⠉⠉⠉
⠉⠙⠛⠿⠿⠿⣿⣿⣿⣿⠿⠿⠿⠿⠿⠿⠿⠛⠛⠛⠛⠛⠛⠛⠋⠉⠉⠉⠉⠉⠉⠉
TYPE: UNICODE
⣀⣤⣴⣾⣿⣿⣿⡛⠛⠛⠛⠛⣻⣿⠿⠛⠛⠶⣤⡀
⣀⣴⠾⠛⠉⠁ ⠙⣿⣶⣤⣶⣟⣉ ⠈⠻⣦
Expand Down
Loading