Skip to content

Instantly share code, notes, and snippets.

View aquaslvt's full-sized avatar
:accessibility:
SOY LA CHIQUI CHIQUI!!

aquayard aquaslvt

:accessibility:
SOY LA CHIQUI CHIQUI!!
  • arca's world
  • 02:04 (UTC +02:00)
View GitHub Profile
@aquaslvt
aquaslvt / integer_limit.rs
Last active June 12, 2023 19:50
Function to calculate the integer limit of n-bit computers!
fn integer_limit(bits: i128) -> i128 {
( 1 << bits ) - 1
}
@aquaslvt
aquaslvt / collatz.lua
Last active April 6, 2023 16:09
Collatz conjecture in Lua
local n = io.read("*n")
repeat
if n % 2 == 0 then
n = n / 2
print(math.floor(n))
else
n = n * 3 + 1
print(math.floor(n))
end
@aquaslvt
aquaslvt / typewriter.lua
Last active May 11, 2023 08:24
Typewriter effect in Lua (unix)
function type_out(str)
for char in string.gmatch(str, '.') do
os.execute("sleep " .. tonumber(0.1))
io.write(char)
io.flush()
end
end
-- You can now use `type_out("your string here")!`