Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 5, 2021 04:57 am GMT

Best ways to make your first contribution to Nim language for Hacktoberfest 2021

Concise and readable, small binaries, fast compile times, native performance, zero-overhead interop lets you reuse code in C, C++, JS, Objective-C, Python... Does a programming language have these fantastic features? Of course, Nim language does have the features I have been dreaming about. And what is the goal of Nim language? Simply put, the goal is "one language to rule them all", from shell scripting to web frontend and backend,
scientific computing, deep learning,
blockchain client, gamedev,
embedded.

Moreover, Nim is a community driven collaborative effort that welcomes all contributions, big or small. Read contributing guide if you are willing to contribute to Nim. In this article, I will tell you best ways to make your first contribution to Nim language. Starting from easy and feasible pull requests, you will surely enjoy the charm of open source projects. Let's start our journey.

Replace code-block with runnableExamples

Some modules are using code-blocks which are outdated and should be replaced by runnableExamples. Search .. code-block in your favourite editor and change the ones in standard libraries.

For instance

before

## .. code-block:: Nim##   import std/json####   let jsonNode = parseJson("""{"key": 3.14}""")####   doAssert jsonNode.kind == JObject##   doAssert jsonNode["key"].kind == JFloat

after

runnableExamples:  let jsonNode = parseJson("""{"key": 3.14}""")  doAssert jsonNode.kind == JObject  doAssert jsonNode["key"].kind == JFloat

Note that the import of the current module can be left out. If the original snippet cannot be run, use runnableExamples("-r:off") instead.

Add testcase to close issues

When surfing issues of Nim, you can find some code which have already worked. Submit a pull request to close that issue. You can refer to https://github.com/nim-lang/Nim/pull/18934 and track issues labelled as works_but_needs_test_case or works_with_arc_orc.

Add top-level runnableExamples for modules

Some modules lack top-level runnableExamples, please help them. Such as:

Add runnableExamples or documentations for procs

Some procs lack corresponding runnableExamples and documentations. Please find them and complete them.

Solve issues labelled as easy

If you like some challenges, start from issues labelled as easy.


Original Link: https://dev.to/xflywind/best-ways-to-make-your-first-contribution-to-nim-language-4ml2

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To