Live data from Hacker News

Show HN: Lyceum – An MMO game built with Zig and Erlang

github.com

51–60 of 72 posts

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#51
post #15
post #7

Pretty amazing effort, this looks like a great labour of love! I can't give feedback on the code/technology, but on the writing on the lore section, I would try to simplify the writing. For instance the following: > The reverberations of the trumpet stirred the knights from their deep repose, igniting a tumultuous awakening. With swords unsheathed and hearts ablaze, they clashed in a thunderous symphony of war, each…

It's definitely a matter of taste. The first version has flavor, the second is flat. The first reminds me of the style of writing that got me hooked on MUDs.

LOUD MUSIC BROUGHT ALL THESE ANGRY SWORD GUYS TO THE YARD AND YOU WON’T BELIEVE WHAT HAPPENED NEXT

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#52
post #21

What's your experience been like with Nix? How do you feel about devenv vs stock Nix? How are you getting devenv to work, as I don't see a devenv.nix file. I'm still a Nix beginner and would like to find ways of integrating it more into my development and improving my current techniques.[0] [0] https://mtlynch.io/notes/nix-dev-environment/

So, we've been using devenv for some time now and it's useful for describing a monorepo-like environment that zig-enjoyers can quickly code and test their changes on the latest version of the erlang server. Also, it's incredibly easy to also manage postgres from there.

It's great if you like local-first development experience.

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#53
post #7

Pretty amazing effort, this looks like a great labour of love! I can't give feedback on the code/technology, but on the writing on the lore section, I would try to simplify the writing. For instance the following: > The reverberations of the trumpet stirred the knights from their deep repose, igniting a tumultuous awakening. With swords unsheathed and hearts ablaze, they clashed in a thunderous symphony of war, each…

This definitely has a GPT smell, at no fault of the creator. Reminds me of a PR i reviewed about a simple security patch, where the description said "The following changes have been implemented to strengthen our role-based access policies and system security" - Like yeah, it's security patch. A small tweak to his prompt would probably do the trick

I wrote that down as an inspiration of Paradise Lost by Milton. The original idea was to appeal to the phonology of English and structure it as a sonnet, but that got rushed

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#54
post #29
post #18

Earlier quoted context omitted.

I see now, you are sending messages directly to Erlang server so you don't have to worry about network sockets. In my experience the issues with Erlang come with working with data structures, records are not flexible and there is not much one can do to abstract the boilerplate.

Having a potentially untrusted client connect to the erlang node as a c_node (which seems to be what zerl does) is not a good idea generally, as connecting that way essentially allows the client to execute arbitrary code on the server.

I think this behavior can be fixed by properly using something like `lib_chan`, but we needed something that worked first for our Func Prog Sweden demo.

Indeed a malicious client can craft an brutal kill message as long as it knows the PID a process (either a worker or a supervisor) for instance.

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#55

Earlier quoted context omitted.

This definitely has a GPT smell, at no fault of the creator. Reminds me of a PR i reviewed about a simple security patch, where the description said "The following changes have been implemented to strengthen our role-based access policies and system security" - Like yeah, it's security patch. A small tweak to his prompt would probably do the trick

I wrote that down as an inspiration of Paradise Lost by Milton. The original idea was to appeal to the phonology of English and structure it as a sonnet, but that got rushed

That is purple prose, however. I cannot deny it

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#56
post #40

Earlier quoted context omitted.

This definitely has a GPT smell, at no fault of the creator. Reminds me of a PR i reviewed about a simple security patch, where the description said "The following changes have been implemented to strengthen our role-based access policies and system security" - Like yeah, it's security patch. A small tweak to his prompt would probably do the trick

No AI-based tools were used to make the lore. One of our developers (not me) is more of an intense reader and retro gamer; he was the one chosen to write it.

I hate AI I hate AI I hate AI I hate AI

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#57
post #15
post #7

Pretty amazing effort, this looks like a great labour of love! I can't give feedback on the code/technology, but on the writing on the lore section, I would try to simplify the writing. For instance the following: > The reverberations of the trumpet stirred the knights from their deep repose, igniting a tumultuous awakening. With swords unsheathed and hearts ablaze, they clashed in a thunderous symphony of war, each…

It's definitely a matter of taste. The first version has flavor, the second is flat. The first reminds me of the style of writing that got me hooked on MUDs.

We were actually considering a MUD at first, but then we added raylib

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#58
post #48
post #45

Earlier quoted context omitted.

If you're using zerl on the client and plain dist on the server; the question isn't what Zerl can serialize, but what the server will process. With stock OTP dist, there is no barrier between nodes. Stock OTP runs an rpc server that you can use to send function calls to run, which can include BEAM code to load (or file I/O to do); and even if that's disabled, you can spawn a process to run a function with arguments o…

How can one protect the server then? Do we need some special behavior and/or library?

I'm not aware of anyone running a limited dist to allow for untrusted dist clients. But here's an OTP response to a proposal that's pretty clearly a no [1].

It'd be much simpler to put together a custom protocol to communicate between the client and server. You could use Erlang's External Term Format to exchange data if you want, in which case you'd want to do binary_to_term(Binary, [safe]) to prevent creation of new atoms and new function references which can fill up tables and also consider that just because deserializing is safe for the runtime doesn't mean you can trust the client.

Erlang makes it pretty easy to parse sensible things off of network sockets, if you want to go more custom, too. Binary pattern matching is lovely.

[1] https://erlangforums.com/t/rfc-erlang-dist-security-filterin...

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#59
post #58
post #48

Earlier quoted context omitted.

How can one protect the server then? Do we need some special behavior and/or library?

I'm not aware of anyone running a limited dist to allow for untrusted dist clients. But here's an OTP response to a proposal that's pretty clearly a no [1]. It'd be much simpler to put together a custom protocol to communicate between the client and server. You could use Erlang's External Term Format to exchange data if you want, in which case you'd want to do binary_to_term(Binary, [safe]) to prevent creation of new…

Thanks for the ideas and references! I gotta say, though, that I will be pretty sad if having to write a custom protocol turns out to be the final solution. So much more convenient to use OTP (especially now that we finally have an infinitely extensible serialization library for it; Zerl). I'm shocked such an oversight would exist in a real commercial solution which is the BEAM.

Re: Show HN: Lyceum – An MMO game built with Zig and Erlang

#60
post #10

Its always nice to see people experimenting with different technologies. I'm curious about Erlang server, do you see any advantage or features that Erlang provides, compared to for example if the server was running in Python via multiple instances?

Also, Erlang makes it bizarrely simple to have a single process per user (and it's actually what we did for the demo).
Post reply on HN