@fourchan said:
With the downfall of the pre-processor in modern languages, it's rare to see a programmer attempt to utterly adapt the syntax and semantics of one language to another through blunt force. Today, I am proud to present an instance of this. First person to guess what language this is gets a gold star. Hint: this code is not whitespace-sensitive.check_path = (lambda filepath, hashes, p = sys.stdout.write:
(lambda hash = hashlib.sha1 (file (filepath).read ()).hexdigest ():
((hash in hashes) and (p ('DUPLICATE FILE\n'
' %s\n'
'of %s\n' % (filepath, hashes[hash])))
or hashes.setdefault (hash, filepath)))())
scan = (lambda dirpath, hashes = {}:
map (lambda (root, dirs, files):
map (lambda filename: check_path (os.path.join (root, filename), hashes), files), os.walk (dirpath)))
((len (sys.argv) > 1) and scan (sys.argv[1]))
Is it bash or another shell scripting language? Relying on a LOT of what are actually other programs?