I know emacs indents everything nicely but suppose we did the following: #1. Continue using parentheses to open #2. Use ] to close remaining open parentheses up to cursor on current line #3. Use } to close remaining open parentheses up to current line in file
Alternatively, we could: #4. Use ] to close remaining open parentheses for just the current argument to a function #5. Use } for #4 but up to the current line
Rares Marian wrote: > What if we solved the readability problem?
> I know emacs indents everything nicely but suppose we did the following: > #1. Continue using parentheses to open > #2. Use ] to close remaining open parentheses up to cursor on current line > #3. Use } to close remaining open parentheses up to current line in file
> Alternatively, we could: > #4. Use ] to close remaining open parentheses for just the current > argument to a function > #5. Use } for #4 but up to the current line
On Mon, 26 May 2008 07:59:52 +0200, Lars Rune Nøstdal wrote: > Rares Marian wrote: >> What if we solved the readability problem?
> No thanks. It's staying exactly the way it is. Go away.
I think I'll stick around. I love lisp. It just makes my eyes bleed with the parens.
What I find funny though is that most programming languages are prefix not infix. The only non-prefix aspect is assignment and mathematical operations.
On May 26, 1:43 am, Dihydrogen Monoxide <rares.mar...@gmail.com> wrote:
> I love lisp. It just makes my eyes bleed with the parens.
I use a macro called LETT: (lett x (get-x) ...), which eliminates two pairs of parens in binding a single variable, as in (let ((x (get-x))) ...), or 14 letters when binding a list of variables, as in destructuring-bind.
Even better than trimming parens is wrapping entire chunks of your program in macros. A couple parens here and there can be helpful in parsing the code. I have a few things documented here: http://www.prairienet.org/~dsb/myclcode.htm
On May 26, 1:43 am, Dihydrogen Monoxide <rares.mar...@gmail.com> wrote:
> I love lisp. It just makes my eyes bleed with the parens.
I use a macro called LETT: (lett x (get-x) ...), which eliminates two pairs of parens in binding a single variable, as in (let ((x (get-x))) ...), or 14 letters when binding a list of variables, as in destructuring-bind.
Even better than trimming parens is wrapping entire chunks of your program in macros. A couple parens here and there can be helpful in parsing the code. I have a few things documented here: http://www.prairienet.org/~dsb/myclcode.htm
On Mon, 26 May 2008 06:43:05 +0000, Dihydrogen Monoxide wrote: > I think I'll stick around. I love lisp. It just makes my eyes bleed with > the parens.
Not really. You're just not used to absence of the dust of commas and semicolons. You'll get used to the cleanliness eventually.
Rares Marian <rares.mar...@gmail.com> writes: > What if we solved the readability problem?
> I know emacs indents everything nicely but suppose we did the following: > #1. Continue using parentheses to open > #2. Use ] to close remaining open parentheses up to cursor on current line > #3. Use } to close remaining open parentheses up to current line in file
> Alternatively, we could: > #4. Use ] to close remaining open parentheses for just the current > argument to a function > #5. Use } for #4 but up to the current line
On Mon, 26 May 2008 16:17:09 +0200, Pascal J. Bourguignon wrote: > Rares Marian <rares.mar...@gmail.com> writes:
>> What if we solved the readability problem?
>> I know emacs indents everything nicely but suppose we did the >> following: #1. Continue using parentheses to open #2. Use ] to close >> remaining open parentheses up to cursor on current line #3. Use } to >> close remaining open parentheses up to current line in file
>> Alternatively, we could: >> #4. Use ] to close remaining open parentheses for just the current >> argument to a function >> #5. Use } for #4 but up to the current line
I know emacs indents everything nicely but suppose we did the following: #1. Continue using parentheses to open #2. Use ] to close remaining open parentheses up to cursor on current line #3. Use } to close remaining open parentheses up to current line in file
I believe some old dialects of lisp (pc-lisp maybe?) used ] to close all remaining forms up to top-level. I guess one could get used to that, but it seems like it could be a nuisance when you find that you want to splice something in, as with a new optional argument in some buried expression.
Dihydrogen Monoxide wrote: > On Mon, 26 May 2008 11:57:45 +0000, Andrew Reilly wrote:
>>On Mon, 26 May 2008 06:43:05 +0000, Dihydrogen Monoxide wrote:
>>>I think I'll stick around. I love lisp. It just makes my eyes bleed >>>with the parens.
>>Not really. You're just not used to absence of the dust of commas and >>semicolons. You'll get used to the cleanliness eventually.
> Actually, successive symbols strings like ))))))) give me a headache. I > call it symbol shock. I don't know why.
> I suppose I can live with > ) > ) > )
Listen, I can sympathize. I started programming way back when in Fortran on a mainframe on punch cards. I was really thrown by the little rectangular holes punched in the card. What if they were off a little? What if the angles were not perfectly square? It really gave me a headache, holding the cards up to the light to debug my code...
Dihydrogen Monoxide wrote: > On Mon, 26 May 2008 11:57:45 +0000, Andrew Reilly wrote:
>> On Mon, 26 May 2008 06:43:05 +0000, Dihydrogen Monoxide wrote:
>>> I think I'll stick around. I love lisp. It just makes my eyes bleed >>> with the parens. >> Not really. You're just not used to absence of the dust of commas and >> semicolons. You'll get used to the cleanliness eventually.
> Actually, successive symbols strings like ))))))) give me a headache. I > call it symbol shock. I don't know why.
> I suppose I can live with > ) > ) > )
yeah, and make it "XML-based" while you're at it
you say you "love lisp" but apparently you do not know anything about lisp .. maybe this works in love, but dunno how far it'll get you
.and instantly know that a, b, c belongs in the then-part and d, e, f belongs in the else-part - in all the examles .. your eyes do not look for syntax, only indentation when looking for structure and meaning at this level
On May 26, 2:17 pm, Rares Marian <rares.mar...@gmail.com> wrote:
> I know emacs indents everything nicely but suppose we did the following: > #1. Continue using parentheses to open > #2. Use ] to close remaining open parentheses up to cursor on current line > #3. Use } to close remaining open parentheses up to current line in file
You're using emacs. I'm sure you're capable of finding a script online or writing one yourself.
If it helps, parenface.el will dim your parens with a minimum of fuss.
On May 27, 2:57 am, Lars Rune Nøstdal <larsnost...@gmail.com> wrote:
> you say you "love lisp" but apparently you do not know anything about lisp .. maybe this works in love, but dunno how far it'll get you
I've played with it quite a bit actually.
<snip>
> .and instantly know that a, b, c belongs in the then-part and d, e, f belongs in the else-part >- in all the examles .. your eyes do not look for syntax, only indentation when looking for >structure and meaning at this level
Maybe your eyes. Until recently I couldn't look at anything which contained whitespace. My lines of code were up to 140 chars long and had no blank lines between. I've fixed this problem, how I don't know, I just kept fighting it I guess. Maybe it's the enzymes I've been taking lately.
Large bits of code require me to use 5pt or even 4pt emacs-snapshot for the anti-aliasing.
Yuck. The angle brackets create noise for me. I get a headache looking at that.
> ..then fix it:
> (person > (name lars) > (age 26))
That's ok, I can work with that. Some more complicated code, I can't read it. I start wanting to do a performance of Bill O'Reilly's recently found tape when he was at Inside Edition.
> ..there, your turn; "re-fix it" for us and say you "love lisp"
I love any language that can return functions and never gets bored rereading the same space until its done.