OOPs. I guess it will take time to get used to all those parens. Thanks for all the support.
On Sat, Jan 30, 2010 at 5:51 PM, Ben Goetter goetter@mazama.net wrote:
You have made a typographical error in atom.scm. Count the parentheses in the last line -- to the right of "not" -- carefully.
- Joe
Afficher les réponses par date
On Sat, Jan 30, 2010 at 7:00 PM, joe tex joetex1@gmail.com wrote:
OOPs. I guess it will take time to get used to all those parens. Thanks for all the support.
paredit-mode mode will help you there:
http://www.emacswiki.org/emacs/ParEdit
I would assume most people use paredit-mode... It automatically balances parentheses for you.
- James
On Sat, Jan 30, 2010 at 10:37 PM, James Long longster@gmail.com wrote:
I would assume most people use paredit-mode...
Newbies should just use DrScheme,
paren-balancing is enable by default... don't have to futz around with downloading and installing different modes.
Then again doesn't the built in scheme-mode balance parens?
It automatically balances parentheses for you.
You really have to read the cheat-sheet to appreciate where it helps.
It automatically balances parentheses for you.
You really have to read the cheat-sheet to appreciate where it helps.
Well, who cares about software to balance brackets when, as the initial post shows, there is no openening bracket to match and close?
I do agree with the fact that paredit is great (as are similar modes for other editors) and that its usage should be strictly enforced, but this is not the issue here.
What is important, though, is that the error message was correct and wasn't cryptic :
(atom? 'h)
*** ERROR IN atom?, "atom.scm"@3.10 -- Wrong number of arguments passed to procedure (not '#<procedure #2 pair?> 'h)
It says "you gave two arguments to procedure NOT, one being the procedure PAIR? and the other being the symbol H"
I believe that what this user now needs help regarding the (human) interpretation of error messages of his implementation. On the other hand (and in other situations) I think it's important to mention that noone would/should consider doing Scheme/Lisp without paredit or anything similar. The fact that it isn't common sense explains why "the others" still think that writing lisp code is a pain because "one has to check every parens one per one."
I would actually even like a paredit-like mode to be by default in the readers of REPLs, when run interactively, so that people who just give a try at a lisp think "Hey, I didn't know it was so cool!"
Cheers.
P!
Grant Rettke grettke@acm.org writes:
On Sat, Jan 30, 2010 at 10:37 PM, James Long longster@gmail.com wrote:
I would assume most people use paredit-mode...
Newbies should just use DrScheme,
paren-balancing is enable by default... don't have to futz around with downloading and installing different modes.
Then again doesn't the built in scheme-mode balance parens?
Not like paredit-mode. paredit-mode is more of a structural editor - it guarantees you never have unbalanced parens. So typing ( works like the default M-(, typing ) works like M-) and C-k does a "smart" kill line of sexp's, stopping if it comes to a ) that balances before the cursor, and eating any data on trailing data if the line ends in a sexp that spans multiple lines.
It sounds like a trivial difference, but never having unbalanced parens in the file is very liberating - I'm certainly never going back.