13
\$\begingroup\$

In this challenge, you'll print out the SBCS of Jelly, a popular golfing language. Its code page looks like this:

_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F
0_ ¡ ¢ £ ¤ ¥ ¦ © ¬ ® µ ½ ¿ Æ Ç Ð
1_ Ñ × Ø Œ Þ ß æ ç ð ı ȷ ñ ÷ ø œ þ
2_   ! " # $ % & ' ( ) * + , - . /
3_ 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4_ @ A B C D E F G H I J K L M N O
5_ P Q R S T U V W X Y Z [ \ ] ^ _
6_ ` a b c d e f g h i j k l m n o
7_ p q r s t u v w x y z { | } ~
8_ ° ¹ ² ³ Ɓ
9_ Ƈ Ɗ Ƒ Ɠ Ƙ Ɲ Ƥ Ƭ Ʋ Ȥ ɓ ƈ ɗ ƒ ɠ
A_ ɦ ƙ ɱ ɲ ƥ ʠ ɼ ʂ ƭ ʋ ȥ
B_ Ȧ
C_ Ċ Ė Ġ İ Ŀ Ȯ
D_ Ż
E_ § Ä ȧ ċ ė ġ ŀ
F_ ȯ ż « »

Or, in a code block:

¡¢£¤¥¦©¬®µ½¿€ÆÇÐ
Ñ×ØŒÞßæçðıȷñ÷øœþ
 !"#$%&'()*+,-./
0123456789:;<=>?
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~¶
°¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾Ɓ
ƇƊƑƓƘⱮƝƤƬƲȤɓƈɗƒɠ
ɦƙɱɲƥʠɼʂƭʋȥẠḄḌẸḤ
ỊḲḶṂṆỌṚṢṬỤṾẈỴẒȦḂ
ĊḊĖḞĠḢİĿṀṄȮṖṘṠṪẆ
ẊẎŻạḅḍẹḥịḳḷṃṇọṛṣ
ṭ§Äẉỵẓȧḃċḋėḟġḣŀṁ
ṅȯṗṙṡṫẇẋẏż«»‘’“”

Rules:

  1. You can substitute with \n (0x10), § with , or Ä with ṿ if you wish
  2. You may use combining diacritics if these can be normalized to the correct character
  3. You may represent characters with their Unicode code points or UTF-8/16/32 representations
  4. You may output the characters with any reasonable formatting, as long as they are in order (e.g., a 256 character string, an array of characters, a 2d array representing a table with any dimensions, a string with newlines delimiting each character, etc.)

This is , so shortest answer in bytes (per language) wins.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Why all the downvotes? \$\endgroup\$
    – Tuxysta
    Jun 27 at 20:21
  • 7
    \$\begingroup\$ @23TuringMachine I downvoted because I think this challenge is uninteresting. All the answers (except for the Jelly builtin) are going to involve hardcoding most of the string. There aren't enough patterns here to make for a good komogorov-complexity challenge. \$\endgroup\$
    – DLosc
    Jun 28 at 4:16

10 Answers 10

7
\$\begingroup\$

Modified Regenerate -a --sep=, 228 bytes

[¡-¦©¬®µ½¿€ÆÇÐÑ×ØŒÞßæçðıȷñ÷øœþ -~
°¹²³⁴-⁾ƁƇƊƑƓƘⱮƝƤƬƲȤɓƈɗƒɠɦƙɱɲƥʠɼʂƭʋȥ]|̣[AB-DEHIK-OR-WYZ]|[A-IL-PR-TW-Z]̇|̣[abdehik-or-wyz]|[a-hl-pr-tw-z]̇|[«»‘’“”]

Attempt This Online!

I thought Regenerate would be the perfect tool for this. Unfortunately, it only supports ASCII, so I made a trivial modification to allow it to use Unicode.

This is a regex that uses a bunch of character classes to match the various chars, along with combining diactritics to match all the dotted letters. This somehow beat Vyxal :) not anymore :(

The -a flag is to list all matches, listing all the possible characters within those character classes. The --sep= flag is so that the matches are separated by nothing.

\$\endgroup\$
6
\$\begingroup\$

Jelly (trivial), 2 bytes

ØJ

Try it online!

ØJ: Yield Jelly's codepage.

\$\endgroup\$
0
5
\$\begingroup\$

Vyxal d, 246 bytes

5ʀ⁺<+»*⌊~⁼UIȮǏẇ↳:∵o3tʀ-ð∪ßḭ∩E∑ɽ∨Ẏs„ǎ⁼ṡ{ṪhCcṪėǒ_(»8365τ94ʀ32+₀»=ǒf↲‛ȧ∩¶⁋Ż⌊⁰gḞ~{OGtṪʀ9]•æ§s⁽=%ǔṀ‡Ǐ⟨0⌈Ŀ0w₃pε→sż›7~1Ẋġ:/t≈gʀḞ}ƛƛo"2†⌈ẎḢj\⟑↵$Vꜝ₅İ;ƒ₆βḭ↔#₄ε€@1 SyȧƈḭKǎuẋ→]k≬»»-ṫ»τ20ʀ⁺R+ø⟇C«?kZǎẎQ>l«C803v"»«g}9£~Ŀg»7926τka«× D∇«FC775v"»ƛioꜝ∵~∇¶sẇ»8222τWC

Try it Online!

\$\endgroup\$
0
4
\$\begingroup\$

Vyxal D, 201 bytes (UTF-8)

`.[-]+`kA`CFGJPQX JKQUV`½vF:N+÷\i-"½vvf`̣̇`f+ƒYf∑`¡©€Æ  ŒÞ  ıȷñ %¶° ²⁴%ƁⱮƝȤɓƈɗƒɠƙɱƥʠɼƭʋȥΠ«‘`kPs10\*"Ṡ%λC¦C∑;øṙ

Try it Online!

Warning: This contains a ton of unprintables.

One technique this answer uses is to replace bytes preceding multiple 0x01 to 0x1F with the cumulative sums of those byte sequences. It might be even golfier to allow printable ASCII with this approach but I'm not gonna try now. The code for this no longercontains an epic emoji:

enter image description here

All the dotted letters are created with combining characters. I take advantage of how the lowercase form of the second dotted alphabet is the uppercase form minus i.

That's pretty much it! This is horribly cursed, but it was fun to make.

\$\endgroup\$
4
\$\begingroup\$

Python, 344 bytes

x="̣".join("ABDEHIKLMNORSTUVWYZȦ")+"ḂĊḊĖḞĠḢİĿṀṄȮṖṘṠṪẆẊẎŻ"
print("¡¢£¤¥¦©¬®µ½¿€ÆÇÐÑ×ØŒÞßæçðıȷñ÷øœþ"+'%c'*95%(*range(32,127),)+"¶°¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ƁƇƊƑƓƘⱮƝƤƬƲȤɓƈɗƒɠɦƙɱɲƥʠɼʂƭʋȥ"+x+x.replace("İ","").lower()+"«»‘’“”")

Attempt This Online!

xnor saved 4 bytes with '%c'. Thanks!

\$\endgroup\$
1
  • \$\begingroup\$ bytes(range(32,127)).decode() can be '%c'*95%(*range(32,127),) \$\endgroup\$
    – xnor
    Jun 29 at 12:30
3
\$\begingroup\$

Jelly, 170 bytes

“¡¢£¤¥¦©¬®µ½¿€ÆÇÐÑ×ØŒÞßæçðıȷñ÷øœþ”;ØṖ⁵Ż+⁽ø9Ọ“¶°¹²³”;“ƁƇƊƑƓƘⱮƝƤƬƲȤɓƈɗƒɠɦƙɱɲƥʠɼʂƭʋȥẠḄḌẸḤỊḲḶṂṆỌṚṢṬỤṾẈỴẒȦḂĊḊĖḞĠḢİĿṀṄȮṖṘṠṪẆẊẎŻạḅḍẹḥịḳḷṃṇọṛṣṭ§Äẉỵẓȧḃċḋėḟġḣŀṁṅȯṗṙṡṫẇẋẏż”⁾«»⁾‘’⁾“”

Try it online!

Builtins are boring, so here is a slightly-less-but-still-kinda-boring answer. Despite multiple attempts to shorten the code by manipulating the code points, it turns out that string literals are the way to go.

That said, we do use some actual encoding in places, and use a couple of tricks to save bytes. The main trick used is "unparseable nilads": when Jelly encounters a nilad that doesn't form one of the chaining patterns, then the current value of the chain is printed, and the nilad becomes the argument to the rest of the chain.

Outputs a newline instead of

How it works

“¡¢...øœþ”;ØṖ⁵Ż+⁽ø9Ọ“¶°¹²³”;“ƁƇƊ...ẋẏż”⁾«»⁾‘’⁾“” - Main link. No arguments
“¡¢...øœþ”                                       - String literal
           ØṖ                                    - Printable ASCII
          ;                                      - Concatenate
             ⁵                                   - Unparseable nilad. Output the characters, and continue with 10 as argument
              Ż                                  - Zero range; [0, 1, ..., 10]
                ⁽ø9                              - Compressed integer: 8308
               +                                 - Add to each; [8308, 8309, ..., 8318]
                   Ọ                             - Convert from code points
                    “¶°¹²³”                      - String literal
                           ;                     - Prepend; [182, 176, ..., 179, 8308, ..., 8318]
                            “ƁƇƊ...ẋẏż”          - Unparseable nilad: string literal
                                       ⁾«»       - Unparseable nilad: "«»"
                                          ⁾‘’    - Unparseable nilad: "‘’"
                                             ⁾“” - Unparseable nilad: "“”"

Note that we have to use ⁾«», ⁾‘’ and ⁾“” as all these characters are special characters in strings.

\$\endgroup\$
3
\$\begingroup\$

JavaScript (Node.js), 385 bytes

$=>`¡¦-©¬®µ½¿€ÆÇÐÑ×ØŒÞßæçðıȷñ÷øœþ [-]~-
°¹²³⁴⁾-ƁƇƊƑƓƘⱮƝƤƬƲȤɓƈɗƒɠɦƙɱɲƥʠɼʂƭʋȥ<̣ABDEHIKO-RW-YZ><̇AI->Ŀ<̇MP-RT-WZ-><̣abdehiko-rw-yz><̇ah->ŀ<̇mp-rt-wz->«»‘’“”`[R='replace'](/..-/g,g=([a,b])=>a<b?a+g(String.fromCharCode(a.charCodeAt()+1)+b):b)[R](/<(.)(.+?)>/g,(_,x,y)=>y[R](/./g,'$&'+x)).normalize`NFC`

Try it online!

\$\endgroup\$
3
\$\begingroup\$

Pip, 198 bytes

Y{^zRMg}._MU"̣cfgjpqx ̇jkquv"^sY[UCyyR"i̇"x]i:C1X5\"¡\i©€Æ  ŒÞ  ıȷñœþ\PA¶°  ²⁴\i\iƁⱮƝȤɓƈɗƒɠƙɱƥʠɼƭʋȥ\y«‘\"R`.[-]+`$.C$+*:A*_H\,#_

Try It Online!

-21 thanks to DLosc.

This is a huge mess. Sorta a port of my Vyxal answer, but got a bit out of hand. Beats Vyxal!

\$\endgroup\$
2
  • \$\begingroup\$ Oh--it looks like the input is incorrect, tho. You're missing œ. \$\endgroup\$
    – DLosc
    Jun 28 at 23:20
  • \$\begingroup\$ @DLosc Oops. Will fix \$\endgroup\$
    – emanresu A
    Jun 28 at 23:22
2
\$\begingroup\$

Charcoal, 222 bytes

≔I⪪”}∨q;'⁶γV_⁶BιP§τÀ%OC?^H·εY⁴⊞›⊙D⁹↷Sχ↓\⸿↶T×⮌RR,s≕⁵aH↓E¬[≕\G�ν⁶⁹GG≦XCq⎇bIV¿↑+σQkiVÀ⌕✳◧´IkE«⁻∕s⁴ⅉN▶δ§⦃εDr\E∧⁵¶L=/UJ⊕M⁰↓|À|⊗ς▶≡c℅⬤_÷⌈9∧vºξPveυΦ"RU(⊘↧β↨|QκRMGXZ↑H℅→S↖kAw+⪫B:↗:≡⊙iν∨⎚‴S;⁻¤η⪫x¶⁵tZÀzBΣr⟦X⎚5y↶M⪫)H⪪↥W” υ⭆υ⎇ι℅Σ…υ⊕κγ

Try it online! Link is to verbose version of code. Explanation: The most cost-effective approach seems to be to take a compressed list of Unicode ordinal differences, calculate the cumulative sum and convert to Unicode. Additionally, one of the values is 0 which indicates that the ASCII characters to ~ should be interpolated at this point instead, which saves 3 bytes. Oddly, omitting the value completely (i.e. just having an empty string in the list) actually undoes the saving.

\$\endgroup\$
1
\$\begingroup\$

Bubblegum, 418 bytes

00000000: 04c1 0312 c300 0004 c0b7 d7e3 1a83 ba8d  ................
00000010: 6de3 2e7a 475e 925d bcf1 c117 3ffc 2140  m..zG^.]....?.!@
00000020: 8606 033e 7294 e35c e39a 1bee b8e7 95b7  ...>r..\........
00000030: f6c0 079f 1428 d26a ec21 a4cd 9051 7b64  .....(.j.!...Q{d
00000040: 3149 4151 4959 4555 4d5d 4353 4b5b 4757  1IAQIYEUM]CSK[GW
00000050: 4fdf c0d0 c8d8 c4d4 ccdc c2d2 cada c6d6  O...............
00000060: cede c1d1 c9d9 c5d5 cddd c3d3 cbdb c7d7  ................
00000070: cf3f 2030 2838 2434 2c3c 2232 2a3a 2636  .? 0(8$4,<"2*:&6
00000080: 2e3e 2131 2939 2535 2d3d 2333 2b3b 2737  .>!1)9%5-=#3+;'7
00000090: 2fbf a0b0 a8b8 a4b4 acbc a2b2 aaba a6b6  /...............
000000a0: 8e0b d0d0 581d 4a0e 0341 3075 b3fd 9861  ....X.J..A0u...a
000000b0: 9999 7946 3af4 6965 c8a2 2792 f377 7755  ..yF:.ie..'..wwU
000000c0: a5db 94d3 7d7a 10f7 28ee 49dc b3b8 1771  ....}z..(.I....q
000000d0: 495c 1657 89ab c5fd 21ee 4f71 7f59 d7c6  I\.W....!.Oq.Y..
000000e0: f6d6 bed8 37fb 2dbb b56d d9a1 5dda 7d3e  ....7.-..m..].}>
000000f0: 2cde 6c52 7cd9 d7a2 5b8c 6dad d815 7b3b  ,.lR|...[.m...{;
00000100: 2abb c58f d2b3 abf2 2e1f 4175 4101 e81e  *.........AuA...
00000110: 8a40 43e8 5bd0 1e74 067b e008 fa1e 5c07  .@C.[..t.{....\.
00000120: f7c1 4be8 21f8 1754 027d 847a cdc7 20cf  ..K.!..T.}.z.. .
00000130: 54ef 5bf3 096a 9b4a d337 5bf3 1bec 8083  T.[..j.J.7[.....
00000140: 7c0d fe04 7f83 bbe0 3954 0475 0bf5 78d5  |.......9T.u..x.
00000150: 503d 5008 7a80 62d0 08fa 0e74 005d c03e  P=P.z.b....t.].>
00000160: 3886 7e00 37c0 03f0 2a9d fc0b a06e a04f  8.~.7...*....n.O
00000170: 506f f904 e49b ea7b 67be 401d 5349 06d7  Po.....{g.@.SI..
00000180: 2ae4 82c3 7c03 fe02 d7c0 3df0 022a 86ba  *...|.....=..*..
00000190: 837a bafe 4817 a916 e75b 9c9a 384d 715a  .z..H....[..8MqZ
000001a0: ff01                                     ..

Try it online!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.