SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This may appear OT in a Slackware forum. However I wanted to post this here to get some ideas from Slackware users. I have been studying a lot of computer science lately at home. Reading and what not in the last few weeks. I really am taking this seriously and quite focused. I seem to talk to very brilliant people on LQ and in this slackware forum so wanted some ideas. I was researching some programming languages and thought of starting out with Python at first but later grew quite attracted to Lisp as well. Anyone in here with experience of these languages and if it would be ok for me to start Lisp first before Python? I love the interaction between Computers and Humans in Lisp and am quite attracted to it. Especially from reading some things from Peter Norvig about it. I also noticed some great libraries for Slackware for Lisp as well. Anyways just wanted some feedback. Thanks
Lisp is a pretty good beginner language. Python is too though. Both are scripting languages so they are much easier than, say, C. I'm going to learn Lisp when I go back to school in September in a Programming class. I've heard great things about it. There's a derivitive of Lisp called Racket. They also provide an IDE for it. There's a slackbuild for it here.
The Python interpreter comes with Slackware. The Python website provides a massive tutorial on the language. Here is Python 2.7 and 3.0.
I think of Python as an interpreted language---I think there's a subtle difference between that and "scripting". To me, the latter implies automating tasks in the native dialect of the shell. BASH, for example, with no real math capability, could hardly qualify as a real programming language. Python, OTOH, has all the bells and whistles.
He's right. Python incorporates many syntactical features from LISP and other functional programming languages (like lambdas), and sometimes there's no better way to get it to perform decently than to use them.
For instance, these are both ways to do the same thing in Python (populate a list from passing the values in another list through a function).
example #1:
Code:
some_list = list()
for v in another_list:
some_list.append(f(v))
example #2:
Code:
some_list = list(f(v) for v in another_list)
If you're like me and you learned C first, example #1 will seem more natural. Example #2 is considered more "pythonically correct", though, and runs a lot faster (about 50% faster on my hardware, using python 2.6.4). Learning LISP first will help make such syntax more intuitive to you.
Speaking as a Python freak, I have to say that once you learn and use Python, all other languages just lose their appeal. If this is your first language, then Python is definitely the way to go. However, LISP is a great language, and learning it will influence the way you think about programming. And it will improve any coding you do (unless you code in COBOL, in which case you're doomed). Look up 'Paul Graham' - he's a smart fellow with lots to say about LISP, Python, and other nice geekie stuff.
According to Peter Norvig Python is a dialect of Lisp and Lisp has many dialects. I am thinking Python may be a better language to learn 1st but quite attracted to Lisp as well.
PS If I wanted to learn a scripting language it would be shell scripting. But Python and Lisp is a whole lot more then that. and yes, it could be used for scripting as well which is very cool.
Last edited by Mercury305; 08-26-2012 at 07:30 AM.
He's right. Python incorporates many syntactical features from LISP and other functional programming languages (like lambdas), and sometimes there's no better way to get it to perform decently than to use them.
For instance, these are both ways to do the same thing in Python (populate a list from passing the values in another list through a function).
example #1:
Code:
some_list = list()
for v in another_list:
some_list.append(f(v))
example #2:
Code:
some_list = list(f(v) for v in another_list)
If you're like me and you learned C first, example #1 will seem more natural. Example #2 is considered more "pythonically correct", though, and runs a lot faster (about 50% faster on my hardware, using python 2.6.4). Learning LISP first will help make such syntax more intuitive to you.
Thanks I will be starting a biweekly course studying the MIT Book: Structure and Interpretations of Computer Programming (SICP)
with slashdot.org contributers. It uses Lisp in that book.
I will be around people that have contributed to Slackware too. I'm pretty excited.
Last edited by Mercury305; 08-26-2012 at 07:27 AM.
Speaking as a Python freak, I have to say that once you learn and use Python, all other languages just lose their appeal. If this is your first language, then Python is definitely the way to go. However, LISP is a great language, and learning it will influence the way you think about programming. And it will improve any coding you do (unless you code in COBOL, in which case you're doomed). Look up 'Paul Graham' - he's a smart fellow with lots to say about LISP, Python, and other nice geekie stuff.
I love Python for it simplicity and elegance. Lack of curly braces and semicolons seem to be strange at first, but once you start coding in Python you won't miss them. In fact, the extra typing required for curly braces and semicolons will irritate you.
Very practical programming language for a wide variety of uses (except low-level systems programming of course).
LISP (along with C, if anyone cares) is my favorite programming language. It makes me sound clever. If you'd like to learn Common Lisp in particular--my favorite dialect--here's a nice book I found most useful as a tutorial.
I don't know whether it matters that much which language is your first. I wish I learned LISP or C or some kind of Assembly first, but instead (iirc) it was MSX BASIC (which is a language AND an OS) on one of these. I feel like I obtained most of my skill while studying C and LISP, but I never felt handicapped by BASIC. It was fun
The functional programming techniques that you master with LISP are very much applicable to Python (and to Javascript), and they result in very elegant Python code when used.
There's also the fact that the SICP takes you further and deeper than any Python book would.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.