Search found 211 matches

by Xgoff
Sat Oct 12, 2013 12:41 pm
Forum: Support and Development
Topic: table.pack and LOVE
Replies: 33
Views: 11777

Re: table.pack and LOVE

the pattern matcher a potential DoS target That's an interesting thought. Do you happen to know any example of a pattern that can be used that way? I could find/think of none. you can quite easily invoke catastrophic backtracking for example the code: ("a"):rep(100):match(patt) where patt...
by Xgoff
Fri Oct 11, 2013 8:28 pm
Forum: General
Topic: Programming Style
Replies: 24
Views: 9137

Re: Programming Style

ocd: spend way too much time trying to design an overcomplicated structure, get too lazy to actually code, then dump the project
by Xgoff
Fri Oct 11, 2013 5:56 pm
Forum: Support and Development
Topic: table.pack and LOVE
Replies: 33
Views: 11777

Re: table.pack and LOVE

kikito wrote:It's possible to detect infinite loops in Lua if the debug lib is available.
of course, that depends on what you mean by "in Lua". C functions called through lua can't be monitored by the debug hook. notably, this makes the pattern matcher a potential DoS target
by Xgoff
Thu Oct 10, 2013 9:58 pm
Forum: Support and Development
Topic: Lua's math (and canvas in threads)
Replies: 16
Views: 4053

Re: Lua's math

Boolsheet wrote:So, yes. A PRNG with consistent behaviour is very welcome.
COUGHluajitCOUGH
by Xgoff
Wed Sep 18, 2013 10:38 pm
Forum: Support and Development
Topic: how can i make a code check that check the bit?
Replies: 30
Views: 5581

Re: how can i make a code check that check the bit?

Davidobot wrote:
jjmafiae wrote: am i the only person who dons't know what luajit is or ?

i have heard many people talk about.
As far as I know, it is an experimental Lua thing that super-charges LÖVE games to run at double the usual FPS.
or more than that if you play your cards right
by Xgoff
Wed Sep 18, 2013 6:09 pm
Forum: Support and Development
Topic: how can i make a code check that check the bit?
Replies: 30
Views: 5581

Re: how can i make a code check that check the bit?

arch = string.dump(function() end):byte(9) == 4 and "x86" or "x64" well, technically this would tell you what architecture the executable is, not necessarily the os... You must be a wizard. Seriously. Some explanations ? it's the part of the bytecode header that stores sizeof(si...
by Xgoff
Tue Sep 17, 2013 11:49 pm
Forum: Support and Development
Topic: how can i make a code check that check the bit?
Replies: 30
Views: 5581

Re: how can i make a code check that check the bit?

or a dodgy one

Code: Select all

arch = string.dump(function() end):byte(9) == 4 and "x86" or "x64"
well, technically this would tell you what architecture the executable is, not necessarily the os...
by Xgoff
Thu Sep 12, 2013 6:43 pm
Forum: Support and Development
Topic: MiddleClass can't accept tables? [SOLVED]
Replies: 6
Views: 2724

Re: MiddleClass can't accept tables?

Hello everyone. Middleclass is a pretty good class implementation. Currently I'm writing a very small and simple gui lib for my game. I want buttons to change color when mouse in hovering on them, but strangely enough I can't use tables in initialize method. Enough talking, let me give you some pie...
by Xgoff
Fri Aug 30, 2013 4:44 am
Forum: General
Topic: Why use local variables?
Replies: 12
Views: 5475

Re: Why use local variables?

BlackBulletIV wrote:
Eamonn wrote:Unless you're making a 20 line throwout script, get in the habit of using local variables; it'll make life so much easier in the long run.
even in that case i still use locals purely out of habit
by Xgoff
Fri Aug 02, 2013 3:26 am
Forum: General
Topic: [POLL] Do you like "then,do,end" or "{ }"?
Replies: 37
Views: 17270

Re: [POLL] Do you like "then,do,end" or "{ }"?

T-Bone wrote:The only downside I can think of with keywords is that editors can't match them up, which can make some mistakes hard to notice.
uh... there's no reason they can't (lua's parser has no problem doing it). they just don't for some reason