Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Commit

Permalink
solve compat issue
Browse files Browse the repository at this point in the history
  • Loading branch information
udohjeremiah committed Mar 13, 2023
1 parent 0e139dc commit a075e08
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[compat]
julia = "1"
AbstractTrees = "0"
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ Julia's versatile REPL. Instead of searching online or asking basic Julia questi
elsewhere, beginners can use the rich-feature REPL to learn.

Second, it aims to solve the problem of accessing methods in Julia using the "dot" syntax,
which can be frustrating for new users. In many OOP languages, users can easily see and
learn new methods to call on an object by using the "dot" syntax in their editor, as shown
in this example below:
which can be frustrating for new users. In many [OOP languages](https://en.wikipedia.org/wiki/Object-oriented_programming),
users can easily see and learn new methods to call on an object by using the "dot" syntax in
their editor, as shown in this example below:

![Python example](https://github.com/udohjeremiah/REPLference.jl/blob/master/assets/python_example.png)

However, in Julia, this isn't possible because `a.x` refers to the property `x` bundled with
`a`, not the method `x` bundled with `a` (methods are not bundled with objects in Julia). So
when users type a.<tab> in the REPL, it will return the properties defined in `a`, as shown
in this example below:
when users type `a.<tab>` in the REPL, it will return the properties defined in `a`, as
shown in this example below:

![Julia example](https://github.com/udohjeremiah/REPLference.jl/blob/master/assets/julia_example.png)

Expand Down Expand Up @@ -91,7 +91,7 @@ This package provides three functions, and their usage is explained below.
### `man`
You can think of `man` as a function that returns the manual for a topic or object in Julia.

To see the `man`ual for an object, pass the object to `man`:
To see the manual for an object, pass the object to `man`:

```julia
julia> a = 'J'
Expand All @@ -113,7 +113,7 @@ julia> man(a)
'\ud7ff': Unicode U+D7FF (category Cn: Other, not assigned)
```

If you're interested in seeing the `man`ual for a topic, simply pass the topic as a
If you're interested in seeing the manual for a topic, simply pass the topic as a
`Symbol`, e.g., `man(:characters)`. If an invalid topic is entered, nothing is printed to
the screen.

Expand Down Expand Up @@ -141,7 +141,7 @@ Operators
```

You can pass a keyword argument named `extmod::Bool` to the function. The default value for
extmod is `false`. If extmod is `true`, `fun` prints methods that can be called on the
`extmod` is `false`. If `extmod` is `true`, `fun` prints methods that can be called on the
object, as well as methods from modules in the standard library that can be loaded with
`using` or `import`:

Expand All @@ -162,10 +162,14 @@ Printf.@sprintf Printf.PositionCounterˣ Unicode.isassignedˣ
Printf.Formatˣ Printf.Specˣ Unicode.julia_chartransformˣ
```

If you're interested in seeing the `func`tions for a topic, simply pass the topic as a
If you're interested in seeing the functions for a topic, simply pass the topic as a
`Symbol`, e.g., `fun(:characters)`. If an invalid topic is entered, nothing is printed to
the screen.

Names suffixed with `ˣ` are unexported. In cases where they are not qualified with a module,
they need to be qualified with either `Base`, `Core`, or `InteractiveUtils` for the name to
be available.

### `subtree`
This function prints the subtypes of an object `T` in a tree format. `T` must be a `Type`;
otherwise, an error is thrown.
Expand Down

0 comments on commit a075e08

Please sign in to comment.