Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Bash+Linux command line utils, 43 bytes

Bash+Linux command line utils, 43 bytes

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}"

This uses a similar technique to my answer below, but just counts in base 16, and strips out all "names" containing 0, e or f as well those with more than 3 same consecutive digits.

Convert to the monk's alphabet as follows:

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}" | tr 1-9a-d A-M

#Bash+coreutils (dc and egrep), 46 bytes

Bash+coreutils (dc and egrep), 46 bytes

Edit - corrected version

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

#Bash+Linux command line utils, 43 bytes

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}"

This uses a similar technique to my answer below, but just counts in base 16, and strips out all "names" containing 0, e or f as well those with more than 3 same consecutive digits.

Convert to the monk's alphabet as follows:

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}" | tr 1-9a-d A-M

#Bash+coreutils (dc and egrep), 46 bytes

Edit - corrected version

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

Bash+Linux command line utils, 43 bytes

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}"

This uses a similar technique to my answer below, but just counts in base 16, and strips out all "names" containing 0, e or f as well those with more than 3 same consecutive digits.

Convert to the monk's alphabet as follows:

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}" | tr 1-9a-d A-M

Bash+coreutils (dc and egrep), 46 bytes

Edit - corrected version

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

added 291 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268

#Bash+Linux command line utils, 43 bytes

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}"

This uses a similar technique to my answer below, but just counts in base 16, and strips out all "names" containing 0, e or f as well those with more than 3 same consecutive digits.

Convert to the monk's alphabet as follows:

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}" | tr 1-9a-d A-M

#Bash+coreutils (dc and egrep), 46 bytes

Edit - corrected version

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

#Bash+coreutils (dc and egrep), 46 bytes

Edit - corrected version

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

#Bash+Linux command line utils, 43 bytes

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}"

This uses a similar technique to my answer below, but just counts in base 16, and strips out all "names" containing 0, e or f as well those with more than 3 same consecutive digits.

Convert to the monk's alphabet as follows:

jot -w%x $[16**9]|egrep -v "[0ef]|(.)1円{3}" | tr 1-9a-d A-M

#Bash+coreutils (dc and egrep), 46 bytes

Edit - corrected version

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

deleted 2 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268

#Bash+coreutils (dc and egrep), 4746 bytes

Edit - corrected version

dc<<<"Edo9^[p1dc<<<Edo9^[p1-d0<m]dsmx"|egrepd0\<m]dsmx|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<"Edo9^[p1dc<<<Edo9^[p1-d0<m]dsmx"|egrepd0\<m]dsmx|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

#Bash+coreutils (dc and egrep), 47 bytes

Edit - corrected version

dc<<<"Edo9^[p1-d0<m]dsmx"|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<"Edo9^[p1-d0<m]dsmx"|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

#Bash+coreutils (dc and egrep), 46 bytes

Edit - corrected version

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}"

This'll take a while to run but I think its correct.

dc counts downwards from 14^9 to 1 and outputs in base 14. egrep filters out the numbers with more than 3 consecutive same digits. We also filter out any names with "0" digits, so we get the correct set of letters in the names.

The question specifies that any alphabet may be used, so I am using [1-9][A-D]. But for testing, this can be transformed to [A-M] using tr:

dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)1円{3}" | tr 1-9A-D A-M

This yields the sequence:

MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work. This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

added 13 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268
Loading
added 223 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268
Loading
added 224 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268
Loading
added 270 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268
Loading
added 1 character in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268
Loading
deleted 2 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268
Loading
added 4 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268
Loading
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268
Loading

AltStyle によって変換されたページ (->オリジナル) /