HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Using Common Lisp to refactor C++

Chris Schafmeister · Youtube · 2 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Chris Schafmeister's video "Using Common Lisp to refactor C++".
Youtube Summary
-- Update Sep 29, 2014 --
I released Clasp - a Common Lisp that interoperates with C++ and uses LLVM as the back end!
http://drmeister.wordpress.com/2014/09/18/announcing-clasp

----

My first demo of my C++/C/Objective-C refactoring tool called "Improve".

It's written in Common Lisp and it runs within "Clasp" - a Common Lisp system/compiler that I wrote that interoperates with C++ and uses LLVM as the backend. I'll say more on that later.

This demo demonstrates how to load a C++ source file and to interactively build an ASTMatcher to find patterns within your code. I'll demonstrate how you write refactoring tools later.

You can quickly write complex ASTMatchers using it.

It has a "hint" facility that suggests ASTMatcher predicates that can be applied at any point within the matcher.

It also has a ability to focus the matcher you are writing on C++ examples that you provide it. This allows you to quickly create matchers that match code that you want to match and ignore code that you don't want to match.

This system exposes the excellent ASTMatcher library of the Clang/LLVM project to Common Lisp and enables you to interactively write C++/C/Objective-C refactoring tools.

It's an alpha version but I'm already using it to write a static analyzer that will help me implement copying garbage collector within Clasp.

Reference on the ASTMatcher language is available at:
http://clang.llvm.org/docs/LibASTMatchersReference.html
http://clang.llvm.org/docs/

An excellent tutorial on the Clang AST by Manuel Klimek:
http://clang.llvm.org/docs/IntroductionToTheClangAST.html
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Something relevant: refactoring C++ using Common Lisp: https://www.youtube.com/watch?v=h31pURzgYX8
Another project that seem to argue for better abstractions, is clasp, and it's use for (among other things) refactoring c++:

"Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming": https://www.youtube.com/watch?v=8X69_42Mj-g

"Using Common Lisp to refactor C++": https://www.youtube.com/watch?v=h31pURzgYX8

"Clasp — Bringing Common Lisp and C++ Together": https://github.com/drmeister/clasp

HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.