Skip to content

Instantly share code, notes, and snippets.

@oprypin
Created May 16, 2021 17:26
Show Gist options
  • Save oprypin/b7d9b1e6bbecd4415dabb70aaba4c581 to your computer and use it in GitHub Desktop.
Save oprypin/b7d9b1e6bbecd4415dabb70aaba4c581 to your computer and use it in GitHub Desktop.
import functools, posixpath, timeit, pathlib
from urllib.parse import urlparse
import matplotlib.pyplot as plt
def new():
@functools.lru_cache(maxsize=None)
def _norm_parts(path):
return pathlib.PosixPath('/' + path).resolve().parts[1:]
def get_relative_url(url, other):
# Remove filename from other url if it has one.
dirname, _, basename = other.rpartition('/')
if '.' in basename:
other = dirname
other_parts = _norm_parts(other)
dest_parts = _norm_parts(url)
common = 0
for a, b in zip(other_parts, dest_parts):
if a != b:
break
common += 1
rel_parts = ('..',) * (len(other_parts) - common) + dest_parts[common:]
relurl = '/'.join(rel_parts) or '.'
return relurl + '/' if url.endswith('/') else relurl
def normalize_url(path, page=None, base=''):
path, is_abs = _get_norm_url(path)
if is_abs:
return path
if page is not None:
return get_relative_url(path, page.url)
return posixpath.join(base, path)
@functools.lru_cache(maxsize=None)
def _get_norm_url(path):
path = path_to_url(path or '.')
# Allow links to be fully qualified URL's
parsed = urlparse(path)
if parsed.scheme or parsed.netloc or path.startswith(('/', '#')):
return path, True
return path, False
def path_to_url(path):
"""Convert a system path to a URL."""
return '/'.join(path.split('\\'))
return normalize_url
def old():
def get_relative_url(url, other):
if other != '.':
# Remove filename from other url if it has one.
parts = posixpath.split(other)
other = parts[0] if '.' in parts[1] else other
relurl = posixpath.relpath('/' + url, '/' + other)
return relurl + '/' if url.endswith('/') else relurl
def normalize_url(path, page=None, base=''):
path, is_abs = _get_norm_url(path)
if is_abs:
return path
if page is not None:
base = page.url
return _get_rel_path(path, base, page is not None)
@functools.lru_cache(maxsize=None)
def _get_norm_url(path):
path = path_to_url(path or '.')
# Allow links to be fully qualified URL's
parsed = urlparse(path)
if parsed.scheme or parsed.netloc or path.startswith(('/', '#')):
return path, True
return path, False
@functools.lru_cache()
def _get_rel_path(path, base, base_is_url):
if base_is_url:
return get_relative_url(path, base)
else:
return posixpath.join(base, path)
def path_to_url(path):
return '/'.join(path.split('\\'))
return normalize_url
class Page:
def __init__(self, url):
self.url = url
def test(normalize_url, paths):
for a in paths:
page = Page(a)
for b in paths:
normalize_url(b, page)
def main():
plt.style.use('seaborn-whitegrid')
plt.xlabel("Number of pages")
plt.ylabel("Total time getting relative paths, sec")
plt.xticks(range(0, 2000, 50))
plt.yticks(range(1000))
for offset in [10, 20, 30]:
for kind in [new, old]:
normalize_url = kind()
points = []
for count in range(offset, len(all_paths), 30):
paths = all_paths[:count]
duration = timeit.timeit(lambda: test(normalize_url, paths), number=2)
points.append((count, duration))
plt.scatter(*zip(*points),color={old: 'tab:red', new: 'tab:green'}[kind])
plt.show()
all_paths = """\
conventions/coding_style.html
database/connection_pool.html
database/connection.html
database/index.html
database/transactions.html
getting_started/cli.html
getting_started/http_server.html
getting_started/index.html
guides/ci/circleci.html
guides/ci/gh-actions.html
guides/ci/index.html
guides/ci/travis.html
guides/concurrency.html
guides/hosting/github.html
guides/hosting/gitlab.html
guides/index.html
guides/performance.html
guides/static_linking.html
guides/testing.html
guides/writing_shards.html
index.html
platform_support.html
sitemap.xml
SUMMARY.html
syntax_and_semantics/alias.html
syntax_and_semantics/and.html
syntax_and_semantics/annotations/built_in_annotations.html
syntax_and_semantics/annotations/index.html
syntax_and_semantics/as_a_suffix.html
syntax_and_semantics/as_an_expression.html
syntax_and_semantics/as_question.html
syntax_and_semantics/as.html
syntax_and_semantics/assignment.html
syntax_and_semantics/block_forwarding.html
syntax_and_semantics/blocks_and_procs.html
syntax_and_semantics/break.html
syntax_and_semantics/c_bindings/alias.html
syntax_and_semantics/c_bindings/callbacks.html
syntax_and_semantics/c_bindings/constants.html
syntax_and_semantics/c_bindings/enum.html
syntax_and_semantics/c_bindings/fun.html
syntax_and_semantics/c_bindings/index.html
syntax_and_semantics/c_bindings/lib.html
syntax_and_semantics/c_bindings/out.html
syntax_and_semantics/c_bindings/struct.html
syntax_and_semantics/c_bindings/to_unsafe.html
syntax_and_semantics/c_bindings/type.html
syntax_and_semantics/c_bindings/union.html
syntax_and_semantics/c_bindings/variables.html
syntax_and_semantics/capturing_blocks.html
syntax_and_semantics/case.html
syntax_and_semantics/class_methods.html
syntax_and_semantics/class_variables.html
syntax_and_semantics/classes_and_methods.html
syntax_and_semantics/closures.html
syntax_and_semantics/comments.html
syntax_and_semantics/compile_time_flags.html
syntax_and_semantics/constants.html
syntax_and_semantics/control_expressions.html
syntax_and_semantics/cross-compilation.html
syntax_and_semantics/declare_var.html
syntax_and_semantics/default_and_named_arguments.html
syntax_and_semantics/default_values_named_arguments_splats_tuples_and_overloading.html
syntax_and_semantics/documenting_code.html
syntax_and_semantics/enum.html
syntax_and_semantics/everything_is_an_object.html
syntax_and_semantics/exception_handling.html
syntax_and_semantics/finalize.html
syntax_and_semantics/generics.html
syntax_and_semantics/if_var_nil.html
syntax_and_semantics/if_var.html
syntax_and_semantics/if_varis_a.html
syntax_and_semantics/if_varresponds_to.html
syntax_and_semantics/if.html
syntax_and_semantics/index.html
syntax_and_semantics/inheritance.html
syntax_and_semantics/instance_sizeof.html
syntax_and_semantics/is_a.html
syntax_and_semantics/literals/array.html
syntax_and_semantics/literals/bool.html
syntax_and_semantics/literals/char.html
syntax_and_semantics/literals/command.html
syntax_and_semantics/literals/floats.html
syntax_and_semantics/literals/hash.html
syntax_and_semantics/literals/index.html
syntax_and_semantics/literals/integers.html
syntax_and_semantics/literals/named_tuple.html
syntax_and_semantics/literals/nil.html
syntax_and_semantics/literals/proc.html
syntax_and_semantics/literals/range.html
syntax_and_semantics/literals/regex.html
syntax_and_semantics/literals/string.html
syntax_and_semantics/literals/symbol.html
syntax_and_semantics/literals/tuple.html
syntax_and_semantics/local_variables.html
syntax_and_semantics/low_level_primitives.html
syntax_and_semantics/macros/fresh_variables.html
syntax_and_semantics/macros/hooks.html
syntax_and_semantics/macros/index.html
syntax_and_semantics/macros/macro_methods.html
syntax_and_semantics/methods_and_instance_variables.html
syntax_and_semantics/modules.html
syntax_and_semantics/new%2C_initialize_and_allocate.html
syntax_and_semantics/next.html
syntax_and_semantics/nil_question.html
syntax_and_semantics/not.html
syntax_and_semantics/offsetof.html
syntax_and_semantics/operators.html
syntax_and_semantics/or.html
syntax_and_semantics/overloading.html
syntax_and_semantics/pointerof.html
syntax_and_semantics/proc_literal.html
syntax_and_semantics/requiring_files.html
syntax_and_semantics/responds_to.html
syntax_and_semantics/return_types.html
syntax_and_semantics/sizeof.html
syntax_and_semantics/splats_and_tuples.html
syntax_and_semantics/structs.html
syntax_and_semantics/ternary_if.html
syntax_and_semantics/the_program.html
syntax_and_semantics/truthy_and_falsey_values.html
syntax_and_semantics/type_grammar.html
syntax_and_semantics/type_inference.html
syntax_and_semantics/type_reflection.html
syntax_and_semantics/type_restrictions.html
syntax_and_semantics/typeof.html
syntax_and_semantics/types_and_methods.html
syntax_and_semantics/union_types.html
syntax_and_semantics/unless.html
syntax_and_semantics/unsafe.html
syntax_and_semantics/until.html
syntax_and_semantics/virtual_and_abstract_types.html
syntax_and_semantics/visibility.html
syntax_and_semantics/while.html
the_shards_command/index.html
tutorials/basics/10_hello_world.html
tutorials/basics/20_variables.html
tutorials/basics/30_math.html
tutorials/basics/40_strings.html
tutorials/basics/50_control_flow.html
tutorials/basics/60_methods.html
tutorials/basics/index.html
using_the_compiler/index.html
api/ArgumentError.html
api/Array.html
api/Atomic.html
api/Atomic/Flag.html
api/Base64.html
api/Base64/Error.html
api/Benchmark.html
api/Benchmark/BM.html
api/Benchmark/BM/Job.html
api/Benchmark/BM/Tms.html
api/Benchmark/IPS.html
api/Benchmark/IPS/Entry.html
api/Benchmark/IPS/Job.html
api/BigDecimal.html
api/BigFloat.html
api/BigInt.html
api/BigRational.html
api/BitArray.html
api/Bool.html
api/Box.html
api/Bytes.html
api/Channel.html
api/Channel/ClosedError.html
api/Char.html
api/Char/Reader.html
api/Class.html
api/Colorize.html
api/Colorize/Color.html
api/Colorize/Color256.html
api/Colorize/ColorANSI.html
api/Colorize/ColorRGB.html
api/Colorize/Object.html
api/Colorize/ObjectExtensions.html
api/Comparable.html
api/Complex.html
api/Compress.html
api/Compress/Deflate.html
api/Compress/Deflate/Error.html
api/Compress/Deflate/Reader.html
api/Compress/Deflate/Strategy.html
api/Compress/Deflate/Writer.html
api/Compress/Gzip.html
api/Compress/Gzip/Error.html
api/Compress/Gzip/Header.html
api/Compress/Gzip/Reader.html
api/Compress/Gzip/Writer.html
api/Compress/Zip.html
api/Compress/Zip/CompressionMethod.html
api/Compress/Zip/Error.html
api/Compress/Zip/File.html
api/Compress/Zip/File/Entry.html
api/Compress/Zip/FileInfo.html
api/Compress/Zip/Reader.html
api/Compress/Zip/Reader/Entry.html
api/Compress/Zip/Writer.html
api/Compress/Zip/Writer/Entry.html
api/Compress/Zlib.html
api/Compress/Zlib/Error.html
api/Compress/Zlib/Reader.html
api/Compress/Zlib/Writer.html
api/Crypto.html
api/Crypto/Bcrypt.html
api/Crypto/Bcrypt/Error.html
api/Crypto/Bcrypt/Password.html
api/Crypto/Blowfish.html
api/Crypto/Subtle.html
api/Crystal.html
api/Crystal/AbstractDefChecker.html
api/Crystal/AbstractDefChecker/ReplacePathWithTypeVar.html
api/Crystal/Alias.html
api/Crystal/AliasType.html
api/Crystal/And.html
api/Crystal/AndTypeFilter.html
api/Crystal/Annotatable.html
api/Crystal/Annotation.html
api/Crystal/AnnotationDef.html
api/Crystal/AnnotationType.html
api/Crystal/Arg.html
api/Crystal/ArrayLiteral.html
api/Crystal/Asm.html
api/Crystal/AsmOperand.html
api/Crystal/Assign.html
api/Crystal/AssignWithRestriction.html
api/Crystal/ASTNode.html
api/Crystal/BinaryOp.html
api/Crystal/Block.html
api/Crystal/BoolLiteral.html
api/Crystal/BoolType.html
api/Crystal/Break.html
api/Crystal/CacheDir.html
api/Crystal/Call.html
api/Crystal/Call/RetryLookupWithLiterals.html
api/Crystal/CallSignature.html
api/Crystal/Case.html
api/Crystal/Cast.html
api/Crystal/CharLiteral.html
api/Crystal/CharType.html
api/Crystal/ClassDef.html
api/Crystal/ClassType.html
api/Crystal/ClassVar.html
api/Crystal/ClassVarContainer.html
api/Crystal/ClassVarInitializer.html
api/Crystal/ClassVarsInitializerVisitor.html
api/Crystal/CleanupTransformer.html
api/Crystal/CleanupTransformer/ClosuredVarsCollector.html
api/Crystal/CodeError.html
api/Crystal/Codegen.html
api/Crystal/Codegen/Target.html
api/Crystal/Codegen/Target/Error.html
api/Crystal/CodeGenVisitor.html
api/Crystal/CodeGenVisitor/CodegenWellKnownFunctions.html
api/Crystal/CodeGenVisitor/Context.html
api/Crystal/CodeGenVisitor/FunMetadata.html
api/Crystal/CodeGenVisitor/Handler.html
api/Crystal/CodeGenVisitor/LLVMVar.html
api/Crystal/CodeGenVisitor/LLVMVars.html
api/Crystal/CodeGenVisitor/ModuleInfo.html
api/Crystal/CodeGenVisitor/Phi.html
api/Crystal/CodeGenVisitor/StringKey.html
api/Crystal/Command.html
api/Crystal/Command/CompilerConfig.html
api/Crystal/Command/FormatCommand.html
api/Crystal/Compiler.html
api/Crystal/Compiler/CompilationUnit.html
api/Crystal/Compiler/EmitTarget.html
api/Crystal/Compiler/Result.html
api/Crystal/Compiler/Source.html
api/Crystal/Config.html
api/Crystal/Const.html
api/Crystal/ContextResult.html
api/Crystal/ContextVisitor.html
api/Crystal/ControlExpression.html
api/Crystal/Conversions.html
api/Crystal/Cover.html
api/Crystal/CrystalLibraryPath.html
api/Crystal/CrystalLLVMBuilder.html
api/Crystal/CrystalPath.html
api/Crystal/CrystalPath/NotFoundError.html
api/Crystal/CStructOrUnionDef.html
api/Crystal/Debug.html
api/Crystal/Def.html
api/Crystal/DefInstanceContainer.html
api/Crystal/DefInstanceKey.html
api/Crystal/DefWithMetadata.html
api/Crystal/DeprecatedAnnotation.html
api/Crystal/Doc.html
api/Crystal/Doc/Constant.html
api/Crystal/Doc/Generator.html
api/Crystal/Doc/HeadTemplate.html
api/Crystal/Doc/Highlighter.html
api/Crystal/Doc/Item.html
api/Crystal/Doc/JsNavigatorTemplate.html
api/Crystal/Doc/JsSearchTemplate.html
api/Crystal/Doc/JsTypeTemplate.html
api/Crystal/Doc/JsUsageModal.html
api/Crystal/Doc/JsVersionsTemplate.html
api/Crystal/Doc/ListItemsTemplate.html
api/Crystal/Doc/Macro.html
api/Crystal/Doc/Main.html
api/Crystal/Doc/MainTemplate.html
api/Crystal/Doc/Markdown.html
api/Crystal/Doc/Markdown/DocRenderer.html
api/Crystal/Doc/Markdown/HTMLRenderer.html
api/Crystal/Doc/Markdown/Parser.html
api/Crystal/Doc/Markdown/Parser/CodeFence.html
api/Crystal/Doc/Markdown/Parser/PrefixHeader.html
api/Crystal/Doc/Markdown/Parser/UnorderedList.html
api/Crystal/Doc/Markdown/Renderer.html
api/Crystal/Doc/Method.html
api/Crystal/Doc/MethodDetailTemplate.html
api/Crystal/Doc/MethodsInheritedTemplate.html
api/Crystal/Doc/MethodSummaryTemplate.html
api/Crystal/Doc/OtherTypesTemplate.html
api/Crystal/Doc/ProjectInfo.html
api/Crystal/Doc/RelativeLocation.html
api/Crystal/Doc/SidebarTemplate.html
api/Crystal/Doc/SitemapTemplate.html
api/Crystal/Doc/StyleTemplate.html
api/Crystal/Doc/Type.html
api/Crystal/Doc/TypeTemplate.html
api/Crystal/DoubleSplat.html
api/Crystal/EnumDef.html
api/Crystal/EnumType.html
api/Crystal/Error.html
api/Crystal/ErrorFormat.html
api/Crystal/ExceptionHandler.html
api/Crystal/ExhaustivenessChecker.html
api/Crystal/ExhaustivenessChecker/BoolPattern.html
api/Crystal/ExhaustivenessChecker/BoolTarget.html
api/Crystal/ExhaustivenessChecker/EnumMemberNamePattern.html
api/Crystal/ExhaustivenessChecker/EnumMemberPattern.html
api/Crystal/ExhaustivenessChecker/EnumTarget.html
api/Crystal/ExhaustivenessChecker/Pattern.html
api/Crystal/ExhaustivenessChecker/Target.html
api/Crystal/ExhaustivenessChecker/TypePattern.html
api/Crystal/ExhaustivenessChecker/TypeTarget.html
api/Crystal/ExhaustivenessChecker/UnderscorePattern.html
api/Crystal/ExpandableNode.html
api/Crystal/ExpandResult.html
api/Crystal/ExpandResult/Expansion.html
api/Crystal/ExpandResult/Expansion/MacroImplementation.html
api/Crystal/ExpandTransformer.html
api/Crystal/ExpandVisitor.html
api/Crystal/ExperimentalAnnotation.html
api/Crystal/Expressions.html
api/Crystal/Extend.html
api/Crystal/External.html
api/Crystal/ExternalVar.html
api/Crystal/FileModule.html
api/Crystal/FileNode.html
api/Crystal/FixMissingTypes.html
api/Crystal/FloatType.html
api/Crystal/Formatter.html
api/Crystal/Formatter/AlignInfo.html
api/Crystal/Formatter/CommentInfo.html
api/Crystal/Formatter/HeredocFix.html
api/Crystal/Formatter/HeredocInfo.html
api/Crystal/FrozenTypeException.html
api/Crystal/FunDef.html
api/Crystal/Generic.html
api/Crystal/GenericClassInstanceMetaclassType.html
api/Crystal/GenericClassInstanceType.html
api/Crystal/GenericClassType.html
api/Crystal/GenericInstanceType.html
api/Crystal/GenericModuleInstanceMetaclassType.html
api/Crystal/GenericModuleInstanceType.html
api/Crystal/GenericModuleType.html
api/Crystal/GenericType.html
api/Crystal/GenericUnionType.html
api/Crystal/Git.html
api/Crystal/Global.html
api/Crystal/HashLiteral.html
api/Crystal/HashLiteral/Entry.html
api/Crystal/HashStringType.html
api/Crystal/HasSelfVisitor.html
api/Crystal/HierarchyPrinter.html
api/Crystal/Hook.html
api/Crystal/HookExpansionsContainer.html
api/Crystal/If.html
api/Crystal/ImplementationResult.html
api/Crystal/ImplementationsVisitor.html
api/Crystal/ImplementationTrace.html
api/Crystal/ImplicitObj.html
api/Crystal/Include.html
api/Crystal/Init.html
api/Crystal/Init/Config.html
api/Crystal/Init/EditorconfigView.html
api/Crystal/Init/Error.html
api/Crystal/Init/FilesConflictError.html
api/Crystal/Init/GitignoreView.html
api/Crystal/Init/GitInitView.html
api/Crystal/Init/InitProject.html
api/Crystal/Init/LicenseView.html
api/Crystal/Init/ReadmeView.html
api/Crystal/Init/ShardView.html
api/Crystal/Init/SpecExampleView.html
api/Crystal/Init/SpecHelperView.html
api/Crystal/Init/SrcExampleView.html
api/Crystal/Init/TravisView.html
api/Crystal/Init/View.html
api/Crystal/InstanceSizeOf.html
api/Crystal/InstanceVar.html
api/Crystal/InstanceVarContainer.html
api/Crystal/InstanceVarInitializerContainer.html
api/Crystal/InstanceVarInitializerContainer/InstanceVarInitializer.html
api/Crystal/InstanceVarsInitializerVisitor.html
api/Crystal/InstanceVarsInitializerVisitor/Initializer.html
api/Crystal/IntegerType.html
api/Crystal/IsA.html
api/Crystal/JSONHierarchyPrinter.html
api/Crystal/Lexer.html
api/Crystal/Lexer/HeredocItem.html
api/Crystal/Lexer/LocPopPragma.html
api/Crystal/Lexer/LocPragma.html
api/Crystal/Lexer/LocPushPragma.html
api/Crystal/Lexer/LocSetPragma.html
api/Crystal/LibDef.html
api/Crystal/LibType.html
api/Crystal/LinkAnnotation.html
api/Crystal/LiteralExpander.html
api/Crystal/LiteralType.html
api/Crystal/LLVMBuilderHelper.html
api/Crystal/LLVMId.html
api/Crystal/LLVMTyper.html
api/Crystal/LLVMTyper/TypeCache.html
api/Crystal/Location.html
api/Crystal/Macro.html
api/Crystal/MacroExpression.html
api/Crystal/MacroFor.html
api/Crystal/MacroId.html
api/Crystal/MacroIf.html
api/Crystal/MacroInterpreter.html
api/Crystal/MacroInterpreter/MacroVarKey.html
api/Crystal/MacroInterpreter/ReplaceBlockVarsTransformer.html
api/Crystal/MacroLiteral.html
api/Crystal/MacroRaiseException.html
api/Crystal/Macros.html
api/Crystal/Macros/And.html
api/Crystal/Macros/Annotation.html
api/Crystal/Macros/Arg.html
api/Crystal/Macros/ArrayLiteral.html
api/Crystal/Macros/Assign.html
api/Crystal/Macros/ASTNode.html
api/Crystal/Macros/BinaryOp.html
api/Crystal/Macros/Block.html
api/Crystal/Macros/BoolLiteral.html
api/Crystal/Macros/Call.html
api/Crystal/Macros/Case.html
api/Crystal/Macros/Cast.html
api/Crystal/Macros/CharLiteral.html
api/Crystal/Macros/ClassDef.html
api/Crystal/Macros/ClassVar.html
api/Crystal/Macros/Def.html
api/Crystal/Macros/Expressions.html
api/Crystal/Macros/Generic.html
api/Crystal/Macros/Global.html
api/Crystal/Macros/HashLiteral.html
api/Crystal/Macros/If.html
api/Crystal/Macros/ImplicitObj.html
api/Crystal/Macros/InstanceSizeOf.html
api/Crystal/Macros/InstanceVar.html
api/Crystal/Macros/IsA.html
api/Crystal/Macros/Macro.html
api/Crystal/Macros/MacroId.html
api/Crystal/Macros/MetaVar.html
api/Crystal/Macros/MultiAssign.html
api/Crystal/Macros/NamedArgument.html
api/Crystal/Macros/NamedTupleLiteral.html
api/Crystal/Macros/NilableCast.html
api/Crystal/Macros/NilLiteral.html
api/Crystal/Macros/Nop.html
api/Crystal/Macros/Not.html
api/Crystal/Macros/NumberLiteral.html
api/Crystal/Macros/OffsetOf.html
api/Crystal/Macros/Or.html
api/Crystal/Macros/Out.html
api/Crystal/Macros/Path.html
api/Crystal/Macros/PointerOf.html
api/Crystal/Macros/ProcLiteral.html
api/Crystal/Macros/ProcNotation.html
api/Crystal/Macros/ProcPointer.html
api/Crystal/Macros/RangeLiteral.html
api/Crystal/Macros/ReadInstanceVar.html
api/Crystal/Macros/RegexLiteral.html
api/Crystal/Macros/Require.html
api/Crystal/Macros/RespondsTo.html
api/Crystal/Macros/SizeOf.html
api/Crystal/Macros/Splat.html
api/Crystal/Macros/StringInterpolation.html
api/Crystal/Macros/StringLiteral.html
api/Crystal/Macros/SymbolLiteral.html
api/Crystal/Macros/TupleLiteral.html
api/Crystal/Macros/TypeDeclaration.html
api/Crystal/Macros/TypeNode.html
api/Crystal/Macros/UnaryExpression.html
api/Crystal/Macros/UninitializedVar.html
api/Crystal/Macros/Union.html
api/Crystal/Macros/Var.html
api/Crystal/Macros/VisibilityModifier.html
api/Crystal/Macros/When.html
api/Crystal/Macros/While.html
api/Crystal/MacroVar.html
api/Crystal/MacroVerbatim.html
api/Crystal/MagicConstant.html
api/Crystal/MainVisitor.html
api/Crystal/MainVisitor/InstanceVarsCollector.html
api/Crystal/Match.html
api/Crystal/MatchContext.html
api/Crystal/Matches.html
api/Crystal/MathInterpreter.html
api/Crystal/Metaclass.html
api/Crystal/MetaclassType.html
api/Crystal/MetaMacroVar.html
api/Crystal/MetaTypeVar.html
api/Crystal/MetaVar.html
api/Crystal/MetaVars.html
api/Crystal/MethodTraceException.html
api/Crystal/MixedUnionType.html
api/Crystal/ModuleDef.html
api/Crystal/ModuleType.html
api/Crystal/MultiAssign.html
api/Crystal/MultiType.html
api/Crystal/NamedArgument.html
api/Crystal/NamedArgumentType.html
api/Crystal/NamedTupleInstanceType.html
api/Crystal/NamedTupleLiteral.html
api/Crystal/NamedTupleLiteral/Entry.html
api/Crystal/NamedTupleType.html
api/Crystal/NamedType.html
api/Crystal/Next.html
api/Crystal/NilableCast.html
api/Crystal/NilableProcType.html
api/Crystal/NilableReferenceUnionType.html
api/Crystal/NilableType.html
api/Crystal/NilLiteral.html
api/Crystal/NilReason.html
api/Crystal/NilType.html
api/Crystal/NonGenericClassType.html
api/Crystal/NonGenericModuleType.html
api/Crystal/Nop.html
api/Crystal/NoReturnFilter.html
api/Crystal/NoReturnType.html
api/Crystal/Normalizer.html
api/Crystal/Not.html
api/Crystal/NotFilter.html
api/Crystal/NumberLiteral.html
api/Crystal/NumberLiteralType.html
api/Crystal/OffsetOf.html
api/Crystal/OpAssign.html
api/Crystal/Or.html
api/Crystal/OrTypeFilter.html
api/Crystal/Out.html
api/Crystal/Parser.html
api/Crystal/Parser/ArgExtras.html
api/Crystal/Parser/CallArgs.html
api/Crystal/Parser/ParseMode.html
api/Crystal/Parser/Piece.html
api/Crystal/Parser/Unclosed.html
api/Crystal/Path.html
api/Crystal/Playground.html
api/Crystal/Playground/Agent.html
api/Crystal/Playground/AgentInstrumentorTransformer.html
api/Crystal/Playground/AgentInstrumentorTransformer/FirstBlockVisitor.html
api/Crystal/Playground/AgentInstrumentorTransformer/MacroDefNameCollector.html
api/Crystal/Playground/AgentInstrumentorTransformer/TypeBodyTransformer.html
api/Crystal/Playground/EnvironmentHandler.html
api/Crystal/Playground/Error.html
api/Crystal/Playground/FileContentPage.html
api/Crystal/Playground/PageHandler.html
api/Crystal/Playground/PathStaticFileHandler.html
api/Crystal/Playground/PathWebSocketHandler.html
api/Crystal/Playground/PlaygroundPage.html
api/Crystal/Playground/PlaygroundPage/Resource.html
api/Crystal/Playground/Server.html
api/Crystal/Playground/Session.html
api/Crystal/Playground/WorkbookHandler.html
api/Crystal/Playground/WorkbookIndexPage.html
api/Crystal/Playground/WorkbookIndexPage/Item.html
api/Crystal/PointerInstanceType.html
api/Crystal/PointerOf.html
api/Crystal/PointerType.html
api/Crystal/PrettyTypeNameJsonConverter.html
api/Crystal/Primitive.html
api/Crystal/PrimitiveType.html
api/Crystal/PrintTypesVisitor.html
api/Crystal/ProcInstanceType.html
api/Crystal/ProcLiteral.html
api/Crystal/ProcNotation.html
api/Crystal/ProcPointer.html
api/Crystal/ProcType.html
api/Crystal/Program.html
api/Crystal/Program/CompiledMacroRun.html
api/Crystal/Program/FinishedHook.html
api/Crystal/Program/MacroRunResult.html
api/Crystal/Program/RecordedRequire.html
api/Crystal/Program/RequireWithTimestamp.html
api/Crystal/ProgressTracker.html
api/Crystal/RangeLiteral.html
api/Crystal/ReadInstanceVar.html
api/Crystal/RechableVisitor.html
api/Crystal/RecursiveStructChecker.html
api/Crystal/ReferenceUnionType.html
api/Crystal/RegexLiteral.html
api/Crystal/Require.html
api/Crystal/Rescue.html
api/Crystal/RespondsTo.html
api/Crystal/RespondsToTypeFilter.html
api/Crystal/Return.html
api/Crystal/ReturnGatherer.html
api/Crystal/Select.html
api/Crystal/Select/When.html
api/Crystal/Self.html
api/Crystal/SemanticVisitor.html
api/Crystal/SemanticVisitor/PropagateDocVisitor.html
api/Crystal/SimpleTypeFilter.html
api/Crystal/SizeOf.html
api/Crystal/SkipMacroException.html
api/Crystal/SpecialVar.html
api/Crystal/Splat.html
api/Crystal/StaticArrayInstanceType.html
api/Crystal/StaticArrayType.html
api/Crystal/StringInterpolation.html
api/Crystal/StringLiteral.html
api/Crystal/SubclassObservable.html
api/Crystal/SymbolLiteral.html
api/Crystal/SymbolLiteralType.html
api/Crystal/SymbolType.html
api/Crystal/SyntaxException.html
api/Crystal/TablePrint.html
api/Crystal/TablePrint/Cell.html
api/Crystal/TablePrint/Column.html
api/Crystal/TablePrint/RowTypes.html
api/Crystal/TablePrint/Separator.html
api/Crystal/Token.html
api/Crystal/Token/DelimiterState.html
api/Crystal/Token/MacroState.html
api/Crystal/TopLevelVisitor.html
api/Crystal/TopLevelVisitor/FinishedHook.html
api/Crystal/ToSVisitor.html
api/Crystal/Transformer.html
api/Crystal/TruthyFilter.html
api/Crystal/TupleIndexer.html
api/Crystal/TupleInstanceType.html
api/Crystal/TupleInstanceType/Index.html
api/Crystal/TupleLiteral.html
api/Crystal/TupleType.html
api/Crystal/Type.html
api/Crystal/Type/DefInMacroLookup.html
api/Crystal/TypedDefProcessor.html
api/Crystal/TypeDeclaration.html
api/Crystal/TypeDeclarationProcessor.html
api/Crystal/TypeDeclarationProcessor/Error.html
api/Crystal/TypeDeclarationProcessor/InitializeInfo.html
api/Crystal/TypeDeclarationProcessor/InstanceVarTypeInfo.html
api/Crystal/TypeDeclarationProcessor/NilableInstanceVar.html
api/Crystal/TypeDeclarationProcessor/TypeDeclarationWithLocation.html
api/Crystal/TypeDeclarationVisitor.html
api/Crystal/TypeDeclarationVisitor/TypeDeclarationWithLocation.html
api/Crystal/TypeDef.html
api/Crystal/TypeDefType.html
api/Crystal/TypeException.html
api/Crystal/TypeFilter.html
api/Crystal/TypeFilteredNode.html
api/Crystal/TypeFilters.html
api/Crystal/TypeGuessVisitor.html
api/Crystal/TypeGuessVisitor/Error.html
api/Crystal/TypeGuessVisitor/InitializeInfo.html
api/Crystal/TypeGuessVisitor/InstanceVarTypeInfo.html
api/Crystal/TypeGuessVisitor/TypeDeclarationWithLocation.html
api/Crystal/TypeGuessVisitor/TypeInfo.html
api/Crystal/TypeNode.html
api/Crystal/TypeOf.html
api/Crystal/TypeParameter.html
api/Crystal/TypeSplat.html
api/Crystal/TypeVar.html
api/Crystal/UnaryExpression.html
api/Crystal/UndefinedMacroMethodError.html
api/Crystal/Underscore.html
api/Crystal/UninitializedVar.html
api/Crystal/Union.html
api/Crystal/UnionType.html
api/Crystal/Unless.html
api/Crystal/Unreachable.html
api/Crystal/Until.html
api/Crystal/Var.html
api/Crystal/VirtualFile.html
api/Crystal/VirtualMetaclassType.html
api/Crystal/VirtualType.html
api/Crystal/VirtualTypeLookup.html
api/Crystal/VirtualTypeLookup/Change.html
api/Crystal/Visibility.html
api/Crystal/VisibilityModifier.html
api/Crystal/Visitor.html
api/Crystal/VoidType.html
api/Crystal/Warnings.html
api/Crystal/When.html
api/Crystal/While.html
api/Crystal/Yield.html
api/Crystal/YieldBlockBinder.html
api/CSV.html
api/CSV/Builder.html
api/CSV/Builder/Quoting.html
api/CSV/Builder/Row.html
api/CSV/Error.html
api/CSV/Lexer.html
api/CSV/MalformedCSVError.html
api/CSV/Parser.html
api/CSV/Row.html
api/CSV/Token.html
api/CSV/Token/Kind.html
api/Deprecated.html
api/Deque.html
api/Digest.html
api/Digest/Adler32.html
api/Digest/ClassMethods.html
api/Digest/CRC32.html
api/Digest/FinalizedError.html
api/Digest/MD5.html
api/Digest/SHA1.html
api/Digest/SHA256.html
api/Digest/SHA512.html
api/Dir.html
api/DivisionByZeroError.html
api/ECR.html
api/Enum.html
api/Enum/ValueConverter.html
api/Enumerable.html
api/Enumerable/Chunk.html
api/Enumerable/Chunk/Alone.html
api/Enumerable/Chunk/Drop.html
api/Enumerable/EmptyError.html
api/ENV.html
api/Errno.html
api/Exception.html
api/Experimental.html
api/Fiber.html
api/File.html
api/File/AccessDeniedError.html
api/File/AlreadyExistsError.html
api/File/BadPatternError.html
api/File/Error.html
api/File/Flags.html
api/File/Info.html
api/File/NotFoundError.html
api/File/Permissions.html
api/File/Type.html
api/FileUtils.html
api/Flags.html
api/Float.html
api/Float/Primitive.html
api/Float32.html
api/Float64.html
api/GC.html
api/GC/ProfStats.html
api/GC/Stats.html
api/Hash.html
api/Hash/Entry.html
api/HTML.html
api/HTTP.html
api/HTTP/Client.html
api/HTTP/Client/BodyType.html
api/HTTP/Client/Response.html
api/HTTP/Client/TLSContext.html
api/HTTP/CompressHandler.html
api/HTTP/Cookie.html
api/HTTP/Cookie/SameSite.html
api/HTTP/Cookies.html
api/HTTP/ErrorHandler.html
api/HTTP/FormData.html
api/HTTP/FormData/Builder.html
api/HTTP/FormData/Error.html
api/HTTP/FormData/FileMetadata.html
api/HTTP/FormData/Parser.html
api/HTTP/FormData/Part.html
api/HTTP/Handler.html
api/HTTP/Handler/HandlerProc.html
api/HTTP/Headers.html
api/HTTP/LogHandler.html
api/HTTP/Params.html
api/HTTP/Request.html
api/HTTP/Server.html
api/HTTP/Server/ClientError.html
api/HTTP/Server/Context.html
api/HTTP/Server/RequestProcessor.html
api/HTTP/Server/Response.html
api/HTTP/StaticFileHandler.html
api/HTTP/StaticFileHandler/DirectoryListing.html
api/HTTP/Status.html
api/HTTP/WebSocket.html
api/HTTP/WebSocket/CloseCode.html
api/HTTP/WebSocketHandler.html
api/index.html
api/Indexable.html
api/IndexError.html
api/INI.html
api/INI/ParseException.html
api/Int.html
api/Int/BinaryPrefixFormat.html
api/Int/Primitive.html
api/Int/Signed.html
api/Int/Unsigned.html
api/Int128.html
api/Int16.html
api/Int32.html
api/Int64.html
api/Int8.html
api/Intrinsics.html
api/InvalidBigDecimalException.html
api/InvalidByteSequenceError.html
api/IO.html
api/IO/Buffered.html
api/IO/ByteFormat.html
api/IO/ByteFormat/BigEndian.html
api/IO/ByteFormat/LittleEndian.html
api/IO/ByteFormat/NetworkEndian.html
api/IO/ByteFormat/SystemEndian.html
api/IO/Delimited.html
api/IO/Digest.html
api/IO/Digest/DigestMode.html
api/IO/EncodingOptions.html
api/IO/EOFError.html
api/IO/Error.html
api/IO/Evented.html
api/IO/FileDescriptor.html
api/IO/Hexdump.html
api/IO/Memory.html
api/IO/MultiWriter.html
api/IO/Seek.html
api/IO/Sized.html
api/IO/Stapled.html
api/IO/TimeoutError.html
api/IPSocket.html
api/Iterable.html
api/Iterator.html
api/Iterator/IteratorWrapper.html
api/Iterator/Stop.html
api/JSON.html
api/JSON/Any.html
api/JSON/Any/Type.html
api/JSON/ArrayConverter.html
api/JSON/Builder.html
api/JSON/Builder/ArrayState.html
api/JSON/Builder/DocumentEndState.html
api/JSON/Builder/DocumentStartState.html
api/JSON/Builder/ObjectState.html
api/JSON/Builder/StartState.html
api/JSON/Builder/State.html
api/JSON/Error.html
api/JSON/Field.html
api/JSON/HashValueConverter.html
api/JSON/Lexer.html
api/JSON/ParseException.html
api/JSON/Parser.html
api/JSON/PullParser.html
api/JSON/PullParser/Kind.html
api/JSON/Serializable.html
api/JSON/Serializable/Options.html
api/JSON/Serializable/Strict.html
api/JSON/Serializable/Unmapped.html
api/JSON/SerializableError.html
api/JSON/Token.html
api/JSON/Token/Kind.html
api/KeyError.html
api/Levenshtein.html
api/Levenshtein/Finder.html
api/Link.html
api/LLVM.html
api/LLVM/ABI.html
api/LLVM/ABI/AArch64.html
api/LLVM/ABI/ArgKind.html
api/LLVM/ABI/ArgType.html
api/LLVM/ABI/ARM.html
api/LLVM/ABI/FunctionType.html
api/LLVM/ABI/X86_64.html
api/LLVM/ABI/X86_64/RegClass.html
api/LLVM/ABI/X86_Win64.html
api/LLVM/ABI/X86.html
api/LLVM/AtomicOrdering.html
api/LLVM/AtomicRMWBinOp.html
api/LLVM/Attribute.html
api/LLVM/AttributeIndex.html
api/LLVM/BasicBlock.html
api/LLVM/BasicBlockCollection.html
api/LLVM/Builder.html
api/LLVM/CallConvention.html
api/LLVM/CodeGenFileType.html
api/LLVM/CodeGenOptLevel.html
api/LLVM/CodeModel.html
api/LLVM/Context.html
api/LLVM/DIBuilder.html
api/LLVM/DIFlags.html
api/LLVM/DwarfTag.html
api/LLVM/DwarfTypeEncoding.html
api/LLVM/Function.html
api/LLVM/FunctionCollection.html
api/LLVM/FunctionPassManager.html
api/LLVM/FunctionPassManager/Runner.html
api/LLVM/GenericValue.html
api/LLVM/GlobalCollection.html
api/LLVM/InstructionCollection.html
api/LLVM/IntPredicate.html
api/LLVM/JITCompiler.html
api/LLVM/Linkage.html
api/LLVM/MemoryBuffer.html
api/LLVM/Metadata.html
api/LLVM/Metadata/Type.html
api/LLVM/Module.html
api/LLVM/ModuleFlag.html
api/LLVM/ModulePassManager.html
api/LLVM/OperandBundleDef.html
api/LLVM/ParameterCollection.html
api/LLVM/PassManagerBuilder.html
api/LLVM/PassRegistry.html
api/LLVM/PhiTable.html
api/LLVM/RealPredicate.html
api/LLVM/RelocMode.html
api/LLVM/Target.html
api/LLVM/TargetData.html
api/LLVM/TargetMachine.html
api/LLVM/Type.html
api/LLVM/Type/Kind.html
api/LLVM/Value.html
api/LLVM/Value/Kind.html
api/LLVM/ValueMethods.html
api/LLVM/VerifierFailureAction.html
api/Log.html
api/Log/AsyncDispatcher.html
api/Log/Backend.html
api/Log/BroadcastBackend.html
api/Log/Builder.html
api/Log/Configuration.html
api/Log/Context.html
api/Log/DirectDispatcher.html
api/Log/Dispatcher.html
api/Log/Dispatcher/Spec.html
api/Log/DispatchMode.html
api/Log/Emitter.html
api/Log/EntriesChecker.html
api/Log/Entry.html
api/Log/Formatter.html
api/Log/IOBackend.html
api/Log/MemoryBackend.html
api/Log/Metadata.html
api/Log/Metadata/Entry.html
api/Log/Metadata/Value.html
api/Log/Metadata/Value/Type.html
api/Log/Severity.html
api/Log/ShortFormat.html
api/Log/StaticFormatter.html
api/Log/SyncDispatcher.html
api/Math.html
api/MIME.html
api/MIME/Error.html
api/MIME/MediaType.html
api/MIME/Multipart.html
api/MIME/Multipart/Builder.html
api/MIME/Multipart/Error.html
api/MIME/Multipart/Parser.html
api/Mutex.html
api/Mutex/Protection.html
api/NamedTuple.html
api/Nil.html
api/NilAssertionError.html
api/NotImplementedError.html
api/Number.html
api/Number/Primitive.html
api/Number/RoundingMode.html
api/OAuth.html
api/OAuth/AccessToken.html
api/OAuth/Consumer.html
api/OAuth/Error.html
api/OAuth/RequestToken.html
api/OAuth2.html
api/OAuth2/AccessToken.html
api/OAuth2/AccessToken/Bearer.html
api/OAuth2/AccessToken/Mac.html
api/OAuth2/AuthScheme.html
api/OAuth2/Client.html
api/OAuth2/Error.html
api/OAuth2/Session.html
api/Object.html
api/OpenSSL.html
api/OpenSSL/Algorithm.html
api/OpenSSL/Cipher.html
api/OpenSSL/Cipher/Error.html
api/OpenSSL/Digest.html
api/OpenSSL/Digest/Error.html
api/OpenSSL/Digest/UnsupportedError.html
api/OpenSSL/Error.html
api/OpenSSL/HMAC.html
api/OpenSSL/MD5.html
api/OpenSSL/PKCS5.html
api/OpenSSL/SHA1.html
api/OpenSSL/SSL.html
api/OpenSSL/SSL/Context.html
api/OpenSSL/SSL/Context/Client.html
api/OpenSSL/SSL/Context/Server.html
api/OpenSSL/SSL/Error.html
api/OpenSSL/SSL/ErrorType.html
api/OpenSSL/SSL/Modes.html
api/OpenSSL/SSL/Options.html
api/OpenSSL/SSL/Server.html
api/OpenSSL/SSL/Socket.html
api/OpenSSL/SSL/Socket/Client.html
api/OpenSSL/SSL/Socket/Server.html
api/OpenSSL/SSL/VerifyMode.html
api/OpenSSL/SSL/X509VerifyFlags.html
api/OptionParser.html
api/OptionParser/Exception.html
api/OptionParser/InvalidOption.html
api/OptionParser/MissingOption.html
api/OverflowError.html
api/Path.html
api/Path/Error.html
api/Path/Kind.html
api/Pointer.html
api/Pointer/Appender.html
api/PrettyPrint.html
api/Proc.html
api/Process.html
api/Process/Env.html
api/Process/ExecStdio.html
api/Process/Redirect.html
api/Process/Status.html
api/Process/Stdio.html
api/Process/Tms.html
api/Random.html
api/Random/ISAAC.html
api/Random/PCG32.html
api/Random/Secure.html
api/Range.html
api/Reference.html
api/Regex.html
api/Regex/MatchData.html
api/Regex/Options.html
api/RuntimeError.html
api/SemanticVersion.html
api/SemanticVersion/Prerelease.html
api/Set.html
api/Signal.html
api/Slice.html
api/Socket.html
api/Socket/Address.html
api/Socket/Addrinfo.html
api/Socket/Addrinfo/Error.html
api/Socket/BindError.html
api/Socket/ConnectError.html
api/Socket/Error.html
api/Socket/Family.html
api/Socket/FamilyT.html
api/Socket/IPAddress.html
api/Socket/Protocol.html
api/Socket/Server.html
api/Socket/Type.html
api/Socket/UNIXAddress.html
api/Spec.html
api/Spec/Context.html
api/Spec/Example.html
api/Spec/Example/Procsy.html
api/Spec/ExampleGroup.html
api/Spec/ExampleGroup/Procsy.html
api/Spec/Expectations.html
api/Spec/Item.html
api/Spec/Methods.html
api/Spec/ObjectExtensions.html
api/Spec/SplitFilter.html
api/StaticArray.html
api/Steppable.html
api/Steppable/StepIterator.html
api/String.html
api/String/Builder.html
api/String/RawConverter.html
api/StringPool.html
api/StringScanner.html
api/Struct.html
api/Symbol.html
api/System.html
api/System/Group.html
api/System/Group/NotFoundError.html
api/System/User.html
api/System/User/NotFoundError.html
api/SystemError.html
api/SystemError/ClassMethods.html
api/TCPServer.html
api/TCPSocket.html
api/Termios.html
api/Termios/AttributeSelection.html
api/Termios/BaudRate.html
api/Termios/ControlMode.html
api/Termios/InputMode.html
api/Termios/LineControl.html
api/Termios/LocalMode.html
api/Termios/OutputMode.html
api/Time.html
api/Time/DayOfWeek.html
api/Time/EpochConverter.html
api/Time/EpochMillisConverter.html
api/Time/FloatingTimeConversionError.html
api/Time/Format.html
api/Time/Format/Error.html
api/Time/Format/HTTP_DATE.html
api/Time/Format/ISO_8601_DATE_TIME.html
api/Time/Format/ISO_8601_DATE.html
api/Time/Format/ISO_8601_TIME.html
api/Time/Format/RFC_2822.html
api/Time/Format/RFC_3339.html
api/Time/Format/YAML_DATE.html
api/Time/Location.html
api/Time/Location/InvalidLocationNameError.html
api/Time/Location/InvalidTimezoneOffsetError.html
api/Time/Location/InvalidTZDataError.html
api/Time/Location/Zone.html
api/Time/MonthSpan.html
api/Time/Span.html
api/Tuple.html
api/TypeCastError.html
api/UDPSocket.html
api/UInt128.html
api/UInt16.html
api/UInt32.html
api/UInt64.html
api/UInt8.html
api/Unicode.html
api/Unicode/CaseOptions.html
api/Union.html
api/UNIXServer.html
api/UNIXSocket.html
api/URI.html
api/URI/Error.html
api/URI/Params.html
api/URI/Params/Builder.html
api/URI/Punycode.html
api/UUID.html
api/UUID/Error.html
api/UUID/Variant.html
api/UUID/Version.html
api/VaList.html
api/Value.html
api/WeakRef.html
""".splitlines()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment