One can off-course trivally encode julia so it is nonobvious what is being done.
But ofcourse one has to ship a decoder to
so using Base64; using Distributed
we can do eval(Distributed.deserialize(Base64.Base64DecodePipe(IOBuffer("N0pMBwQAAAAWAgEFYmxvY2sX4QEIUkVQTFsxOV0WAgEIZnVuY3Rpb24WAVYBCGZpenpidXp6FgIBBWJsb2NrF+IsAQAWAgEDZm9yFgJZAQJpaRYDVgEBOuAxZAAAABYCAQVibG9jaxfjLAEAFgMBAmlmFgUBCmNvbXBhcmlzb24WA1YBASUBAmlp4loWA1YBASUBAmlp5FrfFgIBBWJsb2NrF+QsAQAWAlYBB3ByaW50bG4hCEZpenpCdXp6FgMBBmVsc2VpZhYCAQVibG9jaxflLAEAFgNWWhYDVgEBJQECaWni3xYCAQVibG9jaxfmLAEAFgJWAQdwcmludGxuIQRGaXp6FgMBBmVsc2VpZhYCAQVibG9jaxfnLAEAFgNWWhYDVgEBJQECaWnk3xYCAQVibG9jaxfoLAEAFgJWAQdwcmludGxuIQRCdXp6FgIBBWJsb2NrF+osAQAWAlYBB3ByaW50bG4BAmlp"))))
and you have no idea what it says.
But you do know that you can find out:
julia> Distributed.deserialize(Base64.Base64DecodePipe(IOBuffer("N0pMBwQAAAAWAgEFYmxvY2sX4QEIUkVQTFsxOV0WAgEIZnVuY3Rpb24WAVYBCGZpenpidXp6FgIBBWJsb2NrF+IsAQAWAgEDZm9yFgJZAQJpaRYDVgEBOuAxZAAAABYCAQVibG9jaxfjLAEAFgMBAmlmFgUBCmNvbXBhcmlzb24WA1YBASUBAmlp4loWA1YBASUBAmlp5FrfFgIBBWJsb2NrF+QsAQAWAlYBB3ByaW50bG4hCEZpenpCdXp6FgMBBmVsc2VpZhYCAQVibG9jaxflLAEAFgNWWhYDVgEBJQECaWni3xYCAQVibG9jaxfmLAEAFgJWAQdwcmludGxuIQRGaXp6FgMBBmVsc2VpZhYCAQVibG9jaxfnLAEAFgNWWhYDVgEBJQECaWnk3xYCAQVibG9jaxfoLAEAFgJWAQdwcmludGxuIQRCdXp6FgIBBWJsb2NrF+osAQAWAlYBB3ByaW50bG4BAmlp"))) quote
#= REPL[19]:2 =#
function fizzbuzz()
#= REPL[19]:3 =#
for ii = 1:100
#= REPL[19]:4 =#
if ii % 3 == ii % 5 == 0
#= REPL[19]:5 =#
println("FizzBuzz")
elseif #= REPL[19]:6 =# ii % 3 == 0
#= REPL[19]:7 =#
println("Fizz")
elseif #= REPL[19]:8 =# ii % 5 == 0
#= REPL[19]:9 =#
println("Buzz")
else
#= REPL[19]:11 =#
println(ii)
end
end
end
end
Not really what you are getting at, I know.
I just figured interesting.
Making a code obsufucator would be cool.
It would be nice to be able to eval CodeInfo
objects, and perform the obfuscation at that level.