Skip to content

Instantly share code, notes, and snippets.

@skrisna
skrisna / p6-inheritance.p6
Created October 18, 2019 01:25
Inheritance in Perl 6
class Animalia {
method full-name {
self.^name
}
}
class Arthropodia is Animalia {
method full-name {
callsame() ~ ', ' ~ self.^name
}
}
/A/Rakudo ❯❯❯ find . -depth 3 | pbcopy
./include/dyncall/dyncall.h
./include/dyncall/dyncall_alloc.h
./include/dyncall/dyncall_alloc_wx.h
./include/dyncall/dyncall_args.h
./include/dyncall/dyncall_args_arm32_arm.h
./include/dyncall/dyncall_args_arm32_thumb.h
./include/dyncall/dyncall_args_mips.h
./include/dyncall/dyncall_args_ppc32.h
./include/dyncall/dyncall_args_ppc64.h
/A/Rakudo ❯❯❯ pwd ⏎
/Applications/Rakudo
/A/Rakudo ❯❯❯ find . | grep -i native
./include/moar/6model/reprs/NativeCall.h
./include/moar/6model/reprs/NativeRef.h
./include/moar/core/nativecall.h
./include/moar/core/nativecall_dyncall.h
./include/moar/core/nativecall_libffi.h
~ ❯❯❯ zef install ABC ⏎
===> Searching for: ABC
[Plugin - cached] Checking: Zef::Repository::LocalCache
[Plugin - cached] (OK) Plugin loaded successful
[Plugin - cached] (OK) Plugin is now usable: Zef::Repository::LocalCache
[Plugin - p6c] Checking: Zef::Repository::Ecosystems
[Plugin - p6c] (OK) Plugin loaded successful
[Plugin - p6c] (OK) Plugin is now usable: Zef::Repository::Ecosystems
[Plugin - git] Checking: Zef::Service::Shell::git
[Plugin - git] (OK) Plugin loaded successful
===> Searching for: Math::Primesieve
[Plugin - cached] Checking: Zef::Repository::LocalCache
[Plugin - cached] (OK) Plugin loaded successful
[Plugin - cached] (OK) Plugin is now usable: Zef::Repository::LocalCache
[Plugin - p6c] Checking: Zef::Repository::Ecosystems
[Plugin - p6c] (OK) Plugin loaded successful
[Plugin - p6c] (OK) Plugin is now usable: Zef::Repository::Ecosystems
[Plugin - git] Checking: Zef::Service::Shell::git
[Plugin - git] (OK) Plugin loaded successful
[Plugin - git] (OK) Probing successful
~ ❯❯❯ zef install Math::Primesieve ⏎
===> Searching for: Math::Primesieve
Failed to update p6c mirror No such method 'IO' for invocant of type 'Any'
Failed to update p6c mirror No such method 'IO' for invocant of type 'Any'
===> Testing: Math::Primesieve:ver('0.1'):auth('github:CurtTilmes')
lock requires a concrete object with REPR ReentrantMutex
in method setup at /Applications/Rakudo/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 line 301
in method CALL-ME at /Applications/Rakudo/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 line 328
in method BUILD at /Users/<user>/.zef/store/perl6-primesieve.git/2aee3bd62750b6f269abdb778694c05b84f82373/lib/Math/Primesieve.pm6 line 82
in block <unit> at t/01.basic.t line 8
subset Prime of Int where *.is-prime;
subset SmallPrime of Prime where * < 40_000;
subset BigPrime of Prime where * >= 10_000;
multi MAIN ( BigPrime $num ) { say "Prime number! Nice and big"; }
multi MAIN ( SmallPrime $num ) { say "Puny prime number"; }
multi MAIN ( $num ) { say "Gimme prime!"; }
subset Prime of Int where *.is-prime;
subset SmallPrime of Prime where * < 40_000;
subset BigPrime of Prime where * >= 10_000;
multi MAIN ( BigPrime $num ) { say "Prime number! Nice and big"; }
multi MAIN ( SmallPrime $num ) { say "Puny prime number"; }
multi MAIN ( $num ) { say "Gimme prime!"; }
" From here https://github.com/JuliaLang/julia-vim/issues/28
set nocompatible
filetype off
set rtp+=~/vimfiles/bundle/Vundle.vim/
let path='~/vimfiles/bundle'
call vundle#begin(path)
Plugin 'gmarik/Vundle.vim'
Plugin 'cocopon/iceberg.vim'
Plugin 'JuliaLang/julia-vim'