Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#28): Add blog post about probing #29

Closed

Conversation

volodya-lombrozo
Copy link
Member

Add blog post about probing.

Closes: #28

feat(objectionary#28): add .idea to gitignore

feat(objectionary#28): Add the article about probing mechanism
@volodya-lombrozo
Copy link
Member Author

@mximp @yegor256 Could you have a look, please?

simply print the name of the object and that is all that is required. The
compiler will automatically locate all the requested objects through the
implementation of a new probing feature, which was recently added. In this short
blog, we will attempt to explain how this feature works. Let's take a look at
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo "short blog post"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp Done, thanks!


As you can see from the code, the purpose of this program is to print the magic
number to the standard output. However, what is `org.eolang.io.stdout` and
`org.eolang.io.stdout` here? They all are objects, right.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo typo: duplicate object.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp Done, thanks!

Moreover, `org`, `org.eolang` , `org.eolang.io` are objects too.

But where are they? Is it `org.eolang.io` object that contains `stdout`
attribute, or `org.eolang.io.stdout` is the top-level object itself?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo I believe the question is not entirely correct. There is only one top-level object - Φ. All others are attributes of some sort. However at runtime level we do distinguish package objects. So the correct question would sound like "what part of FQN represents the package?"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp I'm afraid to add "package" term to the blog post, because we use "package" as syntax sugar only. I've already asked about it previously. On the other hand, I agree that we don't have "top-level" object either. Maybe we can name it as follows:

target object
free object 
non-attribute object

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo But we do have "package objects" in runtime: namely they are the special objects which are represented not by standard .eo file, but by a location (or path) containing it's attributes (other objects, including other packages). So I believe package is not just a syntactic sure, but has a real representation.
All suggested names, imo, are unclear and misleading.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp Please, check that thread. I was curious about packages some time ago too. It's not my words:

@volodya-lombrozo there are no packages in EO, but only objects -- this is the beauty/ugliness of the language. org is an object, org.eolang is an object, org.eolang.int is also an object, finally, org.eolang.int.plus is also an object. They are four object with equal rights and responsibilities. I believe that it's the job of a compiler: how to find out which object to load from where. The probing mechanism may not be perfect in its current implementation, but we must make it perfect.

@yegor256 We need your help here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo I believe there is no contradiction here. Packages are objection in terms of concept: they have attributes that are accessed the same way. But these object has special treatment in runtime (PhPackage class) and special syntax for definition in EO (+package meta). That's why you can't find any code for a package.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp I believe we have to write down the meaning of the package somewhere (maybe in the blog post). This ambiguity makes it difficult to reason about that term and I'm afraid to use it. When the meaning will be clear we can change current blog post. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo The term "top-level object" is even more confusing than "package". How would you define it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp Maybe something like this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo As I mentioned all of those three terms are unclear. They are not part of any commonly used glossary. On the other hand "package" is totally understandable term. In the context of the blog post it doesn't require any explanation.. I still suggest the term "package object" defined as "special object type which has no corresponding EO source and whose attributes are other objects tagged by package name".

During the compilation of the application from the example above, the compiler
will create a list of all possible objects that the application might require
and add them to the `meta` section. This list ensures that the compiler is aware
of all the necessary objects and will try to locate them as needed:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo "all the necessary objects" -> "all object candidates"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp Done, thanks!

</metas>
```

In the EO language, the compiler does not differentiate between top-level
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo "the" should no be here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp Done, thanks!

...
```

The index file contains a list of top-level objects that can be used in the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo again, it's not fully correct to use naming "top-level objects". We have no such notion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp Let's discuss it here.

@volodya-lombrozo
Copy link
Member Author

@yegor256 Could you have a look, please?

@volodya-lombrozo
Copy link
Member Author

@yegor256 Reminder

@maxonfjvipon
Copy link
Member

@volodya-lombrozo since it's no more relevant, may be you should close that PR?

@volodya-lombrozo
Copy link
Member Author

As mentioned @maxonfjvipon, this PR isn't relevant anymore, so I close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation of eo objects in xmir strucure
3 participants