Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idyll like api #121

Open
pietroppeter opened this issue Jul 15, 2022 · 3 comments
Open

idyll like api #121

pietroppeter opened this issue Jul 15, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@pietroppeter
Copy link
Owner

now that we have nbKarax, I think it would be a nice project to try and build a idyll like api (which is based on react): https://idyll-lang.org/docs

hopefully we can reuse the work they did on components.

@pietroppeter pietroppeter added the enhancement New feature or request label Jul 15, 2022
@HugoGranstrom
Copy link
Collaborator

There are so many interesting APIs out there 🤯

The benefit they have that we don't is that nbKarax doesn't allow communication between nbKarax-blocks. So we wouldn't be able to do the example they have like this:

nbGraph()...

nbButton()
nbButton()

where each call calls nbKarax. We would need to combine them into a single nbKarax block for it to work. 🤔 Unless you have a brilliant idea to drag out from your magic hat as usual 🧙‍♂️🃏

Another idea would be that each component adds a VNode to a list which Karax then loops over. We can't complain about not having any ideas for new themes and APIs at least 🤣

@pietroppeter
Copy link
Owner Author

yes, I think the simplest would be to implement it as a single block like:

nbIdyll:  #adds template for all the apis
  text "..."
  input
  button
  ...

and nbIdyll turns that in a single nbKarax block.

then probably it is possible in some way to split it (as you mention, every piece would need to add procs and VNodes to a list and you could have a nbInitIdyll). I would start from the single block as above.

Unless you have a brilliant idea to drag out from your magic hat as usual 🧙‍♂️🃏

Not really. It think the interest here is if we can reuse the stuff that is in idyll repo. (plus they do have a nice gallery)

We can't complain about not having any ideas for new themes and APIs at least 🤣

I do have a private repo with a list of ideas (issues) on things to do with nim (not all of them apply to nimib), so... not running out so soon. Especially with the pace I have implementing them... 🤣

@HugoGranstrom
Copy link
Collaborator

HugoGranstrom commented Jul 15, 2022

yes, I think the simplest would be to implement it as a single block like: and nbIdyll turns that in a single nbKarax block.

Yes that sounds like the best idea 👍

then probably it is possible in some way to split it (as you mention, every piece would need to add procs and VNodes to a list and you could have a nbInitIdyll). I would start from the single block as above.

Procs will be troublesome because you can't serialize a proc so you can't send it from C -> JS sadly. VNodes I'm not certain of but it might also be troublesome if it holds any references 🤔 So we will basically have to do everything on the javascript side. But maybe that's what you meant. I'm leaning a bit towards some kind of macro which just copy-pastes code blocks into a nbKarax somehow.

Not really. It think the interest here is if we can reuse the stuff that is in idyll repo. (plus they do have a nice gallery)

Oh, I misread your first post as reusing the work that we did on components 🤦 Yes le's hope what they did can be done similarly here. And they did have a very nice gallery indeed.

I do have a private repo with a list of ideas (issues) on things to do with nim (not all of them apply to nimib), so... not running out so soon. Especially with the pace I have implementing them... rofl

Look at that, I'm only seeing the top of the iceberg of ideas 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants