<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fabrizio Traversin</title>
    <description>The latest articles on DEV Community by Fabrizio Traversin (@ftraversin).</description>
    <link>https://dev.to/ftraversin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F112241%2Fa435bacc-0eb1-4c6f-8998-be963fcc7a21.jpg</url>
      <title>DEV Community: Fabrizio Traversin</title>
      <link>https://dev.to/ftraversin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ftraversin"/>
    <language>en</language>
    <item>
      <title>Documize</title>
      <dc:creator>Fabrizio Traversin</dc:creator>
      <pubDate>Wed, 29 Jul 2020 13:16:03 +0000</pubDate>
      <link>https://dev.to/ftraversin/documize-m0i</link>
      <guid>https://dev.to/ftraversin/documize-m0i</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjli33pyksi1yr7nj0t1v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjli33pyksi1yr7nj0t1v.png" alt="Alt Text" width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As I wrote in my &lt;a href="https://dev.to/fabreath/writing-documentation-3m4j"&gt;previous post&lt;/a&gt;, I am evaluating some tools for writing documentation. First of all i tried &lt;a href="https://www.documize.com/" rel="noopener noreferrer"&gt;Documize&lt;/a&gt;, here a share my opinion.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;Documize defines itself like "Team-driven content authoring &amp;amp; automation for secure internal and external documentation".&lt;br&gt;
It's written in &lt;a href="https://golang.org/" rel="noopener noreferrer"&gt;Go&lt;/a&gt; and &lt;a href="https://emberjs.com/" rel="noopener noreferrer"&gt;Ember JS&lt;/a&gt; and it's an open-source project, you can find the source code on &lt;a href="https://github.com/documize/community" rel="noopener noreferrer"&gt;Github repository&lt;/a&gt;.&lt;br&gt;
You can choose between the &lt;a href="https://www.documize.com/compare/" rel="noopener noreferrer"&gt;Team or Enterprise Edition&lt;/a&gt;, and for the Enterprise you can choose the Cloud hosting plan or the Server Installed one (self hosting).&lt;/p&gt;

&lt;p&gt;In Documize the "document" consists of a group of "sections" and each section can contain a type of content typed or it can embed content from external tools. You can edit and rearrange every single section, which is indexed, and you can easily get a "summary" automatically. So you can easy write a rich text (using WYSIWYG tool) or embed a code snippet or put a diagram for technical documents. Every changes is traced, so you can roll back any time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqijhgqyy7al4e4mxcxgl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqijhgqyy7al4e4mxcxgl.png" alt="Alt Text" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I like
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Clean Output
&lt;/h4&gt;

&lt;p&gt;Once you've finished to write your content, you have a clean and very pretty output, organized and easy to manage.&lt;/p&gt;

&lt;h4&gt;
  
  
  Automatic Word Import
&lt;/h4&gt;

&lt;p&gt;This is my favorite one. We have tons of doc files in any folder of our servers or other search-less locations and we spend a lot of time searching for the wanted file. And sometimes we cannot find what we want. This is a big lack in our company. For this reason this tool is so appreciated! You can easy import doc files and Documize works for you re-structuring the text in paragraphs magically. You only need to adjust something for improving the final result. Step by step the "porting" process from our docs to Documize become very easy.&lt;/p&gt;

&lt;h4&gt;
  
  
  Attachments
&lt;/h4&gt;

&lt;p&gt;Uploading files as attachments, become very useful, especially in the porting process to Documize (see previous point), because you can easy check the original document any time and perform a better control.&lt;/p&gt;

&lt;h4&gt;
  
  
  Subdomain
&lt;/h4&gt;

&lt;p&gt;If you're interested in publishing public documents, this feature become very useful, because you can easy share a link with your company (account) name. You can simply have your own landing page with all your public documents (cloud plan).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fve6u6lu3utt7ynezr33g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fve6u6lu3utt7ynezr33g.png" alt="Alt Text" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Public Spaces
&lt;/h4&gt;

&lt;p&gt;If you are interested in sharing documents (such as, tutorials, technical documents, etc.) with your customers, you can set up public spaces where to place your documents, for easy sharing. In public spaces it is not necessary to set up user groups, or let your customers register to any kind of service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F68m28k6ttt8c7lrihjmk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F68m28k6ttt8c7lrihjmk.png" alt="Alt Text" width="338" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  RichText (WYSIWYG)
&lt;/h4&gt;

&lt;p&gt;Documize has a very powerful and complete "Rich Text Box", where you can put also tables, code snippets, insert and edit images and videos. The tables are also very customizable, so it is very simple to create what you want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgg9tyhmdmf1h2h5f3q40.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgg9tyhmdmf1h2h5f3q40.png" alt="Alt Text" width="800" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Diagrams
&lt;/h4&gt;

&lt;p&gt;For me this is a big plus. You can easy draw diagrams using "&lt;a href="https://plantuml.com/" rel="noopener noreferrer"&gt;PlantUML&lt;/a&gt;" or "&lt;a href="https://app.diagrams.net/" rel="noopener noreferrer"&gt;Draw.io&lt;/a&gt;" tools. Especially &lt;a href="https://app.diagrams.net/" rel="noopener noreferrer"&gt;draw.io&lt;/a&gt; (now &lt;a href="https://app.diagrams.net/" rel="noopener noreferrer"&gt;diagrams.net&lt;/a&gt;) for me is the best online diagram tool, with very rich utilities. If you work in a tech company it's a "must have" to draw flow charts, system flows and all kinds of diagrams you need. This tool is very well integrated, so it makes you feel comfortable creating diagrams.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw2jbcpwrr4xq0ydbl3ii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw2jbcpwrr4xq0ydbl3ii.png" alt="Alt Text" width="590" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Revisions &amp;amp; Versions
&lt;/h4&gt;

&lt;p&gt;You can have the revision list and the activity list of every document, with the possibility to restore each version at the wanted revision.&lt;br&gt;
Also you can set a document version (different from content revision) which let you write a brand new document. This could be interesting if you're writing documentation about a product which have some new features or updates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnfqjdif2hw6uc9qrg5xs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnfqjdif2hw6uc9qrg5xs.png" alt="Alt Text" width="638" height="333"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3hmsooq4en5hhze0ocf6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3hmsooq4en5hhze0ocf6.png" alt="Alt Text" width="693" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Self-hosting
&lt;/h4&gt;

&lt;p&gt;Sometimes a cloud solution may not be the right choice, especially if a company relies heavily on the security of its data. Documize has a self-hosted version that can be installed on your server, behind your firewalls and your security rules. However, the self-hosted plan is very expensive. Also you can have an hybrid hosting solution.&lt;/p&gt;

&lt;h4&gt;
  
  
  Enterprise Free plan
&lt;/h4&gt;

&lt;p&gt;The enterprise edition is completely free for up to 10 users, so private or small business accounts can manage their documentation for free.&lt;/p&gt;

&lt;h4&gt;
  
  
  Links
&lt;/h4&gt;

&lt;p&gt;You can publish and create a link for each section. So if you need to share only a part of a specific content, you can easily do it by getting and sharing the link.&lt;/p&gt;

&lt;h4&gt;
  
  
  Comments
&lt;/h4&gt;

&lt;p&gt;In every document, you can leave comment and you can choose if applying it to the entire content or to a single section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwvjn4kw1dqo4x2y69f1r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwvjn4kw1dqo4x2y69f1r.png" alt="Alt Text" width="60" height="60"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Integrations
&lt;/h4&gt;

&lt;p&gt;Trello, Jira, AirTable, Papertrail, Gemini, IFrame. You can have the best integration modules and, if you are a developer, API services to customize your Documize experience. Maybe in the future the list will be extended.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb7xr0uwm8vaptf3ifmpj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb7xr0uwm8vaptf3ifmpj.png" alt="Alt Text" width="218" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Reports
&lt;/h4&gt;

&lt;p&gt;Finally you can have an overlook of your documentation, with simple reports. They're not so cool, but they're useful.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fprgda5dgvbop88zfvki1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fprgda5dgvbop88zfvki1.png" alt="Alt Text" width="600" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I dislike
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Only 2 grouping level
&lt;/h4&gt;

&lt;p&gt;Yes. You only have 2 levels to group documents: spaces and documents. It's not a big deal, because you also have tags and categories to set on each document, but if you have a large and structured company, an extra grouping "folder" would be appreciated.&lt;/p&gt;

&lt;h4&gt;
  
  
  No "real" themes
&lt;/h4&gt;

&lt;p&gt;Themes in Documize concern only the customization of the color of the toolbar, they are not real themes to be applied to your documents to show them in a different style. A "dark mode" would also be appreciated, especially if you write a lot.&lt;/p&gt;

&lt;h4&gt;
  
  
  Export only in pdf or html
&lt;/h4&gt;

&lt;p&gt;Sometimes it is necessary to have more possibilities to export and share the documentation, also using different channels, such as the possibility of publishing documents also on other platforms.&lt;/p&gt;

&lt;h4&gt;
  
  
  Slow internal links
&lt;/h4&gt;

&lt;p&gt;Internal links are slow. You can get a link for each section, but it's not easy to manage. Also I don't like the interface, I think it's not clear, I took a lot to understand where they were.&lt;/p&gt;

&lt;h4&gt;
  
  
  No auto save
&lt;/h4&gt;

&lt;p&gt;This is the worst for my experience, especially when you're writing long contents. For example, you can go in "edit mode" for each section of your document, without the need to close/save the current "working section". So sometimes, if you unfortunately forget to save all opened sections you can easy lose your job. You just need to browse the previous page and lose your content. The best practice is to edit only one section of content at a time, but sometimes you still risk losing data.&lt;/p&gt;

&lt;h4&gt;
  
  
  Settings Interface not clean
&lt;/h4&gt;

&lt;p&gt;Sometimes you are looking for an option to set, a tag or a category or any other type of setting, you feel confused because you don't know where to go. The interface should be improved, so that you have the things you need close at hand.&lt;/p&gt;

&lt;h4&gt;
  
  
  Not automated self-hosted installation
&lt;/h4&gt;

&lt;p&gt;Okay, this isn't a big lack, most people use the cloud version for sure, it's easy. But if you want to test the self-hosted version, you have to follow the guide step by step and be expert enough to install the required services.&lt;/p&gt;

&lt;h4&gt;
  
  
  No app for writing offline
&lt;/h4&gt;

&lt;p&gt;If you're using the cloud service you must to be connected. An app for writing offline with a sync service could be useful for a lot of users.&lt;/p&gt;

&lt;p&gt;My vote:&lt;/p&gt;

&lt;h2&gt;
  
  
  8/10
&lt;/h2&gt;

</description>
      <category>documize</category>
      <category>tools</category>
      <category>documentation</category>
      <category>authoring</category>
    </item>
    <item>
      <title>Writing documentation</title>
      <dc:creator>Fabrizio Traversin</dc:creator>
      <pubDate>Fri, 24 Jul 2020 13:35:55 +0000</pubDate>
      <link>https://dev.to/ftraversin/writing-documentation-3m4j</link>
      <guid>https://dev.to/ftraversin/writing-documentation-3m4j</guid>
      <description>&lt;h3&gt;
  
  
  Differences among software for team wiki, project documentation, knowledge base, tech documentation, and other authoring tools
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What tool?
&lt;/h4&gt;

&lt;p&gt;Since long time i'm looking for team collaboration software for writing documents, easy to use, reliable and also usable for "non-technical" people. At the beginning, i started to write technical and knowledge base documentation for my company with dokuwiki, and i love it, but you need to learn the syntax, and a lot a times you cannot force someone of your team/company to learn something just to write "simple" documents. So, i made a very nice and useful wiki site, but i was the only active maintainer. Also you need to know how to install the wiki site, how to update, how to install modules and so on. However you can have a pretty, free and self hosted wiki site, with the user access control (you decide who and what can read/edit/create pages) and the revision history of the pages.&lt;/p&gt;

&lt;p&gt;The next step was trying other "static site generator" tools, like &lt;a href="http://daux.io/" rel="noopener noreferrer"&gt;daux.io&lt;/a&gt;, &lt;a href="https://www.mkdocs.org/" rel="noopener noreferrer"&gt;mkdocs.org&lt;/a&gt;, &lt;a href="https://readthedocs.org/" rel="noopener noreferrer"&gt;readthedocs.org&lt;/a&gt;, &lt;a href="https://pages.github.com/" rel="noopener noreferrer"&gt;github pages&lt;/a&gt;, &lt;a href="https://gitlab.com/pages" rel="noopener noreferrer"&gt;gitlab pages&lt;/a&gt;, and other tools mainly based on markdown syntax, but sometimes it's hard to set up the necessary environment to generate html pages. Also writing in markdown is not a good choice for me...&lt;/p&gt;

&lt;p&gt;Finally i tried more specific tools like &lt;a href="https://www.atlassian.com/software/confluence" rel="noopener noreferrer"&gt;Confluence&lt;/a&gt;... and it's for sure one of the best, but the first impact could be "too much" and leave you like a fish out of water. Then i focused on easier and similar tools and i chose to valuate &lt;a href="https://www.documize.com/" rel="noopener noreferrer"&gt;Documize&lt;/a&gt;, &lt;a href="https://bit.ai/" rel="noopener noreferrer"&gt;Bit.ai&lt;/a&gt;, &lt;a href="https://archbee.io/" rel="noopener noreferrer"&gt;Archbee&lt;/a&gt;, &lt;a href="https://tettra.com/" rel="noopener noreferrer"&gt;Tettra&lt;/a&gt; and &lt;a href="https://slite.com/" rel="noopener noreferrer"&gt;Slite&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My mainly targets are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Centralized documentation: one single place to search what you need.&lt;/li&gt;
&lt;li&gt;Collaborative tool: users/teams should write and manage their own documents and share them easy.&lt;/li&gt;
&lt;li&gt;Easy writing: every employee should write without a particular knowledge (WYSIWYG)&lt;/li&gt;
&lt;li&gt;Cross purposes: marketing, company knowledge base, best practices, on-boarding, know-how, customer tutorials, technical documentation&lt;/li&gt;
&lt;li&gt;Document revision history and versioning.&lt;/li&gt;
&lt;li&gt;Diagrams tool for easy flows representation.&lt;/li&gt;
&lt;li&gt;Code snippets: for sharing coding examples among software developers.
The next few days I will publish my evaluations here.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  How does it work?
&lt;/h4&gt;

&lt;p&gt;The concept behind this kind of tools is the section or "smart embedded block": every document is made as a list of indexed blocks and every block represents something: a text, a code snippet, a diagram, a map, a table or other utilities. Every block can be moved inside the document or in other spaces, and also can be cloned. So you can re-order the information as you need and have an auto-generated table of contents in a easy way.&lt;br&gt;
Every document is grouped in a space, which define the main argument. For example you can have some private documents grouped in the space for marketing, others in the space for the company knowledge base and a public space with technical documentations for your costumers. You can also set categories and tags for a more simple search.&lt;br&gt;
Also, you can define user groups and control the access to the documents or spaces.&lt;br&gt;
Once you finished to write, you can easy publish or export documents in pdf or other most used formats.&lt;/p&gt;




&lt;p&gt;First of all i tried &lt;a href="https://www.documize.com/" rel="noopener noreferrer"&gt;Documize&lt;/a&gt; and I will share my evaluations about it in my the next publish.&lt;/p&gt;

&lt;h5&gt;
  
  
  And what about your favorite tool in writing documentation?
&lt;/h5&gt;

&lt;p&gt;[edit] Published &lt;a href="https://dev.to/fabreath/documize-m0i"&gt;Documize Evaluation&lt;/a&gt;&lt;/p&gt;

</description>
      <category>content</category>
      <category>authoring</category>
      <category>documentation</category>
      <category>tool</category>
    </item>
    <item>
      <title>Nim strings</title>
      <dc:creator>Fabrizio Traversin</dc:creator>
      <pubDate>Sat, 15 Feb 2020 20:55:02 +0000</pubDate>
      <link>https://dev.to/ftraversin/nim-strings-195o</link>
      <guid>https://dev.to/ftraversin/nim-strings-195o</guid>
      <description>&lt;h1&gt;
  
  
  &lt;a href="https://nim-lang.org/" rel="noopener noreferrer"&gt;Nim Programming Language&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Nim is a brand new and very charming programming language, so a couple of months ago i decided to start to study it in my spare time. So i took some notes and examples, i hope they could be helpful to someone else.&lt;/p&gt;

&lt;h2&gt;
  
  
  STRINGS
&lt;/h2&gt;

&lt;p&gt;"Strings" is a builtin data type in Nim, so you can use it always (module declarations is not necessary).&lt;/p&gt;




&lt;h4&gt;
  
  
  Declaration:
&lt;/h4&gt;

&lt;p&gt;you can declare &lt;strong&gt;MUTABLE&lt;/strong&gt; or &lt;strong&gt;IMMUTABLE&lt;/strong&gt; strings.&lt;br&gt;
Use &lt;strong&gt;let&lt;/strong&gt; for &lt;em&gt;immutable&lt;/em&gt; string declaration.&lt;br&gt;
Use &lt;strong&gt;var&lt;/strong&gt; for &lt;em&gt;mutable&lt;/em&gt; string declaration.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simpler declaration&lt;/strong&gt;:&lt;br&gt;
you can declare string variables taking advantage of the &lt;strong&gt;compiler type inference&lt;/strong&gt;: it's not necessary to declare the "string" type, because the type will be resolved by the compiler.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# Simply declare let/var, variable with '=' operator and the string between double quotes &lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;si&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"This is an immutable string"&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;sm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"This is a mutable string"&lt;/span&gt;

&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;si&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt;  This is an immutable string&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;sm&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt;  This is a mutable string&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You &lt;strong&gt;CANNOT&lt;/strong&gt; re-assign an &lt;strong&gt;IMMUTABLE&lt;/strong&gt; strings.&lt;br&gt;
This will cause a compiling &lt;strong&gt;ERROR&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="n"&gt;si&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Trying to re-assign an immutable string"&lt;/span&gt;

&lt;span class="c"&gt;# COMPILING ERROR!!!&lt;/span&gt;
&lt;span class="c"&gt;# Error: 'si' cannot be assigned to&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You &lt;strong&gt;CAN&lt;/strong&gt; re-assign a &lt;strong&gt;MUTABLE&lt;/strong&gt; strings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="n"&gt;sm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Re-assigning the mutable string"&lt;/span&gt;

&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;sm&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt;  Re-assigning the mutable string&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explicit Declaration&lt;/strong&gt;:&lt;br&gt;
you can choose to declare the string variables, without the use of the &lt;em&gt;compiler type inference&lt;/em&gt;. Simply you have to declare the "string" type after the variable name and the ":" operator.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# explicit string declaration&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;siexp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Another immutable string"&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;smexp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Another mutable string"&lt;/span&gt;

&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;siexp&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt; Another immutable string&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;smexp&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt; Another mutable string&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Multi-line strings&lt;/strong&gt;:&lt;br&gt;
for declaring a multi-line string just write the string text between a triple "double-quote"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# multi-line string declaration&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;mls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"""This is 
a multi-line string,
you can use it for html code
or just for christmas tree! ;-)

    *   
   ***
  *****
 *******
*********
    |
"""&lt;/span&gt;

&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;mls&lt;/span&gt;
&lt;span class="c"&gt;# --&amp;gt;  This is&lt;/span&gt;
&lt;span class="c"&gt;#      a multi-line string,&lt;/span&gt;
&lt;span class="c"&gt;#      you can use it for html code&lt;/span&gt;
&lt;span class="c"&gt;#      or just for christmas tree! ;-)&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;#          *&lt;/span&gt;
&lt;span class="c"&gt;#         ***&lt;/span&gt;
&lt;span class="c"&gt;#        *****&lt;/span&gt;
&lt;span class="c"&gt;#       *******&lt;/span&gt;
&lt;span class="c"&gt;#      *********&lt;/span&gt;
&lt;span class="c"&gt;#          |&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Unicode glyphs&lt;/strong&gt;:&lt;br&gt;
in Nim the strings contain text, encoded with the &lt;strong&gt;UTF-8&lt;/strong&gt; format, but also &lt;strong&gt;Unicode&lt;/strong&gt; format is allowed. So you can use some 'Rune' type (glyphs) in your text.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# string with unicode characters&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;"This is a string with unicode characters: ℛ ₪ ⎒ ♥ ♫ ☻"&lt;/span&gt;
&lt;span class="c"&gt;#---&amp;gt; This is a string with unicode characters: ℛ ₪ ⎒ ♥ ♫ ☻&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Raw strings and escape characters&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
there are some "special" characters, which have a particular meaning, especially in text formatting. They're called "escape characters" and they're always preceded by the '\' character. To "bypass" the string interpretation, you can use the &lt;strong&gt;raw string&lt;/strong&gt; format, just putting 'r' after the opening string double-quote.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# string with \n (newline character):&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;"This is the first line...&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;...and this is the second one"&lt;/span&gt;
&lt;span class="c"&gt;# ---&amp;gt; This is the first line...&lt;/span&gt;
&lt;span class="c"&gt;#      ...and this is the second one&lt;/span&gt;

&lt;span class="c"&gt;# string with \t (tab character):&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;"This is the first part of the string&lt;/span&gt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="s"&gt;and this is the second one"&lt;/span&gt;
&lt;span class="c"&gt;# ---&amp;gt; This is the first part of the string    and this is the second one&lt;/span&gt;

&lt;span class="c"&gt;# string with \\ (backslash character):&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;"This is the path-string: c:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;folder&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;inner-folder&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
&lt;span class="c"&gt;# ---&amp;gt; This is the path-string: c:\folder\inner-folder\&lt;/span&gt;

&lt;span class="c"&gt;# string with \" (quotation mark):&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;"This is a string with &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;double quote&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt; in the text"&lt;/span&gt;
&lt;span class="c"&gt;# ---&amp;gt; This is a string with "double quote" in the text&lt;/span&gt;

&lt;span class="c"&gt;# bypass escape characters with a raw string:&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;r"This is a raw string: escape characters like '\n' '\t' '\\' are not interpreted"&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;r"In a raw string you can write 'c:\program files\nim\' instead of 'c:\\program files\\nim\\'"&lt;/span&gt;

&lt;span class="c"&gt;# ---&amp;gt; This is a raw string: escape characters like '\n' '\t' '\\' are not interpreted&lt;/span&gt;
&lt;span class="c"&gt;# ---&amp;gt; In a raw string you can write 'c:\program files\nim\' instead of 'c:\\program files\\nim\\'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Concatenation:
&lt;/h4&gt;

&lt;p&gt;You can join only strings with strings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# Concatenation with '&amp;amp;' operator&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"This"&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"string"&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="s"&gt;" is"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="s"&gt;" a"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="s"&gt;" concatenated "&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt;
&lt;span class="c"&gt;# --&amp;gt;  This is a concatenated string&lt;/span&gt;

&lt;span class="c"&gt;# Appending string with 'add' method&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;stradd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"This is a string concatenated"&lt;/span&gt;
&lt;span class="n"&gt;stradd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"...with .add() method"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;stradd&lt;/span&gt;
&lt;span class="c"&gt;# ---&amp;gt; This is a string concatenated...with .add() method&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Lenght:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# string.len() / string.len: return the lenght of the string&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"The lenght of this string is"&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;": "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;len&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;"this is 11!"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;len&lt;/span&gt;
&lt;span class="c"&gt;# ---&amp;gt; The leght of this string is: 28&lt;/span&gt;
&lt;span class="c"&gt;# ---&amp;gt; 11&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Comparison:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# Comparison by lenght, using operators '&amp;lt;', '&amp;gt;', '&amp;lt;=', '&amp;gt;=', '==', '!=':&lt;/span&gt;
&lt;span class="c"&gt;# A true/false value will be returned&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt;
  &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"This string has some characters"&lt;/span&gt;
  &lt;span class="n"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"This one has few chars"&lt;/span&gt;
  &lt;span class="n"&gt;s3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"This string in longer than others, because it has a lot of characters"&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt; true&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;s3&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt; false&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;s3&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt; false&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;s3&lt;/span&gt;   &lt;span class="c"&gt;# --&amp;gt; true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Casting:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nim"&gt;&lt;code&gt;&lt;span class="c"&gt;# $&amp;lt;var_name&amp;gt; --&amp;gt; str: transform a value in a string&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;numint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;     &lt;span class="c"&gt;# integer&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;numflo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.987&lt;/span&gt;   &lt;span class="c"&gt;# float&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;numint&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="s"&gt;"-four-five-six-"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;numflo&lt;/span&gt;   &lt;span class="c"&gt;# string concatenation&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;   &lt;span class="c"&gt;# ---&amp;gt; 123-four-five-six-0.987&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>nim</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>learn</category>
    </item>
  </channel>
</rss>
