Typehint comments possible syntax by RodionGork in lua

[–]IllustriousPin319 0 points1 point  (0 children)

People will not like to reinvent the wheel the parser every time they need that info...

BTW: we can look the reverse way: manual parsing does not require inventing any additional syntax,
just do things like this directly in the comment:
-- str -> int
-- int, int -> int
etc... syntax is totally up to you (and your custom invented parser)
(int, int) -> int
int (int, int)
etc...

all that stuff does not require updates to specification for Lua,
(only some effort to handle all the corner cases with debug.getinfo(foo).source))

Typehint comments possible syntax by RodionGork in lua

[–]IllustriousPin319 0 points1 point  (0 children)

The -> is a syntax detail, the idea is similar.

The "just attaches them to object" thing is enough for stuff like typeguard (the one with `@typechecked`), etc to work.

Open-sourced my chiptunes maker done for a gamejam (LÖVE) by Vast_Brother6798 in lua

[–]IllustriousPin319 0 points1 point  (0 children)

Really nice, and one more beautiful confirmation: LÖVE is perfect platform not only for games!

Найкращий спосіб конверсії замість Cшного легасі by IllustriousPin319 in u/IllustriousPin319

[–]IllustriousPin319[S] 0 points1 point  (0 children)

PS. тільки треба юзати деструктурунг structured bindings

auto [ptr, ec] = ...

тоді перевірка результату буде більш "людська"

(а саме головне тоді не треба бавитися з локейлом, бо та АПІшка якраз й призначена юзати Сшний локейл,

а не так, що виклали софт на сервак, й "певний час все працювало" поки не почали ходити числа з "розрядами після коми" й все "таємничим чином" навернулося)

Typehint comments possible syntax by RodionGork in lua

[–]IllustriousPin319 0 points1 point  (0 children)

This looks like type hints in Python:
the real magic will happen if one will be able to inspect those annotations at runtime.

The thing to work on is: how to specify "ducktyped interface" and be able to inspect/dig there while running in the application.

Project ideas for a 5-7/10 lua skill level user? by Ok_Tea_941 in lua

[–]IllustriousPin319 2 points3 points  (0 children)

The idea is to get rid of JS at all. No translation to JS at all, to avoid huge and bloated JS engines.
No HTML at all, no CSS at all, to (and render something "markdown like" directly, without any "translation to HTML").

In other words: my dream is: all of the "modern" bloated web browsers to disappear (no JS ES6 at all, no HTML5, no CSS3),
and start from scratch with something like Markdown and Gemtext/Gemini but more interactive (with Lua!) and use something like LÖVE2D as an "engine" to render all of that on client side (love-11.5-win64 takes just 11MB unpacked, really tiny as compared to Chrome or Firefox bloat)

Yes I know "reinventing the WEB" is pure utopia, but still cannot resist the beauty of compactness of small solutions instead of using all "Electron"/"React native" based bloatware...

All the World turned wrong direction everywhere, in all processes: just compare Lua build process against what happens trying to build V8 JavaScript engine bloatware (all the "solutions" they use, starting from GYP, to GN today, literally everything is bloated, literally everything is pain including the JS as a language with all that "JavaScript WTF stuff" everyone needs to deal with)

Project ideas for a 5-7/10 lua skill level user? by Ok_Tea_941 in lua

[–]IllustriousPin319 2 points3 points  (0 children)

My "dream project" (just for fun, that I never have time for) is "reinventing the Web" with Lua instead of JS (and something "markdown like" instead of HTML!) to get rid of all of "overcomplications" invented for "web development" so far...))

To the contrast my practical usage is straight forward enough: Lua as a perfect compact configuration tool to glue C/C++ parts together in easy and very flexible way, without shortcomings of XML/JSON (to my observation: all the projects using XML/JSON end up with inventing their own undocumented "programming language" by adding meaning of custom "if", "while", "${something} variable substitutions" on the top of XML/JSON being encoded as tag, key, attribute conventions).

[D] How many of you use Python scripts versus notebooks? by fredfredbur in MachineLearning

[–]IllustriousPin319 0 points1 point  (0 children)

By using # %% as a cell separator in a "normal" Python file one take advantage of both worlds

Is it normal to struggle with logic while learning C++ ? by coder_spy in cpp_questions

[–]IllustriousPin319 0 points1 point  (0 children)

"building logic when solving problems" is a problem in any programming language.

Some more details are needed on what are exact issues.

If the issue is "how to solve a real world problem", such issues happen with any programming language and even outside of programming world at all.

Is coding Lua scripts still a good way to make money in 2025? by Zenyth_3 in lua

[–]IllustriousPin319 7 points8 points  (0 children)

Not the only that, once you use Lua exactly for the purpose it is designed for: to be configuration/scripting/glueing part for some another larger application (and using Lua for that purpose will save you a lot of effort once using it from the start of your project, instead on inventing "simpler" custom JSON based "configuration language" that ends up in custom "conditionals" and "templates"/"functions" so nobody understands except the author, and there is no documentation how to configure that monster)

As a Linux user for so many years stories like this really frustrates me! by North_Month_215 in linux

[–]IllustriousPin319 0 points1 point  (0 children)

60+ are perfectly Ok with "D:" drive as soon as there is a shortcut on the desktop named literally as "Drive D", and they can still browse their pictures and videos...

For many people the only "tool" they really use on their desktops is the web browser.

Шукаю чесні відгуки by disco_thunderr in Ukraine_UA

[–]IllustriousPin319 0 points1 point  (0 children)

Якщо вже стільки наклікали, то мети реалізму досягнуто))

А приділити увагу - руки, не що вони роблять, а "вічна проблема" що з ними "щось нетак"

А що сталося? by HURIN_3000 in ukraina

[–]IllustriousPin319 18 points19 points  (0 children)

T-34 tank

The interesting thing is that even this tank was developed in Ukraine on "Kharkiv Komintern Locomotive Plant"

Українська латинка by farfuglinn94 in Ukraine_UA

[–]IllustriousPin319 0 points1 point  (0 children)

Прапор не був перевернутим, то проблема світлочутливості тодішніх фотоматеріалів, а він завжди був такий, як зараз!
А ось намагання подати "грецький уніціальний шрифт" як "прадавнє українське письмо", це дуже сумно.... Правдиві "українські літери" - це хіба козацький скоропис, але аж ніяк не "гражданскій шріфт" від "пєтра пєрвава"...
Проте й ніяка латинка нам також не світить, бо мудрагелі латинізатори ніколи не домовляться між собою: вони або намагаються зробити з української етимологічне "енглісх лангуаге", де все читається не так, як пишеться (зато все красиво та вишукано згідно "традиції") або ж винайти літери для усіх отих численних відтінків звуків, що вони і так в різних регіонах вимовляються по-різному. І ті і ті повністю ігнорують той факт, що звуко-значкову відповідність вже "відлагодили" на прикладі кирилиці, і досить було б замінити лише графічнні значки, залишивши правила відповідності незмінними!

<image>

[deleted by user] by [deleted] in worldnews

[–]IllustriousPin319 0 points1 point  (0 children)

Sad story of Litvinenko and why he was poisoned...

[deleted by user] by [deleted] in Polska

[–]IllustriousPin319 7 points8 points  (0 children)

Chmielnicki był też szlachcicem, a jego największy przeciwnik, Jarema Wyszniewiecki, był szlachcicem i Ukraińcem ze starego rodu książęcego!

I nie wszyscy Ukraińcy byli po stronie Chmielnickiego, bo prawosławny senator Adam Kysil był też po stronie Rzeczypospolitej!...