Skip to content

Instantly share code, notes, and snippets.

peschwa

Block or report user

Report or block peschwa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:837f82061c9d22033bcd8c12374805ce
$ ./perl6-jdb-server -e'my @a = 1, 1, * + * ... * < 20; use java::lang::System:from<JavaRuntime>; System.get_out.println(@a)'
Listening for transport dt_socket at address: 8000
Listening for transport dt_socket at address: 8000
java.lang.RuntimeException: This type does not support positional operations
in block <unit> at -e line 1
# Okay, great, let's debug this!
main[4] list
4,242
View simple MOP example
class A { };
A.^add_method('foo', my method () { "foo" });
A.^compose;
say A.foo;
View gist:41db187968dba5841e6ba7c9acf06bac
use nqp;
use QRegex:from<NQP>;
BEGIN {
nqp::bindkey(
%*LANG, "MAIN", %*LANG<MAIN>.HOW.mixin(%*LANG<MAIN>, role {
token quote:sym<emote> {
"✌" ~ "✌"
{
my $shared := nqp::getattr(nqp::decont($/.CURSOR), Cursor, '$!shared');
View not-working-nqp-j-guts-code
$ ./perl6-j -e'use lib q[java#/home/psch/rakudo/javatests/]; use Foo:from<Java>'
path: file:/home/psch/rakudo/javatests/
name: Foo
urls in urlcl: file:/home/psch/rakudo/javatests/
===SORRY!===
java.lang.RuntimeException: java.lang.ClassNotFoundException: Foo
View gist:9f3236e85041550a5bacda6bc4752cab
class CompUnit::Repository::Java does CompUnit::Repository does CompUnit::Repository::Locally {
has $!interop;
method need(
CompUnit::DependencySpecification $spec,
CompUnit::PrecompilationRepository $precomp = self.precomp-repository(),
)
returns CompUnit:D
{
if $spec.from eq 'Java' {
View gist:c25caca2ae3b946aa9d85e3da677f1ca
$ ./perl6-j -e'use lib q[java#/home/psch/rakudo/rakudo/install/bin]; .say for $*REPO.repo-chain'
CompUnit::Repository::Java.new(next-repo => CompUnit::Repository::FileSystem.new("/home/psch/rakudo/rakudo/install/bin"))
file#/home/psch/rakudo/rakudo/install/bin
file#/home/psch/rakudo/rakudo/install/share/perl6/runtime
file#/home/psch/rakudo/rakudo/install/share/perl6/lib
file#/home/psch/rakudo/rakudo/install/share/nqp/lib
inst#/home/psch/.perl6
inst#/home/psch/rakudo/rakudo/install/share/perl6/site
inst#/home/psch/rakudo/rakudo/install/share/perl6/vendor
inst#/home/psch/rakudo/rakudo/install/share/perl6
View gist:f0b3c39e9c63112fda51e60e237a9b2d
main[1] catch uncaught org.perl6.nqp.runtime.UnwindException
Deferring uncaught org.perl6.nqp.runtime.UnwindException.
It will be set after the class is loaded.
main[1] run
> Set deferred uncaught org.perl6.nqp.runtime.UnwindException
Exception occurred: org.perl6.nqp.runtime.UnwindException (uncaught)
Exception occurred: org.perl6.nqp.runtime.UnwindException (uncaught)"thread=main", org.perl6.nqp.runtime.Ops.invokeDirect(), line=2,374 bci=150
2,374 throw e;
View gist:b23c2882ff470676544845c23fc42216
$ ./perl6-j -e'return'
Unhandled exception; category = 65536
in return (gen/jvm/CORE.setting:632)
in <unit> (-e:1)
in <unit-outer> (-e:1)
in eval (gen/jvm/stage2/NQPHLL.nqp:1198)
in (gen/jvm/stage2/NQPHLL.nqp:1288)
in command_eval (gen/jvm/stage2/NQPHLL.nqp:1285)
in command_eval (src/Perl6/Compiler.nqp:27)
in command_line (gen/jvm/stage2/NQPHLL.nqp:1269)
View gist:1e6a9f84a4c9e67638ff93e5b79f86d9
$ ./perl6-m --target=parse -e'&0'
- statementlist: &0
- statement: 1 matches
- EXPR: &0
- variable: &0
- index: 0
- sigil: &
View gist:37e480db6fefd24e2fdd4cc0e2e51a8a
public static void qb_1(org.perl6.nqp.runtime.CompilationUnit, org.perl6.nqp.runtime.ThreadContext, org.perl6.nqp.runtime.CodeRef, org.perl6.nqp
.runtime.CallSiteDescriptor, org.perl6.nqp.runtime.ResumeStatus$Frame);
Signature: (Lorg/perl6/nqp/runtime/CompilationUnit;Lorg/perl6/nqp/runtime/ThreadContext;Lorg/perl6/nqp/runtime/CodeRef;Lorg/perl6/nqp/runtime/
CallSiteDescriptor;Lorg/perl6/nqp/runtime/ResumeStatus$Frame;)V
flags: ACC_PUBLIC, ACC_STATIC
LineNumberTable:
line 1: 19
LocalVariableTable:
Start Length Slot Name Signature
0 180 3 __local_0 Lorg/perl6/nqp/runtime/CallSiteDescriptor;
You can’t perform that action at this time.