# Why is REPL unable to locate only one of my files?

**URL:** <https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503>\
**Category:** New to Julia\
**Created:** [September 20, 2022, 7:08am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503 "2022-09-20T07:08:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bananthahally](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bananthahally/32/222983_2.png) [@Bananthahally](https://discourse.julialang.org/u/Bananthahally)\
**Post date:** [September 20, 2022, 7:08am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/1 "2022-09-20T07:08:34Z")

</div>

![Screenshot 2022-09-20 at 12.26.31 PM](https://global.discourse-cdn.com/julialang/original/3X/c/a/cacdef3066d170e05b54aee441829843f57baa4a.png)

I’m just a newbie to Julia and am trying out simple stuff inside the Atom IDE. I created two small functions Eucl.jl and TriaMap.jl and tried executing these in the REPL window. The first one, Eucl.jl gets executed but REPL is unable to execute TriaMap.jl, like it does not know what TriaMap is.

I set (under the Juno Tab in Atom), both Working Directory as well as Working Environment to the current Project Folder. Still the above issue.

Is REPL unable to locate only TriaMap.jl ? If so, why and what’s to be done?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [September 20, 2022, 8:40am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/2 "2022-09-20T08:40:17Z")

</div>

I can’t see any `include("Eucl.jl")` or `include("TriaMap.jl")`. Unless there is some automatism in Juno/Atom, which I don’t use, you need to include the files.  
See [Modules · The Julia Language](https://docs.julialang.org/en/v1/manual/modules/) (ignore the modules stuff for now, but you want it later).

And welcome to this community, don’t hesitate to ask if you experience more difficulties.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 20, 2022, 8:52am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/3 "2022-09-20T08:52:17Z")

</div>

There is no automatism - this is not MATLAB where having an `.m` file on your path imports whatever code is in that file.

OP I assume you maybe executed the function definition of `Eucl` at some point but didn’t do the same for `TriaMap`?

As a bit of general advice, uppercase in Julia is generally reserved for types (like `Int64`, `String` etc. or in your case `Coeffs`) while function names are lowercase.

Also type definitions generally shouldn’t be inside functions - `Coeffs` should be created outside of a function, and then you define functions that operate on `Coeffs` objects.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [September 20, 2022, 10:43am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/4 "2022-09-20T10:43:11Z")

</div>

BTW, how is Atom/Juno working these days? Since Atom was deprecated, and Juno development stopped, I presumed that people would stop using it, but there still seems to be a certain user base. Is it still working okay?

---

<div class="post-metadata">

**Author:** ![Bananthahally](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bananthahally/32/222983_2.png) [@Bananthahally](https://discourse.julialang.org/u/Bananthahally)\
**Post date:** [September 20, 2022, 11:31am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/5 "2022-09-20T11:31:46Z")

</div>

Thanks for the info. I found the include helped to atleast let REPL know about the function. But there were other errors I’m now working on.

---

<div class="post-metadata">

**Author:** ![Bananthahally](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bananthahally/32/222983_2.png) [@Bananthahally](https://discourse.julialang.org/u/Bananthahally)\
**Post date:** [September 20, 2022, 11:36am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/6 "2022-09-20T11:36:56Z")

</div>

Thanks for the info. You noted it right- MATLAB’s ways don’t work here.

---

<div class="post-metadata">

**Author:** ![Bananthahally](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bananthahally/32/222983_2.png) [@Bananthahally](https://discourse.julialang.org/u/Bananthahally)\
**Post date:** [September 20, 2022, 11:39am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/7 "2022-09-20T11:39:21Z")

</div>

As I don’t know of any other IDE, I’m using Atom. Seems okay so far for the rather small scripts I write. Do let me know if you have any other IDE in mind. Thanks.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [September 20, 2022, 11:53am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/8 "2022-09-20T11:53:23Z")

</div>

I was thinking of [Julia for VS Code](https://www.julia-vscode.org/)

I mean, on the Juno homepage itself, this is the top banner on the page 🤷

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/f/2f2757c5d8155a4f4135caca2ed5608bfd8ff18f.png)

Still, some people do prefer Atom/Juno, so I was wondering why,

---

<div class="post-metadata">

**Author:** ![Bananthahally](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bananthahally/32/222983_2.png) [@Bananthahally](https://discourse.julialang.org/u/Bananthahally)\
**Post date:** [September 21, 2022, 10:41am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/9 "2022-09-21T10:41:02Z")

</div>

Thanks, @DNF for the info on VS for Julia. Have installed it and begun using it (of course, as a newbie with Julia).

Could I get to know what’s happening in the REPL window here, that is, why Julia is not able to assign a value to the field a0, while on the other hand, it knows its type and name:

 ![Screenshot 2022-09-21 at 4.02.36 PM](https://global.discourse-cdn.com/julialang/original/3X/b/e/be5b4322cb9604a11a83737f7fa09ab33783d199.png)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 21, 2022, 10:48am UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/10 "2022-09-21T10:48:17Z")

</div>

`Coeffs` is just the name of a type, not an object of that type. `fieldnames` operates on the type of a variable, not it’s value:

```julia
julia> mutable struct MyStruct
           a::Int64
       end

julia> x = MyStruct(1)
MyStruct(1)

julia> fieldnames(x)
ERROR: MethodError: no method matching fieldnames(::MyStruct)
Closest candidates are:
  fieldnames(::Core.TypeofBottom) at reflection.jl:188
  fieldnames(::Type{<:Tuple}) at reflection.jl:190
  fieldnames(::DataType) at reflection.jl:185
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[3]:1

julia> fieldnames(typeof(x))
(:a,)

```

As a general comment it’s probably not helpful to continue this thread which was about Atom not being able to find a function definition, a problem that as far as I can see is solved. I would recommend you start going through the Julia manual to learn the basics of the language (such as the difference between a type and an instance of a type) and start new threads when you run into issues.

---

<div class="post-metadata">

**Author:** ![Bananthahally](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bananthahally/32/222983_2.png) [@Bananthahally](https://discourse.julialang.org/u/Bananthahally)\
**Post date:** [September 21, 2022, 12:40pm UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/11 "2022-09-21T12:40:25Z")

</div>

![Screenshot 2022-09-21 at 6.04.57 PM](https://global.discourse-cdn.com/julialang/original/3X/a/5/a5821f9c3b58069374dfaeb83082e106992c3aa2.png)  
Oh, got it. I’d forgotten to create an instance of Coeffs, particularly one that’s ‘mutable’. Coming from other languages, there is bound to be some confusion like I had. Indeed, I find it odd that only when mutable can field values change, when the structure’s fields make up a tree of variables.

Thanks for that quick info.

---

<div class="post-metadata">

**Author:** ![Jeff\_Emanuel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff_emanuel/32/15440_2.png) [@Jeff\_Emanuel](https://discourse.julialang.org/u/Jeff_Emanuel)\
**Post date:** [September 21, 2022, 2:17pm UTC](https://discourse.julialang.org/t/why-is-repl-unable-to-locate-only-one-of-my-files/87503/12 "2022-09-21T14:17:47Z")

</div>

> [@Bananthahally](#):
>
> Coming from other languages, there is bound to be some confusion like I had

[https://docs.julialang.org/en/v1/search/?q=noteworthy](https://docs.julialang.org/en/v1/search/?q=noteworthy)
