MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
|
| 15 Dec 2015 09:13 PM |
So this person got into an argument with me and tried to outsmart me with programming knowledge. Little did he know, I'm in grade 12, studying to get a Masters degree of Mathematics (It's actually a programming course, but they call it mathematics .-.) and I ended up getting a funny response.
Him: Well can you turn c++ into lua using a compiler >.>?
Me: LOL GTFO Are you joking?
Him: I'll take that as a no, I'm smarter than you!
Me: C++ Is a programming language, Lua is a scripting language, a compiler is used to turn script into code :D (as far as I know, I don't usually use lua).
Him: No, c++ is for adding! (He probably figured the +'s meant math or something lol).
Me: (Link to c++ history and how to page)
Him: I think I'm lagging D:
Disconnects from game<
I'm not arguing, I'm just explaining why I'm right. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 15 Dec 2015 09:14 PM |
| Yes we get it he's stupid and you're spamming. |
|
|
| Report Abuse |
|
|
nomer888
|
  |
| Joined: 13 Feb 2010 |
| Total Posts: 551 |
|
|
| 15 Dec 2015 09:30 PM |
"Him: Well can you turn c++ into lua using a compiler >.>?"
Well, technically you can, but it'd be very limited. |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 09:33 PM |
Can you? Most certainly! All a compiler does is translate code of a certain language into another language (typically machine or assembly language for a particular processor), so if we call Lua the desired language, it is entirely possible to compile from C++ to Lua as both languages are turing complete (if we had an infinite amount of memory that is). Is there a reason to? Not particularly, since Lua is already well integrated with C (and I'm sure that someone has a C++ implementation somewhere).
It's delightful, It's delicious, It's delovely! |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 15 Dec 2015 09:39 PM |
| Technically you 'can' but compiling is not supposed to go from less abstract -> more abstract. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 15 Dec 2015 09:47 PM |
| Meh. Roblox converts Lua (their own) to c++ (that's what runs roblox rite?). I'm pretty sure they can do it the other way around. |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 09:51 PM |
Lua is interpreted m8. Unless they use LuaJIT, but that's third party anyway.
It's delightful, It's delicious, It's delovely! |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 15 Dec 2015 09:56 PM |
| Yes it's interpreted, but it still compiles down into a more simple form (aka lua bytecode) |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 11:21 PM |
"I'm in grade 12, studying to get a Masters degree of Mathematics"
Yet you conduct yourself as a 12 year old would. Why do I find this hard to believe?
Wait, since when do you get a masters in 12th grade? You're a sad liar. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 15 Dec 2015 11:22 PM |
| It's called him trying to look smart when he's not. |
|
|
| Report Abuse |
|
|
cpmody
|
  |
| Joined: 16 Aug 2015 |
| Total Posts: 457 |
|
|
| 16 Dec 2015 12:28 AM |
you cannot turn c++ into lua, but you can turn lua into c++. Lua is written in C and you can just do extern c in cpp to run lua
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 16 Dec 2015 12:51 AM |
"you cannot turn c++ into lua, but you can turn lua into c++." Technically you CAN turn "C++ into Lua" but is it practical? Of course not, it's stupid and dumb. |
|
|
| Report Abuse |
|
|
|
| 16 Dec 2015 12:59 AM |
In some places they pronounce it "Grade" then the grade not like America which pronounces it _th Grade
[ Hat Collector | Forumer ] | I have R$ 0 and TIX 10 |
|
|
| Report Abuse |
|
|