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

"Introduction to ARC/ORC in Nim" guest post #230

Merged
merged 15 commits into from Oct 15, 2020
Merged

"Introduction to ARC/ORC in Nim" guest post #230

merged 15 commits into from Oct 15, 2020

Conversation

ghost
Copy link

@ghost ghost commented Oct 14, 2020

Initial version, please report any cases of inaccuracies/typos/bad phrasing.

Article name is up to change, maybe we can think of something better?




## I'm excited! How do I test them out?
Copy link
Author

Choose a reason for hiding this comment

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

This section will need to be changed if we plan to post the article after 1.4 is out

the compiler automatically **injects** destructors when it deems that some variable
(a string, sequence, reference, or something else) is no longer needed.
In this sense, it's similar to C++ with its destructors (RAII).
To show what I mean we can use Nim's ``expandArc`` introspection (will be available in Nim 1.4).
Copy link
Author

Choose a reason for hiding this comment

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

If we post the article after 1.4, need to change this

@ghost
Copy link
Author

ghost commented Oct 14, 2020

@Araq @Clyybber please review :)

@ghost
Copy link
Author

ghost commented Oct 14, 2020

Also see #231 for a styling bug

author: Danil Yarantsev (Yardanico)
excerpt: "Nim is advancing towards more efficient
memory management models. Let's talk about ARC/ORC
and see how they will change the way memory works in Nim."
Copy link
Author

Choose a reason for hiding this comment

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

Not sure about this one, my original intro was "Hello everyone! In this post, I'll try to explain what are ARC and ORC and how they will affect performance or other aspects of Nim. I won't dive too much into writing Nim code with ARC/ORC in mind, but rather give a more-or-less high-level explanation." but I checked other guest posts and made this excerpt instead

@ghost
Copy link
Author

ghost commented Oct 14, 2020

@ee7 can you please take a look as well? :)

Copy link
Contributor

@ee7 ee7 left a comment

Choose a reason for hiding this comment

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

Here's a quick review just for English correctness/style.

I wasn't concentrating so much on the actual content/structure/arguments, sorry. Nor that the Nim content was actually technically correct.

But one thing: maybe we should mention somewhere that the --gc option is badly named, and say that it's more like "memory management strategy" instead.

jekyll/_posts/2020-10-14-what-are-arc-and-orc-in-nim.md Outdated Show resolved Hide resolved
jekyll/_posts/2020-10-14-what-are-arc-and-orc-in-nim.md Outdated Show resolved Hide resolved
jekyll/_posts/2020-10-14-what-are-arc-and-orc-in-nim.md Outdated Show resolved Hide resolved
jekyll/_posts/2020-10-14-what-are-arc-and-orc-in-nim.md Outdated Show resolved Hide resolved
jekyll/_posts/2020-10-14-what-are-arc-and-orc-in-nim.md Outdated Show resolved Hide resolved
ORC is an all-new Nim's cycle collector based on ARC.
It can be considered a full-blown GC since it includes a local tracing phase
(contrary to most other tracing GCs which do global tracing).
I don't have much to say about ORC, but it retains most of ARC's advantages
Copy link
Contributor

Choose a reason for hiding this comment

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

"I don't have much to say about ORC"

Isn't there something to say? No mention of e.g. async things here?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah I should add that :)

jekyll/_posts/2020-10-14-what-are-arc-and-orc-in-nim.md Outdated Show resolved Hide resolved
ARC is available in Nim 1.2.x releases but it has a lot of bugs in that version.
It's better to wait for the **Nim 1.4** release (it should be out soon) which will
have ARC and ORC available for wide testing.
But if you're so eager to try them out, you can try a
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
But if you're so eager to try them out, you can try a
But if you're eager to try them out, you can try a

- [FOSDEM 2020 - Move semantics for Nim](https://www.youtube.com/watch?v=yA32Wxl59wo)
- [NimConf 2020 - Nim ARC/ORC](https://www.youtube.com/watch?v=aUJcYTnPWCg)
- Other discussions on the Nim forum
- Nim real-time chat
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Nim real-time chat
- Nim real-time chat

This should be more specific, and link to IRC/Element/Discord/Gitter.

- [NimConf 2020 - Nim ARC/ORC](https://www.youtube.com/watch?v=aUJcYTnPWCg)
- Other discussions on the Nim forum
- Nim real-time chat
- [Nim GitHub repository](https://github.com/nim-lang/nim) issues/pull requests
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [Nim GitHub repository](https://github.com/nim-lang/nim) issues/pull requests
- [Nim GitHub repository](https://github.com/nim-lang/nim) issues/pull requests

Might be a bit broad. Maybe link to a favourite label/issue/PR/RFC if you have one in mind.

Danil Yarantsev and others added 7 commits October 15, 2020 01:08
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
@ghost
Copy link
Author

ghost commented Oct 14, 2020

@ee7 thanks a ton for all of the suggestions, I'm not a native English speaker so your suggestions also help me to improve my English :)

@ghost ghost changed the title "What are ARC and ORC in Nim" guest post "Introduction to ARC/ORC in Nim" guest post Oct 15, 2020
@narimiran narimiran merged commit a799d78 into nim-lang:master Oct 15, 2020
@narimiran narimiran mentioned this pull request Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants