I'm not ready to take one the difficult problems.  There are many of them that 
pass by on the programming forum.  My challenges are designed to help clarify 
some issues in J.  Hopefully, they will help some beginners if they are not 
solved so quickly by the experienced users of J.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Dan Bron
Sent: Monday, November 14, 2011 2:00 PM
To: 'Programming forum'
Subject: Re: [Jprogramming] table challenge in simple J

How about a more difficult challenge?  It's related.  No embargo period on this 
one.

Write a 13 : '' for "Simple J".   In particular, write an adverb which, given 
an anonymous tacit verb as an argument, derives a functionally identical verb 
(in terms of I/O), but all instances of f@:g are replaced with [: f g .  
Obviously f and g here are arbitrary (could be named or anonymous, primitive or 
compound, vanilla or parenthesized), and there can be more than one use of @: 
in the target, and you could have uses within uses.

It would be quite interesting to me if this were presented as a tree 
transformation using L: S: {:: and friends against the atomic representation of 
the target.  That's not a requirement though - you could always do string 
transformations on the linear rep, rearrangements on the boxed rep, etc.

If this was in any way generalized, in sense that I could reuse it for 
different but similar transformations, that would be more interesting still.  

-Dan
 
-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Raul Miller
Sent: Monday, November 14, 2011 1:25 PM
To: Programming forum
Subject: Re: [Jprogramming] table challenge in simple J

You are correct.

Nevertheless, that kind of restriction probably belongs in the subject line.

-- 
Raul

2011/11/14 Björn Helgason <[email protected]>:
> The first message in the thread stated
>
> "To give a little time for thought, do not post a solution until November
> 18th. I'll post mine then too."
>
> 2011/11/14 Raul Miller <[email protected]>
>
>> It's rather difficult to participate in a discussion where I am not
>> supposed to respond.  (It was also not clear in the original message
>> that responses were to be embargo'd).
>>
>> But I will try to ignore this thread until Friday.
>>
>> --
>> Raul
>>
>> On Mon, Nov 14, 2011 at 12:25 PM, Linda Alvord <[email protected]>
>> wrote:
>> > Please do not respond until November 18th.  Both  by  and  over contain
>>  @  so you need to define a single tacit function that does not include it.
>> >
>> > -----Original Message-----
>> > From: [email protected] [mailto:
>> [email protected]] On Behalf Of Raul Miller
>> > Sent: Monday, November 14, 2011 9:34 AM
>> > To: Programming forum
>> > Subject: Re: [Jprogramming] table challenge in simple J
>> >
>> > Oh, nvm, I see:
>> >
>> >  a (by over +/) f. b
>> >
>> > --
>> > Raul
>> >
>> > On Mon, Nov 14, 2011 at 9:19 AM, Raul Miller <[email protected]>
>> wrote:
>> >> Which conditions are not satisfied?
>> >>
>> >> --
>> >> Raul
>> >>
>> >> On Mon, Nov 14, 2011 at 8:52 AM, Linda Alvord <[email protected]>
>> wrote:
>> >>> This does not satisfy the  conditions of the problem.  Also, wait
>> until November 18th for more hints.  Thanks.
>> >>>
>> >>> Linda
>> >>>
>> >>>
>> >>> -----Original Message-----
>> >>> From: [email protected] [mailto:
>> [email protected]] On Behalf Of Raul Miller
>> >>> Sent: Monday, November 14, 2011 7:41 AM
>> >>> To: Programming forum
>> >>> Subject: Re: [Jprogramming] table challenge in simple J
>> >>>
>> >>>   over=:[: ({.;}.) [: ": ,
>> >>>   by=: (' ' ; [: ,. [),.]
>> >>>
>> >>> --
>> >>> Raul
>> >>>
>> >>> 2011/11/13 Linda Alvord <[email protected]>:
>> >>>> In the dictionary in the section on "Verbs and Adverbs" there are two
>> >>>> definitions designed to produce a table:
>> >>>>
>> >>>>
>> >>>>
>> >>>>       over=:({.;}.)@":@,
>> >>>>
>> >>>>       by=:' '&;@,.@[,.]
>> >>>>
>> >>>>      a=: 2 3 5
>> >>>>
>> >>>>      b=: 0 1 2 3
>> >>>>
>> >>>>    a by b over a +/ b
>> >>>>
>> >>>> --T-------┐
>> >>>>
>> >>>> │ │0 1 2 3│
>> >>>>
>> >>>> +-+-------+
>> >>>>
>> >>>> │2│2 3 4 5│
>> >>>>
>> >>>> │3│3 4 5 6│
>> >>>>
>> >>>> │5│5 6 7 8│
>> >>>>
>> >>>> L-+--------
>> >>>>
>> >>>>
>> >>>>
>> >>>> Here is the challenge.  Use the arguments a and b and define a single
>> tacit
>> >>>> function in "simple J" that does not use  @  and provides the same
>> result.
>> >>>>
>> >>>>
>> >>>>
>> >>>>    a table b
>> >>>>
>> >>>> --T-------┐
>> >>>> │ │0 1 2 3│
>> >>>> +-+-------+
>> >>>> │2│2 3 4 5│
>> >>>> │3│3 4 5 6│
>> >>>> │4│4 5 6 7│
>> >>>> L-+--------
>> >>>>
>> >>>>
>> >>>>
>> >>>> To give a little time for thought, do not post a solution until
>> November
>> >>>> 18th. I'll post mine then too.
>> >>>>
>> >>>>
>> >>>>
>> >>>> Linda
>> >>>>
>> >>>> ----------------------------------------------------------------------
>> >>>> For information about J forums see
>> http://www.jsoftware.com/forums.htm
>> >>> ----------------------------------------------------------------------
>> >>> For information about J forums see http://www.jsoftware.com/forums.htm
>> >>>
>> >>> ----------------------------------------------------------------------
>> >>> For information about J forums see http://www.jsoftware.com/forums.htm
>> >>
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> >
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>
>
> --
> Björn Helgason, Verkfræðingur
> Fornustekkum II
> 781 Hornafirði,
> t-póst: [email protected]
> gsm: +3546985532
> twitter: @flugfiskur
> http://groups.google.com/group/J-Programming
>
>
> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
>
> góður kennari getur stigið á tær án þess að glansinn fari af skónum
>          /|_      .-----------------------------------.
>         ,'  .\  /  | Með léttri lund verður        |
>     ,--'    _,'   | Dagurinn í dag                     |
>    /       /       | Enn betri en gærdagurinn  |
>   (   -.  |        `-----------------------------------'
>   |     ) |         (\_ _/)
>  (`-.  '--.)       (='.'=)   ♖♘♗♕♔♙
>   `. )----'        (")_(") ☃☠
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
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