Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAnJ1-0003Ac-KB for pljava-dev@arkaria.postgresql.org; Wed, 26 Aug 2020 04:45:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kAnJ0-0008Ma-GA for pljava-dev@arkaria.postgresql.org; Wed, 26 Aug 2020 04:45:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAnJ0-0008Lb-9f for pljava-dev@lists.postgresql.org; Wed, 26 Aug 2020 04:45:02 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kAnIx-0004WV-To for pljava-dev@lists.postgresql.org; Wed, 26 Aug 2020 04:45:01 +0000 Received: by mail-ej1-x633.google.com with SMTP id bo3so995250ejb.11 for ; Tue, 25 Aug 2020 21:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gl3TdM22PKOG8JHdLT6G2aIBUvs555Butfb+r7YN9lQ=; b=kVRc+XesSY60fNhrrUE+vBLRpuThg/X48etlHRiis64GzPZlj0Xuiwi5Mw7GTfZmGT TeQpQaSGqef/vf7j3bUWiBR0zPfyVJywW34vcM5mXW6vHl5qJJArCI4rY2FjMGcxI3UN 8raDYEWhIShhzV1Urfq3+eylOuhDpgYphA/PZP3ji5opLoFQnPlHTPJ2lLJvW+R9tsMz 4JpcGCrsa7+skdCaEmsi0kIgMX4WEKnuu9ahcJGNhZvUiEm6Xhbb1p3Gd4yixYhF8zqw oyUazAq8/5qWZfAunvq9Ie2kCVdsP/KjPnKr8XCgJB/qd01pOxezjw94r3TnTskc6Mnt LQIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gl3TdM22PKOG8JHdLT6G2aIBUvs555Butfb+r7YN9lQ=; b=AeGJEdC8A7XhDE5tHdU2dyR7yNCMT9mplhgYaN/eT2REj/6uneZxqHd6uBOVg+Uyxq 4yPKLkAjSJUC94feDDn2Ah9muCZzniuzwDP+KCaLqtyIiW04LTP7C7DmojlHmsjMA2u2 Fl4ocgCGVZJb7tQ7J0rTPYE6TkGCOnkRNH0Kj6yl97KHY5SnvM/Oo+jlDv8UsAv5tCkJ r7+PKZaC6i7OEu/i3OePHyvzJZ0vQ7rBlf603sj1lNnQ+ebYR96X1/1AIQ0J/mIni/Ug m8pwIC8kWKnecJHjp3cxqTNOZ5bXcAf+r2g/KTfGlVeIiBhfD+A9YfXOzxHipqL+qtI9 X4lA== X-Gm-Message-State: AOAM533QVw/vZu6CvzjLJmVwh8npSvi9Yt5Fp8+aSOryGXpkJTUjTSdq 81wNZJFz5aXlDVBmMvgRo9i5WAitumrA1w2voiHLWcLIF2U= X-Google-Smtp-Source: ABdhPJw7PQS0YI3NzyGCA5jrb6lkHjslntUm/UCbLjKnlFfKhNH3ixaedwdJK02MF+fLG5zuDttwcM3tx6MScCBm1AQ= X-Received: by 2002:a17:906:91c8:: with SMTP id b8mr4340921ejx.103.1598417097610; Tue, 25 Aug 2020 21:44:57 -0700 (PDT) MIME-Version: 1.0 References: <5F368A99.6070709@anastigmatix.net> <5F36965C.60707@anastigmatix.net> <5F3A7DC6.8090905@anastigmatix.net> <5F3D32E9.80504@anastigmatix.net> <5F3D36BE.70703@anastigmatix.net> <5F3D38F8.7050907@anastigmatix.net> <5F3D3A75.5010304@anastigmatix.net> <5F3D3D2E.4070109@anastigmatix.net> <5F3D43BD.4020900@anastigmatix.net> <5F3DA48D.7090408@anastigmatix.net> <5F41943D.9080707@anastigmatix.net> <5F427604.5010103@anastigmatix.net> <5F42A71F.8000002@anastigmatix.net> <5F459B6E.3020803@anastigmatix.net> In-Reply-To: <5F459B6E.3020803@anastigmatix.net> From: Kartik Ohri Date: Wed, 26 Aug 2020 10:14:45 +0530 Message-ID: Subject: Re: the ScriptingMojo To: Chapman Flack Cc: pljava-dev@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000004e57af05adc07b47" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000004e57af05adc07b47 Content-Type: text/plain; charset="UTF-8" Hi! > I have noticed a quirk (in nashorn anyway, haven't tried graal) where > even the methods that are declared in the superclass can have trouble > referring to each other as this.method() even though calling them from > outside as bigobj.method() works fine. The dynamic nature of javascript > allows a workaround: they can refer to each other as bigobj.method(). > > I think that should be workable, as we will only be making one instance > of one of these objects, and probably saving that in an outer var, maybe > pgxs, and so if its JS-implemented methods internally refer to each other > it can just look like methoda: function() { pgxs.methodb(); }. > I had done the similar experimentation as you did with similar results in Nahorn and Graal. Both did not work when I tried to use this. I was able to call the methods externally but not inside each other. But that outer variable work around gives the desired results and I will use it that way. Thanks. Also, I had another question: is there any particular reason that compiling and linking should be two different commands. To me it appears to be another one of nar maven quirks. Compilers by default compile and link in a single step. It seems nar maven overrides it due to reason. Since, there is no configuration to suggest that this is desired I am a bit confused. Do we want to compile and link in different steps ? Regards, Kartik --0000000000004e57af05adc07b47 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!
=C2=A0
=
I have noticed a quirk (i= n nashorn anyway, haven't tried graal) where
even the methods that are declared in the superclass can have trouble
referring to each other as this.method() even though calling them from
outside as bigobj.method() works fine. The dynamic nature of javascript
allows a workaround: they can refer to each other as bigobj.method().

I think that should be workable, as we will only be making one instance
of one of these objects, and probably saving that in an outer var, maybe pgxs, and so if its JS-implemented methods internally refer to each other it can just look like methoda: function() { pgxs.methodb(); }.

I had done the similar experimentation as you did w= ith similar results in Nahorn and Graal.=C2=A0
Both did not work = when I tried to use this. I was able to call the methods externally=C2=A0
but not inside each other. But that outer variable work around giv= es the desired=C2=A0
results and I will use it that way. Thanks.<= /div>

Also, I had another question: is there any particu= lar reason that compiling and linking should
be two different com= mands.=C2=A0To me it appears to be another one of nar maven quirks.
Compilers by default compile and link in a single step. It seems nar mav= en overrides it due to
reason. Since, there is no configuration t= o suggest that this is desired I am a bit confused.
Do we want to= compile and link in different steps ?=C2=A0=C2=A0

Regards,
Kartik
--0000000000004e57af05adc07b47--