Search found 2614 matches

by pgimeno
Sun May 16, 2021 11:16 am
Forum: General
Topic: Google failed: how to force explicit variable declaration?
Replies: 4
Views: 83

Re: Google failed: how to force explicit variable declaration?

strict.lua is run-time. I prefer to detect those statically as you don't depend on the code path being executed in order to detect it. I use my own method to detect globals: https://love2d.org/forums/viewtopic.php?f=5&t=86717 - You can enforce parameter types in functions with the aptly named ty...
by pgimeno
Sat May 15, 2021 4:56 pm
Forum: Support and Development
Topic: Garbage going crazy
Replies: 17
Views: 559

Re: Garbage going crazy

grump wrote: Sat May 15, 2021 2:27 pm I have considered doing that, but it seems difficult to distinguish between "this computer is slow" and "LuaJIT doesn't feel like working this time".
Isn't it distinguishable by amount of garbage generated, rather than speed?
by pgimeno
Sat May 15, 2021 1:33 pm
Forum: Support and Development
Topic: Garbage going crazy
Replies: 17
Views: 559

Re: Garbage going crazy

Well, this may be a bit (understatement of the year) kludgy, but maybe consider measuring performance and doing love.event.quit("restart") if it's not enough.
by pgimeno
Fri May 14, 2021 10:49 am
Forum: Support and Development
Topic: I need to split up a table
Replies: 7
Views: 145

Re: I need to split up a table

Maybe switch to lua-enet ? "ENet will send and deliver packets regardless of size. Large packets are fragmented into many smaller packets of suitable size, and reassembled on the foreign host to recover the original packet for delivery. The process is entirely transparent to the developer."...
by pgimeno
Wed May 12, 2021 6:12 pm
Forum: Libraries and Tools
Topic: LuaPreprocess - straightforward preprocessor with simple syntax
Replies: 39
Views: 35986

Re: LuaPreprocess - straightforward preprocessor with simple syntax

I see, but it would be so nice if expandable macros are minimally penalized in typing. There are still some symbols free, like $ or &, or even ~ when not followed by =, that could be used for this purpose. Or maybe an identifier followed by "(" without a space could have a special mean...
by pgimeno
Wed May 12, 2021 4:54 pm
Forum: Support and Development
Topic: Garbage going crazy
Replies: 17
Views: 559

Re: Garbage going crazy

In case it helps, here's my package.path (in both Löve and command line luajit): ./?.lua;/usr/share/luajit-2.0.4/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua And it's found in the second location, as these lines of st...
by pgimeno
Wed May 12, 2021 11:10 am
Forum: Libraries and Tools
Topic: LuaPreprocess - straightforward preprocessor with simple syntax
Replies: 39
Views: 35986

Re: LuaPreprocess - straightforward preprocessor with simple syntax

That sounds pretty good, thank you! It would be even cooler to be able to do something like: @assert(...) instead of @insert assert(...) but that is already a nice solution.
by pgimeno
Wed May 12, 2021 10:41 am
Forum: Support and Development
Topic: Garbage going crazy
Replies: 17
Views: 559

Re: Garbage going crazy

I asked in a Lua(JIT) community about these fluctuations that I'm seeing all the time, but the consensus was that I'm just stupid and delusional because it can't happen. FWIW you're not the first one to run into these issues. https://love2d.org/forums/viewtopic.php?f=4&t=88029 Try with: require...
by pgimeno
Tue May 11, 2021 7:21 pm
Forum: Support and Development
Topic: Any sneaky way to draw an elliptical arc?
Replies: 2
Views: 124

Re: Any sneaky way to draw an elliptical arc?

The obvious answer is to use trigonometry, but note that angles get deformed and don't work as one expects. function ellipticArc(x, y, rx, ry, angle1, angle2, segments) local points = {} local range = angle2 - angle1 for i = 0, segments do local angle = angle1 + range * (i / segments) points[i + i +...