lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On 21/11/16 02:27 PM, mathieu stumpf guntz wrote:



Le 21/11/2016 à 16:41, Soni L. a écrit :

I don't wanna learn Esperanto to write code. I'd be happy to write code on my own language, however, and have it interoperate with code written in other languages. The easiest way to do that is to define symbols for keywords - for best cultural compatibility these symbols would either a) be specific to the bastardized Lua you'd make, and would use the private use areas of unicode, or b) be emoji - and then use "environment wrapper libraries" to define the globals.
I am happy to learn in your interest of coding in your native language, that make Lua-i18n all the more relevant, and concerns you are feedbacking are exactly the reason Lua-i18n is a separate project from Lupa and Mallupa, on which it have no dependency. On the contrary, in later development Lupa and Mallupa may rely on Lua-i18n, but you don't have to care about that if you are not interesting in Esperanto.

Regarding what you are talking about, I agree that make having the ability to make something like `_ENV = require("my_dialect")` would be an interesting idea.

You don't necessarily need to change tokens used internally for that though: they can be decorrelated from the token exposed in the interpreter. Like it's done with the solution proposed by Luiz. This solution however, unlike what you are suggesting, is a static compile time process. But maybe it might be used as a point of start for implementing something like you are suggesting.

It's definitely a great way to make syntax highlighting impossible. Seems like it'd be less trouble to just use lisp or forth instead.



"Wrapper libraries" would be used to adapt libraries across languages, too - the "soquete" library would simply translate the names for the "socket" library, rather than reimplementing sockets in an incompatible way (however, sharing objects returned by such library would require some sort of "wrap" and "unwrap" functionality, also exposed by the wrapper library. It'd be common practice to wrap function parameters and unwrap function arguments).
Sure this would be a good point to also provide translated libraries. This doesn't really require any change to the interpreter, does it? Aliasing function is straight forward in plain Lua, as far as I can tell, so this might be done with the current language facility. Or is there a problem I miss here?

It does need unicode support.


Actually, the goal here is somewhat providing the same flexibility given for function identifiers to reserved keywords.

Remove the concept of "keywords" - they shouldn't be words, try something like "keysymbols" instead.



If you wanna bastardize something, at least do it in a way that everyone wins.
Yes, that's what Lua-i18n is all about. However I would rather name it allow dialectal extensions than bastardize, because "mal nommer les choses c'est ajouter au malheur du monde", and that I prefer to add misery in the world in a far more subtle devilish fashion. :)


I love the term "bastardize". I do it all the time. e.g. https://bitbucket.org/SoniEx2/mdxml/overview

Translating a programming language isn't the way to go, but removing any and all references to a specific language and/or culture is.
You can abstract things, but you can't remove any and all references to a specific language and/or culture. Abstracting things is obviously a cultural practice. Now if you want to speak ethnology or even ethology with me, please make that in a private answer.

Even Perl has yet to manage this. Actually the only programming language I know that has managed this is plain old brainfuck.
Actually, Perligata <http://www.csse.monash.edu.au/%7Edamian/papers/HTML/Perligata.html/> let you code in a Latin dialect. Your welcome. ;)

Are you implying latin isn't a language and/or culture? Is perligata made of random symbols with no particular meaning arranged in a way that makes physical sense? (e.g. brainfuck's loop, which looks like a box - this is also why I think emoji is a good candidate for proper internationalization, as it's more physical even tho different cultures may associate different things to each emoji)

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.