Comments (6)
Thank you, have checked it out and will try. From the looks of it, there doesn't seem to be an option to disable all floating-point support, is there?
No there isn't, it would require some work to do.
You can let Berry give back control from time to time
This is interesting. How do I do that?
You can set the BE_VM_OBSERVABILITY_SAMPLING
to have a hook called every 2^n instructions. It allows you to regain control periodically, and potentially kill infinite loops.
Lines 77 to 84 in 5084b48
from berry.
There is already a port to ESP32 that I made a while ago.
Maybe it can help you:
https://github.com/hiperiondev/esp32-berry-lang
from berry.
You can start looking here https://github.com/berry-lang/berry/wiki/Appendix-C
Keep in mind that Berry does not support multi-threading, and is not reentrant. You can let Berry give back control from time to time but you should not call back Berry in the middle of an current execution.
Alternatively, you can have multiple Berry vm coexisting, but this may consume too much memory.
from berry.
You can start looking here https://github.com/berry-lang/berry/wiki/Appendix-C
Thank you, have checked it out and will try. From the looks of it, there doesn't seem to be an option to disable all floating-point support, is there?
You can let Berry give back control from time to time
This is interesting. How do I do that?
Alternatively, you can have multiple Berry vm coexisting, but this may consume too much memory.
Agreed, likely not an option.
from berry.
There is already a port to ESP32 that I made a while ago. Maybe it can help you:
Thank you that would be helpful but I got stuck somewhere else. For various reasons that aren't relevant here I would have to also set up a simulation of the embedded system using a Windows DLL built under VS and when I tried integrating berry it turned out that the MS compiler can't build it. It could be because it has support up to C17 but still doesn't completely implement C99, I don't know. But it throws errors around berry's use of tokenized macros, run-time declaration of arrays, etc.
from berry.
@hiperiondev - How hard would it be for you to create a little uf2 or other firmware image with the latest version of BerryScript? I think having a little platform like this with BerryScript would be amazing!
Take a look at https://kalumajs.org for a Javascript based similar project for Raspberry Pi Pico (and Pico W) boaed.
from berry.
Related Issues (20)
- Strange GC behaviour HOT 14
- Constructor that take ptr as argument never called HOT 17
- Bad code and parser confusion with closure, upval and assignment with modification HOT 4
- f-strings for Berry HOT 7
- Documentation for the new format strings feature HOT 1
- How does the mqtt module of tasmota berry support will topic and will messages? HOT 1
- Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT HOT 3
- Support list.map(), list.foreach(), etc HOT 1
- CMake support, clang-format, clang-tidy...
- Standalone && and || trigger infinite loop HOT 3
- Side-effect reassignment of boolean variable HOT 4
- %q format specifier is invalid HOT 3
- class forward call definition problem HOT 3
- Documentation sync HOT 8
- Error messages are sent to stdout instead of stderr HOT 1
- Support `..` shorthand for ranges with increment HOT 2
- Support walrus operator creating new variables + recursive lambda functions HOT 1
- Loading / importing an external script HOT 2
- ternary assign to local variable bug HOT 3
- Adding `string.startswith()` and `string.endswith()` HOT 1
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 berry.