Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Problems with LISP

Name: Anonymous 2010-03-28 6:56

I decided to learn Lisp and after some hours in Google, I ran into some problems:

1. I'd like to use Common Lisp, not Scheme.
2. GIMP uses a Scheme-like dialect, fuck.
3. It seems that the Emacs keys are better for Lisp, but Emacs uses a bastard Lisp dialect.
4. Vim has Common Lisp but lacks SLIME IDE.

What should I do? If possible I'd like to learn only one Lisp dialect.

Name: YHBT 2010-03-28 7:19

Install SBCL and put this in your .emacs file:
(setq inferior-lisp-program "/usr/local/bin/sbcl --noinform")

Name: Anonymous 2010-03-28 7:42

nano IS [overline]ENTERPRISE QUALITY[/overline]

Name: Anonymous 2010-03-28 8:06

>Emacs keys are better for
No. Not at all. Well I guess they're okay for most things, but for navigating around and doing quick edits they are really crappy and awkward. Most sane people would recommend you to use viper mode which emulates vi inside Emacs.
Other than that Emacs is a great editor and it's Lisp is much closer to Common Lisp than Scheme. Not that you have to use it besides some tweaks in your .emacs file.

As for vim, well there are some CL environments like Limp. However, while better than nothing, they're quite poor compared to SLIME.

Name: Anonymous 2010-03-28 8:30

>>4
( ≖‿≖)

Name: Anonymous 2010-03-28 8:34

Is there anything like SLIME, but for Scheme?

Name: Anonymous 2010-03-28 8:59

>>6
There have been a few attempts (in true scheme fashion), but I don't think there is anything as complete (again, in true scheme fashion).
You can have a look here http://alexott.net/en/writings/emacs-devenv/EmacsScheme.html or here http://programming-musings.org/2009/05/14/geiser/

Name: Anonymous 2010-03-28 9:16

Don't be a faggot and learn multiple languages - it's a fact of life.

Name: Anonymous 2010-03-28 9:21

>>8
I agree, but I think its more that he is trying to avoid learning multiple languages at the same time.

Name: Anonymous 2010-03-28 10:07

Name: Anonymous 2010-03-28 11:17

>>1

I decided to learn Lisp and after some hours in Google, I ran into some problems:

1. I'd like to use Common Lisp, not Scheme.
That's fine, but it depends on your experience. CL is a harder language to learn than Scheme as it includes a large variety of concepts (but it does not have full-blown continuations(can be added as a user library which does CPS on your code) or hygenic macros (can be done as a user library, but no CLer wants this as we prefer real macros). There is no harm in reading SICP(and thus learning Scheme in the process) before learning CL, but you could do without learning Scheme first. In general, learning Scheme takes a lot less time than learning CL, and you can learn it before or after if you wish.

2. GIMP uses a Scheme-like dialect, fuck.
So?
3. It seems that the Emacs keys are better for Lisp, but Emacs uses a bastard Lisp dialect.
Emacs+SLIME+Paredit+Redshank are excellent for editing CL code. I wouldn't have it any other way (although, I wish there was something like Zmacs being actively developed and competitive with SLIME, but I can dream...)
4. Vim has Common Lisp but lacks SLIME IDE.
You're going to make your life harder if you choose Vim to edit CL code. SLIME offers rather deep integration with the lisp implementation, you have your REPL, inspector, compilation/package/asdf management, ... Paredit offers you structured editing (no longer typing parens, but editing S-Exps directly). Redshank saves some typing by providing common editing idioms.
Try watching http://common-lisp.net/project/movies/movies/slime.mov and the screencast at http://www.foldr.org/~michaelw/emacs/redshank/ to get an idea of what they offer.

What should I do? If possible I'd like to learn only one Lisp dialect.
My road was like this:
I've read half of SICP, but due to other things coming up, I never ended up finishing it that day. This was enough to get me familiar with Scheme.
After some time, I've learned CL by reading ANSI CL/Practical Common Lisp/On Lisp/PAIP/AMOP (some partially, as certain material overlaps). I think having Emacs/SLIME/Paredit setup early in my learning phase helped keep my interest up and accelerated my learning.
I've then read R5RS in a few hours and finished SICP with no trouble. Learning secondary Lisp dialects is usually very easy if you know CL, but you should first complete learning one before trying to learn another.

Name: Anonymous 2010-03-28 11:25

CL is a harder language to learn than Scheme as it includes a large variety of concepts
There are some who would argue that having to learn a few difficult concepts is more difficult than learning more easy concepts. Compare continuations vs. break,continue,return,exceptions,generators,coroutines.

hygenic macros (can be done as a user library, but no CLer wants this as we prefer real macros).
Like fuck you don't, you just do it with gensym and packages rather than giving in and using a proper hygienic macro system.

Name: Anonymous 2010-03-28 11:45

>>11
I've read half of SICP, but due to other things coming up, I never ended up finishing it that day

You read half of SICP in a day?

Name: Anonymous 2010-03-28 11:48

>>12
There are some who would argue that having to learn a few difficult concepts is more difficult than learning more easy concepts. Compare continuations vs. break,continue,return,exceptions,generators,coroutines.
I've learned continuations separately and didn't have any problem with learning them. http://www.iro.umontreal.ca/~boucherd/mslug/meetings/20041020/minutes-en.html was most helpful here.
Like fuck you don't, you just do it with gensym and packages rather than giving in and using a proper hygienic macro system.
Gensyms, packages, symbol macros, separate function/variable namespace can be used to obtain de-facto hygiene, but that doesn't mean that the macro system is hygienic. Since in practice we can obtain hygiene by using them correctly, we don't really need a full-blown hygienic macro system, and the proof of that is that most CLers out there never seem to complain about this, nor did they make a library which offered something like Scheme's hygienic macro system, even though P. Constaza proved that it's possible to implement such a system in plain CL.

Name: Anonymous 2010-03-28 11:52

>>13
I like reading my books in larger chunks when possible, usually without too many breaks.

Name: Anonymous 2010-03-28 12:08

>>14
My claim wasn't that the CLs macros were hygienic, but CLers do care about hygiene and regularly use mechanisms to obtain hygiene. Your suggestion that a hygienic macro isn't a real macro is at best misguided.

Name: Anonymous 2010-03-28 12:10

>>15
Did you skip any exercises?

Name: Anonymous 2010-03-28 12:12

>>16
Of course we care about hygiene, I should have said ``full-blown hygenic macro systems'' instead of ``hygenic macros''.
Your suggestion that a hygienic macro isn't a real macro is at best misguided.
My definition of real macros is one that takes in any form, processing it using regular code and returning a new form for the compiler to either macroexpand further or compile it if possible. Maybe my definition is a bit restrictive, in which case I apologize. I'm not claiming you can't do the same things with Scheme's macro system.

Name: Anonymous 2010-03-28 12:14

>>17
I solved a lot of them, but I might have skipped a few. It has been quite some time ago, so I don't remember if I solved all the exercises, in fact maybe I should re-read my SICP sometime soon.

Name: Anonymous 2010-03-28 12:28

>>18
I knew exactly what your definition was, as I'm sure we've had this discussion before. What you were doing was conflating the macro system with the macro it produces. syntax-rules is a referentially transparent and hygienic system that cannot produce an unhygienic macro, but defmacro is an unhygienic macro system that can produce hygienic macros. Hygiene is a property of the macro itself. If you want to claim that the only ``real''macro system is one that takes an sexp and returns a new sexp and allows arbitrary code to act on it, fine, but complain about referentially transparent macro systems rather than hygienic macros.

Name: obvious joke guy 2010-03-28 12:59

>>18
What? No /prog/rammers care about hygiene.
>>17
Or exercise, for that matter.

Name: Anonymous 2010-03-28 17:12

It seems that I won't escape from learning all three. I feel like learning the so called "German" here. Anyway, I'll learn Scheme first, then Emacs Lisp, and at last Common Lisp.
Thanks for the valuable input, specially >>11 for the book recommendations.

Name: Haxus the Prussian 2010-03-28 17:26

Haxus the Prussian

Name: Anonymous 2010-03-28 17:29

>>22
Why do you need to learn Emacs Lisp second? I've been coding in CL and sometimes Scheme for a while and I haven't had to use much elisp (besides setting up my .emacs and configuring SLIME/...). Elisp is rather weird antiquated dialect in the sense that it doesn't have lexical scope, but I guess it won't hurt learning...

Name: Anonymous 2010-03-28 17:35

So, can Emacs be extended with CL or Scheme?
And, German is the BASIC of languages.

Name: Anonymous 2010-03-28 17:39

>>25
It has a CL compatibility mode, but it's far from complete CL...

Name: Anonymous 2010-03-28 17:57

>>24
exactly. I don't "know" elisp either, but if you know a lisp it isn't hard to make do with the help in emacs.

Name: Anonymous 2010-12-17 1:27

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Don't change these.
Name: Email:
Entire Thread Thread List