Skip to content

[FRQ] Improvements #1

Description

@fucksophie

While reading this source-code, I found several improvements that could make this project 100x cooler :)

  1. You could use zstd or a similar high-performance compression algorithm to compress files on file upload, at
    String newFileMetadata = DataUtilities.fileMetadataBuilder(fileTitle, fileMime, last, 0);
    .
  2. You could use PEG or a similar syntax grammar for your SQL-esque system. A massive IF statement leads to many side effects and other issues you could as easily avoid using a parser. Check out https://github.com/zhong-j-yu/rekex .

A second video could be done using mcfunctions or similar to create a framework using commands, something like

# routes/say.mcfunction

execute as @a[tag=http.match,/say/*] run function mypack:routes/say_handler
# routes/say_handler.mcfunction

scoreboard players operation @s name_param = @s http.param1

http response [{"text":"Hello, "},{"score":{"name":"@s","objective":"name_param"}}]
tellraw @s [{"text":"Hello, "},{"score":{"name":"@s","objective":"name_param"}}]

scoreboard players reset @s http.param1

This could be possible with enough finagling with Fabric to support custom datapack formats.

PS. Great video!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions