* Adding c/c++ scripting
@ 2016-01-23 4:20 jonathan maharaj
2016-01-23 8:33 ` Tom
2016-01-24 1:23 ` Xue Fuqiao
0 siblings, 2 replies; 9+ messages in thread
From: jonathan maharaj @ 2016-01-23 4:20 UTC (permalink / raw
To: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 127 bytes --]
Instead of scheme for emacs I'd like it to support c/c++ or any language
Sent from my Verizon Wireless 4G LTE smartphone
[-- Attachment #2: Type: text/html, Size: 386 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding c/c++ scripting
2016-01-23 4:20 Adding c/c++ scripting jonathan maharaj
@ 2016-01-23 8:33 ` Tom
2016-01-24 1:54 ` Richard Stallman
2016-01-24 1:23 ` Xue Fuqiao
1 sibling, 1 reply; 9+ messages in thread
From: Tom @ 2016-01-23 8:33 UTC (permalink / raw
To: emacs-devel
jonathan maharaj <unidef_rogue <at> live.com> writes:
>
>
> Instead of scheme for emacs I'd like it to support c/c++ or any language
>
There are attempts to use other languages. For example, this fairly new
project uses the Python tokenizer to emit emacs vm bytecode:
https://github.com/vkazanov/elang
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding c/c++ scripting
2016-01-23 4:20 Adding c/c++ scripting jonathan maharaj
2016-01-23 8:33 ` Tom
@ 2016-01-24 1:23 ` Xue Fuqiao
2016-01-24 5:35 ` Tom
2016-01-25 1:44 ` Richard Stallman
1 sibling, 2 replies; 9+ messages in thread
From: Xue Fuqiao @ 2016-01-24 1:23 UTC (permalink / raw
To: jonathan maharaj; +Cc: emacs-devel@gnu.org
On Sat, Jan 23, 2016 at 12:20 PM, jonathan maharaj
<unidef_rogue@live.com> wrote:
> Instead of scheme for emacs I'd like it to support c/c++ or any language
Although you can't use C/C++ (or languages other than Emacs Lisp) to
script Emacs directly, in Emacs 25, you can use dynamic modules. A
dynamic module is just like an Emacs Lisp package. IIUC you just need
to export a C-callable function in the module, and make the license of
the module GPL-compatible. The module can also use Emacs's API.
PS: Personally, I like Neovim's plugin architecture. With the msgpack
API, you can even use C#/Ruby/JavaScript/... to write plugins.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding c/c++ scripting
2016-01-23 8:33 ` Tom
@ 2016-01-24 1:54 ` Richard Stallman
2016-01-26 17:38 ` John Wiegley
0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2016-01-24 1:54 UTC (permalink / raw
To: Tom; +Cc: emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
The strategy I had in mind for supporting many scripting languages was
to convert other languages to Scheme and then have applications such
as Emacs implement Scheme.
--
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding c/c++ scripting
2016-01-24 1:23 ` Xue Fuqiao
@ 2016-01-24 5:35 ` Tom
2016-01-25 8:46 ` Xue Fuqiao
2016-01-26 17:59 ` Vibhav Pant
2016-01-25 1:44 ` Richard Stallman
1 sibling, 2 replies; 9+ messages in thread
From: Tom @ 2016-01-24 5:35 UTC (permalink / raw
To: emacs-devel
Xue Fuqiao <xfq.free <at> gmail.com> writes:
>
> PS: Personally, I like Neovim's plugin architecture. With the msgpack
> API, you can even use C#/Ruby/JavaScript/... to write plugins.
>
Does it support calling, for example, a function defined in a C#
plugin from a Javascript plugin? Because that is the important
thing that you could write a plugin in any language and use the
resulting code from any other language.
If it's not possible then these plugins are just isolated pieces
of code which is much less useful.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding c/c++ scripting
2016-01-24 1:23 ` Xue Fuqiao
2016-01-24 5:35 ` Tom
@ 2016-01-25 1:44 ` Richard Stallman
1 sibling, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2016-01-25 1:44 UTC (permalink / raw
To: Xue Fuqiao; +Cc: unidef_rogue, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
It should be noted that Emacs plugins are effectively linked with
Emacs to make a larger program, so they must have GPL-compatible
licensing.
--
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding c/c++ scripting
2016-01-24 5:35 ` Tom
@ 2016-01-25 8:46 ` Xue Fuqiao
2016-01-26 17:59 ` Vibhav Pant
1 sibling, 0 replies; 9+ messages in thread
From: Xue Fuqiao @ 2016-01-25 8:46 UTC (permalink / raw
To: Tom; +Cc: Emacs-devel
On Sun, Jan 24, 2016 at 1:35 PM, Tom <adatgyujto@gmail.com> wrote:
> Xue Fuqiao <xfq.free <at> gmail.com> writes:
>>
>> PS: Personally, I like Neovim's plugin architecture. With the msgpack
>> API, you can even use C#/Ruby/JavaScript/... to write plugins.
>
> Does it support calling, for example, a function defined in a C#
> plugin from a Javascript plugin?
No.
> Because that is the important thing that you could write a plugin in
> any language and use the resulting code from any other language.
>
> If it's not possible then these plugins are just isolated pieces
> of code which is much less useful.
Quoting Justin (a Neovim developer)[1]:
The msgpack API is equivalent to a REST/HTTP API that allows you to
call other "services" (plugins) which are listening behind that
API. Everything gets marshaled through msgpack. To make a C# function
callable by a javascript plugin, the C# plugin would need to listen
for an event.
And there is certainly no "binding" of live objects
any plugin can of course map VimL functions to its language-of-choice
(C#, javascript, ...) functions, and those VimL functions can be
called by other functions
I don't agree that "the important part" is having a magic FFI that
bridges all languages. And I do think that isolation is good.
[1] https://gitter.im/neovim/neovim?at=56a594cf586242210adf4ed9
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding c/c++ scripting
2016-01-24 1:54 ` Richard Stallman
@ 2016-01-26 17:38 ` John Wiegley
0 siblings, 0 replies; 9+ messages in thread
From: John Wiegley @ 2016-01-26 17:38 UTC (permalink / raw
To: Richard Stallman; +Cc: Tom, emacs-devel
>>>>> Richard Stallman <rms@gnu.org> writes:
> The strategy I had in mind for supporting many scripting languages was to
> convert other languages to Scheme and then have applications such as Emacs
> implement Scheme.
I think this will be more work than it is worth. It's not just the languages
themselves that are valuable; it the vast sea of libraries that Python and
Ruby give one access to, many of which make FFI calls into C libraries.
Converting all of that into Scheme in a way that provably retains the same
semantics is a task beyond anyone, I'd think.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Adding c/c++ scripting
2016-01-24 5:35 ` Tom
2016-01-25 8:46 ` Xue Fuqiao
@ 2016-01-26 17:59 ` Vibhav Pant
1 sibling, 0 replies; 9+ messages in thread
From: Vibhav Pant @ 2016-01-26 17:59 UTC (permalink / raw
To: Tom; +Cc: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
Don't know if it's relevant, but I was able to embed the Python interpreter
into Emacs with dyanmic modules. It's still very clunky, since you either
have to use a FFI, or expose functions in emacs_env to Python. Python also
doesn't have access to a "global" environment, so Python statements have to
executed inside a elisp "exec-python" call. Embedding another language at
such a low level would probably require modification of the Emacs source
instead.
On Sun, Jan 24, 2016 at 11:05 AM, Tom <adatgyujto@gmail.com> wrote:
> Xue Fuqiao <xfq.free <at> gmail.com> writes:
> >
> > PS: Personally, I like Neovim's plugin architecture. With the msgpack
> > API, you can even use C#/Ruby/JavaScript/... to write plugins.
> >
>
> Does it support calling, for example, a function defined in a C#
> plugin from a Javascript plugin? Because that is the important
> thing that you could write a plugin in any language and use the
> resulting code from any other language.
>
> If it's not possible then these plugins are just isolated pieces
> of code which is much less useful.
>
>
>
--
Vibhav Pant
vibhavp@gmail.com
[-- Attachment #2: Type: text/html, Size: 1737 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-01-26 17:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-23 4:20 Adding c/c++ scripting jonathan maharaj
2016-01-23 8:33 ` Tom
2016-01-24 1:54 ` Richard Stallman
2016-01-26 17:38 ` John Wiegley
2016-01-24 1:23 ` Xue Fuqiao
2016-01-24 5:35 ` Tom
2016-01-25 8:46 ` Xue Fuqiao
2016-01-26 17:59 ` Vibhav Pant
2016-01-25 1:44 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.