all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Platform Dependent Code
@ 2008-06-20 15:17 jsestri2
  2008-06-20 23:26 ` Chong Yidong
  0 siblings, 1 reply; 9+ messages in thread
From: jsestri2 @ 2008-06-20 15:17 UTC (permalink / raw)
  To: emacs-devel

How much of emacs is platform dependent code? I am wondering how much code has to be replaced if you wanted to port emacs to a new platform essentially: How much of emacs is native c code / libraries and how much is done through lisp code?

Thanks for any replies,
J.J.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Platform Dependent Code
  2008-06-20 15:17 Platform Dependent Code jsestri2
@ 2008-06-20 23:26 ` Chong Yidong
  2008-06-21  3:47   ` dhruva
  0 siblings, 1 reply; 9+ messages in thread
From: Chong Yidong @ 2008-06-20 23:26 UTC (permalink / raw)
  To: jsestri2; +Cc: emacs-devel

<jsestri2@uiuc.edu> writes:

> How much of emacs is platform dependent code? I am wondering how much
> code has to be replaced if you wanted to port emacs to a new platform
> essentially: How much of emacs is native c code / libraries and how
> much is done through lisp code?

Almost all the platform-dependent code is in C and concerns
terminal/window system communications.  See the w32* and mac* files in
the source tree for an example.  The rest of the work is a matter of
juggling compilation switches, identifying system call names, etc.

(If you provide some information about what platform you are interested
in, maybe someone could be more helpful.)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Platform Dependent Code
  2008-06-20 23:26 ` Chong Yidong
@ 2008-06-21  3:47   ` dhruva
  2008-06-21 19:10     ` J.J. Sestrich
  0 siblings, 1 reply; 9+ messages in thread
From: dhruva @ 2008-06-21  3:47 UTC (permalink / raw)
  To: jsestri2, emacs-devel

Hello,

On Sat, Jun 21, 2008 at 4:56 AM, Chong Yidong <cyd@stupidchicken.com> wrote:
> <jsestri2@uiuc.edu> writes:
>
>> How much of emacs is platform dependent code? I am wondering how much
>> code has to be replaced if you wanted to port emacs to a new platform
>> essentially: How much of emacs is native c code / libraries and how
>> much is done through lisp code?
>
> Almost all the platform-dependent code is in C and concerns
> terminal/window system communications.  See the w32* and mac* files in
> the source tree for an example.  The rest of the work is a matter of
> juggling compilation switches, identifying system call names, etc.
>
> (If you provide some information about what platform you are interested
> in, maybe someone could be more helpful.)

I feel the most complicated would be the generating the emacs
executable by dumping a process with elisp code loaded
(bootstrapping). I remember when working in the OpenVMS labs, on
Itanium platform, that was the only missing piece in getting a full
blown working emacs.

-dhruva

-- 
Contents reflect my personal views only!




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Platform Dependent Code
  2008-06-21  3:47   ` dhruva
@ 2008-06-21 19:10     ` J.J. Sestrich
  2008-06-21 19:56       ` Stefan Monnier
  2008-06-22  8:23       ` Thien-Thi Nguyen
  0 siblings, 2 replies; 9+ messages in thread
From: J.J. Sestrich @ 2008-06-21 19:10 UTC (permalink / raw)
  To: emacs-devel

dhruva wrote:
> Hello,
>
> On Sat, Jun 21, 2008 at 4:56 AM, Chong Yidong <cyd@stupidchicken.com> wrote:
>   
>> <jsestri2@uiuc.edu> writes:
>>
>>     
>>> How much of emacs is platform dependent code? I am wondering how much
>>> code has to be replaced if you wanted to port emacs to a new platform
>>> essentially: How much of emacs is native c code / libraries and how
>>> much is done through lisp code?
>>>       
>> Almost all the platform-dependent code is in C and concerns
>> terminal/window system communications.  See the w32* and mac* files in
>> the source tree for an example.  The rest of the work is a matter of
>> juggling compilation switches, identifying system call names, etc.
>>
>> (If you provide some information about what platform you are interested
>> in, maybe someone could be more helpful.)
>>     
>
> I feel the most complicated would be the generating the emacs
> executable by dumping a process with elisp code loaded
> (bootstrapping). I remember when working in the OpenVMS labs, on
> Itanium platform, that was the only missing piece in getting a full
> blown working emacs.
>
> -dhruva
>
>   

I was thinking about making a javascript implementation that could be 
used in a browser. It would use some cgi scripts to do file I/O and 
window stuff would probably be easy enough to do with html/javascript. 
At this point, I'm just trying to gauge the level of work that would 
need to be done to make it happen. I would imagine that in addition to 
the windowing and file I/O I'd have to re-write the lisp interpreter, 
but this might be easier to do in javascript than C. I don't really know 
enough about this to judge anything though. Does anyone have any insight 
on these ideas: Size of code to be re-written? Difficulty of code that 
has to be re-done?

J.J.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Platform Dependent Code
  2008-06-21 19:10     ` J.J. Sestrich
@ 2008-06-21 19:56       ` Stefan Monnier
  2008-06-22  8:23       ` Thien-Thi Nguyen
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2008-06-21 19:56 UTC (permalink / raw)
  To: J.J. Sestrich; +Cc: emacs-devel

> I was thinking about making a javascript implementation that could be used
> in a browser. It would use some cgi scripts to do file I/O and window stuff
> would probably be easy enough to do with html/javascript. At this point, I'm
> just trying to gauge the level of work that would need to be done to make it
> happen. I would imagine that in addition to the windowing and file I/O I'd
> have to re-write the lisp interpreter, but this might be easier to do in
> javascript than C. I don't really know enough about this to judge anything
> though. Does anyone have any insight on these ideas: Size of code to be
> re-written? Difficulty of code that has to be re-done?

Sounds like a nice afternoon hack,


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Platform Dependent Code
  2008-06-21 19:10     ` J.J. Sestrich
  2008-06-21 19:56       ` Stefan Monnier
@ 2008-06-22  8:23       ` Thien-Thi Nguyen
  2008-06-22 17:18         ` J.J. Sestrich
  1 sibling, 1 reply; 9+ messages in thread
From: Thien-Thi Nguyen @ 2008-06-22  8:23 UTC (permalink / raw)
  To: J.J. Sestrich; +Cc: emacs-devel

() "J.J. Sestrich" <jsestri2@uiuc.edu>
() Sat, 21 Jun 2008 14:10:00 -0500

   Does anyone have any insight on these ideas: Size of code to
   be re-written? Difficulty of code that has to be re-done?

I think both these ideas do not point in the right direction.
In serious jest i tell you:

 - 42 MB, excruciatingly
 - 4.2 MB, not particularly
 - 0.42 MB, trivially
 - yes, yes
 - yes
 - no
 - oh no, not ANOTHER javascript reimpl of emacs!

and now we are no further along than before.

How do you measure the measures of others?

thi




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Platform Dependent Code
  2008-06-22  8:23       ` Thien-Thi Nguyen
@ 2008-06-22 17:18         ` J.J. Sestrich
  2008-06-22 21:52           ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: J.J. Sestrich @ 2008-06-22 17:18 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: emacs-devel

Thien-Thi Nguyen wrote:
> I think both these ideas do not point in the right direction.
> In serious jest i tell you:
>
>  - 42 MB, excruciatingly
>  - 4.2 MB, not particularly
>  - 0.42 MB, trivially
>  - yes, yes
>  - yes
>  - no
>  - oh no, not ANOTHER javascript reimpl of emacs

Is there an implementation of emacs in javascript?




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Platform Dependent Code
  2008-06-22 17:18         ` J.J. Sestrich
@ 2008-06-22 21:52           ` Juri Linkov
  2008-06-22 22:54             ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2008-06-22 21:52 UTC (permalink / raw)
  To: J.J. Sestrich; +Cc: Thien-Thi Nguyen, emacs-devel

> Is there an implementation of emacs in javascript?

There is an implementation of vi in javascript:

http://gpl.internetconnection.net/vi/

You can see in its source code the following setting:

    var emacsen = false;

If you set this variable to true, you will get the Emacs
implementation in javascript.

-- 
Juri Linkov
http://www.jurta.org/emacs/




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Platform Dependent Code
  2008-06-22 21:52           ` Juri Linkov
@ 2008-06-22 22:54             ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-06-22 22:54 UTC (permalink / raw)
  To: Juri Linkov; +Cc: emacs-devel, Thien-Thi Nguyen, J.J. Sestrich

Juri Linkov wrote:
>> Is there an implementation of emacs in javascript?
> 
> There is an implementation of vi in javascript:
> 
> http://gpl.internetconnection.net/vi/
> 
> You can see in its source code the following setting:
> 
>     var emacsen = false;
> 
> If you set this variable to true, you will get the Emacs
> implementation in javascript.

There is a second implementation mentioned here:

http://ajaxian.com/archives/jsvi-you-love-vi-you-love-javascript-now-you-have-both





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-06-22 22:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20 15:17 Platform Dependent Code jsestri2
2008-06-20 23:26 ` Chong Yidong
2008-06-21  3:47   ` dhruva
2008-06-21 19:10     ` J.J. Sestrich
2008-06-21 19:56       ` Stefan Monnier
2008-06-22  8:23       ` Thien-Thi Nguyen
2008-06-22 17:18         ` J.J. Sestrich
2008-06-22 21:52           ` Juri Linkov
2008-06-22 22:54             ` Lennart Borgman (gmail)

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.