Luis, most people call me Pepe (Jose's nickname).

I think the (new) score of q is, or could be, 45 as opposed to 50.  By the
way, one  '  got changed to  ,  somehow in your post.

Personally, in general, I would favor counting tokens over characters.  One
reason is that counting characters might force, for instance, the use of  @
 instead of  @:  when the latter could be more efficient in terms of
execution time.  Either way, Jolf sufficiently complex challenges become
not only about code that actually solves the task but also about how to
pack it and unpack it concisely.


On Wed, Aug 24, 2016 at 8:44 PM, Louis de Forcrand <[email protected]> wrote:

> Thanks for pointing that out. I had a hunch there was a way to use some
> wizardry to circumvent the rules.
>
> I had read about 128!:2, but it kind of flew over my head when I did.
> So, indeed, change of rules:
>
>         Scoring (for this particular challenge) is now determined as
>         the number of characters in the vector which completely
>         defines the solution to be scored. That is, if V is a character
>         vector which, when pasted into a fresh J session, defines
>         a solution to the problem, that solution’s score is #V.
>         Pro-verbs may be used if they make your solution shorter,
>         for example if a certain function is used twice.
>
> That means that spaces count, as well as pure data in the function
> (i.e. (i:1) instead of _1 0 1).
>
> So Mr. Quintana (is it Jose or Mario, or both?), your function is a valid
> solution, but its score is 62, whereas q before application of cheating
> has a score of 50 if defined like in the spoiler at bottom.
>
> This way creative solutions are allowed, but don’t necessarily outgun
> plain old straightforward ones.
>
> Thanks again for the heads up!
> Louis
>
>
> a. ([ {~ #@[ #.^:_1 ]) 0 ". 0 : 0 -. 10{a. NB. the x is important! Spoiler
> alert...
> 158421455382936234894082367432581683060925948346124859554587
> 20753024030458070155
> 289632889008635742066909316779527004880437862476277053993873
> 56278021165186153241
> 439783666000985992114195090526582079191430877133076125600264
> 48880739407007990949
> 237774816132361110452147695535221532177952917412932341672214
> 87071184896435439170
> 261738721953338264708743719628664115326936701975614052497550
> 92094980417532754789
> 290127824480845914003999721084417236655003086107977288915272
> 15731602742633924018
> 628017995976136538966486310676879527480459803812527040066189
> 39586003795243470147
> 686968621161285291180541387929601794429126445195295754x
> )
>
>         q=:;@:(<@(],"1 0 i.@[-.]+(i:1)*/~#\.@])"1)^:[&’'
>
> The line-feed at the end counts!
>
> > On 22 Aug 2016, at 00:54, Jose Mario Quintana <
> [email protected]> wrote:
> >
> > The reference did not make it last time; here it is,
> >
> > [0]  [Jprogramming] Adverbial Tacit Jym  Jose Mario Quintana
> >     http://www.jsoftware.com/pipermail/programming/2016-August/
> 045622.html
> >
> >
> >
> >
> > On Sun, Aug 21, 2016 at 6:34 PM, Jose Mario Quintana <
> > [email protected]> wrote:
> >
> >> I am afraid that you must strengthen the rules; the easiest way would be
> >> to add "no cheating is allowed."  Otherwise, one can cheat easily [0]
> >>
> >> [0]
> >>
> >>
> >>
> >>
> >>
> >> On Sat, Aug 20, 2016 at 6:49 PM, Louis de Forcrand <[email protected]>
> >> wrote:
> >>
> >>> Alrighty then.
> >>>
> >>> Let’s start this off with a couple of rules:
> >>> - We can either count characters or tokens; I suggest tokens.
> >>>  Either one should be counted on fixed (f.) functions.
> >>> - Programs can be restricted to either tacit or explicit, or not.
> >>>  In the latter case counting tokens would be ambiguous, so I
> >>>  don’t think the two should be used together.
> >>>
> >>> Of course this could change from task to task, and should be clarified
> >>> at the beginning of new challenges.
> >>> I won’t be coming up with all of the challenges; you should make some
> >>> up too.
> >>>
> >>>
> >>> Without further ado, here is a simple first challenge:
> >>> Write a verb which takes a scalar N, and returns all solutions to the
> >>> N-Queens problem in the form of a rank-2 array of rank-1 permutation
> >>> vectors. Given a vector V, the queens’ coordinates are:
> >>>
> >>>        (,.~ i.@#) V
> >>>
> >>> This can be done because we know that no two queens can be
> >>> placed on the same row.
> >>>
> >>> I suggest counting tokens of tacit solutions using this verb:
> >>>
> >>>        scr=: #@;:@(5!:5)       NB. score verb: scr ‘foo’ ; ‘bar’ ;
> ‘baz’
> >>>
> >>> If you have a better suggestion for scoring or rules, feel free to
> chime
> >>> in.
> >>> In addition, if you feel your version is particularly elegant, or
> >>> efficient,
> >>> or posses any other attribute you deem worthy, please share it with us,
> >>> even if it is does not have an especially low score.
> >>>
> >>> I will be posting my contender soon.
> >>>
> >>> Cheers,
> >>> Louis
> >>>
> >>>
> >>>> On 20 Aug 2016, at 21:47, Joe Bogner <[email protected]> wrote:
> >>>>
> >>>> Hi! Welcome. I think this is the right place.
> >>>>
> >>>> Source: http://www.jsoftware.com/forums.htm
> >>>>
> >>>> On Aug 20, 2016 3:35 PM, "Louis de Forcrand" <[email protected]>
> wrote:
> >>>>
> >>>>> Hi everyone,
> >>>>>
> >>>>> Would this be the appropriate place for some Jolfing (J code
> golfing),
> >>>>> or is there a better place for this?
> >>>>>
> >>>>> Thanks,
> >>>>> Louis
> >>>>>
> >>>>> ------------------------------------------------------------
> ----------
> >>>>> For information about J forums see http://www.jsoftware.com/forum
> s.htm
> >>>> ------------------------------------------------------------
> ----------
> >>>> For information about J forums see http://www.jsoftware.com/forum
> s.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

Reply via email to