Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
曹力
@ShiningRay
高级会员
第 729 位会员 / 2012-01-10

暴走漫画
上海
26 篇帖子 / 548 条回帖
58 关注者
4 正在关注
1 收藏
GitHub Public Repos
  • artela-throttle-aspect 3

    Throttle Aspect for Artela Blockchain

  • modern-art-drive-react 1

  • exchange_engine 1

  • ethereum.rb 1

    Ethereum library for the Ruby language

  • catalog 1

    The Ruby Toolbox library catalog. If you'd like to contribute to the categorizations of Ruby open...

  • eth.rb 0

    a straightforward library to build, sign, and broadcast ethereum transactions anywhere you can ru...

  • xudt-test 0

  • xudt_splitter 0

  • ruby-virtual-actor 0

  • swim 0

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 最近写了一些关于分布式数据库的博文 at 2015年04月28日

    顶楼主

  • 2015年3月29日 Rubyist 上海 2015 Q1 聚会 at 2015年03月21日

    我们也可以出个 topic

  • 2015年3月29日 Rubyist 上海 2015 Q1 聚会 at 2015年03月21日

    暴漫上海开发团队组团参观

  • 我喜欢酱紫的 Hash at 2015年03月13日

    #33 楼 @ery

    require 'benchmark'
    
    def test1
      options = {}
    options[:url] = "好看"
    options[:host] = "我喜欢"
    options[:customer] = {}
    options[:customer][:name] = "爱死了"
    options[:customer][:number] = "越看越喜欢"
    options[:customer][:bills] = []
    options[:customer][:bills] << {number: "白", memo: "漂亮"}
    options[:customer][:bills] << {number: "富", memo: "漂亮"}
    options[:customer][:bills] << {number: "美", memo: "漂亮"}
    options[:comments] = []
    options[:comments] << "有人说酱紫冗余"
    options[:comments] << "的确有点,不过我依然喜欢酱紫"
    end
    
    def test2
      options = {
      url: "注意!结尾必须写逗号",
      host: "如果不写逗号,那么会报错",
      customer: {
        name: "逗号很小, 不明显, 不小心删掉了,都很难发现",
        number: "结尾还有很多括号, 好崩溃呀",
        bills: [
          {number: "苦逼", memo: "苦逼苦逼苦逼苦逼"},
          {number: "苦逼", memo: "苦逼苦逼苦逼苦逼"},
          {number: "苦逼", memo: "苦逼苦逼苦逼苦逼"}, #这个逗号不会报错 神奇吧
        ] # 最后一个元素可以不写逗号
      }, # 最后一个元素可以写逗号
    }
    end
    
    n = 5000000
    Benchmark.bm do |x|
      x.report { n.times { test1 } }
      x.report { n.times { test2 } }
    end
    
    
    
    shanshan:~/tmp$ ruby test.rb
           user     system      total        real
      17.210000   0.030000  17.240000 ( 17.240030)
      14.190000   0.010000  14.200000 ( 14.208981)
    

    测试环境:Mac OS X 10.9.5, Ruby 2.1.5

  • 我喜欢酱紫的 Hash at 2015年03月13日

    楼主的写法性能低,所以一般我不会采纳

  • [转王垠] 怎样尊重一个程序员 at 2015年03月13日

    有些地方并不认同

  • Rails 5 什么时候会上? at 2015年02月13日

    这次感觉毫无期待啊

  • 3 at 2014年11月10日

    两年经验 8K 会不会有点少啊

  • [上海,南京] 暴走漫画诚聘各路英才,一起改变中国动漫产业 at 2014年10月24日

    不错不错,加油加油

  • 哪位有经验的分享下 rabbitmq 和 zeromq 什么情况应该用哪个 at 2014年09月29日

    你就把 zeromq 想成一个高级的通讯库,本身不是应用

    rabbitmq 才是真正的消息队列

  • 妹子踏入互联网,如何了解程序员思维? at 2014年09月25日

    #11 楼 @badboy 怎么可能!?

  • 妹子踏入互联网,如何了解程序员思维? at 2014年09月25日

    找个程序员做男票

  • 新闻 News 该如何建 Model 名字? at 2014年09月24日

    你可以叫 Article 或者 Post 啊

  • [上海] 触易付诚聘诚聘 Ruby 攻城狮,前端工程师,绝对靠谱! at 2014年09月17日

    有多靠谱?

  • Ruby 2.2 的 可回收 symbol at 2014年09月12日

    这个的意义主要是用于减少内存占用?

  • CoffeeScript 里 `?=` 这个运算符在 Ruby 里有对应的语法吗? at 2014年09月03日

    #5 楼 @creeek ruby 里面没 undefined 一说

  • CoffeeScript 里 `?=` 这个运算符在 Ruby 里有对应的语法吗? at 2014年09月01日

    #2 楼 @layerssss 那说明 JS 和 Ruby 对于 undefined 的概念是不一样的

  • CoffeeScript 里 `?=` 这个运算符在 Ruby 里有对应的语法吗? at 2014年08月31日

    ||=

  • [周末杂谈] Ruby 元编程之 E=mc2 at 2014年08月24日

    index.php

  • 【传教向】LiveScript,不仅仅是 JavaScript at 2014年08月24日

    LiveScript 太炫不易掌握,也没有足够多的 Best Practise 支持开发

  • [上海] 七周七语言之 Ruby -2014年8月16日 at 2014年08月22日

    #118 楼 @gene_wu http://vdisk.weibo.com/s/Ay3-RMoRrnL7

  • RubyConf China 2014 演讲征集 at 2014年08月14日

    #3 楼 @wcc526 他来应该会喷很多人吧

  • [上海] 七周七语言之 Ruby -2014年8月16日 at 2014年07月30日

    报名辅导者

  • 请不要白费生命去比较编程语言 Why Swift Will Never Replace RubyMotion at 2014年07月08日

    #12 楼 @kgen 你运气不错了

  • 请不要白费生命去比较编程语言 Why Swift Will Never Replace RubyMotion at 2014年07月08日

    #5 楼 @tommy__ 四川人跟上海人说,这菜一点都不辣

  • 36kr 上,Fengche.co 打算开始 A 轮融资了 at 2014年07月06日

    恭喜

  • ajax 算是多线程么? at 2014年07月05日

    #12 楼 @xiongxin8802 然后呢?有人想让 js 变得像 java,所以留了很多 java 的关键词进来,包括 class,所以这个 synchronized 是抄 java 的,这有什么问题?

    我认为以后 synchronized 也根本不会被用到

    可能我是没说清

  • ajax 算是多线程么? at 2014年07月05日

    #7 楼 @xiongxin8802 因为是抄 Java 的

  • 上一页
  • 1
  • 2
  • 3
  • 4
  • …
  • 18
  • 19
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English