-
Notifications
You must be signed in to change notification settings - Fork 78
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
Conversation
|
||
|
||
|
||
## I'm excited! How do I test them out? |
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
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
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." |
There was a problem hiding this comment.
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
@ee7 can you please take a look as well? :) |
There was a problem hiding this 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.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [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.
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>
@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 :) |
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
Initial version, please report any cases of inaccuracies/typos/bad phrasing.
Article name is up to change, maybe we can think of something better?