<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Scala Macros News</title>
    <link>http://scalamacros.org</link>
    <atom:link href="http://scalamacros.org/news/rss.xml" rel="self" type="application/rss+xml" />
    <description>Scala Macros News</description>
    <language>en-us</language>
    <pubDate>Fri, 17 May 2013 23:51:09 PDT</pubDate>
    <lastBuildDate>Fri, 17 May 2013 23:51:09 PDT</lastBuildDate>

    
    <item>
      <title>Half a year in macro paradise at Scala Days 2013</title>
      <link>http://scalamacros.org/news/2013/05/18/half-a-year-in-macro-paradise.html</link>
      <pubDate>Sat, 18 May 2013 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2013/05/18/half-a-year-in-macro-paradise</guid>
      <description>&lt;p&gt;Announced right before 2.10.0-final, &lt;a href=&quot;http://docs.scala-lang.org/overviews/macros/paradise.html&quot;&gt;macro paradise&lt;/a&gt; became the home for experimentation in the macro land. In this talk I will cover the ideas we played with and outline what panned out and what did not. What's going to happen to quasiquotes? Are type macros useful enough? Do macro annotations make sense? Come over and find out the answers.&lt;/p&gt;

&lt;p&gt;Scala Days 2013 session page: &lt;a href=&quot;http://www.scaladays.org/#/june-12/room1/10:15-11:00/Half-a-Year-in-Macro-Paradise&quot;&gt;http://www.scaladays.org/#/june-12/room1/10:15-11:00/Half-a-Year-in-Macro-Paradise&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Evolution of Scala macros at Strange Loop 2013</title>
      <link>http://scalamacros.org/news/2013/05/18/evolution-of-scala-macros.html</link>
      <pubDate>Sat, 18 May 2013 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2013/05/18/evolution-of-scala-macros</guid>
      <description>&lt;p&gt;Let’s take a journey to the internals of Scala macros!&lt;/p&gt;

&lt;p&gt;We will start off in the early days of macros in Scala and the initial design of def macros, which ended up in the production release of Scala 2.10. We will also take a look at the popular use cases and patterns characteristic for our macro system.&lt;/p&gt;

&lt;p&gt;Afterwards we are going to learn about macro paradise, a spawning pool for the new ideas, and get acquainted with its inhabitants: type macros, untyped macros, inference macros, jitted macros and macro annotations. Then, in the next act our new friends will try to make it into Scala 2.11, only to be stopped by the keepers of the Scala typechecker.&lt;/p&gt;

&lt;p&gt;The narration will culminate when in addition to discovering a threat coming from the new macros, we find out that Scala 2.10 is already infiltrated. After the two forces collide, the next generation of macros in born, having two faces: blackbox macros and whitebox macros.&lt;/p&gt;

&lt;p&gt;The next generation of macros brings peace to the macroland, and happiness ensues. But in the meanwhile, far away in macro paradise, macro annotations are getting mature, planning to try their luck in 2.12…&lt;/p&gt;

&lt;p&gt;Strange Loop 2013 session page: &lt;a href=&quot;https://thestrangeloop.com/sessions/evolution-of-scala-macros&quot;&gt;https://thestrangeloop.com/sessions/evolution-of-scala-macros&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Let our powers combine!</title>
      <link>http://scalamacros.org/news/2013/04/22/let-our-powers-combine.html</link>
      <pubDate>Mon, 22 Apr 2013 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2013/04/22/let-our-powers-combine</guid>
      <description>&lt;p&gt;Compile-time metaprogramming has been proven immensely useful
enabling programming techniques such as language
virtualization, embedding of external DSLs, self-optimization, and boilerplate generation amongst many others.&lt;/p&gt;

&lt;p&gt;In the recent production release of Scala 2.10 we have introduced macros, an
experimental facility which gives its users compile-time metaprogramming
powers. Alongside of the mainline release of Scala Macros, we have also
introduced other macro flavors, which provide their users with
different interfaces and capabilities for interacting with the Scala compiler.&lt;/p&gt;

&lt;p&gt;In this paper, we show how the rich syntax and static types of Scala synergize with
macros, through a number of real case studies using our macros (some of which
are production systems) such as language virtualization, type providers,
materialization of type class instances, type-level programming, and embedding of external DSLs.
We explore how macros enable new and unique ways to use pre-existing language features such as implicits,
dynamics, annotations, string interpolation and others, showing along the way
how these synergies open up new ways of dealing with software development
challenges.&lt;/p&gt;

&lt;p&gt;Download the paper: &lt;a href=&quot;/paperstalks/2013-04-22-LetOurPowersCombine.pdf&quot;&gt;Scala Macros: Let Our Powers Combine!&lt;/a&gt; (PDF, 187 Kb)&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Macro annotations and call for ideas</title>
      <link>http://scalamacros.org/news/2013/02/19/macro-annotations-and-call-for-ideas.html</link>
      <pubDate>Tue, 19 Feb 2013 00:00:00 PST</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2013/02/19/macro-annotations-and-call-for-ideas</guid>
      <description>&lt;p&gt;Hello! Today I'd like to present our latest development - the ability to add new members to the classes being compiled
from any location in the program. To be honest, that's quite a breakthrough, because it opens the doors to a whole bunch of features
labelled under the &quot;macro annotations&quot; category.&lt;/p&gt;

&lt;p&gt;Here's an example, which shows how easy it is to add members to classes in your project. At the moment, the &lt;code&gt;introduceMember&lt;/code&gt;
API can only append members to existing classes, but the news are bigger than just that. The implementation technique, which we finally
figured out, will let us expose things like &lt;code&gt;changeMember&lt;/code&gt;, &lt;code&gt;removeMember&lt;/code&gt;, &lt;code&gt;introduceCompanion&lt;/code&gt; or
virtually whatever along these lines.&lt;/p&gt;

&lt;code&gt;&lt;pre&gt;13:29 ~/Projects/Kepler_introduce-member/sandbox$ cat Macros.scala
import scala.reflect.macros.Context
import language.experimental.macros

object Macros {
  def impl(c: Context)(target: c.Tree, name: c.Tree, code: c.Tree) = {
    import c.universe._
    val Literal(Constant(targetType: Type)) = c.typeCheck(target)
    val Literal(Constant(methodName: String)) = name
    val Function(methodParams, methodBody) = code
    val method = DefDef(NoMods, TermName(methodName), Nil, List(methodParams), TypeTree(), methodBody)
    c.introduceMember(targetType.typeSymbol, method)
    c.literalUnit
  }
  def addMethod(target: _, name: String, code: _) = macro impl
}
13:29 ~/Projects/Kepler_introduce-member/sandbox$ cat Test.scala
class C
object Test extends App {
  Macros.addMethod(classOf[C], &quot;foo&quot;, (x: Int) =&gt; x + 2)
  println(new C().foo(2))
}
13:29 ~/Projects/Kepler_introduce-member/sandbox$ scalac Macros.scala &amp;&amp; scalac Test.scala &amp;&amp; scala Test
4&lt;/pre&gt;&lt;/code&gt;

&lt;p&gt;By the way, this example also demonstrates &lt;a href=&quot;http://docs.scala-lang.org/overviews/macros/untypedmacros.html&quot;&gt;untyped macros&lt;/a&gt;
(be sure to take a look at &lt;a href=&quot;http://docs.scala-lang.org/overviews/macros/paradise.html&quot;&gt;the macro paradise doc&lt;/a&gt;
if you've not been following the latest macro research - there are some goodies which haven't been covered on this site).
Though I digress. The main focus today is &lt;code&gt;introduceMember&lt;/code&gt; and the possibilities it enables.&lt;/p&gt;

&lt;p&gt;Now here comes the question. Imagine you have a capability to shape your program at will. Want to have &lt;a href=&quot;https://issues.scala-lang.org/browse/SI-240&quot;&gt;lazy parameters&lt;/a&gt;? Easy - declare an annotation that changes the signature of a method declaring your parameter and then postprocesses the body. Want to have &lt;a href=&quot;/usecases/data-types-a-la-carte.html&quot;&gt;customizable case classes&lt;/a&gt;? Easy again - rebind a system macro annotation to do something that you want, including creating custom methods and even creating/changing the companion object.&lt;/p&gt;

&lt;p&gt;What would you do with this freedom? And how much freedom do you need? Let us know at &lt;a href=&quot;mailto:dev@scalamacros.org&quot;&gt;dev@scalamacros.org&lt;/a&gt; or
drop a line to &lt;a href=&quot;http://groups.google.com/group/scala-language&quot;&gt;the mailing list&lt;/a&gt;, and we'll be able to tune the design of future macros for your personal use cases!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Macro paradise</title>
      <link>http://scalamacros.org/news/2012/12/18/macro-paradise.html</link>
      <pubDate>Tue, 18 Dec 2012 00:00:00 PST</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2012/12/18/macro-paradise</guid>
      <description>&lt;p&gt;Simultaneously with the release of Scala 2.10.0-final, scheduled for the first week of January 2013, we're going to announce the availability of paradise/macros, a dedicated branch in our official Scala repository which will host the latest macro developments.&lt;/p&gt;

&lt;p&gt;When things like macro types, macro annotations or type inference-friendly macros - you name it - get ripe for beta testing, they are going to end up in paradise/macros. Much like the vanilla Scala, macro paradise is going to be built nightly and have its own Maven artifact, so it'll be very easy to use it in your projects.&lt;/p&gt;

&lt;p&gt;In this talk I present a couple of new features that will be released into paradise this Christmas, along with a glimpse of the things to come. I also discuss the roadmap of macro development for the near future, so if you want to have something in Scala macros, be sure to take a look and speak up.&lt;/p&gt;

&lt;p&gt;Screencast: &lt;a href=&quot;http://vimeo.com/user8565009/macro-paradise-talk&quot;&gt;http://vimeo.com/user8565009/macro-paradise-talk&lt;/a&gt;&lt;br/&gt;
Slides: &lt;a href=&quot;http://scalamacros.org/talks/2012-12-18-MacroParadise.pdf&quot;&gt;http://scalamacros.org/talks/2012-12-18-MacroParadise.pdf&lt;/a&gt;&lt;br/&gt;
Discussion: &lt;a href=&quot;http://groups.google.com/group/scala-language/browse_thread/thread/21c0cdce38715771&quot;&gt;http://groups.google.com/group/scala-language/browse_thread/thread/21c0cdce38715771&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    
    <item>
      <title>Status update</title>
      <link>http://scalamacros.org/news/2012/11/05/status-update.html</link>
      <pubDate>Mon, 05 Nov 2012 00:00:00 PST</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2012/11/05/status-update</guid>
      <description>&lt;p&gt;It's been two weeks since we published &lt;a href=&quot;http://www.scala-lang.org/node/13096&quot;&gt;Scala 2.10.0-RC1&lt;/a&gt;, and
it looks like the final release of 2.10.0 is coming really soon. So let's retrospect a little.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;State of the art&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Macros are now officially a part of the Scala language, albeit an experimental one.
We have a decently working implementation and &lt;a href=&quot;/documentation.html&quot;&gt;some docs&lt;/a&gt; (also much more docs are on the way -
be sure to check &lt;a href=&quot;http://docs.scala-lang.org/overviews/reflection/overview.html&quot;&gt;the reflection guide&lt;/a&gt; and
&lt;a href=&quot;http://docs.scala-lang.org/overviews/reflection/macros.html&quot;&gt;the macro guide&lt;/a&gt; at the Scaladoc site once they're up in a few days).&lt;/p&gt;

&lt;p&gt;And what's the most important: we have several projects that already use macros, and even more are on their way.
Here we'd like to take time and say a big and hearty &quot;thank you&quot; to our early adopters. You guys are fantastic!&lt;/p&gt;

&lt;p&gt;Speaking of evolution, at first we imagined that macros would mostly deliver a convenient way to build DSLs or even
language workbenches (that's why DSL-related use cases originally had such priority at
&lt;a href=&quot;http://scalamacros.org/usecases/index.html&quot;&gt;http://scalamacros.org/usecases/index.html&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;But later this perception has changed. Sure one can design much more powerful DSLs than it's possible without compile-time metaprogramming
(e.g. literals for binary numbers or a LINQ-like DB connectivity toolkit). But we've mostly seen people using macros to perform low-level
AST twiddling (which I think can't be classified as DSLing).&lt;/p&gt;

&lt;p&gt;For example, there's &lt;a href=&quot;https://github.com/pniederw/expecty&quot;&gt;an elaborate assert macro&lt;/a&gt;,
&lt;a href=&quot;https://github.com/paulp/declosurify&quot;&gt;a series of method inlining macros&lt;/a&gt;,
&lt;a href=&quot;http://stackoverflow.com/questions/10373318/mixing-in-a-trait-dynamically/10387200#10387200&quot;&gt;a dynamic trait mixing macro&lt;/a&gt;
(I know, that's my own Stack Overflow answer, but I've seen other people doing similar things as well),
&lt;a href=&quot;https://github.com/jonifreeman/sqltyped&quot;&gt;a macro which infers Scala types from database&lt;/a&gt;,
&lt;a href=&quot;http://mandubian.com/2012/11/11/JSON-inception/&quot;&gt;a macro which generates json serialization type classes&lt;/a&gt;,
also &lt;a href=&quot;https://bitbucket.org/jaroslav/scala-macro-serialization/&quot;&gt;another serialization macro&lt;/a&gt;, et cetera et cetera.
There's a bunch of other usages to achieve little improvements here and there (e.g. a macro that works around Scala closure conversion
for better serialization), but we don't have source code to link for those. But anyways macros are still very useful for DSLs.
In this department the biggest players to our knowledge are &lt;a href=&quot;https://github.com/slick/slick&quot;&gt;Slick&lt;/a&gt;,
&lt;a href=&quot;http://www.paulbutcher.com/2012/06/scalamock-3-0-preview-release/&quot;&gt;ScalaMock v3&lt;/a&gt; and &lt;a href=&quot;https://github.com/harrah/xsbt/wiki/Definition-Format-Enhancement.md&quot;&gt;SBT v0.13&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;Future avenues&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Now while the post-release dust is settling, we're planning our next journey along the road of compile-time metaprogramming in Scala.&lt;/p&gt;

&lt;p&gt;Our biggest interest lies in experimenting how language features such as types, implicits or annotations work together with macros.
Currently macros can only work in the small, providing intra-method code generation, but with type macros, implicit macros and annotation macros
it becomes possible to do stuff that transforms the very fabric of the language.&lt;/p&gt;

&lt;p&gt;There are already designs of &lt;a href=&quot;http://akuklev.livejournal.com/1068955.html&quot;&gt;a theorem prover interface&lt;/a&gt;
and &lt;a href=&quot;http://www.slideshare.net/akuklev/scala-circuitries&quot;&gt;an effect-capturing system&lt;/a&gt; that can be built on top of the new
flavors of macros. We also have some sketches already outlined on this site (&lt;a href=&quot;http://scalamacros.org/future.html&quot;&gt;http://scalamacros.org/future.html&lt;/a&gt;), but expect more information to come over the next months.&lt;/p&gt;

&lt;p&gt;Despite having new and shiny things to research, we definitely do not plan to abandon the freshly implemented functionality.
Our &lt;a href=&quot;https://issues.scala-lang.org/secure/IssueNavigator.jspa?mode=hide&amp;requestId=10908&quot;&gt;macro- and reflection-related issue tracker&lt;/a&gt;
is only slightly over 100 bugs and improvement suggestions. We dare you to double this amount!&lt;/p&gt;

&lt;p&gt;On a more serious note, we're well aware of the limitations of the current macro system (separate compilation, awkwardness
in scenarios the involve untyped or partially typed trees). There are some ideas how to overcome these hurdles, and we plan
to look into these ideas as we go.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;Putting it in a nutshell&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Download the freshly released &lt;a href=&quot;http://www.scala-lang.org/node/13096&quot;&gt;Scala 2.10.0-RC1&lt;/a&gt;,
get started using &lt;a href=&quot;/documentation/gettingstarted.html&quot;&gt;our documentation&lt;/a&gt;, explore the macrology
&lt;a href=&quot;http://groups.google.com/group/scala-user&quot;&gt;together with us&lt;/a&gt; and have fun! We hope you'll like macros -
the incarnation of compile-time metaprogramming for Scala.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Research projects</title>
      <link>http://scalamacros.org/news/2012/11/05/research-projects.html</link>
      <pubDate>Mon, 05 Nov 2012 00:00:00 PST</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2012/11/05/research-projects</guid>
      <description>&lt;p&gt;It's this time of the year at EPFL. We sit down together and come up with the research projects
we'd like to propose to our students and to the entire Scala community. This fall our list is
rich on macro-related ideas, which are listed below. For the full list
of the projects offered by our lab refer to &lt;a href=&quot;http://lamp.epfl.ch/teaching/projects&quot;&gt;http://lamp.epfl.ch/teaching/projects&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Optimizing collections with macros&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;High-order functions such as map, filter and foreach provide a very convenient way to work with collections, but this convenience often comes at a cost of performance. Typical use cases for collection processing involve anonymous functions, which usually compile down to JVM anonymous classes introducing noticeable runtime overhead.&lt;/p&gt;

&lt;p&gt;With the advent of macros in Scala 2.10, the programmer can control how exactly the compiler is compiling invocations of given methods. By declaring collections methods as macros, it becomes possible to transform their usages into plain while loops, bringing the performance back to normal.&lt;/p&gt;

&lt;p&gt;Within this project your work will be to: 1) devise a mini-benchmark to measure the state of the art performance of collections, 2) rewrite popular collection methods as macros, 3) assess the performance improvements.&lt;/p&gt;

&lt;p&gt;A further extension to the project baseline is collection operation folding. It is quite common to see code like: &lt;code&gt;list zipWithIndex filter { case (cls, idx) =&gt; … } map (_._1)&lt;/code&gt; which creates a new collection at each operation. It would be great if we could fuse the operations into a single one. This wouldn’t work if the partial result is stored in a variable, but many invocations are just one-liners which perform all the operations one after the other.&lt;/p&gt;

&lt;p&gt;Offered by &lt;a href=&quot;mailto:eugene.burmako@epfl.ch&quot;&gt;Eugene Burmako&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Using reified types for specialization&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Generic code increases programmer productivity as it increases code reuse. For example, the LinkedList abstraction can be used in many contexts, from storing a list of numbers to storing representations of files on the disk. Unfortunately this comes at the expense of performance, as the generic code needs a common representation for all types. The common representation is usually a pointer to heap data. But for value types, such as integers, bytes and even value classes (see SIP-15) this leads to significant overheads, as they need to be allocated as objects on the heap and then pointed to, breaking data locality and adding an extra indirection.&lt;/p&gt;

&lt;p&gt;To overcome this performance loss, many programming languages and virtual machines perform code specialization, which creates a copy of the generic class for each value type and adapts the data representation.&lt;/p&gt;

&lt;p&gt;Scala does not require type parameters to be known at compile time, thus allowing truly-generic code to be generated. In this case, type information is not necessary and will not available in the generated bytecode. But this prohibits programmers from using specialized code from generic code, which might be desirable.&lt;/p&gt;

&lt;p&gt;Scala can overcome the loss of type information in generic classes by attaching types in so-called ClassTags (formerly known as Manifests). This information can be used to dispatch to the correct specialized class implementation, and can be made either as a compiler plugin or as a macro. Either implementation is fine, as long as the syntactic overhead is reasonable. For this project one should research what is the best implementation and prepare a set of benchmarks that clearly show the performance hit of dispatching based on the ClassTag.&lt;/p&gt;

&lt;p&gt;Offered by &lt;a href=&quot;mailto:vlad.ureche@epfl.ch&quot;&gt;Vlad Ureche&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Macro-based class system&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;One of the important techniques enabled by compile-time metaprogramming is modular language extensibility. With macros, functionality that is typically provided as a hardcoded set of language features can be introduced piece-wise, as a part of the standard library. This is applicable even for such a fundamental functionality as class system [1].&lt;/p&gt;

&lt;p&gt;For this project you will: 1) define a baseline subset of Scala that would be used to host the class system, 2) implement a macro-based desugaring which maps object-oriented concepts onto the baseline (an example of such a desugaring can be found in [2]).&lt;/p&gt;

&lt;p&gt;The project is especially interesting in the context of the dependent object types research [3], which aims to provide a foundation of Scala. Macros can separate the core calculus of DOT from the rest of the language, keeping the heart of the language pristine.&lt;/p&gt;

&lt;p&gt;References:&lt;br/&gt;
[1] Scheme with Classes, Mixins, and Traits &lt;a href=&quot;http://www.ccs.neu.edu/racket/pubs/asplas06-fff.pdf&quot;&gt;http://www.ccs.neu.edu/racket/pubs/asplas06-fff.pdf&lt;/a&gt;&lt;br/&gt;
[2] Types and Programming Languages &lt;a href=&quot;http://www.cis.upenn.edu/~bcpierce/tapl/&quot;&gt;http://www.cis.upenn.edu/~bcpierce/tapl/&lt;/a&gt;&lt;br/&gt;
[3] Dependent Object Types, Towards a foundation for Scala’s type system &lt;a href=&quot;http://lampwww.epfl.ch/~amin/dot/fool.pdf&quot;&gt;http://lampwww.epfl.ch/~amin/dot/fool.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Offered by &lt;a href=&quot;mailto:eugene.burmako@epfl.ch&quot;&gt;Eugene Burmako&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Macro-based continuations&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Starting with version 2.10, Scala features a lightweight alternative to compiler plugins - macros, which democratize compile-time metaprogramming. Several important problems such as code reification have already been solved with macros, and we’re continuously looking into ways to simplify the compiler by implementing its parts as macros and moving them into the standard library.&lt;/p&gt;

&lt;p&gt;Continuations in Scala [1] are implemented by a series of type-directed transformations, which involve the typechecker and span two additional compilation phases. There is a conjecture that this logic can be packed into one or several macros, which gives rise to this project.&lt;/p&gt;

&lt;p&gt;This project involves: 1) understanding how the CPS transform works currently, 2) devising a way to express non-local code rewritings with macros, possibly extending the current macro system, 3) implementing the CPS transform with macros.&lt;/p&gt;

&lt;p&gt;References:&lt;br /&gt;
[1] Implementing First-Class Polymorphic Delimited Continuations by a Type-Directed Selective CPS-Transform &lt;a href=&quot;http://lampwww.epfl.ch/~rompf/continuations-icfp09.pdf&quot;&gt;http://lampwww.epfl.ch/~rompf/continuations-icfp09.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Offered by &lt;a href=&quot;mailto:eugene.burmako@epfl.ch&quot;&gt;Eugene Burmako&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Multi-stage programming with macros&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Multi-stage programming (staging) [1] is a promissing aproach for developing high-performance programs with a high-level programming model. LMS [2] (type-driven staging) complements staging with type-safety and modularaity through the use of abstract data types. This approach is great for library/DSL developers but library/DSL users often face complex type errors that are hard to understand.&lt;/p&gt;

&lt;p&gt;This project aims to use metaprogramming with Scala macros to provide simple interface for library/DSL users while giving the full abstract data type approach to library/DSL developers. Each LMS program will be pre-processed with a macro that replaces method calls with their DSL representatives. This will allow simple type checking (without abstract types) and thus improve the interface for numerous DSLs. Additionaly the macro will analyze static methods imported into the DSL and try to convert them into the DSL representation. For example, calling `Math.pow(x, 3)` will be automatically imported into the DSL if its interface allows for all its building blocks.&lt;/p&gt;

&lt;p&gt;References:&lt;br /&gt;
[1] Multi-stage programming: &lt;a href=&quot;http://www.cs.rice.edu/~taha/MSP/&quot;&gt;http://www.cs.rice.edu/~taha/MSP/&lt;/a&gt;&lt;br /&gt;
[2] Lightweight Modular Staging: A Pragmatic Approach to. Runtime Code Generation and Compiled DSLs &lt;a href=&quot;http://infoscience.epfl.ch/record/150347/files/gpce63-rompf.pdf&quot;&gt;http://infoscience.epfl.ch/record/150347/files/gpce63-rompf.pdf&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Offered by &lt;a href=&quot;mailto:vojin.jovanovic@epfl.ch&quot;&gt;Vojin Jovanovic&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Interpreter for abstract syntax trees&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Macros introduced in Scala 2.10 can be viewed as compiler plugins, but unlike full-fledged compiler plugins, they are much more convenient to write and maintain. This makes metaprogramming in Scala accessible for a wide range of users, increasing the number of programming problems that can be solved in a concise and maintainable way.&lt;/p&gt;

&lt;p&gt;Yet there are still some hurdles that make metaprogramming in Scala more complicated than it should be. The most annoying of these obstacles is the separate compilation restriction, which requires macro implementations and macro usages to be compiled separately. This restriction is reasonable, because to call a macro implementation during compilation, that implementation must be in executable form. Nevertheless it’s possible to do better.&lt;/p&gt;

&lt;p&gt;Scala compiler represents programs (including macro implementations) as abstract syntax trees, which go through the compilation pipeline and eventually end up as executable Java bytecodes. The idea of this project is to shortcut the path from trees to executables by writing an interpreter.&lt;/p&gt;

&lt;p&gt;Your tasks in this project will be to: 1) determine whether the entire Scala language can be faithfully interpreted, 2) implement the interpreter and hook it into the macro engine, 3) evaluate the performance of interpretation in comparison with the performance of compiled code.&lt;/p&gt;

&lt;p&gt;Offered by &lt;a href=&quot;mailto:eugene.burmako@epfl.ch&quot;&gt;Eugene Burmako&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Updated the documentation</title>
      <link>http://scalamacros.org/news/2012/04/29/updated-the-documentation.html</link>
      <pubDate>Sun, 29 Apr 2012 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2012/04/29/updated-the-documentation</guid>
      <description>&lt;p&gt;I have just updated &lt;a href=&quot;/documentation/index.html&quot;&gt;documentation&lt;/a&gt; for macros.
It now features a getting started example and a reference of macro context and reflection API.&lt;/p&gt;

&lt;p&gt;The documentation also features my recent talk about &lt;a href=&quot;/talks/2012-04-28-MetaprogrammingInScala210.pdf&quot;&gt;metaprogramming in Scala 2.10&lt;/a&gt;.
Be sure to take a look, because the slides not only describe trees, symbols and types - three core data structures of Scala compiler, but also
suggest a few tricks that make it easy to explore compiler's inner workings and find out necessary information by yourself.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Metaprogramming talk</title>
      <link>http://scalamacros.org/news/2012/04/28/metaprogramming-talk.html</link>
      <pubDate>Sat, 28 Apr 2012 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2012/04/28/metaprogramming-talk</guid>
      <description>&lt;a href=&quot;/talks/2012-04-28-MetaprogrammingInScala210.pdf&quot;&gt;Redirecting to /talks/2012-04-28-MetaprogrammingInScala210.pdf&lt;/a&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  window.location = &quot;/talks/2012-04-28-MetaprogrammingInScala210.pdf&quot;
&lt;/script&gt;
</description>
    </item>
    
    <item>
      <title>Scala Days 2012 talk</title>
      <link>http://scalamacros.org/news/2012/04/18/scala-days-2012-talk.html</link>
      <pubDate>Wed, 18 Apr 2012 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2012/04/18/scala-days-2012-talk</guid>
      <description>&lt;a href=&quot;/talks/2012-04-18-ScalaDays2012.pdf&quot;&gt;Redirecting to /talks/2012-04-18-ScalaDays2012.pdf&lt;/a&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  window.location = &quot;/talks/2012-04-18-ScalaDays2012.pdf&quot;
&lt;/script&gt;
</description>
    </item>
    
    <item>
      <title>Macro SIP released</title>
      <link>http://scalamacros.org/news/2012/03/09/macro-sip-released.html</link>
      <pubDate>Fri, 09 Mar 2012 00:00:00 PST</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2012/03/09/macro-sip-released</guid>
      <description>&lt;a href=&quot;https://docs.google.com/document/d/1O879Iz-567FzVb8kw6N5OBpei9dnbW0ZaT7-XNSa6Cs/edit?hl=en_US&quot;&gt;Redirecting to https://docs.google.com/document/d/1O879Iz-567FzVb8kw6N5OBpei9dnbW0ZaT7-XNSa6Cs/edit?hl=en_US&lt;/a&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  window.location = &quot;https://docs.google.com/document/d/1O879Iz-567FzVb8kw6N5OBpei9dnbW0ZaT7-XNSa6Cs/edit?hl=en_US&quot;
&lt;/script&gt;
</description>
    </item>
    
    <item>
      <title>Macro annotations</title>
      <link>http://scalamacros.org/news/2011/11/15/macro-annotations.html</link>
      <pubDate>Tue, 15 Nov 2011 00:00:00 PST</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/11/15/macro-annotations</guid>
      <description>&lt;p&gt;I'm excited to announce that we've decided to introduce a third flavor of macros into project Kepler, namely: &lt;code&gt;macro annotations&lt;/code&gt;.
These macros are very much inspired by Nemerle, but there are some important differences.&lt;/p&gt;

&lt;p&gt;In line with the idea of transparent embedding into the language, macro annotations look the same as regular annotations,
but instead of being static participants of the compilation, they trigger AST rewriting.
As of such, macro annotations are expanded strictly after all other macros applicable to the annottee
(e.g. macro annotations for a class kick in after all macro types get expanded and after the entire inheritance chain is resolved and the members are mixed in).&lt;/p&gt;

&lt;p&gt;We have also played with the idea of macro annotations affecting outer scopes as well. For example, if we put a &lt;code&gt;@lazy&lt;/code&gt; macro annotation
on a parameter of some method &lt;code&gt;def m(@lazy x: T)&lt;/code&gt;, then we'd really like the annotation to overwrite the entire method.
However, it's not perfectly clear how far upwards we should go (e.g. it might also be reasonable to wish that a member annotation rewrites the entire class),
so we decided to do away with this idea for the moment.&lt;/p&gt;

&lt;p&gt;Later today or tomorrow I will update the site with examples and further details about macro annotations.
Stay tuned and let us know what you think at &lt;a href=&quot;mailto:dev@scalamacros.org&quot;&gt;dev@scalamacros.org&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Seven use cases added</title>
      <link>http://scalamacros.org/news/2011/11/11/seven-use-cases-added.html</link>
      <pubDate>Fri, 11 Nov 2011 00:00:00 PST</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/11/11/seven-use-cases-added</guid>
      <description>&lt;p&gt;To be honest, this site, created a few days ago, wasn't intended for going all public right off the bat.
Instead, I planned to gradually improve the content and then release it without hassle.&lt;/p&gt;

&lt;p&gt;As you can guess, it was a complete surprise for me to hear from Tiark that
the site &lt;a href=&quot;http://news.ycombinator.com/item?id=3215210&quot;&gt;has been mentioned on Hacker News&lt;/a&gt;.
My first thought was: &quot;Omg, I didn't have the time to write about use cases for macros&quot;.
And rightly so - the very first comment pointed that &quot;thing that bothers me is the empty 'Use cases' page.
Scala macros might be a solution to a problem nobody has&quot;. Oh, dear, what a shame!&lt;/p&gt;

&lt;p&gt;That's why I tried hard to put up several &lt;a href=&quot;/usecases/index.html&quot;&gt;use cases&lt;/a&gt;
that I've gathered during the last few months of conversations about macros.
I hope that this will alleviate possible misunderstandings that have arisen.&lt;/p&gt;

&lt;p&gt;In any case, thanks for your feedback, folks - it's very inspiring to know
that project Kepler has found its audience right after the inception!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Talk at scala.by meetup (Russian)</title>
      <link>http://scalamacros.org/news/2011/10/29/talk-at-scalaby-meetup.html</link>
      <pubDate>Sat, 29 Oct 2011 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/10/29/talk-at-scalaby-meetup</guid>
      <description>&lt;a href=&quot;http://habrahabr.ru/blogs/scala/131919/&quot;&gt;Redirecting to http://habrahabr.ru/blogs/scala/131919/&lt;/a&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  window.location = &quot;http://habrahabr.ru/blogs/scala/131919/&quot;
&lt;/script&gt;
</description>
    </item>
    
    <item>
      <title>Status update and call for feedback</title>
      <link>http://scalamacros.org/news/2011/10/18/status-update-and-call-for-feedback.html</link>
      <pubDate>Tue, 18 Oct 2011 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/10/18/status-update-and-call-for-feedback</guid>
      <description>&lt;p&gt;My today's talk at the Scala meeting was about concrete ideas of bringing the notions of compile-time metaprogramming to Scala. The slides covers such fancy beasts as macro defs, macro types and even macro annotations. This is highly experimental and, definitely, not everything will make it into a Scala improvement proposal, but take a look and share your thoughts: &lt;a href=&quot;/talks/2011-10-18-WhatsUp.pdf&quot;&gt;read slides from today's talk&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;During this month I've received a lot of very useful feedback. Say, Chris and Stefan want to experiment with LINQ-flavored facilities for Scala. They need reification, composability of queries, static checking/optimization of queries and transparency for the user. After a couple of discussions, we've come up with several ways of doing all that stuff with macros in a win-win fashion.&lt;/p&gt;

&lt;p&gt;Also, for instance, Greg and Nada routinely have to bite the bullet and deal with gazillions of overloads that cover all those countless FunctionN and TupleN classes for their Scala to JavaScript crosscompiler. No problem, macros come to the rescue. After a brainstorming session, the draft of the proposal now features a way to generate tedious code with macros.&lt;/p&gt;

&lt;p&gt;I'm hinting that at this very phase your feedback is priceless and has the possibility to significantly affect the design of Scala's macro system. Got a compelling use-case that can be simplified by macros? Just drop me a line in the comments here or to my email (see my profile or google for my name). I don't even have a beta version of macro-related Scala improvement proposal yet, so it would be very use to adapt macros to your personal use-cases. Looking forward to your comments!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Updated project goals for this fall</title>
      <link>http://scalamacros.org/news/2011/10/02/updated-project-goals-for-this-fall.html</link>
      <pubDate>Sun, 02 Oct 2011 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/10/02/updated-project-goals-for-this-fall</guid>
      <description>&lt;p&gt;My previous plans involved slowly starting with quasiquotations and gradually proceeding further, however, an unexpected event turned everything upside down.&lt;/p&gt;

&lt;p&gt;Apparently, &lt;a href=&quot;http://scalaquery.org&quot;&gt;Stefan Zeiger&lt;/a&gt; and &lt;a href=&quot;http://code.google.com/p/scala-integrated-query/&quot;&gt;Christopher Vogt&lt;/a&gt;
will be working at LAMP/TypeSafe starting from this October, and they are going to participate in a joint fun project of implementing LINQ for Scala.
What a stunning use-case for macros! Would be really awesome to roll something working asap.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Splicing</title>
      <link>http://scalamacros.org/news/2011/09/28/splicing.html</link>
      <pubDate>Wed, 28 Sep 2011 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/09/28/splicing</guid>
      <description>&lt;p&gt;The journey to macroland keeps amazing me!&lt;/p&gt;

&lt;p&gt;Take splices. At first they seemed just a clever response to AST composability issue. Then I figured out that &lt;a href=&quot;/talks/2011-09-27-ProjectKepler.pdf&quot;&gt;splices can be used to drastically simplify pattern matching&lt;/a&gt;. But even that didn't exhaust the bag of tricks provided by splices!&lt;/p&gt;

&lt;p&gt;A few days after the pattern matching revelation, I learned how &lt;a href=&quot;http://dl.dropbox.com/u/10497693/Library/Computer%20Science/Metaprogramming/Macros/Quasiquotations/Syntax/Ellipses%20in%20Scheme.pdf?dl&quot;&gt;schemers use ellipses to write declarative syntax transformers&lt;/a&gt;. Say, we want to code up the following syntactic transformation: (let ([var val] ...) body) = ((lambda (var ...) body) val ...). Clear and concise, but imagine how ugly this will become when we'll try to transform this informal notation into executable code.&lt;/p&gt;

&lt;p&gt;This problem has been addressed by Eugene Kohlbecker, a researcher from Scheme community. He extended the macro system to literally understand those ellipses:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scheme&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;define-syntax &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;my-let&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;syntax-rules &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;my-let&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Talk at Scala meeting</title>
      <link>http://scalamacros.org/news/2011/09/27/talk-at-scala-meeting.html</link>
      <pubDate>Tue, 27 Sep 2011 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/09/27/talk-at-scala-meeting</guid>
      <description>&lt;p&gt;Today I gave a talk about macros at Scala meeting. The slides start with a basic example of a compiler macro, proceed with more advanced stuff from macrology and conclude with project ideas: &lt;a href=&quot;/talks/2011-09-27-ProjectKepler.pdf&quot;&gt;read slides from today's talk&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Epiphany about quasiquotes</title>
      <link>http://scalamacros.org/news/2011/09/20/epiphany-about-quasiquotes.html</link>
      <pubDate>Tue, 20 Sep 2011 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/09/20/epiphany-about-quasiquotes</guid>
      <description>&lt;p&gt;Quasiquotes do not have to conform to the syntax rules of the host language. In fact, they can be written in arbitrary style, as long as this style somehow exposes antiquotation facilities.&lt;/p&gt;

&lt;p&gt;With such quasiquotes one can, say, concisely implement type-safe regexes or easily express peephole optimizations. Read more on that in &lt;a href=&quot;http://www.eecs.harvard.edu/~mainland/publications/mainland07quasiquoting.pdf&quot;&gt;&quot;Why It’s Nice to be Quoted: Quasiquoting for Haskell&quot;&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Macros in a typed language with syntax: state of the art</title>
      <link>http://scalamacros.org/news/2011/09/18/macros-in-a-typed-language.html</link>
      <pubDate>Sun, 18 Sep 2011 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/09/18/macros-in-a-typed-language</guid>
      <description>&lt;p&gt;Today I've read two fundamental papers on Nemerle macros: &lt;a href=&quot;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.121.8658&amp;rep=rep1&amp;type=pdf&quot;&gt;&quot;Syntax-Extending and Type-Reflecting Macros in an Object-Oriented Language&quot;&lt;/a&gt; (referred to as &quot;the thesis&quot;) and &lt;a href=&quot;http://dl.dropbox.com/u/10497693/Library/Computer%20Science/Metaprogramming/Macros/Quasiquotations/Syntax/Язык%20Немерле,%20часть%205.pdf?dl&quot;&gt;&quot;Язык Немерле, часть 5&quot;&lt;/a&gt; (referred to as &quot;the article&quot;, sorry, folks, it's in Russian). Also I had a fruitful conversation with VladD2, the principal developer of Nemerle (kudos, Vlad, for your desire to help and very detailed explanations). Some preliminary findings:&lt;/p&gt;

&lt;p&gt;1) Quasiquotation is very elegant. It only takes three intuitive language constructs (quotation, antiquotation, splicing, see the section 8.3 of the thesis for the summary and the section &quot;Квази-цитирование&quot; of the article for the details) to significantly simplify parsing and generation of abstract syntax trees. I was especially impressed by the usage of antiquotes and splices together with pattern-matching. Personally for me, the beauty of quasiquotations is especially striking after the &lt;a href=&quot;http://cs.hubfs.net/blogs/tomasp/archive/2007/10/15/dynamic_queries_csharp_and_fsharp.aspx&quot;&gt;troubles with composability of LINQ expression trees&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;2) However, there's a painfully familiar problem with LINQ that still persists. How do we lift (i.e. transform to an AST) code from the outer world? &lt;a href=&quot;http://www.cs.rutgers.edu/~ccshan/tagless/talk.pdf&quot;&gt;Staging adepts&lt;/a&gt; take it easy - they lift all functions and values that have staged types (explicitly in tagful style or implicitly in tagless style, see the previous link to find out what this means) and ignore everything else. This comes at a price of syntactic overhead of extra typing (pun intended) + potential performance degradation due to possibly tagful AST representation (take a look &lt;a href=&quot;http://www.cse.chalmers.se/~josefs/DSLTutorial/tutorialSlides.html#(1)&quot;&gt;here&lt;/a&gt; for more details), though the interop with the outer world is kinda ok. With macros we have to bite the bullet - in most cases one needs explicit antiquotations, and this imposes overhead at every callsite that references external code that one wants to lift. There's also a non-obvious dilemma of whether we allow macros to see values from their definition scopes (see the section 2.3.3 of the thesis).&lt;/p&gt;

&lt;p&gt;3) Also it's completely unclear how to implement orthogonal codegeneration via macros in a statically typed OO-language. Firstly, macros most likely need to be moved to a separate unit of compilation. Secondly, when writing a macro we have a choice: to bear with untyped ASTs and have a possibility to generate new types, or to enjoy typed ASTs at the cost of locked typespace (don't even think about what happens if we add type inference to the mix). Thirdly, object-orientedness pours even more fuel to the fire since we get a completely heterogeneous concept of classes that do not compose with functions + there's inheritance. This all brings us to a classic nightmare familiar from stateful programming, when operations are randomly prohibited or allowed depending on the phase of the Moon. After all, it's not surprising that F# designers &lt;a href=&quot;http://research.microsoft.com/pubs/147193/heterogeneous-execution.pdf&quot;&gt;did not implement code generating macros&lt;/a&gt; and only went for read-only quasiquotations.&lt;/p&gt;

&lt;p&gt;4) Regarding error messages and debugging for the code generated during macro expansion - it's not as bad as it seems. Along with generating executable code we can also generate surrogate source code for macro expansions (we do have an AST after all) which can be used to produce sane debug info. Of course, the original line numbers will be corrupted (yep, we can restore them with &lt;a href=&quot;http://www.cis.upenn.edu/~bcpierce/papers/lenses-etapsslides.pdf&quot;&gt;lenses&lt;/a&gt;, but stepping in the debugger will still be crazy) and there's a glitch with stack traces, but that's at least something, huh? Staging guys have much harder time here (e.g. see the slide #15 of the &lt;a href=&quot;http://www.stanford.edu/class/cs442/lectures_unrestricted/cs442-lms.pdf&quot;&gt;LMS presentation&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;5) Moreover, it's desirable for macros in a language with syntax to have some control over the parser (e.g. see the section 6 of the thesis and also the &lt;a href=&quot;http://users.rcn.com/david-moon/PLOT/Moon-ILC09.pdf&quot;&gt;&quot;Genuine, Full-power, Hygienic Macro System for a Language with Syntax&quot;&lt;/a&gt; tech report). This enables the programmer to implement such useful thingies as custom modifiers for declarations (think, &quot;async method&quot; or &quot;method ... precondition ...&quot;) or even completely new syntactic constructs. Frankly speaking, this is useful, but not mandatory: the prior can be implemented with annotations that trigger macros for their annotees, while the latter is kinda already in Scala (e.g. see &lt;a href=&quot;http://www.scala-lang.org/node/138&quot;&gt;the canonic implementation of the &quot;while&quot; loop&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;All in all, at the moment the concept of macros in mainstream programming languages looks to me like a weird mix of butterflies, unicorns, spiders and worms. &lt;a href=&quot;http://research.microsoft.com/en-us/um/people/simonpj/papers/meta-haskell/meta-haskell.pdf&quot;&gt;Template Haskell&lt;/a&gt;, here I come.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Announcement at scala-user</title>
      <link>http://scalamacros.org/news/2011/09/17/announcement-at-scala-user.html</link>
      <pubDate>Sat, 17 Sep 2011 00:00:00 PDT</pubDate>
      <author>dev@scalamacros.org</author>
      <guid>http://scalamacros.org/news/2011/09/17/announcement-at-scala-user</guid>
      <description>&lt;a href=&quot;http://groups.google.com/group/scala-user/browse_thread/thread/800353f4a9ce36b9&quot;&gt;Redirecting to http://groups.google.com/group/scala-user/browse_thread/thread/800353f4a9ce36b9&lt;/a&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  window.location = &quot;http://groups.google.com/group/scala-user/browse_thread/thread/800353f4a9ce36b9&quot;
&lt;/script&gt;
</description>
    </item>
    
  </channel>
</rss>