1. Euphoria code on Github

Hello all,

I know Euphoria isn't the most well known language, but with tons of languages that have syntax coloring on Github, Euphoria should too. Euphoria files are still declared as Eiffel files, since Eiffel files have the same extension as Euphoria include files (.e). If COBOL has syntax coloring on GH, then so should Euphoria. I mean it shouldn't be that hard to implement, right? If anyone knows of how to, that would be great.

Also, yes I am still working on my SoLoud wrapper, it should be done this week, for anyone interested.

new topic     » topic index » view message » categorize

2. Re: Euphoria code on Github

Here is the entry point: a list of grammars that Linguist selects to provide syntax highlighting on GitHub.

https://github.com/github/linguist/blob/master/vendor/README.md

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

3. Re: Euphoria code on Github

Icy_Viking said...

I mean it shouldn't be that hard to implement, right? If anyone knows of how to, that would be great.

This has been a goal since before even moving Euphoria to GitHub since other folks already had projects there. I've been working on it for the past few months: https://github.com/ghaberek/linguist

It's not terribly difficult but there are several hoops to jump through for testing and acceptance. Here is my open pull request: https://github.com/github/linguist/pull/5241

It should be happening soon. Not sure why my pull request hasn't moved recently. I will inquire about that. I'm sure they're just busy.

In the mean time, you can add a .gitattributes file to your project to override the linguist languages in your project. It won't show Euphoria until it's added but at least it will stop misclassifying things as Eiffel or Elixir.

-Greg

new topic     » goto parent     » topic index » view message » categorize

4. Re: Euphoria code on Github

jmduro said...

Here is the entry point: a list of grammars that Linguist selects to provide syntax highlighting on GitHub.

https://github.com/github/linguist/blob/master/vendor/README.md

I think the CONTRIBUTING.md doc is the correct place to start.

-Greg

new topic     » goto parent     » topic index » view message » categorize

5. Re: Euphoria code on Github

ghaberek said...
Icy_Viking said...

I mean it shouldn't be that hard to implement, right? If anyone knows of how to, that would be great.

This has been a goal since before even moving Euphoria to GitHub since other folks already had projects there. I've been working on it for the past few months: https://github.com/ghaberek/linguist

It's not terribly difficult but there are several hoops to jump through for testing and acceptance. Here is my open pull request: https://github.com/github/linguist/pull/5241

It should be happening soon. Not sure why my pull request hasn't moved recently. I will inquire about that. I'm sure they're just busy.

In the mean time, you can add a .gitattributes file to your project to override the linguist languages in your project. It won't show Euphoria until it's added but at least it will stop misclassifying things as Eiffel or Elixir.

-Greg

Thanks Greg. I noticed .ew and .exw weren't in there. I can add them.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Euphoria code on Github

Icy_Viking said...

I noticed .ew and .exw weren't in there. I can add them.

A .gitattributes file should go into the root of each repo on GitHub, so you're free to put into that while whatever you wish. But you'll have to maintain each repo separately.

FYI, due to GitHub's requirements on "popularity" for adding new extensions, I don't think .ew or .exw will ever be officially added to Linguist.

But Linguist will probably still figure it out for you, or you can add the extension manually into .gitattributes: https://github.com/github/linguist/pull/5241#discussion_r584913606

And it looks like we're in a holding pattern on that pull request, so hopefully they'll pull in my changes with one of the next updates: https://github.com/github/linguist/pull/5241#issuecomment-799482007

-Greg

new topic     » goto parent     » topic index » view message » categorize

7. Re: Euphoria code on Github

ghaberek said...
Icy_Viking said...

I noticed .ew and .exw weren't in there. I can add them.

A .gitattributes file should go into the root of each repo on GitHub, so you're free to put into that while whatever you wish. But you'll have to maintain each repo separately.

FYI, due to GitHub's requirements on "popularity" for adding new extensions, I don't think .ew or .exw will ever be officially added to Linguist.

But Linguist will probably still figure it out for you, or you can add the extension manually into .gitattributes: https://github.com/github/linguist/pull/5241#discussion_r584913606

And it looks like we're in a holding pattern on that pull request, so hopefully they'll pull in my changes with one of the next updates: https://github.com/github/linguist/pull/5241#issuecomment-799482007

-Greg

Ah I see. Thanks for the tips. That's good to hear, hopefully soon, Euphoria will have snytax coloring and be supported on Github.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Euphoria code on Github

Icy_Viking said...
ghaberek said...
Icy_Viking said...

I noticed .ew and .exw weren't in there. I can add them.

A .gitattributes file should go into the root of each repo on GitHub, so you're free to put into that while whatever you wish. But you'll have to maintain each repo separately.

FYI, due to GitHub's requirements on "popularity" for adding new extensions, I don't think .ew or .exw will ever be officially added to Linguist.

But Linguist will probably still figure it out for you, or you can add the extension manually into .gitattributes: https://github.com/github/linguist/pull/5241#discussion_r584913606

And it looks like we're in a holding pattern on that pull request, so hopefully they'll pull in my changes with one of the next updates: https://github.com/github/linguist/pull/5241#issuecomment-799482007

-Greg

Ah I see. Thanks for the tips. That's good to hear, hopefully soon, Euphoria will have snytax coloring and be supported on Github.

Good news! GitHub have accepted my pull request! It only took a year; was some delay on my part.

So look for "Euphoria" to start showing up as a recognized language on your projects soon!

If you've added any custom overrides you'll have to remove those for Euphoria to show up correctly.

-Greg

new topic     » goto parent     » topic index » view message » categorize

9. Re: Euphoria code on Github

ghaberek said...
Icy_Viking said...
ghaberek said...
Icy_Viking said...

I noticed .ew and .exw weren't in there. I can add them.

A .gitattributes file should go into the root of each repo on GitHub, so you're free to put into that while whatever you wish. But you'll have to maintain each repo separately.

FYI, due to GitHub's requirements on "popularity" for adding new extensions, I don't think .ew or .exw will ever be officially added to Linguist.

But Linguist will probably still figure it out for you, or you can add the extension manually into .gitattributes: https://github.com/github/linguist/pull/5241#discussion_r584913606

And it looks like we're in a holding pattern on that pull request, so hopefully they'll pull in my changes with one of the next updates: https://github.com/github/linguist/pull/5241#issuecomment-799482007

-Greg

Ah I see. Thanks for the tips. That's good to hear, hopefully soon, Euphoria will have snytax coloring and be supported on Github.

Good news! GitHub have accepted my pull request! It only took a year; was some delay on my part.

So look for "Euphoria" to start showing up as a recognized language on your projects soon!

If you've added any custom overrides you'll have to remove those for Euphoria to show up correctly.

-Greg

  • Goes to github and checks projects*

That's great to hear Greg!

Hopefully Euphoria will become more recognized as a programming language again.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Euphoria code on Github

Icy_Viking said...

*Goes to github and checks projects*

That's great to hear Greg!

Hopefully Euphoria will become more recognized as a programming language again.

I'm not sure what it takes to update the "Languages" statistics on the right side of the project page, but I can confirm syntax highlighting is working!

Check it out: https://github.com/OpenEuphoria/euphoria/blob/master/include/std/eds.e

-Greg

new topic     » goto parent     » topic index » view message » categorize

11. Re: Euphoria code on Github

ghaberek said...

I'm not sure what it takes to update the "Languages" statistics on the right side of the project page

What it takes, apparently, is a Shift+F5 to force your browser to reload the entire page. grin

https://user-images.githubusercontent.com/42429413/155232454-e6e4da1d-66d9-43c5-8a42-aa5208a32664.png

https://user-images.githubusercontent.com/42429413/155232480-d4d1d8c2-1239-4f07-8f22-f544ade7dfdc.png}

Looks like we're in business!

-Greg

new topic     » goto parent     » topic index » view message » categorize

12. Re: Euphoria code on Github

ghaberek said...

Good news! GitHub have accepted my pull request! It only took a year; was some delay on my part.

So look for "Euphoria" to start showing up as a recognized language on your projects soon!

Excellent!

new topic     » goto parent     » topic index » view message » categorize

13. Re: Euphoria code on Github

ghaberek said...
ghaberek said...

I'm not sure what it takes to update the "Languages" statistics on the right side of the project page

What it takes, apparently, is a Shift+F5 to force your browser to reload the entire page. grin

https://user-images.githubusercontent.com/42429413/155232454-e6e4da1d-66d9-43c5-8a42-aa5208a32664.png

https://user-images.githubusercontent.com/42429413/155232480-d4d1d8c2-1239-4f07-8f22-f544ade7dfdc.png}

Looks like we're in business!

-Greg

It seems that .e files have syntax coloring. However .ew and .exw don't seem to have syntax coloring.

new topic     » goto parent     » topic index » view message » categorize

14. Re: Euphoria code on Github

Icy_Viking said...

It seems that .e files have syntax coloring. However .ew and .exw don't seem to have syntax coloring.

That is correct. GitHub have a rather stringent policy on adding new extensions so I opted to only add Euphoria support for .e and .ex, which were already included for Eiffel and Elixir, respectively.

You can add an override to your project .gitattributes file to force other extensions to be parsed as Euphoria:

*.ew linguist-language=Euphoria 
*.exw linguist-language=Euphoria 

But to be honest I don't see much purpose in continuing to use those extensions anyway. They don't really mean anything.

-Greg

new topic     » goto parent     » topic index » view message » categorize

15. Re: Euphoria code on Github

ghaberek said...

But to be honest I don't see much purpose in continuing to use those extensions anyway. They don't really mean anything.

I tend to agree.

new topic     » goto parent     » topic index » view message » categorize

16. Re: Euphoria code on Github

ghaberek said...
Icy_Viking said...

It seems that .e files have syntax coloring. However .ew and .exw don't seem to have syntax coloring.

That is correct. GitHub have a rather stringent policy on adding new extensions so I opted to only add Euphoria support for .e and .ex, which were already included for Eiffel and Elixir, respectively.

You can add an override to your project .gitattributes file to force other extensions to be parsed as Euphoria:

*.ew linguist-language=Euphoria 
*.exw linguist-language=Euphoria 

But to be honest I don't see much purpose in continuing to use those extensions anyway. They don't really mean anything.

-Greg

So I can use .e and .ex even for Windows related Euphoria programs now? I think its just a habit from using older versions of Euphoria. But if I can only use .e and .ex then that's cool.

new topic     » goto parent     » topic index » view message » categorize

17. Re: Euphoria code on Github

Icy_Viking said...

So I can use .e and .ex even for Windows related Euphoria programs now? I think its just a habit from using older versions of Euphoria. But if I can only use .e and .ex then that's cool.

The way I see it we just have the two extensions: .e indicates an include file and .ex indicates a program file. If you run a .e file it should maybe perform some self-initialization (like loading a DLL) but otherwise exit cleanly without performing any action. And if you run a .ex file, you should expect it to do something, even if that's just to print its command line usage and exit.

One exception to this might be Windows graphical applications that are run with euiw.exe so you might associate .exw to that executable. But even then, I'd recommend developing those with eui.exe in a console and then only using euiw.exe when "installing" the program or better yet, translate it to its own graphical executable.

-Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu