Hacker News new | ask | show | jobs
by the-owlery 3941 days ago
It's great that this is available (haven't worked through it yet).

Two major show-stoppers for me right now though:

* In the Perl 6 repl, I can't use my up/down arrows, or ^p/^n to get at previous lines I typed, nor ^a/^e and alt-B/alt-F to navigate on the line.

* In the repl, I can't do `doc(some-func)` to get at docstrings.

2 comments

> In the Perl 6 repl, I can't use my up/down arrows, or ^p/^n to get at previous lines I typed, nor ^a/^e and alt-B/alt-F to navigate on the line.

Really? In they version I have access to arrow keys and ^p/^n/^a/^e all function.

I've just been informed that what you need is "panda install Linenoise" to install the Linenoise module to get this functionality.

I agree documentation in the language would be nice. A module could handle that nicely.

I think this kind of stuff should be available out of the box. I'm learning Perl 6 too, Inability to use the arrow keys has almost left the REPL unusable to me.

I'm just writing programs in proper files and executing them.

I agree. Maybe rakudobrew should have a target that hits install, panda and p6doc and that being the default for new setups.

FYI, you can install p6doc with "panda install p6doc", which is the Perl 6 equivalent of perldoc. I don't believe it has in-language methods yet, but I imagine it wouldn't be that hard. For now, it's a CLI tool.

  # p6doc Str.tclc
   routine tclc

     multi sub    tclc(Str:D ) returns Str:D multi method tclc(Str:D:)
     returns Str:D
 
 Turns the first character to title case, and all other characters to lower case
 
 (not implemented in Niecza)
Thanks. Tried installing but got errors.

    ==> Fetching p6doc
    ==> Building p6doc
    ==> Testing p6doc

    # Failed test 'empty blocks argument gives undefined content'
    # at t/pod-convenience.t line 31
        # Looks like you failed 1 test of 7

    # Failed test 'pod-with-title'
    # at t/pod-convenience.t line 23
    t/pod-convenience.t .. 
    Failed 2/10 subtests 
    t/pod-htmlify.t ...... ok
    Method 'super' not found for invocant of class 'Array'
      in sub visit at /home/me/.panda-work/1441386381_4/lib/Perl6/TypeGraph.pm:89
      in sub visit at /home/me/.panda-work/1441386381_4/lib/Perl6/TypeGraph.pm:89
      in method topo-sort at /home/me/.panda-work/1441386381_4/lib/Perl6/TypeGraph.pm:92
      in method parse-from-file at /home/me/.panda-work/1441386381_4/lib/Perl6/TypeGraph.pm:82
      in method new-from-file at /home/me/.panda-work/1441386381_4/lib/Perl6/TypeGraph.pm:30
      in block <unit> at t/typegraph.t:8

    t/typegraph.t ........ 
    Dubious, test returned 255 (wstat 65280, 0xff00)
    Failed 8/8 subtests
This is with a fresh (as of minutes ago) `rakudobrew build moar`:

    $ perl6 -v
    This is perl6 version 2015.07.1-728-g9c5cb50 built on
    MoarVM version 2015.07-108-g7e9f29e
That's odd. I just built Perl 6, panda and installed p6doc right before that comment. I didn't use rakudobrew for the Perl 6 install though (git clone + Configure, make, make install), and I have a slightly different version.

You aren't still running the glr branch are you? Method 'super' not found for invocant of class 'Array' sounds to me suspiciously like a bug in that work-in-progress branch, as glr stands for Great List Refactor and the error has to do with Array. If so, you might have better luck with building the moar backed version with rakudobrew.

Edit: Sorry, just noticed where you said you built with moar. I'll try to replicate on my end and see what I get.

This is likely a regression from the glr branch being merged into the main branch this morning. Hopefully any issues with the Perl 6 ecosystem will we worked out shortly. Actually, in the IRC channel[1], I see some module authors already making commits to adapt to the changes.

1: If you just want to lurk, or catch up on a past day, you can view the log at http://irclog.perlgeek.de/perl6/today

Hmm.

I'm using my account on the Perl 6 community dev server hack.p6c.org.

I used rakudobrew to rebuild rakudo last night:

This is perl6 version 2015.07.1-215-ge6f3602 built on MoarVM version 2015.07-108-g7e9f29e

I just ran `panda install p6doc` and it worked fine for me.

What do you get when you run `perl6 -e '$*DISTRO.say'?

Investigating...

This is on Debian Testing:

    $ perl6 -e '$*DISTRO.say'
    debian (3.16.0.4.amd.64)
Sorry, should probably take this to #perl6.
> In the Perl 6 repl, I can't use my up/down arrows, or ^p/^n to get at previous lines I typed, nor ^a/^e and alt-B/alt-F to navigate on the line.

Try:

    panda install Linenoise
If that doesn't work, post the response to `perl6 -v` and `perl6 -e '$*DISTRO.perl.say'`.
I installed via rakudobrew (`rakudobrew build glr`), but have no `panda` in my ~/.rakudobrew/bin directory.
Ah. glr is 1) a very recent in-development branch that 2) only includes the compiler so 3) panda (the module installer) isn't included and 4) it may not work even if you download and manually install a copy of it.

You might want to visit the freenode IRC channel #perl6 to straighten things out.[1] In the meantime I'm going to install the glr branch and see what I find. It might be a few hours (at most a day I think) before I can get back to you.

[1] https://kiwiirc.com/client/irc.freenode.net/#perl6

Ok. Command-line history/editing works now. I wiped out ~/.rakudobrew and started over:

    rakudobrew build moar
    rakudobrew build-panda
    panda install Linenoise
Thanks.
If you type rakudobrew by itself, the usage shows it is capable of a "rakudobrew build-panda" which is probably a good place to start. Panda is the Perl 6 package manager, in case that wasn't clear.
Thanks, kbenson; missed that. Works now!