[CONTACT]

[ABOUT]

[POLICY]

Ratfactor know his favorite language

Found at: sdf.org:70/users/ratfactor/phlog/2018-08-23-Nim-day-1

= Nim day 1 =


Ratfactor doesn't know his favorite language

n praise of the programming language 'Nim'.  But what I didn't
bother to mention was that I've already learned and forgotten
t twice.

How can I claim to like it so much when I keep forgetting it?
made a devoted effort to keep Nim loaded in my brain by actually
_using_ it frequently.

AsciiDoc-to-Gopher-text formatter I've vaguely blathered on about
before[2] *and* ideas for a Gopher client that would be like a
cross between of Lynx (using ncurses) and VF-1 (keyboard-driven,
etc.) - and I totally have a cool name for it and everything,
"Vole!", so the hard part's done, you know?

But I want to write both of those things in Nim.  I can't very

Well, it's time to fix that ("and this time, once and for all,"
teeth.)


The journey so far

forgotten more languages than I'd like to admit.

the treasure I seek continues to alude me: a casual mastery of
a language that is "pretty good at everything."

For you see, I have learned at least one thing on my journey:
there _is no_ "one true programming language."

Mind you, I have fluent competence with the technologies I use for
you know?  That's work for _the man_.  That's the stuff that
needs to be done yesterday and nobody cares how it was written.

and OCaml.



Why Nim?

When I finally came around to deciding that I needed a "modern"
compiled language under my belt, there were four big contenders
at the time).

Each of those languages is great in its own way, but Nim not only
collected (optional), interesting type system, package manager,
etc.) but _also_ emphasizes clean, expressive programming.

Let's take Rust and Nim for example: I did not find Rust
and brackets as if C++ had made sweet love to Perl.  In order to
you to manually track things like lifetimes of borrowed pointers.
Mind you, I think Rust is an absolutely amazing language by
amazing people with wonderful documentation and community.
n the future.

But writing Nim feels more like the Python whose syntax it most
closely resembles.  Only a master of C could write idiomatic C as
fast as Nim can generate it for me while letting me concentrate
on solving the problem at hand.

Some additional features in no particular order:

	- statically typed (with inference)

	- iterators

	- macros

	- generics

	- first-class functions

	- operator overloading

	- foreign function interface (FFI) to use C libraries

	- many common C library bindings already available


The only real downside to Nim is that the community is relatively

Oh, and the significant whitespace (inspired by Python) is a




What's the plan?

and was authoring a book for _other people_ who don't.	It's a
a document that is genuinely useful to others.	I do it all the
time on my website[3].

Since this will be rough, I think I'll just write it as a phlog
mini-series.  Then, when I actually feel more confident with
Nim, maybe I'll clean it up a bit and package it up as some sort
of document.

So join me for Nim Day 2, and let's learn Nim together!



[1]
[2]
[3] http://ratfactor.com/slackware/pkgblog/

By the way, my "PkgBlog" (short for Slackware "Package Blog")
n link [3] above is finally live and I'm currently writing the
entry for the 'bash' package!  I'll be mirroring here on Gopher
as soon as I have an AsciiDoc-to-text formatter!


AD: