News for hackers. Stuff that matters.
Re:Dirty tricks 6502 programmers use by stjo on Monday August 19, 2019 @01:54AM (#20735233)
I would say no. 34 bytes is 256^32=7588550360256754183279148073529370729071901715047420004889892225542594864082845696 combinations, and even if you could easily narrow it down to only valid programs you would still need to simulate it, which is way slower than computing a hash.
Re:Dirty tricks 6502 programmers use by saagarjha on Monday August 19, 2019 @02:14AM (#20735320)
Only a fraction of those would be reasonable programs, and you can test almost all of them immediately by computing a MD5 hash.
Re:Dirty tricks 6502 programmers use by userbinator on Monday August 19, 2019 @07:58AM (#20736964)
34 bytes is equivalent to bruteforcing a 272-bit key. It's already physically impossible to do that for a 256-bit key even if you ignore everything other than incrementing the key counter itself:

https://pthree.org/2016/06/19/the-physics-of-brute-force/

Re:Dirty tricks 6502 programmers use by saagarjha on Tuesday August 20, 2019 @03:37AM (#20744620)
But as I said, you’re not brute forcing the entire key space because you likely have an idea of at least some of the bits.
Re:Dirty tricks 6502 programmers use by janekm on Monday August 19, 2019 @07:37AM (#20736862)
Or, you could evaluate whether said program draws the crossed lines in an emulator. Might not take that much longer than calculating the hash... That makes this kind of an interesting "Genetic Programming" challenge... The solution space is "only" 29 bytes long...
Re:Dirty tricks 6502 programmers use by IcePic on Monday August 19, 2019 @09:29AM (#20737534)
I don't think that would be this quick either. Since the code might/will mess up zeropage and/or other dataareas in use by the C64 basic, you would have to wipe it to a known state for each test, which almost means "boot up the KERNAL and let it run complete INIT".

Not that even this have to take a long while on a 3GHz computer running full speed, but doing it 2^272 times ...

Re:Dirty tricks 6502 programmers use by saagarjha on Tuesday August 20, 2019 @03:39AM (#20744632)
> you would have to wipe it to a known state for each test, which almost means "boot up the KERNAL and let it run complete INIT"

FWIW, if I were actually doing this I’d run it in a emulator and “save” the initial state to restore for the every test.