Y
Hacker News
new
|
ask
|
show
|
jobs
by
BobbyTables2
622 days ago
That sounds like 100+ lines in python or similar languages…
3 comments
throwup238
622 days ago
You should be able to do it in under 20 lines using the same matrix operations as the K code via numpy.
link
anonzzzies
622 days ago
Numpy is indeed very apl. Just more horrible to me; not python-y and annoyingly verbose for the apl-er.
link
hrzn
622 days ago
A few years back I made a modest attempt at writing a concise yet readable sudoku solver in Python - in about 29 lines:
https://github.com/hrzn/sudoku/blob/master/sudoku.py
Could have been made shorter at the price of readability.
link
forgotpwd16
621 days ago
Looks nice. Since imports numpy can utilize (more of) numpy's operations to squeeze validation functions and nested fors to one. Should result in shorter code but readability will probably depend on reader's experience in array programming.
link
otteromkram
622 days ago
It probably isn't. At least, not for Python.
link