4 ms·
Macros: their power and challenges — (take 5 william-byrd)
- apgwoz 15y agoI hope that the macro system he's working on bares some fruit. Personally, I've always liked explicit-renaming macros, as they provide you the benefits of both hygiene and (almost) the convenience of defmacro. But, the pattern language of syntax-rules makes it much easier to maintain macros, as you can actually see what it is you're matching without first interpreting the series of list operations... Hopefully the two will be married in some glorious way!
- jlongster 15y agoExplicit renaming also gets annoying because it's done properly you need to rename everything, even basic forms like let, if, cond, etc.
- Arelius 15y agoAnyone ever tried something of a explicit un-renaming macro?
- apgwoz 15y agoRight, and that's the point. Though, I suppose it'd be easy enough to create a code walker which renamed everything unless the symbol started with % or something. That, in my opinion is sort of the beauty of Clojure's macro system. By default, all symbols referred to are expanded to there FQN unless of course you use unquote. My guess is that Byrd's problem with that is that it's not really a hygiene solution so much as it is a system which takes full advantage of 2 things--Clojure vars are immutable and namespaces are unique.
- Arelius 15y agoYes, trying to do anything complicated is always very painful in syntax-rules, and every once in a while, you really do want unhygienic macros. Explicit rename is much simpler to understand, and more powerful. The only problem is that it's easier to make a macro unhygienic. But I figure that if you are already programming in a lisp, you can handle not having the language hold your hand through hygiene, it doesn't anywhere else.
- jules 15y agoIs the miniKanren talk available somewhere?
- swannodette 15y agoYep, http://blip.tv/clojure/dan-friedman-and-william-byrd-minikanren-5936333 http://blip.tv/clojure/dan-friedman-and-william-byrd-minikan...
- apgwoz 15y agoAck! blip doesn't have a non-flash option, nor does it work with gnash (at least the versions I've tried).
- ivank 15y agoyoutube-dl handles blip.tv URLs
- apgwoz 15y agoI also just found movgrab which seems to work fine. With youtube, I've been using yturl and doing mplayer `yturl url` and that's worked fine, unless my connection is spotty. If movgrab doesn't work right I'll try youtube-dl--thanks!
- vu3rdd 15y agoIf you look at the RSS link you can find a download link of a m4v file in high resolution.
- gwern 15y ago> Oleg is an emissary from some advanced alien race. Working with him is both exhausting and enlightening. See? It's not just us Haskellers!
- mindslight 15y agoI started writing a comment asking what is so complex about syntax-case, as it's just pattern matching for procedural macros combined with the optimization of bolted-on uber-symbols (syntax marks). Then I realized I'd answered my own question. I think clojure has a pretty good foundation for hygienic procedural macros - increase the complexity of your symbol type and commit to their values asap. Once you're in procedural macro land, you're inherently dealing with the complexity of the syntax model, so it might as well be as simple as possible.