Re: [Jprogramming] Tacit trains o. inverse

2021-10-14 Thread Jose Mario Quintana
I recently posed a similar question (see [0]), > This trident can be used to operate on raw noun arguments. One can define first a noun boxing adverb, > >box=. ((<,'<') ; ])hg > assert (<1 2 3) -: 1 2 3 box > > (Incidentally, I realize I am using a shotgun to kill a fly, I know I can eas

Re: [Jprogramming] sudoku solver

2021-10-14 Thread Hauke Rehr
Sure, but that hard part doesn’t use anything we wouldn’t need in the solving routine. (using the approach to both problems I sketched) Am 14.10.21 um 20:17 schrieb Devon McCormick: So, you're saying that converting a solved Sudoku into a real Sudoku puzzle is the hard part, i.e. may require mor

[Jprogramming] Tacit trains o. inverse

2021-10-14 Thread Jan-Pieter Jacobs
Hi all, I found a use for tacit trains today: making circle verbs with a sensible obverse: oi =: (& :. ({{-m}} & ].)) o. 1 oi 1&o. :.(_1&o.) Nice, but I have a question: How does one make the {{-m}} part tacit? Or more general, how to make verbs operate on nouns and use their results in a

Re: [Jprogramming] sudoku solver

2021-10-14 Thread Devon McCormick
So, you're saying that converting a solved Sudoku into a real Sudoku puzzle is the hard part, i.e. may require more than 3 lines of J? On Thu, Oct 14, 2021 at 12:20 PM Hauke Rehr wrote: > Depends on the norm :) > > You need to do just as difficult to perform steps: > trying to derive the next nu

Re: [Jprogramming] sudoku solver

2021-10-14 Thread Hauke Rehr
Depends on the norm :) You need to do just as difficult to perform steps: trying to derive the next number; but you already know where that next number is, so it requires much less brute forcing (and backtracking). It won’t take as many /steps/, as much /time/, as solving. So I shouldn’t have st

Re: [Jprogramming] sudoku solver

2021-10-14 Thread Devon McCormick
Unless you're suggesting this: https://code.jsoftware.com/wiki/NYCJUG/2012-11-13#Simple_.E2.80.9CSudoku_N.E2.80.9D_Generation ? On Thu, Oct 14, 2021 at 10:21 AM Devon McCormick wrote: > Easier said than done. > > On Thu, Oct 14, 2021 at 6:56 AM Hauke Rehr wrote: > >> No, generation is easier. >

Re: [Jprogramming] sudoku solver

2021-10-14 Thread Devon McCormick
Easier said than done. On Thu, Oct 14, 2021 at 6:56 AM Hauke Rehr wrote: > No, generation is easier. > Take a random permutation along both axes of > |."0 1~ >:i.9 > and then erase numbers as long as they’re derivable > by what remains. > > Am 14.10.21 um 04:19 schrieb Devon McCormick: > > I jus

Re: [Jprogramming] sudoku solver

2021-10-14 Thread Hauke Rehr
No, generation is easier. Take a random permutation along both axes of |."0 1~ >:i.9 and then erase numbers as long as they’re derivable by what remains. Am 14.10.21 um 04:19 schrieb Devon McCormick: I just put up this page from a past NYCJUG meeting where we talked about sudoku - https://code.j

Re: [Jprogramming] sudoku solver

2021-10-14 Thread 'Mike Day' via Programming
Also, there’s been correspondence in this forum over the years since Sudokus emerged around ‘05. Many solutions were discussed. Roger Hui presented elegant compact solvers; John Scholes produced a nice one using “direct definition” in Dyalog APL, I forget where it’s published. My own is ty