Here's a better illustration of the problem: example=: ((3 ar)`) (`(5 ar))(`:6) 0!:0 'example2=:',5!:5<'example' + example 8 + example2 |domain error: example2
Thanks, -- Raul On Thu, Feb 27, 2020 at 10:15 PM 'Pascal Jasmin' via Programming <programm...@jsoftware.com> wrote: > > the bug is the display of > > ((3 ar)`) (`(5 ar))(`:6) > > ((3`)(`5))(`:6) > > ((3 ar)`) (`(5 ar)) > > (3`)(`5) > > > where, > ar =: 1 : '5!:1 <''u''' > > The displayed code result is not a valid executable equivalence to the > expression that created it. This appears to be a display only bug, as the > code works internally. > > ((3 ar)`) NB. this should be (<(,'0');3)` > > <(,'0');3` > > > > > > > On Thursday, February 27, 2020, 09:20:51 p.m. EST, Henry Rich > <henryhr...@gmail.com> wrote: > > > > > > I also don't understand what it is alleged is an error. > > Henry Rich > > On 2/27/2020 9:06 PM, Julian Fondren wrote: > > On 2020-02-27 19:38, 'Pascal Jasmin' via Programming wrote: > >> gerunds are lists of atomic representations? (yes,ok, that is a noun) > >> > >> A more basic description of the problem. > > > > What is the problem though? Is 'modifiers' still a valid subject > > for this thread? Even reading your last message, or the thread > > from the beginning, I really don't know what you're saying here. > > > >> Both of these expressions are illegal > >> 3`+ > >> 3`+`5 > >> > > ... > >> > >> These 2 expressions "parse" due to the "lazy"/spartan > >> definition/behaviour of ` > >> > >> +`a: > >> > > ... > >> a:`+ > >> > > > > I don't believe this is because a: is a magical noun, but > > because it's boxed. > > > > (<3)`+`(<5) > > ┌─┬─┬─┐ > > │3│+│5│ > > └─┴─┴─┘ > > > > consider: > > > > +`a.`- > > |domain error > > | + `a.`- > > +`(<a.)`-@.0 ] 1 > > 1 > > +`(<a.)`-@.2 ] 1 > > _1 > > +`(<a.)`-@.1 ] 1 > > |domain error > > | +`(<a.)`- @.1]1 > > datatype > 1 { +`(<a.)`- > > literal > > # > 1 { +`(<a.)`- > > 256 > > ((<'+');(<'-'))@.1 ] 1 > > _1 > > ((<'+');(<'-'))@.0 ] 1 > > 1 > > > >> > >> I have well tested code that provides "return list of atomic > >> representations" behaviour from tie if that is deemed a worthwhile > >> change. > >> > >> But, my other point was that "visual sugar" that is invalid code can > >> have inconveniences. > >> > >> > >> > >> On Thursday, February 27, 2020, 03:14:58 p.m. EST, Raul Miller > >> <rauldmil...@gmail.com> wrote: > >> > >> > >> > >> > >> > >> gerund are nouns. > >> > >> Thanks, > >> > >> -- > >> Raul > >> > >> On Thu, Feb 27, 2020 at 12:51 PM 'Pascal Jasmin' via Programming > >> <programm...@jsoftware.com> wrote: > >>> > >>> Seems I found a bug, though the following approach still works, and > >>> has the best performance > >>> > >>> ar =: 1 : '5!:1 <''u''' > >>> > >>> the bug is: > >>> > >>> ((3 ar)`) (`(5 ar)) (`:6) > >>> > >>> ((3`)(`5))(`:6) NB. not valid gerunds, though magically the > >>> following still works > >>> > >>> + ((3 ar)`) (`(5 ar)) (`:6) > >>> 8 > >>> > >>> + A=: (((3 ar)`) (`(5 ar)) (`:6)) NB. separate lines still work > >>> despite "invalid return" > >>> > >>> 8 > >>> > >>> though the following fails, > >>> > >>> + ((3`)(`5))(`:6) > >>> > >>> |domain error > >>> > >>> representation is supposed to be, > >>> > >>> + ((3 ar)`) (`(5 ar)) > >>> > >>> ┌─────┬─┬─────┐ > >>> > >>> │┌─┬─┐│+│┌─┬─┐│ > >>> > >>> ││0│3││ ││0│5││ > >>> > >>> │└─┴─┘│ │└─┴─┘│ > >>> > >>> └─────┴─┴─────┘ > >>> > >>> > >>> An incompatible change that would seem very welcome to me, would be > >>> that > >>> > >>> noun ` noun > >>> > >>> instead of creating a list from the 2 nouns (pair) if they are > >>> magically compatible, would create a pair of atomic representations > >>> of each noun. > >>> > >>> Because the above code works, it appears as though just "visual > >>> sugar" is provided for display. The proposed incompatible change > >>> would make the visual sugar valid code, which is consistent (other > >>> than this) within J. > >>> > >>> On Thursday, February 27, 2020, 11:33:59 a.m. EST, Raul Miller > >>> <rauldmil...@gmail.com> wrote: > >>> > >>> > >>> > >>> > >>> > >>> Or, more robust: > >>> > >>> C=:2 :0 > >>> mRep=. 5!:5<'m' > >>> mVn=. m V n > >>> mVnRep=. 5!:5<'mVn' > >>> 1 :('(',mRep,') u~ ',mVnRep) > >>> ) > >>> > >>> Example use: > >>> > >>> V=:+ > >>> ,. 10 C (i.2 3) > >>> 10 11 12 10 > >>> 13 14 15 10 > >>> > >>> (The issue here is that 5!:5 is better than ": when serializing nouns > >>> for use in sentences.) > >>> > >>> Perhaps even better, though, would be to define a verb to serialize > >>> nouns and use that in place of ": > >>> > >>> lrep=:3 :0 > >>> '(',(5!:5<'y'),')' > >>> ) > >>> > >>> C=:2 :0 > >>> 1 :((lrep m),'u~',lrep m V n) > >>> ) > >>> > >>> Thanks, > >>> > >>> -- > >>> Raul > >>> > >>> On Thu, Feb 27, 2020 at 6:48 AM 'Pascal Jasmin' via Programming > >>> <programm...@jsoftware.com> wrote: > >>> > > >>> > C =: 2 : 0 > >>> > 1 : ((": m) , ' u~ ' , ": m V n) > >>> > ) > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > On Thursday, February 27, 2020, 03:04:57 a.m. EST, Hauke Rehr > >>> <hauke.r...@uni-jena.de> wrote: > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > What I want is rather something (C here) callable like > >>> > noun1 C noun2 > >>> > resulting in the adverb > >>> > noun1 u~ <result of noun1 V noun2> > >>> > > >>> > What you say I knew except if the evaluation > >>> > rules changed in j9 and this is new bahaviour. > >>> > > >>> > That said, I got rid of my nested 1 :/2 : > >>> > construct (I didn’t mention that yet) > >>> > and tried replacing m and n by x and y > >>> > but to no avail. > >>> > > >>> > Am 27.02.20 um 01:37 schrieb 'Pascal Jasmin' via Programming: > >>> > > u or m will be the argument to A. x and y arguments to > >>> resulting verb. > >>> > > > >>> > > it sounds as though you may be trying to do > >>> > > > >>> > > A =: 1 : 'x u~ x V y' NB. a valid dyadic adverb in j9 > >>> > > > >>> > > and this would be equivalent to > >>> > > > >>> > > ([ u~ V) > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > On Wednesday, February 26, 2020, 06:20:45 p.m. EST, Hauke Rehr > >>> <hauke.r...@uni-jena.de> wrote: > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > Hello again, > >>> > > > >>> > > I’m still confused about modifiers. > >>> > > Please tell me where to find more information > >>> > > that might aid in understanding how this works: > >>> > > > >>> > > I have an adverb A and a verb V but sometimes > >>> > > x and y for the derived verb for A are known > >>> > > prior to the verb, so I want to write a modifier > >>> > > something like this: > >>> > > > >>> > > m (u A)~ m V n > >>> > > > >>> > > I get a domain error which afaik is due to both > >>> > > m and u being bound to the left noun. > >>> > > So how would one go about this and where to find > >>> > > further information on constructions like this? > >>> > > > >>> > > >>> > -- > >>> > ---------------------- > >>> > mail written using NEO > >>> > neo-layout.org > >>> > > >>> > > >>> ---------------------------------------------------------------------- > >>> > 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 > > ---------------------------------------------------------------------- > > 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