Re:The Hardest Program I've Ever Written (2015)
by paultopia on Monday August 21, 2017 @10:03PM
(#15069192)
I was thinking along similar lines, like some kind of reinforcement learning model that penalized lines that seem ugly to humans... but probably hard to get enough humans looking at enough code.
[ Parent
| on HN ]
Re:The Hardest Program I've Ever Written (2015)
by pmoriarty on Monday August 21, 2017 @11:10PM
(#15069428)
I wonder if well-respected real-world code samples could be used as a training and testing set.
For example, one could use a subset of the Linux kernel source code as training, and another (unseen) subset as testing.
Highly rated projects on github might work too.
Re:The Hardest Program I've Ever Written (2015)
by blt on Tuesday August 22, 2017 @01:25AM
(#15069929)
An active learning approach would be cool, where the formatter process a large corpus of code and asks a human operator for advice when it is especially uncertain about the best place to split.
Even if training the splitting policy from scratch is too hard, learning would be a good way to establish cost weights on different kinds of rule violations.