LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Python and Lisp (https://www.linuxquestions.org/questions/slackware-14/python-and-lisp-4175424016/)

Richard Cranium 08-28-2012 12:16 AM

Quote:

Originally Posted by abrinister (Post 4764938)
And +1 on Perl. Except you can run a one-liner. You have to use 'perl -e'.

Fair enough about the one-liner. I really meant to say that you can't get an interactive environment, which 'perl -e' doesn't give you. (I see that ruby went down the same path of stupidity as perl in this specific case.)

If you want to accuse me of moving the goal posts, that's fine.

In python, you can bring up an interactive session by merely typing "python" and enter lines of code to test whatever it is you are attempting to do. As it so happens, clisp also brings up an interactive session by merely typing "clisp". And guile gives you one by typing "guile". Hell, even basic did that back in the stone age of 8 bit machines and 4K RAM.

"Interpreted" without "interactive" is pretty weak tea, in my book. YMMV. Given the popularity of perl and ruby, the mileage must vary a lot.

dugan 08-28-2012 01:04 AM

Quote:

Originally Posted by richard cranium (Post 4766100)
c++ is a dialect of c.

I think you're using a personally unique definition of "dialect". I would not describe C++ as "a dialect of" C.

/me reminds self that this is a "which programming language is best" discussion and to keep things in perspective

Mercury305 08-28-2012 08:29 AM

Quote:

Originally Posted by dugan (Post 4766137)
I think you're using a personally unique definition of "dialect". I would not describe C++ as "a dialect of" C.

/me reminds self that this is a "which programming language is best" discussion and to keep things in perspective

Its quite acceptible coming from someone with the logic that Scheme and Lisp are 2 seperate languages... yet C++ is a Dialect of C....

But hey we should not judge him. He has programmed in both languages right.
He probably knows how to print "hello world!" in the screen as well...

abrinister 08-28-2012 09:27 AM

Quote:

In python, you can bring up an interactive session by merely typing "python" and enter lines of code to test whatever it is you are attempting to do.
I see what you mean now. I do like that about Python. Perl does have it's weaknesses. Then again, it hasn't seen much developement since the 90's.

Alex Brinister

Mercury305 08-28-2012 09:29 AM

Quote:

Originally Posted by abrinister (Post 4766468)
I see what you mean now. I do like that about Python. Perl does have it's weaknesses. Then again, it hasn't seen much developement since the 90's.

Alex Brinister

Perl 6? Please lets avoid making comments like this.
I think perl is still pretty useful especially for admins.

abrinister 08-28-2012 09:37 AM

True. But Perl 5 has been around for quite a while, which was my point.

I realize it's useful, especially for pattern matching. I just don't prefer it because you can do the same thing with AWK and sed and since I don't use Windows, I don't worry about cross-platformness.

Alex Brinister

Mercury305 08-28-2012 09:41 AM

Quote:

Originally Posted by abrinister (Post 4766477)
True. But Perl 5 has been around for quite a while, which was my point.

I realize it's useful, especially for pattern matching. I just don't prefer it because you can do the same thing with AWK and sed and since I don't use Windows, I don't worry about cross-platformness.

Alex Brinister

I was actually thinking of using perl but didnt like its syntax... but i do understand those that use it. it can be useful.

T3slider 08-28-2012 12:17 PM

Quote:

Originally Posted by abrinister (Post 4766477)
I realize it's useful, especially for pattern matching. I just don't prefer it because you can do the same thing with AWK and sed and since I don't use Windows, I don't worry about cross-platformness.

sed has a tough time with greediness in pattern matching and both sed and awk make multiline pattern matching very difficult. Perl definitely has a leg up here. I prefer perl's syntax but there is no arguing with Python's capabilities.

PrinceCruise 08-30-2012 08:37 AM

Not to hijack this thread; but don't want to create another related thread.
- After reading a lot about LISP history(and derivatives), I stumbled upon this- http://www.gigamonkeys.com/book/, so I planned to include Clisp or SBCL in my to-learn list. However, could anybody please suggest me another way to start rather than Emacs plus slime(?), as I never ever touched Emacs before and tried miserably last night to the end of the frustration. May be I'm more of the plain old vi guy.

- Tried installing sbcl from slackbuils but when I run sbcl in terminal it throws an error saying something like -
Quote:

can't find core file at /user/local/lib/sbcl//sbcl.core
I was tired till the end so didn't tried searching on web, but if anybody knows what's the next step is or another useful suggestion, please let me know.

Regards.

sycamorex 08-30-2012 08:56 AM

I'm not an experienced Lisper but I've gone through what you're going through now. I ended up with Emacs + slime. There's also LispWorks IDE but a free/personal editions has some limitations: http://www.lispworks.com/downloads/index.html

From time to time I check this blog to find out about the progress of Light Table, which is a very promising IDE for Lisp (Clojure) still in very early stages.

In terms of resources I also like "Land of Lisp" (released last year) http://landoflisp.com/

Some time ago I started reading LOL - Let Over Lambda (http://letoverlambda.com/), a book about Lisp (but it's too difficult for me at this moment) where the author actually recommends Vim for Lisp development claiming that he doesn't have time to mess with setting up Emacs.

Why don't you stay with clisp which comes with stock Slackware?

PrinceCruise 08-30-2012 09:38 AM

Thanks for taking time in responding, some good resource those are.

Quote:

Originally Posted by sycamorex (Post 4768296)
Why don't you stay with clisp which comes with stock Slackware?

Yes, I planned to stick with clisp at the moment for the sake of not wasting much of my productive time, but thinking of having some kind of IDE for it to ease of the pain in starting. Just came across cusp-http://www.bitfauna.com/projects/cusp/, which can be used with Eclipse. And at the moment I have eclipse installed so I'll try going this route later tonight and see if it gives me some kind of working environment.
Any other suggestions are pretty much welcome.

Regards.

EDIT1 : I missed the part that cusp uses SBCL which I can't seem to run at the moment. So I'd be needing more suggestions now.

Update : Found dandelion for eclipse, which works with clisp.
http://sourceforge.net/projects/dandelion-ecl/

Regards.

lolnameless 09-01-2012 08:22 AM

Quote:

Originally Posted by PrinceCruise (Post 4768283)
Not to hijack this thread; but don't want to create another related thread.
- After reading a lot about LISP history(and derivatives), I stumbled upon this- http://www.gigamonkeys.com/book/, so I planned to include Clisp or SBCL in my to-learn list. However, could anybody please suggest me another way to start rather than Emacs plus slime(?), as I never ever touched Emacs before and tried miserably last night to the end of the frustration. May be I'm more of the plain old vi guy.

- Tried installing sbcl from slackbuils but when I run sbcl in terminal it throws an error saying something like -


I was tired till the end so didn't tried searching on web, but if anybody knows what's the next step is or another useful suggestion, please let me know.

Regards.

but you should use emacs my friend :) you may hate it because it's slow,or old, not only it's an IDE, but it's an operating system by itself and you will find 99% desktop linux things are useless

Come to think of that, there's a reason why you rarely find complete support of lisp outside emacs

EDIT: there's a viper mode or elvis mode, you will feel comfort with, even plain emacs user uses it for the sake of speed

PrinceCruise 09-01-2012 09:41 AM

Quote:

Originally Posted by lolnameless (Post 4769880)
EDIT: there's a viper mode or elvis mode, you will feel comfort with, even plain emacs user uses it for the sake of speed

I sure will give Emacs a honest try sometimes soon. Thanks for the suggestion on the viper mode, pal.

Regards.

Mercury305 09-02-2012 08:47 AM

Lisp is pretty much like Slackware. Its the oldest comonly used Lang today after Fortran and with very strong roots. It should be a language of choice for Slackware users. It is not a language for getting a job as I rarely come across any Lisp jobs in my searches but it is a great language to understand computer science. Same with Slackware, you won't find any job postings looking for a "Slackware Admin" however... It is a great distro to learn and use.

PrinceCruise 09-02-2012 09:07 AM

Quote:

Originally Posted by Mercury305 (Post 4770598)
It is not a language for getting a job as I rarely come across any Lisp jobs in my searches but it is a great language to understand computer science.

I think the only LISP jobs are for 'clojure' clojure.org, that I have seen so far at least in here and some openings for the Scientific institutes.

Quote:

Originally Posted by Mercury305 (Post 4770598)
Same with Slackware, you won't find any job postings looking for a "Slackware Admin" however.

That IMHO applies to Debian, Ubuntu, Gentoo and all others big names also. (At least in here)

Regards.


All times are GMT -5. The time now is 09:57 PM.