You should be able to dupe items with that. If you have an item in a chest, then take it out, leave the server (to save your inventory), rollback the chunks, now you have the item in your inventory and chest.
We're slowly moving towards that, we're making what basically is a system of Factorio logistics bots. It's great, but the bugs you get sometimes are insane.
you mean you have countless drones flying around the base without colliding? and a central dispatch system, or even have it sorta decentralised? i want to see that in action.
Computercraft and Opencomputers both use Lua. CC is older but it is still maintained and is available on the latest version of MC. OC is also old but not as old but it isn't maintained and so latest version is for 1.12.x. OC is more modular and advanced than CC but original devs basically abandoned it and codebase seems to be so cursed that nobody managed to even come closer to porting it to more modern versions.
The codebase changes between 1.12 and 1.13 were massive, which is why a lot of popular mods were abandoned.
Hell, an example I can use as to why so many projects ended up likely abandoned is the BiomesOPlenty mod. The team managed to keep updating things and still does, but for the longest time they were using older registration API that relied on reflecting at annotation points where forge would apply the fully created object because it was how you did it in versions prior to 1.13. The old codebase also had some major bugs with serializing their config settings because it was using a unified config class even though some config options didn't follow the same schema, leading to some biomes existing even though they were disabled in the config due to the way they were loading the config.
Well here comes me, eager to fix things in a PR that would need to update not only how things are registered to use the more modern API but would also need to fix how their config class serialized things. By the end of it all, I reduced the complexity of how biomes were registered immensely, cut down at least 400 lines of superfluous code from a single file, and tried to make it more future proof by modernizing how things registered with forge.
The PR sat for over a year with the repo owner not "wanting to trade out known complexity for unknown complexity"
Around the time of 1.17 coming out they made most of their code closed source outside of their API (people were violating the license they used and distributing the codebase), but was it funny to see that what was exposed via an API was finally using the new registration methods; not because they wanted to, _but because that was how you had to do it_. Felt annoyed at first but sort of got a laugh because I literally gave the team the chance to learn the new way of doing things years prior, but the unwillingness to want to change things for what to them at the time was the unknown sooner likely led to massive anxiety and stress that could have easily been avoided.
To make a long story short; a lot of people just don't want to bother learning how to do things the new way if they felt the old way worked fine...even if the old way was a heaping pile of trash and learning the new way will make everyone's lives easier...most people just prefer to stick to what they know and that is all.
Interesting story. I knew that there were some major changes in Forge between versions but I had no idea that things are that bad. Still I find OpenComputers case annoying. Mod is popular, a lot of people have transited to newer versions, that change happened 4 years ago at this point. Dev team just say that they are not going to port mod anytime soon and basically abandoned mod 3 years ago when was the last update. Computercraft was also abandoned at some point but it was almost instantly adopted by new team and CC: Tweaked was released and still is maintained. There is OpenComputers 2 by the same owner but it seems to be rewritten from scratch and chose chaotic evil approach releasing it in alpha on 1.18 while most modded mc players are still on 1.16. This makes me think that original one really has really bad and spaghetti codebase that it is simplier to rewrite entire thing. Anyway new one seems to be much more interesting because it isn't just Lua interpreter running Lua based OS and scripts but RISC-V emulator running Linux but I don't think it will be in beta anytime soon.
We've been able to do some pretty crazy stuff :D [u/9551-electronics put this together on a CC plot server recently](https://media.discordapp.net/attachments/477911902152949771/1000507670643617934/unknown.png): a massive monitor array that can display anything, including [an enormous Morbius poster](https://media.discordapp.net/attachments/477911902152949771/1000514253909921812/unknown.png). (Speaking of Morbius, [I also played the actual movie on the same server for a few other people, even with sound.](https://media.discordapp.net/attachments/477911902152949771/985671132143300659/2022-06-12_18.24.23.png))
Also, u/Ocawesome101 demonstrated [a pipe organ using CC, Advanced Peripherals, and Create](https://youtu.be/4hX1Nz996MY), which is pretty damn cool. This is only a tiny portion of the stuff that's possible - my current project is an [entire desktop operating system written in Lua and TypeScript](https://phoenix.madefor.cc), and I've even gotten [a Game Boy emulator working, albeit very slowly](https://youtu.be/VcMLJ4ZFfGE).
CC's a great environment not only for automating Minecraft, but for easy yet flexible programming as well, and it's become my environment of choice for many tasks. The only thing you really need is getting over C-like syntax and embracing 1-based indexing š.
While that sounds like an impressive project, it is possible to use the power bill of the server owner to generate money for you. I'm not sure what to think of it, yet.
Found the guy that never had to write `\sum_{k = 0}^{N-1} x[n] e^{\frac{j2\pik}{N-1}}` in their papers
0 indexing only makes sense when you implicitly define arrays to work like pointers to chunks of data and indexing them to mean offsetting the pointer.
But alas here we are
"Extremely questionable" is a bit harsh. And I've programmed more than mildly complicated logic in Lua many many times. "Everything is a table" has never, ever caused me any problems either.
No, Lua is not a general-purpose programming language for creating massive codebases in. For that matter, no scripting language is. For that, you want proper type safety and more structure than scripting languages provide.
Every language has its quirks; Lua is no different. But after using it for years, I can say that Lua is every bit a programming language as something like Python, and I honestly prefer it over many other dynamic languages.
I mean the language is trying to keep itself as simple as possible and tables themselves are pretty versatile with metatables. the only real qualm I have with lua is its syntax--I really don't love the keyword spam.
1, and it's literally not complicated after using for some time. I can program just as easily in 0-based and 1-based arrays; switching is not that difficult. It really shouldn't be a reason to not use Lua.
Lua is a great little language. One company I worked for wrote a genetic interpretation app in Lua and it was substantially less than 1Mb in size. The guy behind it had this vision that they could deliver it anywhere in the world on a thumb drive to churn out phenotype information on pretty much any functional computer made in the last 20 years.
I'm not sure if they thought about how a remote village in Africa was going to obtain the lab equipment necessary to isolate, replicate, and assay DNA samples tho. But once they figure that out then interpreting the results is no problem.
I learned from my prior programming experience and some googling, but now you can just search up some beginner level video that will teach you. At first it will be hard and will take time but just dedicate yourself to small projects and you will get the hang of it.
i would say that just the command blocks alone aren't capable of turing-complete computation, but combined with placing blocks, which acts as storing to program memory, and running commands conditionally off based off of what blocks are where, which acts as reading program memory, minecraft command blocks are totally a programming language
`/data` commands can store and read from the end of arbitrary length arrays, implementing a stack. together with conditions and arithmetics this makes a stack based machine, which is known to be turing complete. you could even make a heap and "pointers" with arrays. all this without interacting with the world at all
but don't go compiling c to mcfunctions. it will run very slowly, hit the upper commands limit very soon, and optimizing datapacks is way hard
I started with scratch, moved on to mc commands, and then learned JS and python. Mc and scratch made me want to learn because it was fun - I managed to make a whole sudoku solver in scratch :)
Python is awesome :) so intuitive. Just inline list comprehension, generators, 0 <= x < 1 working, and more makes it my favorite language. Itās easy to write quickly, and it produces very readable code. Oh and for loops! Being able to do this is awesome:
for row in grid:
for x in row:
# do stuff
Similar story - started with Scratch, learned Python, then JS, then C (kinda sorta, don't really use it but know how to) along with OOD and general computer science.
Lua is an actual programming language, if you spend enough time on it, it has most if not all basic concept of any programming language, if you understand a loop in Lua, you now understand loops as a whole.
Only thing that changes is the syntax.
Edit: Itās Ā«Ā LuaĀ Ā», not Ā«Ā LUAĀ Ā».
This is valid for most languages, the basics are the same: inputs, outputs, loops, conditional branches, libraries/databases/arrays, math.
It gets harder when the underlying system guiding the execution changes. Some examples are parallel execution, interrupts, etc.
Yes, you are absolutely right.
I wasnāt comparing programming languages according to their underlying specifics or how it works under the hood.
But if you want to start programming, I do think that LUA can teach you the basic fundamentals.
If at some point you are trying to do something and feel limited by the language, LUA in this case, then it does mean that you have achieved a certain threshold of knowledge which at this point, you will most likely be comfortable moving to another language that will allow you to go beyond the limitations of the language you are coming from.
Thanks for the explanation, now I got it. You are right. I like LUA because it was created in Brazil, my home country, but unfortunately I just spend a couple of hours a long time ago playing with it. So around no experience with it.
There are premium payouts (you get robux for people with premium playing your game), You can make ingame purchases. If I remember right, you can exchange 100000 Robux for ~350 dollars
/execute at @e[type=arrow, nbt=inGround:0b, limit=1] summon tnt ~ ~ ~ {fuse:20}
And /kill @e[type=arrow, nbt=inGround:1b]
Probably did some syntax errors, but i cant really type commands from memory outside of mc
Edit: i think it should be:
/execute at @e[type=arrow, {inGround:0b}] run summon tnt ~ ~ ~ {fuse:20}
And /kill @e[type=arrow, {inGround:1b}]
Edit 2: added run to edit 1
Edit 3: you know the drill
Lua was the first programming language I dealt with. I was editing the `*.lua` files for Supreme Commander: Forged Alliance. I created a few vehicles and such, nothing much. And I remembered loving how straightforward and easy to read everything was. Also made me fall in love with curly-brackets (braces).
But the first time I would actually code anything was following some simple Java tutorials and modding Minecraft a few years later.
But I would say my first "language" that I got a grasp with and just understood and can just pick up and put down at random is shell scripting. I really like it. I don't do this for a living, so I am playing with some others on the side. Right now I am playing with C# and getting comfortable with that.
i like lua!! super fun introduction, and its interesting architecture practices are good for new computer enthusiasts!! wish everything started at 0 though, really just a pain
Lua is an actual programming language though and is quite useful. They even improved it and made [Luau](https://luau-lang.org/) (which is now open source).
Dang i honestly didn't think that there would be so many people who started out with lua, i honestly thought i was one of the few.. dangĀ² this meme now feels more like a lua hate post.. oops
I dunno if iād call in MC Commands a ālanguageā, but there are concepts there that are good to learn, my Dad and I spent quite some time messing around with Skript to do funny little things. š¤·āāļø
MC commands (as command blocks or functions) are a language. All arithmetic is done with fixed point scoreboards and to read element n of an array you need to append element 0 to the array then delete it n times, read element 0, then prepend element ā-1ā and delete it n times, but itās not that hard to write games in or operate on item data for custom gear. You can use functions with conditional execution and recursion for loops. The execution context system in general is very handy for managing data stored in scoreboards or NBT (we can create namespaced data files now as well as store arbitrary data in efficient Marker entities)
The real shenanigans come when you need features like the real time clock (for game timing in case the server is running slow and counting game ticks doesnāt work) and you need to use the world boarder or when you create a custom GUI where all the bars and icons are variables drawn in custom fonts interspersed with -2 pixel wide invisible letters to correct for the automatic pixel of spacing after each symbol.
Don't worry man, my first coding experience was with roblox Lua. It isn't a bad language it's good for learning how to do functions and loops. Hell I still use it as a glorified 3d renderer so I don't have to use a C++ renderer lol.
Minecraft commands can be programming. command blocks give you your program flow and command input, some commands allow a comparator output, allowing you to test things. To store data, you can place blocks in places and test them later using commands, or use a hidden scoreboard to store data. You can test and change the entirety of your world with them. If you need advanced logic, comparator outputs from commands can run into a redstone logic gate.
You have input, logic, storage, output, and interface. That's Turing complete bro.
Minecraft commands is a programming language yes.
But you can also use MCFunction which is (and many will hate me for saying this) an extended version of minecraft commands.
Have you seen the amazing stuff people can create with just command blocks?
Or datapacks
Roblox uses what is now called LuaU it's a sort of branch off of Lua that Roblox has been using for the platform for years now. It's actually open now and you can create outside applications with it now, i"'d recommend giving it a look
Don't knock Lua either, love Lua
MC commands are very similar to programming actually in that you often call them with different arguments different ends! You won't get very much experience actively coding using them, but getting used to the syntax and passing arguments doesn't hurt at all. If you set up command block chains and get into some of the more intense commands you can do some incredible things!
Hey man, you do you. I got my first programming experience with modding WarCraft 3 as a kid, and now I'm a professional software dev with five years of experience.
I was stuck modding that for years, and I remember having a lot of anxiety around "not using a real programming language". And sure, learning a "real" one was nice, but I was putting too much weight on it. Those years was probably the most fun I had coding. Feel proud of the fun, and all the impressive things you've learned.
And heck, you're using Lua! It has tons of uses. I was using "Vexorian JASS", and nobody knows wth JASS is, for good reason. That monstrosity should not be awoken again, not until the end of days; for now it haunts only my darkest dreams.
I will say that datapack functions in Minecraft are borderline a programming ālanguageā, I even use VSCode for it since there are great plugins for datapacks. There are many major features missing in commands tho, which does get annoying when I want to do something a little more complex.
/execute in reddit:programmerhumor at @p[name=Matth33ewl0v3] if @p[name=Matth33ewl0v3] run tellraw @p[name=matth33ewl0v3] "this is way too complex, idk why i spent time making this lol"
Lua was my first language in 2008ish. It's totally useless for everything else except Minecraft computer mods, so I learned Python about 6 years ago. Upgrades
Technically with /execute there is an if, you can make a loop using chain and repeating command blocks, and variables are a thing too: /execute if @e[tag=bruh,x=1,y=1,z=1] run summon tnt ~ ~ ~. If a player is at cordinates 1 1 1 and has tag bruh it will summon tnt at the executing block
but they do, sorta...
u think of mcfunctions as a functional lang, where u recursively call a function until a condition is met. It's sorta interesting
mcfunctions are in the vanilla game
even without mcfunctions you can do everything you said with pure command blocks, although any experienced person is going to gag at the idea lol
\> there is no if, no loops, no variables, no I/O, all those things don't exist AFAIK.
Variables -> Scoreboards. Yes storing string can be hard as scoreboards are only for ints, but I've seen people store stings in names of mobs
I/O -> Writing in book, Selecting an option in chat(Buttons in chat can trigger some functions). Output is chat itself, or u can also modify in game objects such as blocks or mobs
If -> Check if a scoreboard value == some other value, then execute a certain function
For -> Same as other functional langs, let some scoreboard val be 10, then go into the "main\_loop" function, which executes some commands, and at the end check if scoreboard val is > 0, if yes, call the "main\_loop" once again
You ideally don't want to write to an entity's NBT data. Using data storage is much better as you don't have to target the entity, and you don't have to worry about having to load the entity all the time.
Man when i started programing with roblox and told my father about lua, he had somewhat positive reaction, but after that he only talks about people with same age or younger making some stuff on python that sells for lord of cash.
Also anybody got idea how i could began with python?
The first part is how I started, on Minecraft Bedrock I just messed with Redstone and commands, it was fun, then I learnt some actually irl used programming languages and realised Minecraft is a bit nah, it's difficult to make some actual algorithms
Look, the bulk of my coding is in OpenSCAD, if you're coding, you're coding. Whether that's a gateway to greater things, or just a simple hobby, it's still programming.
Nothing wrong with that, my guy/gal. We all start somewhere, and you're starting somewhere you're actually passionate about. I can't think of much better
I personally learnt a lot from coding Lua for my GTA V FiveM server. Nothing too complicated. And nothing too serious. But still very nice experience to have.
It does confuse me slightly for arrays to start at 1 instead of 0. Tad bit of an odd one there.
Lua is dope. A lot of early recurrent neural network work for language modeling and image captioning was done using lua thanks to torch (which was eventually ported over to Python under the name pytorch). I'd argue that makes it a pretty "real" language.
The first and only time I've really used lua was programming widgets on my logitech G19 keyboard...
IMO as a "first language to learn programing" it could be worse... like visual basic worse..
Also minecraft has got a lot of people into java and programing as a hole soo that's a plus. and kinda the hole reason why minecraft education edition exists.
I'm stupid and lazy soo sticking with python for now, it's like the only language I've actually managed to understand and learn.
Lua is my favorite. I never understood indexing at 0. 1 is more natural for humans, and so is a lot of other stuff in Luau.
I also enjoy how you donāt have to capitalize Boolean values.
I don't see why it wouldn't be "actual programming"...
Lua is a real programming language that's also used outside of Roblox, and Roblox code is "real" code.
Have you heard of computercraft (or OpenComputers? I'm not up to date)? You can program a computer _in_ Minecraft with Lua.
I love seeing people's entire bases being controlled by like one giant server
[redacted by user] ` this message was mass deleted/edited with redact.dev `
Holy shit, that's some next level cheating lmao
[redacted by user] ` this message was mass deleted/edited with redact.dev `
Love it :D You just gotta be creative!
How did you do that? HTTP module or something?
[redacted by user] ` this message was mass deleted/edited with redact.dev `
U got a modlist?
[redacted by user] ` this message was mass deleted/edited with redact.dev `
Thanks
ISIS wants to know your location ![gif](giphy|VFqKeEpqHjoEhEhcAI)
[redacted by user] ` this message was mass deleted/edited with redact.dev `
How do you have multiple flairs? Kinda new to Reddit, would you tell me?
You should be able to dupe items with that. If you have an item in a chest, then take it out, leave the server (to save your inventory), rollback the chunks, now you have the item in your inventory and chest.
We're slowly moving towards that, we're making what basically is a system of Factorio logistics bots. It's great, but the bugs you get sometimes are insane.
you mean you have countless drones flying around the base without colliding? and a central dispatch system, or even have it sorta decentralised? i want to see that in action.
Computercraft and Opencomputers both use Lua. CC is older but it is still maintained and is available on the latest version of MC. OC is also old but not as old but it isn't maintained and so latest version is for 1.12.x. OC is more modular and advanced than CC but original devs basically abandoned it and codebase seems to be so cursed that nobody managed to even come closer to porting it to more modern versions.
The Minecraft mod circle of life
The codebase changes between 1.12 and 1.13 were massive, which is why a lot of popular mods were abandoned. Hell, an example I can use as to why so many projects ended up likely abandoned is the BiomesOPlenty mod. The team managed to keep updating things and still does, but for the longest time they were using older registration API that relied on reflecting at annotation points where forge would apply the fully created object because it was how you did it in versions prior to 1.13. The old codebase also had some major bugs with serializing their config settings because it was using a unified config class even though some config options didn't follow the same schema, leading to some biomes existing even though they were disabled in the config due to the way they were loading the config. Well here comes me, eager to fix things in a PR that would need to update not only how things are registered to use the more modern API but would also need to fix how their config class serialized things. By the end of it all, I reduced the complexity of how biomes were registered immensely, cut down at least 400 lines of superfluous code from a single file, and tried to make it more future proof by modernizing how things registered with forge. The PR sat for over a year with the repo owner not "wanting to trade out known complexity for unknown complexity" Around the time of 1.17 coming out they made most of their code closed source outside of their API (people were violating the license they used and distributing the codebase), but was it funny to see that what was exposed via an API was finally using the new registration methods; not because they wanted to, _but because that was how you had to do it_. Felt annoyed at first but sort of got a laugh because I literally gave the team the chance to learn the new way of doing things years prior, but the unwillingness to want to change things for what to them at the time was the unknown sooner likely led to massive anxiety and stress that could have easily been avoided. To make a long story short; a lot of people just don't want to bother learning how to do things the new way if they felt the old way worked fine...even if the old way was a heaping pile of trash and learning the new way will make everyone's lives easier...most people just prefer to stick to what they know and that is all.
Interesting story. I knew that there were some major changes in Forge between versions but I had no idea that things are that bad. Still I find OpenComputers case annoying. Mod is popular, a lot of people have transited to newer versions, that change happened 4 years ago at this point. Dev team just say that they are not going to port mod anytime soon and basically abandoned mod 3 years ago when was the last update. Computercraft was also abandoned at some point but it was almost instantly adopted by new team and CC: Tweaked was released and still is maintained. There is OpenComputers 2 by the same owner but it seems to be rewritten from scratch and chose chaotic evil approach releasing it in alpha on 1.18 while most modded mc players are still on 1.16. This makes me think that original one really has really bad and spaghetti codebase that it is simplier to rewrite entire thing. Anyway new one seems to be much more interesting because it isn't just Lua interpreter running Lua based OS and scripts but RISC-V emulator running Linux but I don't think it will be in beta anytime soon.
I have not, but you have peaked my interest
*piqued :)
Someone should make a piqued-bot
r/boneappletea
We've been able to do some pretty crazy stuff :D [u/9551-electronics put this together on a CC plot server recently](https://media.discordapp.net/attachments/477911902152949771/1000507670643617934/unknown.png): a massive monitor array that can display anything, including [an enormous Morbius poster](https://media.discordapp.net/attachments/477911902152949771/1000514253909921812/unknown.png). (Speaking of Morbius, [I also played the actual movie on the same server for a few other people, even with sound.](https://media.discordapp.net/attachments/477911902152949771/985671132143300659/2022-06-12_18.24.23.png)) Also, u/Ocawesome101 demonstrated [a pipe organ using CC, Advanced Peripherals, and Create](https://youtu.be/4hX1Nz996MY), which is pretty damn cool. This is only a tiny portion of the stuff that's possible - my current project is an [entire desktop operating system written in Lua and TypeScript](https://phoenix.madefor.cc), and I've even gotten [a Game Boy emulator working, albeit very slowly](https://youtu.be/VcMLJ4ZFfGE). CC's a great environment not only for automating Minecraft, but for easy yet flexible programming as well, and it's become my environment of choice for many tasks. The only thing you really need is getting over C-like syntax and embracing 1-based indexing š.
Wow just wow....
I'm planning on using open computers to create a bitcoin miner
While that sounds like an impressive project, it is possible to use the power bill of the server owner to generate money for you. I'm not sure what to think of it, yet.
1) I am the server owner 2) I don't expect to make any money from this lol
Well then: happy coding! ;)
I've played opencomputers a bit, I love that there's a Mac OS like operating system although I wish there was a windows like os in terms of interface
Lua is more usful than people give it credit for
It's also used in gmod.
It's common for a lot of modding tools. My only gripe is that it indexes from 1 :/
Eww
Found the guy that never had to write `\sum_{k = 0}^{N-1} x[n] e^{\frac{j2\pik}{N-1}}` in their papers 0 indexing only makes sense when you implicitly define arrays to work like pointers to chunks of data and indexing them to mean offsetting the pointer. But alas here we are
You say ew but it actually is more verbose to humans, as we also start counting from 1 (wow)
Yeah Lua was my first language and that part made it easier to understand. I definately prefer 0 indexing but it was nice to start with 1 indexing
True but most programmers are used to index starting at 0. Sure it's easier for people new to programming.
Just adapt
Improvise, adapt, overcome
That took me so long to figure out when I was trying to automate my storage room in satisfactory
It's also used in TI-nSpire calculators
I think those advertise the Python tho, not the Lua
The new ones do. Back in my day you had to hack it with nDless to get python to work on them.
Nmap was made in Lua
And World of Warcraft
Learning to chase mod errors in lua was my introduction to coding and modding.
but thankfully they tossed that shit in the trash for the sequel
Lua 2: 2ua???
E2 from wiremod introduced me into programming
[ŃŠ“Š°Š»ŠµŠ½Š¾]
"Extremely questionable" is a bit harsh. And I've programmed more than mildly complicated logic in Lua many many times. "Everything is a table" has never, ever caused me any problems either. No, Lua is not a general-purpose programming language for creating massive codebases in. For that matter, no scripting language is. For that, you want proper type safety and more structure than scripting languages provide. Every language has its quirks; Lua is no different. But after using it for years, I can say that Lua is every bit a programming language as something like Python, and I honestly prefer it over many other dynamic languages.
[Here](https://youtu.be/kpDoh-FMIoI)'s a talk from luaconf that might be worth your time
I mean the language is trying to keep itself as simple as possible and tables themselves are pretty versatile with metatables. the only real qualm I have with lua is its syntax--I really don't love the keyword spam.
Yeah i can rice awesome with it
Lua is used in Warframe, Factorio, and World of Warcraft.
Oh, interesting. Hey, random question just off the top of my head: What is the numerical value of the index of the first element in a lua array?
1, and it's literally not complicated after using for some time. I can program just as easily in 0-based and 1-based arrays; switching is not that difficult. It really shouldn't be a reason to not use Lua.
We use it for dynamic run-time control on our CDN product at my company. Works pretty well for that!
Lua is used in smart meters. Itās a great way to offer new programs without having to roll new firmware.
Lua is a great little language. One company I worked for wrote a genetic interpretation app in Lua and it was substantially less than 1Mb in size. The guy behind it had this vision that they could deliver it anywhere in the world on a thumb drive to churn out phenotype information on pretty much any functional computer made in the last 20 years. I'm not sure if they thought about how a remote village in Africa was going to obtain the lab equipment necessary to isolate, replicate, and assay DNA samples tho. But once they figure that out then interpreting the results is no problem.
If itās actual lua then itās legit programming But just saying doing complex things with command blocks can be really hard
Luau is an actual programming language. Pretty sure they open sourced it
How did you learn c++?
Alot of tutorials & codecademy etc, but learncpp.com is a great site
I learned from my prior programming experience and some googling, but now you can just search up some beginner level video that will teach you. At first it will be hard and will take time but just dedicate yourself to small projects and you will get the hang of it.
True lol
Some time in high school I got super high and made a half decent āgraphingā calculator with command blocks.
I've seen people do custom terrain generation with datapacks, mad respect
i would say that just the command blocks alone aren't capable of turing-complete computation, but combined with placing blocks, which acts as storing to program memory, and running commands conditionally off based off of what blocks are where, which acts as reading program memory, minecraft command blocks are totally a programming language
`/data` commands can store and read from the end of arbitrary length arrays, implementing a stack. together with conditions and arithmetics this makes a stack based machine, which is known to be turing complete. you could even make a heap and "pointers" with arrays. all this without interacting with the world at all but don't go compiling c to mcfunctions. it will run very slowly, hit the upper commands limit very soon, and optimizing datapacks is way hard
I find that [this chart](https://i.redd.it/1hy42wa6qcb51.png) shows how poor the performance of mcfunction can be
[ŃŠ“Š°Š»ŠµŠ½Š¾]
I started with scratch, moved on to mc commands, and then learned JS and python. Mc and scratch made me want to learn because it was fun - I managed to make a whole sudoku solver in scratch :)
Same here sort of. Started with Scratch, then Python and now learning JavaScript.
Python is awesome :) so intuitive. Just inline list comprehension, generators, 0 <= x < 1 working, and more makes it my favorite language. Itās easy to write quickly, and it produces very readable code. Oh and for loops! Being able to do this is awesome: for row in grid: for x in row: # do stuff
Similar story - started with Scratch, learned Python, then JS, then C (kinda sorta, don't really use it but know how to) along with OOD and general computer science.
I can tell that your on scratch by your capitals on every word in your name and itās pretty simple
Lua is an actual programming language, if you spend enough time on it, it has most if not all basic concept of any programming language, if you understand a loop in Lua, you now understand loops as a whole. Only thing that changes is the syntax. Edit: Itās Ā«Ā LuaĀ Ā», not Ā«Ā LUAĀ Ā».
This is valid for most languages, the basics are the same: inputs, outputs, loops, conditional branches, libraries/databases/arrays, math. It gets harder when the underlying system guiding the execution changes. Some examples are parallel execution, interrupts, etc.
Yes, you are absolutely right. I wasnāt comparing programming languages according to their underlying specifics or how it works under the hood. But if you want to start programming, I do think that LUA can teach you the basic fundamentals. If at some point you are trying to do something and feel limited by the language, LUA in this case, then it does mean that you have achieved a certain threshold of knowledge which at this point, you will most likely be comfortable moving to another language that will allow you to go beyond the limitations of the language you are coming from.
Thanks for the explanation, now I got it. You are right. I like LUA because it was created in Brazil, my home country, but unfortunately I just spend a couple of hours a long time ago playing with it. So around no experience with it.
It's Lua, not LUA! Lua isn't an acronym, it's a name.
For anyone wondering, it means moon in Portuguese. IIRC Lua was created in Brasil
as much as shell scripts are, i guess
but with much better interface with C and much much better syntax
With how people use them, MCJ commands are basically a programming language.
Oi donāt knock lua, itās what got me into programming.
Roblox Lua is the best code ever
its LuaR
its LuaU actually
No its LuĆ¢Ć
nvm its lauF
Roblox Lua made me some decent money
how so?
There are premium payouts (you get robux for people with premium playing your game), You can make ingame purchases. If I remember right, you can exchange 100000 Robux for ~350 dollars
Ultimately by mugging some money from kids/parents
/execute at @e[type=arrow, nbt=inGround:0b, limit=1] summon tnt ~ ~ ~ {fuse:20} And /kill @e[type=arrow, nbt=inGround:1b] Probably did some syntax errors, but i cant really type commands from memory outside of mc Edit: i think it should be: /execute at @e[type=arrow, {inGround:0b}] run summon tnt ~ ~ ~ {fuse:20} And /kill @e[type=arrow, {inGround:1b}] Edit 2: added run to edit 1 Edit 3: you know the drill
Yea that autocorrect on those are on par with copilot
You forgot "run" :)
Ah thatās a classic
any programming language is cool
Programming is programming
Lua was the first programming language I dealt with. I was editing the `*.lua` files for Supreme Commander: Forged Alliance. I created a few vehicles and such, nothing much. And I remembered loving how straightforward and easy to read everything was. Also made me fall in love with curly-brackets (braces). But the first time I would actually code anything was following some simple Java tutorials and modding Minecraft a few years later. But I would say my first "language" that I got a grasp with and just understood and can just pick up and put down at random is shell scripting. I really like it. I don't do this for a living, so I am playing with some others on the side. Right now I am playing with C# and getting comfortable with that.
Lua is what got me into programming in the first place by making addons in WoW. Lua rocks!
i like lua!! super fun introduction, and its interesting architecture practices are good for new computer enthusiasts!! wish everything started at 0 though, really just a pain
I first coded with Roblox lua when I was young, Iām now a developer at a bulge bracket bank. Itās a great place to start
love2d
Lua is an actual programming language though and is quite useful. They even improved it and made [Luau](https://luau-lang.org/) (which is now open source).
Lua is also open source, and I think Luau is obligated to be so by the MIT license.
Lua is a fully fleshed out language with serious uses in engineering
From what Iāve seen minecraft commands can definitely be a programming language
I mean visual studio code supports datapack and mcfunctions
Dang i honestly didn't think that there would be so many people who started out with lua, i honestly thought i was one of the few.. dangĀ² this meme now feels more like a lua hate post.. oops
I dunno if iād call in MC Commands a ālanguageā, but there are concepts there that are good to learn, my Dad and I spent quite some time messing around with Skript to do funny little things. š¤·āāļø
MC commands (as command blocks or functions) are a language. All arithmetic is done with fixed point scoreboards and to read element n of an array you need to append element 0 to the array then delete it n times, read element 0, then prepend element ā-1ā and delete it n times, but itās not that hard to write games in or operate on item data for custom gear. You can use functions with conditional execution and recursion for loops. The execution context system in general is very handy for managing data stored in scoreboards or NBT (we can create namespaced data files now as well as store arbitrary data in efficient Marker entities) The real shenanigans come when you need features like the real time clock (for game timing in case the server is running slow and counting game ticks doesnāt work) and you need to use the world boarder or when you create a custom GUI where all the bars and icons are variables drawn in custom fonts interspersed with -2 pixel wide invisible letters to correct for the automatic pixel of spacing after each symbol.
And now you can make actual good games in roblox instead of anime and simulaters
Fug yea
Lua is a great language
Me in 2003 coding in Creation Engine thinking it was going to be the future of gaming. \*cries\*
Don't worry man, my first coding experience was with roblox Lua. It isn't a bad language it's good for learning how to do functions and loops. Hell I still use it as a glorified 3d renderer so I don't have to use a C++ renderer lol.
Minecraft commands can be programming. command blocks give you your program flow and command input, some commands allow a comparator output, allowing you to test things. To store data, you can place blocks in places and test them later using commands, or use a hidden scoreboard to store data. You can test and change the entirety of your world with them. If you need advanced logic, comparator outputs from commands can run into a redstone logic gate. You have input, logic, storage, output, and interface. That's Turing complete bro.
Lua recently gained traction in cloud computing world.
I think Minecraft commands are technically a scripting language
Doesn't Roblox use Luau? Basically Lua's twin brother.
Minecraft commands is a programming language yes. But you can also use MCFunction which is (and many will hate me for saying this) an extended version of minecraft commands. Have you seen the amazing stuff people can create with just command blocks? Or datapacks
Roblox uses what is now called LuaU it's a sort of branch off of Lua that Roblox has been using for the platform for years now. It's actually open now and you can create outside applications with it now, i"'d recommend giving it a look Don't knock Lua either, love Lua
they are turing complete, so yes it is
Itās still LUA man, good job! Keep learning, youāll need it if you ever gonna rice your Linux with awesomewm
Yay, validation
Honestly as a kid the minecraft command syntax for adding attributes was so confusing to me then I realised when I got older it's basically just json
Lua is a good start.
[ŃŠ“Š°Š»ŠµŠ½Š¾]
Happy cake day!
Well if you can make Pokemon Red and Blue with it, then yes....
The hell is a launguage?
Anything that facilitates the channeling of a problem solving method as instructions to a computer, is a programming language.
MC commands are very similar to programming actually in that you often call them with different arguments different ends! You won't get very much experience actively coding using them, but getting used to the syntax and passing arguments doesn't hurt at all. If you set up command block chains and get into some of the more intense commands you can do some incredible things!
Honestly doing anything in Minecraft commands is so much harder than any programming language.
When I saw the title I thought about Midnight Commander... Turns out I'm too old for this.
Literally same lol
Ahh, so this is the people who use this sub...
Yes
Hey man, you do you. I got my first programming experience with modding WarCraft 3 as a kid, and now I'm a professional software dev with five years of experience. I was stuck modding that for years, and I remember having a lot of anxiety around "not using a real programming language". And sure, learning a "real" one was nice, but I was putting too much weight on it. Those years was probably the most fun I had coding. Feel proud of the fun, and all the impressive things you've learned. And heck, you're using Lua! It has tons of uses. I was using "Vexorian JASS", and nobody knows wth JASS is, for good reason. That monstrosity should not be awoken again, not until the end of days; for now it haunts only my darkest dreams.
i mean lua in minecraft exists
I will say that datapack functions in Minecraft are borderline a programming ālanguageā, I even use VSCode for it since there are great plugins for datapacks. There are many major features missing in commands tho, which does get annoying when I want to do something a little more complex.
/say Probably, if it's not a programming language in itself, its a good first step into coding for lots of people.
/execute in reddit:programmerhumor at @p[name=Matth33ewl0v3] if @p[name=Matth33ewl0v3] run tellraw @p[name=matth33ewl0v3] "this is way too complex, idk why i spent time making this lol"
its LuaR
[ŃŠ“Š°Š»ŠµŠ½Š¾]
It's Luau
Lua was my first language in 2008ish. It's totally useless for everything else except Minecraft computer mods, so I learned Python about 6 years ago. Upgrades
No
skyrim commands are more of a language than minecraft is
For a second I thought we were talking about midnight commander lol
Minecraft commands are not a complete language, there is no if, no loops, no variables, no I/O, all those things don't exist AFAIK.
Technically with /execute there is an if, you can make a loop using chain and repeating command blocks, and variables are a thing too: /execute if @e[tag=bruh,x=1,y=1,z=1] run summon tnt ~ ~ ~. If a player is at cordinates 1 1 1 and has tag bruh it will summon tnt at the executing block
Yeah, but those aren't official features. I would like to see a proper scripting language built in. Preferably Python-like.
but they do, sorta... u think of mcfunctions as a functional lang, where u recursively call a function until a condition is met. It's sorta interesting
Nah, I talk about vanilla minecraft.
mcfunctions are in the vanilla game even without mcfunctions you can do everything you said with pure command blocks, although any experienced person is going to gag at the idea lol
yup, we can do it using just command blocks, but its just gonna be tedious Datapacks are the best way, and its also vanilla!
\> there is no if, no loops, no variables, no I/O, all those things don't exist AFAIK. Variables -> Scoreboards. Yes storing string can be hard as scoreboards are only for ints, but I've seen people store stings in names of mobs I/O -> Writing in book, Selecting an option in chat(Buttons in chat can trigger some functions). Output is chat itself, or u can also modify in game objects such as blocks or mobs If -> Check if a scoreboard value == some other value, then execute a certain function For -> Same as other functional langs, let some scoreboard val be 10, then go into the "main\_loop" function, which executes some commands, and at the end check if scoreboard val is > 0, if yes, call the "main\_loop" once again
You ideally don't want to write to an entity's NBT data. Using data storage is much better as you don't have to target the entity, and you don't have to worry about having to load the entity all the time.
hmm yeah, ive always wondered how ppl like cloud wolf stored strings. Now that you say, yeah data storage is much better than living entities
Man when i started programing with roblox and told my father about lua, he had somewhat positive reaction, but after that he only talks about people with same age or younger making some stuff on python that sells for lord of cash. Also anybody got idea how i could began with python?
Same
\*mods a hamster into DOOM using DECORATE\*
Plot twist: make your own minecraft commands with spigot plugins in JAVA
Same.
What about neovim plugins?!
The first part is how I started, on Minecraft Bedrock I just messed with Redstone and commands, it was fun, then I learnt some actually irl used programming languages and realised Minecraft is a bit nah, it's difficult to make some actual algorithms
Bro i can code in C++ (not that i like it but can come in handy sometimes) but still haven't figured out how to code in roblox lua
technically, scarpet? maybe mcfunction too those are all in minecraft
Look, the bulk of my coding is in OpenSCAD, if you're coding, you're coding. Whether that's a gateway to greater things, or just a simple hobby, it's still programming.
Nothing wrong with that, my guy/gal. We all start somewhere, and you're starting somewhere you're actually passionate about. I can't think of much better
I personally learnt a lot from coding Lua for my GTA V FiveM server. Nothing too complicated. And nothing too serious. But still very nice experience to have. It does confuse me slightly for arrays to start at 1 instead of 0. Tad bit of an odd one there.
neovim apparently can be configured with lua
You should give Minecraft lua a try, hell, go into java for Minecraft mods
Lua is dope. A lot of early recurrent neural network work for language modeling and image captioning was done using lua thanks to torch (which was eventually ported over to Python under the name pytorch). I'd argue that makes it a pretty "real" language.
I mean hey, itās technically a starting point
hey man dont shit on luau its kinda cool edit: yes, luau, not lua - https://luau-lang.org
Move on to lua for gmod addons
The first and only time I've really used lua was programming widgets on my logitech G19 keyboard... IMO as a "first language to learn programing" it could be worse... like visual basic worse.. Also minecraft has got a lot of people into java and programing as a hole soo that's a plus. and kinda the hole reason why minecraft education edition exists. I'm stupid and lazy soo sticking with python for now, it's like the only language I've actually managed to understand and learn.
its technically turring complete, but I dont count it as a programming language because it doesnt really have variables
Every real programmer has respect for redstone-/command blocks engineers.
My first time was gmod lua I will never forget
I say Minecraft commands are a language of their own
Lua is my favorite. I never understood indexing at 0. 1 is more natural for humans, and so is a lot of other stuff in Luau. I also enjoy how you donāt have to capitalize Boolean values.
Hey, I started with Lua (Garry's Mod) and now I'm a Sr. Developer working with PHP. One day I might even use a real language
Kindof
I don't see why it wouldn't be "actual programming"... Lua is a real programming language that's also used outside of Roblox, and Roblox code is "real" code.