Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

60%
+1 −0
Challenges Keyword golfing

Lua 5.4.4, 147 bytes local function f()goto l::l::return end for _ in f do end if true and false then elseif""then else end repeat until""or not nil while""do break end Try it online! Check th...

posted 2y ago by Zakk‭  ·  edited 2y ago by Zakk‭

Answer
#4: Post edited by user avatar Zakk‭ · 2022-04-25T15:53:57Z (over 2 years ago)
shortened the code (thanks to orthoplex)
  • # [Lua 5.4.4](https://lua.org), 151 bytes
  • ```
  • local function f()if true then for _ in print do while false do break end repeat until""and""or not nil end elseif""then else end goto l::l::return end
  • ```
  • [Try it online!](https://tio.run/##HYxRCsMwDEOvIvK1XaGXGV7jrKbGLp7Djp8lBf08oSftNIb6TorWbU9xQ3s8pSGjM/LgyR54QQxXiCWq43eIMhrplxe@g@kEW0XwxZTolqKlkNVSpmyeMNF7wdORVsr9vOBuP54O3baZ4Oxhqx3jDw)
  • Check the [list of keywords](https://www.lua.org/manual/5.4/manual.html).
  • # [Lua 5.4.4](https://lua.org), 147 bytes
  • ```
  • local function f()goto l::l::return end for _ in f do end if true and false then elseif""then else end repeat until""or not nil while""do break end
  • ```
  • [Try it online!](https://tio.run/##PYzLDcJADERbGfkELaQZtCReYsWykfGK8hcnB6Q5zOdpdLQ51dem6MPWFDf02/3l6dBlKQXnCAPbhu6BB6QIbH410pExGO1cm34YuXPB5aQT/cMFB7@5JYalKFF9mSdMFN9dlInq8xncjhOe8wc)
  • Check the [list of keywords](https://www.lua.org/manual/5.4/manual.html).
  • Thanks to [@orthoplex](https://codegolf.codidact.com/users/56271) for more shortening.
#3: Post edited by user avatar Zakk‭ · 2022-04-24T16:30:18Z (over 2 years ago)
shortened the code (thanks to orthoplex)
  • # [Lua 5.4.4](https://lua.org), 160 bytes
  • ```
  • local function f()if true then for k,v in pairs({})do while false do break end repeat until""and""or not nil end elseif""then else end goto l::l::return end f()
  • ```
  • [Try it online!](https://tio.run/##HY5RCsMwDEOvIvLVwk7Q22Sts5oau7jO9jF29iwN6OcJSUhqbk1szYJSdQ02RZlmLgivhNipszmOxxusODP7NX1/82b47CyEkuUidHw65QOkG5xOyoGqwZJS1i2lvqAWUJaRoN7hktKYv2G4LwuDLEuXU1TX4fY3rf0B)
  • Check the [list of keywords](https://www.lua.org/manual/5.4/manual.html).
  • # [Lua 5.4.4](https://lua.org), 151 bytes
  • ```
  • local function f()if true then for _ in print do while false do break end repeat until""and""or not nil end elseif""then else end goto l::l::return end
  • ```
  • [Try it online!](https://tio.run/##HYxRCsMwDEOvIvK1XaGXGV7jrKbGLp7Djp8lBf08oSftNIb6TorWbU9xQ3s8pSGjM/LgyR54QQxXiCWq43eIMhrplxe@g@kEW0XwxZTolqKlkNVSpmyeMNF7wdORVsr9vOBuP54O3baZ4Oxhqx3jDw)
  • Check the [list of keywords](https://www.lua.org/manual/5.4/manual.html).
#2: Post edited by user avatar Zakk‭ · 2022-04-23T17:47:23Z (over 2 years ago)
shortened the code (thanks to orthoplex)
  • # [Lua 5.4.4](https://lua.org), 163 bytes
  • ```
  • local function f()if true then for k,v in pairs({})do while false do break end repeat until 1 and 1 or not nil end elseif 1 then else end goto l::l::return end f()
  • ```
  • [Try it online!](https://tio.run/##JY5BDoNACEWv8peadOPW21Bl6kQCBpl20fTsU2oTNu/lw0ca9S62kKA0XaKaogxjLQhvjNg42Rz77YmqOKj6Obw/42p4bVUYheRkJN6daQfrCueDKdA0qmACpZqQN9QCmuqX4dzKkunf8KNLPywMMs85ztFcL5sP9f4F)
  • Check the [list of keywords](https://www.lua.org/manual/5.4/manual.html).
  • # [Lua 5.4.4](https://lua.org), 160 bytes
  • ```
  • local function f()if true then for k,v in pairs({})do while false do break end repeat until""and""or not nil end elseif""then else end goto l::l::return end f()
  • ```
  • [Try it online!](https://tio.run/##HY5RCsMwDEOvIvLVwk7Q22Sts5oau7jO9jF29iwN6OcJSUhqbk1szYJSdQ02RZlmLgivhNipszmOxxusODP7NX1/82b47CyEkuUidHw65QOkG5xOyoGqwZJS1i2lvqAWUJaRoN7hktKYv2G4LwuDLEuXU1TX4fY3rf0B)
  • Check the [list of keywords](https://www.lua.org/manual/5.4/manual.html).
#1: Initial revision by user avatar Zakk‭ · 2022-04-22T21:00:24Z (over 2 years ago)
# [Lua 5.4.4](https://lua.org), 163 bytes

```
local function f()if true then for k,v in pairs({})do while false do break end repeat until 1 and 1 or not nil end elseif 1 then else end goto l::l::return end f()
```

[Try it online!](https://tio.run/##JY5BDoNACEWv8peadOPW21Bl6kQCBpl20fTsU2oTNu/lw0ca9S62kKA0XaKaogxjLQhvjNg42Rz77YmqOKj6Obw/42p4bVUYheRkJN6daQfrCueDKdA0qmACpZqQN9QCmuqX4dzKkunf8KNLPywMMs85ztFcL5sP9f4F)

Check the [list of keywords](https://www.lua.org/manual/5.4/manual.html).