Add brainfuck for modding

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

Add brainfuck for modding

by drkwv » Fri Jun 27, 2014 16:35

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 » Fri Jun 27, 2014 20:55

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.
 

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

Re: Add brainfuck for modding

by drkwv » Sat Jun 28, 2014 03:12

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
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Add brainfuck for modding

by kaeza » Sat Jun 28, 2014 03:24

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: 5888
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Add brainfuck for modding

by rubenwardy » Sat Jun 28, 2014 16:46

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

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

Re: Add brainfuck for modding

by drkwv » Sat Jun 28, 2014 18:55

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: 5888
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Add brainfuck for modding

by rubenwardy » Sat Jun 28, 2014 19:12

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: 3157
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: Add brainfuck for modding

by Calinou » Sun Jun 29, 2014 08:54

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

Re: Add brainfuck for modding

by onpon4 » Sun Jun 29, 2014 10:52

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.
 


Return to Feature Discussion



Who is online

Users browsing this forum: Google [Bot] and 1 guest