@phaedryx cool! how do you find it? Do you have any patterns that repeat themselves?

today I learnt that "9".succ == "10" (and in general that String#succ only works on the alphanumeric values of a string)

@brian_kephart @james `private` does nothing special here. it only applies to methods defined as "def <identifer>".

here's the correct way to define a private class method:

class Thing
class << self
private
def foo
end
end
end

@erika oh hi there! doing anything fun with Ruby?

@shanecav mostly importance (or by I try to group related methods together), but often it's way too "random"…

Holm :ruby: boosted

How does everyone order their methods in a class?

# Alphabetical
def a; end
def b; end

# Importance
def business_logic; end
def utility_method; end

# Invocation sequence
def call
called_first
called_second
end

def called_first; end
def called_second; end

Holm :ruby: boosted

Hey, folks! My company is looking for devs and QAs :D
We use Ruby!

RT @AppTweak@twitter.com

πŸ™ŒπŸΌ We're hiring! We're currently looking for a full-stack dev and a QA engineer πŸ€“ Check out our open positions here!
jobs.apptweak.com/

πŸ¦πŸ”—: twitter.com/AppTweak/status/11

@jamey conjunctive grammars turned out to be trivial: github.com/judofyr/glush/commi. I haven't found a way to add full boolean grammars without drastically changing the algorithm.

Holm :ruby: boosted

Converted the Rails style guide and the Ruby style guide to AsciiDoc, too.

Go check it out!
- github.com/rubocop-hq/rails-st
- github.com/rubocop-hq/ruby-sty

Why AsciiDoc? It's hard to write a blog post. It's easy to write an email. AsciiDoc was created to be easy to write in the first place.

@jamey yeah, it’s a nice way to avoid having support custom actions everywhere (which is tricky for ambiguous grammars). heh, I messed up the implementation a bit, so right now ambiguous grammars are exponential, but it can be fixed with smarter caching/state-handling

@sfcgeorge wow. how many joins and/or subqueries do you have?

@zenspider that’s shared across all (sub/super)classes, no? this can be different per class

Ruby tip:

class Foo
def self.value
@value ||= defined?(super) ? super : DEFAULT_VALUE
end
end

this will turn Foo.value into a value you can configure per class (with a default), and you'll automatically inherit the superclass' value

what is the best UI you've seen for browsing API reference documentation (on the web)? (ignore the actual quality of the text)

examples:

- rust: doc.rust-lang.org/std/
- ruby core: ruby-doc.org/core-2.6.3/
- yard: rubydoc.info/gems/yard/0.9.19
- rails: api.rubyonrails.org/
- one big markdown: github.com/GoogleChrome/puppet

Show more
Ruby.social

A Mastodon instance for Rubyists & friends