From 6a049d1f6b2d128ed98d754e5703f99bde04216d Mon Sep 17 00:00:00 2001 From: Zhuoqian Zhou Date: Sun, 18 Feb 2024 14:58:32 +0800 Subject: [PATCH 1/2] docs: fix typos --- doc/src/devdocs/build/build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/devdocs/build/build.md b/doc/src/devdocs/build/build.md index 52d9482805b9a..e8092df493df7 100644 --- a/doc/src/devdocs/build/build.md +++ b/doc/src/devdocs/build/build.md @@ -269,7 +269,7 @@ DEPS_GIT = llvm # LLVM_GIT_URL = ... #Name of the alternate branch to clone from git # LLVM_BRANCH = julia-16.0.6-0 -#SHA hash of the alterate commit to check out automatically +#SHA hash of the alternate commit to check out automatically # LLVM_SHA1 = $(LLVM_BRANCH) #List of LLVM targets to build. It is strongly recommended to keep at least all the #default targets listed in `deps/llvm.mk`, even if you don't necessarily need all of them. From 363930ea3935a53ea598d500f916eb04c27a3232 Mon Sep 17 00:00:00 2001 From: Zhuoqian Zhou Date: Sun, 18 Feb 2024 15:07:09 +0800 Subject: [PATCH 2/2] docs: fix typos --- stdlib/Random/docs/src/index.md | 4 ++-- stdlib/Random/src/generation.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/Random/docs/src/index.md b/stdlib/Random/docs/src/index.md index c8451a3fe21fa..96320ee216198 100644 --- a/stdlib/Random/docs/src/index.md +++ b/stdlib/Random/docs/src/index.md @@ -94,7 +94,7 @@ There are two mostly orthogonal ways to extend `Random` functionalities: The API for 1) is quite functional, but is relatively recent so it may still have to evolve in subsequent releases of the `Random` module. For example, it's typically sufficient to implement one `rand` method in order to have all other usual methods work automatically. -The API for 2) is still rudimentary, and may require more work than strictly necessary from the implementor, +The API for 2) is still rudimentary, and may require more work than strictly necessary from the implementer, in order to support usual types of generated values. ### Generating random values of custom types @@ -103,7 +103,7 @@ Generating random values for some distributions may involve various trade-offs. The `Random` module defines a customizable framework for obtaining random values that can address these issues. Each invocation of `rand` generates a *sampler* which can be customized with the above trade-offs in mind, by adding methods to `Sampler`, which in turn can dispatch on the random number generator, the object that characterizes the distribution, and a suggestion for the number of repetitions. Currently, for the latter, `Val{1}` (for a single sample) and `Val{Inf}` (for an arbitrary number) are used, with `Random.Repetition` an alias for both. -The object returned by `Sampler` is then used to generate the random values. When implementing the random generation interface for a value `X` that can be sampled from, the implementor should define the method +The object returned by `Sampler` is then used to generate the random values. When implementing the random generation interface for a value `X` that can be sampled from, the implementer should define the method ```julia rand(rng, sampler) diff --git a/stdlib/Random/src/generation.jl b/stdlib/Random/src/generation.jl index 23d53799a40ee..d8bb48d2764d2 100644 --- a/stdlib/Random/src/generation.jl +++ b/stdlib/Random/src/generation.jl @@ -19,7 +19,7 @@ Sampler(::Type{RNG}, ::Type{T}, n::Repetition) where {RNG<:AbstractRNG,T<:AbstractFloat} = Sampler(RNG, CloseOpen01(T), n) -# generic random generation function which can be used by RNG implementors +# generic random generation function which can be used by RNG implementers # it is not defined as a fallback rand method as this could create ambiguities rand(r::AbstractRNG, ::SamplerTrivial{CloseOpen01{Float16}}) = @@ -130,7 +130,7 @@ rand(r::AbstractRNG, sp::SamplerTrivial{<:UniformBits{T}}) where {T} = #### BitInteger -# rand_generic methods are intended to help RNG implementors with common operations +# rand_generic methods are intended to help RNG implementers with common operations # we don't call them simply `rand` as this can easily contribute to create # ambiguities with user-side methods (forcing the user to resort to @eval)