Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
@reus
VIP
NO. 942 / 2012-02-07

1 Topics / 411 Replies
4 Followers
0 Following
0 Favorites
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • It's never too late to learn Postgres at December 03, 2018

    十分好用

  • 为什么说绝大多数人都没搞懂区块链接,区块链的实质创新是什么 at February 10, 2018

    不,区块链最重要的是 NEKOT,也就是云驱动和云实现,不服来辩。

  • 新语言 Red at July 20, 2017

    只支持 32 位。

  • 招募项目合伙人 at July 20, 2017

    你来程序员社区说程序员没有什么创造力,说明你不仅见识少而且情商低,你想找程序员,难道不知道你说的话会激怒程序员吗? “改变计算机发展形态”是一个结果,不是一个点子。有能力的人早就开干了,你处处碰壁还不知道改正,不是个做事的人。

  • 我觉的 Ruby China 对新手不太友好 at July 20, 2017

    会英文是基本要求,不是什么高手化精英化

    你是“弱者”,不是“新手”

    弱者为何要战斗?退下吧,沙场没什么友好可言,这不是过家家

  • 招募项目合伙人 at July 20, 2017

    你这种人,不用说合伙,做同事我都是不愿意的。 眼高手低

  • 有谁从 PostgreSQL 迁移到 MySQL 吗? at January 01, 2017

    不要给自己掉坑的机会

  • Go 适合在哪个系统上开发? at December 15, 2016

    go 核心开发者多数是 linux 或者 OS X,win 反而不地道

  • Rails / PostgreSQL 使用 JSONB 属性心得 at October 15, 2016

    还是好好建表用外键约束吧,不值得。

  • Go 官方终于开始注意包依赖的问题了! at September 07, 2016

    从来不用任何包管理工具,都是多余

  • Go 官方终于开始注意包依赖的问题了! at September 07, 2016

    #1 楼 @lgn21st https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo/edit If we decide that the vendor behavior is correct, then in a later release (possibly Go 1.6) we would make the vendor behavior default on. Projects containing“vendor”directories could still use“GO15VENDOREXPERIMENT=0”to get the old behavior while they convert their code. In a still later release (possibly Go 1.7) we would remove the use of the environment variable, locking in the vendoring semantics. 早就计划好的了,哪来“从 1.5 到 1.7 夸了三个大版本,才把 vender 目录作为默认依赖查询路径之一给定了下来”

  • 最近开发微信公众号,涉及支付,踩了各种坑 at July 09, 2016

    感觉还可以,照着文档做没遇到什么解决不了的问题。

    自己迁移过户口、注册过公司的话,就会发现和微信打交道简直不要太容易…… 说到底还是能力问题。

  • 2016 年后 Web 开发趋势是什么 at May 31, 2016

    这几个月做的 web 开发,都是用纯 js。效率比过去用模板+css 写高,能实现的交互也复杂得多。后端就只实现 api 给 js 用。 这是几年前没法想象的,那时候觉得 Gmail、Google Docs 这类 web 应用实现起来挺麻烦,也只会想到用 jQuery 之类直接操作 dom。现在看来却是轻而易举,交互再多再复杂,实现方法都是共通的。

  • 真的没必要浪费心思在 Go 语言上 at March 04, 2015

    #166 楼 @luikore 刚开始 https://go-review.googlesource.com/#/c/6681/

  • 真的没必要浪费心思在 Go 语言上 at March 02, 2015

    #64 楼 @luikore https://docs.google.com/document/d/1szwabPJJc4J-igUZU4ZKprOrNRNJug2JPD8OYi3i1K0/edit#heading=h.ywtmh4qacfis New SSA Backend for the Go Compiler 要换到 SSA 后端了

  • Python 修饰器,Ruby 怎么写? at March 22, 2014

    #17 楼 @bhuztez 原来如此。那 erlang 也不能算 Object Oriented(TM) 了

  • Python 修饰器,Ruby 怎么写? at March 22, 2014

    #13 楼 @bhuztez 不单只 python,php、lua、js、golang 里的 function 都能作为实参传递或者作为返回值

  • Python 修饰器,Ruby 怎么写? at March 22, 2014

    #14 楼 @piecehealth 每次调用 method 方法都会产生新的 Method 对象。Method 只是对 method 的包装,并不是 method 本身

    def foo 
    end
    
    puts method(:foo).object_id
    puts method(:foo).object_id
    puts method(:foo).object_id
    
  • Python 修饰器,Ruby 怎么写? at March 22, 2014

    #9 楼 @piecehealth 传递的是 Method object,不是 method。假设 ruby 的 method 是对象,且可以用~引用,则会写成

    def hello m
      ...
      m
      ...
    end
    def foo end
    hello ~foo
    

    而不需要包装成 Method object,也不需要 call。memo decorator 会写成

    def memo fn
      cache = {}
      def wrapper *args
        return cache[args] if cache.has_key? args
        ret = fn *args
        cache[args] = ret
        ret
      end
      ~wrapper
    end
    
    def fib n
      ...
    end
    
    fib = memo ~fib
    fib 10 # 不需要fib.call 10
    

    和 python 的类似。method/function 是一个 object/value 的语言就可以这样写,ruby 不是所以不能。

    还有一个区别,如果 method 是 object,那在 def ... end 之后,这个 object 就已经存在了,不需要另外创建或者包装

  • Python 修饰器,Ruby 怎么写? at March 22, 2014

    #4 楼 @piecehealth 那是包装了 method 的 Method,不是 method 本身。如果 method 是一个可以被引用的对象,那 decorator 就只是一个高阶函数,接受一个 method 作为参数,输出另一个 method。你可以传递 Method 对象,但 Method 对象的调用方式和普通 method 不同,不能把他们看作是同样的东西。在 method 是 object 的语言里就不需要区分。

  • Python 修饰器,Ruby 怎么写? at March 21, 2014

    ruby 的 method 不是 object,所以不能像 python 那样,传入一个 function 再传出一个 function。类型系统的一大败笔

  • Peatio (貔貅) 电子加密货币交易所准备开源并征集内测用户 at February 16, 2014

    支持 [email protected]

  • 令人苦恼的性能问题 at January 15, 2014

    GC 有压力,可以试下减少对象的分配 参考:https://github.com/blog/1489-hey-judy-don-t-make-it-bad

    不止一次看到些“优雅”的代码,不仅执行效率低,对对象的分配也毫无节制。仅仅因为看起来比较魔法或者短小,就被看成优雅,实在不可取。

  • rails console 和 shell 的关系。因为 zsh,掉坑里了。 at January 15, 2014

    File::open 那是文件系统的原因,不关 shell 的事

  • 细思恐极——要毕业了,却被人说学编程就是读书无用! at January 13, 2014

    学好英语,多用 google,reddit 也不错

  • 程序的本质复杂性和元语言抽象 (转) at December 15, 2013

    没看懂的原因是作者使用了大量定义不明晰的词汇,例如组件、抽象维度、抽象层次、抽象维度不匹配、本质复杂性、逻辑维度、控制维度、元、元语言、元编程,等等等等… 其实主旨用“内部 DSL”就能概括了。 最开始那个例子,单用函数就能实现复用。每个 field 一个函数,然后用函数指针数组来定义消息格式就行了。完全不需要引入其他机制。

  • fish shell at December 14, 2013

    用了很久了

  • OMG 我对字体怎么这么挑剔 at December 01, 2013

    Terminus 13

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