pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

An Emacs <-> Pharo bridge (unidirectional at first)

EO
Eduardo Ochs
Wed, Dec 8, 2021 4:48 AM

Hi list,

I'm looking for help on doing something VERY un-smalltalkish with
Pharo... let me explain. I am working on several variants of this way
of controlling external programs with Emacs:

http://angg.twu.net/LATEX/2021emacsconf.pdf

The slides - link above - are the best way to understand how it works,
but there's mode info here:

http://angg.twu.net/emacsconf2021.html

The method above only works with programs that have REPLs that can be
run in terminals, but I have some variants of it that let me send
commands - single-line or multi-line - to external programs that only
have GUIs. In one of these variant the external program listens to the
signals SIGUSR1s and SIGUSR2s, and initially what it does when it
receives these signals is:

on SIGUSR1: print the contents of the file /tmp/bridge-data
on SIGUSR2:  eval the contents of the file /tmp/bridge-data

The action of SIGUSR2 can be used to redefine the action fo SIGUSR1.
There is a demo for Tcl here:

http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png
http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge

How can I implement something similar in Pharo? I mean, how do I make
it react to SIGUSR1s by printing - in any sense - the contents of
/tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of
/tmp/bridge-data?

Thanks in advance! =)
Eduardo Ochs
http://angg.twu.net/#eev

Hi list, I'm looking for help on doing something VERY un-smalltalkish with Pharo... let me explain. I am working on several variants of this way of controlling external programs with Emacs: http://angg.twu.net/LATEX/2021emacsconf.pdf The slides - link above - are the best way to understand how it works, but there's mode info here: http://angg.twu.net/emacsconf2021.html The method above only works with programs that have REPLs that can be run in terminals, but I have some variants of it that let me send commands - single-line or multi-line - to external programs that only have GUIs. In one of these variant the external program listens to the signals SIGUSR1s and SIGUSR2s, and initially what it does when it receives these signals is: on SIGUSR1: print the contents of the file /tmp/bridge-data on SIGUSR2: eval the contents of the file /tmp/bridge-data The action of SIGUSR2 can be used to redefine the action fo SIGUSR1. There is a demo for Tcl here: http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge How can I implement something similar in Pharo? I mean, how do I make it react to SIGUSR1s by printing - in any sense - the contents of /tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of /tmp/bridge-data? Thanks in advance! =) Eduardo Ochs http://angg.twu.net/#eev
PM
Pierre Misse
Wed, Dec 8, 2021 10:07 AM

Hello,

I am aware of a Visual studio implementation that does pretty much what
you described.
https://github.com/badetitou/vscode-pharo

I also kinda remember something pharo with emacs called: bubbles?
I can't remember sorry :/

Pierre

On 12/8/2021 5:48 AM, Eduardo Ochs wrote:

Hi list,

I'm looking for help on doing something VERY un-smalltalkish with
Pharo... let me explain. I am working on several variants of this way
of controlling external programs with Emacs:

http://angg.twu.net/LATEX/2021emacsconf.pdf

The slides - link above - are the best way to understand how it works,
but there's mode info here:

http://angg.twu.net/emacsconf2021.html

The method above only works with programs that have REPLs that can be
run in terminals, but I have some variants of it that let me send
commands - single-line or multi-line - to external programs that only
have GUIs. In one of these variant the external program listens to the
signals SIGUSR1s and SIGUSR2s, and initially what it does when it
receives these signals is:

on SIGUSR1: print the contents of the file /tmp/bridge-data
on SIGUSR2:  eval the contents of the file /tmp/bridge-data

The action of SIGUSR2 can be used to redefine the action fo SIGUSR1.
There is a demo for Tcl here:

http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png
http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge

How can I implement something similar in Pharo? I mean, how do I make
it react to SIGUSR1s by printing - in any sense - the contents of
/tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of
/tmp/bridge-data?

Thanks in advance! =)
Eduardo Ochs
http://angg.twu.net/#eev

Hello, I am aware of a Visual studio implementation that does pretty much what you described. https://github.com/badetitou/vscode-pharo I also kinda remember something pharo with emacs called: bubbles? I can't remember sorry :/ Pierre On 12/8/2021 5:48 AM, Eduardo Ochs wrote: > Hi list, > > I'm looking for help on doing something VERY un-smalltalkish with > Pharo... let me explain. I am working on several variants of this way > of controlling external programs with Emacs: > > http://angg.twu.net/LATEX/2021emacsconf.pdf > > The slides - link above - are the best way to understand how it works, > but there's mode info here: > > http://angg.twu.net/emacsconf2021.html > > The method above only works with programs that have REPLs that can be > run in terminals, but I have some variants of it that let me send > commands - single-line or multi-line - to external programs that only > have GUIs. In one of these variant the external program listens to the > signals SIGUSR1s and SIGUSR2s, and initially what it does when it > receives these signals is: > > on SIGUSR1: print the contents of the file /tmp/bridge-data > on SIGUSR2: eval the contents of the file /tmp/bridge-data > > The action of SIGUSR2 can be used to redefine the action fo SIGUSR1. > There is a demo for Tcl here: > > http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png > http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge > > How can I implement something similar in Pharo? I mean, how do I make > it react to SIGUSR1s by printing - in any sense - the contents of > /tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of > /tmp/bridge-data? > > Thanks in advance! =) > Eduardo Ochs > http://angg.twu.net/#eev
SV
Sven Van Caekenberghe
Wed, Dec 8, 2021 10:24 AM

On 8 Dec 2021, at 11:07, Pierre Misse pierre.misse-chanabier@inria.fr wrote:

Hello,

I am aware of a Visual studio implementation that does pretty much what you described.
https://github.com/badetitou/vscode-pharo

I also kinda remember something pharo with emacs called: bubbles?
I can't remember sorry :/

Haha, it took me a while to find it because I also forgot, but here it is.

It is called Shampoo:

https://github.com/dmatveev/shampoo-emacs

HTH,

Sven

PS: I wrote and use https://github.com/svenvc/NeoConsole which might help as well to get you started

Pierre

On 12/8/2021 5:48 AM, Eduardo Ochs wrote:

Hi list,

I'm looking for help on doing something VERY un-smalltalkish with
Pharo... let me explain. I am working on several variants of this way
of controlling external programs with Emacs:

http://angg.twu.net/LATEX/2021emacsconf.pdf

The slides - link above - are the best way to understand how it works,
but there's mode info here:

http://angg.twu.net/emacsconf2021.html

The method above only works with programs that have REPLs that can be
run in terminals, but I have some variants of it that let me send
commands - single-line or multi-line - to external programs that only
have GUIs. In one of these variant the external program listens to the
signals SIGUSR1s and SIGUSR2s, and initially what it does when it
receives these signals is:

on SIGUSR1: print the contents of the file /tmp/bridge-data
on SIGUSR2:  eval the contents of the file /tmp/bridge-data

The action of SIGUSR2 can be used to redefine the action fo SIGUSR1.
There is a demo for Tcl here:

http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png
http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge

How can I implement something similar in Pharo? I mean, how do I make
it react to SIGUSR1s by printing - in any sense - the contents of
/tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of
/tmp/bridge-data?

Thanks in advance! =)
Eduardo Ochs
http://angg.twu.net/#eev

> On 8 Dec 2021, at 11:07, Pierre Misse <pierre.misse-chanabier@inria.fr> wrote: > > Hello, > > I am aware of a Visual studio implementation that does pretty much what you described. > https://github.com/badetitou/vscode-pharo > > I also kinda remember something pharo with emacs called: bubbles? > I can't remember sorry :/ Haha, it took me a while to find it because I also forgot, but here it is. It is called Shampoo: https://github.com/dmatveev/shampoo-emacs HTH, Sven PS: I wrote and use https://github.com/svenvc/NeoConsole which might help as well to get you started > Pierre > > On 12/8/2021 5:48 AM, Eduardo Ochs wrote: >> Hi list, >> >> I'm looking for help on doing something VERY un-smalltalkish with >> Pharo... let me explain. I am working on several variants of this way >> of controlling external programs with Emacs: >> >> http://angg.twu.net/LATEX/2021emacsconf.pdf >> >> The slides - link above - are the best way to understand how it works, >> but there's mode info here: >> >> http://angg.twu.net/emacsconf2021.html >> >> The method above only works with programs that have REPLs that can be >> run in terminals, but I have some variants of it that let me send >> commands - single-line or multi-line - to external programs that only >> have GUIs. In one of these variant the external program listens to the >> signals SIGUSR1s and SIGUSR2s, and initially what it does when it >> receives these signals is: >> >> on SIGUSR1: print the contents of the file /tmp/bridge-data >> on SIGUSR2: eval the contents of the file /tmp/bridge-data >> >> The action of SIGUSR2 can be used to redefine the action fo SIGUSR1. >> There is a demo for Tcl here: >> >> http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png >> http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge >> >> How can I implement something similar in Pharo? I mean, how do I make >> it react to SIGUSR1s by printing - in any sense - the contents of >> /tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of >> /tmp/bridge-data? >> >> Thanks in advance! =) >> Eduardo Ochs >> http://angg.twu.net/#eev
G
gettimothy
Wed, Dec 8, 2021 1:03 PM

I am too busy to cobtibute at the moment, but I too am very interested in an emacs interface to the  vm/image wuthout any gui but emacs.

Iirc there is a protocol fir talking/debugging that I used fir coding and debugging in php that is an established protocol that is available in the micorsoft  dev environment.

The text/search/ customization of Emacs is unparralleled.

imho, this will be essential for reluctant server admins to accept/embrace smallralk.

---- On Tue, 07 Dec 2021 23:48:31 -0500 eduardoochs@gmail.com wrote ----

Hi list,

I'm looking for help on doing something VERY un-smalltalkish with
Pharo... let me explain. I am working on several variants of this way
of controlling external programs with Emacs:

http://angg.twu.net/LATEX/2021emacsconf.pdf

The slides - link above - are the best way to understand how it works,
but there's mode info here:

http://angg.twu.net/emacsconf2021.html

The method above only works with programs that have REPLs that can be
run in terminals, but I have some variants of it that let me send
commands - single-line or multi-line - to external programs that only
have GUIs. In one of these variant the external program listens to the
signals SIGUSR1s and SIGUSR2s, and initially what it does when it
receives these signals is:

on SIGUSR1: print the contents of the file /tmp/bridge-data
on SIGUSR2: eval the contents of the file /tmp/bridge-data

The action of SIGUSR2 can be used to redefine the action fo SIGUSR1.
There is a demo for Tcl here:

http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png
http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge

How can I implement something similar in Pharo? I mean, how do I make
it react to SIGUSR1s by printing - in any sense - the contents of
/tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of
/tmp/bridge-data?

Thanks in advance! =)
Eduardo Ochs
http://angg.twu.net/#eev

I am too busy to cobtibute at the moment, but I too am very interested in an emacs interface to the vm/image wuthout any gui but emacs. Iirc there is a protocol fir talking/debugging that I used fir coding and debugging in php that is an established protocol that is available in the micorsoft dev environment. The text/search/ customization of Emacs is unparralleled. imho, this will be essential for reluctant server admins to accept/embrace smallralk. ---- On Tue, 07 Dec 2021 23:48:31 -0500 eduardoochs@gmail.com wrote ---- Hi list, I'm looking for help on doing something VERY un-smalltalkish with Pharo... let me explain. I am working on several variants of this way of controlling external programs with Emacs: http://angg.twu.net/LATEX/2021emacsconf.pdf The slides - link above - are the best way to understand how it works, but there's mode info here: http://angg.twu.net/emacsconf2021.html The method above only works with programs that have REPLs that can be run in terminals, but I have some variants of it that let me send commands - single-line or multi-line - to external programs that only have GUIs. In one of these variant the external program listens to the signals SIGUSR1s and SIGUSR2s, and initially what it does when it receives these signals is: on SIGUSR1: print the contents of the file /tmp/bridge-data on SIGUSR2: eval the contents of the file /tmp/bridge-data The action of SIGUSR2 can be used to redefine the action fo SIGUSR1. There is a demo for Tcl here: http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge How can I implement something similar in Pharo? I mean, how do I make it react to SIGUSR1s by printing - in any sense - the contents of /tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of /tmp/bridge-data? Thanks in advance! =) Eduardo Ochs http://angg.twu.net/#eev
G
gettimothy
Wed, Dec 8, 2021 1:07 PM

https://github.com/ahungry/geben

that is the protocol emacs/php uses.  Dbg .

iirc, there is another standard for code browsing, highlighting, etc.

If i find it I will ping you.

Good luck in your work

---- On Wed, 08 Dec 2021 05:07:42 -0500 pierre.misse-chanabier@inria.fr wrote ----

Hello,

I am aware of a Visual studio implementation that does pretty much what
you described.
https://github.com/badetitou/vscode-pharo

I also kinda remember something pharo with emacs called: bubbles?
I can't remember sorry :/

Pierre

On 12/8/2021 5:48 AM, Eduardo Ochs wrote:

Hi list,

I'm looking for help on doing something VERY un-smalltalkish with
Pharo... let me explain. I am working on several variants of this way
of controlling external programs with Emacs:

http://angg.twu.net/LATEX/2021emacsconf.pdf

The slides - link above - are the best way to understand how it works,
but there's mode info here:

http://angg.twu.net/emacsconf2021.html

The method above only works with programs that have REPLs that can be
run in terminals, but I have some variants of it that let me send
commands - single-line or multi-line - to external programs that only
have GUIs. In one of these variant the external program listens to the
signals SIGUSR1s and SIGUSR2s, and initially what it does when it
receives these signals is:

on SIGUSR1: print the contents of the file /tmp/bridge-data
on SIGUSR2: eval the contents of the file /tmp/bridge-data

The action of SIGUSR2 can be used to redefine the action fo SIGUSR1.
There is a demo for Tcl here:

http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png
http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge

How can I implement something similar in Pharo? I mean, how do I make
it react to SIGUSR1s by printing - in any sense - the contents of
/tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of
/tmp/bridge-data?

Thanks in advance! =)
Eduardo Ochs
http://angg.twu.net/#eev

https://github.com/ahungry/geben that is the protocol emacs/php uses. Dbg . iirc, there is another standard for code browsing, highlighting, etc. If i find it I will ping you. Good luck in your work ---- On Wed, 08 Dec 2021 05:07:42 -0500 pierre.misse-chanabier@inria.fr wrote ---- Hello, I am aware of a Visual studio implementation that does pretty much what you described. https://github.com/badetitou/vscode-pharo I also kinda remember something pharo with emacs called: bubbles? I can't remember sorry :/ Pierre On 12/8/2021 5:48 AM, Eduardo Ochs wrote: > Hi list, > > I'm looking for help on doing something VERY un-smalltalkish with > Pharo... let me explain. I am working on several variants of this way > of controlling external programs with Emacs: > > http://angg.twu.net/LATEX/2021emacsconf.pdf > > The slides - link above - are the best way to understand how it works, > but there's mode info here: > > http://angg.twu.net/emacsconf2021.html > > The method above only works with programs that have REPLs that can be > run in terminals, but I have some variants of it that let me send > commands - single-line or multi-line - to external programs that only > have GUIs. In one of these variant the external program listens to the > signals SIGUSR1s and SIGUSR2s, and initially what it does when it > receives these signals is: > > on SIGUSR1: print the contents of the file /tmp/bridge-data > on SIGUSR2: eval the contents of the file /tmp/bridge-data > > The action of SIGUSR2 can be used to redefine the action fo SIGUSR1. > There is a demo for Tcl here: > > http://angg.twu.net/IMAGES/2021-emacs-tcl-bridge.png > http://angg.twu.net/e/tcl.e.html#2021-emacs-tcl-bridge > > How can I implement something similar in Pharo? I mean, how do I make > it react to SIGUSR1s by printing - in any sense - the contents of > /tmp/bridge-data, and react to SIGUSR2s by eval-ing the contents of > /tmp/bridge-data? > > Thanks in advance! =) > Eduardo Ochs > http://angg.twu.net/#eev
DG
duboismathieu_gaas@yahoo.fr
Wed, Dec 8, 2021 9:24 PM

gettimothy wrote:

https://github.com/ahungry/geben

that is the protocol emacs/php uses.  Dbg .

iirc, there is another standard for code browsing, highlighting, etc.

If i find it I will ping you.

gettimothy wrote: > https://github.com/ahungry/geben > > that is the protocol emacs/php uses. Dbg . > > iirc, there is another standard for code browsing, highlighting, etc. > > If i find it I will ping you. Are you talking about LSP (https://en.wikipedia.org/wiki/Language_Server_Protocol) ?
G
gettimothy
Thu, Dec 9, 2021 12:46 PM

YES!  (:

I do not know this, but I suspect that with those two things, smalltalk will be able to be developed in and designed in any IDE.

That would do wonders for mind-share on the language itself.

Thank you for finding that.

cheers.

---- On Wed, 08 Dec 2021 16:24:06 -0500 Mathieu Dubois via Pharo-users pharo-users@lists.pharo.org wrote ----

gettimothy wrote:

https://github.com/ahungry/geben

that is the protocol emacs/php uses.  Dbg .

iirc, there is another standard for code browsing, highlighting, etc.

If i find it I will ping you.

Are you talking about LSP (https://en.wikipedia.org/wiki/Language_Server_Protocol) ?

YES!  (: I do not know this, but I suspect that with those two things, smalltalk will be able to be developed in and designed in any IDE. That would do wonders for mind-share on the language itself. Thank you for finding that. cheers. ---- On Wed, 08 Dec 2021 16:24:06 -0500 Mathieu Dubois via Pharo-users <pharo-users@lists.pharo.org> wrote ---- gettimothy wrote: https://github.com/ahungry/geben that is the protocol emacs/php uses. Dbg . iirc, there is another standard for code browsing, highlighting, etc. If i find it I will ping you. Are you talking about LSP (https://en.wikipedia.org/wiki/Language_Server_Protocol) ?
SV
Sven Van Caekenberghe
Thu, Dec 9, 2021 12:53 PM

On 8 Dec 2021, at 22:24, Mathieu Dubois via Pharo-users pharo-users@lists.pharo.org wrote:

gettimothy wrote:

https://github.com/ahungry/geben

that is the protocol emacs/php uses. Dbg .

iirc, there is another standard for code browsing, highlighting, etc.

If i find it I will ping you.

Are you talking about LSP (https://en.wikipedia.org/wiki/Language_Server_Protocol) ?

> On 8 Dec 2021, at 22:24, Mathieu Dubois via Pharo-users <pharo-users@lists.pharo.org> wrote: > > gettimothy wrote: > > https://github.com/ahungry/geben > > that is the protocol emacs/php uses. Dbg . > > iirc, there is another standard for code browsing, highlighting, etc. > > If i find it I will ping you. > > Are you talking about LSP (https://en.wikipedia.org/wiki/Language_Server_Protocol) ? This also already exists for Pharo: https://badetitou.fr/projects/vscode-pharo/2021/12/02/with-gtk/ https://marketplace.visualstudio.com/items?itemName=badetitou.pharo-language-server Sven
G
gettimothy
Thu, Dec 9, 2021 12:56 PM

Excellent.

When (!) I finish the large project I am on, I will probably turn to this.

Thanks for the thread.

---- On Thu, 09 Dec 2021 07:53:14 -0500 Sven Van Caekenberghe sven@stfx.eu wrote ----

On 8 Dec 2021, at 22:24, Mathieu Dubois via Pharo-users mailto:pharo-users@lists.pharo.org wrote:

gettimothy wrote:

https://github.com/ahungry/geben

that is the protocol emacs/php uses. Dbg .

iirc, there is another standard for code browsing, highlighting, etc.

If i find it I will ping you.

Are you talking about LSP (https://en.wikipedia.org/wiki/Language_Server_Protocol) ?

Excellent. When (!) I finish the large project I am on, I will probably turn to this. Thanks for the thread. ---- On Thu, 09 Dec 2021 07:53:14 -0500 Sven Van Caekenberghe <sven@stfx.eu> wrote ---- > On 8 Dec 2021, at 22:24, Mathieu Dubois via Pharo-users <mailto:pharo-users@lists.pharo.org> wrote: > > gettimothy wrote: > > https://github.com/ahungry/geben > > that is the protocol emacs/php uses. Dbg . > > iirc, there is another standard for code browsing, highlighting, etc. > > If i find it I will ping you. > > Are you talking about LSP (https://en.wikipedia.org/wiki/Language_Server_Protocol) ? This also already exists for Pharo: https://badetitou.fr/projects/vscode-pharo/2021/12/02/with-gtk/ https://marketplace.visualstudio.com/items?itemName=badetitou.pharo-language-server Sven