Reverse Codification Lite

i dont know how somehow a repeat loop can detect input number

I don't get it

first do (keep items <abs(_)=_> over ((slots of _)-100))
then for each element of the result(keep track of the slot number) there shall be a thing:
if the item is a square number then the thing is "Hello, world!"
if the item is 5 then the thing is {clear}
if the item is a factor of 10 then the thing is <0=0>
if the item is between the second and penultimate composite less than 10 then the thing is {()}
if you havent got your thing yet and the item is a prime youre screwed(if the block is a primitive then the item shouldn't be greater than 10 if you are screwed)
lastly use <<(join input list (append(list(block),(reshape (list []) to (slot number)),list((thing)))))=(block)> xor <item=5>> to detect empty slots

Hope my cryptic reply helps :rofl:

I'm running into an issue with turning the primitive blocks into strings. When I turn the primitive reporter into a string and then back into a block, the output is the primitive procedure/command/whatever rather than the reporter.

What if you also stored the block type?

I think that would definitely fix it, but, unfortunately, I have no idea how to add it in by myself. I'm not quite clear on how the conversion from string to blocks works.

working for me

I meant the gray primitives - the one where you can select, for example, ide_language.
These are the two blocks I ran into issues with:
Screenshot 2023-02-09 09.54.27
(that isn't a script pic, that is a screenshot, you can get these blocks through the Extension Blocks setting through the Settings menu)

You could define the shape using the way it's done in scratchblocks, like parenthsis says that it's a reporter, angled brakets <> say that it's a predicate, and nothing is a command. But since it looks like you're just using json, you could probobly add a "type" value.

Ah, that's because they have the same name.

ill fix this by adding the type of block in the library list

Fixed.

Also fixed.

Awesome! Thanks so much.
Also, quick question: are all the strings supposed to have the letter "b" in front of them, or is that like a typo or error or something.

it has that so snap reads it as a string and not a number, it has to do with the new libraries thing

To make snap read a number as a string, you should be able to just join the value (nothing else, just the number)

Instead, I'd make sure it's a string rather than rely on join to make it a string. You never know; it might change in the future.

I think join is better than adding a b.

it doesnt matter anyways, the text is never modified, its more of an ID kind of thing

If it just functions to make the string read as a string, why not use a zero-width space?