9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Using proportional fonts in Acme for Programming
@ 2009-08-13  9:14 Aaron W. Hsu
  2009-08-13 10:09 ` matt
                   ` (6 more replies)
  0 siblings, 7 replies; 31+ messages in thread
From: Aaron W. Hsu @ 2009-08-13  9:14 UTC (permalink / raw)
  To: 9fans

So, I was browsing around the other day looking at Acme resources, and I
discovered an old post from 1995 wherein someone advocated the use of
proportional fonts for programming in Acme. This surprised me, to say the
least. He even went as far as to mention that SML was the language they
were using, and had managed to get a decent indenting pattern for it that
was just as readable, without messing things up for proportional font
users.

I have to admit that I'm a bit skeptical about whether such a technique
actually works, and so, I thought I would pose some questions to you.

Firstly, how many of you using Acme for programming on a daily basis remap
your fonts so that the fixed width font is the main one that you use?

Secondly, if you do use proportional width fonts, why, and what troubles
did you encounter; what benefits did you encounter?

Thirdly, would you continue using proportional width fonts in cases like
Lisp code, where you very often see something like the following
indentation scheme, and how would you resolve these indentation problems
with proportional width fonts if you did continue to use them?

	(let ([foo bar]
	      [something else])
	  (some-func (called again)
                      (with fun indentation)
             (and yet)
             (another)))

Thanks!

	Aaron W. Hsu


--
Of all tyrannies, a tyranny sincerely exercised for the good of its
victims may be the most oppressive. -- C. S. Lewis



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13  9:14 [9fans] Using proportional fonts in Acme for Programming Aaron W. Hsu
@ 2009-08-13 10:09 ` matt
  2009-08-13 10:18 ` Paul Donnelly
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 31+ messages in thread
From: matt @ 2009-08-13 10:09 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I always use proportional, 10 years ish now

I always use tabs not spaces for indenting

I don't remember it ever being a problem, certainly not one unsolved by
clicking on Font



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13  9:14 [9fans] Using proportional fonts in Acme for Programming Aaron W. Hsu
  2009-08-13 10:09 ` matt
@ 2009-08-13 10:18 ` Paul Donnelly
  2009-08-13 10:22 ` roger peppe
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 31+ messages in thread
From: Paul Donnelly @ 2009-08-13 10:18 UTC (permalink / raw)
  To: 9fans

"Aaron W. Hsu" <arcfide@sacrideo.us> writes:

> Secondly, if you do use proportional width fonts, why, and what
> troubles did you encounter; what benefits did you encounter?

You can't very well engage in weird formatting tricks, but I'm not much
a fan of those anyway. IMO, the more attractive letters and generally
lesser character width more than make up for the inability to precisely
align columns that don't contain whitespace. I just use tabs to give
myself a semantic clue.

> Thirdly, would you continue using proportional width fonts in cases
> like Lisp code, where you very often see something like the following
> indentation scheme,

No. Lisp indentation is hairy enough that I'd rather have the editor do
it anyway (I'll take a structure editor too, if you please), so Acme is
right out. Lisp code is so structurally complex that the indentation
scheme I use in C doesn't work so well. I really want arguments to a
function to begin at the same column, and for macro bodies to be
indented by two characters precisely, so I don't get hopelessly lost. I
just go on back to Emacs for Lisp coding.

> and how would you resolve these indentation problems with proportional
> width fonts if you did continue to use them?

I'd make leading spaces inherit their width from the characters above.

(let ((foo bar)
      (something else))
  (some-func (called again)
             (with fun indentation)
             (and yet)
             (another)))

So in this example, the first space on line two would have the width of
"(", the second the width of an "l", and so on. But the space in
"something else" uses whatever width is defined in the font, since
spacing would get weird otherwise.

You couldn't do

(let ((foo       bar)
      (something else))
  ...)

and expect proper alignment, but like I said, I don't like that trick
anyway.



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13  9:14 [9fans] Using proportional fonts in Acme for Programming Aaron W. Hsu
  2009-08-13 10:09 ` matt
  2009-08-13 10:18 ` Paul Donnelly
@ 2009-08-13 10:22 ` roger peppe
  2009-08-13 10:27 ` Robert Raschke
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 31+ messages in thread
From: roger peppe @ 2009-08-13 10:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/8/13 Aaron W. Hsu <arcfide@sacrideo.us>:
> Firstly, how many of you using Acme for programming on a daily basis remap
> your fonts so that the fixed width font is the main one that you use?

i use proportional fonts in acme for programming.

> Secondly, if you do use proportional width fonts, why, and what troubles did
> you encounter; what benefits did you encounter?

i use them because they're more readable, and i get more
characters per line than in a similarly sized fixed-width font.

in C-like syntax, everything works just fine; a single
tab character is ideal for indentation.
use of tabs other than at the start of a line won't
guarantee alignment with other fonts, but this rarely matters
too much.

in LISP, i sometimes ended  up using a fixed-width font,
due to the convention of aligning a subform with part
of its parent, as you point out. variable-width fonts can
work ok in lisp, although the indentation tends to
end up slightly non-standard (although still passable).

in haskell, i used proportional spacing with single-tab
indentation, and it worked just fine apart from, AFAIR,
multiple assignments for a single let - i just always
used let...in.

> Thirdly, would you continue using proportional width fonts in cases like
> Lisp code, where you very often see something like the following indentation
> scheme, and how would you resolve these indentation problems with
> proportional width fonts if you did continue to use them?
>
>        (let ([foo bar]
>              [something else])
>          (some-func (called again)
>                     (with fun indentation)
>            (and yet)
>            (another)))

i presume you meant this:

        (let ([foo bar]
              [something else])
          (some-func (called again)
                     (with fun indentation)
                     (and yet)
                     (another)))

using a varwidth font, i'd format this as:

(let ([foo bar]
        [something else])
  (some-func
      (called again)
      (with fun indentation)
      (and yet)
      (another)))

(note 4-space indent, not 2-space indent
for the some-func arguments. not perfect, but ok, i reckon)

i found unlike macros, functions rarely need multiline continuation,
but i think the case is arguable. as i said, i've done it both ways.

PS. i'd really like to see an acme-integrated lisp environment. one of
these years
i'll get around to it...



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13  9:14 [9fans] Using proportional fonts in Acme for Programming Aaron W. Hsu
                   ` (2 preceding siblings ...)
  2009-08-13 10:22 ` roger peppe
@ 2009-08-13 10:27 ` Robert Raschke
  2009-08-13 11:12 ` Ethan Grammatikidis
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 31+ messages in thread
From: Robert Raschke @ 2009-08-13 10:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Thu, Aug 13, 2009 at 10:14 AM, Aaron W. Hsu <arcfide@sacrideo.us> wrote:

> So, I was browsing around the other day looking at Acme resources, and I
> discovered an old post from 1995 wherein someone advocated the use of
> proportional fonts for programming in Acme.


 I've been programming using Wily, Acme, and Acme SAC for 15 years now, and
this has always been using proportional fonts. Very, very rarely do I need
to look at fixed font representation, and I can't remember when the last
time actually was?

I am so used to this, that I find it difficult to read code in a fixed font,
color overloaded, highlighting editor. All the flashiness detracts from the
code I'm trying to understand.

Sometimes when I have to understand a bit of foreign code, I go through the
code and re-indent to fit my view of the world. I use this as an exercise to
help me understand what the code does, not because I don't like the style.

For code that uses brackets of some persuasion for grouping code, the
double-click text selection shows me exactly the grouping. And I don't get
mislead by wrong indentation very easily.

Proportional fonts can also greatly reduce pointless discussions about
coding style.

Robby

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

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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13  9:14 [9fans] Using proportional fonts in Acme for Programming Aaron W. Hsu
                   ` (3 preceding siblings ...)
  2009-08-13 10:27 ` Robert Raschke
@ 2009-08-13 11:12 ` Ethan Grammatikidis
  2009-08-13 17:55 ` Daniel Lyons
  2009-08-14  9:15 ` Aaron W. Hsu
  6 siblings, 0 replies; 31+ messages in thread
From: Ethan Grammatikidis @ 2009-08-13 11:12 UTC (permalink / raw)
  To: 9fans

On Thu, 13 Aug 2009 09:14:19 GMT
"Aaron W. Hsu" <arcfide@sacrideo.us> wrote:

> So, I was browsing around the other day looking at Acme resources, and I
> discovered an old post from 1995 wherein someone advocated the use of
> proportional fonts for programming in Acme. This surprised me, to say the
> least. He even went as far as to mention that SML was the language they
> were using, and had managed to get a decent indenting pattern for it that
> was just as readable, without messing things up for proportional font
> users.
>
> I have to admit that I'm a bit skeptical about whether such a technique
> actually works, and so, I thought I would pose some questions to you.
>
> Firstly, how many of you using Acme for programming on a daily basis remap
> your fonts so that the fixed width font is the main one that you use?
>
> Secondly, if you do use proportional width fonts, why, and what troubles
> did you encounter; what benefits did you encounter?

I don't program on a daily basis, but using a proportional font in rio
I'm finding it so much easier on the eyes that I hold back from opening
xterms and from switching acme windows into the fixed-width font.

>
> Thirdly, would you continue using proportional width fonts in cases like
> Lisp code, where you very often see something like the following
> indentation scheme, and how would you resolve these indentation problems
> with proportional width fonts if you did continue to use them?
>
> 	(let ([foo bar]
> 	      [something else])
> 	  (some-func (called again)
>                       (with fun indentation)
>              (and yet)
>              (another)))

This particular form of indentation is the only thing I'd be worried
about, and where a great deal of nesting is not required it's never
strictly necessary. In a certain scripting environment with a C-like
syntax and a very weak editor I got into the habit of treating parentheses
as block structure when the parameter list is long:

    llSetPrimitiveParams([
            PRIM_TYPE, PRIM_TYPE_CYLINDER, 0,
            <open_cut_start, open_cut_end, 0>, hollow,
            <0, 0, 0>, <1, 1, 0>, <0, 0, 0>
    ]);

That's not a practical style in Lisp, of course. I've thought about
this in the past as I was never entirely comfortable with some very
common indenting styles. Gnu style has 2-character indents, that's not
an indent, it's natural roughness! The Linux kernel style on the other
hand has full tabs. 8-character tabs break things up a little too much
for my eyes so I set my editor to have narrower tabs when loading code
from the kernel tree. This worked great so long as no code had a special
indent (as Aaron's Lisp code above) nor was aligned after the indent
(e.g. comments on the same line as code). This eventually led me to
consider an editor which dynamically managed indents, displaying the
code quite differently to the fixed indents in the source file. Such an
editor could work well with proportional fonts and s-expressions together,
but I can't work out whether it would be 'too clever' - i.e. irritating.


--
Ethan Grammatikidis

Those who are slower at parsing information must
necessarily be faster at problem-solving.



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13  9:14 [9fans] Using proportional fonts in Acme for Programming Aaron W. Hsu
                   ` (4 preceding siblings ...)
  2009-08-13 11:12 ` Ethan Grammatikidis
@ 2009-08-13 17:55 ` Daniel Lyons
  2009-08-13 22:27   ` David Leimbach
                     ` (4 more replies)
  2009-08-14  9:15 ` Aaron W. Hsu
  6 siblings, 5 replies; 31+ messages in thread
From: Daniel Lyons @ 2009-08-13 17:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On Aug 13, 2009, at 3:14 AM, Aaron W. Hsu wrote:

> So, I was browsing around the other day looking at Acme resources,  
> and I discovered an old post from 1995 wherein someone advocated the  
> use of proportional fonts for programming in Acme. This surprised  
> me, to say the least. He even went as far as to mention that SML was  
> the language they were using, and had managed to get a decent  
> indenting pattern for it that was just as readable, without messing  
> things up for proportional font users.
>
> I have to admit that I'm a bit skeptical about whether such a  
> technique actually works, and so, I thought I would pose some  
> questions to you.

Bjarne Stroustrup actually advocates this style in "The C++  
Programming Language."

This discussion reminds me of this elastic tab stops concept:

   http://nickgravgaard.com/elastictabstops/

I don't think it made it into any editors, but it would support the  
kind of fancy alignment I like to have in my code while also  
supporting real fonts, which I would prefer to use.

> Thirdly, would you continue using proportional width fonts in cases  
> like Lisp code, where you very often see something like the  
> following indentation scheme, and how would you resolve these  
> indentation problems with proportional width fonts if you did  
> continue to use them?
>
> 	(let ([foo bar]
> 	      [something else])
> 	  (some-func (called again)
>                     (with fun indentation)
>            (and yet)
>            (another)))


I bet you could set up Emacs to use a proportional font. It can do  
anything, right? :)

I'd love it if Acme or Plan 9 had good support for some kind of Lisp  
variant.

—
Daniel Lyons




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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13 17:55 ` Daniel Lyons
@ 2009-08-13 22:27   ` David Leimbach
  2009-08-13 22:35     ` ron minnich
  2009-08-14  2:58   ` Roman V. Shaposhnik
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 31+ messages in thread
From: David Leimbach @ 2009-08-13 22:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Thu, Aug 13, 2009 at 10:55 AM, Daniel Lyons <fusion@storytotell.org>wrote:

>
> On Aug 13, 2009, at 3:14 AM, Aaron W. Hsu wrote:
>
>  So, I was browsing around the other day looking at Acme resources, and I
>> discovered an old post from 1995 wherein someone advocated the use of
>> proportional fonts for programming in Acme. This surprised me, to say the
>> least. He even went as far as to mention that SML was the language they were
>> using, and had managed to get a decent indenting pattern for it that was
>> just as readable, without messing things up for proportional font users.
>>
>> I have to admit that I'm a bit skeptical about whether such a technique
>> actually works, and so, I thought I would pose some questions to you.
>>
>
> Bjarne Stroustrup actually advocates this style in "The C++ Programming
> Language."
>
> This discussion reminds me of this elastic tab stops concept:
>
>  http://nickgravgaard.com/elastictabstops/
>
> I don't think it made it into any editors, but it would support the kind of
> fancy alignment I like to have in my code while also supporting real fonts,
> which I would prefer to use.
>
>  Thirdly, would you continue using proportional width fonts in cases like
>> Lisp code, where you very often see something like the following indentation
>> scheme, and how would you resolve these indentation problems with
>> proportional width fonts if you did continue to use them?
>>
>>        (let ([foo bar]
>>              [something else])
>>          (some-func (called again)
>>                    (with fun indentation)
>>           (and yet)
>>           (another)))
>>
>
>
> I bet you could set up Emacs to use a proportional font. It can do
> anything, right? :)
>
> I'd love it if Acme or Plan 9 had good support for some kind of Lisp
> variant.


Acme has good enough support for Lisp in that I can edit the program buffer,
and then re-load it all in Acme via the "win" program.  I use it with SBCL
this way on my mac actually.

Emacs + SLIME is pretty nice, but sometimes quite a bit more than I need.




>
>
> —
> Daniel Lyons
>
>
>

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

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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13 22:27   ` David Leimbach
@ 2009-08-13 22:35     ` ron minnich
  2009-08-13 22:40       ` erik quanstrom
  0 siblings, 1 reply; 31+ messages in thread
From: ron minnich @ 2009-08-13 22:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I always get a kick out of this
exchange:http://www.usenet.com/newsgroups/comp.os.plan9/msg02052.html



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13 22:35     ` ron minnich
@ 2009-08-13 22:40       ` erik quanstrom
  0 siblings, 0 replies; 31+ messages in thread
From: erik quanstrom @ 2009-08-13 22:40 UTC (permalink / raw)
  To: 9fans

On Thu Aug 13 18:36:41 EDT 2009, rminnich@gmail.com wrote:
> I always get a kick out of this
> exchange:http://www.usenet.com/newsgroups/comp.os.plan9/msg02052.html

it took me at least 5 seconds to realize that abaco was formatting
that page correctly.  ☺

the key to the joke, however, is there is a vast difference between
leading indentation and stuff like

	if(x == 1 &&
	   y == 2)

which just doesn't work well with proportional fonts.

i guess this email is an excercize in making presotto unfunny
in 3 easy steps.

- erik



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13 17:55 ` Daniel Lyons
  2009-08-13 22:27   ` David Leimbach
@ 2009-08-14  2:58   ` Roman V. Shaposhnik
  2009-08-14  8:27     ` Robert Raschke
  2009-08-14 21:32     ` [9fans] Using proportional fonts in Acme for Programming Skip Tavakkolian
  2009-08-14  9:16   ` Pavel Klinkovsky
                     ` (2 subsequent siblings)
  4 siblings, 2 replies; 31+ messages in thread
From: Roman V. Shaposhnik @ 2009-08-14  2:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, 2009-08-13 at 11:55 -0600, Daniel Lyons wrote:
> I'd love it if Acme or Plan 9 had good support for some kind of Lisp
> variant.

Speaking of which (or may be not ;-)) is there anybody using Lua
on Plan9?

Thanks,
Roman.

P.S. The more I look into Lua (as a way to help C refuge start
doing some functional stuff) the more it seems that the two have
a lot in common when it comes to software architecture.




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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-14  2:58   ` Roman V. Shaposhnik
@ 2009-08-14  8:27     ` Robert Raschke
  2009-08-14 18:27       ` [9fans] Lua on Plan9 Roman V. Shaposhnik
  2009-08-14 21:32     ` [9fans] Using proportional fonts in Acme for Programming Skip Tavakkolian
  1 sibling, 1 reply; 31+ messages in thread
From: Robert Raschke @ 2009-08-14  8:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Fri, Aug 14, 2009 at 3:58 AM, Roman V. Shaposhnik <rvs@sun.com> wrote:

> On Thu, 2009-08-13 at 11:55 -0600, Daniel Lyons wrote:
> > I'd love it if Acme or Plan 9 had good support for some kind of Lisp
> > variant.
>
> Speaking of which (or may be not ;-)) is there anybody using Lua
> on Plan9?
>
> Thanks,
> Roman.
>
> P.S. The more I look into Lua (as a way to help C refuge start
> doing some functional stuff) the more it seems that the two have
> a lot in common when it comes to software architecture.
>
>
> Last time I tried, the standard Lua compiled out of the box under the APE.

Great little language. I use it in my day job (together with Erlang). It's
implementation is indeed just as enlightening as the Plan 9 code. An
exercise in doing exactly what is required and no more. Very elegant in my
eyes.

Robby

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

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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13  9:14 [9fans] Using proportional fonts in Acme for Programming Aaron W. Hsu
                   ` (5 preceding siblings ...)
  2009-08-13 17:55 ` Daniel Lyons
@ 2009-08-14  9:15 ` Aaron W. Hsu
  2009-08-14 16:49   ` Daniel Lyons
  2009-08-17  9:09   ` Aaron W. Hsu
  6 siblings, 2 replies; 31+ messages in thread
From: Aaron W. Hsu @ 2009-08-14  9:15 UTC (permalink / raw)
  To: 9fans

On Thu, 13 Aug 2009 13:58:39 -0400, Daniel Lyons <fusion@storytotell.org>
wrote:

> I'd love it if Acme or Plan 9 had good support for some kind of Lisp
> variant.

Maybe that should be my next side project.

	Aaron W. Hsu

--
Of all tyrannies, a tyranny sincerely exercised for the good of its
victims may be the most oppressive. -- C. S. Lewis



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13 17:55 ` Daniel Lyons
  2009-08-13 22:27   ` David Leimbach
  2009-08-14  2:58   ` Roman V. Shaposhnik
@ 2009-08-14  9:16   ` Pavel Klinkovsky
  2009-08-14 18:25     ` [9fans] Lua on Plan9 Roman V. Shaposhnik
  2009-08-14 23:26   ` [9fans] Using proportional fonts in Acme for Programming Noah Evans
  2009-08-17  9:09   ` Aaron W. Hsu
  4 siblings, 1 reply; 31+ messages in thread
From: Pavel Klinkovsky @ 2009-08-14  9:16 UTC (permalink / raw)
  To: 9fans

> Speaking of which (or may be not ;-)) is there anybody using Lua
> on Plan9?
I am "playing" with Lua on my Plan9 computer...

BTW I have found a difference between Linux and Plan9 version:
- Linux version can handle "dividing by 0" without crash of Lua
interpretter,
- Plan9 version cannot. ;-)

Pavel



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-14  9:15 ` Aaron W. Hsu
@ 2009-08-14 16:49   ` Daniel Lyons
  2009-08-14 18:28     ` Roman V. Shaposhnik
  2009-08-17  9:09   ` Aaron W. Hsu
  1 sibling, 1 reply; 31+ messages in thread
From: Daniel Lyons @ 2009-08-14 16:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On Aug 14, 2009, at 3:15 AM, Aaron W. Hsu wrote:

> On Thu, 13 Aug 2009 13:58:39 -0400, Daniel Lyons <fusion@storytotell.org 
> > wrote:
>
>> I'd love it if Acme or Plan 9 had good support for some kind of  
>> Lisp variant.
>
> Maybe that should be my next side project.


If that's something you're thinking about doing, let me suggest you  
take a look at Clojure. The Java aspect aside, it is a good compromise  
in design between Scheme and Lisp and introduces lots of good ideas.  
This is something I would want to do but I have a long way to go with  
Plan 9 before I think I could be serious about it.

—
Daniel Lyons




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

* [9fans] Lua on Plan9
  2009-08-14  9:16   ` Pavel Klinkovsky
@ 2009-08-14 18:25     ` Roman V. Shaposhnik
  2009-08-14 21:48       ` Skip Tavakkolian
  0 siblings, 1 reply; 31+ messages in thread
From: Roman V. Shaposhnik @ 2009-08-14 18:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, 2009-08-14 at 09:16 +0000, Pavel Klinkovsky wrote:
> > Speaking of which (or may be not ;-)) is there anybody using Lua
> > on Plan9?
> I am "playing" with Lua on my Plan9 computer...

What do you use it for? Any kind of fun projects? My idea is to try
and see whether Plan9+Lua would be a more useful combination for
building Web service environment than werc.

Thanks,
Roman.




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

* [9fans] Lua on Plan9
  2009-08-14  8:27     ` Robert Raschke
@ 2009-08-14 18:27       ` Roman V. Shaposhnik
  2009-08-14 21:47         ` John Floren
  2009-08-17 10:34         ` Robert Raschke
  0 siblings, 2 replies; 31+ messages in thread
From: Roman V. Shaposhnik @ 2009-08-14 18:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, 2009-08-14 at 09:27 +0100, Robert Raschke wrote:

> Last time I tried, the standard Lua compiled out of the box under the
> APE.

That is good to know. Still, I'd rather see it run without APE.

> Great little language. I use it in my day job (together with Erlang).

*together* with Erlang?!?! That I have to know more about. Perhaps
off-list.

>  It's implementation is indeed just as enlightening as the Plan 9
> code. An exercise in doing exactly what is required and no more. Very
> elegant in my eyes.

Couldn't agree more!

Thanks,
Roman.




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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-14 16:49   ` Daniel Lyons
@ 2009-08-14 18:28     ` Roman V. Shaposhnik
  2009-08-16  7:30       ` Daniel Lyons
  0 siblings, 1 reply; 31+ messages in thread
From: Roman V. Shaposhnik @ 2009-08-14 18:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, 2009-08-14 at 10:49 -0600, Daniel Lyons wrote:
> On Aug 14, 2009, at 3:15 AM, Aaron W. Hsu wrote:
>
> > On Thu, 13 Aug 2009 13:58:39 -0400, Daniel Lyons <fusion@storytotell.org
> > > wrote:
> >
> >> I'd love it if Acme or Plan 9 had good support for some kind of
> >> Lisp variant.
> >
> > Maybe that should be my next side project.
>
>
> If that's something you're thinking about doing, let me suggest you
> take a look at Clojure. The Java aspect aside, it is a good compromise
> in design between Scheme and Lisp and introduces lots of good ideas.
> This is something I would want to do but I have a long way to go with
> Plan 9 before I think I could be serious about it.

I looked at it for a while and came with a realization that it could
be just a tad heavier than what I need for most of the stuff I do. Plus
I'm not sure how to port it to Plan9 without first porting the JVM.

Thanks,
Roman.




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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-14  2:58   ` Roman V. Shaposhnik
  2009-08-14  8:27     ` Robert Raschke
@ 2009-08-14 21:32     ` Skip Tavakkolian
  1 sibling, 0 replies; 31+ messages in thread
From: Skip Tavakkolian @ 2009-08-14 21:32 UTC (permalink / raw)
  To: 9fans

> Speaking of which (or may be not ;-)) is there anybody using Lua
> on Plan9?
> Roman.

Kenji has written a webdav server for pegasus (Kenji's httpd branch)
using lua.




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

* Re: [9fans] Lua on Plan9
  2009-08-14 18:27       ` [9fans] Lua on Plan9 Roman V. Shaposhnik
@ 2009-08-14 21:47         ` John Floren
  2009-08-14 21:52           ` Josh Wood
  2009-08-17 10:34         ` Robert Raschke
  1 sibling, 1 reply; 31+ messages in thread
From: John Floren @ 2009-08-14 21:47 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Aug 14, 2009 at 11:27 AM, Roman V. Shaposhnik<rvs@sun.com> wrote:
> On Fri, 2009-08-14 at 09:27 +0100, Robert Raschke wrote:
>
>> Last time I tried, the standard Lua compiled out of the box under the
>> APE.

Just fetched the tarball for lua-5.1.4, changed the CC=gcc to CC=cc
and tried "make posix". After lots of complaining about the -O2
option, I see:

/usr/john/lua-5.1.4/src/liolib.c:178[stdin:2686] incompatible types:
"IND STRUCT _1_" and "INT" for op "AS"

I'm going to poke around and look into things, also try compiling with
different targets ("make linux" etc.), but can I get a description of
exactly how you compiled it, Robert?


John
--
"Object-oriented design is the roman numerals of computing" -- Rob Pike



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

* Re: [9fans] Lua on Plan9
  2009-08-14 18:25     ` [9fans] Lua on Plan9 Roman V. Shaposhnik
@ 2009-08-14 21:48       ` Skip Tavakkolian
  0 siblings, 0 replies; 31+ messages in thread
From: Skip Tavakkolian @ 2009-08-14 21:48 UTC (permalink / raw)
  To: 9fans

> What do you use it for? Any kind of fun projects? My idea is to try
> and see whether Plan9+Lua would be a more useful combination for
> building Web service environment than werc.
>
> Thanks,
> Roman.

Kenji has written a webdav server for pegasus (Kenji's httpd branch)
using lua.




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

* Re: [9fans] Lua on Plan9
  2009-08-14 21:47         ` John Floren
@ 2009-08-14 21:52           ` Josh Wood
  2009-08-14 21:54             ` John Floren
  0 siblings, 1 reply; 31+ messages in thread
From: Josh Wood @ 2009-08-14 21:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


> Just fetched the tarball for lua-5.1.4, changed the CC=gcc to CC=cc
> and tried "make posix". After lots of complaining about the -O2
> option, I see:
>
> /usr/john/lua-5.1.4/src/liolib.c:178[stdin:2686] incompatible types:
> "IND STRUCT _1_" and "INT" for op "AS"
>
> I'm going to poke around and look into things, also try compiling with
> different targets ("make linux" etc.), but can I get a description of
> exactly how you compiled it, Robert?

make ansi

-Josh



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

* Re: [9fans] Lua on Plan9
  2009-08-14 21:52           ` Josh Wood
@ 2009-08-14 21:54             ` John Floren
  0 siblings, 0 replies; 31+ messages in thread
From: John Floren @ 2009-08-14 21:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Aug 14, 2009 at 2:52 PM, Josh Wood<josh@utopian.net> wrote:
>
>> Just fetched the tarball for lua-5.1.4, changed the CC=gcc to CC=cc
>> and tried "make posix". After lots of complaining about the -O2
>> option, I see:
>>
>> /usr/john/lua-5.1.4/src/liolib.c:178[stdin:2686] incompatible types:
>> "IND STRUCT _1_" and "INT" for op "AS"
>>
>> I'm going to poke around and look into things, also try compiling with
>> different targets ("make linux" etc.), but can I get a description of
>> exactly how you compiled it, Robert?
>
> make ansi
>
> -Josh
>

Yeah, I'm kinda dumb... I tried make generic and make ansi without
doing a make clean (after trying a make posix) so I had some old crap
lying around.

Thanks


John
--
"Object-oriented design is the roman numerals of computing" -- Rob Pike



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13 17:55 ` Daniel Lyons
                     ` (2 preceding siblings ...)
  2009-08-14  9:16   ` Pavel Klinkovsky
@ 2009-08-14 23:26   ` Noah Evans
  2009-08-15  2:28     ` Akshat Kumar
  2009-08-17  9:09   ` Aaron W. Hsu
  4 siblings, 1 reply; 31+ messages in thread
From: Noah Evans @ 2009-08-14 23:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

For Lisp variants ask Alex Shinn(alexshinn@gmail.com), he's got an
interesting scheme implementation mostly working. It's a summer of
code project this year.

On Thu, Aug 13, 2009 at 7:55 PM, Daniel Lyons<fusion@storytotell.org> wrote:
>
> On Aug 13, 2009, at 3:14 AM, Aaron W. Hsu wrote:
>
>> So, I was browsing around the other day looking at Acme resources, and I
>> discovered an old post from 1995 wherein someone advocated the use of
>> proportional fonts for programming in Acme. This surprised me, to say the
>> least. He even went as far as to mention that SML was the language they were
>> using, and had managed to get a decent indenting pattern for it that was
>> just as readable, without messing things up for proportional font users.
>>
>> I have to admit that I'm a bit skeptical about whether such a technique
>> actually works, and so, I thought I would pose some questions to you.
>
> Bjarne Stroustrup actually advocates this style in "The C++ Programming
> Language."
>
> This discussion reminds me of this elastic tab stops concept:
>
>  http://nickgravgaard.com/elastictabstops/
>
> I don't think it made it into any editors, but it would support the kind of
> fancy alignment I like to have in my code while also supporting real fonts,
> which I would prefer to use.
>
>> Thirdly, would you continue using proportional width fonts in cases like
>> Lisp code, where you very often see something like the following indentation
>> scheme, and how would you resolve these indentation problems with
>> proportional width fonts if you did continue to use them?
>>
>>        (let ([foo bar]
>>              [something else])
>>          (some-func (called again)
>>                    (with fun indentation)
>>           (and yet)
>>           (another)))
>
>
> I bet you could set up Emacs to use a proportional font. It can do anything,
> right? :)
>
> I'd love it if Acme or Plan 9 had good support for some kind of Lisp
> variant.
>
> —
> Daniel Lyons
>
>
>



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-14 23:26   ` [9fans] Using proportional fonts in Acme for Programming Noah Evans
@ 2009-08-15  2:28     ` Akshat Kumar
  2009-08-15 10:29       ` Akshat Kumar
  2009-08-17  9:09       ` Aaron W. Hsu
  0 siblings, 2 replies; 31+ messages in thread
From: Akshat Kumar @ 2009-08-15  2:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> For Lisp variants ask Alex Shinn(alexshinn@gmail.com), he's got an
> interesting scheme implementation mostly working. It's a summer of
> code project this year.

See also my post: http://ninetimes.cat-v.org/news/2009/07/19/0/
and the included link to setting it up on Plan 9.


Best,
ak



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-15  2:28     ` Akshat Kumar
@ 2009-08-15 10:29       ` Akshat Kumar
  2009-08-17  9:09       ` Aaron W. Hsu
  1 sibling, 0 replies; 31+ messages in thread
From: Akshat Kumar @ 2009-08-15 10:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Speaking of fonts in Acme, using the default,
I spent extra amount of time tracking down
a bug in my gs(1) source, which was the mix-up
between -lijs and -Iijs. Apparently 'I' is shorter
than 'l' by some portion of a pixel.


how could I possibly miss that
ak

P.S.: This isn't Acme's fault - it's the same trouble
in the font I'm using to type this message - in
GMail in Firefox.



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-14 18:28     ` Roman V. Shaposhnik
@ 2009-08-16  7:30       ` Daniel Lyons
  0 siblings, 0 replies; 31+ messages in thread
From: Daniel Lyons @ 2009-08-16  7:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On Aug 14, 2009, at 12:28 PM, "Roman V. Shaposhnik" <rvs@sun.com> wrote:
> I looked at it for a while and came with a realization that it could
> be just a tad heavier than what I need for most of the stuff I do.
> Plus
> I'm not sure how to port it to Plan9 without first porting the JVM.

I actually meant to create a new Plan 9-specific Lisp variant, perhaps
stealing some of Clojure's new ideas. Especially with respect to
parallelism, the standard library and a few other things. I like that
I can call into Java libs from Clojure but that's not the most
interesting thing about it to me.

Another thing which would be cool would be something like scsh.

--
Daniel Lyons




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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-14  9:15 ` Aaron W. Hsu
  2009-08-14 16:49   ` Daniel Lyons
@ 2009-08-17  9:09   ` Aaron W. Hsu
  1 sibling, 0 replies; 31+ messages in thread
From: Aaron W. Hsu @ 2009-08-17  9:09 UTC (permalink / raw)
  To: 9fans

On Fri, 14 Aug 2009 12:56:18 -0400, Daniel Lyons <fusion@storytotell.org>
wrote:

> If that's something you're thinking about doing, let me suggest you take
> a look at Clojure. The Java aspect aside, it is a good compromise in
> design between Scheme and Lisp and introduces lots of good ideas. This
> is something I would want to do but I have a long way to go with Plan 9
> before I think I could be serious about it.

Sorry, I'm a Scheme programmer, and Clojure does not appeal to me in
enough aspects (very few, actually) to make me even learn how to use it.
Rather, I think a very small number of simple conveniences would suffice
to make Scheme programming very convenient with Acme. Already, most of the
necessary features are there, and I am using Acme pleasantly right now in
my daily Scheme work.

	Aaron W. Hsu

--
Of all tyrannies, a tyranny sincerely exercised for the good of its
victims may be the most oppressive. -- C. S. Lewis



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-13 17:55 ` Daniel Lyons
                     ` (3 preceding siblings ...)
  2009-08-14 23:26   ` [9fans] Using proportional fonts in Acme for Programming Noah Evans
@ 2009-08-17  9:09   ` Aaron W. Hsu
  4 siblings, 0 replies; 31+ messages in thread
From: Aaron W. Hsu @ 2009-08-17  9:09 UTC (permalink / raw)
  To: 9fans

On Fri, 14 Aug 2009 19:31:08 -0400, Noah Evans <noah.evans@gmail.com>
wrote:

> For Lisp variants ask Alex Shinn(alexshinn@gmail.com), he's got an
> interesting scheme implementation mostly working. It's a summer of
> code project this year.

Indeed, there are a number of fairly portable Scheme implementations that
I could see working with Plan 9.

	Aaron W. Hsu

--
Of all tyrannies, a tyranny sincerely exercised for the good of its
victims may be the most oppressive. -- C. S. Lewis



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

* Re: [9fans] Using proportional fonts in Acme for Programming
  2009-08-15  2:28     ` Akshat Kumar
  2009-08-15 10:29       ` Akshat Kumar
@ 2009-08-17  9:09       ` Aaron W. Hsu
  1 sibling, 0 replies; 31+ messages in thread
From: Aaron W. Hsu @ 2009-08-17  9:09 UTC (permalink / raw)
  To: 9fans

On Sat, 15 Aug 2009 06:34:03 -0400, Akshat Kumar
<akumar@mail.nanosouffle.net> wrote:

> Speaking of fonts in Acme, using the default,
> I spent extra amount of time tracking down
> a bug in my gs(1) source, which was the mix-up
> between -lijs and -Iijs. Apparently 'I' is shorter
> than 'l' by some portion of a pixel.

I use Times in Acme. That distinguishes things pretty well.

	Aaron W. Hsu

--
Of all tyrannies, a tyranny sincerely exercised for the good of its
victims may be the most oppressive. -- C. S. Lewis



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

* Re: [9fans] Lua on Plan9
  2009-08-14 18:27       ` [9fans] Lua on Plan9 Roman V. Shaposhnik
  2009-08-14 21:47         ` John Floren
@ 2009-08-17 10:34         ` Robert Raschke
  1 sibling, 0 replies; 31+ messages in thread
From: Robert Raschke @ 2009-08-17 10:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Fri, Aug 14, 2009 at 7:27 PM, Roman V. Shaposhnik <rvs@sun.com> wrote:

> On Fri, 2009-08-14 at 09:27 +0100, Robert Raschke wrote:
>
> > Last time I tried, the standard Lua compiled out of the box under the
> > APE.
>
> That is good to know. Still, I'd rather see it run without APE.
>
> > Great little language. I use it in my day job (together with Erlang).
>
> *together* with Erlang?!?! That I have to know more about. Perhaps
> off-list.
>
> >  It's implementation is indeed just as enlightening as the Plan 9
> > code. An exercise in doing exactly what is required and no more. Very
> > elegant in my eyes.
>
> Couldn't agree more!
>
> Thanks,
> Roman.
>
>
>

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

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

end of thread, other threads:[~2009-08-17 10:34 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-13  9:14 [9fans] Using proportional fonts in Acme for Programming Aaron W. Hsu
2009-08-13 10:09 ` matt
2009-08-13 10:18 ` Paul Donnelly
2009-08-13 10:22 ` roger peppe
2009-08-13 10:27 ` Robert Raschke
2009-08-13 11:12 ` Ethan Grammatikidis
2009-08-13 17:55 ` Daniel Lyons
2009-08-13 22:27   ` David Leimbach
2009-08-13 22:35     ` ron minnich
2009-08-13 22:40       ` erik quanstrom
2009-08-14  2:58   ` Roman V. Shaposhnik
2009-08-14  8:27     ` Robert Raschke
2009-08-14 18:27       ` [9fans] Lua on Plan9 Roman V. Shaposhnik
2009-08-14 21:47         ` John Floren
2009-08-14 21:52           ` Josh Wood
2009-08-14 21:54             ` John Floren
2009-08-17 10:34         ` Robert Raschke
2009-08-14 21:32     ` [9fans] Using proportional fonts in Acme for Programming Skip Tavakkolian
2009-08-14  9:16   ` Pavel Klinkovsky
2009-08-14 18:25     ` [9fans] Lua on Plan9 Roman V. Shaposhnik
2009-08-14 21:48       ` Skip Tavakkolian
2009-08-14 23:26   ` [9fans] Using proportional fonts in Acme for Programming Noah Evans
2009-08-15  2:28     ` Akshat Kumar
2009-08-15 10:29       ` Akshat Kumar
2009-08-17  9:09       ` Aaron W. Hsu
2009-08-17  9:09   ` Aaron W. Hsu
2009-08-14  9:15 ` Aaron W. Hsu
2009-08-14 16:49   ` Daniel Lyons
2009-08-14 18:28     ` Roman V. Shaposhnik
2009-08-16  7:30       ` Daniel Lyons
2009-08-17  9:09   ` Aaron W. Hsu

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).