Hi everybody, it's me again, thinking about weird stuff, again...
I was wondering if it was possible for a language like javascript to embed C or C++ code so it could be executed by the javascript interpreter made in C.
I do not wish to call a C method using javascript, i just want to create a program and send it to the C interpreter so it could be executed.
After all, it's all text! no?
Does cross languagues can be achieved?
Thx
cross languagues
Started by SimonBoris, Nov 12 2009 07:51 PM
4 replies to this topic
#1
Posted 12 November 2009 - 07:51 PM
|
|
|
#2
Posted 13 November 2009 - 03:43 AM
may be you are building some wrong logic OR may be you are talking about .net technologies.
Programming Discussion :w00t:
#3
Guest_Jordan_*
Posted 13 November 2009 - 04:18 AM
Guest_Jordan_*
It sounds like it is a huge security risk and I'm not sure that it would be allowed but this article shows that you can execute shell commands. You could write the C++ code to a file and execute a compiler. However, they might not have a compiler installed or you may not know which one.
Aside from that, there is no way to "embed" c/c++ code in JavaScript to be executed by the compiler that I know of.
Aside from that, there is no way to "embed" c/c++ code in JavaScript to be executed by the compiler that I know of.
#4
Posted 13 November 2009 - 09:13 AM
Yes it would a big security risk...
but i only think about technical possibilities,
i do not wish to annoy people with male enhancement system :)
But i was wondering if C or C++ had a equivalent to the eval method in JS and if it could be detected by the Compiler just by reading the code embedded in the javascript and execute it.
I am not a C programmer and cannot make test since i do not even have access to any javascript engine, thats why i am asking.
Thanx again for your time.
but i only think about technical possibilities,
i do not wish to annoy people with male enhancement system :)
But i was wondering if C or C++ had a equivalent to the eval method in JS and if it could be detected by the Compiler just by reading the code embedded in the javascript and execute it.
I am not a C programmer and cannot make test since i do not even have access to any javascript engine, thats why i am asking.
Thanx again for your time.
#5
Posted 14 November 2009 - 10:46 AM
In theory, you could write a C/C++ interpretter in JavaScript, but that sounds like a true nightmare.


Sign In
Create Account

Back to top









