Hi Joe,

Apparently I indeed made a mistake in the NN example, I didn't duplicated
the \ for on lines 317 and 339 of examples.js. This causes the intended \
to disappear in the editor and the example not to work, sorry for the mess.
A pull-request for 2 characters seemed a bit heavy handed, so I report it
here, hoping you could fix it when you see fit.

Additionally, I didn't get what one is to do to continue contributing once
a pull-request is accepted, to update the fork used for the pull-request
with the changes made upstream. I ended up in a situation where Github
tells me my fork is 2 commits ahead and 2 behind, while I don't see the
difference...
Do you have any indications what the correct workflow is to contribute
using pull-requests? Having a recommended workflow would likely be handy
for other contributors, also for other repo's, like J addons.

To avoid pushing untested code, how do you test the playground locally? I
tried just opening index.html in Firefox, which shows the interface, but
the terminal doesn't work (likely due to some cross-site restrictions of
the browser, showing up in the developer tools log (Cross-Origin Request
Blocked: The Same Origin Policy disallows reading the remote resource at
file:///home/jpjacobs/Projects/J/j-playground/bin/html2/emj.data. (Reason:
CORS request not http).). I had hoped it would work, since the early J
browser implementation you made few years back does work when opened from a
folder (I've used it for years from a downloaded copy with a few tweaks).

Thanks,
Jan-Pieter

Op do 7 jul. 2022 om 05:48 schreef Joe Bogner <joebog...@gmail.com>:

> Hi Jan-Pieter,
>
> Thanks for all the feedback and the pull request. I merged it in.
>
> Below are some comments on your excellent feedback:
>
> On Sun, Jul 3, 2022 at 5:45 PM Jan-Pieter Jacobs <
> janpieter.jac...@gmail.com>
> wrote:
>
> > I saw the progress spinner, it certainly is an improvement over the
> > previous behavior, especially since now it shows at least progress of
> > different lines in the editor. However, progress lines of successive
> lines
> > in echo'd in a function are only shown at the end (e.g. see
> >
> >
> https://jsoftware.github.io/j-playground/bin/html2/#code=NB.%20SHOWPROGRESS%3D1%0A%0Aecho%20'fine'%0A0%200%246!%3A3%5D%201%0Aecho%20'good'%0A0%200%246!%3A3%5D%201%0Aecho%20'Also%20fine'%0A%0Afoo%20%3D%3A%20%7B%7B%0Aecho%20'shown%20at%20the%20end%201'%0A0%200%246!%3A3%5D%201%0Aecho%20'shown%20at%20the%20end%202'%0A0%200%246!%3A3%5D%201%0Aecho%20'shown%20at%20the%20end%203'%0A%7D%7D%0A%0Afoo''%0A
> > ).
> > Especially in this last case it would be handy for long-running functions
> > to be able to give updates (like for instance in the NN demo's sgd).
> >
> >
>  I see... I'm not entirely sure what to do about this yet so I will add it
> to a github issue to track it
>
>
> > I think the progress spinner could become more something like the kernel
> > indicator of the Jupyter notebooks, i.e. an indication on the toolbar.
> > Perhaps it would be handy to make the icon function as "break" as well.
> > The icon would have 4 states: idle, running, clicked once (waiting for
> > soft-break to take effect), clicked twice (waiting for hard-break to take
> > effect), and could be accompanied by a textual hint/tool tip when not
> idle.
> >
> >
> I like the idea of adding something like the kernel indicator of Jupyter
> notebooks.  I'm not sure yet what it would take to implement, but it seems
> like a great way to add the functionality you mentioned. I will log it
>
>
> > Aside of this, I noticed a few other things (unsorted):
> > - The SystemFolders_j_ variable seems to have a wrong value for the
> addons
> > field, and the system folder could be added, allowing users to use e.g.
> jpm
> > as well.
> >   I tried SystemFolders_j_=: |: ('temp';'') ,. ('addons';'addons') ,.
> > ('system';'jlibrary/system') (in emj.ijs). While this seems to work,
> trying
> > to load a non-existent module, it gives an odd message I can't pinpoint,
> > e.g.:
> >      load '~addons/graphics/plot'
> >   not found: //addons/addons/graphics/plot.ijs
> > Here, I don't see where the extra //addons/ is coming from.
> >
>
>
> With some trial and error and digging into getscripts_j_, I think it's
> supposed to be
>
>    SystemFolders_j_=: |: ('temp';'') ,. ('addons';'//addons/')
>
>    NB. works as expected
>    load '~addons/graphics/plot'
>
>    NB. shows a more sensible error messages
>    load '~addons/graphics/foo'
> not found: //addons//graphics/foo
> |file name error: script
> |       0!:0 y[4!:55<'y'
> |[-0]
>
>  It looks like that behavior comes from isroot which is called by
> getscripts_j_
>
>    isroot_j_
> ('\\' -: 2&{.) +. ('//' -: 2&{.) +. ':' = {.@}.
>
> I'm not entirely sure why it expects // to be root on a linux/posix system,
> but it seems to work with double slashes at the beginning
>
> Does this seem like a suitable solution? If so, I can add it to
>
> https://github.com/jsoftware/j-playground/blob/j903_wasm/source/base/init.ijs#L5
>
> - The highlighting of matching parentheses, brackets and braces does not
> > work with J's syntax; it would be better disabled, since it considers []
> > and {} should be paired.
> >
>
> Hmm, I am on the fence on this one. I don't mind the matching parentheses
> and it was part of the original playground that chris burke developed. I'd
> look for more community input on this one before removing it
>
>
> > - Ctrl - clicking anywhere in the currently focused pane results in a
> > second cursor; typing afterwards results in text added at both (actually
> > all) cursors. This is quite handy, I would love to have it in JQT as
> well,
> > and saw this before in other advanced editors! So I was wondering whether
> > this was a feature or a bug :).
> >
>
> I can't take any credit for this!  It looks like it's built into the
> codemiror editor we are using (https://codemirror.net/)
>
>
> > - It would be very handy to have an option to upload / download the
> > contents of the editor window, in some cases. For instance, on my company
> > laptop, as security policy, apparently the browser storage is cleared at
> > every shutdown of Chrome, so I can't use the recent File(s) tools.
> >
>
> I agree! I also just found a neat trick that you can drag/drop a file onto
> the editor pane and it will paste the contents in. This may be a temporary
> workaround until we add the upload capability.
>
>
> > - In comparison with JQT, I'm missing Run Selection and Load (i.e. run
> all,
> > but don't display). Especially load would be nice for longer scripts.
> >
> >
> Good suggestion. I will add it to github issues as an easy enhancement
>
>
> Thanks again!
> Joe
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to