ImNotAVirus

ImNotAVirus

Code review: macros and decorator system

Hello, everyone.
I’d like to get your opinion on a pull-request that I just did: Feature: packet documentation by ImNotAVirus · Pull Request #1 · elvengard-mmo/elvengard_network · GitHub

I am currently working on a toolkit to facilitate game server development. Unfortunately, since I don’t know anyone who can review me in Elixir, it is difficult for me to improve and evaluate the quality of my code.

The purpose of this PR is to make a decorator system to define an internal documentation for macros.
The system looks like this:

@desc "Some description for my macro"
my_macro "Name" do
    @desc "Some description for a field"
    field :name, :type

    field :name2, :type2, description: "Some description for another field"
end

Based on the same system as Absinthe, I was able to generate corresponding structures that I store in a module attribute. Once this is done, I generate a function (elven_get_packet_documentation) that will return the module attribute which contains an array of documentation structures.

So I would like to know if anyone would feel in the mood to do a little review of this PR by posting a few comments (on Github and here if possible :stuck_out_tongue: ).

For the most motivated people, why not a general review of the project.

Thank you in advance.

PS: I just made a Git rebase onto master. It added a lot of unnecessary things to the understanding of the PR. Sorry

Where Next?

Popular in Questions Top

ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement