This is kind of a Quine:
load'~addons/general/misc/clippaste.ijs'
xx=:getcliptext''
since it produces itself as the output if I cut and paste it into a J
session.

On Tue, Jan 29, 2019 at 11:15 AM David Mitchell <
[email protected]> wrote:

> On windows, this will read multiline data from the clipboard in jconsole
> or jqt:
>
> load'~addons/general/misc/clippaste.ijs'
> xx=:getcliptext''
>
>     xx
>   "cell_type": "code",
>     "execution_count": 10,
>     "metadata": {},
>     "outputs": [
>      {
>       "name": "stdout",
>       "output_type": "stream",
>       "text": [
>        "The Truth Is Out There\n"
>
> Cheers,
> David Mitchell
>
> On 1/29/2019 11:02, Brian Schott wrote:
> > I find reading multiline data into jconsole (or even into jqt) to be
> > awkward unless the data are in a file. I would like to be able to read
> data
> > from the clipboard directly into some pre-named noun.
> >
> > The list of steps I use is annoyingly long.
> > a) prepend the data with 'data =. (0 : 0)' ,
> > b) press <return>,
> > c) copy the data into the clipboard,
> > d) paste into the jconsole,
> > e) press <return>,
> > f) end with ')', and
> > g) press <return>
> >
> > The original version of J for ipad (and likely, the updated version as
> > well) offers the following verb which works quite well. I'm wondering if
> > there is a similar verb for jconsole (or jqt) (that I may have missed).
> >
> >     jfromcb =: 3 : 0
> > smoutput '<ioscmd>fromcb '
> > fread'data'
> > )
> >
> > Thanks,
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 

Devon McCormick, CFA

Quantitative Consultant
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to