Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Rei
@Rei
Admin
NO. 1 / 2011-10-28

[email protected]
深圳
198 Topics / 9208 Replies
732 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
GitHub Public Repos
  • writings 940

    [Closed] Source code of writings.io

  • alipay 728

    Unofficial alipay ruby gem

  • code_campo 288

    [Closed] Source code of http://codecampo.com

  • asciidoctor-pdf-cjk-ka... 102

    **no longer maintained**

  • geeknote 39

  • material-ui 17

  • htmlrenderer 12

  • rich-text-editor 12

  • llmrpg 8

  • rails-chatgpt-demo 8

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 腾讯很明智,邮箱系统仍然用最传统的 iframe,没用所谓的 single page application at July 28, 2018

    dom 操作比虚拟 dom 快多了

    这句话不是绝对错误,Virtual DOM 的变更最终是通过 DOM 执行的,流程大致如下:

    1. 更新 Virtual DOM。
    2. Diff 更新后的 Virtual DOM 和之前的快照,找出有变动的部分。
    3. 把变动部分换算成真实的 DOM 操作。

    如果开发者把每个 DOM 操作写到极致,是比 Virtual DOM 更快的,因为少了 Virtual DOM 更新和 Diff 的操作。Virtual DOM 的快是相对之前一些小修改就大片更新的前端框架而言的,Virtual DOM 宣传过程产生偏差导致有的人误解有了 Virtual DOM 就不需要调用 DOM。

    但是写到极致的 DOM 操作会非常繁琐,相当于在人工 Diff。我觉得 React 的优势是把 DOM 操作由过程式编程转向声明式编程,避免了人工 Diff。

  • 腾讯很明智,邮箱系统仍然用最传统的 iframe,没用所谓的 single page application at July 27, 2018

    要思维碰撞就拿出自己认真思考的观点,而不是不做功课张口就来。

  • Active Storge 怎么限制每个对象关联的图片张数 at July 27, 2018

    目前 Rails 5.2.0 一 assign 就保存了,来不及执行校验。有个补丁要等下个版本 https://github.com/rails/rails/pull/33303

  • 腾讯很明智,邮箱系统仍然用最传统的 iframe,没用所谓的 single page application at July 27, 2018

    标题说 iframe 和 spa,内容又转到 Virtual DOM;前半句说 dom 操作快没问题,后面那句“Virtual DOM 整个区域都重新渲染”又是错的。

    强烈的 Troll 既视感。

  • 服务器被 CC 攻击一般大家怎么处理 at July 21, 2018

    https://www.cloudflare.com/

  • [译] 再见微服务,从 100 多个问题儿童到一个超级明星 at July 19, 2018

    微服务是一个有误导性的技术营销词,它让人在过度拆分服务的时候有迎合潮流的错觉,而忽视了过度拆分后的维护成本。

  • 大家都去哪里获取信息? at July 17, 2018

    Twitter
    HackerNews
    Ruby Weekly

  • 两个库的相同算法, hash 结果不一致的问题 at July 16, 2018

    HMAC != Digest,上面只是用了 SHA1 作为他的散列函数。

    https://zh.wikipedia.org/wiki/%E9%87%91%E9%91%B0%E9%9B%9C%E6%B9%8A%E8%A8%8A%E6%81%AF%E9%91%91%E5%88%A5%E7%A2%BC

    至少多了个 key 能看出来吧。

  • 想做一个关注主题的功能,请问有没有最佳实践? at July 15, 2018

    elasticsearch 的强项是文本搜索,news feed 的瓶颈不在这里——一个活动要投递几千几万个信箱,而里面仅仅是一些 id。

    Instagram 之前是用 Redis,后来转向 Cassandra。50 万用户我觉得可以先用上面的实现,遇到瓶颈再看看要在哪个环节解决。

  • 想做一个关注主题的功能,请问有没有最佳实践? at July 15, 2018

    https://robots.thoughtbot.com/using-polymorphism-to-make-a-better-activity-feed-in-rails

    这个方案也许大了有性能问题,但可以作为一个开始。

  • 请问一下"老鸟"们一个权限问题 at July 14, 2018

    取决于 Ruby 的安装方式,我记得 brew 装的已经设好用户权限,也许楼主在用的是系统自带的。

  • 有没有办法在 Nginx 记录给用户发送的页面内容 at July 13, 2018

    呵,我想到这个帖子 https://ruby-china.org/topics/37098

  • Rails 并发问题 at July 13, 2018

    cpu 还没用完,设 4 个 worker。

  • Rails 中有哪些工厂模式的例子吗? at July 12, 2018

    And if they've heard of it, they've probably (correctly) concluded that they don't need it.

  • Rails 中有哪些工厂模式的例子吗? at July 12, 2018

    Dependency Injection is an example of a popular new Java design pattern that programmers using Ruby, Python, Perl and JavaScript have probably never heard of. And if they've heard of it, they've probably (correctly) concluded that they don't need it. Dependency Injection is an amazingly elaborate infrastructure for making Java more dynamic in certain ways that are intrinsic to higher-level languages. And – you guessed it – DI makes your Java code base bigger.
    http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html

  • 请问 Ruby 生态中有类似 Pyinstall 这样的工具吗 at July 11, 2018

    2 楼回复是不负责任的误导,crystal 是另一个语言,虽然跟 Ruby 很像但终究不一样。

    我见过的 Ruby 打包工具有:

    • https://github.com/pmq20/ruby-packer
    • https://github.com/phusion/traveling-ruby
    • https://github.com/hone/mruby-cli

    没实际用过。如果只需要 Linux 也许还是 gem 好用,发行版源里都有 Ruby。

  • 关于简单路由和嵌套路由使用同一个 Controller 的问题 at July 09, 2018
    resources :comments
    
    resources :posts do
      resources :comments, controller: 'posts/comments'
    end
    
  • Chrome 7 月 大限将至,广大在野站长面临艰难选择 at July 04, 2018

    角度刁钻。

  • 注意 Rails.cache.increment 设定有效期的问题 at June 30, 2018
    > Rails.cache.write 'foo', 1
    => "OK"
    > Rails.cache.redis.get 'cache:foo'
    => "\u0004\bo: ActiveSupport::Cache::Entry\n:\v@valuei\u0006:\u0015@marshaled_value\"\t\u0004\bi\u0006:\r@version0:\u0010@created_atf\u00171530335167.8461182:\u0010@expires_inf\v8.64e4"
    

    Rails.cache 写入的是 ActiveSupport::Cache::Entry,用作缓存以外的用途时可能有不可预料的问题,依赖底层功能的时候我都直接用 Rails.cache.redis。

  • Brakeman 被 Synopsys 收购,新协议禁止集成 Brakeman 的功能到产品中 at June 30, 2018

    However, under the new license, it is no longer possible to use Brakeman OSS for the development of a commercial product or online service or to resell Brakeman OSS as a service.

    感觉这 or 是不是写多了,根据 issues 后面的解释,可以用来扫描商业项目,但不能作为产品功能的一部分。

  • Rails 开发环境初次访问 javascript_include_tag 超慢。 at June 27, 2018

    一般编译慢是因为:

    1. 文件系统慢,例如虚拟机。
    2. 依赖的包太多。
    3. 缓存有问题。
  • 使用 Active Storage 往七牛上存东西,发生问题,求解 at June 25, 2018

    没看到 qiniu 的适配器描述,activestorage 原生不支持 qiniu 的。

  • 求推荐一个好用的生产环境管理错误日志的平台,付费的也可以 at June 25, 2018

    我都是同步发的,感觉良好。

  • 求推荐一个好用的生产环境管理错误日志的平台,付费的也可以 at June 25, 2018

    sentry 直接发给他们服务器,怎么会导致 redis 爆?

  • Let's GO 语言吧 at June 24, 2018

    1k/3min 和 1k/1.5min 对比,好像还是可以接受的嘛,worker 开了多少线程?

  • Ruby Docker with jemalloc at June 21, 2018

    一个是系统进程内存一个是 ruby 运行时内存,不一样。

  • Rails Asset Pipeline Directory Traversal Vulnerability at June 20, 2018

    👍

  • 招聘困难 at June 20, 2018

    好了好了,知道你有女朋友了。

  • 讨要薪资 at June 18, 2018

    我联系了 @hrz3424-github @MarcSteven @Frank_Li ,各方没办法达成一致,只能走法律途径。

    Ruby China 是技术论坛,无力解决这事,继续争论也不会有结果。管理员群组决定不介入争议,隔离事件,等待法律结果:

    1. 双方不能再在论坛上对此事评论,否则封号。
    2. 跨境帮不能发布新的招聘帖。
    3. 相关帖子锁定。

    我们站在法律裁决这一边。

  • 讨要薪资 at June 17, 2018

    别逼着管理员表态,我们无法判断,除非劳动仲裁结果出来。

  • Prev
  • 1
  • 2
  • …
  • 36
  • 37
  • 38
  • 39
  • 40
  • …
  • 274
  • 275
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English