Sudoku Solver in 140 bytes
gist.github.com
gist.github.com
140 Bytes is Jed Schmidt's side project where people compete to make useful functions as small as possible. Jed is kind of a Javascript powerhouse and also happens to be a really nice guy.
https://github.com/jed/140bytes/wiki/Byte-saving-techniques
Edited to add.. As a curiosity, Jed might have the most-forked gist on github: https://gist.github.com/962807
The Code Golf SE site is nice too: http://codegolf.stackexchange.com/
p,:3/:_(p:9\:!81)%3
s:{*(,x)(,/{@[x;y;:;]'&21=x[&|/p[;y]=p]?!10}')/&~x}
http://thesweeheng.wordpress.com/2008/11/30/more-sudoku-solv...For an open-source implementation of a k-like language, check out Kona (https://github.com/kevinlawler/kona). (Full disclosure, I'm a contributor.) It's still a work in progress, but it's pretty far along.
The license is even nicer, that's a real gem, and I think it ought to be submitted for formal approval as an open source license.
And I had never heard of "DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE". (http://en.wikipedia.org/wiki/WTFPL)
http://en.wikipedia.org/wiki/Sudoku_algorithms#Solving_Sudok...
g&&R(a)
I simply don't understand it as a statement and I don't get in the context of the for-loop
.) for-loops used this way
.) an OR-operator in a for loop
.) +a as a shortcut for a.toString()
.) syntax like g&&R(a) (line 24)
.) syntax like a[j^i==j] (line 29)
Where can I learn/read about advanced stuff like this, searching for this information on google is very hard, as I lack the correct terms ...
The best thing to do would be go through the basics of JavaScript and learn exactly how everything behaves. You should be able to answer questions like "is 24&&4 === true?" pretty easily.
If you have a bit of time on your hands, reading the standard will teach you all you need to know.
Of course, from a purely professional stand point, this is probably not the best use of your time (although knowing the language inside-out is important); using code like this in production code is a bad idea--it makes maintenance much more difficult.