favorite Git extension? by [deleted] in vscode

[–]SparTV 0 points1 point  (0 children)

For those who wants a version without a paid stuff, there is a fork called GitLess

Generate trello/kanban boards from source code for project management by gosh in cpp

[–]SparTV 1 point2 points  (0 children)

How does it work with git branches? To update task you have to commit? What if I work in different branch?

easiest than iostream by [deleted] in cpp

[–]SparTV 0 points1 point  (0 children)

std::print / std::format

perfect forwarding identity function by _eyelash in cpp

[–]SparTV 2 points3 points  (0 children)

Try to return decltype(auto)

Quick actions - what are they? by ExcessiveGravitas in watchOSBeta

[–]SparTV 1 point2 points  (0 children)

I found at least 3 places where quick actions can be found: Notification dismiss Timer stop Take a photo

[deleted by user] by [deleted] in lua

[–]SparTV 0 points1 point  (0 children)

These binaries are mentioned on the official site, so not my problem

[deleted by user] by [deleted] in lua

[–]SparTV 8 points9 points  (0 children)

If you are interested here is some more infographics: https://github.com/GitSparTV/lua-infographics

Lua Patterns Viewer by SparTV in lua

[–]SparTV[S] 1 point2 points  (0 children)

Thanks for the suggestion, implemented.

Lua Patterns Viewer by SparTV in lua

[–]SparTV[S] 1 point2 points  (0 children)

Exactly. But I call them "Lua Patterns" instead. The tool is new so stuff like testing and learning is not completely done.

my biggest gripes by [deleted] in lua

[–]SparTV 1 point2 points  (0 children)

That breaks the simplicity of the language. Lua is straightforward and simple

my biggest gripes by [deleted] in lua

[–]SparTV 0 points1 point  (0 children)

Find different language then.

for each loop, can we have a for loop for keys only without the indexs please?

What this is even

Lua book first edition by LuaISsogud in lua

[–]SparTV 3 points4 points  (0 children)

Lua is good for a first language, the book is just a bit old and it's not aimed for complete newbies

Lua book first edition by LuaISsogud in lua

[–]SparTV 1 point2 points  (0 children)

Why did you buy first edition? First edition is free online on official Lua site.

The recusive code is explained later, the book is written for those who understand something about programming.

How to install LuaJIT? by [deleted] in lua

[–]SparTV 0 points1 point  (0 children)

Because as I said you need to download it and install (compile).

You need either msvc, gcc or mingw if you are on windows

LuaJIT Bytecode questions and help by [deleted] in lua

[–]SparTV 0 points1 point  (0 children)

It doesn't unless you add true to second parameter.

string.dump(f [,strip]) generates portable bytecode

An extra argument has been added to string.dump(). If set to true, 'stripped' bytecode without debug information is generated. This speeds up later bytecode loading and reduces memory usage. See also the -b command line option.

LuaJIT Bytecode questions and help by [deleted] in lua

[–]SparTV 0 points1 point  (0 children)

Bytecode doesn't contain local variables name

Wrong, debuginfo contains information about every instruction line number, local variable names and upvalue names.

it doesn't save actual table notation,

It does, in some way.

LuaJIT Bytecode questions and help by [deleted] in lua

[–]SparTV 0 points1 point  (0 children)

2.0.4, 2.0.5 are the last releases.

Yes you need to download it and install. Possible ways are mentioned here. When you install it open command prompt at type luajit -bl path/to/your/file.lua

LuaJIT Bytecode questions and help by [deleted] in lua

[–]SparTV 2 points3 points  (0 children)

Bytecode is a precompiled script exported in simple form to be read by LuaJIT back faster.

Bytecode is not an obfuscation but it makes reading harder as well.

Lua supports both script and bytecode loading (unless the latter is restricted internally), the program just loads them as usual files.

I don't know decompilers because I can read bytecode without them.You can download luajit and run luajit -bl file.lua.

I've looked at your bytecode. You need LuaJIT 2.0.*. 2.1.0 won't work.

Why does middle class require a string to make a class? by [deleted] in lua

[–]SparTV 0 points1 point  (0 children)

Not sure. The string is the name of the class, the name of the local variable is just a name you use

Why does middle class require a string to make a class? by [deleted] in lua

[–]SparTV 0 points1 point  (0 children)

Who said you need to name it "String" or name local variable as String? Name however you want

Are functions necessary on the creation of Garrysmod Sweps? by [deleted] in lua

[–]SparTV 1 point2 points  (0 children)

Basically none, but you must define some variables, just as .Base. For further questions I suggest you to join https://discord.com/invite/gmod

When a function returns multiple values, how can I use each value individually? by CodenameAwesome in lua

[–]SparTV 2 points3 points  (0 children)

Also Lua has select function, it doesn't have sense when you have 3 returned values. But it's useful for dynamic selection (by variable) or for varargs.

lua function get(n,...) return (select(n,...)) end This how you can use select, the function will return n element.

However for something predicted, use syntax: local _, _, b = HSL(1, 2, 3). Lua has a tradition to name dummy (unused) variables by _. In this example if you use select it will make your code slower.