lisp

macro support in F#

别说谁变了你拦得住时间么 提交于 2019-11-28 21:16:55
After reading Practical Common Lisp I finally understood what the big deal about macros was, and I have been looking for a language for the .NET platform that supports this. There are a few lisp dialects for .NET but from what I have been able to gather all are either very beta or abandoned. Recently my interest has been sparked by Clojure, but it's for the java platform and while on probably could use ikvm it doesn't feel some integrated. Especially when you want to do stuff like WPF. Recently I have been hearing whisper about F#, I tried to look at the documentation if I could find anything

Lisp on embedded platforms [closed]

家住魔仙堡 提交于 2019-11-28 21:12:30
问题 Are there any open source Lisp compilers suitable for real-time embedded applications? I.e. with incremental garbage collection, customisable memory handling, small footprint, etc. Edit: To clarify, by "compiler" I meant native code, not bytecode interpreter (though the suggested interpreting implementations for microcontrollers are interesting for being a lot smaller than what I thought possible!). 回答1: Take a look at Picobit and the code, which is a Scheme for microcontrollers. There is

Programming Scheme(Racket) with VIM - How to get started

痴心易碎 提交于 2019-11-28 21:05:15
问题 recently, I started programming Racket (formerly Scheme) in DrRacket. I quite fast I began to miss all the features of VIM in DrRacket, so I would like to use VIM for my scheme(racket) programming. I know that Emacs might be the best choice for intense lisp programming, but all I want is write a scheme(racket) file check syntax and then run it. Unfortunately, I could not figure out, how to invoke "racket" in the commandline on a file to get it doing the same as DrRacket. I am running Ubuntu

Emacs :TODO indicator at left side

痴心易碎 提交于 2019-11-28 20:29:24
I want to have sort of indiacator at left side of the line wherever I have in the source code #TODO : some comment //TODO: some comments The indicator could be a just mark and I already enabled line numbers displayed at emacs. This command will do something like you want. (defun annotate-todo () "put fringe marker on TODO: lines in the curent buffer" (interactive) (save-excursion (goto-char (point-min)) (while (re-search-forward "TODO:" nil t) (let ((overlay (make-overlay (- (point) 5) (point)))) (overlay-put overlay 'before-string (propertize "A" 'display '(left-fringe right-triangle)))))))

Is Lisp the only language with REPL?

£可爱£侵袭症+ 提交于 2019-11-28 20:20:24
问题 There are languages other than Lisp (ruby, scala) that say they use REPL (Read, Eval, Print, Loop), but it is unclear whether what is meant by REPL is the same as in Lisp. How is Lisp REPL different from non-Lisp REPL? 回答1: The idea of a REPL comes from the Lisp community. There are other forms of textual interactive interfaces, for example the command line interface . Some textual interfaces also allow a subset of some kind of programming language to be executed. REPL stands for READ EVAL

Practical use of curried functions?

ⅰ亾dé卋堺 提交于 2019-11-28 20:15:04
There are tons of tutorials on how to curry functions, and as many questions here at stackoverflow. However, after reading The Little Schemer, several books, tutorials, blog posts, and stackoverflow threads I still don't know the answer to the simple question: "What's the point of currying?" I do understand how to curry a function, just not the "why?" behind it. Could someone please explain to me the practical uses of curried functions (outside of languages that only allow one argument per function, where the necessity of using currying is of course quite evident.) edit: Taking into account

Is Clojure closer to Scheme or Common Lisp from a beginner's perspective? [closed]

不羁岁月 提交于 2019-11-28 19:57:36
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . If I want to learn Clojure, should I start by learning Scheme or Common Lisp? Or is Clojure different enough from both of these, that I should just start learning Clojure by itself? 回答1: It would be to your benefit to learn all three, if only so you can pick which one is best

Examples of what Lisp's macros can be used for

微笑、不失礼 提交于 2019-11-28 19:50:12
问题 I've heard that Lisp's macro system is very powerful. However, I find it difficult to find some practical examples of what they can be used for; things that would be difficult to achieve without them. Can anyone give some examples? 回答1: Source code transformations. All kinds. Examples: New control flow statements : You need a WHILE statement? Your language doesn't have one? Why wait for the benevolent dictator to maybe add one next year. Write it yourself. In five minutes. Shorter code : You

What is the exact definition of a Metacircular Interpreter?

蹲街弑〆低调 提交于 2019-11-28 19:31:16
Is it legal to call a C compiler written in C or a PHP interpreter written in PHP metacircular? Is this definition valid only for languages of a specific type, like Lisp? In short, what are the conditions that an interpreter should satisfy for being called Metacircular? A metacircular interpreter is an interpreter written in a (possibly more basic) implementation of the same language. This is usually done to experiment with adding new features to a language, or creating a different dialect. The reason this process is associated with Lisp is because of the highly lucid paper "The Art of the

Clojure Jython interop

半城伤御伤魂 提交于 2019-11-28 18:54:48
I was wondering if anyone has tried somehow calling Jython functions from within Clojure, and how you went about doing this if so. I have not used Jython, but I would imagine the Jython interpreter can be invoked in the same way as any other java code, and Python programs can be run within it. However I wonder if it would be possible to somehow call individual python functions from Clojure. Like I said, I have not tried this yet, so it might actually be straightforward and obvious. I'm just wondering if anyone has tried doing this. Thanks, Rob A note: I just realised that the question is