openlab-aux / papstehrenwort

Commit yourself to a task. Like a pope.
GNU Affero General Public License v3.0
4 stars 1 forks source link

Haskell Rewrite #5

Open Profpatsch opened 8 years ago

Profpatsch commented 8 years ago

First off: I propose we keep the project in English from now on. :)

The project was a playground for experiments, that’s where all the crazy dependency stuff comes from (and all the files, even though it hardly does anything :D).

UI

HTML written in golang’s templating system. CSS in sass. JS in CoffeeScript.

For HTML/CSS there’t two ways: Template expansion with Shakespeare or full DSL with Blaze/Clay. I’d favor the DSLs, since they are closer to Sass and don’t use TemplateHaskell.

CoffeeScript can be converted to pure JS. In the long term maybe with ghcjs? But for the small function probably not worth the effort.

First Steps

The system consists of

Data management

This implements the task data structures, Invariants (on changes), storage Since it is basically a big ball of “once x happens, change y and do z”, it’s probably a good candidate for FRP?

Scheduler

A continuously running part that fires reminders once they are due

Interaction Handler

Users interact with the system in various ways, through the UI, through clicking links in mails (and possibly others). It makes sense to handle them in a uniform way.

Notification system

Ways to notify users. Mails, RSS, the UI, possibly others.

UI

Serves UI, relays input to data management I’d tend to use Servant for that.

sternenseemann commented 8 years ago

I second the request for english development.

I am also very fond of using Blaze and Clay but not really a fan of using CoffeScript since our amount of JS is so little that an extra dependency is useless in my opinion.

Altough I like Servant it is not at all suitable for Frontend development because it is designed for building REST APIs.

Therefore I'd propose either

sternenseemann commented 8 years ago

README.adoc is translated as of https://github.com/openlab-aux/papstehrenwort/commit/4c0c05c2a60a70a35a72408fdc22a974b06da901

Profpatsch commented 8 years ago

system-idea

Profpatsch commented 8 years ago

How about using a triplestore for the data and then query it with https://hackage.haskell.org/package/hsparql?

4store seems to be a wonderful triplestore. Oh, and it’s in nix, too and has a nixos option set, so it should be trivial to deploy.

SELECT ?task
WHERE {
  ?task a pe:Task
  ?task pe:user "sternenseemann"
}

or similar should return a list of tasks for user sternenseemann. Fun, because the data has no inherent structure, so it’s easy to query, and it should still be faster than writing and reading a json file.

Short SPARQL introduction: https://jena.apache.org/tutorials/rdf_api.html