13 ms·
Nimforum: Lightweight alternative to Discourse written in Nim
- svnpenn 5y agoThank goodness. I've always been confused by Discourse. Discourse was supposed to be the modern answer to all the homegrown PHP forum solutions of the previous decade. Instead, it just ended up being yet another bloated JavaScript web app. And given who the creator was, especially disappointing.
- iamcreasy 5y agoAre you speaking from a developer or user perspective? As an user, I've always found Discourse to exceptionally user friendly and fluid to use. I find it a chore to navigate a forum that is not using Discourse.
- nathcd 5y agoAgreed. I was initially pretty turned off by the app-iness of Discourse, but after using it for awhile I've come around and actually enjoy it quite a bit now.
- garaetjjte 5y agoDynamic loading and their scroll hijacking makes Discourse horrible to browse.
- iamcreasy 5y agoWould you rather have click + wait to refresh the whole page to see the next 10 post on that thread?
- masklinn 5y ago> Would you rather have click + wait to refresh the whole page Considering it'd be faster than what discourse does, yes. > to see the next 10 post on that thread? If your forum has unconfigurable 10-post pages I would suggest getting a better forum software? One decades-old forum I frequent loads its default 40-post pages in half the time it takes discourse to load a new section, and using half the data, despite having to reload the entire HTML page. And it doesn't waste a third the screen on a virtual thread scrollbar.
- garaetjjte 5y agoOf course. What's wrong with Discourse: (and other silly scroll-hijacking pages): 1. Scrollbar no longer works properly when you try to navigate thread up and down. Normally you make mental note where there is something, and you can go back to it. But in Discourse, it isn't there, because you scrolled down, it loaded more replies, now you go back and there's something else in there. 2. You slowly drag scrollbar with your mouse. You near end of the page... it loaded more content, and now because you're still slowly dragging scrollbar, it again warps to the end, and WTF just happened, where is the thing I was reading!? Everything jumps and you just skipped dozens of replies. 3. Click any link. There's useless loading spinner, but oh well. Click any link, internal or external, and then go back. WTF!? I pressed back button, page should be in the same position it was before! It randomly snapped to some post, up, down, whatever, but it is somewhere else and now again, where is the thing I was reading!? I cannot understand how anybody thought this was good design. It is horrible. Besides issue 3 which presumably could be fixed, issues 1 and 2 are fundamental problems. You cannot have page that have dynamic height and at the same time have scrollbar that is remotely useful. If you really insist on dynamic loading (and I don't know why you would, plain old HTML page is faster anyway), you could preallocate page height so it will work properly, but then you're back to square one: you need pagination.
- iamcreasy 5y agoInstead of using the browser scroll bar I use the thread scroll bar. Thread scroll bar is not affected by dynamic loading. I think Discourse remembers where you were in a given thread and takes you back there when you enter is again.
- bhaak 5y agoYou’re using the browser scroll bar when reading the text of a page to scroll through the text? I’ve never heard or noticed anybody doing this. You must go crazy on infinite scroll webpages. I’m using the PageUp and PageDown keys for page wide navigation and the arrow keys for the lineheight movements. On a desktop machine I’m using the scroll wheel as well. I would only use the scroll bar for pixel perfect positioning of the viewport.
- mishac 5y agoThe fact that discourse hijacks ctrl-f drives me insane. Sometimes I want to jump to a particular part of a thread featuring a word quickly, but discourse gets in the way. And, though this is more subjective, I find the UI confusing. I end up browsing the github issues or even reddit for answers to questions just to avoid discourse on projects that use it (discuss.linuxcontainers.org - I'm looking at you).
- infogulch 5y agoDiscourse doesn't load the whole thread, it's loaded on demand (which is a reasonable choice for many enormous threads), so "quickly" would instead be "not at all".
- mishac 5y agowhich is why phpbb or even (god forbid) reddit is more ergonomic to use for me. If the thread is enormous, then split it into pages. And if it's not enormous, the discourse solution ends up being heavier and slower than just loading the whole discussion at once. Discourse's voodoo ends up being more annoying to me than useful, not unlike infinite scrolling. (obviously this is all subjective..I can only speak to the fact that I get annoyed by it and thus instinctively avoid discourse when I can)
- reedciccio 5y agoYou still have to go through multiple pages in phpbb and similar old forum in long threads. Same issue, usually slower than scrolling down bring the apparent end of page in discourse
- masklinn 5y ago> You still have to go through multiple pages in phpbb and similar old forum in long threads. Except for long threads the start of the thread is usually irrelevant beyond the first page or so (if even that) so you can just jump to a few pages from the end and go from there. Good forum software remains comfortable to use at million-post threads, and will render 100-post pages in a small fraction of a second. IME discourse's "infinite loading" nonsense is just slow and a mess. Go check the Rust discourse's crate of the week thread, it is a slow mess to navigate, the browser's scrollback gets hopelessly lost, and of course the in-page search is broken. That's a thread of a thousand comments, it's quite literally nothing, and for all that it completely fucks up your history to boot.
- howaboutnope 5y agoIt's an alternative to Discourse though, e.g. it's a SPA. Nothing I see in the description entices me in the least... and phpBB and others are still being developed, and still rock.
- hlandau 5y agoBlank page without JavaScript.
- lazypenguin 5y agoDiscourse is great software and makes it so much easier to launch a forum but i personally never enjoyed the interface. Maybe I’m nostalgic, but I prefer the old style *BB interface with explicit categories/sections. Discourse kind of blurs the line with their “stream” style. This looks like an interesting alternative but unfortunately has a similar interface.
- xook 5y agoThat blurred line is what turns me off from using Discourse-based forums. It's a neat idea, but it's too, as you say, “stream” styled. The way I envision it is chat apps are yelling a question in a café, Discourse is walking into said café and setting down a sign then walking out, while classic forums are pinning a note in a library corkboard.
- masklinn 5y agoDitto, I can not stand discourse and am really sad any time I have to interact with it.
- type0 5y agoI wish they would skip unnecessary gamification notifications that make interacting on it tiresome. If you use different discourse forums this noise adds up quickly and starts being irritating.
- ducktective 5y agoThose are not even gamification items...It fails to do whatever it was designed to do...Yaaay your first like...Wowww you replied 5 times...Like, who cares? There is an option named `Skip new user onboarding tips and badges` in preferences though...
- type0 5y ago> There is an option named `Skip new user onboarding ... Thanks for the tip, I had no idea that it could be turned off.
- ducktective 5y agoDiscourse is dynamic and fun but: 1- There is excessive white-space everywhere (like every other modern web-app). I feel like it was designed as a mobile-first solution. 2- There could have been smarter features regarding gamification and karma. Currently you can only hit like button (the total like count of a user is not even visible) 3- If a post has many replies, it only shows them up until a certain point and you have to scroll down to view more. These javascript shenanigans should not exist in a forum app IMO. I have never used a nimforum-based forum but a quick browse in https://forum.nim-lang.org/ https://forum.nim-lang.org/ shows that their UI is more dense (less white-space) which addresses point 1 above.
- jtbayly 5y ago> the total like count of a user is not even visible That’s wonderful. Definitely a fantastic decision to help prevent toxic conversations. So glad that “feature” doesn’t exist on Hacker News or in Discourse.
- ducktective 5y agoBut it does exist on HN. I can see you karma and after a while, the upvote count is visible. When I ask a technical question on a forum, I'd like to know if a user who is deemed helpful in the community (by like count or `solved` count) is replying to me.
- sullyj3 5y ago> 1- There is excessive white-space everywhere (like every other modern web-app). I feel like it was designed as a mobile-first solution. So many programmers have this obsession with interfaces having every available piece of information displayed all at once. I just don't understand the appeal. I find these sorts of interfaces confusing and overwhelming, I literally can't think straight when I look at them. I immediately forget what I was doing due to all the distractions.
- rlp 5y agoIt highly depends on the use case. When people interact with a piece of software all day every day, they tend to appreciate having more information/actions available at a glance. Simple interfaces are better for casual users, but they generally mean more clicking around and tend to be slower to use for experts.
- tyingq 5y agoInteresting. It generates some odd looking JS with a boatload of global vars. https://forum.nim-lang.org/js/forum.js?t=2020-08-2420%3A22%3A46 https://forum.nim-lang.org/js/forum.js?t=2020-08-2420%3A22%3...
- dom96 5y agoThe forum's frontend and backend are both written in Nim, so what you're seeing is the JavaScript that Nim generates. Could definitely use a lot of minification.
- ptx 5y agoHaving all those globals in the code generated by the Nim compiler seems less than ideal, though. Especially since some of them have very generic names like "raiseException" and "addInt", which could conceivably conflict with some other JS library.
- sedatk 5y agoIsn't that more on the library that has globals registered rather than the application which isn't supposed to be shared?
- ptx 5y agoYes, Nim being the library in this case. These names are not defined by the application but are part of the code that the Nim compiler generates for any application. If you wanted to integrate some Nim code in an existing JS application and your existing application already defines the name "raiseException", or "unhandledException", or "framePtr", or "lastJSError", or ... that's going to be a problem.
- sedatk 5y agoYou're right about that. Nim compiler needs better isolation. I thought you were talking about the web app.
- stardenburden 5y agoThis seems nice, loads fast on my slow connection. But there don't seem to be filters, like only showing posts older than a certain date. Or with a certain comment threshold.
- ilaksh 5y agoNim has been using this forum for years. It's been very solid as far as I can tell. In case there are any programmers in this comment thread, more interesting to me than the amount of whitespace or how similar the interface is to Discourse, is the source code. It's a great example of the power of the Nim language for application programming.
- zelphirkalt 5y agoWhat annoys me most about Discourse are the following things: No JS no joy. You see a completely white page, because none of it works without JS, not even an indication can be seen, that JS is required and it is waaay off of anything having a non JS fallback. The above also means, that any knowledge in there will not be found via search engines. I have had it happen, that there was a forum of some community, and I did not even know it existed, even though I searched loads of stuff about the project. It simply never appeared in any search result ever. It is not discoverable. Aside from not being discoverable, I find that any traditional forum software works better than discourse. For example I cannot properly see when exactly a reply was written, because it abstacts from a simple timestamp and shows only a month and year for example.
- lf-non 5y ago> I find that any traditional forum software works better than discourse. For example I cannot properly see when exactly a reply was written, because it abstacts from a simple timestamp and shows only a month and year for example. Yes, I agree. I like the FluxBB based forum that Arch community uses and find the look & feel a good balance between excessive use of whitespace and overly cramped UIs. > No JS no joy. You see a completely white page, because none of it works without JS, not even an indication can be seen, that JS is required and it is waaay off of anything having a non JS fallback. I am not sure if this is configurable but the official kotlin forum [1] uses discourse and I can see the content when js is disabled. A lot of interactivity is disabled but the footer does have a clear message that the site is best viewed with js enabled. I have often found kotlin forum posts through google search, so there doesn't seem to be any issue on the SEO front. [1] https://discuss.kotlinlang.org https://discuss.kotlinlang.org
- codinghorror 5y agoYou are thinking of Nim with the white page; Discourse serves up a page with JS disabled. Try it! And of course everything is searchable. We would literally go out of business if we sold a web product that didn't index in Google. As for the timestamp, click or hover over the timestamp to see the full date/time, etc.
- freediver 5y agoBecause this is coming from nim and nim design goals are to be efficient and elegant I can not help but notice the excessive bloat. The main forum page is 4MB of data (~700kb compressed) to basically communicate 3KB of information (plus avatar images which should not be more than few kb total anyway). This is still better than original Discourse which for this same thing needs 6MB of data (1.2MB compressed). However Discourse does not claim to be efficient or elegant. This kind of web performance engineering attention to detail will go a long way. The benefits for users on slower connections are particularly important. And as an engineer, showing few KBs of information with few MBs of data should bother you. Your information to data ratio is less than 1%. Excessive reliance on JS does not help. The best way to think about JS is as a feature enhancer not a feature requirement. See also: https://idlewords.com/talks/website_obesity.htm https://idlewords.com/talks/website_obesity.htm Having said that I think it is absolutely great that you are doing this and I hope we can get efficient and elegant forum software. This will certainly help nim adoption if executed in the way that is true to your values. Edit: A competitor has been mentioned in comments: https://fluxbb.org/forums/index.php https://fluxbb.org/forums/index.php They are showing similar amount of information in "only" 100KB of total data. And 80% of it is CSS (which does seem excessive for what it does, I am sure 5KB of CSS would do the same job taking that page to amazing 25KB of total data).
- masklinn 5y ago> Because this is coming from nim and nim design goals are to be efficient and elegant I can not help but notice the excessive bloat. The main forum page is 4MB of data (~700kb compressed) to basically communicate 3KB of information (plus avatar images which should not be more than few kb total anyway). As a basis of comparison, HN's home is 43k, and old.reddit.com is currently 3.16MB including all assets, the sole markup is 363K (gzip'd to 104).
- tyingq 5y ago3MB of the 4MB data appears to be JS, and a lot of that repeated calls to recaptcha_en.js, which would be cached after the first call. Though I don't know if all those repeated calls are really needed.
- khaledh 5y ago
- emptysongglass 5y agoCan someone point me to forum/message board software that doesn't use JS at all? Like Sourcehut but for forums.
- thewakalix 5y agophpBB gets pretty close to this; although it does use JS for a few niceties, it’s not just usable but almost identical when JS is disabled (IIRC).
- lf-non 5y agoFluxBB [1], the PHP based forum that powers the Archlinux wiki works fine without JS, and IMHO looks fine too. If you are looking for something minimal with threading support, fossil scm [2] includes a forum. You can checkout the forum for fossil itself which is powered by fossil. [1] https://fluxbb.org https://fluxbb.org [2] https://fossil-scm.org/ https://fossil-scm.org/ [3] https://fossil-scm.org/forum/forummain https://fossil-scm.org/forum/forummain
- epilys 5y agoI recently wrote one: https://github.com/epilys/sic https://github.com/epilys/sic
- emptysongglass 5y agoI am loving this, thanks for sharing. My only request would be for a publicly hosted image so I can easily selfhost for my own little campfire community.
- mhh__ 5y agoDFeed, the program that runs forum.dlang.org might be of relevance to this discussion
- fswwi 5y agoThere's also a lightweight alternative to Discourse written in Rust: http://pfpmd7dd5ijt4add2sfi4djsaij4u3ebvnwvyvuj6aeipe2f5llptkid.onion/ http://pfpmd7dd5ijt4add2sfi4djsaij4u3ebvnwvyvuj6aeipe2f5llpt... (You have to install Tor Browser to open these onion links https://www.torproject.org/download/ https://www.torproject.org/download/) The source code is open - GPLv3 License.
- antifa 5y agoDoes it literally have no presence outside of Tor? Most people really don't want to download an extra browser just to see a random software project.
- fswwi 5y agoYes, it has no presence outside of Tor. More people should know about Tor and use it. (There are clearnet->tor gates, but you should not use them.)
- betwixthewires 5y agoIs there a clearnet repo? Or a name for the project perhaps so I can look for a clone?
- fswwi 5y agoNo. Install Tor. That's the only way. The name of the project is pfpmd. (There are clearnet->tor gates, but you should not use them.)
- lostdog 5y agoI tried out Nim earlier this year. Great language, but the forum was very frustrating to use. Every page takes a few seconds to load. If you open a page in a new tab, you still need to wait for it to load when you switch to the tab. The forum was the most annoying thing about using the language. Go try it out: https://forum.nim-lang.org/ https://forum.nim-lang.org/
- dom96 5y agohuh, that's strange. I've never seen any page on the forum take longer than a few ms to load. Just navigated through a couple of threads and all appeared nearly instantenously. Can you share a bit more about your hardware/setup?
- gunapologist99 5y agoI definitely see a discernible delay, on some pages more than others. Measuring on a heavier page (https://forum.nim-lang.org/t/1207 https://forum.nim-lang.org/t/1207) produced a result of more than seven seconds for a full page load, but to full readable load / DOM mostly complete (if I wasn't watching devtools, I would have figured it was fully loaded) was only around two seconds. Definitely not just a few ms, though.
- cycomanic 5y agoInteresting, I just tried on my phone using Firefox and could see things in less than a second.
- lostdog 5y agoThe machine is a 4 year old, very lightweight laptop, running Ubuntu, with Chrome. I'm regularly seeing 500ms on page loads. Very frustrating when you open pages in new tabs, but they're not loaded when you go to switch over.
- jhoechtl 5y agoNim looks cool. Is there somewhere a "concepts" documentation? Not in the sense of language concepts but "environment" concepts. How is code generated? Using llvm-lib, transpiling to C, js? Interaction with other libraries?
- Celeo 5y agoHere[1], perhaps? > transpiling to C, js Yes to both of these. [1] https://nim-lang.org/features.html https://nim-lang.org/features.html
- sim_card_map 5y agoDoesn't work without JS. Pass.
- westurner 5y agoawesome-selfhosted > "Communication - Social Networks and Forums" doesn't yet link to Nimforum: https://github.com/awesome-selfhosted/awesome-selfhosted#communication---social-networks-and-forums https://github.com/awesome-selfhosted/awesome-selfhosted#com...
- sebyx07 5y agokeep up the good work nims
- lenkite 5y agoNever liked Discourse's UI. I so wish there was an OSS discussion forum software like old reddit.