-2
I use "sentence" here loosely to mean "any sequence of words separated by spaces" and "words" to mean "sequences of alphanumeric (hexatrigesimal) characters unseparated by spaces".
Conversion is from base-36 (0123456789abcdefg...) or (0123456789ABCDEFG...)
Conversion to base-16 (0123456789abcdef) or (0123456789ABCDEF)
Bonus -1 off your byte score if you are case-insensitive on input
Bonus -1 off your byte score if you are insensitive to non-alphanumeric characters (ignore them, except space)
Conversion of sentences
E.g. if your input sentence is "The meaning of life is 31313" then your out put should convert the following base-36 "words" into base-16 numbers (the, meaning, of, life, is, 31313) and then output them in order.
Bonus -1 off your byte score for retaining spaces in output sentence
Test Cases
You may convert these to your preferred single-case form if you choose not to opt for the case-insensitive bonus, strings end after spaces. Assume input will never start with a space.
Input text:
"The meaning of life is 31313"
Output: ("9542 B59F1602C 36F F508A 2A4 4DA897") - with or without spaces, with lower or upper case letters
Bonus -1 off your byte score for removing leading zeroes i.e. "9542" not "000009542".
Input text:
"Jet fuel can't melt steel beams"
Output: ("6245 B47AD 8C0F9 FF371 2E28A2D 1241854")
Input text:
"fhs8230982t90u20's9sfd902 %2'+13jos32*'ej eos"
Output: ("74510A686B453A2B1933C7AADA25DD2 BB8E18A11AEB 4A5C")
The Winner
This is code-golf, so the fewest bytes wins (including bonus -1 bytes). :)
Can accept the inputs in any way that works, as long as your code can solve arbitrary problems like the test cases.
8bonus -1 bytes only one byte? Also, bonuses in code-golf are generally discouraged – MilkyWay90 – 2019-05-25T01:22:25.107
Yes, I had a feeling it might be like that, but I wanted to give a minor incentive. All four bonuses add up nicely for any language that implicitly does them, but still definitely not worth adding characters to solve them. – DrQuarius – 2019-05-25T01:48:15.420
7@DrQuarius The bonuses don't add anything interesting for the golfer -- either the language base-conversion has that feature and it's a free -1 byte, or it doesn't and it's not worth adding anything to their code to achieve it. The bonuses are just clutter in the challenge and in scoring. – xnor – 2019-05-25T02:23:59.597
2@xnor hmm, thanks for the explanation. I will avoid them in future, but don't want to 'move the goalposts' now, so to speak. – DrQuarius – 2019-05-25T02:37:51.450
By
removing leading zeros
do you mean ignoring them in input or not outputting them? – Embodiment of Ignorance – 2019-05-25T03:25:58.973@EmbodimentofIgnorance in the output: so that 000009542 becomes 9542. – DrQuarius – 2019-05-25T03:40:05.740
5Very tempted to
-1
this for getting the mean of life so very wrong! – Shaggy – 2019-05-25T11:42:54.277