Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread Keith Medcalf
>>- my badly written sql takes about 3'40", (on my windows pc) >>- your neater version takes about 7'20",(on my windows pc) >>==> Do you see the same ratio ? I don't catch why yours is slower. > >One uses tables for the join constants and the other (slower one) >dynamically regenerates the

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread Keith Medcalf
>- my badly written sql takes about 3'40", (on my windows pc) >- your neater version takes about 7'20",(on my windows pc) >==> Do you see the same ratio ? I don't catch why yours is slower. One uses tables for the join constants and the other (slower one) dynamically regenerates the constant

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread big stone
And : - python3.4 is still in beta also, not a released product. - sadly first RC candidate 1 is February 9, 2014, 2 days earlier. Sqlite was so close now, *so close* to achieve this goal ... very sad. ___ sqlite-users mailing list

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread Richard Hipp
On Sat, Jan 18, 2014 at 2:34 PM, Simon Slavin wrote: > > I'm sorry, I withdraw that. I just remembered that SQLite 3.8.3 is still > in beta. It would be a bad idea to include a beta library in a released > product. So whether it gets included or not depends on comparing

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread Simon Slavin
On 18 Jan 2014, at 7:30pm, Simon Slavin wrote: > On 18 Jan 2014, at 7:27pm, big stone wrote: > >> I'm still making desesperate prayers to have this SQLite3.8.3 in Python3.4. >> >> Python3.4 beta2 is using in SQLite3.8.1 > > Talk to the Python

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread Simon Slavin
On 18 Jan 2014, at 7:27pm, big stone wrote: > I'm still making desesperate prayers to have this SQLite3.8.3 in Python3.4. > > Python3.4 beta2 is using in SQLite3.8.1 Talk to the Python folks on the Python dev list as soon as possible:

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread big stone
I'm still making desesperate prayers to have this SQLite3.8.3 in Python3.4. Python3.4 beta2 is using in SQLite3.8.1 "SQL CTE motor inside !" could be a big incentive for Python2.X users to switch to Python 3.4. ___ sqlite-users mailing list

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread big stone
Recursive CTE are really fun to : - describe algorithms in sql, - measure sql motor speed. For the hardest sudoku at hand that I have: '8..36..7..9.2...5...7...457.1...3...168..85...1..94..' - my badly written sql takes about 3'40", (on my windows pc) - your neater

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread Dan Kennedy
Let me try again. Some spaces were missing from the input in the parent post: /* The input suduko. */ WITH RECURSIVE input(sud) AS ( VALUES( '53..76..195986.8...6...34..8.3..17...2...6.628419..58..79' ) ), /* A table filled with digits 1..9, inclusive. */ digits(z,

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread Rob Willett
I have to say thats it been a long time since I sat back and was amazed by what people can do. My knowledge of SQL is limited, whilst I recognise it is a functional language, I had no idea you could solve Sudoku in it. I take my hat off to the real experts. The downside of this is I now

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread Dan Kennedy
Beaten by minutes! /* The input suduko. */ WITH RECURSIVE input(sud) AS ( VALUES( '53 76 195986 8 6 34 8 3 17 2 6 6 28 419 58 79' ) ), /* A table filled with digits 1..9, inclusive. */ digits(z, lp) AS ( VALUES('1', 1) UNION ALL SELECT

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-18 Thread big stone
sudoku ! drop table if exists gen9; create table gen9(z); insert into gen9 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); drop table if exists initial; create table initial ( s, ind) ; insert into initial select sud, instr( sud, ' ') from (SELECT '53 76 195986 8