Test for existence of a variable

Did you try clicking on the “Edit on Github” link at the top of the page you would like to contribute to?

After that, these instructions should be understandable and easy to follow:

You need to be signed in with a Github account - otherwise the “pencil” button won’t be active (step #2). And you won’t be able to commit directly to the master branch, only create a pull request (step #8), since you are not the owner of the repo. That’s all.

(EDIT. Better follow this: Editing files - GitHub Docs)

3 Likes

Thanks, but I tried to navigate to where to edit, and didn’t get far. This is obviously something for someone with lots more time for this than I have got right now (I have already spent several hours just trying to help and have gotten nowhere). Thanks anyway.

There is a sincere interest in engaging more people: contributing is described in detail with resources on Git/Github at the end, introductory issues are labelled as such, git workflow questions are answered on this forum, etc. It is of course conceivable that this could be done better, but since we do not know how you got stuck, this is not possible without your active involvement.

Again, it is perfectly fine if you don’t want to contribute. Just don’t project your lack of interest/motivation on the community.

3 Likes

Most of the manual can be found in this folder, the specific file depends on which section you intend to edit.

I wrote a small reply on the process of contributing to a documentation by the Github interface here. You just need to ignore the link I pointed there and instead use the link to a file of the folder I linked above.

1 Like

Hi. I tried. All I want to do is suggest addition of a simple example to the ‘Base@isdefined’ section of this page:
https://docs.julialang.org/en/v1/base/base/#Core.isdefined

But seeing how/where to do that seems extremely complicated, and (at the moment) way beyond me.

The example is at @isdefined (which is linked to from the docstring you linked):

https://docs.julialang.org/en/v1/base/base/#Base.@isdefined

This is the given example:

julia> function f()
           println(@isdefined x)
           x = 3
           println(@isdefined x)
       end
f (generic function with 1 method)

julia> f()
false
true
3 Likes

To me, that seems too abstract.
I was thinking about the situation where x had not been defined. Then:

julia> @isdefined x
false

julia> x=2
2

julia> @isdefined x
true

For a ‘newbie’ (like my students, and even me) this seems much simpler to visualise.

3 Likes

I would like to point that, when you are with the mouse cursor over the documentation of this macro, a small blue “Source” button appears in the bottom-right.

Clicking it will give you the source code for that documentation, it will be the triple quoted string highlighted in yellow. You can then go to the top of the document, click in the “Tree: […]” dropdown below the “Code” tab and select “master” (in sub-tab branches) the page will reload. Now you can click the small pencil at right of the buttons “Raw” “Blame” (if it does not appear it is because you are not logged in Github, log in and come back there; if its not clickable and its hovertext is “You must be on a branch…” then you did not select “master” in the previous step).

Now you can go back to that line of the file and edit it (the file will be a writable form field now), unfortunately the lines will not be highlighted anymore so you need to search for it (or remember the line number). After the edit you can write a small title and description for your contribution (in the page bottom) and press “Propose changes”. This will create a PR (Pull Request) that will be analyzed by the Julia maintainers and if approved will change the documentation for the next Julia version.

3 Likes

OK- thanks. That sounds like kind of what I was hoping for but didn’t find.
I’ll try again.

If you encounter any problems just ask. I tried to consider all possibilities, but I can be missing something.

2 Likes

When I click on the ‘Code’ tab, there is no ‘Tree’ dropdown, but rather a ‘Branch’ dropdown and ‘master’ is already selected by default, so nothing changes. I see no mention of ‘Tree’ anywhere.

I mean, that’s exactly what it shows? First when x is not defined, and then when it is defined.

3 Likes

I did not say to click the “Code” tab (clicking it does not remove you from the page of the file to the front page of the project?). I checked now and if you have a very high level of zoom the dropdown does not show “Tree” but instead just the commit code (screenshot below).


You were able to make the edit?

1 Like

No, I wasn’t able to. I’m sorry, I just don’t have any more time for this. I tried to follow as best I could, but beyond clicking on ‘Source’ there are just too many buttons and possibilities and branches - it is all too complicated for me given that I just want something I can use and share with my students.

I do appreciate your trying to help, but I feel like my father used to when people would ask him about how his weekend was, when he often answered “I spent it fixing my labor-saving devices”. I would like Julia (and its documentation) to be something that enables me rather than distracts me away (e.g. for 4 hours today) from what I need to be spending time on.
Thanks, though.

I created a PR here using the github UI for a more clear example based off of this discourse thread.

4 Likes

The exchange there has confirmed my suspicion that I won’t be able to use Julia for teaching any time soon.

Thanks, All.

1 Like

I’m saddened that’s your conclusion from this thread and the pull request. It appears to me that you got the help you wanted and multiple people have engaged in trying to make the path smoother for those who come after you.

16 Likes

You misunderstand me. I didn’t say I was unappreciative nor that I didn’t get the help that I needed. I will continue to use Julia for my own work, just not for my teaching, - there just doesn’t seem to be anyone there listening to what I am saying about accessibility - it is just not part of the culture (yet).

I think it is particularly rude to say that no one was listening to you, after @Henrique_Becker provided step-by-step instructions for you to make the improvement in the docs, and when you announced that it was not worth your time, @pdeffebach contributed a PR implementing the change you asked for.

5 Likes

From what I could see, my contribution to the PR was just ridiculed and ignored.