Jump to content
Sign in to follow this  
Mock

Hello world!

Recommended Posts

Mock    32
Mock

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 by Mickfern

Share this post


Link to post
Share on other sites
Roku    0
Roku

print(string.reverse("!dlrow olleH"))

ta bom desisto

Edited by Mickfern

Share this post


Link to post
Share on other sites
Eu Sou O Cara    0
Eu Sou O Cara
print(string.reverse("!dlrow olleH"))

ta bom desisto

 

seu primo que fez lendo o manual?

Edited by Mickfern

Share this post


Link to post
Share on other sites
Socket    0
Socket

    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
Mock

@Roku

print(string.reverse("!dlrow olleH"))

eu juro que ri

@topic

print(('He@@o wor@d!'):gsub('@','l'))

Edited by Mickfern

Share this post


Link to post
Share on other sites
Dartier    0
Dartier

table = {"hello", "world"}

print(""..table[1].." "..table[2].."")

 

tenso

mt tenso

Share this post


Link to post
Share on other sites
Dean    1
Dean
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 by Mickfern

Share this post


Link to post
Share on other sites
Magus    2
Magus
require "mime"
local str = mime.b64("Hello world!")
print(mime.unb64(str))

Edited by Mickfern

Share this post


Link to post
Share on other sites
Dean    1
Dean

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 by Mickfern

Share this post


Link to post
Share on other sites
Socket    0
Socket

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
Mock

@Socket

ok

realmente vc fez um pog master xDDD

function printf(s,...)
    print(string.format(s,...))
end
printf('%s %s!','hello','world')

Edited by Mickfern

Share this post


Link to post
Share on other sites
Socket    0
Socket
@Socket

ok

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 by Mickfern

Share this post


Link to post
Share on other sites
Fixthow    33
Fixthow
<script type="text/javascript">
alert("Hello World!");
</script>

Share this post


Link to post
Share on other sites
Notorious    1
Notorious
<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
Mock

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 by Mickfern

Share this post


Link to post
Share on other sites
Socket    0
Socket
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
Dean

@Socket

Ta tendo aulas com o Flatronez?

Share this post


Link to post
Share on other sites
Elwyn    106
Elwyn

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 by Mickfern

Share this post


Link to post
Share on other sites
esau    0
esau

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
Socket
@Socket

Ta 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
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×