Git Product home page Git Product logo

Comments (8)

santicros avatar santicros commented on September 24, 2024 1

Hi @mattpocock!!

Yes, for mi this is zero urgent, but an idea for the future. Would be an addition to the command line, that passing a JSON generates a Lucy code. I see a bright future for Lucy together with XState and I think it can be a useful thing to have in the future, but zero urgent for now :)

from liblucy.

mattpocock avatar mattpocock commented on September 24, 2024 1

@matthewp Not yet, but this is in the works. I do think that it'll be very similar to, or interoperable with, the machine config structure that we currently pass into XState's createMachine.

from liblucy.

santicros avatar santicros commented on September 24, 2024 1

Yes!! I think it would be the object we pass to createMachine serialized. For reference, I see in this comment https://spectrum.chat/statecharts/general/how-to-serialize-a-machine-as-visualizable-json~94a8470a-c28d-4103-8137-9c8b081d9225 David explained how to serialize a XState machine.

from liblucy.

matthewp avatar matthewp commented on September 24, 2024 1

I asked about this idea here: statelyai/xstate#293. If there's a better issue to track please share.

from liblucy.

redbar0n avatar redbar0n commented on September 24, 2024 1

This would also be a great idea for demonstrating the value proposition of Lucy (as it should really shine for more complex examples). I was searching for an online XState to Lucy translator as I wanted to see how https://codesandbox.io/s/xstate-todomvc-33wr94qv1?file=/todoMachine.js would look in Lucy.

from liblucy.

mattpocock avatar mattpocock commented on September 24, 2024

Hey @santicros!

What's the use case here? Is this kind of like a codemod? I.e. take your existing machines and spit them out into Lucy? Wondering where we should prioritise this in terms of urgency.

from liblucy.

matthewp avatar matthewp commented on September 24, 2024

Thanks! So what I see a need for is:

  • Convert Lucy to JSON.
  • Convert JSON to Lucy.

I'm fully in favor of that. However, how will the JSON be used practically? If the visualizer had a JSON format that it could consume and produce that would make sense. You could build your machine in the visualizer, export as JSON, then convert to Lucy.

Does XState have such a format that it uses in the visualizer (or by any other tools)? This is where I want to hold off on this idea, until there's other tools using the JSON format (as a sort of intermediary) then I'm not sure what it's for in practice.

from liblucy.

matthewp avatar matthewp commented on September 24, 2024

Cool, is there a tracking issue for this?

from liblucy.

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.