I’m not fan of full JS websites, when most pages can be cached server-side and will be (about) the same on each reload.
A link to forum.nim-lang.org in the git repo would be nice, though. :-)
The rst-syntax example page is interesting, as we’ve learned on 1st April on @lobsters, you want to scrape/mirror/resize/convert foreign image embeddings.
Thanks for the feedback, I added a little link below the image to forum.nim-lang.org.
Indeed, this issue regarding foreign image embeddings didn’t even pop into my head. I shall make a note of it and hope nobody embeds a huge image in the meantime :)
Ah, completely missed that the image is a link to the forum, but now it’s better - might become a longer list, once more projects are using NimForum :-).
PS: Maybe one could get you a lobsters “nim-hat”.
i didn’t see anything with noscript turned on, which unfortunately disqualifies the project from use.
to not leave anything out, i should also say that nim-forum is using a fairly loose definition of “lightweight.” maybe compared to discourse it is. but fluxbb 1.2.24 is written in under 9000 lines of PHP, with the only other dependency being some database. nim has a longer list of dependencies, and the dependencies themselves are quite heavy.
I’m genuinely curious why this disqualifies the project. Is it just a point of principle? Is it that you do not deem it safe to execute JS on websites?
I don’t consider fluxbb and mailing lists to be alternatives to be honest. The former is a classic forum and the latter is, well, a mailing list.
I just checked and the current codebase is 5300 lines of code. Which dependencies are heavy?
One example of why SPAs cannot be used: if anything goes wrong, the whole site just breaks. On my phone (Blackberry Q10) https://forum.nim-lang.org/ just loads a blank white page and nothing more.
That’s a good point. In the future it might be possible to pre-render the HTML on the server-side (it should be especially easy as the frontend is written in Nim too) and gracefully downgrade the experience (full page reloads on all links). I think for right now though, the current forum handles 90% of the use cases well, do remember that this is the initial version.
Btw I would appreciate any more information about the Q10 failure, is JS simply disabled there? or is it not handling the forum’s JS properly? If you could open an issue on GitHub that would be brilliant.
I assume it’s not handling the forum’s JS properly. If I get some time I’ll try to figure out how to hook up the web inspector, see what the error is, and open an issue :)
ah, i was being an idiot w/r/t to the listed dependencies. none of those are all that heavy. sorry about that!
why is a “classic” forum like fluxbb not considered an alternative to discourse/nimforum?
Honestly, the only differences between classic forums and Discourse I’ve ever noticed are (1) the default Discourse theme is “modern looking” [meh] (2) Discourse integrates very well with email and is basically a fancy mailing list archive where you can choose to get only some threads or categories by email [very good]
ah so you can post via email? that does seem useful.
I love the minimal dependencies and easy database. Should make it much easier for hobbyist operators.
The advantage of Discourse is the business model. They will be in business and supporting their system 5 years from now. The odds are that this project will not.
Thank you! Glad you love it :)
Indeed, that is Discourse’s advantage. All I can say is that this project has already been around for more than 5 years, albeit in a much different form, so it is likely to stick around for another 5. Perhaps I should look into copying their business model, I do find it sorta insane that they are charging $100/month minimum for hosted instances of Discourse, but I suppose that is how they make money to support their project.
You are thinking like a developer, not a pricing expert. There are plenty of cases where $100/mo is quite cheap. As a business, you want to get customers with lots of budget and little actual traffic demand. Customers are thinking of it as a service they don’t need to staff and manage through IT. Think in terms of value you provide, not your costs to provide that value, when pricing.
Feel free to join my happy hour some week if you want to talk about building a business on your open source:
Just saw your reply. Makes a lot of sense! I’ll definitely check out your happy hour, thanks :)
How much Nim should one know in order to be able to maintain an instance? I tried setting up a Discourse server and found it somewhat onerous - even knowing JS and Rails.
There should be no knowledge necessary. If you want some advanced customisation of the produced HTML then you may need to dive into the code, but otherwise my aim is to just give you two executables, one for the backend and one for the initial set up.
My main priority so far was to get forum.nim-lang.org up and running. I also wanted to gauge interest to see if people would actually like to use this instead of Discourse. My objective in the long run is to provide release tarballs to spare the trouble of installing the whole Nim ecosystem. If there is interest I will certainly do that.
How does one properly back up a SQLite based application like this? Regular DUMP to text files and then put it in S3 or somesuch?
There are two options - a shared lock, or the online backup API
https://sqlite.org/backup.html describes both.
Much better answer than mine. I’m going to downvote myself.
Thanks for sharing this link. I have been using the “copy” method described by @akkartik for years with no issues, but I can understand why that is risky. I’ll have to look into implementing this in the NimForum.
You can literally just copy the .sqlite3 file(s).
“A complete database is stored in a single cross-platform disk file. Great for use as an application file format.” (https://www.sqlite.org/features.html)
How does that work? As in, how do you guarantee that the DB is in a consistent state when you do the copy? Or for a large DB how do you guarantee that the state won’t change DURING a copy?
Oh yes you have to bring it down to ensure consistency. But that would also be true for the options you listed above.
I didn’t see any options listed by @feoh, but you probably already know this but I’ll say it for others: DBs like PostgreSQL, Cassandra, Riak, etc provides mechanisms to do backups without stopping your application. At an administrative cost, though.
It’s a nonissue, lvm volumes can do live snapshots of ext4 filesystems, so can zfs and btrfs and others. Very easy to do live backups of sqlite with no downtime. Sqlite itself has no problem with snapshots as it is designed to be resilient to power failure, which is what that would look like.
I was referring to “Regular DUMP to text files and then put it in S3 or somesuch?”
One wonders how this forum would perform under load with sqlite. Looking at the code I didn’t see any considerations for insert/update contention, or even anything to set sync or journal mode.
How big a community are you thinking of hosting? I’d expect you would have zero troubles on an SSD at <100 active users and I wouldn’t expect much slowdown at <1000.
It’s not listed in the features and I can’t load the demo… does this support receiving all forum messages by email and replying by email? I consider those the killer features that set discourse apart from other forums
You should look at D language forum’s source for that. It is an NNTP / mailing list web frontend / forum software, news aggregator and IRC bot in one.
Afraid not. That would indeed be a very nice feature.
This is very cool! Congrats on shipping.
Using control-click to open in a new tab is broken for some reason, fixing that would be great!
Thank you, and thank you for taking a look :)
Odd that the control-click issue is still present. I thought I fixed it for both Ctrl and Cmd (for Macs), unfortunately I only have a Mac with me so I can’t verify the Ctrl issue. I’m checking for ctrlKey, I wonder if it isn’t true for some reason.
I’m on Firefox on Windows, hm. Maybe I’ll see if I can fix the bug.
So, I went to look at this today and it works perfectly now. I don’t know if anything changed, but it seems to work just fine.
Wow, you have a good memory :)
We did fix some IE bugs, likely was the same issue.