3 ms·
I thought this was going to be a tool where you paste in some code and it tells you which programming languages it could be written in. It would be interesting
by bruceboughton 14y ago
I thought this was going to be a tool where you paste in some code and it tells you which programming languages it could be written in.
It would be interesting to see how much code you need to be able to accurately identify the language.
- maybird 14y agoI second that. I'd also love to see a tool which would allow you to provide a binary and tell you what built it.
- Dinoguy1000 14y agoTrID[1] has a number of definitions for various executable files, but it's designed for general-purpose file format identification. PEiD[2] is built specifically for identifying packers, compilers, etc. for PE files, and should therefore be able to identify a far wider array of them (the site claims it detects over 600 PE signatures), but I've never done any checking myself, and the project unfortunately seems to be discontinued. [1] http://mark0.net/soft-trid-e.html http://mark0.net/soft-trid-e.html [2] http://www.peid.info/ http://www.peid.info/
- deleted 14y ago[deleted]
- keeperofdakeys 14y agoBesides certain languages with special keywords, the easiest way would be to send it through syntax checkers iteratively. You could probably have generic "C-style" and "common lisp style" types of checks, then you would have to actually look at api commands. The latter method would be rather problematic.
- isagalaev 14y agoThis is basically what highlight.js does indeed :-)
- jakubw 14y agoSome syntax highlighters, such as highlight.js [0], can do language detection and it works reasonably well with short snippets too. [0] http://softwaremaniacs.org/soft/highlight/en/ http://softwaremaniacs.org/soft/highlight/en/
- markelliot 14y agoMaybe there's another page where you can submit the samples and this is the presentation/identification ;-)