Giter Site home page Giter Site logo

Comments (6)

s-hadinger avatar s-hadinger commented on June 9, 2024 1

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.

/* Macro: BE_VM_OBSERVABILITY_SAMPLING
* If BE_USE_PERF_COUNTERS == 1
* then the observability hook is called regularly in the VM loop
* allowing to stop infinite loops or too-long running code.
* The value is a power of 2.
* Default: 20 - which translates to 2^20 or ~1 million instructions
**/
#define BE_VM_OBSERVABILITY_SAMPLING 20

from berry.

hiperiondev avatar hiperiondev commented on June 9, 2024 1

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.

s-hadinger avatar s-hadinger commented on June 9, 2024

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.

hello-world-dot-c avatar hello-world-dot-c commented on June 9, 2024

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.

hello-world-dot-c avatar hello-world-dot-c commented on June 9, 2024

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

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.

shreeve avatar shreeve commented on June 9, 2024

@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)

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.