>>Anyways, adverbs and conjunctions are evaluated when building tacit >>verbs, so J cannot defer their name resolution until later unless you >>embed them in an explicit verb. > > Thanks, Raul -- I guess that perfectly describes the situation I've > run up against. :) > Plus the remedy, which is the one I've resorted to. :/ > But IMO that's like Molière: Q: Why does morphine make you sleep?...
Sorry Raul, I entirely missed the point, didn't I? ... If adverbs and conjunctions combine verbs into new verbs, then those new verbs logically come into existence at definition time, not run-time. Hence the conjunction has to be expanded at definition time: you can't avoid it. Very taken-up right now with clearly explaining J concepts to novices. Seems I needed this one explaining to myself: I was implicitly viewing a conjunction as a kind of super-verb taking extended arguments. Definitely an APL mindset there. On Wed, Jun 8, 2011 at 2:55 PM, Ian Clark <[email protected]> wrote: >>Anyways, adverbs and conjunctions are evaluated when building tacit >>verbs, so J cannot defer their name resolution until later unless you >>embed them in an explicit verb. > > Thanks, Raul -- I guess that perfectly describes the situation I've > run up against. :) > Plus the remedy, which is the one I've resorted to. :/ > But IMO that's like Molière: Q: Why does morphine make you sleep? A: > Because it contains a "virtus soporifis". > > I dreamed up my "shift" adverb precisely to define handlers tacitly, > (wanting: succintly), but maybe it's a wrong path to go down. Asking > the user to hold down a modifier key when clicking a button is a > shabby trick anyway, only prompted by the need to economise on > buttons. > > Ah well, back to menus and checkboxes. You can't beat-em. > >> I think your code browser is based on a workspace (APL) mindset. > > Too right it is, Bill. But "mindset" is unfair. I broke my APL mindset > two years ago when I enthusiastically took up J, went back to editing > ASCII txtfiles as I ever did with GBASIC, C, SNOBOL, Fortran, PL/S... > and dismissed workspaces as an illusory benefit. > > Now I'm not so sure. Maybe APL wasn't all bad. Though what was good > about it needs close scrutiny. > > I prefer to think of my extended browser as the Borland Pascal > approach. It is distinctly more productive. You could say JGTK > addresses the same problem: rapid look-aside and x-reffing, which > comes almost free with workspaces. It is their main (=only?) > justification. But, with effort, you can recover the useful > functionality with a really smart code editor, without the run-time > limitations of an actual workspace. > > For people too young to remember Borland Pascal, think Dreamweaver > (...I daren't mention VB on this list :) > > > On Wed, Jun 8, 2011 at 1:22 AM, bill lam <[email protected]> wrote: >> hypothetically, I guess your code browser cannot retrieve the orignal >> definition of nouns which has been already evaluated, similarly for verbs >> which has been evaluated from adverbs or conjunctions. >> >> I think your code browser is based on a workspace (APL) mindset. J is >> based on scripts, so that if your code browser searches collection of >> scripts instead of locales (ram), there is a better chance of locating the >> definition. For example, use find-in-files or ctag for mygui_myctl_button. >> >> Втр, 07 Июн 2011, Ian Clark писал(а): >>> In my endless quest for crystal-clear gui code, I've defined a >>> conjunction 'shift'... >>> >>> shift=: 2 : 0 >>> if. 1=".sysmodifiers do. v y else. u y end. >>> ) >>> >>> for use like this: >>> mygui_myctl_button=: foo shift baa >>> which works just fine. The button "myctl" does foo unless Shift is >>> held down, whereupon it does baa. >>> >>> But... >>> >>> If I inspect 'mygui_myctl_button' with my code-browser (which uses >>> 5!:6), what I don't see is 'foo shift baa'. >>> Instead what I see is: >>> >>> 5!:6 <'mygui_myctl_button' >>> foo (2 : 0) baa >>> if. 1=".sysmodifiers do. v y else. u y end. >>> ) >>> >>> The word 'shift' has got lost. Replaced by its definition. None of the >>> other (5!:) foreigns see it either. >>> >>> Is there a way of retrieving the original definition? -- >>> mygui_myctl_button=: foo shift baa >>> >>> ...I mean: without giving up on tacit code? I suppose I can always write: >>> mygui_myctl_button=: 3 : '(foo shift baa)y' >>> which works, but (tacitly) throws in the towel. >>> ---------------------------------------------------------------------- >>> For information about J forums see http://www.jsoftware.com/forums.htm >> >> -- >> regards, >> ==================================================== >> GPG key 1024D/4434BAB3 2008-08-24 >> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
