Giter Site home page Giter Site logo

frankdilu / chelang Goto Github PK

View Code? Open in Web Editor NEW
409.0 409.0 21.0 52.08 MB

CheLang es un lenguaje de programación esotérico argento. Ni más, ni menos. Es la que va.

License: GNU General Public License v3.0

Python 100.00%
argentina argentino argento esoteric esoteric-language esoteric-languages esoteric-programming-language programming-language programming-languages

chelang's People

Contributors

d-l-n avatar danihv avatar fdsoftware avatar frankdilu avatar guidodipietro avatar markjcp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chelang's Issues

Inclusive language should be used to follow current global trends

This language is amazing, however it was of course designed and programmed by a patriarch.
The error messages should use the inclusive language versions. Current global trends forces us to use such gender-less language instead of the old and outdated binary and gender-based spanish.

For instance "s/Flaco/Flaque" (Or any other variations of that word, choose the worst sounding one).

Che la sintaxis podría ser mejor

Seeing as there is no code of conduct or contributing guidelines yet, forgive the title.

I'll be grouping several sintaxis recommendations in one issue because they really stand out as bad decisions from the get-go to me.

es andapor

The messi es andaPor 10 as messi == 10 does not sound good on the tongue. Proposal: Using just andapor would arguably sound more argento.

multiple variable declaration

This can be a hell of a lot to write just to declare a couple of variables. If you want your language to be successful, and I know it will be because who doesen't want to operate on numbers with ma and meno, then you gotta figure a shorthand way of doing it. Proposals:

che messi, maradona, batistuta son 10, 10, 9 // son could also be es
che ricky_fort, mirtha son 100

Inequality conditions

Maybe rename them for easier writing. I admit I'm not sure how and what I would change but I would argue there's room for improvement.

Operator Argento
< cachitomenoque
> cachitomaque
>= mayoigual
<= menoigual
!= nadakever

I'd stick with the all lowercaps convention, less of a headache to write and as they say: se entiende, no?

Example program

So I finally got to write a small program in CheLang. This calculates every perfect number from 1 to whatever you choose as an upper limit.

This uses 'dividido' as an array index access operator.

# I'm not sure why the % operator is not present in CheLang, so I just defined this function
definime divide(numero,coso)
    agarra por enUnaDeEsas es 1 hasta (numero ma 1) tonce
        ponele que (coso por enUnaDeEsas) anda por numero tonce
            tirame 1
        hastaaca
    hastaaca
    tirame 0
hastaaca

# Returns [Number of divisors] + [All divisors < num]
definime dividimeSiTeLaBancas(numero)
    che messi es []
    che cero es 0
    agarra por chabon es 1 hasta numero tonce
        ponele que divide(numero, chabon) tonce
            che cero es cero ma 1
            Agregale(messi, chabon)
        hastaaca
    hastaaca
    tirame [cero] ma messi
hastaaca

# Example: dividimeSiTeLaBancas(14) -> [3,1,2,7]

# Similar to sum() in Python, but since I can't loop through an array without an 'agarra por' and I need the length,
# I had to store such length in the array itself (first element). I tried multiple returns and returning a tuple
# but that didn't work. Maybe a suggestion of a feature to add some day?
definime vamoTodosJuntos(laBarraBrava)
    che todos es 0
    agarra por laspelotas es 1 hasta (laBarraBrava dividido 0 ma 1) tonce
        che todos es todos ma (laBarraBrava dividido laspelotas)
    hastaaca
    tirame todos
hastaaca

# Checks if a number meets the condition of 'perfect', a.k.a. 'bokita'
definime esNumeroBokita(numero)
    ponele que vamoTodosJuntos(dividimeSiTeLaBancas(numero)) anda por numero tonce tirame 1 aLosumo tirame 0
hastaaca

# Ahora se pudre todo acá viste # Printing stuff

# Ode to Joy and Quetepasa in Argentino
Cuchame("Cheamigo esto va a tardar un rato viste no es porque este mal hecho")
Cuchame("son asi los numerobokita tardan en encontrarse, ademas viste que no tenemo")
Cuchame("todavia eso de operador resto % y longitud de una lista esas cosas viste no")
Cuchame("son bien argentas, bien criollas papa, bien de aca, esas son para lo giles ustede")
Cuchame("que usan esa' cosas para gatos que no se la bancan como nosotro asi que tomatela si te va lento el programa")
Cuchame("\n a y los tilde tampoco me andan y me la rrebanco")

che elInfinito es 10000

agarra por Argentina es 1 hasta elInfinito tonce
    ponele que esNumeroBokita(Argentina) tonce Cuchame(Argentina)
hastaaca

Output:
image

I halted the execution rather quickly after I finished coding it because querido, tengo un examen mañana y no sé qué hago haciendo esto, tengo que dormir, but it should work fine to find the 3rd and 4th bokita numbers (496 and 8128). The 5th one is too big and takes a bunch of computation so don't expect to get it calculated.

I will probably do more of these things because la cuarentena inspira a la demencia.

Atte., Guido Dipietro

Ninos()

Constante "alto guiso"

Creo que es fundamental establecer que altoGuiso debe ser tomado como su valor intrínseco: 15

ponele que altoGuiso es 15 tonce cuchame("piola") aLoSumo piquete hastaAca

variante de declaración de variables

me parece que le daría un buén estilo de las variables se declaren con un "digamos que" o "onda"

onda a es 1
digamos que b es 2
che c es 3

ponele que a anda por 1 y b anda por 2 y c anda por 3 tonce cuchame("piola") aLoSumo cuchame("todo mal") hastaAca

Keyword casing

It is my understanding the language's creator wishes to maintain camelCase as the capitalization scheme for keywords. Here are some of my worries that come to mind when I think of using a language with such a scheme.

Ambiguity due to informal writing

Keyword Possible interpretations
nakever naKeVer, nakeVer
maomeno maOMeno, maoMeno

As you can see, there are other non-obvious ways to write the same keyword made of more than a single word. This problem is highlighted by the discrepancy between two keywords that should follow the same convention but have different criteria for the capitalization:

menorOIgual and maomeno

This can be solved by applying a rule such as leaving one-letter-words lower case though this would arguably make reading harder. camelCase could be applied to all keywords so as to have maOMeno. It could also be argued all-lower case would fit in with the informal nature of the language, as no one really writes naKeVer in their day to day life.

Separating keyword style from variable naming and possible function naming (future-proofing)

We all know camelCase is best, there is no room for argument here. That's why I use it for all my variable names, and you should too! Forcing camelCase upon keywords may take away from readability if everything is camelCase.

Proposal

Keywords should be short and memorable and are to the point, this is why they in theory should not benefit from capitalization schemes. Variables on the other hand carry only the meaning their creator gives them, which may end up being a few dozen characters long. Variables do benefit from naming schemes and are where people should be forced to write in camelCase, PascalCase, etc.

Flexibilize cap-scheme of keywords or make them lowercase altogether.

Extension para VSCode

Buenas! Un buen amigo me mostro esta maravilla y devolvio la inspiración a mi vida de desarrollador argento.

Tenía pendiente aprender a armar extensiones para vscode asique me tiré el lance y arranque a armar esto

Por ahora solamente tira highlight bastante basico, folding y un iconito argento para los .che

Foteli de ejemplo:

Screenshot Ejemplo

Si el proyecto da para meterle, me gustaría mandarme a armar una extensión completa con intellisense y debugger y publicarlo para que se pueda descargar desde el IDE, capaz sale algo copado.

Diganme que les parece y si da para darle para adelante, y gracias por esta obra de arte 😄

Not sure what this is, but it's not the choripan I wanted

image
CheDevelopers, I found a thing.

Triggered by calling Campora() then hitting Ctrl+C once to halt the execution, then once again because the audio kept running on the background.

Probably has something to do with the playsound lib (which, from what I've found, is only able to play a track and not to stop it).

But it's all right. Don't worry. I know that tune is meant to be played for hours on end and not to be interrupted. No te calentés.

Ameo, I think you're missing a "self"

My dearest frankdilu,

upon venturing into the unknown realms of CheLang I spotted the following issue.

I coded a simple loop equivalent to the following in Python:

num = input("Do be as kind as to provide me with a num: ")
def curlyHair(n):
   while n > 0:
      n = n-1

curlyHair(int(num))
# Doesn't return anything, just executes the 'while' loop
# a total of 'num' times, doesn't even modify the global value of 'num'

Let me provide a screenshot of the CheLang/argento translation of said snippet, together with the Console logs:

image

I should mention that this was the first Error I run into that wasn't addressed by the CheLang interpreter.

Is this an actual bug or am I coding para el carajo?

I can't wait to use a stable version of CheLang. The world will be a better place by then.

Ninos()

Error en es nakever

Actualmente la función se encuentra así (igual a "no es"):
es nakever => !=

Debería ser así:
es nakever => !==

Todo sea para un correcto uso del lenguaje y de aquellos novatos que lo vayan a usar.

Tirando facha

Cuando un argentino se cansa de programar sin colores, un argentino agarra y pinta
(SPOILERS de uno de los programas que estuve haciendo, y pull-requestiaré eventualmente...)

image

image image image

Celeste, blanco, y amarillo... como la bandera de nuestra patria
Rojo, como el gorro frigio del escudo argentino
Azul... para combinar con el amarillo DALE BOKEEE
Verde, por los laureles que eternos serán
Plata... por las cadenas, de las cuales oímos el ruido... (algunos dicen que es por el Río de la Plata, allá ellos)


Notepad++ no es mi editor favorito pero la verdad que está piola y hacer esto fue relativamente sencillo.

Adjuntado el archivo con la definición, listo para importar en Notepad++ mediante:
Language > Define your language... > Import
Muy importante tener activado el tema Obsidian, de lo contrario se verá más feo que Alfredito Silva.
(Settings > Style Configurator > Elegir Obsidian)

CheLangSyntaxHighlighting.zip

Algunas aclaraciones:
Es una definición bastante rudimentaria y hay muchas cosas que no se pueden / no sé cómo conseguir. Por ejemplo, me hubiera gustado pintar de algún color a las funciones cuando se llaman, o a los argumentos dentro de los paréntesis, pero no sé si se podrá conseguir con las herramientas de Notepad++.
Igualmente se ve bastante lindo. O al menos mejor que texto plano.

Absolutamente abierto a comentarios y modificaciones o sugerencias.

Un saludo,

Ninos()

Error handler

Che gente, me estaba peleando hoy con unos errores y en eso se me ocurrió una idea medio estúpida, pero bueno, why not? (?

Also así:
image

Es mucho bardo el manejo de errores en py?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.