Skip to content

Instantly share code, notes, and snippets.

View antoniogamiz's full-sized avatar
🎯
Focusing

Antonio antoniogamiz

🎯
Focusing
View GitHub Profile
@antoniogamiz
antoniogamiz / Categories included
Last active May 29, 2019 21:15
Categories included
operator
p6doc
v6 (basics)
statement (basics)
block (basics)
zen slice (basics)
python
variable
declarator
sub
@antoniogamiz
antoniogamiz / Headings ignored
Created May 29, 2019 21:17
Headings ignored
using
module
affecting
line
string
compound
move
named
environment
core
@antoniogamiz
antoniogamiz / how types are sorted
Created May 30, 2019 07:19
How types are sorted
{AST => 2, Any => 1, Array => 7, Associative => 8, Attribute => 9, Backtrace => 10, Backtrace::Frame => 11, Bag => 14, BagHash => 15, Baggy => 13, Blob => 17, Block => 20, Bool => 24, Buf => 25, CX::Last => 28, CX::Next => 29, CX::Proceed => 30, CX::Redo => 31, CX::Succeed => 32, CX::Take => 33, CX::Warn => 34, CallFrame => 35, Callable => 18, Cancellation => 36, Capture => 37, Channel => 38, Code => 19, CompUnit::Repository => 39, CompUnit::Repository::FileSystem => 41, CompUnit::Repository::Installable => 42, CompUnit::Repository::Installation => 43, CompUnit::Repository::Locally => 40, Complex => 44, ComplexStr => 46, Cool => 3, CurrentThreadScheduler => 48, Date => 50, DateTime => 51, Dateish => 49, Deprecation => 52, Distro => 53, Duration => 54, Enumeration => 55, Exception => 26, Failure => 57, FatRat => 59, ForeignCode => 60, Grammar => 62, Hash => 64, HyperWhatever => 65, IO => 66, IO::ArgFiles => 69, IO::CatHandle => 68, IO::Handle => 67, IO::Notification => 70, IO::Path => 71, IO::Path::Cygwin => 7
use v6;
use Test;
use Perl6::TypeGraph;
plan *;
my $tg = Perl6::TypeGraph.new-from-file("test-type-graph.txt");
say $tg.types.keys;
===> Building: p6doc:ver<1.002001>
Failed to create directory '/opt/rakudo-pkg/share/perl6/site/doc' with mode '0o777': Failed to mkdir: Permission denied
in method build at /home/antonio/.zef/store/doc.git/c076657900b1edfa4ebccdd9b1af514240f5d912/Build.pm6 line 12
in block <unit> at -e line 1
===> Building [FAIL]: p6doc:ver<1.002001>
Aborting due to build failure: p6doc:ver<1.002001> (use --force-build to override)
use v6.c;
use Pod::Load;
sub recursive-dir($dir) is export {
my @todo = $dir;
gather while @todo {
my $d = @todo.shift;
for dir($d) -> $f {
if $f.f {
use v6.c;
use example;
@antoniogamiz
antoniogamiz / search.js
Created July 4, 2019 14:35
These are all elements considered when something is search in the docs.
{ category: "Language", value: "About the docs", url: " /language/about" }
{ category: "Language", value: "Brief introduction", url: " /language/intro" }
{ category: "Language", value: "Classes and objects", url: " /language/classtut" }
{ category: "Language", value: "Command line interface", url: " /language/create-cli" }
{ category: "Language", value: "Community ", url: " /language/community" }
{ category: "Language", value: "Concurrency", url: " /language/concurrency" }
{ category: "Language", value: "Containers", url: " /language/containers" }
{ category: "Language", value: "Contexts and contextualizers", url: " /language/contexts" }
{ category: "Language", value: "Control flow", url: " /language/control" }
{ category: "Language", value: "Core modules", url: " /language/modules-core" }
@antoniogamiz
antoniogamiz / weird.p6
Last active July 5, 2019 11:53
Weird things happening here
use v6.c;
use Perl6::TypeGraph;
my $tg = Perl6::TypeGraph.new-from-file;
# This line freezes the execution.
say $tg.types<Any>; # with BagHash and whatever typename you use also happens
# This line not.
$tg.types<Any>;
@antoniogamiz
antoniogamiz / categories.txt
Created July 5, 2019 15:45
All categories currently computed in Perl6::Documentable.
basic
composite
domain-specific
core
exceptions
metamodel
variable
v6 (basics)
statement (basics)