Coder Social home page Coder Social logo

raggaer / castro Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 19.0 7.88 MB

High performance content management system for Open Tibia servers

License: MIT License

Go 47.13% HTML 27.05% CSS 0.62% Lua 24.55% PowerShell 0.31% JavaScript 0.34%
aac castro cms go opentibia otland

castro's People

Contributors

forgee avatar gitter-badger avatar joseluis2g avatar raggaer avatar sundance avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

castro's Issues

Modular system

Currently a dialect system is in place where you need to create your own "dialect" to work for different server distros.

Maybe there is a better approach to this

Expected behavior of cache:get()

Using cache:get("test") without having first set a value on the key results in a script breaking error (L.ArgError).
I would expect the call to cache:get() to return nil if the key is not set.

Example snippet:

function get()
	local cached = cache:get("test")
	if cached == nil then
		cache:set("test", "SomeData", "4h")
	end
end

Currently the above snippet results in an error like this : .../get.lua:2: bad argument #1 to get (No cache value found using the given key) unless "test" is already set.

Replacing this line with L.Push(lua.LNil) yields the behavior I would expect.

Is there a reason for the current behavior that I am missing?

Pages

My plan is to make all AAC pages use the lua bindings. I first need to implement a database driver for the lua vm

I am not sure about performance

Converter

Be able to convert znote and raw accounts to castro

Dont call dofile on each request

Instead call LoadFile for every lua file and then push the functions to the lua states

That way we dont have to call DoFile on each request

goxc support

Use goxc for compiling. Provide the goxc configuration file too.

JSON marshalling from Lua

I still have the same problem with json:marshal(table) turning "arrays" into objects and I'm pretty sure I found the reason for that.
In func TableToMap(table *lua.LTable) the index is always set as a string here.
The result is that table[1] becomes equivalent to table["1"].

Read other lua files

Add helpers to read other lua files and get variables like tables.

For example load a TFS script related to quests and read the quests table

Better documentation

Add better documentation and examples on the lua metatables functions. This will greatly help the AAC script creator (reading comments to get functions)

2fa CSP

Allow data: scheme for images

Whole performance

Having lua is expensive. Performance could be improved by caching several things

  • Widgets

  • Database calls

  • Templates

Obviously running development mode is slower (multiple things get compiled on each request)

I am also not sure about the memory footprint but since we have a gc who cares ๐Ÿฅ‡

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.