Giter VIP home page Giter VIP logo

Comments (6)

feldim2425 avatar feldim2425 commented on August 31, 2024

It would require a rewrite of the websocket frame encoder and decoder. Because Lua 5.3 supports bit operations. In 5.2 bit operations are possible with the bit32 library. But from what I know, using bit32 will not work on Lua 5.3.

from oc-programs.

dunstad avatar dunstad commented on August 31, 2024

Interesting. I might give that a shot when I find some time. If I succeeded, I would probably want to add in some sort of check for which Lua version is being used, so this library would work for either version.

from oc-programs.

feldim2425 avatar feldim2425 commented on August 31, 2024

I think if you make a version check the code would be much bigger. https://github.com/feldim2425/OC-Programs/blob/master/websocket_client/websocket/ws_tools.lua#L57-L189

This are the two methods that encode and decode websocket frames.

from oc-programs.

dunstad avatar dunstad commented on August 31, 2024

My reading online shows me that in most cases Lua 5.3 still contains the bit32 library, is this not the case in OpenComputers?

Also thank you for the link!

from oc-programs.

feldim2425 avatar feldim2425 commented on August 31, 2024

I used some libraries that required bit32 and they failed on OpenComputers Lua 5.3....
But I just found out that they changed it since my last test. Seems like that was 2 years ago.
MightyPirates/OpenComputers#1338

EDIT: I tested again and it seems like bit32 is now also available on OpenComputers Lua 5.3

from oc-programs.

CoolCat467 avatar CoolCat467 commented on August 31, 2024

MineOS for OpenComputers has a bit32 library substitute in the event that it is not present. You can find it here.

from oc-programs.

Related Issues (2)

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.