logo Blog feeds

Nim BlogVersion 1.0.2 released

The Nim team is happy to announce version 1.0.2, our first patch release following Nim 1.0.0.

To read more about version 1.0.0, take a look at our release article from just a month ago.

Although this release comes only one month after a previous release, it has over 60 new commits, fixing over 40 reported issues, making our 1.0 release even better.

Installing 1.0.2

If you have installed a previous version of Nim using choosenim, getting Nim 1.0.2 is as easy as:

$ choosenim update stable

If you don’t have it already, you can get choosenim by following these instructions or you can install Nim by following the instructions on our install page.

Changelog

Find this release's changelog together with the rest of Nim's source code in our GitHub repository.

HookraceQuest for the Lost Home Server

Today I lost access to my home server. As I described in a previous post I depend heavily on the server to fetch my emails, as a file server, to synchronize files, for newsbeuter and irssi sessions and many other things. As no one was going to be in proximity of the server for the next few hours, my goal for today was to solve the problem remotely.

The symptom was that my SSH connection attempts failed. The server also didn’t respond to pings. As the server is sitting at home behind a regular DSL connection it uses a dynamic IP address that is shuffled every 24 hours. So my first hunch was that the daily reconnect might just have happened at a different time today and I gave the server some time to broadcast its new IP address to my domain registrar.

After about an hour I still couldn’t connect, so I started investigating. Maybe the API of the domain registrar changed (as happened before) or my script failed for another reason? I know that my home server does nightly backups of the other servers I run. So I connected to one of them and checked the journalctl log. To my surprise no connection from the server happened last night. My worst fear was that the server was hanging due to a hardware problem, as I ran into similar problems with this Intel Bay Trail CPU before. (The issue seems to be that Intel underdesigned the power delivery on those systems, which the graphics driver is trying to work around.)

But I wasn’t ready to give up yet, so I tried to think of any other activities the server would do that might leave a trace. I found out that my email hoster doesn’t provide easy access to the IP addresses that access the mailbox. I couldn’t think of any other traces at the time, but next time I might check if my IP address is visible on some IRC server.

As a last resort I remembered that my ISP usually gives me quite similar IP addresses, so I used whois on yesterday’s IP address to see how large the subnet is. I got back a subnet of only 2¹⁴ addresses, which seemed reasonable enough to scan. I hope the ISP is not too mad at me for such a small port scan, but to reduce the impact I also told nmap to only scan the specific SSH port that I use.

After about 5 minutes I had found a single server responding on my custom SSH port, which was indeed my home server. After logging in and checking out the system I noticed the (usual) problem of cronie being unable to spawn new processes after a glibc update. So I simply restarted cronie to fix the problem.

I still wish that Arch Linux will one day tell me which running executables to restart after a system upgrade, as SLES does, to prevent problems like this in the future. I think the general approach is just to check which process references deleted shared libraries. Something like this, similar to here:

ps axh -o pid | while read PID; do grep ".so" /proc/$PID/maps | grep "(deleted)" && echo "$PID" && sed -e "s/\x00/ /g" < /proc/$PID/cmdline && echo "\n"; done

Nim BlogVersion 1.0 released

Today is the day. The Nim Team is very proud and happy to announce the much-anticipated version 1.0 of the language.

Nim has always been focused on providing a compiled statically typed language focusing on efficiency, readability and flexibility.

Version 1.0 marks the beginning of a stable base which can be used in the coming years, knowing that the future versions of Nim won’t break the code you have written with the current version.

Nim has built a warm and welcoming community which is ready to help newcomers to the language.

If you are one of the new users, check out our learning resources and try Nim in our playground.

This release includes many changes, including bug fixes and some language additions. All changes are documented in the v1.0.0 changelog available here. Included as well is the latest release of Nimble, v0.11.0, the changelog for which is available here.

The stability guarantee

Version 1.0 is now a long-term supported stable release that will only receive bug fixes and new features in the future, as long as they don’t break backwards compatibility.

The 1.0.x branch will receive bug fixes for as long as there is demand for them. New features (which do not break backwards compatibility) will continue in steadily advancing 1.x branches.

Our goal is to make sure that code which compiled under Nim 1.0 continues to compile under any stable Nim 1.x version in the future.

What is included under the stability guarantee?

Backwards compatibility covers only the stable fragment of the language, as defined by the manual.

The compiler still implements experimental features which are documented in the “experimental manual”. These features are subject to changes which may be backwards incompatible; some of the features included under this umbrella are concepts, the do notation and a few others. There are also modules in the stdlib which are still considered unstable - these have been marked with an “Unstable API” in their docs.

You can use experimental features, even in production, but be aware that these are not as fleshed out as we would like them to be.

Exceptions to the rule

We of course have to concede that there are exceptions. In certain serious cases, for example if a security vulnerability is discovered in the standard library, we reserve the right to break code which uses it.

Installing Nim 1.0

New users

Check out if the package manager of your OS already ships version 1.0 or install it as described here.

Existing users

If you have installed a previous version of Nim using choosenim, getting Nim 1.0 is as easy as:

$ choosenim update stable

Contributors

Over the years, more than 500 people contributed to the Nim codebase, implementing new features, fixing bugs and issues, writing documentation, and so on. The Nim team would like to thank all of you who helped us build Nim to become what it is today.

We would also want to thank all people who have created Nimble packages, extending what is possible to do with Nim. The number of Nimble packages has been steadily growing, and in August 2019 we broke the 1000 package milestone! We are optimistic that with this release we will see even bigger growth of new and exciting packages.

If you would like to help Nim grow consider donating via Open Collective or other services.

Footnotes