Giter VIP home page Giter VIP logo

Comments (6)

Niminem avatar Niminem commented on May 20, 2024 1

@griffith1deady

Appreciate it man. I'm currently testing using jsonTo procedure from the std/jsonutils module with some success already.

If this doesn't suffice I'll be sure to reach out here. Will keep this open in the meantime.

from neel.

Niminem avatar Niminem commented on May 20, 2024 1

@griffith1deady

100%. Totally forgot about Andre's library thanks!

from neel.

Niminem avatar Niminem commented on May 20, 2024 1

@griffith1deady

Just pushed Neel 1.1.0 with ability to convert arbitrary parameter types programmatically. For now this will suffice. I've elected to still use std/jsonutils as using jsony I would have to completely rework the exposeProcs macro and frontend code to support it. A complete code refactoring will be for a major update in the near future and will support it.

from neel.

griffith1deady avatar griffith1deady commented on May 20, 2024

@Niminem
i'll recommend use jsony, because it is much faster.

from neel.

griffith1deady avatar griffith1deady commented on May 20, 2024

currently, i've also implemented the ability to do these types of functions in addition to just taking arguments:
a function that takes arguments and returns a response (json string)
a function that takes no arguments and returns no response (notification)

but now calling such functions is not ideal at all, and I should rework it, probably a lot.
and in general, adding new function types spoiled the code's beauty a bit, but not critically.

at the moment I have everything stored in 3 tables, and pass to macro an object that contains them. i plan to add a lot of unsafe code that will only contain the initial validation, but not further validation. merging all types into one table will be the best optimization at the moment. all the magic is done at compile time.

from neel.

griffith1deady avatar griffith1deady commented on May 20, 2024

image
after a lot of rework, i can safely say that everything is ready. i also added 4 type of procedures - those that just return the result, without arguments. it may be necessary to add support for async procedures in the future, but that's not the most important thing.
in case of errors, the handler will report that an error has occurred, and if everything is fine and there is no return value, it will say that everything is fine. and if there is a return value, it will return it.

the only important (perhaps) goal that should be implemented is to be able to return any object/ref object from such functions, and automatically generate code for serialization in json.

from neel.

Related Issues (20)

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.