lisp

newLISP你也行 --- 基础知识

 ̄綄美尐妖づ 提交于 2019-12-02 17:51:27
############################################################################# # Name:newLISP你也行 --- 基础知识 # Author:黄登 ( winger ) # Project:http://code.google.com/p/newlisp-you-can-do # Gtalk:free.winger@gmail.com # Gtalk-Group:zen0code@appspot.com # Blog:http://my.opera.com/freewinger/blog/ # QQ-Group:31138659 # 大道至简 -- newLISP # # Copyright 2012 黄登 ( winger ) All rights reserved. # Permission is granted to copy, distribute and/or # modify this document under the terms of the GNU Free Documentation License, # Version 1.2 or any later version published by the Free Software Foundation ; # with no

newLISP你也行 --- newLISP简介

烈酒焚心 提交于 2019-12-02 17:51:15
############################################################################# # Name:newLISP你也行 --- newLISP简介 # Author:黄登 ( winger ) # Gtalk:free.winger@gmail.com # Gtalk-Group:zen0code@appspot.com # Blog:http://my.opera.com/freewinger/blog/ # QQ-Group:31138659 # 大道至简 -- newLISP # # Copyright 2012 黄登 ( winger ) All rights reserved. # Permission is granted to copy, distribute and/or # modify this document under the terms of the GNU Free Documentation License, # Version 1.2 or any later version published by the Free Software Foundation ; # with no Invariant Sections, no Front-Cover Texts,and no

Lisp/Scheme interpreter without Emacs?

≡放荡痞女 提交于 2019-12-02 17:41:28
I've been wanting to teach myself Lisp for a while. However, all the interpreters of which I've heard involve some flavor of emacs. Are there any command line interpreters, such that I could type this into the command line: lispinterpret sourcefile.lisp just like I can run perl or python. While I'd also like to become more familiar with Emacs (if only not to be frustrated when I work with somebody who uses Emacs), I'd rather decouple learning Emacs from learning Lisp. Edit: I actually want to follow SICP which uses Scheme, so an answer about Scheme would be more useful. I'm just not that

Language requirements for AI development [duplicate]

本秂侑毒 提交于 2019-12-02 17:37:41
Possible Duplicate: Why is Lisp used for AI? What makes a language suitable for Artificial Intelligence development? I've heard that LISP and Prolog are widely used in this field. What features make them suitable for AI? Cervo Overall I would say the main thing I see about languages "preferred" for AI is that they have high order programming along with many tools for abstraction. It is high order programming (aka functions as first class objects) that tends to be a defining characteristic of most AI languages http://en.wikipedia.org/wiki/Higher-order_programming that I can see. That article is

Lisp as a Scripting Language in a C++ app [closed]

江枫思渺然 提交于 2019-12-02 17:34:20
Hey, I've been looking at the possibility of adding a scripting language into my framework and I heard about Lisp and thought I would give it a go. Is there a VM for Lisp like Lua and Python or am I in the wrong mindset. I found CLISP here, http://clisp.cons.org/ , but am not sure if this is what I am looking for. Can anyone point me in the right direction? CLISP is just one implementation of Common Lisp. It's a very good implementation, and it does have some support for being embedded in other (C-based) programs, but that's not its focus and it's GPLed, which may or may not be a deal-breaker

In what sense are languages like Elixir and Julia homoiconic?

孤街醉人 提交于 2019-12-02 17:27:47
Homoiconicity in Lisp is easy to see: (+ 1 2) is both the function call to + with 1 , 2 as arguments, as well as being a list containing + , 1 , and 2 . It is simultaneously both code and data. In a language like Julia, though: 1 + 2 I know we can parse this into an Expr in Julia: :(1 + 2) And then we can get the AST and manipulate it: julia> Meta.show_sexpr(:(1+2)) (:call, :+, 1, 2) So, we can manipulate a program's AST in Julia (and Elixir). But are they homoiconic in the same sense as Lisp- is any snippet of code really just a data structure in the language itself? I don't see how code like

How is Lisp's read-eval-print loop different than Python's?

混江龙づ霸主 提交于 2019-12-02 17:24:22
I've encounter a following statement by Richard Stallman : 'When you start a Lisp system, it enters a read-eval-print loop. Most other languages have nothing comparable to read, nothing comparable to eval, and nothing comparable to print. What gaping deficiencies! ' Now, I did very little programming in Lisp, but I've wrote considerable amount of code in Python and recently a little in Erlang. My impression was that these languages also offer read-eval-print loop, but Stallman disagrees (at least about Python): 'I skimmed documentation of Python after people told me it was fundamentally

Why are C, C++, and LISP so prevalent in embedded devices and robots?

▼魔方 西西 提交于 2019-12-02 17:13:28
It seems that the software language skills most sought for embedded devices and robots are C, C++, and LISP. Why haven't more recent languages made inroads into these applications? For example, Erlang would seem particularly well-suited to robotic applications, since it makes concurrent programming easier and allows hot swapping of code. Python would seem to be useful, if for no other reason than its support of multiple programming paradigms. I'm even surprised that Java hasn't made a foray into general robotic programming. I'm sure one argument would be, "Some newer languages are interpreted,

Why should I use 'apply' in Clojure?

谁说我不能喝 提交于 2019-12-02 16:53:09
This is what Rich Hickey said in one of the blog posts but I don't understand the motivation in using apply. Please help. A big difference between Clojure and CL is that Clojure is a Lisp-1, so funcall is not needed, and apply is only used to apply a function to a runtime-defined collection of arguments. So, (apply f [i]) can be written (f i). Also, what does he mean by "Clojure is Lisp-1" and funcall is not needed? I have never programmed in CL. Thanks You would use apply , if the number of arguments to pass to the function is not known at compile-time (sorry, don't know Clojure syntax all

How do you compile macros in a Lisp compiler?

前提是你 提交于 2019-12-02 16:44:40
In a Lisp interpreter, there can easily be a branch in eval that can expand a macro, and in the process of expanding it, call functions to build up the expanded expression. I've done this before using low-level macros, it's easily concieved. But, in a compiler there aren't any functions to call to build up the expanded code: The issue can be seen quite simply in the following example: (defmacro cube (n) (let ((x (gensym))) `(let ((,x ,n)) (* ,x ,x ,x)))) When the macro is expanded by an interpreter, it calls gensym and does what you expect. When expanded by a compiler, you'd generate the code