From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AP7UIpd6w2ME/QAAbAwnHQ (envelope-from ) for ; Sun, 15 Jan 2023 05:01:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2FuBIpd6w2OxeQAAauVa8A (envelope-from ) for ; Sun, 15 Jan 2023 05:01:27 +0100 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 34F9A1F74D for ; Sun, 15 Jan 2023 05:01:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGuCa-0002ae-B2; Sat, 14 Jan 2023 23:01:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGuCK-0002Xu-Pw for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 23:00:47 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGuCI-0007ro-Fs for emacs-orgmode@gnu.org; Sat, 14 Jan 2023 23:00:44 -0500 Received: by mail-ej1-x62b.google.com with SMTP id mp20so14269407ejc.7 for ; Sat, 14 Jan 2023 20:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=T7VPrQ6BvEYSV946oB3x/sRA+BCeww9TA1UV0QVGX0Y=; b=WBYzd2EgB8YBintsanxtfixtPInZgvesFrHvgX4sNJCHfcX80pjDux2l12upCw+kVg oHXupQezlYrWBAIcFk6JYXmD26EmIQn6XOblwgdSiZYjSwdP/ZQsiGbmGBXfpnjG31ZL ZUI9MZTUtj80vwXwWgW9aY9V+2I1uBz1miAlj7utNvluG/3Kflf9Mz4wRlSnYQwBkQt6 PcSuzAdHjtKxS/C+cRWP4CzGm8z1N5AvvOVSSJCBqrL2GBWsTZdbHVk9ewkf9a2ISqKl DNy2jy4zSmOpO1pBEdH6rRjtyM6H1Q5Km4iLRqITws87nUmoKAWD53Q/+wkZdFZg7pTQ +vDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=T7VPrQ6BvEYSV946oB3x/sRA+BCeww9TA1UV0QVGX0Y=; b=KrMRA4Vg358q2BHAbZrjmvAbUwNBCM5OjlbWfTZU2Cx73W46Nwo0eYQM9lTCMlDTd2 xuCX51Y/40ENEkMs0BTv8LhujcoVB8XfiO04FQPLsniI349lTu+RbniIqptyg8RrW478 fMeAeIrSr3e8HSbbKb38L+2rlqL9k1uYRMJmS/KiyQTZ3Gy46JYMupGqoD25GD8X34Ix BO0+7LVC0jcx5ewCFdkqCGsh1gdFNZePg14yk+/fJw4pI74XC2HCvhjEX9U8YTnyddlR ZMule7ylJt71eFYdKu9WVMk8ZtPJhfsQHWO0ysXnddX5cQroLlRnKdEzAECueSNGv5Uy ePvg== X-Gm-Message-State: AFqh2kpMrMSwjfPnjqM/umQ1Cv/kGKxpCPMqSiJGIsCLehO051gMpaha z394HBNWdfutOlLClqF2hwnnC0wET25W8JSRQVg= X-Google-Smtp-Source: AMrXdXv9rDyYaVmWAfliHmkmzN2bjOW0ZGzdXepif338GSBQrL7PoZd0RvQe0C9oCkmdctFFLWjk96gIcaM/avT+7E0= X-Received: by 2002:a17:907:9c0a:b0:86f:ecea:40c4 with SMTP id ld10-20020a1709079c0a00b0086fecea40c4mr13519ejc.435.1673755239903; Sat, 14 Jan 2023 20:00:39 -0800 (PST) MIME-Version: 1.0 References: <63c359bc.170a0220.131fc.b279@mx.google.com> In-Reply-To: <63c359bc.170a0220.131fc.b279@mx.google.com> From: George Mauer Date: Sat, 14 Jan 2023 22:00:28 -0600 Message-ID: Subject: Re: Thoughts on this ob language generator To: Tim Cross Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000083f84405f24582a2" Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=gmauer@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gmauer@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WBYzd2Eg; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673755286; a=rsa-sha256; cv=none; b=foSv/qZJ1vzAjZvUoxth8ZKC8IceRacpB9RzyiGKzN+SWCnFkBtZ2nCmIMgBmf9UccJOfQ ZwnrIVCgwLQ4IiDwGnsp7thTkUPoWyDFOUbW8d9APWV5Qf/rCCjPgcwwJowAmzQe8zPc1W 07dWog6jpMzQOAHvzasYYFoHIIhdnyXBdrsY19Pb0I+ETdSN7MP2Z4YkZJeBoQvyRXLmEL 6D47m9CoMozoea0vYGbdQYfh2c9zVg8dQZ7F99cvkd7Hk8ilgVcQN91iUZWPCalZKPKC7f lZd9tkiCy83ohzT7zGd4gdi/zmLr6TnJTtdRLwhDEzAmPz/nHFTICVPPrjaBSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673755286; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=T7VPrQ6BvEYSV946oB3x/sRA+BCeww9TA1UV0QVGX0Y=; b=HSEBsQOCGQLojuG5hiZcjdRCNFzqqknP349wkyrHbw6L7FBQx5eCQFa+HLmrpapQZeT2AP 1XwnkSo+UzzRPlDnqg6/AP4wnBRobEs7H1YZwFnEwi5gsawqDjsEnvqLpg+5d0fMOrZfUc 6q78OTcjRqJ/04u+5OcSIDZAtRgHjSK3ZM9HTfkMXxgLcT/C+TMxeipdaRSfLfHsCGSEx7 lUmqxWuEFuhN9UFGkLV24sMzsEJh3tVqVCkYKQH04Qxmw7uK1Mpif9M7nawSk1/lKPLtNw 5hx/fIpylJlLzjjDvpredomCHKf/LUua+12sxkLgnGUnucdjgZOebmRDCa0MbQ== X-Migadu-Queue-Id: 34F9A1F74D X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WBYzd2Eg; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-Migadu-Spam-Score: -6.06 X-Spam-Score: -6.06 X-TUID: KpxQm1lUxXs8 --00000000000083f84405f24582a2 Content-Type: text/plain; charset="UTF-8" Thanks a lot Tim, I really appreciate you responding (as you said, it can be discouraging to not get any response) For the record, I just tried this simple example and it works #+begin_src emacs-lisp :results silent (create-ob-npx :name "ob-nbb" :language "clojurescript" :npx-arguments "nbb") #+end_src #+begin_src clojurescript (prn (+ 1 2 3)) #+end_src #+RESULTS: : 6 Never pushed anything to MELPA before but will have to take a look at how to do this. On Sat, Jan 14, 2023 at 7:41 PM Tim Cross wrote: > George Mauer writes: > > > I had a need the other day to execute some typescript in an org > document. Now I know that there's an > > ob-typescript package but that doesn't quite work the way I want and > expects typescript to be installed > > globally (which runs into a variety of versioning issues). > > > > There is a better option available with the `npx` program (installed > alongside `npm`) which can install a > > package along with its dependencies into a temporary sandbox and run its > binaries. > > > > I rewrote the typescript babel plugin to do this and then realized that > there was relatively little in it > > beyond variable and function names that was typescript-specific. The > exact same process can be used for > > anything that has an interpreter up on npm. Coffeescript, mermaidjs, all > sorts of things. > > > > So I made a macro. I'm interested what people here think: > https://github.com/togakangaroo/create-ob-npx > > This looks interesting and could have some great potential. As you say, > tehre is a growing class of languages which could be supported using > this method. I'm interested in trying out the nbb package (Clojurescript > on node) using this method, but right now, no time. > > Really just wanted to give feedbac as I noticed nobody else responded > and didn't want to give the impression there was no interest. > > --00000000000083f84405f24582a2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks a lot Tim, I really appreciate you= responding (as you said, it can be discouraging to not get any response)
For the record, I just tried this simple example and it works

= #+begin_src emacs-lisp :results silent
=C2=A0 (create-ob-npx :name "= ;ob-nbb"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0:language "clojurescript"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:npx-arguments "nbb")
#+end_= src

#+begin_src clojurescript
=C2=A0 (prn (+ 1 2 3))
#+end_src=

#+RESULTS:
: 6


Never= pushed anything to MELPA before but will have to take a look at how to do = this.

On Sat, Jan 14, 2023 at 7:41 PM Tim Cross <theophilusx@gmail.com> wrote:
George Mauer <gmauer@gmail.com> writes:

> I had a need the other day to execute some typescript in an org docume= nt. Now I know that there's an
> ob-typescript package but that doesn't quite work the way I want a= nd expects typescript to be installed
> globally (which runs into a variety of versioning issues).
>
> There is a better option available with the `npx` program (installed a= longside `npm`) which can install a
> package along with its dependencies into a temporary sandbox and run i= ts binaries.
>
> I rewrote the typescript babel plugin to do this and then realized tha= t there was relatively little in it
> beyond variable and function names that was typescript-specific. The e= xact same process can be used for
> anything that has an interpreter up on npm. Coffeescript, mermaidjs, a= ll sorts of things.
>
> So I made a macro. I'm interested what people here think: https://github.com/togakangaroo/create-ob-npx

This looks interesting and could have some great potential. As you say,
tehre is a growing class of languages which could be supported using
this method. I'm interested in trying out the nbb package (Clojurescrip= t
on node) using this method, but right now, no time.

Really just wanted to give feedbac as I noticed nobody else responded
and didn't want to give the impression there was no interest.

--00000000000083f84405f24582a2--