Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Last active February 12, 2025 11:57
Show Gist options
  • Save sogaiu/a02d074732a7ae7c9472c00cbc3073b6 to your computer and use it in GitHub Desktop.
Save sogaiu/a02d074732a7ae7c9472c00cbc3073b6 to your computer and use it in GitHub Desktop.
scribble indexing notes

2025-02-12

problem

not all items listed in the "table" here result in successful searches. one example item that does not yield any search results is: #fl(

exploration

background

it appears that the way the search works in the browser involves this file.

within, there is plt_search_data, which appears to be a lookup table:

var plt_search_data = [
["",">russian-lang/index.html#%28form._%28%28lib._1%2Fall-base..rkt%29._%29%29",[0,[1,"||"]],["1/all-base"],"russian-lang",0,["Racket"],false,false],
["",">algebraic/prelude.html#%28def._%28%28lib._algebraic%2Fprelude..rkt%29._%29%29",[0,[2,"||"]],["algebraic/prelude"],"algebraic",0,["Racket"],false,false],
// ...
["\U0010FFF4\u5316\u53e5",">ming/string.html#%28def._%28%28lib._ming%2Fracket%2Fbase..rkt%29._~f4~8f~bf~b4~e5~8c~96~e5~8f~a5%29%29",[0,[2,"􏿴化句"]],["ming/racket/base"],"ming",0,["Racket"],false,false],
["\U0010FFF4\u5316\U0010FEFF",">ming/vector.html#%28def._%28%28lib._ming%2Fracket%2Fbase..rkt%29._~f4~8f~bf~b4~e5~8c~96~f4~8f~bb~bf%29%29",[0,[2,"􏿴化􏻿"]],["ming/racket/base"],"ming",0,["Racket"],false,false]
];

it seems that each item in plt_search_data is an array where the first element is something that can be searched for. for example, #' can be searched for because there are items in plt_search_data that look like:

["#'",">rhombus-reference/Symbols.html#%28def._%28%28submod._%28lib._rhombus%2Fprivate%2Famalgam..rkt%29._core%29._~23%27._rhombus%2Fbind%29%29",[[0,[3,"#'"]]," binding operator"],["rhombus"],"rhombus",5,["Rhombus"],[[4,"rhombus"]],["rhombus"]],
["#'",">rhombus-reference/Symbols.html#%28def._%28%28submod._%28lib._rhombus%2Fprivate%2Famalgam..rkt%29._core%29._~23%27._rhombus%2Frepet%29%29",[[0,[3,"#'"]]," repetition"],["rhombus"],"rhombus",7,["Rhombus"],[[4,"rhombus"]],["rhombus"]],
["#'",">rhombus-reference/Symbols.html#%28def._%28%28submod._%28lib._rhombus%2Fprivate%2Famalgam..rkt%29._core%29._~23%27%29%29",[[0,[3,"#'"]]," expression"],["rhombus"],"rhombus",1,["Rhombus"],[[4,"rhombus"]],["rhombus"]],
["#'",">shplait/sec_builtin.html#%28def._%28%28lib._shplait%2Fmain..rhm%29._~23%27%29%29",[[0,[3,"#'"]]," expression"],["shplait"],"shplait",1,["Rhombus"],[[4,"shplait"]],["shplait"]],
["#'",">reference/reader.html#%28idx._%28gentag._62._%28lib._scribblings%2Freference%2Freference..scrbl%29%29%29",[5,[[6,""],[7,"#'"],[6,""]]],false,"racket-doc",0,["Racket"],false,false],

the second element in each array appears to be a string that gets used to produce a link in the search results for the item in question.

according to its first line, plt-index.js appears to be generated:

// Autogenerated by <pkgs>/racket-index/scribblings/main/private/make-search.rkt

experiments

the following items yielded useful search results:

  • ( - @as-index{@litchar{(}}
  • [ - @as-index{@litchar{[}}
  • { - @as-index{@litchar["{"]}
  • ) - @as-index{@litchar{)}}
  • ] - @as-index{@litchar{]}}
  • } - @as-index{@litchar["}"]}
  • " - @as-index{@litchar{"}}
  • ' - @as-index{@litchar{'}}
  • ` - @as-index{@litchar{`}}
  • , - @as-index{@litchar{,}}
  • ; - @as-index{@litchar{;}}
  • #T - @as-index{@litchar{#T}}
  • #t - @as-index{@litchar{#t}}
  • #true - @as-index{@litchar{#true}}
  • #F - @as-index{@litchar{#F}}
  • #f - @as-index{@litchar{#f}}
  • #false - @as-index{@litchar{#false}}
  • #\ - @as-index{@litchar{#\}}
  • #" - @as-index{@litchar{#"}}
  • #% - @as-index{@litchar{#%}}
  • #: - @as-index{@litchar{#:}}
  • #& - @as-index{@litchar{#&}}
  • #| - @as-index{@litchar{#|}}
  • #; - @as-index{@litchar{#;}}
  • #' - @as-index{@litchar{#'}}
  • #! - @as-index{@litchar{#! }}
  • #!/ - @as-index{@litchar{#!/}}
  • #! - @as-index{@litchar{#!}}
  • #` - @as-index{@litchar{#`}}
  • #, - @as-index{@litchar{#,}}
  • #i - @as-index{@litchar{#i}}
  • #e - @as-index{@litchar{#e}}
  • #x - @as-index{@litchar{#x}}
  • #o - @as-index{@litchar{#o}}
  • #d - @as-index{@litchar{#d}}
  • #b - @as-index{@litchar{#b}}
  • #<< - @as-index{@litchar{#<<}}
  • #rx - @as-index{@litchar{#rx}}
  • #px - @as-index{@litchar{#px}}
  • #ci - @as-index{@litchar{#ci}}
  • #cs - @as-index{@litchar{#cs}}
  • #hash - @as-index{@litchar{#hash}}
  • #reader - @as-index{@litchar{#reader}}
  • #lang - @as-index{@litchar{#lang}}
  • #0= - achieved via @section-index["#0="], but not anything with a higher number
  • #0# - achieved via @section-index["#0#"], but not anything with a higher number

the following items don't yield useful search results:

  • #(
  • #[
  • #{
  • #fl(
  • #Fl(
  • #fl[
  • #Fx[
  • #fx{
  • #Fx{
  • #s(
  • #s[
  • #s{
  • #~ - printer.scrbl
  • #I - no exact search result, though #i shows up
  • #E - no exact search result, though #e shows up
  • #X - no exact search result, though #x shows up
  • #O - no exact search result, though #o shows up
  • #D - no exact search result, though #d shows up
  • #B - no exact search result, though #b shows up
  • #cI - no exact search result, though #ci shows up
  • #Ci - no exact search result, though #ci shows up
  • #CI - no exact search result, though #ci shows up
  • #cS - no exact search result, though #cs shows up
  • #Cs - no exact search result, though #cs shows up
  • #CS - no exact search result, though #cs shows up
  • #[0-9]+(
  • #[0-9]+[
  • #[0-9]+{
  • #fl[0-9]+(
  • #fl[0-9]+[
  • #fl[0-9]+{
  • #Fl[0-9]+(
  • #Fl[0-9]+[
  • #Fl[0-9]+{
  • #fx[0-9]+(
  • #fx[0-9]+[
  • #fx[0-9]+{
  • #Fx[0-9]+(
  • #Fx[0-9]+[
  • #Fx[0-9]+{
  • #[1-9]{1,8}= - how to search for this? not needed because #0= can be found?
  • #[1-9]{1,8}# - how to search for this? not needed because #0# can be found?

All letters in a number representation are parsed case-insensitively, independent of the read-case-sensitive parameter. For example, #I#D+InF.F+3I is parsed the same as #i#d+inf.f+3i.

via: https://docs.racket-lang.org/reference/reader.html#(part._parse-number)

missing from table?

#hashalw, #hasheq, #hasheqv don't appear in the list in this section.

  • ,@ - @as-index{@litchar[",@"]}
  • #,@ - @as-index{@litchar["#,@"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment