#❗New Lua challenge!
1 messages · Page 1 of 1 (latest)
}).this_doesnt_exist(“Hello world”)
is cooler
can’t call any functions though 👀
Someone tell me why this isn't a valid answer:
function you_cant_call_me()
return print
end
-- EDIT FROM HERE
local yccm = you_cant_call_me()
yccm("Hello World")
local yccm = you_cant_call_me() is not a call expression, you_cant_call_me is ONLY called on the final line. there is no other call expression, just evaluations.
You're still calling functions
“you_cant_call_me is ONLY called on the final line” he says
...is that you saying his solution is correct?
it’s me saying it’s him saying he’s calling a function, where the main rule is that you cannot call a function
@worthy shale @opaque heath how is the function being called.. it is being evaluated, not called. The rules are that no function should be called, and it isnt. If i did:
local yccm = you_cant_call_me
yccm()("Hello World")```
That would be calling you_cant_call_me AND the returned function, which would be invalid.
The rules were written badly, and like I said, you_cant_call_me is not called until the final line.
Wait i think i dun goof
Yall i aint even gonna argue, I was wrong
Not even gonna delete out of embarassment just fuckin shoot me
So just to verify you are aware you called functions twice in both those examples?
Yes. my dumbass thought for some reason local yccm = you_cant_call_me() just evaluated and not called for whatever reason
We all have those moments
nah. i was confident dude. i feel actually ashamed
I know what the answer is
function you_cant_call_me()
return print
end
print("Hello World")
The rules say: "Only allowed call expression is for the print function returned from you_cant_call_me"
The global print function is the same as the print function returned from you_cant_call_me. Same object/identity/memory address.
Isn't for a type of "call expression" since it causes a call to happen? Maybe "call expression" is considered to mean like something that a variable can be assigned to since it expresses a value
oh wow, that's insane
in what world is for a call expression
if it causes a call to happen, then its expressing a call (along with the looping behavior of for)
Goal: Print "Hello world"
Rules:
[+] Your solution must be below EDIT FROM HERE
[+] Only allowed call expression is for the print function returned from you_cant_call_me
[+] Any other call expression is forbidden. (such as (), {}, [[]], '', "")
function you_cant_call_me()
return print
end
-- EDIT FROM HERE
The guy who gave me this doesn't answer anymore so no one knows the solution.
If you want you can try, I would be interested in the solution
so you literally cant call any functions other than the print inside you_cant_call_me?
Yeah lol
wtf lol
aye how do you get the return of you_cant_call_me without calling
I don't know if this even has a solution
second rule is a bit awkward it says returned print function from you_cant_call_me but you cant get its return
so i guess we can just access to the print inside of it
wait also we cant use any other function what the fuck
it only accepts call expressions for the print function
that does not have a solution i bet
the rules feel badly phrased?
or just badly put together
I can't make sense of it at least
so you're only allowed to call the return of you_cant_call_me which you obviously can't call
and I assume by print that we have to call the function print with hello world
probably uses some weird lua thing to get the return of a function without calling it via convential means
I don't have any fucking clue guys
I don't know how you'd do that without calling a debug library function but that breaks the calling rule
and that's assuming we're in gmod
no
function you_cant_call_me()
return print
end
-- EDIT FROM HERE
return "Hello world"
/thread
upvalue shit?
oh wtf
function you_cant_call_me()
return print
end
-- EDIT FROM HERE
_G["you_cant_call_me"]()("Hello World")
so not this because it calls
yes
wtf
you can only call the print function that you_cant_call_me has returned
but how do you even get its return
but you can't get the return
yes
not any function besides that
damn
So there's no solution?
I won't archive the thread but I will try to get the solution.
Maybe
Does print("Hello world") count?
Technically it's the same function as the method returns
If the original code was something like
function you_cant_call_me()
return function(...) print(...) end
end
-- EDIT FROM HERE
Then it would not work
But for now I see it as the only solution
function you_cant_call_me()
return print
end
-- EDIT FROM HERE
for s in you_cant_call_me do
s("Hello world")
break
end
yall dum
@marble harness
holy fucking shit
__index = cant_call_this
table[1]("hello world")
wait yes
no it isnt?
how are you going to set a metatable if you cant call anything
fuck right
gdi
gachi already posted solution anyway
hrm
setmetatable would be a call
wait what
i knew the solution would be finding some lua thing that would call a callback
ust
just
didnt think of iterators
hello @marble harness
no noobmaster told me
ayo
I was actually inviting to https://discord.gg/7wu7ZsW
yoink
Someone actually found the way
these are old asf
Lol
we have like 17 challenges
If you lua discord you will find the original thread where I got these challenges
^
Is it moonscript related server?
nah nah
But the amount of people doubt it already
11k member for obfuscator???
luraph better
we just friends with the owner
Well you were in the screenshots
yeah he started doing challenges and then we started making our own
I hope I'm not breaking any promotion rules
cuz not really my intention lmao
it's just the origin
No, your luck my bot doesn't work in threads, but I allow this invite
Anyway, thanks for the link
aight, you guys can attempt the latest one, it has only been solved by one person
and there is no public solution
maybe more people will be interested in that actual lua server
which one
show it
This and lua discord would be interested
Challenge #17
Goal: Make 2 == not_two() evaluate to true. (Changing how assert works doesn't matter)
Rules:
[+] The function call not_two() cannot return 2! (obv)
[+] You cannot change or set any metatables.
[+] You cannot use load, loadstring, loadfile, etc.
[+] You cannot edit bytecode or use debug hooks.
-- ^ SOLUTION ABOVE! ^ --
assert(2 == not_two())
Difficulty: (Hard)
brought to you by notnoobmaster
I had no idea these challenges were shared around in other discords lmao
same lol
You can see how it started spreading in https://discord.gg/7wu7ZsW
debug hooks as in debug.set/gethook yeah?
yep
__eq won't be invoked anyway
it's quite tricky indeed
function is_two()
return 2
end
function not_two()
return is_two()
end
-- ^ SOLUTION ABOVE! ^ --
assert(2 == not_two())

Some of them have not well explained or controversial rules
we try our best ¯_(ツ)_/¯
Like with assert(table[3] == 2)
just run it in a interpreter that makes the eq pass B)
If there's so much interest in these challenges I might finish making that challenge bot that auto checks your solutions
❗New Lua challenge!
probably my challenges
I'm super specific with rules because I try to make it so only 1 solution is possible
I had an idea not_two to be a coroutine.wrap closure
Where it yields 2 
But that's technically returning 2
nice solution
lmao
🙄
but
can you do return #({1, 1})

pretty sure that would also end up returning 2
can we just change 2 to something via debug
yeah I guess
im on mobile sorry
actually no
i see
shit
local a = {
["2"] = 1,
["print"] = print,
["tostring"] = tostring,
}
setfenv(1, a)
print(2)
didn't work though D:
smh
i expect some hacky stuff inside not_two that forces the assertion to be true
idk
function not_two()
return 1
end
local a = {
[2] = 1,
["print"] = print,
["tostring"] = tostring,
["test"] = "racist word here",
}
setfenv(1, a)
print(2)
print(test)
very sad
second print outputs "racist word here"
would it even be possible to replace not_two with 2 inside not_two
or
-- inside not_two
local a = 1
return a, hacky_stuff_that_increments_a_before_assertion
i really dunno lmao
https://hastebin.com/uyuyuyusaw.lua
Solution from Lua discord.
Didn't pass the challenge
It does
function not_two()
debug.setlocal(2, 2, "a")
return "a"
end
-- ^ SOLUTION ABOVE! ^ --
assert(2 == not_two())
``` this makes them the same but evaluates to false 
why would it not pass then
author said to not edit the 2 in the assertion
it said no debug hacking
that's why I was trying to do setfenv
cuz it's little cheat he didn't specify 😳
no debug hooks actually
.
doesnt work either way
what is 2 - 1e-323
1e-323 is basically zero
oh
@coarse lagoon u wanna give them a hint or nah
I think the best way to qualify it is like if in the bytecode it returns 2
and if you think about it bytecode is probably some shit like
SUB num, very small num
which evaluates to 2 in lua
and then it returns
so it technically returns 2
hell naw
Too early
if that nameless guy is right then it counts
yeah someone who knows how bytecode works lmao
If it's because of the == operator
well true that
is this possible lol
it didn't return 2
but they can all learn it
Guys I think you should post these challenges (you made) in lua mailing list.
Or if you give permission, I can
If the Nameless guy is right it should count
what's the mailing list for again
boomers
heard of it but never used it
looooooooooool
I thought it was for like bug reports n stuff
its for everything pretty much
yeah
too smart for discord
It's the official Lua Mailing List. It's the main place for lua. Around 2k members. Bugs, questions, talk, library announcements.
Roberto (lua author) runs it since 1997
Lua
plain lua
gay
And I already saw challenges there
5.3?
@scenic pollen they're for sure gonna instantly know the answer to your pcall challenge lmao
you can do it on 5.3
alright swag
@coarse lagoon what pcall challenge
the bug one
u mean the Lua bug
yeah
I was thinking about pcall for this challenge
who uses 4.0
Almost everything doesn't work in 4.0 lmao
do people still use below 5.1
Even 5.0 is shit
5.1 and 5.3 are the main ones i see used
Real talk
I would say there is not only the syntax reason
even 5.3 would be dope for gmod
_ENV bitwise operators and other miscellaneous drip
😋
LuaJIT 2.0.4
luajit
bitwise ops semi not meh
What's good then
maybe serverside
Luau is pretty cool
types
I've read that
We have continue too!
wait fr?
Yes
it was buggy at some point
Check this page
but fixed
I just don't like it cuz they're really confident 🙄
does it pass the variable scoping bug test
It didn't before
https://luau-lang.org/sandbox like this whole thing is so lame
repeat
do continue end
local a = 1
until a
I found this problem
Garry's Mod features a set of non-default operators and aliases of already existing ones.
The implemented operators include:
Operator
continue
continue may work incorrectly, consider using gotoUse goto for the same functionality as continue,..
yeah also C style operators but those are lame and no one uses them
cuz they don't work with any obfuscators or minifiers
🙄
except gmod xd
no I mean no one writing shit for gmod uses them
they're shitty agreed
luraph supports them
yeah but luraph is supposed to be shit
Iirc that doesn't work.
How does it work in C then?
C has do while
Ah well it doesn't allow to use locals from the loop
ok
im deobfuscating.
oh Lua does
yawning_mouth
The point of obfuscators are to stop retards.
u know their source code got leaked lmao
Luau code?
They ping me so often I ignore them.
check psu discord
Isn't luau slow af?
@everyone The PSU development team has recently been alerted to the fact that not only was there a obfuscator source leak but there was also a gitlabs breach on 6/20 which allowed unauthorized users to obtain copies of the old source for the obfuscator and a very primitive version of the rebirth source. It is unknown at the moment whether the current gitlabs is still breached or these people still have access but out of precautions the rewrite for psu will be moved to a private repository only accessible to two people. We are still looking into this issue. I find it very unfortunate this happened but however I am nonetheless surprised. Development will continue as normal in light of this.
Proof?
not as fast a luajit tho
fun fact I made original psu
🙄 🙄
then I left
Proof?
but the devs seem pretty smart
@marble harness on phone rn
meh
Would be interested
well you can only use it on Roblox rn
so not very useful atm
Never tried roblox actually
but it's vm is basically what 5.4 does plus more
and they do some things luajit does
but just not jit itself
roblox would be so cool
they put a lot of R&D into that
if the game wasn't so bad
So they basically patched it to 5.4 level but it's still 5.1 ABI?
Like luau looks dope
but nobody wants to play roblox
or even say they develop for it
yeah plus extensions
🙄
you could use teal if you want types
https://luau-lang.org/ @marble harness
Luau (lowercase u, /ˈlu.aʊ/) is a fast, small, safe, gradually typed embeddable scripting language derived from Lua. It is used by Roblox game developers to write game code, as well as by Roblox engineers to implement large parts of the user-facing application code as well as portions of the editor (Roblox Studio) as plugins.
I'm familiar what are the features
it's like ts
u asked for proof of perf
They have like 3000 words on the performance section
A fast, small, safe, gradually typed embeddable scripting language derived from Lua
isnt it literally just
identical
to lua bytecode
iirc it is
That would be pretty retarded.
if that's true then it is not good enough for me
nvm
Luau is safe to embed. Broadly speaking, this means that even in the face of untrusted (and in Roblox case, actively malicious) code, the language and the standard library don’t allow any unsafe access to the underlying system, and don’t have any bugs that allow escaping out of the sandbox (e.g. to gain native code execution through ROP gadgets et al).
0 bugs 🥳
They solved bugs.
bugs are no more 🦀
people stopped implementing bugs!!!!
too badd
Of course a rust emoji
cant wait to sbox escape into rce
It was just a matter of time before the transgender invasion.
What is weird in their decision is to remove __gc
luau?
__gc exploitable
Yeah as they said
idk how is it exploitable
aside from a limited version of debug getinfo
wtf
yeah roblox moment
remove the entire language, exploitable
@coarse lagoon okay give a hint 🥱
it is
yea lmao
that one guy
i dont recall his name
he made a public script dumper
we usually release the solution after 24h
me under and alt
was that u lmao
okay, imagine how hard it is to come up with a challenge. Now imagine how much harder it would be to think of an hint that doesn't give the solution away
true
yes
I do not want to invest time into dealing with the challenge after I make it
read the lua source from top to bottom
a single letter of the solution
lets go
that's a hint technically
yes
yeah hand it over
big brain
but I took it down because the owner raged in my dms
the thing that dumped multiple obfuscators?
yes
lmao
LD
dude
luraph support soon...
yea
mfw this man made luraph

says the luraph developers 🚎
im not a developer for luraph
just obfuscate with 3 different obfuscators then convert it to luajit bytecode and load it
ez
hmu
luraph only winning cuz there is no other obfuscators lmao
just write a luajit bytecode loader in lua
ib2 is just a lua vm written in lua
i was so fuckn confused on how u acted
i remember
u said some shit
about not wanting to just
which uses a bit of a different bytecode structure
dump to files / deobfuscate bytecode directly
I dumped to a luac file which u could decompile @minor hare
you would just release like a table of instructions
I didn't decompile because unluac can use like
i remember u didnt at first
60gb of memory
Anyway, would be cool to see how mailing list (lua-l) will solve them
wait till I finish my decompiler
do the obfuscators actually like always use the same bytecode ?
no
not luraph ✅
very lame
i made a ternary vm for it
ib2 is so insecure
do not put trolls in bytecode,,,
there are only 2 obfuscators, ib2 with hella forks and luraph
defcon the creator said not to fork it
do not backdoor a server with LSAC
and to let it die
What is luarph
didn't that guy just say luraph was based on ib2 🙄
no
they're ancient i guess
obfuscator
ah yeah ib2 is surprisingly bad
No results in GitHub
it remained pretty on top for a bit
its fione with precompiled bytecode
because it isn't open source
luraph had public deobfuscator 😔
ages ago
yeah v11 was garbo
hmm
is it really that long ago?
not made by me
i can tell you there is no chance anyone (except me cuz im too large brained) is deobfuscating luraph
was 2020 of last year
so sort of but sort of not
can I have a link to the luraph discord
wasnt that shit in 2019
/luraph
i just remember it got taken down so fast
you don't need /invite
iirc it was so big too
Discord advises their new domain
yeah because memcorrupt (luraph owner) dmcad all of them
if I could buy luraph stock I would
luraph troller
nice ego retard
tfw lua obfuscator has more members than lua discord
probably 2016 @minor hare
you sure.
lmao
this does look pretty good
You could do some extra trolling with the LPH_CRASH shit
idk why yall even want to obfuscate
i dont
e-dick measuring contest
I don't have anything to obfuscate
dude all the obfuscators are so boring
no unique vms
PLEASE you CANT take my star wars rp exploit menu
PLEEASEEE
yes u do
yeah like what 🙄 🙄
try luraph
my nuts in your face @warped basin
no!
tf is a ternary vm
base 3
I googled it and didn't find anything after u said that
can we use debug library feature if some of the debug functions are removed
or does that option use all of them
look at
just reimplement the rest
no idea
@scenic pollen is the expert all things luraph
@scenic pollen
also balanced ternary floats are cool stuffz
oh luraph isn't free
god damn who is paying $60 a month for an obfuscator
they have lots of options though
just use a binary module x
idk I think it would be hard to do good protection with binary module
I mean you could obviously do some trolls but it would be a lot of work to make it really good.
go try and crack xeon ill wait
loading bytecode isn't really much protection
did xeon update or something
yeah he uses a rust module for it now
nice
okay
@coarse lagoon can you use setlocal in the challenge?
what sid64
76561198124454705
sure
not against the rules
I don't care about project winter 🙄
hmmm
debug
probably not u
thats for people who want to "resell" luraph as part of their product
durr
So will you post it on lua-l or I can have permission to do so?
😈
sid64
even if you do, who's gonna check their solutions
or give feedback
and idk how I want to be credited yet
xeon-drm-dll.lua
wait why do you need my sid64 again
At least I can try /shrug
local function JohnLua()
local quotes = {"In the beginning was the Statement, and the Statement was with Lua, and the Statement was Lua.","Greater love has no one than Lua, that the compiler lay down his life for our code.","Do not think that I will debug with the Stack Trace; For had ye believed the Compiler Errors, ye would have believed Me, for he wrote of Lua; But if ye believe not his Stack Traces, how shall ye believe My code?","Even though my types remain weak, I fear no error, for Lua is with me.","Lua is the chain that ties our health and bodies together.","Rip scripts, you must not. Let the Lua flow straight from your fingers.","Variables are changed by your example, not by your opinion.","The meaning of Lua is to give Lua a meaning.","Doubt has killed more scripts than errors will.","The hottest places in Hell are for those who never declare local variables.","Crashes and overflows may break my bones; But pcalls will never harm me.","Wise men code because they have something to make; Fools because they want to make something.","Lua is the joy of the good, the wonder of the wise, the amazement of the Gods.","You dump functions. You dump memory regions and crash reports that look like hell. You dump unused variables and collected garbage and tables. But people?","Whoever believes in the Trace is not condemned, but whoever does not believe stands condemned already because they have not believed in the name of John Lua's one and only Function.","It is written: \"Lua shall not live on interpreter alone, but on every instruction that comes from the mouth of Mike Pall.\"","Because of Mike Pall's great love we are not consumed, for his Traces never fail. They are new every loop; great is your Just-In-Time compilation.","I give them eternal life, and they shall never perish; no one will collect them out of my heap. My Allocator, who has given them to me, is greater than all; no one can Mar```
k-and-Sweep them out of my Garbage-Collectors hand. I and the Collector are one."}
return "\"" .. quotes[math.random(1, #quotes)] .. "\" - John Lua\n"
end
isn't it server-bound instead of user-bound
loicense check
loicense
@marble harness idk about noobmaster or federals challenges but you can use mine 👍
noobmaster probably ok with it
i don't think i got any spare alts with gmod
to assign u the script
gmfd
if system.IsOSX() then
print()
for i = 1, 10 do
MsgC(Color(255,0,0), "XEON DRM is not compatible with your operating system. You are unable to use Billy's scripts on this computer.\n")
end
print()
hook.Run("XEON.Error", "XEON DRM is not compatible with your operating system. You are unable to use Billy's scripts on this computer.")
return
end
@elder smelt good job
we hate the mac users
lemme get a copy bill-dog
stfu skid u couldn't crack a 3 dig padlock
D:*
where are all your challenges?
in that moonsec server
ah
all of the challenges are there
no that was a luraph question not about the challenge
idk, I just don't want some middle manning
setupvalue, setlocal, and the two upvalueid functions are gone in gmod
I'm fine if you post the challenges with the solution
but posting the without seems kinda eeeh
and then people only get one chance to solve
plus how would they know to reach out to us
@wintry otter oh
uhhh I don't think we use those
should be fine
yeah should be ok
@marble harness I'm not holding back allowing you to post them out of malice, I just don't think it's a good idea to rush this.
u guys have continue support, yes?
no
eventually I would definitely want all the challenges there
maybe
eww rust was just on my computer
:( boilerplate
we don't have setlocal, and other debug functions btw
yogpod said that
i said that here
we don't use any of the removed ones so it's good
@warped basin cracked it yet x
I've had a rust file open for like 20 minutes so far
starting to become transgender
@marble harness okay, you can post all challenges with solutions that are mine if you add a link to my GitHub
But it must be a challenge solution combo
Cuz I don't want people in 5 years finding them and not knowing the solution
i didnt know roblox lua is typed
you said you will eventually post them
o
it's also not checked at runtime like typescript
Challenge 17 solution is gonna be up tomorrow
it's just for like ide improvements
still pretty cool but
roblox
yeah roblox is the issue
let's fucking go
luau is the coolest thing roblox has done
fax
Many people hate the typed aspect doe
no
Yes
Does challenge 17 work in any 5.*?
Hopefully
yes ^^
was it tested?
No
alright, I was ready to see bugs related to 5.1
it's not a bug
Yep
@scenic pollen would you also want your github associated?
sure
lol
yeah I am.
PERHAPS
uuh
i found the way
but it's not really 2 == not_two() makes true
buuuut
assertion passes :DDD
whats the solution
^
let me test on replit
yeah I need a second to prepare to cope
debug.setmetatable(nil, {__call = error})
-- ^ SOLUTION ABOVE! ^ --
assert(2 == not_two())
it doesn't pass in theory..
it just
i think it said no metatables
doesn't output anything
violates a rule
[+] You cannot change or set any metatables.
fuck lol
yea
no it's cheating 🙄
what's more interesting it doesn't error
yeah weird thing about error
i forget if this is just 5.1
but if u pass nothing to it
ah yeah
it doesn't output to stderr
i remember something
as Artemking stated. == in 5.1 strongly returns true only when type1 == type2 and tvalue1 == tvalue2
so make them equal
that means not_two() expression must evaluate to TValue with type LUA_TNUMBER and must pass a==b in C
but that's against the rules

so change the other side
2 is a constant not local
change it
please give me feedback on the format
swag
damn that's tough. There is nothing that writes into p->k So it's impossible to write new constant into the list.
The bytecode has this constant optimized, it's put directly into opcode (-3 refers to constants)
EQ 1 -3 1
gonna add the solutions later with full explanations of why they work
skill
metatable shit would still require call
Idk how you’re solving that one as easy that’s way more impossible then the two spar has said earlier
I'll just spoil this one, you just do for _ in func, arg1, arg2 do end
you guys already solved a variant of the same challenge
i just removed the you cant call me function
cuz kinda pointless
I'm waiting for the solution for 2 == not_two.
I did enough research with my possibilities
whatever since you will post it in 24 hours
but I am interested to enlarge my knowledge
unless it's again something I didn't missed it right in front let'sgoo
Ok the level of difficulty of this challenge is legit high
Can u send me it too 😳
it will be posted in that discord we sent
ok
@worn jackal what are your thoughts?
did someone try epsilon?
function not_2()
return 2 - 1e-301
end
assert(2 == not_2())
???
this is the "incorrect" solution?
works though :T
not_two must not return 2
fair
what counts as returning 2
is 2ULL returning 2?
their metatables aren't equal yet 2 == 2ULL
can you consider 2 to be equal to 2ULL then

This is pure Lua 5.0-5.4 solution
You name it
registry is cheating
Checking
ik i was just wondering
rq
i don't
not much
i barely ever use luajit at all
0572?
i wouldn't say i have lots o knowledge w luajit
What about puc lua?
@jagged verge @worn jackal @warped basin ready?
@everyone
_ = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256}
-- This table just adds junk constants
function not_two()
debug.setlocal(2,2, nil) -- This works because bitrk cannot hold a value larger than 256 so lua loads the constant via LOADK and then gets the constant from the stack.
end
-- ^ SOLUTION ABOVE! ^ --
assert(2 == not_two())
bruuuh
imdeadbru
is every challenge going to be related to lua internals?
albeit it feels weird to have challs in gmod server that are literally impossible in gLua
they aren't made for glua doe
yall just somehow found them
That's why I was asking if you guys know lua more than luajit
I might solve this if I read lua bytecode more than luajit
FOr example this hack won't be possible in luajit
maybe if the number gets bigger than 32k
but it's not affected by the number of constants
while lua stored constants in separate place while it could just use 2 literally
luajit does this
luajit ftw
even for strings?
Strings are stored in KGC array
what does KGC mean curious
KGC are:
protos, string, table template (luajit saves a copy of trivially contructible table and duplicates it when bytecode for table is called), FFI LL and ULL numbers
k means constant
GC means Garbage Collectible
arent they stored in the DES ht?
nice
that proto/function uses
but yeah if constant string is compared with something luajit calls different bytecode and you can't just spam with more constants
@coarse lagoon
you will likely just get error like too much constants, didn't test
I have never used luajit ¯_(ツ)_/¯
do --- int
local t = { "local x\n" }
for i=2,65537 do t[i] = "x='"..i.."'\n" end
assert(CompileString(table.concat(t)) ~= nil)
t[65538] = "x='65538'"
assert(CompileString(table.concat(t)) == nil)
end
CompileString:65538: main function has more than 65536 constants
yeah
trolling
so few?
per function
Bx is 18 bits wide
did they use both ABC?
bx is like bc combined
how about a glua challenge
where did it get 2 more
b and c are 9 bits
prob also faster to read


