Comments (6)
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.
100%. Totally forgot about Andre's library thanks!
from neel.
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.
@Niminem
i'll recommend use jsony, because it is much faster.
from neel.
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.
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)
- Feature request: webview HOT 8
- Error: execution of an external program failed if callJs in thread. HOT 3
- any kind of error in callJs leads to JSON parse error, original error disappears HOT 2
- Adding: google-chrome-stable HOT 2
- CallJs in try/except Causes Segfault HOT 3
- Example crash HOT 2
- CrossBrowdy And GraBulma Support? HOT 1
- MIME type HOT 1
- Windows build does not works standalone HOT 1
- Cannot install neel. HOT 3
- [Question] Using Neel for a web application? HOT 2
- Cross-compilation from Linux to Windows HOT 4
- Curiosity HOT 1
- Error: undeclared identifier: 'callProc'
- Calls to frontend are too slow/blocking HOT 9
- Suggestion : Use Axino widgets instead of HTML + CSS HOT 3
- Application doesn't start if not on the same drive letter as Chrome HOT 3
- Contributing to the project HOT 7
- filePicker example does not compile HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neel.