> LRT: Don't think Perl or Python gets off the hook for the tooling that @avdi
> talks about.
https://twitter.com/brianwisti/status/618815261580263425On the other side, in Python higher-level tools are horrible from an operational perspective, and much worse than Ruby's if you ask me (pip vs bundler, rbtrace vs.. gdb-python(?), pry/pry_remote vs pdb, ...).
Also +1 on boardwaalk's comment, this side of Python is pretty good.
I think Avdi's right in the sense that weak tooling is inevitable due to the language's properties. With Ruby and Python, what you gain in near term productivity and effectiveness you pay for later - your tipping point may vary.
https://github.com/whitequark/parser
Neither unmaintained, broken nor just for old versions. It has some really minor incompatibilities though:
https://github.com/whitequark/parser#known-issues
The same person also wrote a Python parser because apparently the ast module doesn't provide precise location information of tokens:
> seq = RubyVM::InstructionSequence.compile("a = 1 + 2")
=> <RubyVM::InstructionSequence:<compiled>@<compiled>>
> puts seq.disasm
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] a
0000 trace 1 ( 1)
0002 putobject_OP_INT2FIX_O_1_C_
0003 putobject 2
0005 opt_plus <callinfo!mid:+, argc:1, ARGS_SIMPLE>
0007 dup
0008 setlocal_OP__WC__0 2
0010 leave
=> nil
> seq.eval
=> 3I am not aware of many tools written using 'ast', that don't try to extend the language in some way. Any thoughts there?