Jesper Boeg on Priming Kanban
In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Werner Schuster on Apr 22, 2009
ParseTree is a library that allows to access the parse tree of Ruby code - either Ruby source code or Ruby code already loaded in the interpreter.
Ryan Davis, who is one of the developers behind ParseTree, now makes it clear in a post on ParseTree's future:
ParseTree is dead on ruby 1.9 and there is no plan to make it work.
Because of changes to internals in 1.9, ParseTree simply can not work. I asked for hooks/options to allow us to get to the information but they never arrived.
Specifically if you're using ParseTree to access the AST of a live method/block/proc, you're SOL. If you're just using ParseTree to do static analysis, then you can switch to
ruby_parser in about a minute of work and you're good to go.
While ParseTree continues to work fine on Ruby 1.8.x, it won't work on Ruby 1.9.1. There are solutions for parts of ParseTree's functionality, though. Ruby 1.9.x comes with Ripper, which allows to parse Ruby code and analyze their parse trees.
ruby_parser is a Ruby parser written in Ruby (by Ryan Davis); the output is the same as ParseTree's output. Static Analysis tools that work on source are best served by switching to ruby_parser, mostly because it doesn't require code changes (ruby_parser's output is the same as ParseTree's). Ruby_parser also provides source locations of AST nodes, which is obviously necessary for code analysis or code transformation tools in Ruby. Using ruby_parser also allows these tools to be used across all Ruby implementations - ParseTree is only available for MRI (a mostly complete version for JRuby exists, but lacks some runtime features).
However, there is one feature that ruby_parser can't provide: return the parse tree of Ruby code loaded in an interpreter. Some libraries make use of this feature to analyze Ruby code at runtime. One of them is Merb's action arguments, which look at the formal arguments of a method. The feature a was already ported to JRuby without the use of ParseTree. Now, a port to Ruby 1.9.1 is available with the methopara project. Methopara came from work by YARV creator Sasada Koichi and members of asakusa.rb, one of Tokyo's Ruby user groups. The methopara project brings a new API to Ruby 1.9.1:
This gem is only for Ruby-1.9.1. Because Ruby18x have merb-action-args, and Ruby-1.9.2 and its successors will have built-in Method#parameters.
Do you use ParseTree? Can you switch to ruby_parser or is the lack of ParseTree on 1.9.x a problem?
A Guide to Branching and Merging Patterns
A practical guide to choosing the right agile tools
Improve Java Garbage Collection, Runtime Execution, and JVM visibility with Zing
In today’s hyper-competitive world, later may be too late to adopt Agile development and this Roadmap for Success will help you get started. Download "Agile Development: A Manager's Roadmap for Success" now!
You may be able to use the sourcify gem...# Ruby 1.8 with ParseTree gem
proc.to_ruby
# Ruby 1.9 with sourcify gem (may raise MultipleMatchingProcsPerLineError or NoMatchingProcError if you have nested procs)
proc.to_source
# Ruby 1.9 with sourcify gem (giving it a little help finding the right Proc)
proc.to_source :attached_to => :name_of_proc_in_code
Here's how my company replaced ParseTree in Ruby 1.9. I hope that helps!
In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.
Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.
Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
1 comment
Watch Thread Reply