[Jprogramming] Jupyter Versions of J Labs [for jod]

David Mitchell davidmitchell at att.net
Wed Jan 30 12:41:12 UTC 2019


I tried this on j807 on windows.

I had no errors, but the od output was the same as you reported.

I looked at the source for the Jod Introduction Lab and found this:

   {
    "cell_type": "code",
    "execution_count": 4,
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
...
 
"│1│docs│imex│jod│joddev│lab│labdev│play│smugpyter│utils│\n",

So the output is hard coded in the Lab source.

I suspect that the dictionaries listed in the JSON Lab source represent the JOD 
environment present at the time the Jupyter Lab was generated.

David Mitchell

On 1/29/2019 18:31, Murray Eisenberg wrote:
> I’m using J807 under macOS. I followed instructions at
> 
> 	https://github.com/bakerjd99/jod/blob/master/jodnotebooks/JOD%20Introduction%20Lab.ipynb <https://github.com/bakerjd99/jod/blob/master/jodnotebooks/JOD%20Introduction%20Lab.ipynb>
> 
> but encountered two problems.
> 
> Problem 1 (worked around): In step 2, removal of the temporary lab dictionaries, when I loaded a script consisting of RemoveLabDictionaries_ijod_
> (copied and pasted without modification), I got a syntax error that I am unable to find.
> 
> 	However, deleting the lines...
> 
>    if. IFWIN do.
>    shell 'rd /s /q "',root,'\joddicts\labdev"'
>    shell 'rd /s /q "',root,'\joddicts\lab"'
>    shell 'rd /s /q "',root,'\joddicts\toy"'
>    shell 'rd /s /q "',root,'\joddicts\playpen"'
>    smoutput 'Lab temporary (win) dictionaries erased'
> 
> … and changing the “elsif.” in the following line to “if.”, allows the script to run.
> 
> Problem 2: In step 4, after executing...
> 
> 	3 od ‘'	NB. close any open dictionaries
> 
> 	smoutput newd ‘lab’   NB. create (lab) and  (labdev) dictionaries
> 	smoutput newd ‘labdev'
> 
> ...and seeing the expected results, I next executed…
> 
> 	od ‘'		NB. list available dictionaries
> 
> …but did NOT get as result what the instructions show. I got ONLY:
> 
> ┌─┬───┬──────┐
> │1  │lab      │labdev           │
> └─┴───┴──────┘
> 
> This is quite different from what the instructions show, which is (without the boxing):
> 
> 	1   docs   imex   jod   joddev   lab   labdev   play   smugpyter   utils
> 
> What’s wrong??
> 
> 
>> OnSun, 27 Jan 2019 13:12:06 -0700,John Baker <bakerjd99 at gmail.com> wrote:
>>
>>
>> When I first encountered Jupyter Notebooks I thought they would make an
>> excellent delievery mechanism for J labs.
>>
>> This weekend I converted some J/JOD labs to Jupyter.
>>
>> Jupyter labs support a richer documentation and execution environment than
>> we are used to seeing with J labs. You get all the typographic goodies of
>> Markdown, code pretty printing and, best of all, the final result can be
>> easily browsed by anyone. Casual browsers do not have to install J to view
>> lab output.
>>
>> I would recommend all addon and lab authors to consider producing Jupyter
>> versions. It will help expose J's delights to wider audiences.
>>
>> Have a look:
>>
>> https://github.com/bakerjd99/jod/blob/master/jodnotebooks/JOD%20Labs%20in%20Jupyter.ipynb
>>
>> https://github.com/bakerjd99/jod/blob/master/jodnotebooks/JOD%20Introduction%20Lab.ipynb
>>
>> https://github.com/bakerjd99/jod/blob/master/jodnotebooks/JOD%20Source%20Code%20Dump%20Scripts%20Lab.ipynb
>>
>> https://github.com/bakerjd99/jod/blob/master/jodnotebooks/JOD%20Source%20Code%20Dump%20Scripts%20Lab.ipynb
>>
>> John Baker
> 
> ——
> Murray Eisenberg                                murray at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower      phone 240 246-7240 (H)
> University of Massachusetts
> 710 North Pleasant Street
> Amherst, MA 01003-9305
> 
> 
> 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 


More information about the Programming mailing list