cairovm.codes icon indicating copy to clipboard operation
cairovm.codes copied to clipboard

chore: Add permalinks to the cairo-by-example project

Open mazurroman opened this issue 1 year ago • 6 comments

The cairo-by-examples project contains many Cairo code snippets. It would be great to add a link below relevant code snippets to open them in the Cairo playground on cairovm.codes so that devs can play with the code execution to understand it better.

cairovm.codes has a permalink feature, so that you can write some Cairo code and share it.

For the following code snippets, you should:

  1. copy the code snippet into the Cairo playground of cairovm.codes,
  2. generate a permalink,
  3. add a “Open in Cairo playground” link pointing to the permalink, below the code snippet.

Acceptance criteria: Create PRs on the cairo-by-example project with permalinks to cairovm.codes for the following code snippets:

  • https://cairo-by-example.com/examples/if (the last snippet)
  • https://cairo-by-example.com/examples/loop/
  • https://cairo-by-example.com/examples/enums/
  • https://cairo-by-example.com/examples/arrays (the full example in the last snippet)
  • https://cairo-by-example.com/examples/dictionaries
  • https://cairo-by-example.com/examples/clone_and_copy (the first snippet)
  • https://cairo-by-example.com/examples/snapshots

PR Review

The PRs on the cairo-by-examples project should be reviewed in 2 steps:

  • The Walnut core team will review the PR, give feedback and may decide to give some rewards on OnlyDust if the PR code is good quality.
  • The cairo-by-examples team will review the PR as they see fit and decide whether to merge the PR or not.

mazurroman avatar Mar 18 '24 08:03 mazurroman

Can I be assigned to this?

Joy-Adah avatar Mar 18 '24 08:03 Joy-Adah

@mazurroman I'd like to pick this up.

Ayoazeez26 avatar Mar 18 '24 09:03 Ayoazeez26

Hi, I'd love to take care of this

wugalde19 avatar Mar 18 '24 13:03 wugalde19

I have gone through this and i'll be able to handle this appropriately

Calebux avatar Mar 19 '24 17:03 Calebux

Hi I am Jaipal (intro), i can take this issue. although i did check that cairovm.codes perma links contains some conflicting characters such as parenthisis which might mess with the markdown sytanx. i can encode them which should most definitely work if not might just shorten the links using dub.co (a good opensource link shortner) as the last resort if needed.

jaipaljadeja avatar Mar 19 '24 21:03 jaipaljadeja

Just raised a PR #116 for this.

jaipaljadeja avatar Mar 21 '24 10:03 jaipaljadeja