teal-language / tl

The compiler for Teal, a typed dialect of Lua
MIT License
2.03k stars 101 forks source link

Add examples #651

Closed JLPLabs closed 11 months ago

JLPLabs commented 1 year ago

Perhaps you will find value in adding examples for new users? I'm interested in preparing a handful of such examples, and have included this pull request to demonstrate what "Examples" could look like.

github-actions[bot] commented 1 year ago

Teal Playground URL: https://651--teal-playground-preview.netlify.app

hishamhm commented 1 year ago

Hi! Thanks for the initiative!

I wouldn't mind at all having some examples in the repo. My immediate thought goes towards long-term maintenance, though, so there are a few things that I'd like to see:

Apart from those items which I'd consider more-or-less blockers, there are other minor stylistic things that I'd probably change:

Another possible avenue for learning-Teal-by-example would be to have larger well-commented examples added to the https://github.com/teal-language/teal-playground/ dropdown at https://teal-playground.netlify.app!

JLPLabs commented 1 year ago

Thanks for the thoughtful reply and your consideration of my offer.

I'll make an attempt to update according to your feedback over the next 2 days.

JLPLabs commented 1 year ago

I think this latest update covers all but one of the bullet items you had. I do not know how to do the CI integration of the example code. Other than that, is this more of what you think is a good fit that is easier to maintain?

hishamhm commented 11 months ago

@JLPLabs sorry it took me a long time to properly get to this. I have merged it manually, squashing the commits, removing the PNG file and reworking the example a bit (I made my changes on a separate commit for ease of diffing — should make it a lot easier to see what kind of changes I had in mind to get this merged; I thought I'd take the time and do them myself instead of asking for more changes).

But it's merged now! So I'll close this PR manually. Thanks again!!