<commit_before>#!/usr/bin/jc

NB. If you haven't yet done an
NB.    install'all'
NB. then now would be a good time to do that.

NB. second riddle
NB. Text:

riddleText =: 'g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr''q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.'

NB. Rotate by 2:
firstRiddle =: 3 : 0
a.{~(-&26)^:(122<])"0](2+])^:(e.(97+i.26)"0)"0 a.I. y
)
echo 'firstRiddle'
echo firstRiddle riddleText
echo''

NB. do over
firstAmend =: 3 : 0
a =. u:(97+i.26)
b =. (2|.a)
(b,a.) {~ (a,a.) i. y
)
echo 'firstAmend'
echo firstAmend riddleText
echo''

NB. Find rare characters. Too easy in J.
secondRiddle =: 3 : 0
uniques =. 1!:1<'rare.txt'<commit_msg>update comment<commit_after>#!/usr/bin/jc

NB. If you haven't yet done an
NB.    install'all'
NB. then now would be a good time to do that.

NB. second riddle
NB. Text:

riddleText =: 'g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr''q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.'

NB. Rotate by 2:
firstRiddle =: 3 : 0
a.{~(-&26)^:(122<])"0](2+])^:(e.(97+i.26)"0)"0 a.I. y
)
echo 'firstRiddle'
echo firstRiddle riddleText
echo''

NB. do over
NB. found a pretty good hint here
NB. http://www.jsoftware.com/jwiki/Vocabulary/adot
firstAmend =: 3 : 0
a =. u:(97+i.26)
b =. (2|.a)
(b,a.) {~ (a,a.) i. y
)
echo 'firstAmend'
echo firstAmend riddleText
echo''

NB. Find rare characters. Too easy in J.
secondRiddle =: 3 : 0
uniques =. 1!:1<'rare.txt'
{'fraction_non_alphanumeric': 0.15555555555555556, 'fraction_numerical': 0.03333333333333333, 'mean_word_length': 3.5279329608938546, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1313824', 'n_tokens_mistral': 829, 'n_tokens_neox': 763, 'n_words': 235}