David has alerted me to a serious bungle of mine in this article, and especially the subsection:
http://code.jsoftware.com/wiki/Articles/APL_--_a_Glimpse_of_Heaven#Indexing I was under the false impression I'd carefully tested all the code samples. But, late at night, in my haste to publish this article and finish the task, I seem to have omitted this important step. At least, I did for this subsection, and maybe elsewhere too. I have since corrected the omission in #Indexing (which all involved Index Origin: 0 versus 1), and checked that the J code executes and gives the results shown. I would however beg readers to alert me to any places in the article, and its APL sister page in Jwiki, where the J code blocks do not run true. ALSO THE APL – since I have come across errors/typos there too. You may pm me, or post on this forum, ideally on this thread, or on the Programming forum, since it entails the correct functioning of J code. Being sure that the APL is correct is of fundamental importance. Any corrections to the results in the APL version will prompt correction to the J version too, since I've been at pains to formulate my J translation to compute the same figures. NB also the disclaimer I've added to the head of this article, in its J version. Ian Clark On Sat, May 26, 2018 at 11:47 AM, David Lambert <[email protected]> wrote: > Do you trust me to fix the index origin trouble? The entire indexing > section needs revist. Thank you. I will start recommending this page on > the forums where I sell j. > > In:http://code.jsoftware.com/wiki/Articles/APL_-_a_Glimpse_of_Heaven > > > Indexing > > Returning to our vector of numbers:Val=: 22 37 41 19 54 11 34 > > In order to extract the fourth item, we write4{Val > > > ............... > > > > Val =: (300 77 111) 3 5 1}Val > Val > *111*37*300*19*77*11 34 > > > ................ > > > Val =: (300 77 111) 3 5 1}Val > Val > *111*37*300*19*77*11 34 > > It is often necessary to extract the first items from a list of values, > for example the first 5. Nothing could be easier: > > 1 2 3 4 5 {Val > 111 37 300 19 77 > > > On 05/26/2018 12:38 AM, [email protected] wrote: > >> Date: Sat, 26 May 2018 05:38:39 +0100 >> From: Ian Clark<[email protected]> >> To:[email protected] >> Subject: [Jchat] A Glimpse Of Heaven, by Bernard Legrand >> Message-ID: >> <[email protected] >> ail.com> >> Content-Type: text/plain; charset="UTF-8" >> >> Way back in 2008 Chris Burke drew attention to an article in Vector 23/1 >> by >> Bernard Legrand, translated by Sylvia Camacho, entitled *APL – a Glimpse >> of >> Heaven.* >> This was first presented at a conference of 22 June 2006, organized by >> AFAPL: *Association Francophone pour la promotion du langage APL.* >> It was an unashamedly evangelistic appeal to the "diplodocus generation" >> of >> C/C++ programmers to take APL seriously as a professional language. >> In:http://code.jsoftware.com/wiki/Articles/APL_-_a_Glimpse_of_Heaven >> Chris conjectured that the article would need only minor changes to offer >> J >> in place of APL. He offered it as an "interesting exercise for the >> beginner". >> >> However the challenge was never taken up… until now. >> >> Ladies and Gentlemen, it gives me great pleasure to present to the world: >> >> http://code.jsoftware.com/wiki/Articles/J_--_a_Glimpse_of_Heaven >> by Bernard Legrand, >> translated by Sylvia Camacho and done into J by yours-truly. >> > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
