Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Raul Miller
potential side effects, probably. -- Raul On Fri, Aug 4, 2017 at 12:41 AM, Louis de Forcrand wrote: > Just wondering why > > isgerund=: 3 : 0 :: 0 > y@.] > 1 > ) > > isn't an acceptable test for “gerundality”? > > I also kind of agree with Bill, i

Re: [Jprogramming] Jx version 1.0 release

2017-08-03 Thread Louis de Forcrand
I quite like this idea. It’s unfortunate that m”n was previously defined differently, but as you say conflicts would probably be nonexistent, and I’ve often wanted to apply one verb to the first element of an array, another to the second, etc. On my wish list would be something similar for the “e

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Louis de Forcrand
Just wondering why isgerund=: 3 : 0 :: 0 y@.] 1 ) isn't an acceptable test for “gerundality”? I also kind of agree with Bill, in the sense that J doesn’t seem to have been designed from the ground up (or halfway up for that matter) to facilitate pr

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Bill
From my understanding, the reference shows the atomic representation of gerund. It does not advocate this a way to construct a gerund. moreover it is "foreign" conjunction. numbers can be converted from strings using foreign conjunction but it doesn't mean J encourages writing numbers using thi

Re: [Jprogramming] Jx version 1.0 release

2017-08-03 Thread Jose Mario Quintana
I am very sorry to hear that; Jx is certainly not for the faint-hearted. One of my favorite quotes is "the description is not the described." Even if one could have a recipe which is a perfect description for producing a deliciously decadent meal; one cannot, or rather should not, eat the recipe.

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Jose Mario Quintana
" In J dictionary, only tie conjunction on verbs was mentioned to produce a gerund. " I am afraid you might not be the only one who has reached such conclusion. Nevertheless, in my opinion, it is a misconception that a gerund can only be a list (of atomic representations) of verbs. Why? See [0]

[Jprogramming] Testing for gerund

2017-08-03 Thread Jose Mario Quintana
Testing for gerund might be a little trickier than one might think at first sight (and it is context dependent)... fx=. 5!:0 erase'v' 1 isgerund 'v' 0 'v'fx |value error: v |[-0] So far so good; but, v=. + isgerund 'v' 0 'v'fx + On Wed, Aug 2, 2017 at 10:07 PM, 'Pasc

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Jose Mario Quintana
Marshall, I could not agree more with you. Actually, I can, so to speak ;) Why shall we stop there? Why not to go all the way instead?Jx shows that the sky does not fall; it is compatible with all the libraries as far as I know. The only potential issues might occur when error handling code

Re: [Jprogramming] Jx version 1.0 release

2017-08-03 Thread Raul Miller
Personally, I'll be more impressed when I see documentation on the resulting grammar. I have had few problems creating code which uses inconsistent grammar. I can imagine the poetic delight in writing code which takes advantage of these ambiguities. I very much understand that this kind of thing

Re: [Jprogramming] Jx version 1.0 release

2017-08-03 Thread Jose Mario Quintana
A common objective of many Jx extensions is to unleash the latent power of an official J interpreter to facilitate the use of higher-order functions (verbs, adverbs and conjunctions) by providing the means to pass them, directly, as arguments to other functions. Arguably, the Dictionary [0] only a

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Raul Miller
You did. I retract these objections. That said, given the extreme pervasiveness and quirky nature of this new error, I think we should get a new, unique error message. (There's plenty of precedent for that - for example, "index error" is a specialized error when an index is not in the domain of a

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Don Guinn
g=:;:'+-/\' (;0 2{g)(128!:2)i.5 10 (;1 2 3{g)(128!:2)i.5 0 _1 1 _2 2 On Thu, Aug 3, 2017 at 5:05 AM, Marshall Lochbaum wrote: > I stated in my post that any verb which would unbox a boxed verb should > instead domain error. This is essentially the same thing that explicit > verbs do whe

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Marshall Lochbaum
I stated in my post that any verb which would unbox a boxed verb should instead domain error. This is essentially the same thing that explicit verbs do when their last line has a non-noun result. Failure to do this would already be a bug, which makes the bugs mentioned in (2) irrelevant--the incorr

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread bill lam
I am thinking of the opposite. In J dictionary, only tie conjunction on verbs was mentioned to produce a gerund. Boxed verbs had not been mentioned. Atomic representation of boxed verbs looks like that of gerund and therefore can work as gerund. IMO this is a backdoor provided by J implementation.

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Raul Miller
Some notes: (1) This suggests that it would be legal for a verb result to be a verb (because unbox is a verb and the proposal is that it produce verb results). (2) Currently, we get crashes in some contexts where this behavior has been allowed to leak into the interpreter. (3) By making the leak

Re: [Jprogramming] Jx version 1.0 release

2017-08-03 Thread Raul Miller
Counter arguments: (1) g"n currently defines a different behavior for gerunds, (2) The cyclic behavior suggested here could (and probably should) be implemented without touching the rank operator. (3) No useful test cases have been proposed. For example, let us say that we defined `:2 to support

[Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Marshall Lochbaum
Can I just point out that it's not too late to add some (documented) way to box verbs/adverbs/conjunctions? These could be treated as gerunds by everything that currently uses gerunds, and the interpreter can just throw an error if anything attempts to actually unbox them. They are much harder to c