lisp

Tierless web framework with Javascript?

拈花ヽ惹草 提交于 2019-12-04 20:04:29
问题 Links is a lisp-like functional web programming language/framework that makes it easy to write a single piece of code that is compiled to server-side code, client-side JS and HTML, thus making it much easier to write web applications. Since there really is no distinction between the client and server side, they call it "tierless" programming. With the advent of Server-side JS, are there any comparable frameworks with JS? Note that I don't just mean writing server side and client side code in

Lisp expression evaluator in Java (using only one stack)

爱⌒轻易说出口 提交于 2019-12-04 19:45:43
I'm trying to implement a simple Lisp expression evaluator using Java. There's actually a wealth of information on the subject, but it appears they all use two separate stacks to arrive at the result. I'm wondering if it is possible to implement such a program using only one stack and what some pseudo code might look like for that. Thanks. For more info on what I'm talking about refer to http://www.chegg.com/homework-help/questions-and-answers/outline-given-import-javautil-public-class-simplelispexpressionevaluator-current-input-lis-q2332957 http://stdioe.blogspot.ca/2012/01/lets-implement

elisp: Is there a way to get the name of the current .el module (like __FILE__ in C)?

隐身守侯 提交于 2019-12-04 18:38:48
问题 At the top of my elisp module, I want to do something as simple as: (message (concat "Loading " (expand-file-name (current-elisp-module) "."))) 回答1: You can use the variable load-file-name, which is set by the function load, documented as follows: Full name of file being loaded by `load'. As elaborated in the manual: When Emacs is in the process of loading a file, this variable’s value is the name of that file, as Emacs found it during the search described earlier in this section. Note:

Are Lisp forms and Lisp expressions same thing?

谁说我不能喝 提交于 2019-12-04 16:54:57
问题 Some literature say "the first subform of the following form..." or "to evaluate a form..." while some other literature say "To evaluate an expression...", and most literature seem to use both terms. Are the two terms interchangeable? Is there a difference in meaning? 回答1: The definitions and uses of these terms vary by Lisp dialect and community, so there is no clear answer to your question for Lisps in general. For their use in Common Lisp, see Rainers detailed answer. To give a short

Haskell “Apply”? [duplicate]

十年热恋 提交于 2019-12-04 16:45:25
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Why is such a function definition not allowed in haskell? I'm a newcomer to the world of Haskell, migrating over from Lisp. I'm trying to adjust to Haskell's fundamentally different worldview, and one of the many things that I find new and exciting is the type system. Being a Lisper, I thought I would try to implement in Haskell a function which is very important in the Lisp world: apply . For those who don't

Tacit programming in Lisp

眉间皱痕 提交于 2019-12-04 16:20:09
问题 Is it possible to use/implement tacit programming (also known as point-free programming) in Lisp? And in case the answer is yes, has it been done? 回答1: This style of programming is possible in CL in principle, but, being a Lisp-2, one has to add several #' s and funcall s. Also, in contrast to Haskell for example, functions are not curried in CL, and there is no implicit partial application. In general, I think that such a style would not be very idiomatic CL. For example, you could define

What is lisp used for today and where do you think it's going? [closed]

醉酒当歌 提交于 2019-12-04 16:12:03
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Never been a lisp user, so don't take me as too dense while reading this. However; What is lisp used for today? I know there are

jq or xsltproc alternative for s-expressions?

瘦欲@ 提交于 2019-12-04 16:10:15
I have a project which contains a bunch of small programs tied together using bash scripts, as per the Unix philosophy. Their exchange format originally looked like this: meta1a:meta1b:meta1c AST1 meta2a:meta2b:meta2c AST2 Where the : -separated fields are metadata and the AST s are s-expressions which the scripts pass along as-is. This worked fine, as I could use cut -d ' ' to split the metadata from the ASTs, and cut -d ':' to dig into the metadata. However, I then needed to add a metadata field containing spaces, which breaks this format. Since no field uses tabs, I switched to the

Example of Sharpsign Equal-Sign reader macro?

风流意气都作罢 提交于 2019-12-04 15:59:06
I've seen this used once, but couldn't understand what it does. The reference says that it is #n=object reads as whatever object has object as its printed representation. However, that object is labeled by n, a required unsigned decimal integer, for possible reference by the syntax #n#. The scope of the label is the expression being read by the outermost call to read; within this expression, the same label may not appear twice. Which to me reads as just 56 randomly selected words of English language... Can you, please, show an example of when this may be used? In Common Lisp it is used by the

Lisp importing/loading file

断了今生、忘了曾经 提交于 2019-12-04 15:50:30
问题 Is there a way in Lisp to include code from other Lisp files? For example, in C++ I can do this: #include <iostream> #include <string> #include "myfile.h" etc... And in Python, import antigravity import my_module etc... Is there a Lisp equivalent? 回答1: In addition to Rainer's answer: If you want to load ASDF-systems, use: (asdf:load-system 'my-system) Some Lisp implementations (CCL for example) also allow using require for loading ASDF systems, but that functionality is implementation