<judofyr>
forgot to eat yesterday, so I couldn't sleep tonight, so I ended up writing that turns
<judofyr>
s/turns//
<injekt>
damn I didnt make the list
<judofyr>
…
Guest80642 has quit [Ping timeout: 256 seconds]
minivan has joined #ruby-lang
Guest80642 has joined #ruby-lang
<injekt>
judofyr: good write up, I like the format of the blog too
<judofyr>
injekt: thanks
<judofyr>
injekt: I do enjoy writing in the format as well
<injekt>
:)
mytrile has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
lutfidemirci has joined #ruby-lang
<ryanf>
it's interesting how that is (afaict) the exact opposite of the timeless repository idea
mytrile has quit [Remote host closed the connection]
<judofyr>
yes
lutfidemirci has quit [Remote host closed the connection]
<ryanf>
is there a feed?
<judofyr>
not yet
<judofyr>
not sure when, or if, there will be one
<yorickpeterse>
morning
<judofyr>
morning yorickpeterse
ilyam has quit [Quit: ilyam]
ffio has quit [Quit: WeeChat 0.4.1]
<ryanf>
it would be nice. I guess you're probably using some kind of static generator you wrote yourself though?
<ryanf>
oh, guess not
<ryanf>
sinatra?
<judofyr>
nah, custom framework
<judofyr>
but yeah: dynamic
<judofyr>
and Heroku
<judofyr>
not sure how it's going to perform
<ryanf>
interesting
<ryanf>
why not static? do you have an interface for editing posts too?
<ryanf>
*writing
<judofyr>
easier this way
<yorickpeterse>
Y U NO STATIC
<ryanf>
yeah, fair enough
<judofyr>
I always find static generation to be a hassle
_jpb_ has quit [Remote host closed the connection]
towski has joined #ruby-lang
_jpb_ has joined #ruby-lang
Guest80642 has quit [Ping timeout: 240 seconds]
towski has quit [Remote host closed the connection]
ilyam has joined #ruby-lang
Guest80642 has joined #ruby-lang
riotbit has joined #ruby-lang
kristofferrr has quit [Quit: ❤]
riotbit_ has joined #ruby-lang
riotbit_ has quit [Client Quit]
riotbit has quit [Client Quit]
_jpb_ has quit [Ping timeout: 246 seconds]
grumpwork has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.1]
abstr4ct has joined #ruby-lang
marr has joined #ruby-lang
lutfidemirci has joined #ruby-lang
_jpb_ has joined #ruby-lang
joeroot has joined #ruby-lang
bougyman_ has joined #ruby-lang
hinbody_ has joined #ruby-lang
joschi_ has joined #ruby-lang
ammar__ has joined #ruby-lang
oddmunds1 has joined #ruby-lang
ohsix_ has joined #ruby-lang
bougyman has quit [Ping timeout: 240 seconds]
oddmunds has quit [Ping timeout: 240 seconds]
threedaymonk has quit [Ping timeout: 240 seconds]
ammar_ has quit [Ping timeout: 240 seconds]
PantsMeh has quit [Ping timeout: 240 seconds]
Spaceghost|work has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
shaman42_ has quit [Ping timeout: 240 seconds]
hinbody has quit [Ping timeout: 240 seconds]
hagabaka has quit [Ping timeout: 240 seconds]
FlyingLeap has quit [Ping timeout: 240 seconds]
joschi has quit [Ping timeout: 240 seconds]
ohsix has quit [Ping timeout: 240 seconds]
threedaymonk has joined #ruby-lang
FlyingLeap has joined #ruby-lang
lutfidemirci has quit [Write error: Broken pipe]
shaman42 has joined #ruby-lang
hagabaka has joined #ruby-lang
yfeldblum has joined #ruby-lang
riotbit has joined #ruby-lang
Domon has joined #ruby-lang
riotbit has quit [Client Quit]
<andrewvos>
I am basically a Go convert now
<andrewvos>
Shit is amazing
riotbit has joined #ruby-lang
<andrewvos>
Want to deploy an app? Cross compile, scp binary.
<andrewvos>
No bundle install bullshit
riotbit has quit [Client Quit]
hahuang65 has joined #ruby-lang
riotbit has joined #ruby-lang
mdedetrich has joined #ruby-lang
mdedetrich has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby-lang
<_tockitj>
hello binary dependencies (:
<_tockitj>
i <3 `bundle install`
Guest19344 has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
Guest80642 has quit [Ping timeout: 276 seconds]
Guest80642 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 276 seconds]
jsullivandigs has quit [Ping timeout: 264 seconds]
<andrewvos>
_tockitj: It compiles everything needed into the binary
<yorickpeterse>
andrewvos: welcome to deploying anything compiled for the last 20 years :>
<yorickpeterse>
whitequark: Y U NO HURRY UP WITH FOUNDRY
<andrewvos>
yorickpeterse: Yeah I know I know shutup
diegoviola has joined #ruby-lang
TvL2386 has joined #ruby-lang
_jpb_ has quit [Ping timeout: 245 seconds]
<TvL2386>
hi guys, when matching and capturing regex like "if '123' =~ /(\d+)/", is it possible to cast it to Fixnum immediately? Or is to the only solution doing $1.to_i afterwards?
_jpb_ has joined #ruby-lang
<yorickpeterse>
TvL2386: pretty sure you have to do it manually
<TvL2386>
yorickpeterse, that's what I thought :)
<TvL2386>
thx!
thepumpk_ has joined #ruby-lang
lutfidemirci has joined #ruby-lang
thepumpkin has quit [Ping timeout: 248 seconds]
stamina has joined #ruby-lang
oddmunds1 has left #ruby-lang [#ruby-lang]
oddmunds has joined #ruby-lang
atmosx has quit [Quit: And so the story goes…]
skade has joined #ruby-lang
henrikhodne has quit [Ping timeout: 268 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
amerine has joined #ruby-lang
tonni has joined #ruby-lang
_jpb_ has quit [Ping timeout: 268 seconds]
ilyam has quit [Quit: ilyam]
_jpb_ has joined #ruby-lang
lutfidemirci has quit [Remote host closed the connection]
<yorickpeterse>
So I won't say this often but ActiveModel::Serializer is pretty decent
Cakey has quit [Ping timeout: 248 seconds]
flip_digits has quit [Ping timeout: 264 seconds]
_jpb_ has quit [Ping timeout: 240 seconds]
<apeiros>
yorickpeterse: well, tenderlove
zomgbie has joined #ruby-lang
<apeiros>
despite being a crazy guy, his code is rather sane
_jpb_ has joined #ruby-lang
<yorickpeterse>
yah, I have nothing but good things to say about tenderlove
<yorickpeterse>
except his nickname can be at times a bit unsetteling
zomgbie has quit [Read error: Connection reset by peer]
<yorickpeterse>
* unsettling
<andrewvos>
The cat thing gets a bit old. But that's just American Ruby developers I guess
postmodern has quit [Quit: Leaving]
<yorickpeterse>
hey I have a cat thing too, it's pretty common amongst devs I think
<whitequark>
most importantly, DO NOT REPORT THIS AS A BUG
<yorickpeterse>
Ruby: the Python in disguise
<whitequark>
I have zero desire to fix this in a future parser version :D
<yorickpeterse>
k, reporting bug
kstuart has joined #ruby-lang
<whitequark>
to be serious you probably should
<yorickpeterse>
done
<whitequark>
oooh
<whitequark>
18>> run (lambda do; end)
<eval-in>
whitequark => /tmp/execpad-674fc939ea86/source-674fc939ea86:2: warning: don't put space before argument parentheses ... (https://eval.in/38785)
<TvL2386>
hi guys, I remember using some tool to find out where ruby is spending it's time. I have code that runs for a long time and I want to find out where the program is spending most of it's time. I remember some tool in ruby that created an html of the results
<TvL2386>
anyone remembers what it's called or someone has a good suggestion?
dumfries has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
<yorickpeterse>
ruby-prof
anonymuse has joined #ruby-lang
hahuang65 has joined #ruby-lang
<TvL2386>
thanks!
pskosinski has joined #ruby-lang
hahuang65 has quit [Ping timeout: 256 seconds]
malev has joined #ruby-lang
realDAB has joined #ruby-lang
tomzx_mac has quit [Read error: Operation timed out]
toretore has joined #ruby-lang
_jpb_ has quit [Ping timeout: 268 seconds]
_jpb_ has joined #ruby-lang
<PaulePanter>
Hi. Is there a method in Ruby already, which for a given date, will tell me how many days/years this was in the past, it is in the future. Like in Wikipedia, where for a birthdate you get in parentheses how many years the person is old.
thepumpkin has quit [Remote host closed the connection]
<PaulePanter>
Date.rel_to_today_humanize ;-) or something like that.
fernandoaleman has joined #ruby-lang
tdm00 has quit [Quit: Computer has gotten very, very sleepy.]
thepumpkin has joined #ruby-lang
<fernandoaleman>
Hello everyone. I released a gem a few months ago successfully, but today I made updates and when I do "rake release" I get an error saying I don't have permission to push to my gem
judofyr has quit [Remote host closed the connection]
<yorickpeterse>
"It's very common for a rails developer to use time_ago_in_words to display time like "5 minutes ago", but it's too expensive to calculate the time in server side, you should utilize client cpu to calculate the time ago." HAHAHA
<yorickpeterse>
Maybe if your server runs on a 10Mhz machine from 20 years ago
<yorickpeterse>
it's like saying you should use single quotes for performance
<fernandoaleman>
yorickpeterse: LOL
<tbuehlmann>
and you should
<whitequark>
the caching argument makes sense
<yorickpeterse>
Yes, lets move the problem to the client so that instead of a big ass server being like one microsecond slower the client is now having trouble
hashkey has joined #ruby-lang
kilofu has joined #ruby-lang
kilofu has quit [Client Quit]
kilofu has joined #ruby-lang
lupine has quit [Read error: Connection reset by peer]
kilofu has quit [Client Quit]
kilofu has joined #ruby-lang
tdm00 has joined #ruby-lang
hahuang65 has joined #ruby-lang
realDAB has joined #ruby-lang
jxweng has quit [Ping timeout: 264 seconds]
kilofu has quit [Client Quit]
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
kilofu has joined #ruby-lang
kilofu has quit [Client Quit]
hahuang65 has quit [Ping timeout: 264 seconds]
<darix>
yorickpeterse: most clients definitely will die from the load of calculating the difference
glebm has joined #ruby-lang
<yorickpeterse>
Not to mention JS has a terrible date library
<yorickpeterse>
unless you enjoy pulling in deps for basic stuff
<darix>
yorickpeterse: does jquery or friends have a nice library for it?
<andrewvos>
watt
kilofu has joined #ruby-lang
<andrewvos>
darix: Yes. One is mentioned in the article even. Twice actually
kilofu has quit [Client Quit]
ldnunes has quit [Ping timeout: 246 seconds]
<yorickpeterse>
darix: no
<yorickpeterse>
jquery itself does not provide date handling that I know of
jsullivandigs has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.1]
jsullivandigs has joined #ruby-lang
<andrewvos>
There are libraries mentioned on that page?
<andrewvos>
"here is a javascript solution based on jquery http://timeago.yarp.com/, of course, you can use other time ago js library."
<yorickpeterse>
Yes, I know that
anonymuse has quit [Remote host closed the connection]
_jpb_ has quit [Remote host closed the connection]
_jpb_ has joined #ruby-lang
anonymuse has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
rshetty has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 248 seconds]
anonymus_ has joined #ruby-lang
anonymuse has quit [Read error: Connection reset by peer]
sia_solati has joined #ruby-lang
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
ldnunes has joined #ruby-lang
Pupeno_ has joined #ruby-lang
bzalasky has joined #ruby-lang
_jpb_ has quit [Ping timeout: 240 seconds]
_jpb_ has joined #ruby-lang
riotbit has quit [Quit: riotbit]
pskosinski has quit [Quit: Til rivido Idisti!]
Pupeno has quit [Ping timeout: 276 seconds]
<andrewvos>
I'm not so sure you did cuz you were all 'darix: no' like you didn't know it mentioned a library!
jxweng has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
Pupeno_ has quit [Ping timeout: 256 seconds]
<yorickpeterse>
.... I was talking about it not being in jquery *itself*
<yorickpeterse>
15:01:40 yorickpeterse | jquery itself does not provide date handling that I know of
tonni has joined #ruby-lang
lupine has joined #ruby-lang
rshetty has quit [Ping timeout: 256 seconds]
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
<andrewvos>
Dude I don't care. I was quoting Zoolander fool
sstrickl has joined #ruby-lang
imperator2 has joined #ruby-lang
snarfmason has joined #ruby-lang
snarfmason has quit [Client Quit]
_jpb_ has quit [Ping timeout: 276 seconds]
_jpb_ has joined #ruby-lang
snarfmason has joined #ruby-lang
<injekt>
:|
<andrewvos>
injekt: is it hot south of the river?
<injekt>
andrewvos: incredibly
<injekt>
andrewvos: Been in the office this week too (shoreditch) and it isn't terrible nice up there, either
<andrewvos>
That's close to my place. Yeah I've been working from home cause of the heat
<andrewvos>
I am very tan now
<andrewvos>
It is amazing
<injekt>
nice
benlovell has quit [Ping timeout: 246 seconds]
<injekt>
I also went climbing at mill end, the heat did not help
<injekt>
I almost passed out
rshetty has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
<andrewvos>
ehehe
<andrewvos>
pasty brit
bzalasky has quit [Remote host closed the connection]
intellitech has joined #ruby-lang
sia_solati has quit [Ping timeout: 276 seconds]
glebm has quit [Quit: Computer has gone to sleep.]
sia_solati has joined #ruby-lang
bzalasky has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
<whitequark>
wow. why write one line if you can 309
* yorickpeterse
slaps whitequark's bottom and grins cheekily
<yorickpeterse>
hahahaha
<yorickpeterse>
adding "slaps X around with a copy of parse.y"
rickruby has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
ilyam has quit [Quit: ilyam]
cjs226 has joined #ruby-lang
Mon_Ouie has quit [Read error: Operation timed out]
killthe|lunch is now known as killtheliterate
gix has quit [Quit: Client exiting]
mistym is now known as mistym_lunch
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby-lang
arooni-mobile has joined #ruby-lang
gix has joined #ruby-lang
rickruby has quit [Remote host closed the connection]
willdrew has joined #ruby-lang
willdrew has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
mbj has joined #ruby-lang
sia_solati has quit [Ping timeout: 256 seconds]
havenwood has quit [Remote host closed the connection]
_jpb__ has joined #ruby-lang
fenicks has quit [Ping timeout: 240 seconds]
_jpb_ has quit [Ping timeout: 248 seconds]
_jpb_ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
sepp2k has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby-lang
ilyam has joined #ruby-lang
ZOGM_ has joined #ruby-lang
sia_solati has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
<yorickpeterse>
:D :D
<yorickpeterse>
down to 3 errors in this Rails controller
<yorickpeterse>
instead of like, 100
fenicks has joined #ruby-lang
ruby-lang772 has joined #ruby-lang
antoineroquentin has joined #ruby-lang
ruby-lang772 has quit [Client Quit]
<whitequark>
errors ?
jonahR has joined #ruby-lang
<yorickpeterse>
errr for ruby-lint
<yorickpeterse>
forgot to mention that rather crucial part
ZOGM has quit [Ping timeout: 268 seconds]
* whitequark
lands 32th parser bugfix
<yorickpeterse>
I'd say this week has been quite successful so far. YARD support in ruby-lint amongst various other nice changes, lots of bugfixes in parser
<yorickpeterse>
now we just need to wait for another Ruby drama
_jpb__ has quit [Quit: leaving]
sia_solati has quit [Ping timeout: 264 seconds]
henrikhodne has quit [Ping timeout: 256 seconds]
sia_solati has joined #ruby-lang
antoineroquentin has quit [Ping timeout: 240 seconds]
tdm00 has quit [Quit: Make like a banana and split!]
ffio has joined #ruby-lang
gregmore_ has joined #ruby-lang
realDAB has joined #ruby-lang
gregmore_ has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
_jpb__ has joined #ruby-lang
gregmore_ has joined #ruby-lang
_jpb__ has quit [Client Quit]
saarinen has quit [Quit: saarinen]
_jpb__ has joined #ruby-lang
_jpb__ has quit [Client Quit]
antoineroquentin has joined #ruby-lang
gregmoreno has quit [Ping timeout: 246 seconds]
zmike123 has quit [Quit: ~]
_jpb__ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
gregmore_ has quit [Remote host closed the connection]
Uranio has quit [Quit: while you reading this, a kitty dies]
yalue has quit [Quit: Leaving]
hinbody has quit [Ping timeout: 248 seconds]
elia has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
henrikhodne has joined #ruby-lang
saarinen has joined #ruby-lang
ffio has quit [Quit: WeeChat 0.4.1]
jsullivandigs has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
jsullivandigs has joined #ruby-lang
_jpb_ has quit [Read error: Connection reset by peer]
_jpb_ has joined #ruby-lang
riotbit has quit [Quit: riotbit]
firstdayonthejob has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
jsullivandigs has quit [Ping timeout: 268 seconds]
dc5ala has quit [Quit: Ex-Chat]
_jpb__ has quit [Ping timeout: 264 seconds]
ldnunes has quit [Ping timeout: 264 seconds]
jonahR has quit [Quit: jonahR]
flip_digits has joined #ruby-lang
dwknoxy has joined #ruby-lang
duphus has quit [Quit: Leaving.]
Squarepy has joined #ruby-lang
ldnunes has joined #ruby-lang
_jpb_ has quit [Ping timeout: 240 seconds]
_jpb_ has joined #ruby-lang
imperator2 has quit [Ping timeout: 256 seconds]
malev has joined #ruby-lang
_jpb_ has quit [Ping timeout: 256 seconds]
gregmoreno has joined #ruby-lang
mistym_lunch is now known as mistym
gregmoreno has quit [Remote host closed the connection]
setmeaway has quit [Ping timeout: 264 seconds]
jonahR has joined #ruby-lang
gregmoreno has joined #ruby-lang
<tubbo>
this is gonna sound a little weird, but is there any method that will let me do something like collection.reject{ |e| e.passes_condition? }.each { |e| collection.delete e }
<tubbo>
basically i want to delete any element that passes the condition, but before i do that i want to run a little method on it
<whitequark>
.delete_if
<tubbo>
sorry that collection.delete e should be `e.erase!`
<tubbo>
whitequark: you are the man :D
_jpb_ has joined #ruby-lang
<drbrain>
tubbo: #partition
<drbrain>
you can do it in delete_if, but I don't like putting side-effects in filtering blocks
nisstyre has joined #ruby-lang
<tubbo>
drbrain: hmm, i don't think partition will be as readable as delete_if
cored has quit [Ping timeout: 268 seconds]
<tubbo>
because i'll have to do overlays = overlays.partition{ |e| e.passes? && e.erase! }.last
<whitequark>
and they themselves use Ada which doesn't have /*..*/
<injekt>
zzak: BRO
vlad_starkov has joined #ruby-lang
<nofxx>
whitequark, faster you mean by the #encoding header? or using array instead of string?
<whitequark>
nofxx: I think your current solution is fine
<nofxx>
funny... was the encoding header suppose to go in the spec? It works there, not in the lib
vlad_starkov has quit [Ping timeout: 246 seconds]
<whitequark>
hmm
_jpb_ has quit [Ping timeout: 248 seconds]
_jpb_ has joined #ruby-lang
<nofxx>
whitequark, looks like the issue is on matching string ... subject.as_ewkb.should eql("\001\001\000\000 \346\020\000\000\001""".force_encoding(Encoding::BINARY)) works
enebo has quit [Quit: enebo]
<zenspider>
I... don't think that does what you think it does...
<zenspider>
or...
<zenspider>
I don't think that does what I think it should
<whitequark>
nofxx: yeah
<whitequark>
zenspider: what do you think it should do?
fuhgeddaboudit has quit [Ping timeout: 246 seconds]
gregmoreno has quit [Remote host closed the connection]
<nofxx>
trying to understand.. basically: 1.chr + binary 1.9 -> \u0001 2.0 -> \x01 but binary didnt change, \xE6
<whitequark>
so... 33 bugs fixed, two more bugs to tackle, and parser will be able to successfully parse entire rubygems corpus, sans mid-file \0, non-7bit crap in comments and \u escape in 1.8 mode
intellitech has joined #ruby-lang
<nofxx>
ops nevermind my last sentence...
<zenspider>
whitequark: what he just typed was "blah" "".force_encode(...) and I have no fucking clue what should happen with syntactic concatination with a force_encode tacked on one of them
<whitequark>
zenspider: it gets concatenated into one string and after it .force_encoding is called on it
<whitequark>
since concat is done in compiler
<zenspider>
yeah. that's horrible
<zenspider>
horrible code ... so that seems fair
javajax has quit [Quit: Leaving.]
<nofxx>
zenspider, dont mind the typo quotes, same w/o
<whitequark>
zenspider: being able to meaningfully use \0 in some places in code but not others is even more horrible
<whitequark>
(TIL that)
<nofxx>
but btw, "foo""bar" for ruby will always be "foobar" , isnt?
<nofxx>
hidden + on strings
<whitequark>
nofxx: it's not +, it's direct concatenation.
deedoubleyou has quit [Remote host closed the connection]
<zzak>
tylersmith has quit [Remote host closed the connection]
_jpb_ has quit [Ping timeout: 240 seconds]
_jpb_ has joined #ruby-lang
<injekt>
zzak: ping me tomorrow, im dead
mdedetrich has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #ruby-lang
wmoxam has joined #ruby-lang
<zenspider>
holy shit rails has a metric fuckton of deps these days
swav has left #ruby-lang [#ruby-lang]
KillerFox has quit [Ping timeout: 248 seconds]
<xuser>
at least there's rails-api now ;)
<Nilium>
Rails is boring, make games.
jsullivandigs has quit [Remote host closed the connection]
_jpb_ has quit [Ping timeout: 240 seconds]
jsullivandigs has joined #ruby-lang
_jpb_ has joined #ruby-lang
pkrnj has quit [Quit: Computer has gone to sleep.]
jsullivandigs has quit [Ping timeout: 248 seconds]
jsullivandigs has joined #ruby-lang
anonymus_ has quit [Remote host closed the connection]
duphus has quit [Quit: Leaving.]
_jpb__ has quit [Ping timeout: 246 seconds]
_jpb_ has quit [Ping timeout: 264 seconds]
_jpb_ has joined #ruby-lang
wmoxam has quit [Ping timeout: 248 seconds]
<darix>
zenspider: that's what you get from moving tons of things into gems which have been in the rails base libs in the past no?
<zenspider>
darix: ? not my fault!
<darix>
zenspider: just answering your statement. :)
<zenspider>
darix: no. I think it is much more likely that that's what you get when you keep throwing poo at the wall
freedrull has joined #ruby-lang
pkrnj has joined #ruby-lang
gregmoreno has joined #ruby-lang
<freedrull>
i'm going to ask a vague question. i feel like every time i try to extract methods out of a huge class i just end up with a method that takes the original class as an argument, if not even more dependencies. how can i refactor code in a better way? how can i remove dependencies? https://gist.github.com/mcfiredrill/6075501
<drbrain>
freedrull: a) buy Working Effectively with Legacy Code by Martin Fowler
_jpb_ has quit [Remote host closed the connection]
_jpb_ has joined #ruby-lang
__butch__ has joined #ruby-lang
benanne has quit [Quit: kbai]
<freedrull>
hmm ive heard of this
<freedrull>
i have sandi metz' book too, i should probably read that again :\
ruby-lang889 has joined #ruby-lang
<drbrain>
freedrull: b) in order to successfully extract a class you need to recognize a common set of state that the object you wish to extract
glebm has joined #ruby-lang
mbull9 has quit [Remote host closed the connection]
killtheliterate is now known as killthe|afk
<drbrain>
freedrull: I take a set of steps when I refactor this way
<drbrain>
first I extract methods but leave them in the same class with extra arguments
__butch__ has quit [Remote host closed the connection]
<drbrain>
then I find out which arguments are common and extract those methods into a class
<drbrain>
so I can turn the argument into an instance variable
therod has joined #ruby-lang
glebm has quit [Ping timeout: 264 seconds]
ruby-lang889 has quit [Ping timeout: 250 seconds]
stamina has quit [Ping timeout: 264 seconds]
fosky has joined #ruby-lang
kristofferrr has joined #ruby-lang
braidn has left #ruby-lang [#ruby-lang]
kristofferrr has quit [Client Quit]
ncmike has joined #ruby-lang
<x0f>
whenever you find an explicit "exterior self" as an argument for multiple methods its a good way to think about extraction, if the current class still depends on it, the new class might be a candidat for composition, else its aggregation (which usually is better decoupled, though composition coupling is not neccessary bad)
joshuawscott has joined #ruby-lang
saarinen has quit [Quit: saarinen]
_jpb__ has joined #ruby-lang
_jpb_ has quit [Remote host closed the connection]
malev has quit [Remote host closed the connection]
marr has quit [Ping timeout: 256 seconds]
Mon_Ouie has quit [Ping timeout: 240 seconds]
tomzx_mac has joined #ruby-lang
jonahR has joined #ruby-lang
cored has quit [Ping timeout: 264 seconds]
cored has joined #ruby-lang
ncmike has quit [Ping timeout: 250 seconds]
tylersmith has joined #ruby-lang
realDAB has joined #ruby-lang
elia has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
tylersmith has quit [Ping timeout: 248 seconds]
joshuawscott has quit [Quit: Leaving.]
_jpb__ has quit [Remote host closed the connection]