quinetessential J?...

Sorry, the simplest one I know of is

 NOT the empty line...  which requires an end-of-line ...


it IS

   the null file/string

it is no thing, it does no thing, it produces no thing.

Everywhere you write it down.  Or even if you don't.

(hiccup.  'Scuze me, I 've been taoing to much).

On 5/25/07, Jose Mario Quintana <[EMAIL PROTECTED]> wrote:



> [EMAIL PROTECTED] On Behalf Of Boyko Bantchev
>
> On 5/16/07, June Kim <[EMAIL PROTECTED]> wrote:
> > My original ideas was printing only the codes on the T-shirt.
> >
> > However, displaying the result of the code together might be a good
idea,
> too.
>
> You can have both at once if you use a quine,
> such as  
http://www.nyx.net/~gthompso/self_j.txt<http://www.nyx.net/%7Egthompso/self_j.txt>
> (although this particular phrase hardly shows anything
> very interesting or distinguishing of J).

Josh's's above referenced expression is both, a J Quine (it displays
itself),

   ".a=.'''".a=.'',q,q,~a#~1+a=q=.39{a.'
".a=.'''".a=.'',q,q,~a#~1+a=q=.39{a.'

and a J (self-contained) self-reproducing expression ((-: ".) holds true
for
the expression),

   (-: ".) ".a=.'''".a=.'',q,q,~a#~1+a=q=.39{a.'
1

However, it does not exhibit J conciseness (which, to be fair, might not
have been a goal).

I often find entertaining, given an expression, to search for the shortest
equivalent expression, for example, the shortest (self-contained)
expression
for:

0.      A self-reproducing expression (SRE)
1.      Quine
2.      A self-reproducing expression that is also a Quine

My efforts follow bellow [spoiler alert!]:












































0. The shortest SRE to type: ''
   (-: ".) ''
1

If the tally of the expression is used as the metric then '' is also a
winner

   # ''
0

together with its myriads of siblings (e.g., Roger's i.0 0
http://www.jsoftware.com/pipermail/general/2001-February/005378.html ).

1. Although Dan Bron's 0 (see,
http://www.jsoftware.com/jwiki/Puzzles/Quine
), or any of its siblings, is short enough; I would argue that an empty
line
is, clearly, the shortest Quine:




The above J Quine is a testament of J conciseness compared to the other
solutions in http://www.nyx.net/~gthompso/quine.htm
<http://www.nyx.net/%7Egthompso/quine.htm> .  I have used, and will
use, continuously this handy multi-purpose program in almost every J
session. One can find almost anywhere T-shirts that display it in the
front
or back (or both) and have been wearing them since I was a baby.

2. Notwithstanding "emptiness is enlightenment" I am still puzzled about
the
shortest self-reproducing expression that is also a Quine (i.e., the
shortest non-empty SRE?).  My best effort (and I am giving up) is,

   (,~,2#{:)'(,~,2#{:)'''
(,~,2#{:)'(,~,2#{:)'''

   (-: ".) (,~,2#{:)'(,~,2#{:)'''
1

   # (,~,2#{:)'(,~,2#{:)'''
22

which follows the pattern,

   (,{:)^:2,~'expression'''
expression'expression'''

favored by Andrew Nikitin (see, the link above).



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




--
--
Roy A. Crabtree
UNC '76 gaa.lifer#
(For TN contact, email me to set up a confirmed date/time)

[When you hear/read/see/feel what a yehudi plays/writes/sculpts/holds]
[(n)either violinist {Menuhin} (n)or writer {"The Yehudi Principle"} (n)or
molder (n)or older]
[you must strive/think/look/sense all of it, or you will miss the meanings
of it all]

[EMAIL PROTECTED] Forwards only to:
[EMAIL PROTECTED] CC: auto to:
[EMAIL PROTECTED] Be short < 160 chars cuts off; currently
offline
[EMAIL PROTECTED] CC: auto to ^

http://www.authorsden.com/royacrabtree
http://skyscraper.fortunecity.com/activex/720/resume/full.doc
--
(c) RAC/IP, ARE,PRO,PAST
(Copyright) Roy Andrew Crabtree/In Perpetuity
   All Rights/Reserved Explicitly
   Public Reuse Only
   Profits Always Safe Traded
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to