Live data from Hacker News

Arthur Whitney's one liner sudoku solver (2011)

dfns.dyalog.com

41–50 of 210 posts

Re: Arthur Whitney's one liner sudoku solver (2011)

#41
post #24
post #20

Earlier quoted context omitted.

“Expressive” = like two cats fought while standing on the keyboard

I work with it daily in a bank, and I couldnt find a better way to express it. Many colleagues throwing their keyboard in despair at this stupid impossible to remember syntax.

[flagged]

Re: Arthur Whitney's one liner sudoku solver (2011)

#42

Sudoku was always a meditative thing for me. It’s impossible not to win so long as you pay attention. Optimizing solutions seems contrary to the point to me.

Optimising a Sudoku solver can be seen as a different puzzle entirely and not as a mode of playing Sudoku.

Re: Arthur Whitney's one liner sudoku solver (2011)

#43
post #24

Earlier quoted context omitted.

I work with it daily in a bank, and I couldnt find a better way to express it. Many colleagues throwing their keyboard in despair at this stupid impossible to remember syntax.

[flagged]

"Debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?"

— Kernighan, Brian. The Elements of Programming Style (2e). McGraw-Hill, 1978.

Re: Arthur Whitney's one liner sudoku solver (2011)

#46

I’ve often wondered about languages like APL/k, are the programmers actually able to think about problems more efficiently?

Hillel Wayne writes about it on his newsletter every once in a while. He's convinced me that he does in fact think through some problems better in array languages but I still can't really conceive of what that experience is like.

there are several open-source K environments available, some which even run in the browser:

http://johnearnest.github.io/ok/index.html

if it's something you're interested in trying i'd be happy to point you toward more resources, and i'm sure there are plenty of other arraylang tinkerers reading this thread who could help, too

Re: Arthur Whitney's one liner sudoku solver (2011)

#47
post #30
post #29

Earlier quoted context omitted.

That's a really good point... But -- (and forgive me if I'm totally wrong) -- this isn't just "non-english" but "non-phonetic" which is a smaller set of written languages, and the underlying language is ... math.... so understanding the underlying grammer itself relies on having decades of math education to really make it jive. If this code is just a final result of "learn math for 2-3 decades, and spend years learni…

The underlying language isn't really very mathematical, at most there's a bit of linear algebra in the primitives but that's it. You certainly don't need any sort of formal maths education to learn APL. There are about 50 or so new symbols, which is not a big ask, with any sort of focus the majority of the syntax etc can be learned very quickly. The "bugs" in your original code stand out very clearly because things l…

and it bears mention that a decent chunk of those symbols are things nearly everyone is familiar with from other languages (+, -, =, etc), symbols you've probably seen in math class or on your graphing calculators (÷, ×, ≠, ⌈, ←, etc), and symbols with very strong mnemonic associations once you've seen them explained (≢, ⍋, ⍳, ⌽, etc).

Re: Arthur Whitney's one liner sudoku solver (2011)

#48

Earlier quoted context omitted.

Wouldn't it be more productive/rewarding to instead engage with comments I do like?

Only you can say what's best for you. If have to ask: What's rewarding about only having your viewpoint reinforced?

Where are you getting the viewpoints thing from?

Re: Arthur Whitney's one liner sudoku solver (2011)

#50

Earlier quoted context omitted.

[flagged]

"Debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?" — Kernighan, Brian. The Elements of Programming Style (2e) . McGraw-Hill, 1978.

By becoming even more clever:

https://www.linusakesson.net/programming/kernighans-lever/in...

Post reply on HN