Re: [sqlite] SQL quine using with

2014-03-08 Thread Scott Robison
Here is one (sorta with inventive rule interpretation): sqlite3 /dev/null 'Error: near "Error": syntax error' Generates the command as output (at least with 3.8.2 from ports on FreeBSD): Error: near "Error": syntax errors Thank you! [takes bow] On Mar 8, 2014 12:16 PM, "Zsbán Ambrus" wrote: >

Re: [sqlite] SQL quine using with

2014-03-08 Thread Zsbán Ambrus
And here's a quine which simply concatenates six named strings a lot of times. SELECT ab||a||a||a||a||aa||b||a||b||a||bb||b|| a||aa||a||aa||aa||b||a||bb||a||bb||bb||b|| a||ab||a||aa||bb||b||a||ba||a||bb||aa||ba FROM(SELECTa,','b,'a'aa,'b'bb,'SELECT ab||a||a||a||a||aa||b||a||b||a||bb||b|| a||a

Re: [sqlite] SQL quine using with

2014-03-08 Thread Zsbán Ambrus
Anyway, here's a different quine using the replace function. SELECT replace(s,char(33),)||s||'''s);'FROM(SELECT'SELECT replace(s,char(33),)||s||!!!s);!FROM(SELECT!'s); ___ sqlite-users mailing list [email protected] http://sqlite.org:8080/c

Re: [sqlite] SQL quine using with

2014-03-08 Thread Dan Kennedy
On 03/08/2014 08:53 PM, Kees Nuyt wrote: Someone called zzo38 posted a quine (self-replicating program) on Internet Relay Chat in network: Freenode, channel: #sqlite [2014-03-08 11:01:59] < zzo38> I made a quine program in SQL. [2014-03-08 11:02:10] < zzo38> with q(q) as (select 'with q(q) as (

Re: [sqlite] SQL quine using with

2014-03-08 Thread Zsbán Ambrus
I have a favourite general method to write a quine in any programming language. This involves a list of strings and a list of numeric indexes. The second list is used to subscript into the first list, and the found strings are then extracted. This is possible in sqlite3, but comes out particular

[sqlite] SQL quine using with

2014-03-08 Thread Kees Nuyt
Someone called zzo38 posted a quine (self-replicating program) on Internet Relay Chat in network: Freenode, channel: #sqlite [2014-03-08 11:01:59] < zzo38> I made a quine program in SQL. [2014-03-08 11:02:10] < zzo38> with q(q) as (select 'with q(q) as (select ''#'') select replace(q,x''23'',r