Skip to content

Add Baklava in Elvish#4211

Merged
rzuckerm merged 6 commits intoTheRenegadeCoder:mainfrom
Kaamkiya:main
Jan 7, 2025
Merged

Add Baklava in Elvish#4211
rzuckerm merged 6 commits intoTheRenegadeCoder:mainfrom
Kaamkiya:main

Conversation

@Kaamkiya
Copy link
Copy Markdown
Member

@Kaamkiya Kaamkiya commented Jan 7, 2025

I Am Adding a New Code Snippet in an Existing Language

@Kaamkiya
Copy link
Copy Markdown
Member Author

Kaamkiya commented Jan 7, 2025

I see the error. I'll fix it.

@Kaamkiya Kaamkiya marked this pull request as draft January 7, 2025 01:48
@Kaamkiya
Copy link
Copy Markdown
Member Author

Kaamkiya commented Jan 7, 2025

This is weird. I tried it in the official playground and it works. It also works on my computer. I wonder what's wrong here?

@Kaamkiya
Copy link
Copy Markdown
Member Author

Kaamkiya commented Jan 7, 2025

It seems to be outputting this:

[ERROR 2025-01-07 02:31:52 UTC] +--------------------------------------------------------+
[ERROR 2025-01-07 02:31:52 UTC] | Syntax error in file baklava.elv, line 3, column 7     |
[ERROR 2025-01-07 02:31:52 UTC] | 1: # By github.com/Kaamkiya                            |
[ERROR 2025-01-07 02:31:52 UTC] | 2:                                                     |
[ERROR 2025-01-07 02:31:52 UTC] | 3: for i [(range 11) (range 9 -1)] {                   |
[ERROR 2025-01-07 02:31:52 UTC] |          ^                                             |

But this is, in fact, valid elvish syntax. Any idea what could be causing this?

@jrg94

@rzuckerm
Copy link
Copy Markdown
Collaborator

rzuckerm commented Jan 7, 2025

It seems to be outputting this:

[ERROR 2025-01-07 02:31:52 UTC] +--------------------------------------------------------+
[ERROR 2025-01-07 02:31:52 UTC] | Syntax error in file baklava.elv, line 3, column 7     |
[ERROR 2025-01-07 02:31:52 UTC] | 1: # By github.com/Kaamkiya                            |
[ERROR 2025-01-07 02:31:52 UTC] | 2:                                                     |
[ERROR 2025-01-07 02:31:52 UTC] | 3: for i [(range 11) (range 9 -1)] {                   |
[ERROR 2025-01-07 02:31:52 UTC] |          ^                                             |

But this is, in fact, valid elvish syntax. Any idea what could be causing this?

@jrg94

@Kaamkiya The docker image for Elvish seems like it may be a very old version of the language. I found an official docker image here. What you can do is change these lines in archive/e/elvish/testinfo.yml to this:

  image: "ghcr.io/elves/elvish"
  tag: "v0.21.0"

Also, I'd like to recommend that you keep the main branch of your fork clean so that you can resync it to the main branch of this repo without losing any of your work. I'd recommend creating a different branch for each sample program that you contribute based on the main branch. For instance, I created a baklava-forth branch for my "Add Baklava in Forth" PR.

Copy link
Copy Markdown
Collaborator

@rzuckerm rzuckerm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, @Kaamkiya . Thanks for your contribution! I'll merge this when you mark the PR ready for review

@Kaamkiya Kaamkiya marked this pull request as ready for review January 7, 2025 16:06
@rzuckerm rzuckerm added enhancement Any code that improves the repo baklava See: https://sampleprograms.io/projects/baklava/ labels Jan 7, 2025
@Kaamkiya
Copy link
Copy Markdown
Member Author

Kaamkiya commented Jan 7, 2025

@rzuckerm

change these lines in archive/e/elvish/testinfo.yml

Oh, that would make sense. I've done that now.

creating a different branch for each sample program

I realize now that I should have done that. I'll keep it in mind for next time.

@rzuckerm rzuckerm merged commit eafb254 into TheRenegadeCoder:main Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

baklava See: https://sampleprograms.io/projects/baklava/ enhancement Any code that improves the repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Baklava in Elvish

2 participants