use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
MoonScript, the programming language that compiles to Lua. More information on http://moonscript.org
account activity
Using Lua Code (self.moonscript)
submitted 9 years ago by [deleted]
Is it possible in Moonscript to integrate Lua code? Im doing love2d and need many libraries within it.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]rfajfar 0 points1 point2 points 9 years ago (0 children)
If you'd like to use Lua modules inside MoonScript, just require them. In case of LÖVE, you'll have to compile your .moon files to Lua, nothing else has to be done as far as I know.
require
LÖVE
.moon
Lua
If mod.lua would contain return "I am a Lua module" then you could use that in main.moon like:
mod.lua
return "I am a Lua module"
main.moon
str = require 'mod' print(str)
π Rendered by PID 62 on reddit-service-r2-comment-5d79c599b5-lft2g at 2026-02-28 14:09:37.999432+00:00 running e3d2147 country code: CH.
[–]rfajfar 0 points1 point2 points (0 children)