9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Acme-sac integration with Windows NT
@ 2010-05-18 20:24 Aram Hăvărneanu
  2010-05-18 20:42 ` Ethan Grammatikidis
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Aram Hăvărneanu @ 2010-05-18 20:24 UTC (permalink / raw)
  To: 9fans

Hello,

I've been a long time vi(m) user. I use it everywhere, UNIX or
Windows. I explored other alternatives and I am very happy with acme.
Acme is great.

(Unfortunately), I have to use Windows. I write Windows drivers. I use
acme-sac and runs great on Windows. However, acme is more then an
editor. You can also use it as a terminal for typing commands in it.
Writing Windows drivers is very CLI centric, so I'd like to use acme
as an integrated environment where I can type Windows commands in it
instead of having a lot of Windows command prompts opened.

Is this possible? Can acme be used as a front-end to cmd.exe?

Thanks!

-- 
Aram Hăvărneanu



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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-18 20:24 [9fans] Acme-sac integration with Windows NT Aram Hăvărneanu
@ 2010-05-18 20:42 ` Ethan Grammatikidis
  2010-05-18 21:39   ` Aram Hăvărneanu
  2010-05-19  6:36 ` Arvindh Rajesh Tamilmani
  2010-05-20  8:40 ` yy
  2 siblings, 1 reply; 12+ messages in thread
From: Ethan Grammatikidis @ 2010-05-18 20:42 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On 18 May 2010, at 21:24, Aram Hăvărneanu wrote:

> Hello,
>
> I've been a long time vi(m) user. I use it everywhere, UNIX or
> Windows. I explored other alternatives and I am very happy with acme.
> Acme is great.
>
> (Unfortunately), I have to use Windows. I write Windows drivers. I use
> acme-sac and runs great on Windows. However, acme is more then an
> editor. You can also use it as a terminal for typing commands in it.
> Writing Windows drivers is very CLI centric, so I'd like to use acme
> as an integrated environment where I can type Windows commands in it
> instead of having a lot of Windows command prompts opened.
>
> Is this possible? Can acme be used as a front-end to cmd.exe?

Acme's `win' accepts a command to execute. I imagine you could enter  
`win cmd.exe', 2-drag to select it, and if cmd.exe behaves itself  
you'd have an acme window with cmd.exe in it.

>
> Thanks!
>
> -- 
> Aram Hăvărneanu
>

-- 
Simplicity does not precede complexity, but follows it. -- Alan Perlis




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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-18 20:42 ` Ethan Grammatikidis
@ 2010-05-18 21:39   ` Aram Hăvărneanu
  2010-05-18 23:10     ` Steve Simon
  0 siblings, 1 reply; 12+ messages in thread
From: Aram Hăvărneanu @ 2010-05-18 21:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, May 18, 2010 at 11:42 PM, Ethan Grammatikidis
<eekee57@fastmail.fm> wrote:
>
> if cmd.exe behaves itself you'd have an
> acme window with cmd.exe in it.
>

I think it does not behave itself. I think Windows consoles don't work
like UNIX /dev/pty*, but like /dev/vcs*. It seems like windows console
programs work with screen buffers, something like using curses. That's
why there are Windows API functions for changing colour and moving
cursor position in the console window's screen. Piping cmd.exe to some
other process doesn't seem to be enough.

-- 
Aram Hăvărneanu



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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-18 21:39   ` Aram Hăvărneanu
@ 2010-05-18 23:10     ` Steve Simon
  0 siblings, 0 replies; 12+ messages in thread
From: Steve Simon @ 2010-05-18 23:10 UTC (permalink / raw)
  To: 9fans

> It seems like windows console
> programs work with screen buffers, something like using curses.

This is the case for a few windows commands but many, even the majority don't
use windows console functions, they just read from stdin and writ to stdout
so you can run then via a pipe.

I do this all the time as I have a Plna9 desktop but have a cpu(1) like command
dos(1) which opens a session to a windows box for command line access; I write
embedded code which is crosscompiled using gcc on windows.

I wil describe this more if you like and you can have the code but I'am
on holiday for a week.

-Steve



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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-18 20:24 [9fans] Acme-sac integration with Windows NT Aram Hăvărneanu
  2010-05-18 20:42 ` Ethan Grammatikidis
@ 2010-05-19  6:36 ` Arvindh Rajesh Tamilmani
  2010-05-19 21:25   ` Aram Hăvărneanu
  2010-05-20  3:41   ` 6o205zd02
  2010-05-20  8:40 ` yy
  2 siblings, 2 replies; 12+ messages in thread
From: Arvindh Rajesh Tamilmani @ 2010-05-19  6:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

acme-sac on windows is my development environment too.

b2 on 'win os cmd' gives a cmd.exe window.  i prefer sh(1),
so i use just 'win' and access the windows files from /n/C.
i have shell functions defined in $home/lib/functions to
invoke specific windows commands.

for example:

fn ant {
	{os -T ant.bat $* | dcr} $* |[2] dcr >[1=2]
}

and the following rule in $home/lib/plumbing to enable b3 on
windows file names output by ant.

# Microsoft Windows file names, possibly tagged by line number, go to acme
kind is text
data matches '(^[a-zA-Z]):([.a-zA-Z0-9_/\-\\]+[a-zA-Z0-9_/\-\\])(:(((#?[0-9]+)|(/[A-Za-z0-9_\^]+/?)|[.$])([,;+\-]((#?[0-9]+)|(/[A-Za-z0-9_\^]+/?)|[.$]))*))?'
plumb alwaysstart acme
plumb start /dis/sh.dis -c 'plumb -d edit -a action showfile -a addr
$4 /n/^`{echo $1 | tr A-Z a-z}^`{echo $2 | tr ''\\ '' /␣}'

arvindh



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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-19  6:36 ` Arvindh Rajesh Tamilmani
@ 2010-05-19 21:25   ` Aram Hăvărneanu
  2010-05-20  3:41   ` 6o205zd02
  1 sibling, 0 replies; 12+ messages in thread
From: Aram Hăvărneanu @ 2010-05-19 21:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Wed, May 19, 2010 at 9:36 AM, Arvindh Rajesh Tamilmani
<arvindht@gmail.com> wrote:
> acme-sac on windows is my development environment too.
>
> b2 on 'win os cmd' gives a cmd.exe window.  i prefer sh(1),
> so i use just 'win' and access the windows files from /n/C.
> i have shell functions defined in $home/lib/functions to
> invoke specific windows commands.
>

I very much prefer a Plan9/UNIX environment myself. I have to use
Windows build tools and static verifier tools, but I think I'll follow
your advice and create some wrappers for them for the most common use
cases. Opening an additional command prompt occasionally is not a
problem, having everything integrated 95% of the time would be great.

-- 
Aram Hăvărneanu



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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-19  6:36 ` Arvindh Rajesh Tamilmani
  2010-05-19 21:25   ` Aram Hăvărneanu
@ 2010-05-20  3:41   ` 6o205zd02
  2010-05-20  5:50     ` Arvindh Rajesh Tamilmani
  2010-05-24  9:11     ` Robert Raschke
  1 sibling, 2 replies; 12+ messages in thread
From: 6o205zd02 @ 2010-05-20  3:41 UTC (permalink / raw)
  To: 9fans

How do you folks using acme-sac on Windows deal with the line-ending
issue?  I've been using P9P acme on linux (at work) since Russ announced
it, but I consider the line-ending issue a show-stopper on Windows.

While the cr displayed at the end of every line is annoying, I could
probably learn to live with it.  When I start editing, though, I doubt I
have enough discipline to remember add the cr, and if I don't remember I
would end up with files with mixed line-endings.  Some windows tools
aren't happy if the files don't use windows line endings.

   Peter Canning





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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-20  3:41   ` 6o205zd02
@ 2010-05-20  5:50     ` Arvindh Rajesh Tamilmani
  2010-05-24  9:11     ` Robert Raschke
  1 sibling, 0 replies; 12+ messages in thread
From: Arvindh Rajesh Tamilmani @ 2010-05-20  5:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> How do you folks using acme-sac on Windows deal with the line-ending
> issue?

pipefs(4) can be used to filter windows directory trees:
http://groups.google.com/group/acme-sac/msg/973e8c67b33a7976

and also to filter /chan/snarf (in $home/lib/profile):
http://groups.google.com/group/acme-sac/msg/cf5b3107e0d00d49

os commands can be filtered through dcr:
http://code.google.com/p/acme-sac/source/browse/man/1/dcr
for an example, see the ant wrapper i posted in this thread.

/n/sources/rsc/contrib/scripts:
http://groups.google.com/group/acme-sac/msg/15378eee84e15052

arvindh



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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-18 20:24 [9fans] Acme-sac integration with Windows NT Aram Hăvărneanu
  2010-05-18 20:42 ` Ethan Grammatikidis
  2010-05-19  6:36 ` Arvindh Rajesh Tamilmani
@ 2010-05-20  8:40 ` yy
  2010-05-21 10:43   ` Arvindh Rajesh Tamilmani
  2 siblings, 1 reply; 12+ messages in thread
From: yy @ 2010-05-20  8:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

If you are using cygwin, you can use sh from acme-sac:

win os C:\cygwin\bin\run.exe -p /bin sh -i

or if you do not need access to the rest of the cygwin commands:

win os C:\cygwin\bin\sh -i

--
- yiyus || JGL . 4l77.com



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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-20  8:40 ` yy
@ 2010-05-21 10:43   ` Arvindh Rajesh Tamilmani
  0 siblings, 0 replies; 12+ messages in thread
From: Arvindh Rajesh Tamilmani @ 2010-05-21 10:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> If you are using cygwin, you can use sh from acme-sac:

it is possible to b3 on a relative file name in a
cygwin window and get it opened in acme-sac.
you'll need the label patch to win[1], bin/awd and
bin/label from plan9port and a cd wrapper as
described in the example section of label(1)[2].
also, the default cygdrive path prefix should be
changed from /cygdrive to /n.

many little conventions like this could be found
in the archives and web ([3] comes to mind), which
make working with acme a delight :-)

arvindh

[1] http://code.google.com/p/acme-sac/source/detail?r=640287ed62
[2] http://swtch.com/plan9port/man/man1/label.html
[3] http://www.cse.yorku.ca/~oz/wily/idioms.html



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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-20  3:41   ` 6o205zd02
  2010-05-20  5:50     ` Arvindh Rajesh Tamilmani
@ 2010-05-24  9:11     ` Robert Raschke
  2010-05-24 18:08       ` hiro
  1 sibling, 1 reply; 12+ messages in thread
From: Robert Raschke @ 2010-05-24  9:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

On Thu, May 20, 2010 at 4:41 AM, <6o205zd02@sneakemail.com> wrote:

> How do you folks using acme-sac on Windows deal with the line-ending
> issue?  I've been using P9P acme on linux (at work) since Russ announced
> it, but I consider the line-ending issue a show-stopper on Windows.
>
> While the cr displayed at the end of every line is annoying, I could
> probably learn to live with it.  When I start editing, though, I doubt I
> have enough discipline to remember add the cr, and if I don't remember I
> would end up with files with mixed line-endings.  Some windows tools
> aren't happy if the files don't use windows line endings.
>
>   Peter Canning
>
>
When I start editing some random file in acme-sac, I do (pretend it's a
proper c/r character below)

Edit ,x/␍/d

and if I need them back in for Windows purposes, I do

Edit ,x/\n/i/␍/

Sometimes I forget. But it's never really been an issue. I do not know of
any Windows tool that requires c/r these days. And most people, when opening
in Notepad just go Ach! and open in Wordpad instead.

Robby

[-- Attachment #2: Type: text/html, Size: 1526 bytes --]

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

* Re: [9fans] Acme-sac integration with Windows NT
  2010-05-24  9:11     ` Robert Raschke
@ 2010-05-24 18:08       ` hiro
  0 siblings, 0 replies; 12+ messages in thread
From: hiro @ 2010-05-24 18:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Wordpad on windows 7 sucks :D

On 5/24/10, Robert Raschke <rtrlists@googlemail.com> wrote:
> On Thu, May 20, 2010 at 4:41 AM, <6o205zd02@sneakemail.com> wrote:
>
>> How do you folks using acme-sac on Windows deal with the line-ending
>> issue?  I've been using P9P acme on linux (at work) since Russ announced
>> it, but I consider the line-ending issue a show-stopper on Windows.
>>
>> While the cr displayed at the end of every line is annoying, I could
>> probably learn to live with it.  When I start editing, though, I doubt I
>> have enough discipline to remember add the cr, and if I don't remember I
>> would end up with files with mixed line-endings.  Some windows tools
>> aren't happy if the files don't use windows line endings.
>>
>>   Peter Canning
>>
>>
> When I start editing some random file in acme-sac, I do (pretend it's a
> proper c/r character below)
>
> Edit ,x/␍/d
>
> and if I need them back in for Windows purposes, I do
>
> Edit ,x/\n/i/␍/
>
> Sometimes I forget. But it's never really been an issue. I do not know of
> any Windows tool that requires c/r these days. And most people, when opening
> in Notepad just go Ach! and open in Wordpad instead.
>
> Robby
>



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

end of thread, other threads:[~2010-05-24 18:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-18 20:24 [9fans] Acme-sac integration with Windows NT Aram Hăvărneanu
2010-05-18 20:42 ` Ethan Grammatikidis
2010-05-18 21:39   ` Aram Hăvărneanu
2010-05-18 23:10     ` Steve Simon
2010-05-19  6:36 ` Arvindh Rajesh Tamilmani
2010-05-19 21:25   ` Aram Hăvărneanu
2010-05-20  3:41   ` 6o205zd02
2010-05-20  5:50     ` Arvindh Rajesh Tamilmani
2010-05-24  9:11     ` Robert Raschke
2010-05-24 18:08       ` hiro
2010-05-20  8:40 ` yy
2010-05-21 10:43   ` Arvindh Rajesh Tamilmani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).