Search found 211 matches
- Tue Jul 01, 2014 4:19 pm
- Forum: Support and Development
- Topic: [Closed] Segmentation Fault
- Replies: 13
- Views: 10994
Re: Segmentation Fault
btw he just fixed this
- Sat Jun 28, 2014 5:39 pm
- Forum: Support and Development
- Topic: [Closed] Segmentation Fault
- Replies: 13
- Views: 10994
Re: Segmentation Fault
Okay, to avoid confusion, I changed the infinite loop to a block that repeats 1000 times. That ought to crash it, but it is in no way enough to cause Lua to run out of memory. On my system. it runs fine on official Lua interpreter, but crashes with LuaJIT on the 23rd iteration. or if there's a bug ...
- Wed Jun 25, 2014 6:17 pm
- Forum: Support and Development
- Topic: Self flood!
- Replies: 9
- Views: 6599
Re: Self flood!
Still, the problems remains of having self everywhere since I'm using locals extensively. Maybe this is just a side affect of Lua making variables globals by default. no, it's because lua doesn't actually have methods. the purpose : serves is to make a function definition or regular table index + f...
- Wed Jun 25, 2014 5:29 pm
- Forum: General
- Topic: Hacking Mantle into löve
- Replies: 4
- Views: 2145
Re: Hacking Mantle into löve
not to mention... i don't know how exactly you expect to benefit from it
- Tue Jun 10, 2014 2:04 am
- Forum: General
- Topic: Organizing your project
- Replies: 13
- Views: 5640
Re: Organizing your project
C
if i see a variable and can't find its declaration in the same file, i ain't gonna be happy
sandbox/dsl function environments are an exception of course (the other being the standard lib, obviously)
if i see a variable and can't find its declaration in the same file, i ain't gonna be happy
sandbox/dsl function environments are an exception of course (the other being the standard lib, obviously)
- Thu Jun 05, 2014 1:11 pm
- Forum: Support and Development
- Topic: Trying to Get Rid of Globals
- Replies: 9
- Views: 2802
Re: Trying to Get Rid of Globals
There's no global variables, just things required with `require` or passed by parameter. this i avoid globals completely (unless i need to override a built-in for some reason). putting all of your "global" state into modules and requiring them on-demand (into locals!) makes it much easier...
- Fri Mar 07, 2014 6:28 am
- Forum: Support and Development
- Topic: [Solved] Require and local functions
- Replies: 2
- Views: 2539
Re: Require and local functions
yes
just move the definition of bar() above that of foo.foo(). this will turn foo.foo() into a closure with bar() as an upvalue, which allows it to be used by foo.foo() even though it is no longer in scope by the time you call it
just move the definition of bar() above that of foo.foo(). this will turn foo.foo() into a closure with bar() as an upvalue, which allows it to be used by foo.foo() even though it is no longer in scope by the time you call it
- Fri Mar 07, 2014 3:06 am
- Forum: General
- Topic: determining the nature of one character
- Replies: 3
- Views: 1718
Re: determining the nature of one character
Code: Select all
if your_string:match("%a") then
-- ...
end
- Thu Mar 06, 2014 6:42 pm
- Forum: General
- Topic: Compiling With Lua 5.2 Compatibility
- Replies: 9
- Views: 4949
Re: Compiling With Lua 5.2 Compatibility
I'd just like to make the piercing jab that bad use of the goto statement has been the underlying cause of two recently discovered dramatic security flaws. not really, the apple bug was mainly the result of not using braces around the if statements, possibly due to a merge/copy+paste error i would ...
- Mon Mar 03, 2014 10:12 pm
- Forum: General
- Topic: What techniques that everyone should know?
- Replies: 75
- Views: 22850
Re: What techniques that everyone should know?
Switching booleans without an if-else-statement. function SwitchBoolean( Boolean ) return not Boolean and true or false end I'll try to explain it, but if you have any questions about what this does, see this very well written article . So, `Boolean` would be the boolean ( `true`, `false`, `nil` ) ...