As a way to learn coding Safe apps, I am putting together a basic forum that works on Safe.
This is mainly based on the comment plugins example by Maidsafe. I didn’t work fast enough so it doesn’t include editable comments yet, but this is on my TODO list !
I am currently working on adding ignore Ids, ignore lists, ban lists, and in a second phase I will try to make the messages as editable markup language, hopefully with image and media upload.
I hope you enjoy it, and that we can talk together on : safe://simple-forum
EDIT : the above link was just updated due to alpha2 account put shortage and creating a fresh one.
Got that with safe browser 0.6.0. Will try 0.7.0. FYI: was able to make a post, and then it kinda died. Possible that my post actually screwed something up?
can confirm it doesnt work on 0.6.0
and that it works in 0.7.0
also there seems to be a problem with likes. I can like posts but when I refresh the page it drops to 0 again.,
edit: plus points for not being able to like as anonymous (while anonymus I cant like at all, which I think is intended)
I just posted a new version of the forum on : safe://simple-forum ( note the url change ).
Hopefully this version adresses the likes issue where non owners could not store their likes.
EDIT : nope … bug hunting continues
!
EDIT 2 : woot !! now with working likes !
I have seen this triggered from time to time, too, I didn’t find a pattern to reproduce it yet. Did you visit unlogged ? Or did you log in with the authenticator after entering the forum ? Or, open in a new tab ? these are reasons that come to my mind.
Some people also mentionned the 0.6.0 browser causes this, and didn’t have the issue with 0.7.0
Yes I’m pretty sure the new editable forums require 0.7.0. Works well for me, although I had one crash with a ‘couldn’t connect to the network’ error necessitating a browser restart. One question: what is it that causes the delay in the “initialising topics” process?
I had this one too - possibly some handles that I forgot to free here and there …
my understanding of the non-editable comments plugin code would make me say that this is simply a matter of waiting for the network to respond to the various requests that are made : initializing the app, authorizing, connecting, then fetching data for topics or replies, likes, etc … There is quite a bit of these happening when you load the page, and they sum in a quite visible load time. Then only when everything is pulled off the network, the app renders the screen.
I suppose this relates to my questioning about if we should free handles after each use or not , in the present case we free them almost every time, so we need to fetch them again, which costs both in time and network stress. I think one could optimise a lot by only freeing what is really not going to be used later, and keep everything else on hand for later. This would eat memory instead of time.
Also, this is all built around Mobx and React, which ,despite helping a lot with modularity and design, cost a lot in processing and memory. I am not experimented with these modern languages, and was grown at the age of assembly and C. In fact I would like a lot to be able to code these directly in C or Rust for example. Not only for speed but also for security concerns. But it would mean reinventing the wheel for design and display.
I’ve noticed it with quite a few SAFE apps - there’s a pause as they ‘boot up’ after which they generally tick along at a decent speed, sometimes slowing up when they write to the network. I’m sure it will be optimised at a later stage, indeed it’s important that it is for user acceptance, but really I’m just curious to know what the bottlenecks are.
I made a change to how the posts are structured, so your previous messages will all be deleted. ( I don’t think there was anything really important there ! )
This version brings :
very basic Markdown editor for topics and replies. Links and images are not supported yet, I still am working on porting the simplemde editor to Safe ( mainly stripping anything http :// from it , and converting to safe:// )
Replies count display : how many replies a topic recieved
Activity display : the time elapsed since a topic was replied
Working delete for the owner of the ‘domain’
Some CSS polishing
Next steps will be porting everything to the new API, enabling images and links, validating entries against nasty injections, enabling categories, ignore and ban lists.
There still needs a major cleanup in the code, and some bugs appear regularly, but I will try to address these , soon !
EDIT - I just spotted a little bug in the replies count and activity, so the first topic will have a replies reading a bit off : ) makes me think I should count keys instead of incrementing when publish )
I’d say, both. As long as I’ll be able to afford the time that it takes, I will keep having fun learning as I make it evolve towards something like we have here on discourse !