Trolli Schmittlauch schmittlauch
  • Joined on 2017-06-16
schmittlauch pushed to dhtNetworking at schmittlauch/Hash2Pub 2020-05-22 22:02:55 +02:00
059cc5fcc9 extract queryID message sending function so it can be used for first join
schmittlauch pushed to dhtNetworking at schmittlauch/Hash2Pub 2020-05-22 00:06:32 +02:00
16769d1395 Merge branch 'refactorNodeState' into dhtNetworking
bbe7078369 adjust tests to work with new NodeState types
e8091b0a29 change all function definitions to new NodeState types
fe673dc255 make NodeState a typeclasse, define setters and getters on its representations
Compare 4 commits »
schmittlauch opened issue schmittlauch/Hash2Pub#22 2020-05-21 10:23:55 +02:00
Use only main domain name for NodeID generation
schmittlauch pushed to dhtNetworking at schmittlauch/Hash2Pub 2020-05-20 19:28:10 +02:00
99a2b0ba09 add instance deriving instructions
f6c252d314 sending a queryID request compiles (untested)
Compare 2 commits »
schmittlauch opened issue schmittlauch/Hash2Pub#21 2020-05-20 17:23:25 +02:00
Why the hell does FOUND use a Set?
schmittlauch opened issue schmittlauch/Hash2Pub#20 2020-05-20 14:30:52 +02:00
Refactor common accessor functions of internal and remote NodeState to a type class with 2 types
schmittlauch pushed to dhtNetworking at schmittlauch/Hash2Pub 2020-05-19 19:50:45 +02:00
beffab99a0 clarify counting of FediChordMessage parts
c31baa3635 run stylish
8d18f952cd implement send-receive-acknowledge-retry loop for requests
Compare 3 commits »
schmittlauch commented on issue schmittlauch/Hash2Pub#19 2020-05-19 19:40:18 +02:00
background job processing for delivering ActivityPub pushes

This one pulls in Postgres. I still have to decide on how to persist data, will probably ask around in the SocialHub thread quite soon.

Note to self for further reading: https://www.haskelltutorials.com/odd-jobs/haskell-job-queues-ultimate-guide.html

schmittlauch commented on issue schmittlauch/Hash2Pub#19 2020-05-19 19:28:24 +02:00
background job processing for delivering ActivityPub pushes

The DHT layer also needs to schedule regular maintenance jobs, but as those won't pile up such an asynchronous background processing worker queue isn't necessary.

schmittlauch commented on issue schmittlauch/Hash2Pub#18 2020-05-19 19:25:37 +02:00
Main.hs should not live in src/

I'll take care of this at the next larger feature branch merge.

Can you point to some examples for this convention? The Main.hs didn't always reside in src/, but I moved it there after looking at other packages (I guess pandoc was one of those).

schmittlauch opened issue schmittlauch/Hash2Pub#19 2020-05-19 19:22:50 +02:00
background job processing for delivering ActivityPub pushes
schmittlauch pushed to dhtNetworking at schmittlauch/Hash2Pub 2020-05-19 16:52:45 +02:00
0e6f126b3b Merge branch 'master' into dhtNetworking
b8eeb852da Merge pull request 'Linting integration' (#17) from Hecate/Hash2Pub:hlint-configuration into master
7fd369c8c5 add stylish as haskell linter
41e999ed99 Linting integration
d049b65f1e add readme
Compare 6 commits »
schmittlauch merged pull request schmittlauch/Hash2Pub#17 2020-05-19 16:36:00 +02:00
Linting integration
schmittlauch pushed to master at schmittlauch/Hash2Pub 2020-05-19 16:36:00 +02:00
b8eeb852da Merge pull request 'Linting integration' (#17) from Hecate/Hash2Pub:hlint-configuration into master
41e999ed99 Linting integration
Compare 2 commits »
schmittlauch pushed to master at schmittlauch/Hash2Pub 2020-05-19 16:33:03 +02:00
7fd369c8c5 add stylish as haskell linter
schmittlauch pushed to dhtNetworking at schmittlauch/Hash2Pub 2020-05-19 16:31:00 +02:00
84bcd676ae move protocol data definitions to own module to prevent cyclic imports
schmittlauch commented on pull request schmittlauch/Hash2Pub#17 2020-05-19 13:16:50 +02:00
Linting integration

Thanks for these opinionated insights, they're a good starting point for Haskell newbies like me.

I need some clarifications though:

  • Import lines ordering;

Regarding the imports, I am of the school that says “non-local imports are noise, put them on top, and keep the local imports as close as your code as possible”.

So you're basically recommending to put imports of haskell platform and other libraries first, and the module imports from the same package should appear last? I already tried to follow that rule, but may not have been consistent.
What is the import oordering you suggest? base ==> haskell-platform ==> package local imports?

  • Preferring pure over return;

Why should pure be preferred over return in general? I always tried to use both of them depending on the context: When writing applicative-style functions, I used pure to make the applicative nature of the functions obvious, when messing around inside monads (e.g. with do notation) I used return to highlight the monad stuff, even when `pure could've been enough (example: Maybe).

schmittlauch pushed to dhtNetworking at schmittlauch/Hash2Pub 2020-05-19 00:09:54 +02:00
4e62bb08f8 add readme
schmittlauch pushed to master at schmittlauch/Hash2Pub 2020-05-19 00:02:07 +02:00
d049b65f1e add readme
60c164dbb0 remove unnecessary directory level
571fb3dabc fixup! remove unnecessary directory level
4af8a4ce78 more build instructions
6b16ad8033 add readme
Compare 78 commits »
schmittlauch pushed to master at schmittlauch/Hash2Pub 2020-05-18 23:55:25 +02:00
571fb3dabc fixup! remove unnecessary directory level