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 1k9ZGZ-0003lT-FI for pljava-dev@arkaria.postgresql.org; Sat, 22 Aug 2020 19:33:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k9ZGY-00034Z-2Q for pljava-dev@arkaria.postgresql.org; Sat, 22 Aug 2020 19:33:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k9ZGX-00034S-JB for pljava-dev@lists.postgresql.org; Sat, 22 Aug 2020 19:33:25 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k9ZGQ-0006Br-0f for pljava-dev@lists.postgresql.org; Sat, 22 Aug 2020 19:33:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NBUNXrXaVbUrJHsHrVKJr08bGhv16ebY2iuxyMYN0hM=; b=h4/kK8QCBw7kK7f3mZVla0GrWx hAOV2aDH6SmBWzDtqjCd6eseC23WBPhcNflktARkDgdnqWyDJUL7HzeNFVzgLZq8jq83T+XbVFPlE tw+xA5gdGQi65YKxuoOn5CZSWRvTmggrm5tOn8YwQ2pvsYNsAtWWjZnOU878SeYs/zBFN6PmXF6HB YqYG5MdyZKYrs3+V8fC1JeOKTvG68OA9zp+eZTbpocNYqhjzbb9W6a4/A29GvlPl0a43lBMy3oKJB w3TcwWhzbpWkeRB06bMTGpJ3MPt2MpP7Tdn9X/BIQpDCIoTaBTUUrT4+5J487ONGZZo/pdHHuGv11 X373h2Xw==; Received: from [184.19.31.139] (port=45274) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1k9ZGM-00BWWS-EB; Sat, 22 Aug 2020 15:33:15 -0400 Subject: Re: the ScriptingMojo To: Kartik Ohri References: <5F2EC4F4.3080608@anastigmatix.net> <5F31EFEC.1080609@anastigmatix.net> <5F368380.9070203@anastigmatix.net> <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> Cc: pljava-dev@lists.postgresql.org From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5F4172F9.4060608@anastigmatix.net> Date: Sat, 22 Aug 2020 15:33:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/22/20 06:15, Kartik Ohri wrote: > Hi! > I am working adding these changes but I am particularly stuck at this one. > It seems that Nashorn and Graal do not support SAM inside SAM or I am doing > this the wrong way. Please see https://www.ideone.com/cQVGuB and > https://www.ideone.com/1x7Ah7. The former one fails at runtime but the > latter completes execution. (Here I have done a Consumer > whereas Function will be required for our use case, but both > fail at runtime anyways). This is the commit ( > https://github.com/amCap1712/pljava/commit/136a8e879951432ec47faeb74e2a86e848481e67) > with changes that fails. I have been able to work around the issue using > the approach here > https://github.com/amCap1712/pljava/commit/d5977c5cf386758fb2d9e56524b05f9549cefe31 Just getting a look at this now. In the (failing) 136a commit, it appears to me that nashorn fails but graal is happy. Is that what you saw? Graal fails at a different spot, on the Files.walk().parallel()... invocation in the script, but that's clearly a different issue; neither script engine wants to be shared across threads. A sequential walk is adequate here; this is just a build process that runs once, so shaving milliseconds isn't essential. Ok, I removed the parallel() and now graal also complains about the SAM cast. This puzzles me because I thought both engines were intended to support that, so I'll keep playing with it a bit. Regards, -Chap