[program-l] Re: JavaScript REPL ... or ...

  • From: Florian Beijers <florianbeijers@xxxxxxxxx>
  • To: program-l <program-l@xxxxxxxxxxxxx>
  • Date: Fri, 14 Jan 2022 18:32:32 +0100

Ahh,

I see what it's doing. So, as you're typing, it's offering you autocomplete
suggestions. If you type "l" for example, it will make it 'let"in the way
that your cursor is still at the letter l, but "et" has been inserted to
the right of your cursor.If you hit tab at this point, the suggestion is
committed, and your cursor gets placed immediately to the right of the
final character.
If you don't hit tab but keep tying, the autocomplete gets removed again,
essentially you're overtyping it at that point. Does that make sense?

Florian

Op vr 14 jan. 2022 om 05:37 schreef <joeldodson@xxxxxxxxx>:

Thanks Florian,



I’m using node v16.13.1 on both Windows and Ubuntu.



I’m on Windows 10, Version 21H2 (OS Build 19044.1466) (just updated today).



I have Ubuntu 20.04 installed from the Windows store and yesterday ran
sudo apt update && sudo apt upgrade.



FWIW, the Python REPL (Python 3.10.1 installed from python.org) works
beautifully (as in like deno, not node).



I’ll poke around more as well.  Appreciate your help.



Thanks,

Joel





*From:* program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> *On
Behalf Of *Florian Beijers
*Sent:* Thursday, January 13, 2022 3:57 PM
*To:* program-l <program-l@xxxxxxxxxxxxx>
*Subject:* [program-l] Re: JavaScript REPL ... or ...



Hi,



I will experiment with this some and get back to you. What you are
describing does sound suboptimal and it certainly did not do this when I
last tried it, but this is node we're talking about, things change rapidly.
Could you do me a favor and tell me what node version you're using, just so
I can closely replicate what you were trying to do?


Thanks,

Florian



Op vr 14 jan. 2022 om 00:51 schreef <joeldodson@xxxxxxxxx>:

Hi Florian,

Glad you asked.  After I sent this mail, I listened to a 2022 predictions
podcast from Syntax and they're predicting a tepid future for deno.  Who
knows.

Running 'node' from either the bash shell on Ubuntu or PowerShell on
Windows does put me into a REPL.  The problem is after I type some JS and
hit enter, I hear nothing.  I use number pad seven to scroll up a line and
can hear the output.

I just tried more experimenting and heard some weird stuff.  When I type
the following:

Let h = 'hello';
Let w = 'world';
h + w

As I type the last line, h + w, if I pause after typing the 'h', NVDA says
'hello' ( including the ticks).  If I pause after typing the 'w', NVDA
says, 'hello world' (again with the ticks).  The same thing happens in a
wsl2/ubuntu/bash shell.

In the deno repl, I don't hear anything other than character echo as I
type the h + w.  After I hit enter, I hear the 'hello world'.
This does seem to be node vs deno as they behave differently in the same
shells.

For node, it seems the repl is evaluating the statement as I type it.
That is kind of cool.  If I have to choose between that and having the
output read to me after I hit enter, I prefer the deno approach (wait until
I hit enter and tell me the result).

I'd love to hear ideas, especially if they include ways to change the
behavior, of why the result is not read from the node repl even though it
is there.

I do have report dynamic content changes on, fwiw.  I've seen that be the
reason nothing is read.

Thanks,
Joel


-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On
Behalf Of Florian Beijers
Sent: Thursday, January 13, 2022 3:04 PM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: JavaScript REPL ... or ...

At the risk of causing fiery armageddon to rain from the sky ...what's the
matter with NVDA and node? I've not done this in a while but when I messed
with it several years ago it seemed to work fine from the commandline?

Thanks,
Florian

2022-01-13 22:59 GMT+01:00, joeldodson@xxxxxxxxx <joeldodson@xxxxxxxxx>:
How I stopped worrying and learned to love JavaScript (shoutout for
fans of cult classic 1960's movies).

I'm working on learning React which means I need to brush up on
JavaScript.


As I hope many people here realize, a REPL like Python or Ruby comes
with, is a great way to experiment and solidify one's understandings
of nuances of different constructs.  I also like to use the Python
REPL, import requests, and poke at third party REST APIs.  It's like a
more interactive curl.

<editing out rant about looking for a JavaScript REPL and how badly
node works on the command line with NVDA>

About at the end of my rope, I recalled hearing about deno
(https://deno.land).  The scales have fallen from my eyes.

<editing out effusive praise for deno>

Indeed, deno has what seems so far to be a great JS REPL,
https://deno.land/manual@main/tools/repl.  It works great with NVDA
running from a bash shell on Ubuntu 20.04 running on WSL2 on Windows 10.


In general, though I've only poked around for a day or so, deno seems
like a great project.  The manual is very accessible and easy to
navigate with Firefox and NVDA.

Cheers,
Joel


** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq


Other related posts: