44 points · by cm3 · 10y ago · 34 comments
>> julia --lisp
; _
; |_ _ _ |_ _ | . _ _
; | (-||||_(_)|__|_)|_)
;-------------------|----------------------------------------------------------
> (+ 1 2)
3
> Total Physical Source Lines of Code (SLOC) = 499,088
Development Effort Estimate, Person-Years (Person-Months) = 136.18 (1,634.17)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 3.47 (41.59)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 39.29
Total Estimated Cost to Develop = $ 18,396,178
(average salary = $56,286/year, overhead = 2.40).
SLOCCount, Copyright (C) 2001-2004 David A. WheelerFor some. For others a clone that does 20% of what Emacs does and has a few nice plugins could be enough.
Comparatively, I've found that x-compiling vanilla emacs `--without-x` is often more easier and faster.
X-compiling Mg is more or less "gcc *.c" which is very straight-forward.
I don't use many advanced emacs features; this only covers basic editing (moving around, cutting and yanking, and macros) but it's the smallest subset I need to be productive.
I should look into this. I wonder how it compares.
[0]: http://www.jedsoft.org/jed/ [1]: http://www.jedsoft.org/slang/
Why not run Emacs on local machine with plink-ssh to remote?
TRAMP enables this pretty well …
[1] As a clojure library - https://github.com/brandonbloom/backtick/blob/master/src/bac... (although you have to rewrite lines 51-56 to use explicit gensyms in a let instead of using the internal syntax-quote so that it bootstraps cleanly).
[2] Using the alternate Clojure reader - https://github.com/clojure/tools.reader/blob/master/src/main...
[3] Using Hylang - https://github.com/hylang/hy/blob/master/hy/core/macros.hy#L...
Most people think that the only axis macro systems rest on is hygenic vs non-hygenic:
Hygenic |Non-hygenic
syntax-rules|defmacro and gensym
This actually isn't true. Macro systems rest on two axies: Hygenic vs Non-Hygenic, and Lowlevel vs Highlevel: Hygenic Lowlevel |Non-hygenic Lowlevel
er-macro-transformer|defmacro and gensym
ir-macro-transformer|
sc-macro-transformer|
--------------------+----------------------
Hygenic highlevel |Non-hygenic highlevel
syntax-rules |???
Highlevel macros use declarative pattern-matching. Lowlevel macros are imperative. Hygenic macros guarantee that there will be no name-clashes in a rename. Depending on your language, gensym may or may not do this, but usually does. However, hygenic macros also guarantee that all renamed expressions take on the value they have at in the environment within which the expansion occurs. Gensym does not, and never will, do this. This is acceptable in a Lisp-2 with packages (barely), but in a Lisp-1 of any sort, there is an extreme risk of function shadowing, and other nasty bugs (see http://community.schemewiki.org/?hygiene-versus-gensym for details).Hopefully, this explains why I insist on hygenic macros, and why I think PG really screwed up by not adding hygenic lowlevel macros to arc.
syntax-quote as implemented by clojure makes three guarantees:
(a) symbols in the body that are postfixed by `#` will be uniformly replaced by a unique gensym in the expansion
(b) unquoted things are left alone
(c) any other symbol that is not the result of unquote or auto-gensyming, is fully namespace-qualified
In so far as is possible with a mutable function namespace (and clojure has this, you can alter the contents of vars and add/remove vars from namespaces), the syntax-quote in Clojure provides the environment within the expansion occurs as well as guaranteeing no name clashes (unless you explicitly opt into them, e.g. unquoting a quoted symbol).
If you wanted to do something similar to what the article mentions for common lisp, you end up at:
(intern (ns-name 'clojure.core)
'symbol-you-want-to-replace
(fn [x] alt-definition-here))
I guess someone technically could do that, but if they do, I would rather my language err towards giving me the power to make bad decisions than hamstring my ability to do useful things.In summary, as long as you have lexical scoping (which FemtoLisp claims to) or namespaces of any sort, you can solve all but the most contrived problems of something like syntax-rules without the additional complexity and restrictions. Again, this can just be added to the language by the user, if they really want it.
This comes back to a larger question of, if everything about a language is interesting except its macro system, wouldn't you be well-served to just bolt on the macro system that you desire? (Not saying that FemtoLisp is for you.) Seems that a hygienic vs non-hygienic macro system is fairly trivial if you care enough about the other features.
It is also nice to have a CL package, which makes porting of relatively easy.
And FemtoLisp is a beautiful thing, of course.
As a daily almost-everything-in-emacs user, I definitely understand the shortcomings of elisp, but generally speaking it does the job. Yeah guile would be an improvement, but I'm not sure it is worth rocking the boat.
It doesn't seem that the idea that elisp needs replacing has that much currency.