I like to request some features to make YueScript easier to copy code and use with AI assistant code like ChatGPT and Github Copilot, Tabnine!
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
Línea de trabajo
No se nombran archivos, pruebas ni puntos de entrada. Trata las seis propuestas de sintaxis como tareas de diseño separadas y determina primero qué solicitudes son compatibles con la sintaxis y el modelo de compilación existentes de YueScript. Para darlo por terminado, sería necesario acordar el alcance, documentar la sintaxis y tener pruebas para cada funcionalidad aceptada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Well...
I use YueScript daily to write tools and script games as a hobby, but I also work in other languages like Python, javascript, C# and GDScript as a dev. I extend use Github Copilot and sometime ChatGPT. The AI really helpful but they just keep suggest with Python or Lua code. It is a chore to convert them back to YueScript. It is the same when I want to 'borrow' codes online.
Then one idea pop into my mind, why not make YueScript more AI and copy friendly by support more Python, Lua or other lanagues common syntax, notation and make it easier to convert code to YueScript. I think it will be a great feature for YueScript and make it more popular.
Here are some I think will be helpful:
-
Support create list like table with syntax:
arr = []
YueScript only support [] in list comprehension like Python. It is kind of a wasteful syntax and it is like a chore to must convert all [] => {}. Support[]make code look better, easier to see, AI Copilot friendly and easier to copy, convert from code of other languages like: Python, javascript, json, GDScript, etc. -
Support Lua table syntax:
{key = val}
It copies Lua's code table or accepts AI's suggested code without the need to edit it would be nice. And it is a nice style, even GDScript supports it then why won't YueScript support it? -
Support declare function style like:
function myfunction(parm1, param2)orfunc myfunction(parm1, param2)ordef myfunction(parm1, param2)would be nice.
It is a common syntax in many languages like Python, Lua, GDScript, etc. It looks better thanmyfunction = () ->. Yuescript is very nice but I think that humans and AI prefer it more. -
I like to write yuescript to make some local tools to process my assets. My OS is Windows, I prefer to use YueScript/Lua over bat/cmd. It would be nice if YueScript supports more template string because
"${exe} #{arg1} #{arg2}"is not good on Windows: exe ad arg1/arg2 can have space in the path and require quotes with '"'. It would be nice if YueScript supports raw template string like:os.execute [["#{exe}" "#{arg1}" "#{arg2}"]] -- that maybe confilct with current yuescript raw string -- or adopt Python style raw string os.execute """ "{exe}" "{arg1}" "{arg2}" """ -- or adopt js style os.execute `"${exe}" "${arg1}" "${arg2}"` -- or just add support template to '' string as os.execute '"${exe}" "${arg1}" "${arg2}"' -
Add support 'var' keywords like javascript, GDScript: with feature hoisting as JavaScript's default behavior of moving declarations to the top of functions or global scope. It solves the problem of using a variable before it has been declared without need to use
local *:
a = ->
print "a"
b!
b = ->
print "b"
a! -- attempt to call a nil value (global 'b')
It is the pain when writing utility scripts that have many functions and depend on each other
- Add 'elif' as 'elseif'. Well... I code a lot in python, so I make a lot of silly mistake like use 'elif' in Yue.
Thank you and regards!
- Lenguaje dominante
- Lua
- Estrellas
- 620
- Forks
- 45
- Merge medio
- 9 h 5 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de IppClub/YueScript
-
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
[Feature request] Smarter macrosAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de IppClub/YueScript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
follow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ksysoev/duet.nvim#265 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug: accuracy
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PathOfBuildingCommunity/PathOfBuilding#10649 ·
Los mantenedores suelen responder en 1 día
-
reMarkable
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
koreader/koreader#16485 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
nvim-orgmode/orgmode#1213 ·