From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kP5AOo1GgF8oQAAA0tVLHw (envelope-from ) for ; Fri, 09 Oct 2020 11:16:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id AO41No1GgF81QAAAbx9fmQ (envelope-from ) for ; Fri, 09 Oct 2020 11:16:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 65E189401DD for ; Fri, 9 Oct 2020 11:16:27 +0000 (UTC) Received: from localhost ([::1]:46824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQqNs-0001Zn-Pk for larch@yhetil.org; Fri, 09 Oct 2020 07:16:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQqN7-0001ZR-Cg for emacs-orgmode@gnu.org; Fri, 09 Oct 2020 07:15:37 -0400 Received: from mail-ej1-f65.google.com ([209.85.218.65]:46195) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kQqN1-0000aD-FZ for emacs-orgmode@gnu.org; Fri, 09 Oct 2020 07:15:37 -0400 Received: by mail-ej1-f65.google.com with SMTP id t25so12453104ejd.13 for ; Fri, 09 Oct 2020 04:15:29 -0700 (PDT) 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; bh=+CuqNafSf7M19hyckN8iALt3/cdoDtEhjpnlZMEFxYA=; b=cXnqiOhxCXtYvgwIgNj0+8lfx0PYMhGFDJ+fTB5R0GWi+7VSck484/1eU4HS4OVDFa 8l5V6CX90uLFlRtOR49NC5rRx2AifXbxLfyy/ymIwiXElEM+5VQAiW/cA1oBd0bQhEh2 4G54SR0fxoavRV6t5V5rQ0W72eYUuKyTRBFWKH3UGLBNASfbeAltNiB9Wt0p4XF/m6YS edJB5DpKIgWssGyc8taJf0cBk9kp7ScCMOYzX66lL6DNbLrVKyr/6+KjV7B22Tgq9FUc agRrxpCNRJ8wDy13hWjZtmqySPdZbGrfH4FG3ocBDO3A9G9WnSBYmfTa+iUBBlYBGZua IDzw== X-Gm-Message-State: AOAM532KqJgxud4p3ShnwyrwbhHjfI8J/MtRwdll9XY1OlqR0i3GT5Zb HAn+A4GLb7O3eChRRknXQkjOVbg720lu6w/7rnWg3T+vtU0= X-Google-Smtp-Source: ABdhPJy6SNAu73JPPlmT8wNHuQAjeZrSxafZcL61HHdN9KmG401+CAnR5OoqefWCnulp/1Q6OhUNxB3SEeGyESG2XeI= X-Received: by 2002:a17:906:a002:: with SMTP id p2mr12965323ejy.399.1602242128422; Fri, 09 Oct 2020 04:15:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: ian martins Date: Fri, 9 Oct 2020 07:15:16 -0400 Message-ID: Subject: Re: [PATCH] ob-java To: Org-Mode mailing list Content-Type: multipart/mixed; boundary="000000000000e8dd0005b13b1027" Received-SPF: pass client-ip=209.85.218.65; envelope-from=ianxm1@gmail.com; helo=mail-ej1-f65.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/09 07:15:29 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=jhu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 1.69 X-TUID: 3O/ICyc2QVqa --000000000000e8dd0005b13b1027 Content-Type: multipart/alternative; boundary="000000000000e8dcfd05b13b1025" --000000000000e8dcfd05b13b1025 Content-Type: text/plain; charset="UTF-8" I noticed that the tests didn't run with "make test." This updates the patch so that they can. I didn't add java to the list of default languages because the java tests are slow. On Mon, Oct 5, 2020 at 9:23 AM ian martins wrote: > I wrote those examples in an org file so I could test as I wrote them, and > then exported it to make it more readable, but the export resulted in > source block headers being lost. Here is the same without export: > ---- > * Changes > > - support for functional mode (~:results value~) > - accept variables > - don't require package, class, and main definitions > - write source and result tempfiles to ~org-babel-temporary-directory~, > but respects the ~:dir~ header > - work with tramp > > * Examples > ** Example 1 > This outputs "hello." If class and main definitions aren't given the > code block will be wrapped in generic ones. > > #+begin_src java :results output silent > System.out.print("hello"); > #+end_src > > This is exactly equivalent: > > #+begin_src java :results output silent > public class Main { > public static void main(String[] args) { > System.out.print("hello"); > } > } > #+end_src > > ** Example 2 > This also outputs "hello." > > #+begin_src java :results value silent > return "hello"; > #+end_src > > ** Example 3 > This generates the class "Example" in the package "org.orgmode" in the > current directory. > > #+begin_src java :results output silent :classname org.orgmode.Example > :dir . > System.out.print("hello, org-mode"); > #+end_src > > ** Example 4 > The "Hey" class defines a static method but no main. C-c C-c on the > "Hey" source block will write "./org/orgmode/Hey.java" and compile it. > > The "Main" class calls the "Hey" class. C-c C-c on the "Main" source > block will write "./org/orgmode/Main.java" and compile and run it. > > #+begin_src java :results output silent :dir . > package org.orgmode; > > public class Hey { > public static String say() { > return "hey"; > } > } > #+end_src > > #+begin_src java :results output silent :dir . > package org.orgmode; > > public class Main { > public static void main(String[] args) { > System.out.print(Hey.say()); > } > } > #+end_src > > Instead of C-c C-c, we could have added tangle headers and written the > source files out by tangling. > > ** Example 5 > This prints the variable from the header > > #+begin_src java :var msg="hello, org-mode" :results output silent > System.out.print(msg); > #+end_src > > ** Example 6 > This prints "hello, org-mode." The table is provided to the method as a > list of lists. > > #+name: table > | message | hello, org-mode | > > #+begin_src java :var tbl=table :results output silent > System.out.print(tbl.get(0).get(1)); > #+end_src > > ** Example 7 > This example returns a list. > > Note that you're allowed to specify imports without defining the class > or main methods. > > #+begin_src java :results value :exports both > import java.util.Arrays; > > return Arrays.asList("message", "hello, org-mode"); > #+end_src > > #+RESULTS: > | message | hello, org-mode | > > On Mon, Oct 5, 2020 at 8:35 AM ian martins wrote: > >> 1 Changes >> ========= >> >> - support for functional mode (`:results value') >> - accept variables >> - don't require package, class, and main definitions >> - write source and result tempfiles to >> `org-babel-temporary-directory', but respects the `:dir' header >> - work with tramp >> >> >> 2 Examples >> ========== >> Some examples follow. See the tests for more examples. I'll write >> proper docs after review. >> >> 2.1 Example 1 >> ~~~~~~~~~~~~~ >> >> This outputs "hello." If class and main definitions aren't given the >> code block will be wrapped in generic ones. >> >> ,---- >> | System.out.print("hello"); >> `---- >> >> This is exactly equivalent: >> >> ,---- >> | public class Main { >> | public static void main(String[] args) { >> | System.out.print("hello"); >> | } >> | } >> `---- >> >> >> 2.2 Example 2 >> ~~~~~~~~~~~~~ >> >> This also outputs "hello." >> >> ,---- >> | return "hello"; >> `---- >> >> >> 2.3 Example 3 >> ~~~~~~~~~~~~~ >> >> This generates the class "Example" in the package "org.orgmode" in the >> current directory. >> >> ,---- >> | System.out.print("hello, org-mode"); >> `---- >> >> >> 2.4 Example 4 >> ~~~~~~~~~~~~~ >> >> The "Hey" class defines a static method but no main. C-c C-c on the >> "Hey" source block will write "./org/orgmode/Hey.java" and compile it. >> >> The "Main" class calls the "Hey" class. C-c C-c on the "Main" source >> block will write "./org/orgmode/Main.java" and compile and run it. >> >> ,---- >> | package org.orgmode; >> | >> | public class Hey { >> | public static String say() { >> | return "hey"; >> | } >> | } >> `---- >> >> ,---- >> | package org.orgmode; >> | >> | public class Main { >> | public static void main(String[] args) { >> | System.out.print(Hey.say()); >> | } >> | } >> `---- >> >> Instead of C-c C-c, we could have added tangle headers and written the >> source files out by tangling. >> >> >> 2.5 Example 5 >> ~~~~~~~~~~~~~ >> >> This prints the variable from the header >> >> ,---- >> | System.out.print(msg); >> `---- >> >> >> 2.6 Example 6 >> ~~~~~~~~~~~~~ >> >> This prints "hello, org-mode." The table is provided to the method as >> a list of lists. >> >> message hello, org-mode >> >> ,---- >> | System.out.print(tbl.get(0).get(1)); >> `---- >> >> >> 2.7 Example 7 >> ~~~~~~~~~~~~~ >> >> This example returns a list. >> >> Note that you're allowed to specify imports without defining the class >> or main methods. >> >> ,---- >> | import java.util.Arrays; >> | >> | return Arrays.asList("message", "hello, org-mode"); >> `---- >> >> message hello, org-mode >> > --000000000000e8dcfd05b13b1025 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I noticed that the tests didn't run with "make te= st." This updates the patch so that they can. I didn't add java to= the list of default languages because the java tests are slow.
On Mon, = Oct 5, 2020 at 9:23 AM ian martins <ian= xm@jhu.edu> wrote:
I wrote those examples in an org file so I= could test as I wrote them, and then exported it to make it more readable,= but the export resulted in source block headers being lost.=C2=A0 Here is = the same without export:
----
* Changes
- support for functional mode (~:results value~)
- accept variables- don't require package, class, and main definitions
- write source= and result tempfiles to ~org-babel-temporary-directory~, but respects the = ~:dir~ header
- work with tramp

* Examples
** Example 1
Thi= s outputs "hello." =C2=A0If class and main definitions aren't= given the
code block will be wrapped in generic ones.

#+begin_sr= c java :results output silent
=C2=A0 System.out.print("hello")= ;
#+end_src

This is exactly equivalent:

#+begin_src java := results output silent
=C2=A0 public class Main {
=C2=A0 =C2=A0 =C2=A0= public static void main(String[] args) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 System.out.print("hello");
=C2=A0 =C2=A0 =C2=A0 }
= =C2=A0 }
#+end_src

** Example 2
This also outputs "hello.= "

#+begin_src java :results value silent
=C2=A0 return "= ;hello";
#+end_src

** Example 3
This generates the class = "Example" in the package "org.orgmode" in the
curren= t directory.

#+begin_src java :results output silent :classname org.= orgmode.Example :dir .
=C2=A0 System.out.print("hello, org-mode&quo= t;);
#+end_src

** Example 4
The "Hey" class defines = a static method but no main. C-c C-c on the
"Hey" source block= will write "./org/orgmode/Hey.java" and compile it.

The &= quot;Main" class calls the "Hey" class. C-c C-c on the "= ;Main" source
block will write "./org/orgmode/Main.java" = and compile and run it.

#+begin_src java :results output silent :dir= .
=C2=A0 package org.orgmode;

=C2=A0 public class Hey {
=C2= =A0 =C2=A0 =C2=A0 public static String say() {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 return "hey";
=C2=A0 =C2=A0 =C2=A0 }
=C2=A0 }#+end_src

#+begin_src java :results output silent :dir .
=C2=A0 = package org.orgmode;

=C2=A0 public class Main {
=C2=A0 =C2=A0 =C2= =A0 public static void main(String[] args) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 System.out.print(Hey.say());
=C2=A0 =C2=A0 =C2=A0 }
=C2=A0 }<= br>#+end_src

Instead of C-c C-c, we could have added tangle headers = and written the
source files out by tangling.

** Example 5
Thi= s prints the variable from the header

#+begin_src java :var msg=3D&q= uot;hello, org-mode" :results output silent
=C2=A0 System.out.print= (msg);
#+end_src

** Example 6
This prints "hello, org-mod= e." The table is provided to the method as a list of lists.

#+n= ame: table
| message | hello, org-mode =C2=A0|

#+begin_src java := var tbl=3Dtable :results output silent
=C2=A0 System.out.print(tbl.get(0= ).get(1));
#+end_src

** Example 7
This example returns a list.=

Note that you're allowed to specify imports without defining th= e class
or main methods.

#+begin_src java :results value :exports= both
=C2=A0 import java.util.Arrays;

=C2=A0 return Arrays.asList= ("message", "hello, org-mode");
#+end_src

#+R= ESULTS:
| message | hello, org-mode |

On Mon, Oct 5, 2020 at 8:35 AM = ian martins <ianxm@jh= u.edu> wrote:
1 Changes
=3D=3D=3D=3D=3D=3D=3D=3D=3D

=C2= =A0 - support for functional mode (`:results value')
=C2=A0 - accept= variables
=C2=A0 - don't require package, class, and main definitio= ns
=C2=A0 - write source and result tempfiles to
=C2=A0 =C2=A0 `org-b= abel-temporary-directory', but respects the `:dir' header
=C2=A0= - work with tramp


2 Examples
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<= br>
Some examples follow.=C2=A0 See the tests for more examples.=C2=A0 = I'll write proper docs after review.

2.1 Exampl= e 1
~~~~~~~~~~~~~

=C2=A0 This outputs "hello." =C2=A0If= class and main definitions aren't given the
=C2=A0 code block will = be wrapped in generic ones.

=C2=A0 ,----
=C2=A0 | System.out.prin= t("hello");
=C2=A0 `----

=C2=A0 This is exactly equival= ent:

=C2=A0 ,----
=C2=A0 | public class Main {
=C2=A0 | =C2=A0= =C2=A0 public static void main(String[] args) {
=C2=A0 | =C2=A0 =C2=A0 = =C2=A0 =C2=A0 System.out.print("hello");
=C2=A0 | =C2=A0 =C2= =A0 }
=C2=A0 | }
=C2=A0 `----


2.2 Example 2
~~~~~~~~~~~= ~~

=C2=A0 This also outputs "hello."

=C2=A0 ,----=C2=A0 | return "hello";
=C2=A0 `----


2.3 Example= 3
~~~~~~~~~~~~~

=C2=A0 This generates the class "Example&qu= ot; in the package "org.orgmode" in the
=C2=A0 current directo= ry.

=C2=A0 ,----
=C2=A0 | System.out.print("hello, org-mode&= quot;);
=C2=A0 `----


2.4 Example 4
~~~~~~~~~~~~~

= =C2=A0 The "Hey" class defines a static method but no main. C-c C= -c on the
=C2=A0 "Hey" source block will write "./org/org= mode/Hey.java" and compile it.

=C2=A0 The "Main" clas= s calls the "Hey" class. C-c C-c on the "Main" source=C2=A0 block will write "./org/orgmode/Main.java" and compile a= nd run it.

=C2=A0 ,----
=C2=A0 | package org.orgmode;
=C2=A0 |=
=C2=A0 | public class Hey {
=C2=A0 | =C2=A0 =C2=A0 public static St= ring say() {
=C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 return "hey"= ;
=C2=A0 | =C2=A0 =C2=A0 }
=C2=A0 | }
=C2=A0 `----

=C2=A0 ,= ----
=C2=A0 | package org.orgmode;
=C2=A0 |
=C2=A0 | public class= Main {
=C2=A0 | =C2=A0 =C2=A0 public static void main(String[] args) {<= br>=C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 System.out.print(Hey.say());
=C2= =A0 | =C2=A0 =C2=A0 }
=C2=A0 | }
=C2=A0 `----

=C2=A0 Instead o= f C-c C-c, we could have added tangle headers and written the
=C2=A0 sou= rce files out by tangling.


2.5 Example 5
~~~~~~~~~~~~~
=C2=A0 This prints the variable from the header

=C2=A0 ,----
=C2= =A0 | System.out.print(msg);
=C2=A0 `----


2.6 Example 6
~~= ~~~~~~~~~~~

=C2=A0 This prints "hello, org-mode." The tabl= e is provided to the method as
=C2=A0 a list of lists.

=C2=A0 =C2= =A0message =C2=A0hello, org-mode

=C2=A0 ,----
=C2=A0 | System.ou= t.print(tbl.get(0).get(1));
=C2=A0 `----


2.7 Example 7
~~~= ~~~~~~~~~~

=C2=A0 This example returns a list.

=C2=A0 Note th= at you're allowed to specify imports without defining the class
=C2= =A0 or main methods.

=C2=A0 ,----
=C2=A0 | import java.util.Array= s;
=C2=A0 |
=C2=A0 | return Arrays.asList("message", "= ;hello, org-mode");
=C2=A0 `----

=C2=A0 =C2=A0message =C2=A0= hello, org-mode
--000000000000e8dcfd05b13b1025-- --000000000000e8dd0005b13b1027 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-ob-java.el-Add-support-for-variables-return-values-t.patch" Content-Disposition: attachment; filename="0001-ob-java.el-Add-support-for-variables-return-values-t.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kg25i8400 RnJvbSA2MzA3YzUyOGQxZDhhZWJjMDIwMDU1NWRlYTY4NTVmNDAxMTMyYWE1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBJYW4gTWFydGlucyA8aWFueG1Aamh1LmVkdT4KRGF0ZTogTW9u LCA1IE9jdCAyMDIwIDA4OjA3OjI1IC0wNDAwClN1YmplY3Q6IFtQQVRDSF0gb2ItamF2YS5lbDog QWRkIHN1cHBvcnQgZm9yIHZhcmlhYmxlcywgcmV0dXJuIHZhbHVlcywgdHJhbXAKCiogbGlzcC9v Yi1qYXZhLmVsOiBBZGQgc3VwcG9ydCBmb3IgdmFyaWFibGVzIGFuZCByZXR1cm4gdmFsdWVzLiAg V3JpdGUKdGVtcGZpbGVzIHRvIHRoZSBvcmctYmFiZWwtdGVtcG9yYXJ5LWRpcmVjdG9yeS4gIE1h a2UgcGFja2FnZSwgY2xhc3MsCmFuZCBtYWluIG1ldGhvZCBkZWZpbml0aW9ucyBvcHRpb25hbC4K CiogdGVzdGluZy9saXNwL3Rlc3Qtb2ItamF2YS5lbDogQWRkIHRlc3RzLgotLS0KIGxpc3Avb2It amF2YS5lbCAgICAgICAgICAgICAgfCA0MjIgKysrKysrKysrKysrKysrKysrKysrKy0tLQogdGVz dGluZy9saXNwL3Rlc3Qtb2ItamF2YS5lbCB8IDU4MyArKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKwogMiBmaWxlcyBjaGFuZ2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2thZ2UgZGlyCisgICAgICAgICAoYmFzZWRpciAoZmls ZS1uYW1lLWFzLWRpcmVjdG9yeSAoaWYgcnVuLWZyb20tdGVtcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yZy1iYWJlbC10ZW1wb3JhcnktZGlyZWN0b3J5 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIuIikpKQorICAg ICAgICAgOzsgdGhlIGRpciB0byB3cml0ZSB0aGUgc291cmNlIGZpbGUKKyAgICAgICAgIChwYWNr YWdlZGlyIChpZiAoYW5kIChub3QgcnVuLWZyb20tdGVtcCkgcGFja2FnZW5hbWUpCisgICAgICAg ICAgICAgICAgICAgICAgICAgKGZpbGUtbmFtZS1hcy1kaXJlY3RvcnkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgKGNvbmNhdCBiYXNlZGlyIChyZXBsYWNlLXJlZ2V4cC1pbi1zdHJpbmcgIlxc XC4iICIvIiBwYWNrYWdlbmFtZSkpKQorICAgICAgICAgICAgICAgICAgICAgICBiYXNlZGlyKSkK KyAgICAgICAgIDs7IHRoZSBmaWxlbmFtZSBvZiB0aGUgc291cmNlIGZpbGUKKyAgICAgICAgIChz cmMtZmlsZSAoY29uY2F0IHBhY2thZ2VkaXIgY2xhc3NuYW1lICIuamF2YSIpKQorCSA7OyBjb21w aWxlciBmbGFncwogCSAoY21wZmxhZyAob3IgKGNkciAoYXNzcSA6Y21wZmxhZyBwYXJhbXMpKSAi IikpCi0JIChjbWRsaW5lIChvciAoY2RyIChhc3NxIDpjbWRsaW5lIHBhcmFtcykpICIiKSkKKwkg OzsgcnVudGltZSBmbGFncworICAgICAgICAgKGNtZGxpbmUgKG9yIChjZHIgKGFzc3EgOmNtZGxp bmUgcGFyYW1zKSkgIiIpKQorICAgICAgICAgOzsgY29tbWFuZCBsaW5lIGFyZ3MKIAkgKGNtZGFy Z3MgKG9yIChjZHIgKGFzc3EgOmNtZGFyZ3MgcGFyYW1zKSkgIiIpKQotCSAoZnVsbC1ib2R5IChv cmctYmFiZWwtZXhwYW5kLWJvZHk6Z2VuZXJpYyBib2R5IHBhcmFtcykpKQorICAgICAgICAgOzsg dGhlIGNvbW1hbmQgdG8gY29tcGlsZSBhbmQgcnVuCisgICAgICAgICAoY21kIChjb25jYXQgb3Jn LWJhYmVsLWphdmEtY29tcGlsZXItY29tbWFuZCAiICIgY21wZmxhZyAiICIKKyAgICAgICAgICAg ICAgICAgICAgICAob3JnLWJhYmVsLXByb2Nlc3MtZmlsZS1uYW1lIHNyYy1maWxlICdub3F1b3Rl KQorICAgICAgICAgICAgICAgICAgICAgICIgJiYgIiBvcmctYmFiZWwtamF2YS1ydW50aW1lLWNv bW1hbmQKKyAgICAgICAgICAgICAgICAgICAgICAiIC1jcCAiIChvcmctYmFiZWwtcHJvY2Vzcy1m aWxlLW5hbWUgYmFzZWRpciAnbm9xdW90ZSkKKwkJICAgICAgIiAiIGNtZGxpbmUgIiAiIChpZiBy dW4tZnJvbS10ZW1wIGNsYXNzbmFtZSBmdWxsY2xhc3NuYW1lKQorCQkgICAgICAiICIgY21kYXJn cykpCisgICAgICAgICA7OyBoZWFkZXIgYXJncyBmb3IgcmVzdWx0IHByb2Nlc3NpbmcKKyAgICAg ICAgIChyZXN1bHQtdHlwZSAoY2RyIChhc3NxIDpyZXN1bHQtdHlwZSBwYXJhbXMpKSkKKyAgICAg ICAgIChyZXN1bHQtcGFyYW1zIChjZHIgKGFzc3EgOnJlc3VsdC1wYXJhbXMgcGFyYW1zKSkpCisg ICAgICAgICAocmVzdWx0LWZpbGUgKGFuZCAoZXEgcmVzdWx0LXR5cGUgJ3ZhbHVlKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgKG9yZy1iYWJlbC10ZW1wLWZpbGUgImphdmEtIikpKQorICAg ICAgICAgOzsgdGhlIGV4cGFuZGVkIGJvZHkgb2YgdGhlIHNvdXJjZSBibG9jaworICAgICAgICAg KGZ1bGwtYm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W10gdmFscyA9IChPYmplY3RbXSl2YWw7CisgICAgICAgICAgICBzYi5hcHBlbmQoXCJbXCIp OworICAgICAgICAgICAgZm9yIChpbnQgaWk9MDsgaWk8dmFscy5sZW5ndGg7IGlpKyspIHsKKyAg ICAgICAgICAgICAgICBzYi5hcHBlbmQoX190b1N0cmluZyh2YWxzW2lpXSkpOworICAgICAgICAg ICAgICAgIGlmIChpaTx2YWxzLmxlbmd0aC0xKQorICAgICAgICAgICAgICAgICAgICBzYi5hcHBl bmQoXCIsXCIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc2IuYXBwZW5kKFwiXVwiKTsK KyAgICAgICAgICAgIHJldHVybiBzYi50b1N0cmluZygpOworICAgICAgICB9IGVsc2UgaWYgKHZh bCBpbnN0YW5jZW9mIExpc3QpIHsKKyAgICAgICAgICAgIFN0cmluZ0J1ZmZlciBzYiA9IG5ldyBT dHJpbmdCdWZmZXIoKTsKKyAgICAgICAgICAgIExpc3QgdmFscyA9IChMaXN0KXZhbDsKKyAgICAg ICAgICAgIHNiLmFwcGVuZChcIltcIik7CisgICAgICAgICAgICBmb3IgKGludCBpaT0wOyBpaTx2 YWxzLnNpemUoKTsgaWkrKykgeworICAgICAgICAgICAgICAgIHNiLmFwcGVuZChfX3RvU3RyaW5n KHZhbHMuZ2V0KGlpKSkpOworICAgICAgICAgICAgICAgIGlmIChpaTx2YWxzLnNpemUoKS0xKQor ICAgICAgICAgICAgICAgICAgICBzYi5hcHBlbmQoXCIsXCIpOworICAgICAgICAgICAgfQorICAg ICAgICAgICAgc2IuYXBwZW5kKFwiXVwiKTsKKyAgICAgICAgICAgIHJldHVybiBzYi50b1N0cmlu ZygpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgcmV0dXJuIFN0cmluZy52YWx1ZU9m KHZhbCk7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihT dHJpbmdbXSBhcmdzKSB0aHJvd3MgSU9FeG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LWRhdGEgKG9yZy1iYWJlbC1qYXZhLXZhbC10by10eXBlIChjZHIgcGFpcikpKQorICAgICAg ICAgICAgKGJhc2V0eXBlIChjYXIgdHlwZS1kYXRhKSkKKyAgICAgICAgICAgICh2YXItdG8tamF2 YSAobGFtYmRhICh2YXIpIChmdW5jYWxsICMnb3JnLWJhYmVsLWphdmEtdmFyLXRvLWphdmEgdmFy IGJhc2V0eXBlKSkpKQorICAgICAgIChmb3JtYXQgIiAgICBzdGF0aWMgJXMgJXMgPSAlczsiCisg ICAgICAgICAgICAgICAoY2RyIHR5cGUtZGF0YSkgICAgICAgICAgICAgICAgICAgICA7IHR5cGUK KyAgICAgICAgICAgICAgIChjYXIgcGFpcikgICAgICAgICAgICAgICAgICAgICAgICAgIDsgbmFt ZQorICAgICAgICAgICAgICAgKGZ1bmNhbGwgdmFyLXRvLWphdmEgKGNkciBwYWlyKSkpKSkgOyB2 YWx1ZQorICAgKG9yZy1iYWJlbC0tZ2V0LXZhcnMgcGFyYW1zKSkpCisKKyhkZWZ1biBvcmctYmFi ZWwtamF2YS12YXItdG8tamF2YSAodmFyIGJhc2V0eXBlKQorICAiQ29udmVydCBhbiBlbGlzcCB2 YWx1ZSB0byBhIGphdmEgdmFyaWFibGUuCitDb252ZXJ0IGFuIGVsaXNwIHZhbHVlLCBWQVIsIG9m IHR5cGUgQkFTRVRZUEUgaW50byBhIHN0cmluZyBvZgoramF2YSBzb3VyY2UgY29kZSBzcGVjaWZ5 aW5nIGEgdmFyaWFibGUgb2YgdGhlIHNhbWUgdmFsdWUuIgorICAoY29uZCAoKGFuZCAoc2VxdWVu Y2VwIHZhcikgKG5vdCAoc3RyaW5ncCB2YXIpKSkKKyAgICAgICAgIChsZXQgKCh2YXItdG8tamF2 YSAobGFtYmRhICh2YXIpIChmdW5jYWxsICMnb3JnLWJhYmVsLWphdmEtdmFyLXRvLWphdmEgdmFy IGJhc2V0eXBlKSkpKQorICAgICAgICAgICAoY29uY2F0ICJBcnJheXMuYXN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gdmFsKSAnaW50 ZWdlcnApCisgICAoKGZsb2F0cCB2YWwpICdmbG9hdHApCisgICAoKG9yIChsaXN0cCB2YWwpICh2 ZWN0b3JwIHZhbCkpCisgICAgKGxldCAoKHR5cGUgbmlsKSkKKyAgICAgIChtYXBjIChsYW1iZGEg KHYpCisgICAgICAgICAgICAgIChwY2FzZSAob3JnLWJhYmVsLWphdmEtdmFsLXRvLWJhc2UtdHlw ZSB2KQorICAgICAgICAgICAgICAgIChgc3RyaW5ncCAoc2V0cSB0eXBlICdzdHJpbmdwKSkKKyAg ICAgICAgICAgICAgICAoYGZsb2F0cAorICAgICAgICAgICAgICAgICAod2hlbiAob3IgKG5vdCB0 eXBlKSAoZXEgdHlwZSAnaW50ZWdlcnApKQorICAgICAgICAgICAgICAgICAgIChzZXRxIHR5cGUg J2Zsb2F0cCkpKQorICAgICAgICAgICAgICAgIChgaW50ZWdlcnAKKyAgICAgICAgICAgICAgICAg KHVubGVzcyB0eXBlIChzZXRxIHR5cGUgJ2ludGVnZXJwKSkpKSkKKyAgICAgICAgICAgIHZhbCkK KyAgICAgIHR5cGUpKQorICAgKHQgJ3N0cmluZ3ApKSkKKworKGRlZnVuIG9yZy1iYWJlbC1qYXZh LXRhYmxlLW9yLXN0cmluZyAocmVzdWx0cykKKyAgIkNvbnZlcnQgUkVTVUxUUyBpbnRvIGFuIGFw cHJvcHJpYXRlIGVsaXNwIHZhbHVlLgorSWYgdGhlIHJlc3VsdHMgbG9vayBsaWtlIGEgbGlzdCBv ciB2ZWN0b3IsIHRoZW4gY29udmVydCB0aGVtIGludG8gYW4KK0VtYWNzLWxpc3AgdGFibGUsIG90 aGVyd2lzZSByZXR1cm4gdGhlIHJlc3VsdHMgYXMgYSBzdHJpbmcuIgorICAobGV0ICgocmVzIChv cmctYmFiZWwtc2NyaXB0LWVzY2FwZSByZXN1bHRzKSkpCisgICAgKGlmIChsaXN0cCByZXMpCisg ICAgICAgIChtYXBjYXIgKGxhbWJkYSAoZWwpIChpZ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tc3JjLWJsb2NrKSkpKSkKKworKGVydC1k ZWZ0ZXN0IG9iLWphdmEvcmVhZC1saXN0LXJldHVybi1hcnJheSAoKQorICAiUmVhZCBhIGxpc3Qg YW5kIHJldHVybiBhbiBhcnJheS4iCisgIChvcmctdGVzdC13aXRoLXRlbXAtdGV4dAorICAgICAg IiMrYmVnaW5fc3JjIGphdmEgOnZhciBhPWphdmFfbGlzdCA6cmVzdWx0cyBzaWxlbnQKK1N0cmlu Z1tdIGIgPSB7YS5nZXQoMCkuZ2V0KDApLCBhLmdldCgxKS5nZXQoMCl9OworcmV0dXJuIGI7Cisj K2VuZF9zcmMKKworIytuYW1lOiBqYXZhX2xpc3QKKy0gZm9ydHkKKy0gdHdvIgorICAgIChzaG91 bGQgKGVxdWFsICcoImZvcnR5IiAidHdvIikKKyAgICAgICAgICAgICAgICAgICAob3JnLWJhYmVs LWV4ZWN1dGUtc3JjLWJsb2NrKSkpKSkKKworKGVydC1kZWZ0ZXN0IG9iLWphdmEvcmVhZC1yZXR1 cm4tbGlzdC13aXRoLXBhY2thZ2UgKCkKKyAgIlJldHVybiBhIHZlY3Rvci4iCisgIChvcmctdGVz dC13aXRoLXRlbXAtdGV4dAorICAgICAgIiMrYmVnaW5fc3JjIGphdmEgOnZhciBhPWphdmFfbGlz dCA6cmVzdWx0cyBzaWxlbnQKK3BhY2thZ2UgcGtnOworaW1wb3J0IGphdmEudXRpbC5MaXN0Owor aW1wb3J0IGphdmEudXRpbC5BcnJheXM7CitMaXN0PFN0cmluZz4gYiA9IEFycmF5cy5hc0xpc3Qo YS5nZXQoMCkuZ2V0KDApLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGEuZ2V0KDEp LmdldCgwKSk7CityZXR1cm4gYjsKKyMrZW5kX3NyYworCisjK25hbWU6IGphdmFfbGlzdAorLSBm b3J0eQorLSB0d28iCisgICAgKHNob3VsZCAoZXF1YWwgJygiZm9ydHkiICJ0d28iKQorICAgICAg ICAgICAgICAgICAgIChvc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hci13aXRoLWhlYWRlciAoKQorICAiUmVhZCBtYXRyaXggdmFyaWFibGUgYW5kIHdyaXRl IGl0IHdpdGggaGVhZGVyLiIKKyAgKG9yZy10ZXN0LXdpdGgtdGVtcC10ZXh0CisgICAgICAiIyti ZWdpbl9zcmMgamF2YSA6dmFyIGE9amF2YV9tYXRyaXggOnJlc3VsdHMgdmFsdWUgdGFibGUgc2ls ZW50CitpbXBvcnQgamF2YS51dGlsLkxpc3Q7CitpbXBvcnQgamF2YS51dGlsLkFycmF5czsKK0xp c3Q8TGlzdD4gYiA9IEFycmF5cy5hc0xpc3QoQXJyYXlzLmFzTGlzdChcImNvbDFcIiwgXCJjb2wy XCIpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXJyYXlzLmFzTGlzdChhLmdldCgwKS5nZXQo MCksIGEuZ2V0KDEpLmdldCgwKSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgQXJyYXlzLmFzTGlzdChhLmdldCgwKS5nZXQoMSksIGEuZ2V0KDEpLmdldCgxKSkpOworcmV0 dXJuIGI7IC8vIHRyYW5zcG9zZQorIytlbmRfc3JjCisKKyMrbmFtZTogamF2YV9tYXRyaXgKK3wg MiB8IDEgfAorfCA0IHwgMiB8IgorICAgIChzaG91bGQgKGVxdWFsICcoKCJjb2wxIiAiY29sMiIp IGhsaW5lICgyIDQpICgxIDIpKQorICAgICAgICAgICAgICAgICAgIChvcmctYmFiZWwtZXhlY3V0 ZS1zcmMtYmxvY2spKSkpKQorCis7OyBvdXRwdXQgdGFibGUKKworKGVydC1kZWZ0ZXN0IG9iLWph dmEvb3V0cHV0LXRhYmxlLXdpdGgtaGVhZGVyICgpCisgICJXcml0ZSBhIHRhYmxlIHRoYXQgaW5j bHVkZXMgYSBoZWFkZXIuIgorICAob3JnLXRlc3Qtd2l0aC10ZW1wLXRleHQKKyAgICAgICIj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IgOnJlc3VsdHMgdmFsdWUgOmNsYXNzbmFtZSBUYW5nbGUKK3JldHVybiBcInRh bmdsZWRcIjsKKyMrZW5kX3NyYyIKKyAgICAoc2hvdWxkCisgICAgIChzdHJpbmc9CisgICAgICAi cHVibGljIGNsYXNzIFRhbmdsZSB7CisgICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5n W10gYXJncykgeworICAgICAgICByZXR1cm4gXCJ0YW5nbGVkXCI7CisgICAgfQorfQorIgorICAg ICAgKHVud2luZC1wcm90ZWN0CisgICAgICAgICAgKHByb2duIChvcmctYmFiZWwtdGFuZ2xlKQor ICAgICAgICAgICAgICAgICAod2l0aC10ZW1wLWJ1ZmZlcgorICAgICAgICAgICAgICAgICAgIChp bnNlcnQtZmlsZS1jb250ZW50cyAiVGFuZ2xlLmphdmEiKQorICAgICAgICAgICAgICAgICAgICh1 bnRhYmlmeSAocG9pbnQtbWluKSAocG9pbnQtbWF4KSkKKyAgICAgICAgICAgICAgICAgICAoYnVm ZmVyLXN0cmluZykpKQorICAgICAgICAoZGVsZXRlLWZpbGUgIlRhbmdsZS5qYXZhIikpKSkpKQor CisoZXJ0LWRlZnRlc3Qgb2ItamF2YS90YW5nbGUtd2l0aC1wYWNrYWdlICgpCisgICJUYW5nbGUg YSBzb3VyY2UgYmxvY2suIgorICAob3JnLXRlc3Qtd2l0aC10ZW1wLXRleHQtaW4tZmlsZQorICAg ICAgIiMrYmVnaW5fc3JjIGphdmEgOnRhbmdsZSBcInRhbmdsZS9UYW5nbGUuamF2YVwiIDpyZXN1 bHRzIHZhbHVlIDpjbGFzc25hbWUgdGFuZ2xlLlRhbmdsZQorcmV0dXJuIFwidGFuZ2xlZFwiOwor IytlbmRfc3JjIgorICAgIChzaG91bGQKKyAgICAgKHN0cmluZz0KKyAgICAgICJwYWNrYWdlIHRh bmdsZTsKKworcHVibGljIGNsYXNzIFRhbmdsZSB7CisgICAgcHVibGljIHN0YXRpYyB2b2lkIG1h aW4oU3RyaW5nW10gYXJncykgeworICAgICAgICByZXR1cm4gXCJ0YW5nbGVkXCI7CisgICAgfQor fQorIgorICAgICAgKHVud2luZC1wcm90ZWN0CisgICAgICAgICAgKHByb2duCisgICAgICAgICAg ICAobWFrZS1kaXJlY3RvcnkgInRhbmdsZSIpCisgICAgICAgICAgICAob3JnLWJhYmVsLXRhbmds ZSkKKyAgICAgICAgICAgICh3aXRoLXRlbXAtYnVmZmVyCisgICAgICAgICAgICAgIChpbnNlcnQt ZmlsZS1jb250ZW50cyAidGFuZ2xlL1RhbmdsZS5qYXZhIikKKyAgICAgICAgICAgICAgKHVudGFi aWZ5IChwb2ludC1taW4pIChwb2ludC1tYXgpKQorICAgICAgICAgICAgICAoYnVmZmVyLXN0cmlu ZykpKQorICAgICAgICAoZGVsZXRlLWZpbGUgInRhbmdsZS9UYW5nbGUuamF2YSIpCisgICAgICAg IChkZWxldGUtZGlyZWN0b3J5ICJ0YW5nbGUiKSkpKSkpCisKKworOzsgc3BlY2lmeSBvdXRwdXQg ZGlyCisKKyhlcnQtZGVmdGVzdCBvYi1qYXZhL3NpbXBsZS1kaXIgKCkKKyAgIkhlbGxvIHdvcmxk IHByb2dyYW0gdGhhdCB3cml0ZXMgb3V0cHV0LiIKKyAgKG9yZy10ZXN0LXdpdGgtdGVtcC10ZXh0 CisgICAgICAoZm9ybWF0ICAiIytiZWdpbl9zcmMgamF2YSA6cmVzdWx0cyBvdXRwdXQgc2lsZW50 IDpkaXIgJXMKK1N5c3RlbS5vdXQucHJpbnQoNDIpOworIytlbmRfc3JjIiBvcmctYmFiZWwtdGVt cG9yYXJ5LWRpcmVjdG9yeSkKKyAgICAoc2hvdWxkIChzdHJpbmc9CisgICAgICAgICAgICAgIjQy IgorICAgICAgICAgICAgICh1bndpbmQtcHJvdGVjdAorICAgICAgICAgICAgICAgICAob3JnLWJh YmVsLWV4ZWN1dGUtc3JjLWJsb2NrKQorICAgICAgICAgICAgICAgKGRlbGV0ZS1maWxlIChjb25j YXQg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ICAgICAgICAgICAgICAgICAgICAgICAg ICAgICJwa2cvTWFpbi5qYXZhIikpCisgICAgICAgICAgICAgICAoZGVsZXRlLWZpbGUgKGNvbmNh dCAoZmlsZS1uYW1lLWFzLWRpcmVjdG9yeSBvcmctYmFiZWwtdGVtcG9yYXJ5LWRpcmVjdG9yeSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJwa2cvTWFpbi5jbGFzcyIpKQor ICAgICAgICAgICAgICAgKGRlbGV0ZS1kaXJlY3RvcnkgKGNvbmNhdCAoZmlsZS1uYW1lLWFzLWRp cmVjdG9yeSBvcmctYmFiZWwtdGVtcG9yYXJ5LWRpcmVjdG9yeSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgInBrZyIpKSkpKSkpCisKKworOzs7IHRlc3Qtb2ItamF2 YS5lbCBlbmRzIGhlcmUKLS0gCjIuMjUuMQoK --000000000000e8dd0005b13b1027--