Josh Goldstein on 17 Jan 2008 18:05:01 -0800 |
I could talk about Scheme (a LISP dialect, almost the exact same thing as LISP) that would be similar to the Erlang talk, not that I'm an 'expert', or even a 'good public speaker/presenter'. It should run with 'mzscheme -r client.ss' or 'server.ss'JP, it's flexible enough to use for procedural, OO, or functional programming. Here's my stab at answering your questions: * "Hello world" from scratch, after installing some Lisp (display "hello world") * What's with all the danged ()'s It was meant/designed for processing lists, and it's lists are surrounded by ()'s. So, since all programs and expressions are ()-surrounded lists, Lisp programs can manipulate themselves as easily as they manipulate any other list, which is cool because it's arguably the best list-manipulating language in existence. Probably good for self-modifying programs/AI * How to "think in Lisp" (like, thinking in Perl requires hashes and Regexp :) From what I have seen, it's thinking in recursion and lists. *What are the best books (I've looked, there aren't many) SICP is popular and from MIT press: http://mitpress.mit.edu/sicp/ HTDP is also from MIT press, it's the book I learned Scheme on: http://htdp.org/ The Scheme Programming Language: http://www.scheme.com/tspl3/ That should be enough to keep you occupied you for at least a little while. :) Sadly, I think MIT recently stopped using Scheme for their intro to programmming class :'( * What's the "best" Lisp compiler for Linux (whatever "best" means) and how do we get it (clisp?) I have no idea, but I use MzScheme :) And that can be bundled with Dr Scheme, which lets you do GUI programming, AFAI have read. * Lisp and related languages (Scheme, etc.?) I only know of Scheme and Lisp, and they're pretty much the same as far as any non-super-expert would see things. Scheme and Lisp are similar to Erlang in that they don't have a type-inference system, so they're marginally more flexible, but they also don't have pattern-matching. * Why use Lisp - it's pretty platform-independent - the ability to program in any style you want - call-with-current-continuation: setting up a possible point to return to, like a normal 'return', but the program's state is restored to exactly the same as before, except for the return value, _and_ you don't ever have to 'return' if you don't want to do so. - macros: sort of like the C preprocessor's text substitution, but instead of only having if statements available to it, it has the _entire_ language's facilities available to do the substitution. AFAIK, this is the 'holy grail' of Scheme/Lisp, and it can be used to build almost anything into the language, like making DSL's (like regexes) and the pattern-matching of language like SML, Erlang, Haskell. * A more complicated example than Hello World I attached a working chat server and client. The code is probably not the best Scheme ever - I wrote it last weekend to get back into using Scheme. Looking for last minute shopping deals? Find them fast with Yahoo! Search. Attachment:
server.ss Attachment:
client.ss ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|