写库 rubocop 在 rake 执行流程里 ide lsp 也可以实时的提醒代码风格问题
所以执行速度是全部 ruby 应用的问题 编译速度是 crystal 应用的问题
crystal 还没有开箱即用的像 prism 的 lexer paser 你可以看看这方面 或者 crystal 的编译缓存优化
现在好了 直接改拓展名 .trb
我想的是 crystal 转译 ruby
用 crystal 享受手写的乐趣 自己 debug,用 ai 去生成 go/rust
crystal 泛型比 go 完备
crystal,更快,ai 会写,有探索的乐趣
看我写的 types.cr
Ruby 标准库文档
可以看一下 Ruby 的 推荐语法风格 - 中文翻译
格式化代码 可以看下我的库:initdc/rubocop-config-crystal
codespace 标准 rvm 环境 未能复现
codespace > /workspaces/workspace (master) gem install cr-exec 0 <<9:50:56
Fetching cr-exec-0.1.0.gem
Successfully installed cr-exec-0.1.0
Parsing documentation for cr-exec-0.1.0
Installing ri documentation for cr-exec-0.1.0
Done installing documentation for cr-exec after 3 seconds
1 gem installed
A new release of RubyGems is available: 3.5.11 → 3.6.3!
Run `gem update --system 3.6.3` to update your installation.
codespace > /workspaces/workspace (master) 0 <<9:51:25
codespace > /workspaces/workspace (master) ruby 1.rb 0 <<9:51:25
Linux
codespace > /workspaces/workspace (master) gem info cr-exec 0 <<9:51:38
*** LOCAL GEMS ***
cr-exec (0.1.0)
Author: initdc
Homepage: https://github.com/initdc/cr-exec
Installed at: /usr/local/rvm/gems/ruby-3.3.4
Wrapper for ruby exec
codespace > /workspaces/workspace (master) 0 <<9:53:36