Add brainfuck for modding

Post Reply
User avatar
drkwv
Member
Posts: 87
Joined: Thu Jun 28, 2012 13:48
GitHub: aa6

Add brainfuck for modding

by drkwv » Post

Oh, it's already added... I blame Lua particularily for this:

Code: Select all

local nodes_list
print("What a wonderful happy sunny day!")
nodes_list["modname:nodename"] = true
-- ERROR[main]: ServerError: error in error handling
-- unreachable code:
print("Why, god, why?")
Also, when would be a _VERSION bump? I need goto and labels so bad, because now I need to define a named function (anonymous call not working properly) to be able to do a simple nested loop break.

P.S. Do not be offended. Topic name is just a joke.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: Add brainfuck for modding

by 4aiman » Post

Goto and labels are working just fine. Go get a build with lua 5.2 or make one by yourself.
As for errors in error handling - post that @"bugs and problems" or even better - open an issue @ github.

User avatar
drkwv
Member
Posts: 87
Joined: Thu Jun 28, 2012 13:48
GitHub: aa6

Re: Add brainfuck for modding

by drkwv » Post

4aiman wrote:Go get a build with lua 5.2
Where do I get it? I downloaded 0.4.9-dev deb package from download page, but there is only 5.1. Even if I'll make mod using 5.2, no one will be able to use it. So, I'm asking about general massive lua update, not about my personal.

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

Re: Add brainfuck for modding

by kaeza » Post

There has been a discussion recently to update to 5.2. I don't recall what was the final decision.

In the meantime, you can build Minetest with LuaJit, which supports `goto', and some other 5.2 features (most Win32 builds come with LuaJit nowadays, and most Linux users use it).

EDIT: On the other hand, I recommend restructuring your code to avoid using `goto' unless absolutely necessary.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
rubenwardy
Moderator
Posts: 6278
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Add brainfuck for modding

by rubenwardy » Post

Taking the topic title seriously, you could use a brainfuck interpreter written in Lua, if such a thing exists.

User avatar
drkwv
Member
Posts: 87
Joined: Thu Jun 28, 2012 13:48
GitHub: aa6

Re: Add brainfuck for modding

by drkwv » Post

rubenwardy wrote:Taking the topic title seriously, you could use a brainfuck interpreter written in Lua, if such a thing exists.
Couldn't this be considered as code obfuscation, which is AFAIK restricted by LGPLv3?

User avatar
rubenwardy
Moderator
Posts: 6278
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Add brainfuck for modding

by rubenwardy » Post

drkwv wrote:
rubenwardy wrote:Taking the topic title seriously, you could use a brainfuck interpreter written in Lua, if such a thing exists.
Couldn't this be considered as code obfuscation, which is AFAIK restricted by LGPLv3?
You don't have to license your mods as LGPL, you could use WTFPL.

User avatar
Calinou
Moderator
Posts: 3164
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: Add brainfuck for modding

by Calinou » Post

drkwv wrote:
rubenwardy wrote:Taking the topic title seriously, you could use a brainfuck interpreter written in Lua, if such a thing exists.
Couldn't this be considered as code obfuscation, which is AFAIK restricted by LGPLv3?
Minetest is LGPL 2.1, not 3, anyway.

User avatar
onpon4
Member
Posts: 517
Joined: Thu Mar 21, 2013 01:54
GitHub: onpon4
In-game: diligentcircle
Contact:

Re: Add brainfuck for modding

by onpon4 » Post

Writing software in Brainfuck wouldn't be "obfuscation". Obfuscation is where you write code one way, but then only distribute a modified form that's harder to read and modify. If you write a program in Brainfuck, it's just unreadable because of a bad programming practice (using Brainfuck). No free/libre software license forbids bad programming practices.

If you took something in Lua and somehow automatically translated it to Brainfuck, that would be different. I don't think that's what rubenwardy was talking about, though.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest