Time Machine Restorer
I recently switched from OSx86 back to Linux. In OS X I had Time Machine backing up to my other drive. After some investigation into the format of backups it uses, I decided to just nuke the main drive and write up a script to restore from my TM backup drive. Here it is. Change the BACKUP and TO constants, and call the script with the path to whatever file/directory you want to restore from the drive. It will go through, restore files, and find the data that any (invalid in Linux) hardlinks point to (which is how Time Machine does incremential backups; by hardlinking to the latest if nothing has changed), and copy them over, recursively.
Example usage:
cd /media/backup/Backups.backupdb/localhost/Latest/OS X/Users/Alex
sudo python restore.py Music
02:03 PM
|
0 Comments
A Japanese programming language
Just toying with this idea, exploring how programming languages could translate across human languages.
| Declaration | number := 1 | numberは1 |
|---|---|---|
| Assignment | number = 1 | numberが1 |
| Statement | print "Hello, world!" | 「Hello, World!」をprint |
| Function call | print("1", "2", "3") | 「1」、「2」、「3」をprint |
| Attribute | X.A | XのA |
| Attr. Decl. | X.A := Y | XのAはY |
| Attr. Assign | X.A = Y | XのAがY |
| Func. Decl. | | |
Thoughts:
- Katakana, Romaji, and Kanji for identifiers.
- Hiragana, as particles for language syntax.
- Pretty much looks and acts like a postfix language.
- Probably wouldn’t want this to be statically typed.
- Switching between the writing systems would probably be a bitch.
- This is just a braindump, not to be taken seriously. Just a neat concept.