
Show HN: NimForum – A lightweight alternative to Discourse - dom96
https://github.com/nim-lang/nimforum
======
beagle3
Nim is awesome - the programming language, the community, and the emerging
ecosystem. Live example, for discussing the Nim programming language:
[https://forum.nim-lang.org/](https://forum.nim-lang.org/) ; Dominik Picheta
(dom96), the main author of NimForum, is one of the core Nim language
developers and is one of the people making the Nim community so awesome.
Thanks, Dom.

The Nim developers practice dogfooding, and NimForum is one result of that
practice. I haven't had much mileage with this new version (the actual Nim
forum was updated just a couple of days ago), but the previous revision was
incredibly fast and responsive, and had the feature of running example code
within the forum. The usefulness of this feature in a programming language
forum cannot be overstated -- I think it shortens the average discussion
thread by 50%, and makes it way more useful to boot.

This newer version looks much better but has two issues compared to the
previous one: (a) it won't run example code within the forum, and (b) it won't
work without JavaScript. IIUC the first will be solved shortly, the second
might take a little more time (but ... if you can just run the older version
in the mean time if it bothers you).

~~~
dom96
I didn't realise the ability to run Nim code on the forum was such a coveted
feature. I did initially plan to reimplement it for the new forum (the "Run"
button is there, it just needs the logic), but sadly I ran out of time and
decided to prioritise other things.

I've thought about continuing the non-SPA nature of the original forum, but
with Araq's new Karax framework being available I couldn't resist using it
(and of course Araq really wanted me to as well). Even though the forum
doesn't run without JS I do still think this was a good decision. In the long
run we can probably render the page on the server side, because the front end
is written in Nim this should be fairly simple.

~~~
beagle3
For sure, the new version is much more aesthetically pleasing and (if JS is
enabled) at least as functional. I wasn't trying to criticize anything, just
point it out as a matter of fact. I think it's a good decision too, even
though I generally like non-js sites. Did you verify that Google and
DuckDuckGo manage to index the forum topics? That would be my concern, much
more than the "no JS, lame" crowd.

Every programming language forum has, in about 80% of the answers including a
code sample, a disclaimer of the ".. or something like this, I didn't actually
try to run it" \-- and usually the answer also has a type, missing
import/include, etc - which makes it less useful for newbies, even though it's
usually helpful enough to more experienced users.

The only languages for this isn't true (that I've seen) are the APL/J/K
family, where a complete working answer is usually 2-3 lines so people try it
in a console before posting; and Nim since you introduced the "run" button to
the older forum.

------
Quequau
Slightly off topic but... my social circle grew concerned about our privacy
some years ago and some of us, including myself, really didn't want to
continue using a 'private' Facebook group. After a fair bit of trial and error
we wound up using a vanilla Discourse image on some AWS provider. It's turned
out to be the best think we've done for our friendships in decades.

~~~
yoavm
Can you share more on how you use it?

~~~
Quequau
I'm not a web guy so I'm not 100% familiar with the details but as far as I
understand it's nothing more than a vanilla Discourse image from an outfit
called bitnami running on the smallest instance available on Amazon... and
absolutely nothing else.

Presumably it's what discourse looks & acts like before people wrap their
business logic / webpage around it.

~~~
yoavm
oh I didn't mean from the technical aspect. I meant socially, how it works.
What kind of things your friends post there, how often you go check what's up
with them, with type of discussions you have there etc'.

~~~
Quequau
I don't use any other social media. So I post everything that pops into my
mind, news that I read elsewhere, things that go in my life, and often stuff
that's much more personal than I would have ever posted anywhere else. The
discussion is much the same as what I suppose people have on Facebook,
Instagram or whatever... though it's orders of magnitude more civil and
reasonable.

Roughly half the group has also abandoned all other social media, while the
other half occasionally act as a Facebook diode by posting worthy or important
things they might come across.

As the group now lives in several different countries on different continents,
having a mechanism that helps us work around time zone constraints which isn't
an unmanageable tangle of email chains is hugely beneficial. It's remarkable
how making things easier to keep track of wound up facilitating a lot more
discussion.

Also as it's just us we have no constraints concerning thread life cycles. So
when something occurs that relates to our discussion in some ancient thread
it's not a problem to revive it. So we've got threads that run over the course
of five years.

~~~
jtrtoo
How much do the connections between the people in your friend group overlap?

How do you deal with people you're connected with but not necessarily others
in the group?

Just thinking out loud. Thanks for sharing!

~~~
Quequau
Everyone in the group has known each other since the late seventies, we just
don't live in the same places anymore. It's just us and, except for a couple
of deaths, the group hasn't changed size in a couple of decades. We haven't
and wouldn't invite anyone else.

------
gyyfl
This is great but I wish developers would get away from naming software based
on the language it's coded in, in general. It's purely a public relations
thing but I think the practice creates an impression of valuing process over
product, and conceptually ties a product to a particular language ecosystem as
a sort of implicit presumption.

~~~
reificator
Libraries I don't mind: how much time do you really want to spend naming the
394th serialization library?

But for products aimed at end-users? Absolutely don't name it after the
language it's written in.

To play devil's advocate for a moment though: this is the software used to run
the forum for the language Nim. If you've ever been to the Nim forums, this is
a version you can run yourself. Maybe that makes the name a bit more
reasonable?

~~~
dom96
I do agree that NimForum is a bit of a lame name for end-users. The initial
NimForum implementation was very much intended to only be used for the Nim
community, with this new version I wanted to make it possible for others to
use it as well. I have thought about creating a new identity for this project,
but I couldn't come up with a good name on the spot (or at least one that
others liked), so for now I just decided to keep the old NimForum name.

Certainly if there is interest I will happily consider rebranding.

~~~
tbirdz
What about NimbleForum? Still keeps the Nim reference, while also giving the
impression of a fast and light forum.

~~~
dom96
Hehe, good idea, but that clashes with the name of our package manager:
[https://github.com/nim-lang/nimble](https://github.com/nim-lang/nimble) :)

~~~
reificator
How about Jack, because he's nimble and quick and jumped over the candlestick?

------
WalterBright
The D language forums:

    
    
        https://forum.dlang.org/
    

are powered by DFeed, written in D:

    
    
        https://github.com/CyberShadow/DFeed

~~~
ShorsHammer
Just a note: Those links aren't clickable :(

~~~
SamReidHughes
I clicked them just fine (??).

------
bberrry
Thanks, this is the first thing I've seen actually implemented in Nim. Will be
interesting too look through some actual code.

------
accnumnplus1
Having had only the briefest of looks at Nim (the last 60 seconds), it seems
most comparable to Go - correct? Anyone more clued up feel like contrasting
the two?

~~~
e12e
I'd say go is to c as nim is to Pascal would be one approximation. But that
doesn't really do justice to nim's power in the form of meta/compile time
programming and such.

~~~
k__
I had the impression Nim was Python in fast.

~~~
nitely
Some of the syntax is similar, but similarities end there. Nim was inspired by
many languages: Modula 3, Delphi, Ada, C++, Python, Lisp, Oberon, C# and
Pascal.

------
kybernetikos
The forums seem simple, pleasant and fairly snappy to navigate.

I've recently been looking at 'head-less' CMSs. Does anyone know of forum
software that separates the head from the backend via a well described API?
I'd like to be able to embed a forum into a front end application that I
already have, so having a 'head-less' forum would be pretty useful.

~~~
dom96
NimForum does exactly that. The API probably isn't as stable as it could be
though. Discourse could be another alternative for you.

------
wiradikusuma
I wonder why sqlite? Isn't quite limiting for a client-server app?

~~~
gravypod
What I'm interested in is why write all of your code for a single database?
Are there no query level abstractions for Nim? Even a basic ORM or even a
query-builder would allow portability across systems.

Writing for a single db is a bad idea.

~~~
dom96
Indeed, Nim badly needs a good ORM library. Maybe you'd be interested in
creating one? :)

~~~
gravypod
ORMs are extremely simple to implement. I've written them a few times in Java
for simple things. Primarily you need something equivalent to reflection so
you can read from and inject into any properties that an object might contain.
Does Nim have this kind of feature set?

~~~
dom96
I've never written one, I always thought it's one of those things that sound
simple but actually require a lot of careful thought and design.

Nim doesn't do reflection, but it has some of the best metaprogramming
features including static introspection tools which are far superior to
reflection IMO.

~~~
gravypod
It just takes some opinions. If you haven't developed any yet just take
someone else's opinions. Eloquent is a good start for where to look. The
QueryBuilder frame is a nice platform that makes available many nice features.

------
weego
Why would forum software be a good use case for an SPA?

