I have a problem here.

lrv is about 500 characters, which is about 30 times larger than the
explicit version:

  1 :'5!:5<''u'''

Tacit is fun, but I prefer using explicit when it gives me significant
order of magnitude advantages.

-- 
Raul

On Mon, Feb 20, 2012 at 2:55 PM, Jose Mario Quintana
<josemarioquint...@2bestsystems.com> wrote:
> Now, a challenge/puzzle: write a tacit adverb (lrv) that produces the linear 
> representation of its input verb (bonus points for a fixed version), for 
> example,
>
>   type lrv
> type
>   type f. lrv
> {&(<;._1 '|invalid name|not 
> defined|noun|adverb|conjunction|verb|unknown')@(2&+)@(4!:0)&(<^:(L. = 0:))
>
> SPOILER ALERT: A Solution is presented below...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Another challenge is to evade the linear representation persistent bug to 
> show the adverb:
>
>   lrv=. (".(0 : 0) -. LF)`:6
> (<(<,'4'),<(<(<,'4'),<(<(<,'4'),<(<(<,'4'),<<;._1 ' 0: 
> :.'),<(<,'4'),<(<,'`'),<(
> <,'0'),<(<'b.'),<(,'0');_1),<(<,'4'),<(<'`:'),<(,'0');6),<(<,'4'),<(<(<,'4'),<(<
> (<,'4'),<(<(<,'4'),<(<(<,'4'),<(<(<,'4'),<(<,'"'),<(,'0');_),<(<,'4'),<(<(<'@:')
> ,<(<,'<'),<(<,'3'),<(<<;._1 ' 0 
> 0'),(<(<,'&'),<;:',<'),<,']'),<'@:'),<(<,'4'),<(
> <,'`'),<(<,'0'),<<(,'0');_),<(<,'4'),<(<'`:'),<(,'0');6),<(<,'4'),<(<(<,'&'),<(<
> (,'0');_5),<'}.'),<,'`'),<(<,'4'),<(<'`:'),<(,'0');6)
> )
>
>   lrv
> (((0: :.)(`(b.`_1)))(`:6))(((((("_)(<@:((,'0') ,&< 
> ])@:))(`_))(`:6))(_5&}.`))(`:6))
>
>   type lrv
> type
>   type f. lrv
> {&(<;._1 '|invalid name|not 
> defined|noun|adverb|conjunction|verb|unknown')@(2&+)@(4!:0)&(<^:(L. = 0:))
>
> Oh yes, I cheated!  I used b. _1 to get the linear representation of the 
> adverse of the adverse of the input verb. The code of the adverb can be 
> shorter; most of it is related to (_5&}.) dropping 5 trailing characters (':. 
> 0:') but it illustrates how to tacitly transform a verb into its 
> corresponding adverb.  A direct, non-cheating, version is possible but quite 
> more difficult (as far as I can see).
>
>
>
>
>
> ________________________________________
> From: programming-boun...@jsoftware.com [programming-boun...@jsoftware.com] 
> on behalf of Dan Bron [j...@bron.us]
> Sent: Monday, February 20, 2012 11:02 AM
> To: 'Programming forum'
> Subject: Re: [Jprogramming] tacit adverb
>
>>   A=: 1 : '0&(;@:u) :: empty'
>
> Can be expressed tacitly as B=: 0&(;@:) (:: empty) .  In general, tacit
> adverbs are trains of adverbial clauses, so if you want to add another, you
> only need to wrap it in parens and tack it on the end.
>
> Though your phrasing  0&(;@:)  is very appealing; it seems to "beg for an
> argument" more than the vanilla formulation of  (0&) (;@:)  .
>
> -Dan
>
> -----Original Message-----
> From: programming-boun...@jsoftware.com
> [mailto:programming-boun...@jsoftware.com] On Behalf Of David Ward Lambert
> Sent: Monday, February 20, 2012 10:50 AM
> To: programming
> Subject: [Jprogramming] tacit adverb
>
> I had
>
>   A=: 0&(;@:)
>   u A y
>
> My u raises an error if y is bad, in which case EMPTY is a reasonable
> result.  I'd prefer not checking y in each u.  What is the tacit
>
>   A=: 1 : '0&(;@:u) :: empty'
>
> ?  Thanks, Dave.
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> [BEST LLC]
>
> Bayesian Efficient Strategic Trading LLC
>
> The information in this communication and any attachment is confidential and 
> intended solely for the attention and use of the named addressee(s). Any 
> views or opinions presented are solely those of the author and do not 
> necessarily represent those of BEAM Bayesian Efficient Asset Management, LLC 
> (BEAM), Bayesian Efficient Strategic Trading, LLC (BEST) and/or their 
> affiliates unless otherwise specifically stated. All information and opinions 
> expressed herein are subject to change without notice. This communication is 
> not to be construed as an offer to sell or the solicitation of an offer to 
> buy any security. Any reliance one may place on the accuracy or validity of 
> this information is at their own risk. Past performance is not necessarily 
> indicative of the future results of an investment. If you are not the 
> intended recipient, or a person responsible for delivering this to the 
> intended recipient, you are not authorized to and must not disclose, copy, 
> distribute, or retain this
>  message or any part of it. If you are not the intended recipient, please 
> permanently delete all copies of this communication and any attachments from 
> your computer system, destroy any hard copies, and immediately notify the 
> sender or BEAM/BEST at either i...@2bestsystems.com, i...@beamstrategy.com or 
> (201) 792-1002. No waiver of confidentiality or privilege is made by 
> mistransmission.
>
>
> ----------------------------------------------------------------------
> 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