<rapha>
adam12: maybe some red/yellow/green also :)
raptelan has joined #ruby
raptelan has quit [Ping timeout: 268 seconds]
jenrzzz_ has quit [Ping timeout: 256 seconds]
jenrzzz_ has joined #ruby
grenierm has quit [Ping timeout: 250 seconds]
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
gaussianblue has joined #ruby
raptelan has joined #ruby
gaussianblue has quit [Changing host]
gaussianblue has joined #ruby
raptelan has quit [Ping timeout: 264 seconds]
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
agrosant has quit [Ping timeout: 264 seconds]
raptelan has joined #ruby
aesthetikx has quit [Ping timeout: 240 seconds]
osc4rpt has quit [Ping timeout: 255 seconds]
osc4rpt has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
agrosant has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
agrosant has quit [Ping timeout: 264 seconds]
aesthetikx has joined #ruby
raptelan has quit [Ping timeout: 252 seconds]
agrosant has joined #ruby
infinityfye has joined #ruby
infinityfye has left #ruby [#ruby]
infernix has quit [Ping timeout: 272 seconds]
TomyWork has joined #ruby
raptelan has joined #ruby
raptelan has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
infernix has joined #ruby
raptelan has joined #ruby
agrosant has quit [Ping timeout: 264 seconds]
Sobinec has joined #ruby
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
Sobinec has quit [Remote host closed the connection]
Sobinec has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
jenrzzz_ has joined #ruby
Sobinec has quit [Remote host closed the connection]
Sobinec has joined #ruby
agrosant has joined #ruby
Sobinec has quit [Remote host closed the connection]
Sobinec has joined #ruby
raptelan has quit [Ping timeout: 252 seconds]
agrosant has quit [Ping timeout: 264 seconds]
Sobinec has quit [Remote host closed the connection]
Sobinec has joined #ruby
raptelan has joined #ruby
wyclif has quit [Ping timeout: 260 seconds]
jenrzzz_ has quit [Ping timeout: 268 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
Sobinec has quit [Ping timeout: 260 seconds]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 255 seconds]
wyclif has joined #ruby
rvalue has joined #ruby
jenrzzz_ has quit [Ping timeout: 246 seconds]
Vonter has quit [Ping timeout: 268 seconds]
Vonter has joined #ruby
wyclif has quit [Ping timeout: 268 seconds]
rvalue has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
osc4rpt has quit [Ping timeout: 252 seconds]
osc4rpt has joined #ruby
CrazyEddy has joined #ruby
wyclif has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
donofrio has joined #ruby
Sobinec has joined #ruby
donofrio_ has quit [Ping timeout: 268 seconds]
donofrio has quit [Max SendQ exceeded]
donofrio has joined #ruby
myappie__ has joined #ruby
osc4rpt has quit [Ping timeout: 260 seconds]
osc4rpt has joined #ruby
<[0x1eef_]>
rapha: Nope, but you're not the first to mention that. I don't think the format of the website really supports that in a good way. Maybe eventually I'll figure something out.
myappie__ has quit [Ping timeout: 268 seconds]
jmcantrell has quit [Read error: Connection reset by peer]
patrick__ has quit [Remote host closed the connection]
caleb_ has quit [Remote host closed the connection]
whereiseveryone has quit [Write error: Connection reset by peer]
g_sg has quit [Remote host closed the connection]
fourstepper has quit [Read error: Connection reset by peer]
Bounga has quit [Write error: Connection reset by peer]
hwrd has quit [Write error: Connection reset by peer]
matta has quit [Write error: Connection reset by peer]
johnhamelink has quit [Remote host closed the connection]
eax_ has quit [Remote host closed the connection]
toonlink has quit [Read error: Connection reset by peer]
goofansu has quit [Remote host closed the connection]
graemefawcett has quit [Remote host closed the connection]
alexisg has quit [Write error: Broken pipe]
srushe has quit [Remote host closed the connection]
pjaspers has quit [Remote host closed the connection]
slondr has quit [Read error: Connection reset by peer]
simonista has quit [Read error: Connection reset by peer]
tsujp has quit [Read error: Connection reset by peer]
KOTP has quit [Remote host closed the connection]
graemefawcett has joined #ruby
goofansu has joined #ruby
alexisg has joined #ruby
patrick__ has joined #ruby
johnhamelink has joined #ruby
KOTP has joined #ruby
jmcantrell has joined #ruby
matta has joined #ruby
tsujp has joined #ruby
pjaspers has joined #ruby
whereiseveryone has joined #ruby
eax_ has joined #ruby
fourstepper has joined #ruby
srushe has joined #ruby
g_sg has joined #ruby
slondr has joined #ruby
toonlink has joined #ruby
Bounga has joined #ruby
hwrd has joined #ruby
simonista has joined #ruby
caleb_ has joined #ruby
osc4rpt has quit [Ping timeout: 255 seconds]
osc4rpt has joined #ruby
<rapha>
is it a CSS problem [0x1eef_]?
<rapha>
or more of a visual/design one
<rapha>
hmm ok ... why does graphql-ruby get away with a class called ISO8601DateTime in a file called iso_8601_date_time.rb, but i get in trouble with the interpreter for a class called ISO3166Country in a file called iso_3166_country.rb? what am i doing wrong here? :(
wyclif has quit [Ping timeout: 252 seconds]
<rapha>
oooh
<rapha>
this interacts with rails's magical inflection, but you can configure the inflecter
<rapha>
TIL
MomosOrDeath5 has quit [Ping timeout: 255 seconds]
<JordiGH>
do and end are the same as { and }, correct? How come I almost never see { } in other people's code, if so?
Axenntio has quit [Quit: Axenntio]
szkl has joined #ruby
infernix has quit [Ping timeout: 252 seconds]
Sobinec has quit [Ping timeout: 264 seconds]
JordiGH has quit [Ping timeout: 240 seconds]
<[0x1eef_]>
They're almost the same. There's a few subtle differences. For example: puts "foo".gsub { "bar" } vs the same with 'do; end' yields different results, and the brace form is most likely the one you want. Generally for one-liners braces are used, for multi-line blocks do & end are used.
germ has joined #ruby
germ has quit [Changing host]
germ has joined #ruby
desnudopenguino has quit [Read error: Connection reset by peer]
desnudopenguino has joined #ruby
user71 has joined #ruby
wyclif has quit [Quit: leaving]
donofrio_ has joined #ruby
user71 has quit [Remote host closed the connection]
user71 has joined #ruby
donofrio__ has joined #ruby
donofrio has quit [Ping timeout: 256 seconds]
donofrio_ has quit [Ping timeout: 268 seconds]
_ht has joined #ruby
JordiGH has joined #ruby
monr0e has quit [Remote host closed the connection]
<rapha>
there's a lot of personal preference, also, JordiGH
<rapha>
and generally, the community feels that {} is better for one-liners, while do...end is better for multi-line blocks.
<JordiGH>
Ah, interesting.
weeezik has joined #ruby
<adam12>
Jim Weirich had an opinion that you'd use `{ }` for values and `do/end` for side-effects (or something like that).
<[0x1eef_]>
Sounds familiar :)
weeezik has quit [Quit: Client closed]
<JordiGH>
But either way... both are exactly the same?
<[0x1eef_]>
Nope. I think you weren't here when I wrote my first reply. There's subtle differences in how they bind to a method call.
ih8u1 has joined #ruby
ogamita` has joined #ruby
PedroG2 has joined #ruby
georgemp_ has joined #ruby
pandabot_ has joined #ruby
bougyman_ has joined #ruby
PedroG1 has quit [Ping timeout: 260 seconds]
ih8u has quit [Ping timeout: 260 seconds]
ruby[bot] has quit [Ping timeout: 260 seconds]
pandabot has quit [Ping timeout: 260 seconds]
Fridtjof has quit [Ping timeout: 264 seconds]
ccooke has quit [Ping timeout: 264 seconds]
petru has quit [Ping timeout: 264 seconds]
ih8u1 is now known as ih8u
bougyman has quit [Read error: Connection reset by peer]
osc4rpt has quit [Ping timeout: 260 seconds]
georgemp has quit [Ping timeout: 260 seconds]
balo has quit [Ping timeout: 260 seconds]
ikke has quit [Ping timeout: 260 seconds]
ogamita has quit [Ping timeout: 260 seconds]
ccooke has joined #ruby
osc4rpt has joined #ruby
balo has joined #ruby
Fridtjof has joined #ruby
pusewicz_ has joined #ruby
<adam12>
JordiGH: There's a different precedence between them.
georgemp_ is now known as georgemp
pusewicz has quit [Ping timeout: 264 seconds]
<adam12>
JordiGH: You can kind of see it by chaining method calls but without using parens for ambuguity.
<adam12>
puts "foo".gsub(/./) { "x" } # => xxx
<adam12>
puts "foo".gsub(/./) do "x" end # => #<Enumerator:0x00000001040655b8>
petru has joined #ruby
<adam12>
In the first case, the curly braces had the block assigned to `gsub`. In the second case, the `do/end` had lower precedence and was assigned to the `puts` (which did nothing with it).
<rapha>
adam12: do you have an idea what the graphql-ruby gem might do (without invoking ActiveSupport's inflect.acronym anywhere!) to make GraphQL::Types::ISO8601Date work as a class name inside of a file called iso_8601_date.rb without angering Rails?
<[0x1eef_]>
Are you sure it uses Rails to require that file?
<rapha>
oh right ... that magical inflector is a Rails thing. not a ruby thing.
<[0x1eef_]>
Usually library code uses require / require_relative instead.
<rapha>
there i have my answer already. thank you, [0x1eef_]!
<JordiGH>
adam12: Thanks for the example.
<adam12>
rapha: I don't follow.
<adam12>
rapha: Is it requiring that file
<adam12>
rapha: Looking at the source, graphql-ruby just eager-requires everything. So when you require `graphql.rb`, it eventually requires the file with the constant you're referring to. I don't think ActiveSupport has anything to do with this?
szkl has quit [Quit: Connection closed for inactivity]
pusewicz_ has quit [Ping timeout: 252 seconds]
pusewicz has joined #ruby
pusewicz has quit [Ping timeout: 272 seconds]
user71 has quit [Quit: Leaving]
TomyWork has quit [Ping timeout: 272 seconds]
szkl has joined #ruby
pusewicz has joined #ruby
centurion has joined #ruby
pusewicz has quit [Quit: Lost terminal]
<rapha>
adam12: yeah, i had a wrong picture in my head. my question *should* have been: "how do i configure Rails's inflector to allow me to write a classname of that same pattern?". For now, iso1234_blah.rb + ISO1234Blah + inflect.acronym='ISO1234' does the job, even if it's not very elegant.
desnudopenguino has quit [Read error: Connection reset by peer]
desnudopenguino has joined #ruby
<adam12>
rapha: You'd have to write your own inflector. IMHO, Don't try to fight Rails autoloader and just name it camelcase.
<rapha>
i just hate classnames like Iso1234Blah so so so so much
<weaksauce>
I just watched an interesting talk on the internals of zeitwork yesterday
<weaksauce>
pretty neat library that does some smart stuff under the hood
<rapha>
they're so ugly my inner Monk is incapable of dealing with it
_ht has quit [Quit: _ht]
<[0x1eef_]>
Lol
<[0x1eef_]>
I know what you mean, been there, but I think adam12 is right. Unless there's a straightforward fix it's usually not worth it.
cek has quit [Quit: Connection closed for inactivity]
Munto has quit [Read error: Connection reset by peer]
ruby[bot] has joined #ruby
Munto has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]