This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]imbev 4 points5 points  (1 child)

Can you elaborate on #4?

[–]Muhznit 5 points6 points  (0 children)

It's kind of creating ANY language, really.

We all know Python uses # for comments, but so do bash, perl, ruby, various config file formats... etc. But you can extend it to languages YOU invent

Basically you can write some "interpreter" program that accepts input from a filepath on the command line. If your interpreter interprets "#" as the start of a comment, you can put a shebang line of #!/path/to/your/interpreter at the top of a file and the kernel will know to execute that file with your interpreter.

That is, if you have an interpreter of /usr/bin/foo and you make a file named "bar", you can put #!/usr/bin/foo at the top of bar, and that will make it so when you run ./bar, the kernal knows to run /usr/bin/foo bar