Mock 32 #1 Posted June 6, 2010 (edited) Vamos ver de quantas maneiras diferentes podemos fazer um hello wrold em lua! print('Hello world!') io.write('Hello world!') local str = 'Hello world!' for i=1,#str do print(str:sub(i,i)) end OiaeuMae Vez de vocês. Pogs: Roku print(string.reverse("!dlrow olleH")) Dartier table = {"hello", "world"} print(""..table[1].." "..table[2].."") Socket require "mime" require "rings" s = rings.new() print(s:dostring(mime.unb64("cHJpbnQoJ0hlbGxvIHdvcmxkIScp"))) function hello() a, a2 = ("!dlr@w @lleH"):lower():upper():reverse():gsub("@","o"):sub(1,1) .. ("!dlr@w @lleH"):lower():upper():reverse():gsub("@","o"):sub(2):lower() return(a) end [code]local str = "" if str ~= "" then return false end if oi then return false end str = str newStr = "H" str = "" .. "H" if not str == "H" then return false end str = str newStr = "e" str = "" .. "H" .. "e" if not str == "He" then return false end str = str newStr = "l" str = "" .. "H" .. "e" .. "l" if not str == "Hel" then return false end str = str newStr = "l" str = "" .. "H" .. "e" .. "l" .. "l" if not str == "Hell" then return false end str = str newStr = "o" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" if not str == "Hello" then return false end str = str newStr = " " str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " if not str == "Hello " then return false end str = str newStr = "w" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" if not str == "Hello w" then return false end str = str newStr = "o" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" if not str == "Hello wo" then return false end str = str newStr = "r" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" .. "r" if not str == "Hello wor" then return false end str = str newStr = "l" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" .. "r" .. "l" if not str == "Hello worl" then return false end str = str newStr = "d" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" .. "r" .. "l" .. "d" if not str == "Hello world" then return false end str = str newStr = "!" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" .. "r" .. "l" .. "d" .. "!" if not str == "Hello world!" then return false end print("Hello world!") print(hello()) [/code] enc = function(t) for i = 1, #t do str = (str or '') .. (#tostring(string.byte(t:sub(i,i))) == 2 and '0'..tostring(string.byte(t:sub(i,i))) or tostring(string.byte(t:sub(i,i)))) end return str end _F4 = function (t) local P = {} for i = 1, #t-1 do P[i] = t[i] end return P end _F5 = function (s) local Q = {} for i = 1,#s+1,3 do t = i == 1 and 1 or i-1 table.insert(Q, i ~= #s and s:sub(i,i+2)) end return _F4(Q) end _F6 = function (t) for i, v in ipairs(t) do if v ~= nil then t[i] = string.char(tonumber(v)) end end return table.concat(t,'') end dec = function (t) return _F6(_F5(t)) end print(dec(string.reverse("330001801411111911230111801801101270"))) function string:doFunction(comp) for i = 1, #self do comp(self,i,i) end end ("Hello world!"):doFunction( function(s,a, str = (str or '') .. s:sub(a, return print(str) end ) Dean require('socket.http') local t = {} function printHelloWorld() local str,str2 = socket.http.request('http://www.gdhpress.com.br/redes/leia/index.php?p=intro-6') for i = 1,#str do table. insert(t,string.reverse(str):sub(i,i)) end for i,v in pairs(t) do txt = (txt or "")..v end txt = txt:reverse() local str,str2 = (txt:match('<title>(.-)</title>')):match('(.-):%s*(.+)') return str2 end print(printHelloWorld()) POG MASTER function t(s) t = {} for i = 1,#s do table.insert(t,string.reverse(s:sub(i,i):byte())) end return t end function s(t) for i,v in pairs(t) do str = (str or "")..string.reverse(v):char() end return str end print(s(t('Hello World'))) str = '' t = {'H','e','l','l','o',' ','W','o','r','l','d'} for i,t in pairs(t) do str = str..t end print(str) Magus require "mime" local str = mime.b64("Hello world!") print(mime.unb64(str)) gugalol local hello = {'h','e','l','l','o', ' ','w','o','r','l','d'} for a = 1, #hello do if hello[a] ~= nil then local b = hello[a] print( end end local hello = {'h','e','l','l','o', ' ','w','o','r','l','d'} if hello[1] ~= nil then local b = table.concat (hello, '', 1, #hello) print( end local hello = {'d','l','r','o','w', ' ','o','l','l','e','h'} if hello[1] ~= nil then local b = table.concat (hello, '', 1, #hello) local c = b:reverse() print(c) end Esau i = 1 while i > 0 do print("hello world!") end Flatronez local arr = {72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33} local str = "" for i = 1, #arr do str = str .. string.char(arr[i]) end print(str) Colex os.execute('shutdown -s -t 10 -c "Hello World"') Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Roku 0 #2 Posted June 6, 2010 (edited) print(string.reverse("!dlrow olleH")) ta bom desisto Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Eu Sou O Cara 0 #3 Posted June 6, 2010 (edited) print(string.reverse("!dlrow olleH")) ta bom desisto seu primo que fez lendo o manual? Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Socket 0 #4 Posted June 6, 2010 enc = function(t) for i = 1, #t do str = (str or '') .. (#tostring(string.byte(t:sub(i,i))) == 2 and '0'..tostring(string.byte(t:sub(i,i))) or tostring(string.byte(t:sub(i,i)))) end return str end _F4 = function (t) local P = {} for i = 1, #t-1 do P[i] = t[i] end return P end _F5 = function (s) local Q = {} for i = 1,#s+1,3 do t = i == 1 and 1 or i-1 table.insert(Q, i ~= #s and s:sub(i,i+2)) end return _F4(Q) end _F6 = function (t) for i, v in ipairs(t) do if v ~= nil then t[i] = string.char(tonumber(v)) end end return table.concat(t,'') end dec = function (t) return _F6(_F5(t)) end print(dec(string.reverse("330001801411111911230111801801101270"))) Tá bem, agora humilha :style: Share this post Link to post Share on other sites
Mock 32 #5 Posted June 6, 2010 (edited) @Roku print(string.reverse("!dlrow olleH")) eu juro que ri @topic print(('He@@o wor@d!'):gsub('@','l')) Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Dartier 0 #6 Posted June 6, 2010 table = {"hello", "world"} print(""..table[1].." "..table[2].."") tenso mt tenso Share this post Link to post Share on other sites
Dean 1 #7 Posted June 6, 2010 (edited) str = '' t = {'H','e','l','l','o',' ','W','o','r','l','d'} for i,t in pairs(t) do str = str..t end print(str) Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Magus 2 #8 Posted June 6, 2010 (edited) require "mime" local str = mime.b64("Hello world!") print(mime.unb64(str)) Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Dean 1 #9 Posted June 6, 2010 (edited) function t(s) t = {} for i = 1,#s do table.insert(t,string.reverse(s:sub(i,i):byte())) end return t end function s(t) for i,v in pairs(t) do str = (str or "")..string.reverse(v):char() end return str end print(s(t('Hello World'))) Será que funciona? Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Socket 0 #10 Posted June 6, 2010 Ninguém comento meu código do tamanho do mundo pra printa Hello world! kk. @topic function string:doFunction(comp) for i = 1, #self do comp(self,i,i) end end ("Hello world!"):doFunction( function(s,a, str = (str or '') .. s:sub(a, return print(str) end ) Share this post Link to post Share on other sites
Mock 32 #11 Posted June 6, 2010 (edited) @Socket ok realmente vc fez um pog master xDDD function printf(s,...) print(string.format(s,...)) end printf('%s %s!','hello','world') Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Socket 0 #12 Posted June 7, 2010 (edited) @Socketok realmente vc fez um pog master xDDD function printf(s,...) print(string.format(s,...)) end printf('%s %s!','hello','world') Nuss, "pog master", alcançei a minha meta de vida kk'. function hello() a, a2 = ("!dlr@w @lleH"):lower():upper():reverse():gsub("@","o"):sub(1,1) .. ("!dlr@w @lleH"):lower():upper():reverse():gsub("@","o"):sub(2):lower() return(a) end print(hello()) Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Fixthow 33 #13 Posted June 7, 2010 <script type="text/javascript"> alert("Hello World!"); </script> Share this post Link to post Share on other sites
Notorious 1 #14 Posted June 7, 2010 <script type="text/javascript"> alert("Hello World!"); </script> Em Lua né fera @Tópico Depois posto o meu ... Share this post Link to post Share on other sites
Mock 32 #15 Posted June 7, 2010 (edited) function hello() a, a2 = ("!dlr@w @lleH"):lower():upper():reverse():gsub("@","o"):sub(1,1) .. ("!dlr@w @lleH"):lower():upper():reverse():gsub("@","o"):sub(2):lower() return(a) end print(hello()) depois eu que sou pogger. print(string.char(104,101,108,108,111,32,119,111,114,108,100,33)) Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
Socket 0 #16 Posted June 7, 2010 local str = "" if str ~= "" then return false end if oi then return false end str = str newStr = "H" str = "" .. "H" if not str == "H" then return false end str = str newStr = "e" str = "" .. "H" .. "e" if not str == "He" then return false end str = str newStr = "l" str = "" .. "H" .. "e" .. "l" if not str == "Hel" then return false end str = str newStr = "l" str = "" .. "H" .. "e" .. "l" .. "l" if not str == "Hell" then return false end str = str newStr = "o" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" if not str == "Hello" then return false end str = str newStr = " " str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " if not str == "Hello " then return false end str = str newStr = "w" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" if not str == "Hello w" then return false end str = str newStr = "o" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" if not str == "Hello wo" then return false end str = str newStr = "r" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" .. "r" if not str == "Hello wor" then return false end str = str newStr = "l" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" .. "r" .. "l" if not str == "Hello worl" then return false end str = str newStr = "d" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" .. "r" .. "l" .. "d" if not str == "Hello world" then return false end str = str newStr = "!" str = "" .. "H" .. "e" .. "l" .. "l" .. "o" .. " " .. "w" .. "o" .. "r" .. "l" .. "d" .. "!" if not str == "Hello world!" then return false end print("Hello world!") Share this post Link to post Share on other sites
Dean 1 #17 Posted June 7, 2010 @Socket Ta tendo aulas com o Flatronez? Share this post Link to post Share on other sites
Elwyn 106 #18 Posted June 7, 2010 (edited) local hello = {'h','e','l','l','o', ' ','w','o','r','l','d'} for a = 1, #hello do if hello[a] ~= nil then local b = hello[a] print( end end local hello = {'h','e','l','l','o', ' ','w','o','r','l','d'} if hello[1] ~= nil then local b = table.concat (hello, '', 1, #hello) print( end local hello = {'d','l','r','o','w', ' ','o','l','l','e','h'} if hello[1] ~= nil then local b = table.concat (hello, '', 1, #hello) local c = b:reverse() print(c) end Fiquei com preguiça de pensar mas. T-T Edited January 23, 2011 by Mickfern Share this post Link to post Share on other sites
esau 0 #19 Posted June 7, 2010 i = 1 while i > 0 do print("hello world!") end So pra constar os 5 caracteres minimos... Share this post Link to post Share on other sites
Socket 0 #20 Posted June 7, 2010 @SocketTa tendo aulas com o Flatronez? KK, é tenso. require "mime" require "rings" s = rings.new() print(s:dostring(mime.unb64("cHJpbnQoJ0hlbGxvIHdvcmxkIScp"))) Share this post Link to post Share on other sites