Determine why these can be done in 0 bytes: Evaluate a valid Python literal and listify it (e.g. f([‘1’,’,’])=[1]) Execute valid Python code (e.g. f([‘a’, ‘=’. ‘1’, ‘;’, ‘p’, ‘r’, ‘i’, ‘n’, ‘t’, ‘(‘, ‘a’, ‘+’, ‘1’, ‘)’])=[] plus 2\n on STDOUT)
very interested ;-) because they are the default? just a guess
if you can't read bnf the takeaway is ı makes complex literals, ȷ is scientific notation, and everything else is what you'd expect except you can't parse a leading 0 (so you get two separate nilads)
bingo jelly just straight up python evals its command line arguments then "jellifies" the results to align with its type system
"A niladic function (nilad) takes zero (0) arguments, a monadic function (monad) takes one (1) argument, and a dyadic function (dyad) takes two (2) arguments.
" Jelly is 1-indexed, meaning that the first index in a list is 1 and the last index is the length. Index access in lists wraps around, so 0 refers to the last element, and index 5 in a length-3 list points to the second value.
index origin is always 0 in j but dennis probably thought it would be useful for i to have a use as a flipped version of e plus easier filtering of unfound elements and such
Let's begin with a very simple program - Hello World. To get started, head over to the online Jelly executor on this site or Try It Online! (created by Dennis).
In Jelly, strings begin with “ and end with ”. So, the most basic solution would be this:
Jelly, 42 bytes
ịe⁾ -
ṁƤẹḍL}+çɗ¥ƇḟL_祀ḣ@¹Ḣȯ
ŒṖÇƑÐḟẎLƊÞṪÇ€
Try it online!
It's... not performant, but I'm reasonably confident it's actually correct this time! Updating the explanation later, because I'm half asleep at this point, and holding out hope there's a better way to do the last fix...
ị...
in a day or two i also have a feeling this'll be another "unrelated string walked so jonathan allan could run" because this is too complicated for any sane human being to want to do in jelly on their own initiative but you just know he's going to see this then think of some way to do it 7 bytes shorter
plus i basically took the relatively elegant core of a solution that didn't worry about spaces or hyphens and slapped on a series of three bandaid fixes to make it worry about spaces and hyphens
so it stands to reason there might be a considerably better way to do it that was designed to do so from the ground up