GithubHelp home page GithubHelp logo

gopiandcode / ocamlot Goto Github PK

View Code? Open in Web Editor NEW
66.0 4.0 4.0 1.97 MB

An Activitypub server in OCaml!

Home Page: https://ocamlot.xyz

License: GNU Affero General Public License v3.0

OCaml 58.97% Roff 3.64% Shell 0.76% CSS 1.28% Raku 2.28% Perl 32.24% Elixir 0.20% Dockerfile 0.64%
activitypub dream ocaml social-media social-network

ocamlot's People

Contributors

gopiandcode avatar hannesm avatar mro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ocamlot's Issues

Compiling on macOS

First thanks for writing this project, I'm excited to have something like this written in OCaml and have a chance to hack on it. The blog post on https://gopiandcode.uk/logs/log-writing-activitypub.html was great.

I'm having issues with compiling this on macOS. The conan dependency fails with this error in an OCaml 4.14.1 sandbox. Have you encountered this issue? Is it possible to work around not having conan available?

$ opam install conan
The following actions will be performed:
  βˆ— install conan 0.0.2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
⬇ retrieved conan.0.0.2  (cached)
[ERROR] The compilation of conan.0.0.2 failed at "dune install --create-install-files conan".

#=== ERROR while compiling conan.0.0.2 ========================================#
# context     2.1.4 | macos/x86_64 | ocaml-base-compiler.4.14.1 | https://opam.ocaml.org/#26770281
# path        ~/code/ocaml/ocamlot/_opam/.opam-switch/build/conan.0.0.2
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune install --create-install-files conan
# exit-code   1
# env-file    ~/.opam/log/conan-14922-5c5eb5.env
# output-file ~/.opam/log/conan-14922-5c5eb5.out
### output ###
# Error: Unknown package conan!



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
β”Œβ”€ The following actions failed
β”‚ Ξ» build conan 0.0.2
└─ 
╢─ No changes have been performed

Separate salts per password

As pointed out to me by @hannesm, each password should have a randomly generated salt rather than hardcoding a single salt for the entire instance.

Contents of OrderedCollection should be a list of objects

Example courtesy of Adam SjΓΈgren via email:

Response from ocamlot from outbox:

      "orderedItems": [
        {
          "@context": [
            "https://www.w3.org/ns/activitystreams",
            "https://w3id.org/security/v1"
          ],
          "actor": "https://ocamlot.xyz/users/gopiandcode",
          "attachment": [
            {
              "mediaType": "image/gif",
              "name": "",
              "type": "Document",
              "url": "https://ocamlot.xyz/images/91eb9074-e08f-4deb-8588-be4b1c78e52d.gif"
            }
          ],
          "cc": [],
          "content": "Got the skeleton of an interaction system now working. As it turns out, sets in Rhombus are not the same as sets in Racket --- if you try to pass a Rhombus set to in-set, then you'll get a runtime crash. Ouch. Oh well, more hacks I guess.",
          "id": "https://ocamlot.xyz/activity/0f5de023-20f3-4319-b990-b5ab5d1ff54c",
          "published": "2023-05-07T15:08:13Z",
          "sensitive": false,
          "source": "Got the skeleton of an interaction system now working. As it turns out, sets in Rhombus are not the same as sets in Racket --- if you try to pass a Rhombus set to in-set, then you'll get a runtime crash. Ouch. Oh well, more hacks I guess.",
          "tags": [],
          "to": [],
          "type": "Note"
        },

whereas from pleroma:

   "orderedItems": [
      {
        "@context": [
          "https://www.w3.org/ns/activitystreams",
          "https://magnetic-ink.dk/schemas/litepub-0.1.jsonld",
          {
            "@language": "und"
          }
        ],
        "actor": "https://magnetic-ink.dk/users/kas",
        "cc": [
          "https://www.w3.org/ns/activitystreams#Public"
        ],
        "context": "https://magnetic-ink.dk/contexts/f021ce62-c5dd-4e79-8364-9ad19b45dc7d",
        "context_id": 35038,
        "directMessage": false,
        "id": "https://magnetic-ink.dk/activities/80818498-e244-4d45-a1c2-52363618845e",
        "object": {
          "actor": "https://magnetic-ink.dk/users/kas",
          "attachment": [],
          "attributedTo": "https://magnetic-ink.dk/users/kas",
          "cc": [
            "https://www.w3.org/ns/activitystreams#Public"
          ],
          "content": "<span class=\"h-card\"><a class=\"u-url mention\" data-user=\"ATFK2cCxqACxzbo0wK\" href=\"https://mastodon.social/@selmins\" rel=\"ugc\">@<span>selmins</span></a></span> I don&#39;t think there is any community here in <a class=\"hashtag\" data-tag=\"denmark\" href=\"https://magnetic-ink.dk/tag/denmark\" rel=\"tag ugc\">#Denmark</a> either. Perhaps I can spend the accumulated <a class=\"hashtag\" data-tag=\"circlesubi\" href=\"https://magnetic-ink.dk/tag/circlesubi\" rel=\"tag ugc\">#circlesUBI</a> at the online market, it&#39;s been a while since I looked into it.",
          "context": "https://magnetic-ink.dk/contexts/f021ce62-c5dd-4e79-8364-9ad19b45dc7d",
          "conversation": "https://magnetic-ink.dk/contexts/f021ce62-c5dd-4e79-8364-9ad19b45dc7d",
          "id": "https://magnetic-ink.dk/objects/eb897a1c-861c-4c41-b7fc-3254ca59916c",
          "inReplyTo": "https://mastodon.social/users/selmins/statuses/110328079126407821",
          "published": "2023-05-07T15:47:48.228058Z",
          "sensitive": null,
          "source": "@[email protected] I don't think there is any community here in #Denmark either. Perhaps I can spend the accumulated #circlesUBI at the online market, it's been a while since I looked into it.",
          "summary": "",
          "tag": [
            {
              "href": "https://magnetic-ink.dk/tags/denmark",
              "name": "#denmark",
              "type": "Hashtag"
            },
            {
              "href": "https://magnetic-ink.dk/tags/circlesubi",
              "name": "#circlesubi",
              "type": "Hashtag"
            },
            {
              "href": "https://mastodon.social/users/selmins",
              "name": "@[email protected]",
              "type": "Mention"
            }
          ],
          "to": [
            "https://mastodon.social/users/selmins",
            "https://magnetic-ink.dk/users/kas/followers"
          ],
          "type": "Note"
        },
        "published": "2023-05-07T15:47:48.227965Z",
        "to": [
          "https://mastodon.social/users/selmins",
          "https://magnetic-ink.dk/users/kas/followers"
        ],
        "type": "Create"
      },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.