News for hackers. Stuff that matters.
Re:Vrs: Personal Software Runtime inspired by Emacs, Plan 9,... by ConanRus on Friday May 30, 2025 @01:32PM (#44138331)
Looks good, but Erlang gen_srv, supervisor analogs needs to be created, along with the standard Erlang messaging logic around it, for this project to be useful.
Re:Vrs: Personal Software Runtime inspired by Emacs, Plan 9,... by upghost on Friday May 30, 2025 @05:48PM (#44140181)
could you dive into the gen_srv a bit more? From what I understand about erlang the value prop is already enormous, what extra does gen_srv add? It seems like people who Erlang understand this intuitively so I haven't really been able to find it explicitly explained anywhere
Re:Vrs: Personal Software Runtime inspired by Emacs, Plan 9,... by asabil on Friday May 30, 2025 @06:19PM (#44140359)
`gen_server` is an abstraction over the a client sending a `request` that a server services to produce a `response` to be sent to the client.

The `gen_server` implementation takes care of things like timeouts, servers terminating before a response is produced as well as maintaining the server state.

You can read more here at [1], [2] and [3].

[1]: https://learnyousomeerlang.com/clients-and-servers#callback-...

[2]: https://www.erlang.org/doc/system/gen_server_concepts

[3]: https://www.erlang.org/doc/apps/stdlib/gen_server.html

Re:Vrs: Personal Software Runtime inspired by Emacs, Plan 9,... by vector_spaces on Friday May 30, 2025 @06:44PM (#44140481)
I'll add to this that the "abstraction" component of this description is key and the use-case for a gen_server is far more broad than what you might expect in say a networking or web context.

You would use them for instance when you need to group behavioral units with a defined interface, even if you don't require any explicit networking.

This is a bit reductive and wrong in some ways but think of gen_server modules and instances as "sort of" like classes/objects. You "send messages/requests" instead of "calling methods," but the spirit is essentially the same -- it's a way of modeling the world with code

Re:Vrs: Personal Software Runtime inspired by Emacs, Plan 9,... by skeledrew on Friday May 30, 2025 @08:06PM (#44140886)
> You "send messages/requests" instead of "calling methods,"

Sounds like Smalltalk.

Re:Vrs: Personal Software Runtime inspired by Emacs, Plan 9,... by igouy on Saturday May 31, 2025 @11:41AM (#44144982)
"Computing should be viewed as an intrinsic capability of objects that can be uniformly invoked by sending messages." p 290

1981 "Design Principles Behind Smalltalk"

https://archive.org/details/byte-magazine-1981-08/page/n298/...

Re:Vrs: Personal Software Runtime inspired by Emacs, Plan 9,... by upghost on Sunday June 08, 2025 @02:03PM (#44218508)
Appreciate all sibling comments, they encouraged me to dig further. Read Joe Armstrong's book "Pragmatic Erlang" and the section on gen_server was nothing short of breathtaking. What great and terrible power!!!
Re:Vrs: Personal Software Runtime inspired by Emacs, Plan 9,... by leoshimo on Friday May 30, 2025 @09:03PM (#44141148)
gen_srv, supervisor analogs needs to be created

Agreed on `supervisor` - that's high up on my list to tick off when the occasion arrives.

On `gen_srv` - while there's room to iterate, I consider the `spawn_srv` / `bind_srv` to be a sufficient analog for me:

https://github.com/leoshimo/vrs?tab=readme-ov-file#services-...