Search found 651 matches

by Inny
Thu Dec 29, 2016 4:33 pm
Forum: Libraries and Tools
Topic: 1K Asteroids Challenge
Replies: 20
Views: 12926

Re: 1K Asteroids Challenge

... You could have saved a bit more if you made math its own variable before declaring all those math functions. You did it with Table and Love but not Math. Exactly 7 bytes would have been saved. math math math math -> _ math , _ _ _ 4*4=16 -> 1+4+1+3*1=9 Yeah, this is why I bailed out. I needed t...
by Inny
Wed Dec 28, 2016 9:24 pm
Forum: Libraries and Tools
Topic: 1K Asteroids Challenge
Replies: 20
Views: 12926

Re: 1K Asteroids Challenge

Alright, this was my first attempt. I was aiming for the most out there technique in my solution and ended at 1332 bytes after using lua-minifier. I'm bailing at this attempt, because it lead me astray and the only way to get smaller now is to remove features. _=function(a,b,r)a,b=a:match("([^:...
by Inny
Wed Dec 28, 2016 3:06 am
Forum: Libraries and Tools
Topic: 1K Asteroids Challenge
Replies: 20
Views: 12926

Re: 1K Asteroids Challenge

I'm totally going to do this challenge. Give me a day or two.
by Inny
Thu Dec 15, 2016 11:13 pm
Forum: Support and Development
Topic: How to setup VIM
Replies: 35
Views: 33689

Re: How to setup VIM

If you're completely brand new to Vim, I highly discourage it. Vim is not easy, and mastery takes a lot of effort. If you still want to try to learn vim, despite my attempt to dissuade you, then please run the vimtutor command first and dedicate about 30 minutes to it.
by Inny
Mon Oct 03, 2016 9:35 pm
Forum: General
Topic: Share your fiddles!
Replies: 26
Views: 11976

Re: Share your fiddles!

This is pretty sweet, how are you pulling it off? Point me into a github repo so I can expand my brain's meat.
by Inny
Thu Sep 08, 2016 4:34 pm
Forum: Support and Development
Topic: Soo what now?
Replies: 4
Views: 3621

Re: Soo what now?

Lua's tables are "Duck Typed", as in "If it looks like a duck and walks like a duck, it is a duck." What's becoming all the rage these days are "Entity Component Systems" where you write your code to do some basic level inspection of the tables passed to it in order to ...
by Inny
Thu Sep 01, 2016 4:47 am
Forum: General
Topic: { __call = Class.new } produces closure?
Replies: 2
Views: 1772

Re: { __call = Class.new } produces closure?

In the Lua reference manual, the __call metamethod is defined with this code: function function_event (func, ...) if type(func) == "function" then return func(...) -- primitive call else local h = metatable(func).__call if h then return h(func, ...) else error(···) end end end the part whe...
by Inny
Sat Aug 20, 2016 1:01 am
Forum: General
Topic: Resuscitating Lua couroutines
Replies: 7
Views: 4340

Re: Resuscitating Lua couroutines

So here's one of those inconvenient truths about Lua coroutine, which again I love them so much, but they are strictly mutable. It sounds kind of like you want an immutable coroutine, so to speak, where you'd get returned an object from coroutine.resume that's the new state of the thread, so that th...
by Inny
Wed Aug 17, 2016 6:04 pm
Forum: Support and Development
Topic: How can I use Lua 5.2 for LOVE
Replies: 16
Views: 8883

Re: How can I use Lua 5.2 for LOVE

If you're looking for the _ENV feature from lua 5.2, bear in mind that its behavior is very similar to setfenv, which is still available in lua 5.1 (ignoring the scope/function distinctions). You can use the following code snippit at the top of a module to give you the effect you're looking for: loc...
by Inny
Fri Aug 12, 2016 7:43 pm
Forum: General
Topic: What's your Lua/Love setup ?
Replies: 26
Views: 18724

Re: What's your Lua/Love setup ?

- vim-love-docs :Vim syntax highlighting and helpfile for LÖVE. Allows me to type ":help love.graphics.draw" for example, and get the wiki entry for love.graphics.draw. Also colors LÖVE functions special colors. - love-launch : Use Alt-L to launch LÖVE. I personally use ,r. It searches up...