Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
BobbyTables2
1y ago
0 comments
Share
That sounds like 100+ lines in python or similar languages…
0 comments
default
newest
oldest
throwup238
1y ago
You should be able to do it in under 20 lines using the same matrix operations as the K code via numpy.
anonzzzies
1y ago
Numpy is indeed very apl. Just more horrible to me; not python-y and annoyingly verbose for the apl-er.
hrzn
1y 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.
forgotpwd16
1y 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.
otteromkram
1y ago
It probably isn't. At least, not for Python.
j
/
k
navigate · click thread line to collapse