!czMMOAMMavgTuashsH:matrix.org

suros

4 Members
A single-user responsive object server implemented in Elisp. See https://emsenn.neocities.org/suros.html for documentation and source.1 Servers

Load older messages


SenderMessageTime
27 Jul 2019
@emsenn:matrix.orgemsenn

(No, there's still no activitypub, but that's not a superbig priority as at the end of the day, that's just sending and receiving JSON requests which isn't much different than recieiving them in the command line.)

22:21:16
@emsenn:matrix.orgemsenn

I really have basically just built a MUD engine, minus the ticking services and user authentication/profiles.

22:22:24
@emsenn:matrix.orgemsenn

I haven't in a bit so let me explain an object: it's a hashtable with three hashtables itself: one for its headers (metainformation about the object, not really used right now,) one for its data: the teraum-project object will have data like project-name, object-title, so on, and the third hashtable is for renderings: each time the object gets rendered as a given form, it gets put into that hashtable. forms are functions that take in an object and return out a string: for example the text-project-brief form takes in an object and spits out the text "{{project-name}} is {{project-description}}."

22:26:01
@emsenn:matrix.orgemsenn

Each function that works with an object should make a copy of it and work on that and return that, leaving the original object unchanged - fuck side-effects.

22:26:58
@emsenn:matrix.orgemsenn

So written out, an object near the tail end of its processing - its been made-up and rendered into all its forms, might look something like this: (ht (:headers (empty-hash-table)) (:data (:object-language-code "en") (:object-author "emsenn") (:object-title "Teraum") (:object-description "Teraum is a a tragically funny fantasy setting.") (:project-title "Teraum") (:project-description "a tragically funny fantasy setting.")) (:renderings (:text-project-brief "Teraum is a tragically funny fantasy setting.") (:text-object "TERAUM\nby emsenn\n\nTeraum is a tragically funny fantasy setting.")))

22:31:16
@bandali:matrix.orgbandali joined the room.22:52:17
@emsenn:matrix.orgemsennHello!22:58:13
@bandali:matrix.orgbandali hi emsenn ! 23:00:05
@emsenn:matrix.orgemsennSo I don't have the source available anyway because I keep tearing it down and rebuilding it but yeah: elisp object server. takes in elisp data, churns it into "objects," described above, spits it back out23:02:20
29 Jul 2019
@emsenn:matrix.orgemsenn

So I've churned all the code over again.

02:04:55
@emsenn:matrix.orgemsenn

Well, not all of it, but a fair chunk- I'm trying to get the "take a request and process it properly" process down before moving on.

02:07:09
@emsenn:matrix.orgemsenn

I think I'm going to have a list of objectmakers, like I do now, but each has a few keys, not just is a value - not just a "take an object and make it into the thing," but "here's a string, give me an object" or "here's a symbol, give me an object" or "give me a list of all strings/symbols you know about"

02:08:59
@emsenn:matrix.orgemsenn

Right now I have an elisp "package" called "ems-library" that's its own datastructure. I can write three functions that perform the above (or well, two, since there's no symbols to look up) and then add those... well okay now my cat's meowing and I can't keep a train of thought

02:11:08
@emsenn:matrix.orgemsenn

I can add those functions as the values to the keys mentioned above, in a table, and then requests can have not just the symbol but which key in the table to look up.

02:14:28
@emsenn:matrix.orgemsenn

(I expect this to be gibberish to anyone reading... especially toward the end because my partner was harassing our cat so I had both baby talk and meowing happening like two feet from my head.)

02:15:01
@emsenn:matrix.orgemsenn

truly awful

02:16:05
@emsenn:matrix.orgemsenn

So, update, but I'm renaming it "ros" instead of "suros" because I realized that there's no real concept of "user," it's just a responsive object server. So my implementation of a ros (gross without the g) is ems-ros.el

04:21:28
@emsenn:matrix.orgemsenn

(Isn't early alpha Fun?*) (*Fun in the dwarf fortress sense, which I was going to link to an explanation of but am not finding one: it's basically poking fun at mistaking difficulty and lack of understanding as being "fun." It's... not.)

04:24:35
@librarianmage:matrix.org@librarianmage:matrix.orgRedacted or Malformed Event22:31:41
@librarianmage:matrix.org@librarianmage:matrix.orgRedacted or Malformed Event22:31:43
@emacsomancer:matrix.orgemacsomancerI like the name 'suros' generally; maybe it can be repurposed.22:51:41
@emsenn:matrix.orgemsennyour ros could be slade's ultimate responsive object server :D22:54:51
30 Jul 2019
@emsenn:matrix.orgemsennyes that's the page on Fun00:40:41
1 Aug 2019
@emsenn:matrix.orgemsenn

Y'know a really nice quality of life extension for Emacs? centered-cursor-mode

20:23:03
@emsenn:matrix.orgemsenn

Especially on my tall screen.

20:23:21
2 Aug 2019
@emsenn:matrix.orgemsennimage.png
Download image.png
04:25:41
@emsenn:matrix.orgemsennI've been quite about it but been making decent progress with the concept of personal responsive object servers. here's an image that shows something, lol04:25:42
@emsenn:matrix.orgemsenn

The six steps from receiving a request to sending a response are

  1. the ros reads the request
  2. the ros passes on the relevant information to the relevant object maker.
  3. that objectmaker returns a "rosian object," a table of headers, data, and rendered forms. at this point the object might have some headers and will have some data.
  4. the ros passes that made object to an object former.
  5. the object former renders some stuff based on the object's data and headers and hands it back to the ros
  6. the ros sends the formed information back to the request
04:28:46
@emsenn:matrix.orgemsennthe objectmaker and objectformer functions don't have to exist as part of the ros, to be clear about this - for example rn i'm playing with a couple packages as demo data sources, an ems-library.el and an ems-projects.el And each contains a function, say ems-projects-make-rosian-object-with-symbol, that accepts a rosian object and a symbol, and optionally a list of other variables. the symbol is a key in that package's data store. Within the ems-ros.el package, there's a ems-ros-object-makers table that has projects as a key and ems-projects-make-rosian-object-with-symbol as the value, and so that table can be extended with symbol->maker pairs as I come up with them. Any maker has to accept an object, symbol, and optionally, a list. Formers work the same way04:34:45
@emsenn:matrix.orgemsennimage.png
Download image.png
04:43:00

Show newer messages


Back to Room ListRoom Version: 4