3 ms·
Very interesting! I have been thinking about something similar, but rather than learning from examples, it would have a generic "misaligned" cost function that
by chriswarbo 10y ago
Very interesting! I have been thinking about something similar, but rather than learning from examples, it would have a generic "misaligned" cost function that would penalise lines which have similar content but in different columns, and minimise this by hillclimbing or similar.
The difficulty is tying it to a particular language's parser and whitespace rules.
- jurgenv 10y agoCodeBuff is also learning from examples. Check out the paper at the SLE conf; it has all the nitty gritty details how it learns the whitespace rules from the example files.
- timhwang21 10y agoIf you're interested, Google Research recently published a paper about code formatting via dynamic programming: http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44667.pdf http://static.googleusercontent.com/media/research.google.co...
- parrt 10y agoInteresting, though it is a framework very similar to previous work using Box combinations. Here, we don't require any work from a language expert. We simply sniff your project, and then make new files look like those. Handling a new language requires no coding.