Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
@kenshin54
高级会员
第 165 位会员 / 2011-11-22

上海
22 篇帖子 / 550 条回帖
38 关注者
0 正在关注
0 收藏
GitHub Public Repos
  • popline 1059

    Popline is an HTML5 Rich-Text-Editor Toolbar

  • crane 14

    A mini linux container.

  • aws-simple-mfa 4

    Use AWS CLI with MFA enabled, but no Assume Role required.

  • firebase-admin-go 0

    Firebase Admin Go SDK

  • lilliput 0

    Resize images and animated GIFs in Go

  • gh-ost 0

    GitHub's Online Schema Migrations for MySQL

  • gifsicle 0

    Gifsicle is a suite of programs for manipulating GIF images and animations.

  • vim-snippets 0

    vim-snipmate default snippets (Previously snipmate-snippets)

  • minigc 0

    minimum gc

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • Ruby 性能真的比 Node 差这么多么? at 2013年08月21日

    #60 楼 @killyfreedom 貌似 EM 默认用的 select,你可以换成 EM.epoll 或者 EM.kqueue 再试试

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月21日

    #58 楼 @killyfreedom c 100 n 1000 比 c 10 n 1000 还强 可以到 2700+

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月21日

    #55 楼 @killyfreedom 加了 JSON.dump 还是有 2400 左右

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月21日

    #53 楼 @killyfreedom em-mongo 不带连接池,但是 em-synchrony 有一个可以创建 Pool 的东西。

    你可以在 ruby 2.0 下跑跑看我的代码,我跑下来速度不差。

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月21日

    #50 楼 @killyfreedom 我又更新了一下,之前是用 1.9.3 的,现在用 2.0.0 测试了一下,跟 Node 比较接近了

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月21日

    #50 楼 @killyfreedom 结果还是 Node 快,你这个测法不对把,1000 个并发,100 个请求?

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月21日

    https://gist.github.com/kenshin54/6284097

  • [9.16 更新两位讲师] RubyConf China 2013 讲师介绍 at 2013年08月20日

    发现 @luikore 嘴上还受伤了

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月20日

    #34 楼 @ywjno 不是这个问题,是我写的内容和显示的最后就不一样

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月20日

    #32 楼 @killyfreedom 额。。。结果是 EM 快。

    有 bug 啊 @huacnlee

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月20日

    #23 楼 @killyfreedom mongodb 我没测试过,但是我测试过 memcached 在 EM 和 Node 的性能,用的 EM 自己提供的 memcached 协议实现,Node 用的是 https://github.com/3rd-Eden/node-memcached ,结果是 EM 快,不包含 web 环境。

  • Ruby 性能真的比 Node 差这么多么? at 2013年08月20日

    用了不同的 gem 肯定会有一些是阻塞 IO 的,即使使用 EM,你的代码里是阻塞的,那最后还是那样。Node 的话,估计他的插件本身都是异步 IO 的,所以这样比较还是不公平的。我觉得问题不在 EM 啊!

  • ZT 不要复杂化 Vim at 2013年08月19日

    = = 我用了 40 个插件。。。

  • 正确理解类变量 at 2013年08月14日

    https://gist.github.com/etrepat/1106487

  • 如何获得数组里面连续的多部分 at 2013年08月14日

    #48 楼 @luikore 進撃の luikore

  • 如何获得数组里面连续的多部分 at 2013年08月14日

    触目惊心,ruby 程序之泪死活要变成一行 误

    a = [1,2,3,5,6,9,10]
    
    arr = []
    
    a.inject(nil) { |last, e| (last && e == last + 1 ? arr.last << e : arr << [e]) and e }
    
  • 如何获得数组里面连续的多部分 at 2013年08月14日

    省个局部变量

    a = [1,2,3,5,6,9,10]
    
    arr = []
    
    a.inject(nil) do |last, e|
      arr.last << e if c = (last and e == last + 1)
      arr << [e] unless c
      e
    end
    
  • 如何获得数组里面连续的多部分 at 2013年08月14日
    a = [1,2,3,5,6,9,10]
    
    arr, last = [], nil
    
    a.each do |e|
      arr.last << e if c = (last and e == last + 1)
      arr << [e] unless c
      last = e
    end
    
  • 安装 Rails 报错,求解! at 2013年08月10日

    You have to install development tools first,检查 Xcode 里 Command Line Tools 装了没有,或者用https://github.com/kennethreitz/osx-gcc-installer/

  • 写了一个中文分词的 gem——nlpir at 2013年08月09日

    #32 楼 @wujian_hit 一般会继承org.apache.lucene.analysis.Tokenizer这个抽象类写一个 Tokenizer,然后写一个类继承org.elasticsearch.index.analysis.AbstractTokenizerFactory,做个工厂类,这个可以通过 elasticsearch 的 index 配置,传入一些特定参数,然后传给你的 Tokenizer,再写一个类继承AnalysisModule.AnalysisBinderProcessor用来在 elasticsearch 启动时,注册你的 TokenizerFactory。 这是基本流程。。。伟大的爪哇

  • 一小段代码重构 at 2013年08月09日

    #37 楼 @xds2000 可以写 c[:when].call(words) 或者 c[:when][words] 比较直观

  • 一小段代码重构 at 2013年08月09日

    蛋疼写法来一个

    class Bob
    
      CONDITIONS = [
        { when: -> words { words.nil? || words.strip.empty? }, answer: "Fine. Be that way!" },
        { when: -> words { words.upcase == words }, answer: "Woah, chill out!" },
        { when: -> words { words.nil? || words[-1] == "?" }, answer: "Sure." },
        { when: -> words { true }, answer: "Whatever." }
      ]
    
      def hey(words)
        CONDITIONS.detect { |c| c[:when].(words) }[:answer]
      end
    
    end
    
  • [上海][2013年8月10日] Ruby Tuesday 活动召集 (周六) at 2013年08月06日

    额 放在我生日那天,没法来玩了啊!!!

  • UCloud 正式成为 Ruby China 的赞助商 at 2013年08月01日

    @lgn21st daniel 把蝉游记写成禅游记了

  • 关于进制转换的问题 at 2013年08月01日

    大声随便回个帖都可以拜膜

  • RubyConfChina 2013 会场地点确定! at 2013年08月01日

    碉堡了啊,好期待

  • 键盘输入的一个小问题 at 2013年07月19日

    #5 楼 @wormful vim 的话,可以这样 ctrl+o,a,这样会跳到行尾,ctrl+o,o,这样会换行。ctrl + o 是临时切换到命令模式,接受一个指令,然后再恢复到插入模式。

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