Re: [Pdl-general] History list and command editing in perldl

2018-05-06 Thread Chris Marshall

Will-

I'm glad you got things going with command
line editing support for perldl.  There is
also an updated PDL shell called pdl2 which
provides some improved support for completions
of various types if you have the needed module
dependencies installed.

If you try to run pdl2 and the dependencies
are not there, it should quietly start up
the perldl shell instead so you can have one
stop shopping for the PDL shell.

Enjoy!
Chris

On 4/13/2018 17:14, William Schmidt wrote:

Hello piddlers,

/*perldl*/is one great prototyping tool, and I am making great 
progress understanding and mastering PDL running it in macOS, but thus 
far, enabling history list and command line editing inside perldl has 
been a total bust. The docos say the command line editor is 
emacs-like. I would prefer vi but /*any*/command line editing is 
welcome, given how I am using perldl to learn PDL. However, I cannot 
enable the history list nor edit a previous line other than doing very 
precise cut and paste. Here is the initial announcement when I start 
perldl:


$ perldl
perlDL shell v1.357
 PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
 'COPYING' in the PDL distribution. This is free software and you
 are welcome to redistribute it under certain conditions, see
 the same file for details.
*ReadLines*, NiceSlice, MultiLines enabled
Reading /Users/carly/.perldlrc...
Found docs database 
/Users/carly/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/darwin-2level/PDL/pdldoc.db

Type 'help' for online help
Type 'demo' for online demos
Loaded PDL v2.018 (supports bad values)


Notice, *ReadLines*is enabled.

And here is what I get with the l command, 'l', not '1';

Can't locate object method "GetHistory" via package 
"Term::ReadLine::Stub" at 
/Users/carly/perl5/perlbrew/perls/perl-5.20.3/bin/perldl line 313, 
 line 2.


What am I missing? What Perl/PDL modules must be present? Getting 
history and command editing working would truly make perldl an 
effective learning tool.


Thanks and regards,
Will Schmidt



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] History list and command editing in perldl

2018-05-04 Thread Karl Glazebrook
Hi Will

You could try the SciPDL download which lives within it’s own kitchen sink and 
likely won’t break on new MacOS. (Also includes GNU::Readline)


/usr/bin/python includes an editable command line, why can’t this be built in 
to perl? I find the whole Term::Readline::XX thing confusing. What is the 
Term::ReadLine (and Term::Readline::Perl ?) that come with perl?


Karl


> On 14 Apr 2018, at 8:58 am, William Schmidt  
> wrote:
> 
> That did it. Man, having an editable history list is primo. I think this is 
> another example of how badly macOS High Sierra sucks. Apple now wants us to 
> install 10.13.4 which will again break everything that was compiled with the 
> 10.13.3 Xcode libs, as the download includes new libraries and command line 
> tools. That's it for me. I will live with 10.13.3 as long as I own this Pro. 
> Now, should I try to clean out all the cruft I put into my perlbrew by 
> hacking, as in removing Term::ReadLine::Gnu which I --forced, to no avail. I 
> hate leaving installed the dregs of failed hacking. Thank you Chris and Craig 
> for your help.
> 
> Will
> 
> 
> 
> 
> 
> On Fri, Apr 13, 2018 at 5:21 PM, Craig DeForest  > wrote:
> Hey, cool!  Ya learn something new every day.
> 
>> On Apr 13, 2018, at 4:21 PM, Chris Marshall > > wrote:
>> 
>> I suggest installing Term::ReadLine::Perl which 
>> is a pure perl implementation of the readline 
>> capability.  I use it on the windows PDL since
>> there is no GNU readline for microsoft com windows.
>> 
>> --Chris
>> 
>> On 4/13/2018 18:15, William Schmidt wrote:
>>> Progress, but no cigar, yet...
>>> 
>>> brew link --force readline
>>> 
>>> 
>> 
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot___
> pdl-general mailing list
> pdl-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-general

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] History list and command editing in perldl

2018-04-13 Thread William Schmidt
That did it. Man, having an editable history list is primo. I think this is
another example of how badly macOS High Sierra sucks. Apple now wants us to
install 10.13.4 which will again break everything that was compiled with
the 10.13.3 Xcode libs, as the download includes new libraries and command
line tools. That's it for me. I will live with 10.13.3 as long as I own
this Pro. Now, should I try to clean out all the cruft I put into my
perlbrew by hacking, as in removing Term::ReadLine::Gnu which I --forced,
to no avail. I hate leaving installed the dregs of failed hacking. Thank
you Chris and Craig for your help.

Will





On Fri, Apr 13, 2018 at 5:21 PM, Craig DeForest 
wrote:

> Hey, cool!  Ya learn something new every day.
>
> On Apr 13, 2018, at 4:21 PM, Chris Marshall 
> wrote:
>
> I suggest installing Term::ReadLine::Perl which
> is a pure perl implementation of the readline
> capability.  I use it on the windows PDL since
> there is no GNU readline for microsoft com windows.
>
> --Chris
>
> On 4/13/2018 18:15, William Schmidt wrote:
>
> Progress, but no cigar, yet...
>
> brew link --force readline
>
>
>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] History list and command editing in perldl

2018-04-13 Thread Craig DeForest
Hey, cool!  Ya learn something new every day.

> On Apr 13, 2018, at 4:21 PM, Chris Marshall  wrote:
> 
> I suggest installing Term::ReadLine::Perl which 
> is a pure perl implementation of the readline 
> capability.  I use it on the windows PDL since
> there is no GNU readline for microsoft com windows.
> 
> --Chris
> 
> On 4/13/2018 18:15, William Schmidt wrote:
>> Progress, but no cigar, yet...
>> 
>> brew link --force readline
>> 
>> 
> 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] History list and command editing in perldl

2018-04-13 Thread Chris Marshall

I suggest installing Term::ReadLine::Perl which
is a pure perl implementation of the readline
capability.  I use it on the windows PDL since
there is no GNU readline for microsoft com windows.

--Chris

On 4/13/2018 18:15, William Schmidt wrote:

Progress, but no cigar, yet...

brew link --force readline




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] History list and command editing in perldl

2018-04-13 Thread Craig DeForest
Try setting TERM to just “xterm”?

> On Apr 13, 2018, at 4:15 PM, William Schmidt  
> wrote:
> 
> Progress, but no cigar, yet...
> 
> brew link --force readline
> 
> I downloaded the latest library and then attempted to reinstall 
> Term::ReadLine::Gnu, with the following error in the build log:
> 
> This part seems correct:
> 
> Found `/usr/lib/libtermcap.dylib'.
> cc -I/usr/local/opt/readline/include -fno-common -DPERL_DARWIN 
> -mmacosx-version-min=10.13 -fno-strict-aliasing -pipe -fstack-protector 
> -I/usr/local/include -I/opt/local/include -DPERL_USE_SAFE_PUTENV 
> -DHAVE_STRING_H rlver.c -o rlver -L/usr/local/opt/readline/lib   
> -mmacosx-version-min=10.13 -fstack-protector -L/usr/local/lib 
> -L/opt/local/lib -lreadline -ltermcap
> <<>>
> 
> This part seems incorrect:
> 
> Your terminal 'TERM=xterm-256color' does not support enough function.
> Check if your environment variable 'TERM' is set correctly.
> 
> I never set TERM explicitly so I don't know what that module is expecting or 
> whether my Mac has the right stuff. I do have the latest XQuartz, 2.7.11, 
> installed.
> 
> #   Failed test 'An object of class 'Term::ReadLine::Stub' isa 
> 'Term::ReadLine''
> #   at t/utf8_binary.t line 82.
> # The object of class 'Term::ReadLine::Stub' isn't a 'Term::ReadLine'
> 
> #   Failed test 'input layers after 'new''
> #   at t/utf8_binary.t line 87.
> # Structures begin differing at:
> #  $got->[2] = Does not exist
> # $expected->[2] = 'stdio'
> 
> #   Failed test 'output layers after 'new''
> #   at t/utf8_binary.t line 90.
> # Structures begin differing at:
> #  $got->[2] = Does not exist
> # $expected->[2] = 'stdio'
> # Looks like you failed 3 tests of 12.
> 
> From environment:
> 
> TERM=xterm-256color
> TERM_PROGRAM=Apple_Terminal
> TERM_PROGRAM_VERSION=400
> 
> Suggestions?
> 
> Will
> 
> 
> 
> 
> 
> On Fri, Apr 13, 2018 at 4:35 PM, Craig DeForest  > wrote:
> You may have to manually install the Gnu Readline library.  It’s becoming 
> enough of a pain in the butt to get installed, that an Alien::ReadLine might 
> be called for...
> 
>> On Apr 13, 2018, at 3:23 PM, William Schmidt > > wrote:
>> 
>> Hmm,
>> 
>> Tried that.
>> 
>> $ cpanm Term::ReadLine::Gnu
>> Term::ReadLine::Gnu is up to date. (1.35)
>> 
>> Does it require config or enabling?
>> 
>> Will
>> 
>> 
>> 
>> 
>> On Fri, Apr 13, 2018 at 4:20 PM, Craig DeForest > > wrote:
>> The problem is that Term::ReadLine is suffering from bit rot.  Try 
>> installing Term::ReadLine::Gnu.
>> 
>>> On Apr 13, 2018, at 3:14 PM, William Schmidt >> > wrote:
>>> 
>>> Hello piddlers,
>>> 
>>> perldl is one great prototyping tool, and I am making great progress 
>>> understanding and mastering PDL running it in macOS, but thus far, enabling 
>>> history list and command line editing inside perldl has been a total bust. 
>>> The docos say the command line editor is emacs-like. I would prefer vi but 
>>> any command line editing is welcome, given how I am using perldl to learn 
>>> PDL. However, I cannot enable the history list nor edit a previous line 
>>> other than doing very precise cut and paste. Here is the initial 
>>> announcement when I start perldl:
>>> 
>>> $ perldl
>>> perlDL shell v1.357
>>>  PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
>>>  'COPYING' in the PDL distribution. This is free software and you
>>>  are welcome to redistribute it under certain conditions, see
>>>  the same file for details.
>>> ReadLines, NiceSlice, MultiLines  enabled
>>> Reading /Users/carly/.perldlrc...
>>> Found docs database 
>>> /Users/carly/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/darwin-2level/PDL/pdldoc.db
>>> Type 'help' for online help
>>> Type 'demo' for online demos
>>> Loaded PDL v2.018 (supports bad values)
>>> 
>>> 
>>> Notice, ReadLines is enabled.
>>> 
>>> And here is what I get with the l command, 'l', not '1';
>>> 
>>> Can't locate object method "GetHistory" via package "Term::ReadLine::Stub" 
>>> at /Users/carly/perl5/perlbrew/perls/perl-5.20.3/bin/perldl line 313, 
>>>  line 2.
>>> 
>>> What am I missing? What Perl/PDL modules must be present? Getting history 
>>> and command editing working would truly make perldl an effective learning 
>>> tool.
>>> 
>>> Thanks and regards,
>>> Will Schmidt
>>> 
>>> 
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org ! 
>>> http://sdm.link/slashdot___ 
>>> 
>>> pdl-general mailing list

Re: [Pdl-general] History list and command editing in perldl

2018-04-13 Thread William Schmidt
Progress, but no cigar, yet...

brew link --force readline

I downloaded the latest library and then attempted to reinstall
Term::ReadLine::Gnu, with the following error in the build log:

This part seems correct:

Found `/usr/lib/libtermcap.dylib'.
cc -I/usr/local/opt/readline/include -fno-common -DPERL_DARWIN
-mmacosx-version-min=10.13 -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -I/opt/local/include -DPERL_USE_SAFE_PUTENV
-DHAVE_STRING_H rlver.c -o rlver -L/usr/local/opt/readline/lib
-mmacosx-version-min=10.13 -fstack-protector -L/usr/local/lib
-L/opt/local/lib -lreadline -ltermcap
<<>>

This part seems incorrect:

Your terminal 'TERM=xterm-256color' does not support enough function.
Check if your environment variable 'TERM' is set correctly.

I never set TERM explicitly so I don't know what that module is expecting
or whether my Mac has the right stuff. I do have the latest XQuartz,
2.7.11, installed.

#   Failed test 'An object of class 'Term::ReadLine::Stub' isa
'Term::ReadLine''
#   at t/utf8_binary.t line 82.
# The object of class 'Term::ReadLine::Stub' isn't a 'Term::ReadLine'

#   Failed test 'input layers after 'new''
#   at t/utf8_binary.t line 87.
# Structures begin differing at:
#  $got->[2] = Does not exist
# $expected->[2] = 'stdio'

#   Failed test 'output layers after 'new''
#   at t/utf8_binary.t line 90.
# Structures begin differing at:
#  $got->[2] = Does not exist
# $expected->[2] = 'stdio'
# Looks like you failed 3 tests of 12.

>From environment:

TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=400

Suggestions?

Will





On Fri, Apr 13, 2018 at 4:35 PM, Craig DeForest 
wrote:

> You may have to manually install the Gnu Readline library.  It’s becoming
> enough of a pain in the butt to get installed, that an Alien::ReadLine
> might be called for...
>
> On Apr 13, 2018, at 3:23 PM, William Schmidt 
> wrote:
>
> Hmm,
>
> Tried that.
>
> $ cpanm Term::ReadLine::Gnu
> Term::ReadLine::Gnu is up to date. (1.35)
>
> Does it require config or enabling?
>
> Will
>
>
>
>
> On Fri, Apr 13, 2018 at 4:20 PM, Craig DeForest  > wrote:
>
>> The problem is that Term::ReadLine is suffering from bit rot.  Try
>> installing Term::ReadLine::Gnu.
>>
>> On Apr 13, 2018, at 3:14 PM, William Schmidt 
>> wrote:
>>
>> Hello piddlers,
>>
>> *perldl* is one great prototyping tool, and I am making great progress
>> understanding and mastering PDL running it in macOS, but thus far, enabling
>> history list and command line editing inside perldl has been a total bust.
>> The docos say the command line editor is emacs-like. I would prefer vi but
>> *any* command line editing is welcome, given how I am using perldl to
>> learn PDL. However, I cannot enable the history list nor edit a previous
>> line other than doing very precise cut and paste. Here is the initial
>> announcement when I start perldl:
>>
>> $ perldl
>> perlDL shell v1.357
>>  PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
>>  'COPYING' in the PDL distribution. This is free software and you
>>  are welcome to redistribute it under certain conditions, see
>>  the same file for details.
>> *ReadLines*, NiceSlice, MultiLines  enabled
>> Reading /Users/carly/.perldlrc...
>> Found docs database /Users/carly/perl5/perlbrew/pe
>> rls/perl-5.20.3/lib/site_perl/5.20.3/darwin-2level/PDL/pdldoc.db
>> Type 'help' for online help
>> Type 'demo' for online demos
>> Loaded PDL v2.018 (supports bad values)
>>
>>
>> Notice, *ReadLines* is enabled.
>>
>> And here is what I get with the l command, 'l', not '1';
>>
>> Can't locate object method "GetHistory" via package
>> "Term::ReadLine::Stub" at 
>> /Users/carly/perl5/perlbrew/perls/perl-5.20.3/bin/perldl
>> line 313,  line 2.
>>
>> What am I missing? What Perl/PDL modules must be present? Getting history
>> and command editing working would truly make perldl an effective learning
>> tool.
>>
>> Thanks and regards,
>> Will Schmidt
>>
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org !
>> http://sdm.link/slashdot___
>> pdl-general mailing list
>> pdl-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pdl-general
>>
>>
>>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] History list and command editing in perldl

2018-04-13 Thread Craig DeForest
You may have to manually install the Gnu Readline library.  It’s becoming 
enough of a pain in the butt to get installed, that an Alien::ReadLine might be 
called for...

> On Apr 13, 2018, at 3:23 PM, William Schmidt  
> wrote:
> 
> Hmm,
> 
> Tried that.
> 
> $ cpanm Term::ReadLine::Gnu
> Term::ReadLine::Gnu is up to date. (1.35)
> 
> Does it require config or enabling?
> 
> Will
> 
> 
> 
> 
> On Fri, Apr 13, 2018 at 4:20 PM, Craig DeForest  > wrote:
> The problem is that Term::ReadLine is suffering from bit rot.  Try installing 
> Term::ReadLine::Gnu.
> 
>> On Apr 13, 2018, at 3:14 PM, William Schmidt > > wrote:
>> 
>> Hello piddlers,
>> 
>> perldl is one great prototyping tool, and I am making great progress 
>> understanding and mastering PDL running it in macOS, but thus far, enabling 
>> history list and command line editing inside perldl has been a total bust. 
>> The docos say the command line editor is emacs-like. I would prefer vi but 
>> any command line editing is welcome, given how I am using perldl to learn 
>> PDL. However, I cannot enable the history list nor edit a previous line 
>> other than doing very precise cut and paste. Here is the initial 
>> announcement when I start perldl:
>> 
>> $ perldl
>> perlDL shell v1.357
>>  PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
>>  'COPYING' in the PDL distribution. This is free software and you
>>  are welcome to redistribute it under certain conditions, see
>>  the same file for details.
>> ReadLines, NiceSlice, MultiLines  enabled
>> Reading /Users/carly/.perldlrc...
>> Found docs database 
>> /Users/carly/perl5/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/darwin-2level/PDL/pdldoc.db
>> Type 'help' for online help
>> Type 'demo' for online demos
>> Loaded PDL v2.018 (supports bad values)
>> 
>> 
>> Notice, ReadLines is enabled.
>> 
>> And here is what I get with the l command, 'l', not '1';
>> 
>> Can't locate object method "GetHistory" via package "Term::ReadLine::Stub" 
>> at /Users/carly/perl5/perlbrew/perls/perl-5.20.3/bin/perldl line 313, 
>>  line 2.
>> 
>> What am I missing? What Perl/PDL modules must be present? Getting history 
>> and command editing working would truly make perldl an effective learning 
>> tool.
>> 
>> Thanks and regards,
>> Will Schmidt
>> 
>> 
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org ! 
>> http://sdm.link/slashdot___ 
>> 
>> pdl-general mailing list
>> pdl-general@lists.sourceforge.net 
>> https://lists.sourceforge.net/lists/listinfo/pdl-general 
>> 
> 
> 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] History list and command editing in perldl

2018-04-13 Thread William Schmidt
Hmm,

Tried that.

$ cpanm Term::ReadLine::Gnu
Term::ReadLine::Gnu is up to date. (1.35)

Does it require config or enabling?

Will




On Fri, Apr 13, 2018 at 4:20 PM, Craig DeForest 
wrote:

> The problem is that Term::ReadLine is suffering from bit rot.  Try
> installing Term::ReadLine::Gnu.
>
> On Apr 13, 2018, at 3:14 PM, William Schmidt 
> wrote:
>
> Hello piddlers,
>
> *perldl* is one great prototyping tool, and I am making great progress
> understanding and mastering PDL running it in macOS, but thus far, enabling
> history list and command line editing inside perldl has been a total bust.
> The docos say the command line editor is emacs-like. I would prefer vi but
> *any* command line editing is welcome, given how I am using perldl to
> learn PDL. However, I cannot enable the history list nor edit a previous
> line other than doing very precise cut and paste. Here is the initial
> announcement when I start perldl:
>
> $ perldl
> perlDL shell v1.357
>  PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
>  'COPYING' in the PDL distribution. This is free software and you
>  are welcome to redistribute it under certain conditions, see
>  the same file for details.
> *ReadLines*, NiceSlice, MultiLines  enabled
> Reading /Users/carly/.perldlrc...
> Found docs database /Users/carly/perl5/perlbrew/
> perls/perl-5.20.3/lib/site_perl/5.20.3/darwin-2level/PDL/pdldoc.db
> Type 'help' for online help
> Type 'demo' for online demos
> Loaded PDL v2.018 (supports bad values)
>
>
> Notice, *ReadLines* is enabled.
>
> And here is what I get with the l command, 'l', not '1';
>
> Can't locate object method "GetHistory" via package "Term::ReadLine::Stub"
> at /Users/carly/perl5/perlbrew/perls/perl-5.20.3/bin/perldl line 313,
>  line 2.
>
> What am I missing? What Perl/PDL modules must be present? Getting history
> and command editing working would truly make perldl an effective learning
> tool.
>
> Thanks and regards,
> Will Schmidt
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot__
> _
> pdl-general mailing list
> pdl-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-general
>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general