emojicode / emojicode

😀😜🔂 World’s only programming language that’s bursting with emojis

Home Page:https://emojicode.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow emoji `*.🍇` exstension.

zored opened this issue · comments

We have *.emojic extension now, but my coding keyboard does not support these strange symbols.
Could you add support of *.😎 extension, for example?

commented

Most interesting idea. But why exactly 😎? For instance, 🍇 is mure more iconic to Emojicode, don’t you think so?

Hm... 🤔
Yes, sounds tasty 🍇

commented

Feel free to make the necessary change (I think you only need to change a check in Packages/Package.cpp) and open a pull request.

commented

@zored Are you still interested in adding this?

Whoops we did it at the same time 😅
Just be careful in #114 after compilation the filename is trunk by a constant of 7 characters, so with a file hello.🍇 the program name is hel.
Normally this is check in #115 where only the extension is strip.

Now that the extension .🍇 is in process, can we think about an extension for emojicode's interfaces .emojii ?

I thought about .🎭 because an interface is like a mask, it hides the true nature of its wearer ? Or something else, I do not know 😂

PS : I am going to correct the pull request

commented

Hm, why not. Things to consider though:

  • What happens if both a .emoji and one with the emoji extension are in a package directory? Does the compiler complain? Or does it prefer one automatically?
  • When does the compiler even create an interface file with emoji extension? If the emoji extension is used on the input?

I like the masks but we should also consider into the direction of face (interface).

I think that depends on how you want the emoji extensions to be ?

Do you prefer to encourage users to use .🍇 ? (And so potentialy updating the Hello World page)

If so (the more fun I think), we can update the code to reflect that.

  • I think the compiler should prefer the emoji extension over text when both are available ;
    -The compiler should output an emoji extended interface, and maybe think about a compilation flag --ascii, --legacy or something like that, that would output a text extension (.emojii)
commented

Back when I designed the very first version of Emojicode I did some experimentation with file names containing emojis and faced some difficulties with certain Linux distributions, but I don’t remember exactly what these issues were. If those issues are gone, we should certainly opt to make emoji extensions default.

I wrote a Dockerfile based on your clang one that auto build and distribute emojicode with latest commit.

It is based on ubuntu:18.04 and there is no problem when compiling hello.🍇.

Link to Dockerfile.

(I am also wondering if we could add the file to the main repository ?)

commented

So your Docker container is basically one for using Emojicode, right?
The Dockerfiles in this repo are for CodeShip, the CI service.

Basically, I don’t see a reason why we shouldn't add your file. I have a similar one I sometimes use for testing (which installs lots of debugging tools...), so it could certainly be useful. Feel free to open a pull request (and you could copy the shared part that you have tidied up so nicely over to the existing files )...

commented

So I tried to add hello.🍇 to the list of standard compilation tests and it is already giving me trouble in the testing containers as for some reasons Python glob (glob.glob(os.path.join(dist.source, "tests", "compilation", "*.🍇"))) does not find the file on Ubuntu while it does on macOS.

After patching that, the subprocess module started complaining UnicodeEncodeError: 'ascii' codec can't encode character '\U0001f347' in position 35: ordinal not in range(128)...

So I’m not positive the world is yet ready for emoji extensions as a default. Though, I don't feel like digging into that issue right now. Maybe there is an easy fix. I’ve pushed the branch emoji-extensions in case you’re interested.

commented

I’ll close this issue because its main goal was achieved. Concerning .🎭 we can still continue the discussion here or open a new issue.

I checked the error, and I ran into the same.

After investigation it was due to locale not being correctly set in Docker/Ubuntu. I added the right locale in #117 and was able to successfully ninja tests the emoji-extensions branch.

Hopefully you will have the same result, and that would say that I’m positive the world is ready for emoji extensions as a default !

commented

I’m sure y’all will be delighted to learn that the default packages have been changed to use the .🍇 extension and interface files will be named 🏛 by default starting from 1.0!