Skip to content

Commit 9d329d7

Browse files
committed
Use :atom syntax to link erlang modules
1 parent 0c1ba32 commit 9d329d7

File tree

13 files changed

+20
-21
lines changed

13 files changed

+20
-21
lines changed

lib/elixir/lib/map_set.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ defmodule MapSet do
4343
`MapSet`s can also be constructed starting from other collection-type data
4444
structures: for example, see `MapSet.new/1` or `Enum.into/2`.
4545
46-
`MapSet` is built on top of Erlang's
47-
[`:sets`](https://www.erlang.org/doc/man/sets.html) (version 2). This means
46+
`MapSet` is built on top of Erlang's [`:sets`](`:sets`) (version 2). This means
4847
that they share many properties, including logarithmic time complexity. Erlang
4948
`:sets` (version 2) are implemented on top of maps, so see the documentation
5049
for `Map` for more information on its execution time complexity.

lib/elixir/pages/anti-patterns/process-anti-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ This anti-pattern has many potential remedies:
227227

228228
* If the only process that needs data is the one you are sending to, consider making the process fetch that data instead of passing it.
229229

230-
* Some abstractions, such as [`:persistent_term`](https://www.erlang.org/doc/man/persistent_term.html), allows you to share data between processes, as long as such data changes infrequently.
230+
* Some abstractions, such as [`:persistent_term`](`:persistent_term`), allows you to share data between processes, as long as such data changes infrequently.
231231

232232
In our case, limiting the input data is a reasonable strategy. If all we need *right now* is the IP address, then let's only work with that and make sure we're only passing the IP address into the closure, like so:
233233

lib/elixir/pages/getting-started/debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ Finally, remember you can also get a mini-overview of the runtime info by callin
175175
176176
We have just scratched the surface of what the Erlang VM has to offer, for example:
177177
178-
* Alongside the observer application, Erlang also includes a [`:crashdump_viewer`](https://www.erlang.org/doc/man/crashdump_viewer.html) to view crash dumps
178+
* Alongside the observer application, Erlang also includes a [`:crashdump_viewer`](`:crashdump_viewer`) to view crash dumps
179179
180180
* Integration with OS level tracers, such as [Linux Trace Toolkit,](https://www.erlang.org/doc/apps/runtime_tools/lttng) [DTRACE,](https://www.erlang.org/doc/apps/runtime_tools/dtrace) and [SystemTap](https://www.erlang.org/doc/apps/runtime_tools/systemtap)
181181
182-
* [Microstate accounting](http://www.erlang.org/doc/man/msacc.html) measures how much time the runtime spends in several low-level tasks in a short time interval
182+
* [Microstate accounting](`:msacc`) measures how much time the runtime spends in several low-level tasks in a short time interval
183183
184184
* Mix ships with many tasks under the `profile` namespace, such as `mix profile.cprof` and `mix profile.fprof`
185185

lib/elixir/pages/mix-and-otp/agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ If you have skipped the *Getting Started* guide or read it long ago, be sure to
99
Elixir is an immutable language where nothing is shared by default. If we want to share information, which can be read and modified from multiple places, we have two main options in Elixir:
1010

1111
* Using processes and message passing
12-
* [ETS (Erlang Term Storage)](http://www.erlang.org/doc/man/ets.html)
12+
* [ETS (Erlang Term Storage)](`:ets`)
1313

1414
We covered processes in the *Getting Started* guide. ETS (Erlang Term Storage) is a new topic that we will explore in later chapters. When it comes to processes though, we rarely hand-roll our own, instead we use the abstractions available in Elixir and OTP:
1515

lib/elixir/pages/mix-and-otp/distributed-tasks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ From our quick exploration, we could conclude that we should use `Node.spawn_lin
8686

8787
There are three better alternatives to `Node.spawn_link/2` that we could use in our implementation:
8888

89-
1. We could use Erlang's [:erpc](http://www.erlang.org/doc/man/erpc.html) module to execute functions on a remote node. Inside the `bar@computer-name` shell above, you can call `:erpc.call(:"foo@computer-name", Hello, :world, [])` and it will print "hello world"
89+
1. We could use Erlang's [`:erpc`](`:erpc`) module to execute functions on a remote node. Inside the `bar@computer-name` shell above, you can call `:erpc.call(:"foo@computer-name", Hello, :world, [])` and it will print "hello world"
9090

9191
2. We could have a server running on the other node and send requests to that node via the `GenServer` API. For example, you can call a server on a remote node by using `GenServer.call({name, node}, arg)` or passing the remote process PID as the first argument
9292

@@ -347,8 +347,8 @@ Distributed key-value stores, used in real-life, need to consider the fact nodes
347347
These topics can be daunting at first but remember that most Elixir frameworks abstract those concerns for you. For example, when using [the Phoenix web framework](https://phoenixframework.org), its plug-and-play abstractions take care of sending messages and tracking how users join and leave a cluster. However, if you are interested in distributed systems after all, there is much to explore. Here are some additional references:
348348

349349
* [The excellent Distribunomicon chapter from Learn You Some Erlang](http://learnyousomeerlang.com/distribunomicon)
350-
* [Erlang's global module](https://www.erlang.org/doc/man/global.html), which can provide global names and global locks, allowing unique names and unique locks in a whole cluster of machines
351-
* [Erlang's pg module](https://www.erlang.org/doc/man/pg.html), which allows process to join different groups shared across the whole cluster
350+
* Erlang's [`:global` module](`:global`), which can provide global names and global locks, allowing unique names and unique locks in a whole cluster of machines
351+
* Erlang's [`:pg` module](`:pg`), which allows process to join different groups shared across the whole cluster
352352
* [Phoenix PubSub project](https://github.com/phoenixframework/phoenix_pubsub), which provides a distributed messaging system and a distributed presence system for tracking users and processes in a cluster
353353

354354
You will also find many libraries for building distributed systems within the overall Erlang ecosystem. For now, it is time to go back to our simple distributed key-value store and learn how to configure and package it for production.

lib/elixir/pages/mix-and-otp/erlang-term-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ In this chapter, we will learn about ETS (Erlang Term Storage) and how to use it
88
99
## ETS as a cache
1010

11-
ETS allows us to store any Elixir term in an in-memory table. Working with ETS tables is done via [Erlang's `:ets` module](http://www.erlang.org/doc/man/ets.html):
11+
ETS allows us to store any Elixir term in an in-memory table. Working with ETS tables is done via [Erlang's `:ets` module](`:ets`):
1212

1313
```elixir
1414
iex> table = :ets.new(:buckets_registry, [:set, :protected])

lib/elixir/pages/mix-and-otp/task-and-gen-tcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Task and gen_tcp
22

3-
In this chapter, we are going to learn how to use [Erlang's `:gen_tcp` module](http://www.erlang.org/doc/man/gen_tcp.html) to serve requests. This provides a great opportunity to explore Elixir's `Task` module. In future chapters, we will expand our server so that it can actually serve the commands.
3+
In this chapter, we are going to learn how to use Erlang's [`:gen_tcp` module](`:gen_tcp`) to serve requests. This provides a great opportunity to explore Elixir's `Task` module. In future chapters, we will expand our server so that it can actually serve the commands.
44

55
## Echo server
66

lib/ex_unit/lib/ex_unit.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defmodule ExUnit do
1414
# 2) Create a new test module and use "ExUnit.Case".
1515
defmodule AssertionTest do
1616
# 3) Note that we pass "async: true", this runs the tests in the
17-
# test module concurrently with other test modules. The
17+
# test module concurrently with other test modules. The
1818
# individual tests within each test module are still run serially.
1919
use ExUnit.Case, async: true
2020
@@ -311,7 +311,7 @@ defmodule ExUnit do
311311
312312
* `:rand_algorithm` - algorithm to be used when generating the test seed.
313313
Available algorithms can be found in Erlang's
314-
[`:rand`](https://www.erlang.org/doc/man/rand.html) documentation (see
314+
[`:rand`](`:rand`) documentation (see
315315
[`:rand.builting_arg/0`](https://www.erlang.org/doc/apps/stdlib/rand.html#t:builtin_alg/0)).
316316
Available since v1.16.0. Before v1.16.0, the algorithm was hard-coded to
317317
`:exs1024`. On Elixir v1.16.0 and after, the default changed to `:exsss`;

lib/mix/lib/mix/tasks/profile.eprof.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ defmodule Mix.Tasks.Profile.Eprof do
8282
## Caveats
8383
8484
You should be aware that the code being profiled is running in an anonymous
85-
function which is invoked by [`:eprof` module](https://www.erlang.org/doc/man/eprof.html).
85+
function which is invoked by [`:eprof` module](`:eprof`).
8686
Thus, you'll see some additional entries in your profile output. It is also
8787
important to note that the profiler is stopped as soon as the code has finished running,
8888
and this may need special attention, when: running asynchronous code as function calls which were

lib/mix/lib/mix/tasks/profile.fprof.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ defmodule Mix.Tasks.Profile.Fprof do
9393
## Caveats
9494
9595
You should be aware that the code being profiled is running in an anonymous
96-
function which is invoked by [`:fprof` module](https://www.erlang.org/doc/man/fprof.html).
96+
function which is invoked by [`:fprof` module](`:fprof`).
9797
Thus, you'll see some additional entries in your profile output,
9898
such as `:fprof` calls, an anonymous
9999
function with high ACC time, or an `:undefined` function which represents

0 commit comments

Comments
 (0)