Hi

EH>
EH> It seems there are some more possibilities with your solutions. You are

Not necessarily, explicit adverbs can do whatever a (v hg) adverb can;
however, (v adv) can do things that explicit adverbs are not allowed to do.

EH> doing some kind of program generation?

Usually, I am.

EH> It has similarities with having functions as primary citizens, but it
is
EH> not the same because it does not happen at runtime?

The workhorse verb v (v hg) is meant to deal with atomic representations,
gerunds, etc. to produce what is desired playing by the book.  (In
contrast, the workhorse verb of the adverb adv, for example, can deal
directly with verbs, adverbs, and conjunctions; that is, functions and
functionals.)

EH> What I call tacit code is verb trains. I do not call (<'@:') and ('';1)
EH> tacit code, even if it contains no named entities.
EH> Am I wrong?

Those words are nouns.  The tacit adjective applies to verbs, adverbs or
conjunctions.

EH> u0`u1`u2 t1 is with either definition not tacit, since it contains the
EH> named entity t1? (u0 u1 and u2 just means any verb)

The adverb is named but it is not used as a named argument.  It can be used
anonymously,

   -`-`- ('t0'f.)
-@:-@:-

   ('t0'f.)
(("_)(((`'')(&(([ , (<'@:') ,
])/@:|.@:(('';1)&({::))@:(<@:((0;1;0)&({::)))@:[)))((`_)(`:6))))(`:6)


EH> PS. I get a problem, but I guess it is not important for the discussion.
EH>
EH>     t0=: ([ , (<'@:') , ])/o |. o (('';1)&{::)hg
EH>     -`-`- t0
EH> -@:-@:-
EH>     t0
EH> (("_)(((`'')(&(([: ([: ([ , (<'@:') , ])/ |.)
('';1)&({::))@:(<@:((0;1;0)&({::)))@:[)))((`_)(`:6))))(`:6)
EH>     -`-`- (("_)(((`'')(&(([: ([: ([ , (<'@:') , ])/ |.)
('';1)&({::))@:(<@:((0;1;0)&({::)))@:[)))((`_)(`:6))))(`:6)
EH> |domain error
EH> |   -`-`-
(("_)(((`'')(&(([:([:([,(<'@:'),])/|.)('';1)&({::))@:(<@:((0;1;0)&({::)))@:[)))((`_)(`:6))))(`:6)

You have been bitten again by a linear representation bug!  :)


On Wed, Oct 25, 2017 at 6:11 AM, Erling Hellenäs <[email protected]>
wrote:

> Hi all!
>
> It seems there are some more possibilities with your solutions. You are
> doing some kind of program generation?
> It has similarities with having functions as primary citizens, but it is
> not the same because it does not happen at runtime?
> What is passed is ascii representations of functions, not compiled
> functions or compositions of compiled code?
> In F# a function can take any  function and any data as arguments and
> produce any combination of functions and data.
> As far as I understand it would be similar to allowing verbs, adverbs and
> conjunctions as data types in our nouns. Not ascii representations, but the
> equivalents to single verbs, compositions of compiled code.
> Have we considered this solution?
>
> See some commants below:
>
> Cheers,
>
> Erling Hellenäs
>
> Den 2017-10-25 kl. 00:46, skrev Jose Mario Quintana:
>
>> Typical explicit adverbs produce the result of a sentence where the
>> argument replaces its corresponding parameter (usually u).  In that sense,
>> an adverb is similar to a macro but there are other possibilities; for
>> instance, the adverb t1,
>>
>>     t1=. ([ , (<'@:') , ])/o |. o (('';1)&{::)hg
>>
>>     u0`u1`u2 t1
>> u2@:u1@:u0
>>
>>     u0`u1`u2`u3`u4 t1
>> u4@:u3@:u2@:u1@:u0
>>
>> (Try to write t1 explicitly, macro-style.)
>>
>> The difference between explicit and tacit adverbs is the same difference
>> between explicit and tacit verbs.  They can produce the same results but
>> one relies on parameters (named arguments) whereas the other does not,
>>
>>     'y + 1 % (1 + y)' (verb :)
>> 3 : 'y + 1 % (1 + y)'
>>     'y + 1 % (1 + y)' (verb :) 5
>> 5.16667
>>
>>     (] + 1 % (1 + ]))
>> ] + 1 % 1 + ]
>>     (] + 1 % (1 + ])) 5
>> 5.16667
>>
>> What I call tacit code is verb trains. I do not call (<'@:') and ('';1)
> tacit code, even if it contains no named entities.
> Am I wrong?
> u0`u1`u2 t1 is with either definition not tacit, since it contains the
> named entity t1? (u0 u1 and u2 just means any verb)
> When this is parsed I think t1 is replaced by this:
> (("_)(((`'')(&(([ , (<'@:') , ])/@:|.@:(('';1)&({::))@:(<@:(
> (0;1;0)&({::)))@:[)))((`_)(`:6))))(`:6)
> There must be a gerund to the left, assume this:
>
> -`-`- (("_)(((`'')(&(([ , (<'@:') , ])/@:|.@:(('';1)&({::))@:(<@:(
> (0;1;0)&({::)))@:[)))((`_)(`:6))))(`:6) I think this forms a long string
> together with all other tacit code in the tacit program. Then this is
> parsed. The long string is executed and then replaced with this string
> -@:-@:-, which is then in it's turn parsed as part of the rest of the
> program. The result of the tacit expression is then a composition of
> compiled code, a single verb. This single verb is executed with it's
> arguments and there is a result. So, at runtime, there is no remnants of
> t1. In the single verb there is possibly some overhead and there is an
> execution of the three negations.
> So, at execution time, there is no passing of functions as arguments, not
> even functions in character representation?
> Using also explicit code there is of course no limitations of what you can
> do with code in character representation. You can generate programs at
> runtime as the result of input. How does this way to generate programs at
> runtime compare to other functional programming languages?
>
> PS. I get a problem, but I guess it is not important for the discussion.
>
>    t0=: ([ , (<'@:') , ])/o |. o (('';1)&{::)hg
>    -`-`- t0
> -@:-@:-
>    t0
> (("_)(((`'')(&(([: ([: ([ , (<'@:') , ])/ |.)
> ('';1)&({::))@:(<@:((0;1;0)&({::)))@:[)))((`_)(`:6))))(`:6)
>    -`-`- (("_)(((`'')(&(([: ([: ([ , (<'@:') , ])/ |.)
> ('';1)&({::))@:(<@:((0;1;0)&({::)))@:[)))((`_)(`:6))))(`:6)
> |domain error
> |   -`-`-    (("_)(((`'')(&(([:([:([,(<'@:'),])/|.)('';1)&({::))@:(<@:((0
> ;1;0)&({::)))@:[)))((`_)(`:6))))(`:6)
>
> DS.
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to