# Where is the "?" being served from?

**URL:** <https://discourse.julialang.org/t/where-is-the-being-served-from/17178>\
**Category:** Internals & Design\
**Tags:** help-database\
**Created:** [November 5, 2018, 4:35pm UTC](https://discourse.julialang.org/t/where-is-the-being-served-from/17178 "2018-11-05T16:35:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 5, 2018, 4:35pm UTC](https://discourse.julialang.org/t/where-is-the-being-served-from/17178/1 "2018-11-05T16:35:43Z")

</div>

When we type “?”, where is the help being served from? Is there a big file somewhere with this information?  
I’ve tried searching the .julia folder (for instance `length(collection)`), but curiously there are no hits.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 5, 2018, 4:49pm UTC](https://discourse.julialang.org/t/where-is-the-being-served-from/17178/2 "2018-11-05T16:49:19Z")

</div>

Okay, if ASCII search cannot find it, then it is probably baked into the compiled files, isn’t it?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [November 5, 2018, 4:53pm UTC](https://discourse.julialang.org/t/where-is-the-being-served-from/17178/3 "2018-11-05T16:53:08Z")

</div>

Depends what you mean with “served”. Docstrings are attached to objects with

```julia
"""
string
"""
object

```

and the docstring for `length` is defined at [julia/abstractarray.jl at 636f5ad21ff3fa2ff55bbd2f602355d3932c2d5b · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/blob/636f5ad21ff3fa2ff55bbd2f602355d3932c2d5b/base/abstractarray.jl#L124-L143).

These get parsed into Markdown and stored.

If you want to follow the thread you can do

```julia
julia> @macroexpand @doc +
:((Base.Docs.doc)((Base.Docs.Binding)(Main, :+)))

julia> @which (Base.Docs.doc)((Base.Docs.Binding)(Main, :+))
doc(binding::Base.Docs.Binding) in REPL at stdlib/v1.0/REPL/src/docview.jl:85

```

But where they are ultimately stored is in the sysimage (with everything else).

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [November 5, 2018, 4:56pm UTC](https://discourse.julialang.org/t/where-is-the-being-served-from/17178/4 "2018-11-05T16:56:57Z")

</div>

> [@kristoffer.carlsson](#):
>
> ultimately stored is in the sysimage

Just to go one level deeper, it’s stored in a hidden dictionary within each module that has docstrings:

````julia
julia> getfield(Base, Docs.META)
IdDict{Any,Any} with 729 entries:
  Base.parentmodule => MultiDoc(Type[Tuple{Module}, Tuple{DataType}, Tuple{Function}, Tuple{Any,Any}], IdDict{Any,Any}(Tuple{Any,Any}=>DocStr(svec(" parentmodule(f::Function, types) ->…
  Base.strip => MultiDoc(Type[Tuple{AbstractString}], IdDict{Any,Any}(Tuple{AbstractString}=>DocStr(svec(" strip(str::AbstractString, [chars])\n\nRemove leading and trailing cha…
  Base. __precompile__ => MultiDoc(Type[Union{Tuple{}, Tuple{Bool}}], IdDict{Any,Any}(Union{Tuple{}, Tuple{Bool}}=>DocStr(svec(" __precompile__ (isprecompilable::Bool)\n\nSpecify whether t…
  Base.bswap => MultiDoc(Type[Tuple{Union{Int8, UInt8}}], IdDict{Any,Any}(Tuple{Union{Int8, UInt8}}=>DocStr(svec(" bswap(n)\n\nReverse the byte order of `n`.\n\n# Examples\n```j…
  Base.any! => MultiDoc(Type[Tuple{Any,Any}], IdDict{Any,Any}(Tuple{Any,Any}=>DocStr(svec(" any!(r, A)\n\nTest whether any values in `A` along the singleton dimensions of `r` a…
  ⋮ => ⋮

julia> getfield(Base, Docs.META)[Docs.Binding(Base, :length)]
Base.Docs.MultiDoc(Type[Union{}, Tuple{AbstractArray}, Tuple{AbstractString}], IdDict{Any,Any}(Union{}=>DocStr(svec(" length(collection) -> Integer\n\nReturn the number of elements in the collection.\n\nUse [`lastindex`](@ref) to get the last valid index of an indexable collection.\n\n# Examples\n```jldoctest\njulia> length(1:5)\n5\n\njulia> length([1, 2, 3, 4])\n4\n\njulia> length([1 2; 3 4])\n4\n```\n"), ```
length(collection) -> Integer

````

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 5, 2018, 5:05pm UTC](https://discourse.julialang.org/t/where-is-the-being-served-from/17178/5 "2018-11-05T17:05:29Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![swissr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swissr/32/208_2.png) [@swissr](https://discourse.julialang.org/u/swissr)\
**Post date:** [November 5, 2018, 8:36pm UTC](https://discourse.julialang.org/t/where-is-the-being-served-from/17178/7 "2018-11-05T20:36:02Z")

</div>

> [@PetrKryslUCSD](#):
>
> it is probably baked into the compiled files

Just checked this out for a (likely unique) name in the Statistics.quantile help using `ripgrep` (`rg`), a tool which I only know since very short time. Incredibly fast!

```julia
$ rg -al Hyndman /Applications/Julia-1.0.app/
/Applications/Julia-1.0.app/Contents/Resources/julia/share/julia/base.cache
/Applications/Julia-1.0.app/Contents/Resources/julia/lib/julia/sys.dylib
/Applications/Julia-1.0.app/Contents/Resources/julia/share/doc/julia/html/en/search_index.js
/Applications/Julia-1.0.app/Contents/Resources/julia/share/doc/julia/html/en/stdlib/Statistics.html
/Applications/Julia-1.0.app/Contents/Resources/julia/share/julia/stdlib/v1.0/Statistics/src/Statistics.jl

```
