6 ms·
I've implemented a Common Lisp that interoperates with C++ and uses LLVM as the backend because I was motivated by the same shortcomings in traditional software
by drmeister 11y ago
I've implemented a Common Lisp that interoperates with C++ and uses LLVM as the backend because I was motivated by the same shortcomings in traditional software development languages and tools (https://github.com/drmeister/clasp https://github.com/drmeister/clasp). I choose Common Lisp rather than Scheme because the killer feature of Lisp is Macros and they are easier to use in Common Lisp than they are in Scheme. Also, Slime (Emacs interface to Common Lisp) is one of the most powerful software development environments available IMHO.
- vfclists 11y agocool
- sesquipedalian 11y agoWhat makes Common Lisp macros easier to use than Scheme's?
- drmeister 11y agoIn short Common Lisp has two namespaces, one for functions and macros and a second for variable names - Scheme has one namespace. So you have fewer conflicts in naming in Common Lisp. In Scheme there is a lot of concern about hygienic macros that don't mess up the namespace. For more on that here is an inflammatory but well thought out exposition. http://www.xach.com/naggum/articles/3236789642671151@naggum.net.html http://www.xach.com/naggum/articles/3236789642671151@naggum.... The book Let Over Lambda lays it out really well as well.
- NhanH 11y agoScheme macro is hygienic, which make certain type of macro impossible to be done (those that capture itself). Also depend on who you ask, hygienic macro is slightly more annoying to use.
- kenko 11y agosyntax-rules macros can break hygiene: http://okmij.org/ftp/Scheme/macros.html#dirty-macros http://okmij.org/ftp/Scheme/macros.html#dirty-macros
- shiggerino 11y agoNo need for a special metaprogramming DSL, macros are written in plain Common Lisp. Hygiene is a non-issue since you have the GENSYM function which gives you a new symbol guaranteed to be unique.
- deleted 11y ago[deleted]
- sklogic 11y agoLack of enforced hygiene, for starters. Hygienic R5RS-style macros are nice and all that, but only for petty language extensions, and they're a noticeable obstacle if you want to implement more complex, deeply staged DSLs. It's possible to find workarounds for most of that things, but yet, not having hygiene in the first place is better.
- radicalcut 11y agoUnrelated to VR but still: if anyone here hasn't yet watched drmeister's talk about Clasp and his "molecular metaprogramming" project, please do. Absolutely fascinating stuff. https://www.youtube.com/watch?v=8X69_42Mj-g https://www.youtube.com/watch?v=8X69_42Mj-g Also recently discussed on HN: https://news.ycombinator.com/item?id=9721801 https://news.ycombinator.com/item?id=9721801
- rylee 11y agoWhat makes Slime so much better than e.g. Webstorm or PyCharm or Eclipse or Android Studio or vim-go, etc?
- chaoky 11y agoSLIME emphasizes interactivity. Coupled with the fact that it uses the full power of Emacs (which is a small lisp vm, though a different dialect of lisp), you can do things like inspect any object or package in your system on the fly, view class hierarchies of your image, live documentation access, live disassembly of a function, incremental compilation into another buffer, arglist inspection, easily add amazing tools like paredit, autocompletion, inline macroexpansion utilities, source location lookup for functions and global variables, with Common Lisp spec lookup of any symbol all with with two keypresses or so. While many IDE's provide some or even all of these features, they are rarely as coherent and easy to use as they are in SLIME. Plus, SLIME itself is more easily customizable than something like Eclipse, because it uses elisp and common lisp as the backend language. A downside though, is that learning emacs is a prerequisite to using all the features of slime.