19
1
Given the name of a Stack Exchange site which doesn't have their own design yet, decide how many ASCII characters (non-ASCII ones are counted separately) are there on their icons. Your code should distinguish these 4 cases:
1 character:
Astronomy
Beer
Freelancing
Health
History
Law
Music: Practice & Theory
Parenting
The Great Outdoors
Writers
2 characters:
3D Printing
Amateur Radio
Biblical Hermeneutics
Bitcoin
Board & Card Games
Buddhism
Chinese Language
Coffee
Community Building
Computational Science
Computer Graphics
Data Science
Earth Science
Ebooks
Economics
Emacs
Engineering
Expatriates
French Language
Gardening & Landscaping
Genealogy & Family History
German Language
Hardware Recommendations
Hinduism
Homebrewing
Islam
Italian Language
Japanese Language
Joomla
Lifehacks
Martial Arts
Mathematics Educators
Motor Vehicle Maintenance & Repair
Music Fans
Mythology
Open Data
Personal Productivity
Pets
Philosophy
Physical Fitness
Politics
Portuguese Language
Project Management
Puzzling
Quantitative Finance
Reverse Engineering
Robotics
Russian Language
Software Quality Assurance & Testing
Software Recommendations
Sound Design
Space Exploration
Spanish Language
Sports
Startups
Sustainable Living
Tridion
Vi and Vim
Video Production
Windows Phone
Woodworking
Worldbuilding
3 characters:
Cognitive Sciences
elementary OS
Ethereum
History of Science and Mathematics
Linguistics
Open Source
Programming Puzzles & Code Golf
Signal Processing
Tor
Non-ASCII:
Anime & Manga
Arduino
Aviation
Chess
CiviCRM
Poker
Excluded in this challenge for having non-ASCII characters in their names:
LEGO® Answers
Русский язык
Your code should output a consistent distinct value for each of the 4 sets. Each output (or its string representation for non-string values returned from a function) should be no more than 10 bytes, not counting the optional trailing newline.
You can create multiple pieces of code in the same language. The output of your submission is considered to be the output of each piece of code concatenated in a fixed order (so you can use Regex).
Shortest code wins.
This seams like regex golf – HEGX64 – 2016-03-03T12:33:58.733
Or could be image analysis using the favicon, given that "Anime and Manga" has a Japanese character in that logo - hence being on the "Non-ASCII" list. – Chris J – 2016-03-03T12:50:38.693
@ChrisJ You are not supposed to access Internet for the purpose of this challenge. That might be another question... – jimmy23013 – 2016-03-03T12:59:59.807
The character on Anime & Manga is obviously a
画
. But it's not easy to argue whether the thing on Aviation is a✈
. So I decided to follow the easiest way. – jimmy23013 – 2016-03-03T13:13:59.107So we input the name and output the amount of ascii characters? – GamrCorps – 2016-03-03T13:16:38.510
@GamrCorps Basically yes. You can also output something else that has no more than 6 characters, as long as each identifies one group. – jimmy23013 – 2016-03-03T13:18:23.503
What defined as 6 characters in the return? For example, what if I return
undefined
(the value) or an[0,0,0]
(array) in JavaScript? – Mwr247 – 2016-03-03T16:07:48.890The
– Ismael Miguel – 2016-03-03T18:06:00.333LEGO® Answers
shouldn't be excluded, since all characters are present in the Extended ASCII supersets. One of them is the (currently, the most comon single-byte encoding) ISO-8859-1 which is also known as Latin-1 and is the default for MySQL. In that encoding, it is the character ® has the decimal code 174.@Mwr247 I didn't think of that. I'm considering also allowing values stored with less than k bytes internally, and relax k to 8 or 10. But the problem is we don't know how a value exactly is stored internally in many languages. So I'm not sure it fixes the problem. The purpose was to not encourage printing a lot of temporary data. – jimmy23013 – 2016-03-03T19:00:46.687
That is a tough one to figure out... Perhaps relax it, but make the phrasing more like: "The output, when stringified, should be no longer than
X
characters." – Mwr247 – 2016-03-03T19:45:16.987I knew SQA had a long official name, but I didn't realize it was the longest name out there... wow... – corsiKa – 2016-03-03T20:47:50.257