gopiandcode / ocamlot Goto Github PK
View Code? Open in Web Editor NEWAn Activitypub server in OCaml!
Home Page: https://ocamlot.xyz
License: GNU Affero General Public License v3.0
An Activitypub server in OCaml!
Home Page: https://ocamlot.xyz
License: GNU Affero General Public License v3.0
https://mastodon.social/@[email protected]/110286424755582597
Open original link gets https://ocamlot.xyz/activity/065e55c0-1ccd-4eb2-a8c2-b48b4fffb037 which obtains some json, instead of https://ocamlot.xyz/post/065e55c0-1ccd-4eb2-a8c2-b48b4fffb037 which is probably what a user wants to see.
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
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.
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'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'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"
},
ocamlot/lib/activitypub/decode.ml
Line 306 in 11dc838
You probably mean fail
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.