问下<< 和 <<- 的区别是什么? 还有下面这个代码的语义能否讲解一下
def print_block(*args)
puts <<-TEXT % args
-------------------- block %s
target: %s
data: '%s' + %s (nonce)
found: %s
time:
took: %f
verify: %f
TEXT
end
#1 楼 @yzdel2000 弱弱的问一些,使用 Ract 比使用 Rails 的模板方便吗,或者有什么较大优势,比起后台渲染
一个资深 erlang 开发弱弱的问一句,HTTP/2 和 Ruby/Erlang 有毛关系,为何会扯到 Erlang/Ruby 上?
#1 楼 @huacnlee 大神你好 我使用 thin start -R config.ru 启动 middleman, 但是得到了一个依赖问题, (git-master):~/jk/stat$ thin start -R config.ru WARN: Unresolved specs during Gem::Specification.reset: parallel (>= 0) activesupport (>= 3.1, ~> 4.2) nokogiri (>= 1.3.3, ~> 1.3) mime-types (>= 1.16) sass (>= 3.4) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. /home/god/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:34:in `block in setup': You have already activated concurrent-ruby 1.0.0, but your Gem 0.9.2
我本机安装有 concurrent-ruby 1.0.0 和 0.9.2 版本,这是什么情况?
#2 楼 @nowherekai Thanks 我在看看
五万,,,开玩笑吗。我培训大学生600个课时,讲得都是最难的操作系统,C++,数据结构才8k 你技术有多牛逼,不见得,年薪有100W没。 刚看了一下培训内容,笑尿了,2各月还 FullStack, 你都不觉的这有点自欺欺人吗 给你的对比参考下 http://www.qsknowledge.com/college/index.html 这些课程1W 都不到,600个课时。女老师咋了,又不是卖。开什么玩笑 5W.
erlang 的优点不在于计算,而在于 IO
搞个线下聚会呗。大家都认识一下。
总体来说 Erlang 比 Elixir 更好。 个人感觉你又要函数,又要 OO,就用 scala
@fsword 谢谢 参数的解释 Obviously, ruby is the normal Ruby interpreter. The -r switch requires a file in the load path, in this case Ruby’s lib directory. In this case, it’s loading a file called un.rb so that it looks like -run when taken as a whole. (It could be written as -r un as well.) This is similar to ubygems.rb which you may have seen as ruby -rubygems. That seems like an ugly solution, but it’s elegant in its own way. This naming hack is only really an option for files in Ruby itself, anyway. As you can see above, httpd is just a method, which is executed by -e. The DocumentRoot argument . is just taken as a standard argument using ARGV, which I found surprising. Finally, the port is set using the setup method, which in turn calls out to the built in OptionParser.
http://www.benjaminoakes.com/2013/09/13/ruby-simple-http-server-minimalist-rake/
有电子版的吗?