Here are some issues:

1) You get a free set of parenthesis to the right of the copula - this even
constrains the use of adverbs and conjunctions. Verbs don't do that.

   b=: "1
   c=: +/ .* &

2) In interactive contexts, you do not get a display if the final operation
was a copula. The value is still "there" in some abstract sense, but it's
not displayed.
   d=: i. 1000 1000

3) You can't put copula in things that use verbs (hooks forks, etc.) This
is related to issue 1, but it's still an independent issue.
   (=: % #)
|syntax error

4)  You can't put a bare copula inside parenthesis. You could make this be
related to 1 but it's a stretch.

   e(=:) 2
|syntax error

These are mostly grammatical issues, but you have to understand the grammar
to make sense of a sentence.
   f=: 'this is a test'
   (f)=: ]b c 4{. d
   a
2499500

P.S. Here's a concise representation of the grammar:
  http://www.jsoftware.com/help/dictionary/dicte.htm
or, more generally, the entire appendix II to the dictionary:
  http://www.jsoftware.com/help/dictionary/contents.htm

but you sort of need to see the steps in action to really understand what's
going on. One technique for that involves using J's "trace" facility (which
traces the parsing of a sentence). But...

   trace 'e(=:)2'
|assertion failure: parse

Here, there are no grammatical rules that trace can use to parse the
sentence. We can make the sentence more complicated to highlight that issue:

   trace 'e(=:)+2'

|assertion failure: parse


Er... not complicated enough.


   trace 'e(=:)2+2'

|assertion failure: parse


...still not complicated enough.


   trace 'e(=:)-2+2'

 --------------- 2 Dyad -------

 2

 +

 2

 4

|assertion failure: parse


There we go...


What's happening here is that J's grammatical rules are based on having
four "things" to look at.  This suggests another way we could have gotten
trace to do something before hitting that syntax error.


   trace 'e(=:)(-2)'

 --------------- 0 Monad ------

 -

 2

 _2

 --------------- 8 Paren ------

 (

 _2

 )

 _2

|assertion failure: parse


Put differently, "syntax error" is another way of saying that there's no
rule in the grammar (described at
http://www.jsoftware.com/help/dictionary/dicte.htm in detail adequate for
understanding by people who have seen it in action) to finish working on
that sentence.


A well formed J sentence eventually resolves down to one "thing". And, that
"thing" needs to be a noun, a verb, and adverb or a conjunction.


   1

1

   +

+

   /

/

   &

&

   (

|syntax error

|   (

   =:

|syntax error

|   =:

   )

|syntax error

| )

   test

3499500


See?

Thanks,

-- 
Raul


On Wed, Jun 11, 2014 at 9:00 AM, David Lambert <[email protected]>
wrote:

> I'd like to know the reasoning that copula are not verbs please.
>
>    B
> |value error: B
>
>    (=:~ ('A B C ' {.~ +:@#))i.2
> |syntax error
> |   (=:    ~('A B C '{.~+:@#))i.2
>
>
>    assign=: 4 :'EMPTY [ (x)=: y'
>
>    (assign~ ('A B C ' {.~ +:@#))i.2
>
>    B
> 1
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to