ur5us has quit [Remote host closed the connection]
fuhgeddaboudit has joined #ruby-lang
yfeldblum has joined #ruby-lang
imkmf has joined #ruby-lang
emmesswhy has quit [Quit: This computer has gone to sleep]
pricees has quit [Ping timeout: 265 seconds]
tbuehlmann has quit [Remote host closed the connection]
emmesswhy has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
toretore has quit [Quit: This computer has gone to sleep]
ur5us has joined #ruby-lang
yusuf has joined #ruby-lang
mkaesz has quit [Ping timeout: 256 seconds]
j4cknewt has quit [Remote host closed the connection]
oliver___ has joined #ruby-lang
<oliver___>
why is it a common practice to preload your rails app? I haven't heard of the concept of preloading a framework in any PHP framework I've used so far
siwica1 has quit [Remote host closed the connection]
siwica has joined #ruby-lang
<pipework>
oliver___: #rubyonrails
<oliver___>
pipework: will ask there, thanks
|jemc| has quit [Ping timeout: 240 seconds]
<darix>
oliver___: even in php you usually use byte code caching for large apps to avoid going through the parse step all the time. and that is pretty similar
mikecmpbll has quit [Quit: i've nodded off.]
nathanstitt has joined #ruby-lang
<oliver___>
darix: I see, I just feel like there are so many tools for speeding up Rails boot-time (e.g. Spring) that I was more generally wondering what makes it so different from PHP
<darix>
spring is for development time no?
<pipework>
yeah
<darix>
oliver___: there are a lot of libraries involved with rails
<pipework>
Lots!
<darix>
have a decently large php app (say typo3)
<pipework>
The dependency list is pretty fun to watch
<darix>
and see how long it takes there to parse all the code
<darix>
and how much you get speed ups from byte code caches
<darix>
(mediawiki is also a nice example)
<oliver___>
I see, so it's not that they're fundamentally different, it's just that the Rails framework is so large that it needs preloading?
michael_mbp has quit [Excess Flood]
<darix>
it doesnt need it either. but it is large enough so you notice.
<darix>
oliver___: in the end ... the preloading part is also a solved problem.
<pipework>
Well, it's not really that.
<oliver___>
so if I use Sinatra for example, it might have similar characteristics to what I'm used with in smaller frameworks in PHP even without preloading?
<pipework>
It's that preloading means you aren't reading from disk during requests to load code.
<oliver___>
it's not that I care so much about it or have complaints about it, it's more about me wondering why it's different
oleo is now known as Guest22182
<oliver___>
you told me that ruby is not fundamentally different from php, so that answers my question
Guest22182 has quit [Ping timeout: 240 seconds]
<pipework>
oliver___: You can either load code early or not.
<oliver___>
I realize that there are larger and smaller frameworks around
<pipework>
Your choice.
<darix>
oliver___: if it helps. i do all my development without preloaders :)
<oliver___>
I see :) well, glad to have that sorted out, now I know why preloading is such a common practice, I thought that the way ruby was parsed was fundamentally different form PHP or something like that
fuhgeddaboudit has quit [Ping timeout: 256 seconds]
gix has quit [Quit: Client exiting]
j4cknewt has joined #ruby-lang
gix has joined #ruby-lang
shinnya has quit [Ping timeout: 265 seconds]
RobertBirnie has quit [Ping timeout: 240 seconds]
|jemc| has joined #ruby-lang
tkuchiki has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
mkaesz has joined #ruby-lang
caseydriscoll has joined #ruby-lang
dwknoxy has joined #ruby-lang
cklee has quit [Quit: Connection closed for inactivity]
<jdecuirm__>
Hi guys
<jdecuirm__>
does initialize() needs a parameter?
<pipework>
jdecuirm__: Maybe
<jdecuirm__>
i have a library.rb class, but i just want to initialize an empty array like books = []
<jdecuirm__>
@books = []
<jhass>
it's up to you
tkuchiki has quit [Quit: Leaving...]
<jdecuirm__>
so, def initialize(); @books = []; end; it's ok?
<pipework>
jdecuirm__: The correlation is that the method signature to #initialize is the same that you get when you call .new
<pipework>
So initialize(something) means that new requires an argument.
<jhass>
jdecuirm__: btw. we don't do empty parens ;)
<jdecuirm__>
so what's the correct way
<pipework>
Some people do, but they 'disappear'
<pipework>
def initialize
<jhass>
jdecuirm__: what you wrote is fine
mistym has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
<jdecuirm__>
thanks jhass
SuMo_D has joined #ruby-lang
<jdecuirm__>
thanks pipework
emmesswhy has quit [Quit: This computer has gone to sleep]
mistym has joined #ruby-lang
havenwood has quit []
j4cknewt has quit [Remote host closed the connection]
pricees has joined #ruby-lang
tkuchiki has quit [Ping timeout: 244 seconds]
fuhgeddaboudit has joined #ruby-lang
pricees has quit [Ping timeout: 255 seconds]
godd2 has joined #ruby-lang
jxie has joined #ruby-lang
tkuchiki has joined #ruby-lang
amsi has quit [Quit: Leaving]
lilsheep has joined #ruby-lang
<lilsheep>
hi! is there a way to prevent one thread from switching to another?
<lilsheep>
or switching to any other
<pipework>
lilsheep: Like blocking when the thread is scheduled? You want fibers.
<lilsheep>
wut
<lilsheep>
OH shit
<lilsheep>
these are perfect!
robbyoconnor has quit [Read error: Connection reset by peer]
mkaesz has quit [Ping timeout: 256 seconds]
gmas has joined #ruby-lang
kramsee_ has quit [Ping timeout: 256 seconds]
emmesswhy has joined #ruby-lang
kramsee has joined #ruby-lang
<lilsheep>
So I am writing a terminal program in ruby (that I would want to be usable in the web later, I expect it to get pretty long though) should I continue with ruby or use another language? Also there is the possibility I will want to compile it to hide the source!
<pipework>
lilsheep: The length has nothing to do with the language.
<lilsheep>
What about performance? pipework
<pipework>
lilsheep: Write it in assembly
amclain has joined #ruby-lang
<pipework>
I find the idea of thinking that compiling a program down to another representation is hiding source is probably not what you think.
<lilsheep>
Lol
<lilsheep>
idk
<lilsheep>
I think ruby is fine!
emmesswhy has quit [Quit: This computer has gone to sleep]
<lilsheep>
gets.chomp is blocking the other thread : (
NoNMaDDeN has joined #ruby-lang
<pipework>
lilsheep: It does block until it gets input, so...
<lilsheep>
is there any nonblocking version?
<pipework>
lilsheep: You'd have to explain what your program is doing.
<lilsheep>
it is a chat bot!
<lilsheep>
but there are two threads
<lilsheep>
one for standard input ( responses ) and one for random input
yorickpeterse has quit [Ping timeout: 255 seconds]
DefV has quit [Ping timeout: 255 seconds]
DefV has joined #ruby-lang
perry has quit [Ping timeout: 250 seconds]
wnd has joined #ruby-lang
yorickpeterse has joined #ruby-lang
Eising has quit [Ping timeout: 255 seconds]
certainty has quit [Ping timeout: 255 seconds]
brixen has quit [Ping timeout: 244 seconds]
jamooo_ has quit [Ping timeout: 255 seconds]
pd has quit [Ping timeout: 265 seconds]
dvorak has quit [Ping timeout: 265 seconds]
tris has quit [Ping timeout: 272 seconds]
yugui_zzz has quit [Ping timeout: 265 seconds]
certainty has joined #ruby-lang
perry has joined #ruby-lang
dvorak has joined #ruby-lang
pd has joined #ruby-lang
Eising has joined #ruby-lang
jamooo has joined #ruby-lang
perry is now known as Guest69186
tris has joined #ruby-lang
yugui_zzz has joined #ruby-lang
mkaesz has quit [Ping timeout: 272 seconds]
brixen has joined #ruby-lang
fluuflu has quit [Ping timeout: 272 seconds]
jimbach has quit [Remote host closed the connection]
jortanna has quit [K-Lined]
<jdecuirm__>
is it a big difference in the initialize() method to use @variable to self.variable?
mistym has joined #ruby-lang
<pipework>
jdecuirm__: You mean @variable or self.variable=, right?
<pipework>
There isn't a big difference, in fact, if you don't public writers, you can make those private and it still works.
yfeldblum has quit [Remote host closed the connection]
<jdecuirm__>
yeah! sometimes the author uses def initialize(options) @variable = and sometimes uses self.variable=
<pipework>
However, I detest that using self.variable_name= uses the private interface when all other non= methods use public or protected.
<jdecuirm__>
thanks pipework!
<pipework>
jdecuirm__: I personally prefer instance variables in initialize, but it's stylistic.
<jdecuirm__>
thanks pipework, in fact the other day someone told me, if you have to use protected, then change your logic
<pipework>
jdecuirm__: Yeah, I don't ever use protected.
<jdecuirm__>
also he told me that rarely i will use private methods
<pipework>
The people I know who do don't actually use it for what protected is meant for, they use it like private, but use protected anyways because "It's easier for debugging"
<pipework>
They're your own little playground for organizing things in an object.
<jdecuirm__>
for a real case implementation it's like making changes inside the same class?
amsha has quit [Quit: Be back later ...]
<pipework>
jdecuirm__: Well, it's nice because you can use methods to operate on the object internally instead of having all the public methods modify data and maybe have to share code.
amsha has joined #ruby-lang
<jdecuirm__>
for example, i have a price for the book, but in some cases i can make a discount, so, i can use a private method to use a discount over the price?
<ledestin>
if a thread calls object method, will that object never be GCed?
<pipework>
ledestin: What do you mean?
<ledestin>
def initialize; Thread. new { eternal_loop }; end
<pipework>
ledestin: Ah, I don't think it will be GC'd, but you could test!
<ledestin>
pipework: define_finalizer?
sMecKs has joined #ruby-lang
<pipework>
ledestin: absolute_controversy?
<ledestin>
pipework: no such method exists, does it?
<pipework>
ledestin: I was being silly. Yeah, you could use that method and then try to cause the object to be GC'd
<ledestin>
pipework: ok, so I just need to instantiate it and not assign, will that be enough?
Guest69186 is now known as perryh
perryh has quit [Changing host]
perryh has joined #ruby-lang
tenderlove has quit [Quit: Leaving...]
<pipework>
ledestin: Yeah, should be. I mean, you could try both if you wanted.
robbyoconnor has quit [Quit: Konversation terminated!]
blarghlarghl has joined #ruby-lang
gix- has joined #ruby-lang
gix has quit [Disconnected by services]
<blarghlarghl>
I have some weirdness with Padrino. I just want to make sure I'm not being an idiot and it's actually a language problem. I have two classes, both subclassing Padrino::Application. I have a helper module. In both padrino subclasses, I do 'helpers HelperModule'. In one, it doesn't include the helper methods. In the other, it does.
<pipework>
blarghlarghl: paste your code to the githubs, either as a repo or as a gist.
<blarghlarghl>
Or rather, I _think_ it's not including it. How can I tell? Apart from getting a nomethoderror when trying to use one of its methods.
yfeldblum has joined #ruby-lang
slawrence00 has joined #ruby-lang
<blarghlarghl>
pipework: it's for work, so I can't, but I'll try and minimise it. The repo is rather big.
<pipework>
blarghlarghl: Ah then if you can't paste code, you'll have to ask coworkers.
matt_m has joined #ruby-lang
<blarghlarghl>
pipework: it's annoying because on 1.8.7 with padrino 0.10.2, it works. on 2.1.3 with latest padrino, it suddenly doesn't. no code changes.
<pipework>
Oh ew.
<blarghlarghl>
Yeah, it's a bit mystifying.
<pipework>
Well, disgusting is more like it.
<pipework>
blarghlarghl: Again, I can't really help without code.
<blarghlarghl>
Yeah, I figure. I'll try and get a minimused version out there.
<blarghlarghl>
minimised*
j4cknewt_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 265 seconds]
nathanstitt has quit [Quit: I growing sleepy]
oliver___ has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
nathanstitt has quit [Client Quit]
<blarghlarghl>
pipework: aha. right. so, once again i blame padrino.
<blarghlarghl>
it swallows errors and tells no one.
rahul_j has quit [Quit: rahul_j]
<blarghlarghl>
pipework: The problem was that padrino cache syntax had changed, but instead of warning about it, all it does is swallow the entire file that it's trying to load, silently.
lilsheep has quit [Remote host closed the connection]
erratis has joined #ruby-lang
mkaesz has joined #ruby-lang
mistym has quit [Remote host closed the connection]
amsha has quit [Quit: Be back later ...]
mark06 has joined #ruby-lang
mskaesz has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
mkaesz has quit [Ping timeout: 240 seconds]
spastorino has quit [Quit: Connection closed for inactivity]
charliesome has quit [Quit: zzz]
Rojo has joined #ruby-lang
yfeldblum has joined #ruby-lang
NoNMaDDeN has quit [Remote host closed the connection]
emmesswhy has joined #ruby-lang
emmesswhy has quit [Client Quit]
joshingly has quit [Quit: Connection closed for inactivity]
<apeiros>
yeah, spammer didn't seem to be active here
<apeiros>
permanent nuisance in #ruby
<apeiros>
pondering to write a bot, just for this.
<apeiros>
detect spam -> autoban
q_leonetti has quit [Quit: q_leonetti]
charliesome has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
godd2 has quit [Ping timeout: 255 seconds]
q_leonetti has joined #ruby-lang
toretore has joined #ruby-lang
jxie has quit [Ping timeout: 255 seconds]
jxie has joined #ruby-lang
<yorickpeterse>
lo and behold the entire channel being banned due to a bug
yusuf has quit [Read error: No route to host]
yusuf has joined #ruby-lang
Versality has quit [Ping timeout: 256 seconds]
ldnunes has joined #ruby-lang
Versality has joined #ruby-lang
allomov has joined #ruby-lang
charliesome has joined #ruby-lang
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby-lang
pricees has joined #ruby-lang
ironhide_604 has joined #ruby-lang
pricees has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
hahuang61 has quit [Ping timeout: 272 seconds]
apeiros_ has quit [Ping timeout: 265 seconds]
<banister>
yorickpeterse goedemorgen, hoe gaat het?
caseydriscoll has joined #ruby-lang
<surrounder>
ah, banister heeft geoefend
tkuchiki has quit [Ping timeout: 240 seconds]
<banister>
surrounder nee
<banister>
surrounder it's all i remember from my brief 2 weeks learning dutch ;)
<banister>
surrounder i gave up when i couldn't deal with all the spelling errors and mispronounciations
tbuehlmann has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mamantoha has quit [Ping timeout: 245 seconds]
<surrounder>
tsktsk
SuMo_D has joined #ruby-lang
<yorickpeterse>
filthy foreigners coming to our little country while refusing to learn the language
<surrounder>
hehe
SuMo_D has quit [Ping timeout: 258 seconds]
<darix>
yorickpeterse: most just come there for the coffeeshops, cheese and your girls. dont kid yourself!
<surrounder>
our girls aren't that special
<darix>
dont let them hear that :p
<surrounder>
:)
<Eising>
All I want for christmas is that foreigners stop confusing your country with mine.
<darix>
Eising: i am quite sure they dont confuse your country and mine:p
q_leonetti has quit [Quit: q_leonetti]
emmesswhy has quit [Quit: This computer has gone to sleep]
Guest10873 is now known as `micro
siwica has quit [Remote host closed the connection]
siwica has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
chussenot has quit [Quit: chussenot]
ta_ has joined #ruby-lang
siwica has quit [Ping timeout: 265 seconds]
workmad3 is now known as wm3|away
q_leonetti has joined #ruby-lang
ta has quit [Ping timeout: 258 seconds]
charliesome has quit [Quit: zzz]
godd2 has joined #ruby-lang
yfeldblum has joined #ruby-lang
mamantoha_ has joined #ruby-lang
benlovell has quit [Ping timeout: 250 seconds]
dangerousdave has joined #ruby-lang
spastorino has joined #ruby-lang
joast has quit [Ping timeout: 265 seconds]
allomov has quit [Remote host closed the connection]
allomov has joined #ruby-lang
klmlfl has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
x0f has quit [Ping timeout: 245 seconds]
cs__ has joined #ruby-lang
x0f has joined #ruby-lang
cs__ has quit [Client Quit]
ur5us has joined #ruby-lang
GBrawl has joined #ruby-lang
enkristo_ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
ur5us has quit [Ping timeout: 255 seconds]
SuMo_D has joined #ruby-lang
mkaesz has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
SuMo_D has quit [Ping timeout: 264 seconds]
rahul_j has quit [Quit: rahul_j]
emmesswhy has joined #ruby-lang
klmlfl has quit [Remote host closed the connection]
cleopatra has quit [Ping timeout: 250 seconds]
yusuf has quit [Quit: Leaving.]
elia has quit [Read error: Connection reset by peer]
elia has joined #ruby-lang
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danijoo_ has quit [Remote host closed the connection]
danijoo has joined #ruby-lang
NoNMaDDeN has joined #ruby-lang
sarkyniin has joined #ruby-lang
dangerousdave has joined #ruby-lang
pricees has joined #ruby-lang
ironhide_604 has quit [Ping timeout: 245 seconds]
pricees has quit [Ping timeout: 240 seconds]
caseydriscoll has joined #ruby-lang
fusillicode has joined #ruby-lang
<yorickpeterse>
hgnngngn jvm bootups
cyndis has quit [Ping timeout: 265 seconds]
apeiros_ has joined #ruby-lang
benlovell has joined #ruby-lang
fusillicode1 has quit [Ping timeout: 255 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
gianlucadv has quit [Ping timeout: 244 seconds]
apeiros_ has quit [Ping timeout: 265 seconds]
benlovell has quit [Ping timeout: 255 seconds]
mkaesz has quit [Remote host closed the connection]
skade has joined #ruby-lang
chussenot has joined #ruby-lang
Suchit has joined #ruby-lang
shinnya has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
cyndis has joined #ruby-lang
charliesome has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mkaesz has joined #ruby-lang
gianlucadv has joined #ruby-lang
arBmind has joined #ruby-lang
hinbody has joined #ruby-lang
arBmind1 has joined #ruby-lang
sk_0 has quit [Quit: leaving]
dwknoxy has joined #ruby-lang
arBmind has quit [Ping timeout: 250 seconds]
waxjar has quit [Ping timeout: 255 seconds]
houhoulis has quit [Remote host closed the connection]
siwica has joined #ruby-lang
benlovell has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
mkaesz has quit [Remote host closed the connection]
banister has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
oleo has joined #ruby-lang
charliesome has joined #ruby-lang
caseydriscoll has joined #ruby-lang
GBrawl has quit [Quit: (null)]
benlovell has quit [Ping timeout: 264 seconds]
[spoiler] has joined #ruby-lang
sarkyniin has quit [Ping timeout: 245 seconds]
ironhide_604 has joined #ruby-lang
snoopybbt has joined #ruby-lang
AKASkip has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby-lang
dangerousdave has quit [Client Quit]
Versality has quit [Quit: Be back later ...]
Versality has joined #ruby-lang
shinnya has quit [Ping timeout: 244 seconds]
wm3|away is now known as workmad3
emmesswhy has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
tharindu has joined #ruby-lang
Suchit has quit [Quit: (null)]
charliesome has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
tharindu has quit [Ping timeout: 250 seconds]
malconis has joined #ruby-lang
amsha has joined #ruby-lang
charliesome has quit [Quit: zzz]
pricees has joined #ruby-lang
j4cknewt has joined #ruby-lang
pricees has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby-lang
tbuehlmann has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
apeiros_ has quit [Ping timeout: 258 seconds]
clauswitt has quit [Ping timeout: 240 seconds]
jimbach has joined #ruby-lang
Xzanron has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
yfeldblum has joined #ruby-lang
benlovell has joined #ruby-lang
imperator has joined #ruby-lang
emmesswhy has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Ping timeout: 258 seconds]
benlovell has quit [Ping timeout: 255 seconds]
<imperator>
bnagy, ping
yfeldblum has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
GBrawl has joined #ruby-lang
j4cknewt has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
jgpawletko has joined #ruby-lang
benlovell has joined #ruby-lang
joast has joined #ruby-lang
whippythellama has joined #ruby-lang
nathanstitt has joined #ruby-lang
benlovell has quit [Client Quit]
<imperator>
whippythellama, winamp fan i see ;)
<whippythellama>
hehe
<whippythellama>
ironically, that wasn't where it came from
<whippythellama>
though i admit that mp3 winamp shipped (ships?) with amused me to no end :)
snooc has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
cornerma1 has joined #ruby-lang
nelsonsar has joined #ruby-lang
Sunlorhic has joined #ruby-lang
SuMo_D has joined #ruby-lang
cornerman has quit [Ping timeout: 244 seconds]
cornerma1 is now known as cornerman
nelsonsar has quit [Remote host closed the connection]
nelsonsar has joined #ruby-lang
pricees has joined #ruby-lang
SuMo_D has quit [Ping timeout: 265 seconds]
mannyt has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
mkaesz has joined #ruby-lang
skade has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
Sunlorhic has quit [Ping timeout: 250 seconds]
ta_ has quit [Ping timeout: 255 seconds]
j4cknewt has joined #ruby-lang
nelsonsar has quit [Remote host closed the connection]
houhoulis has joined #ruby-lang
centrx has joined #ruby-lang
allomov has quit [Remote host closed the connection]
dangerousdave has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
rippa has joined #ruby-lang
apeiros has joined #ruby-lang
q_leonetti has quit [Quit: q_leonetti]
amsha has quit [Quit: Be back later ...]
caseydriscoll has quit [Remote host closed the connection]
ta has joined #ruby-lang
tharindu has joined #ruby-lang
dagda1 has joined #ruby-lang
hahuang61 has joined #ruby-lang
klmlfl has joined #ruby-lang
apeiros has quit [Ping timeout: 255 seconds]
pricees has quit [Ping timeout: 244 seconds]
hahuang61 has quit [Ping timeout: 265 seconds]
nelsonsar has joined #ruby-lang
jo__ has joined #ruby-lang
yfeldblum has joined #ruby-lang
enkristo_ has quit [Read error: Connection reset by peer]
nelsonsar has quit [Remote host closed the connection]
nelsonsar has joined #ruby-lang
mistym has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
mistym has quit [Remote host closed the connection]
dabradley has joined #ruby-lang
siwica has quit [Remote host closed the connection]
siwica has joined #ruby-lang
apeiros has joined #ruby-lang
apeiros_ has joined #ruby-lang
apeiros_ has quit [Ping timeout: 265 seconds]
amsha has joined #ruby-lang
seank_ has quit [Remote host closed the connection]
seank_ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
SuMo_D has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
skade has joined #ruby-lang
skade has quit [Client Quit]
elia has quit [Quit: Computer has gone to sleep.]
Sunlorhic has joined #ruby-lang
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mamantoha_ has quit [Ping timeout: 245 seconds]
skade has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
pricees has joined #ruby-lang
mnngfltg has quit [Remote host closed the connection]
mistym has joined #ruby-lang
dangerousdave has joined #ruby-lang
<banister>
surrounder what does olliebollen mean
pricees has quit [Ping timeout: 255 seconds]
<banister>
surrounder oh "oil balls"...nice ;)
g0bl1n has joined #ruby-lang
thoolihan has left #ruby-lang ["leaving"]
yfeldblum has joined #ruby-lang
diegoviola has joined #ruby-lang
tenderlove has joined #ruby-lang
caseydriscoll has joined #ruby-lang
nelsonsar has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
mustmodify has joined #ruby-lang
<surrounder>
banister: try an 'appelflap' too ;)
<mustmodify>
Rails' scopes can include methods, like where... those messages are then sent to, I would guess, an ActiveRecord::Scope ( or whatever it's called ). So somehow Rails is taking that lambda and setting the context to be that scope... How do they do that?
havenwood has joined #ruby-lang
<ljarvis>
mustmodify: they can just call the block on top of the existing scope
<ljarvis>
and chain them all
<centrx>
mustmodify, The scope is called from an ActiveRecord::Relation / Query Set that already has the context
mikecmpbll has quit [Quit: i've nodded off.]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nelsonsar has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
apeiros_ has joined #ruby-lang
nelsonsar has quit [Remote host closed the connection]
siwica1 has joined #ruby-lang
Versality has quit [Quit: Be back later ...]
siwica has quit [Ping timeout: 240 seconds]
AKASkip has joined #ruby-lang
Versality has joined #ruby-lang
apeiros_ has quit [Ping timeout: 264 seconds]
<mustmodify>
I'm trying to duplicate that... any thoughts on how to simulate?
<mustmodify>
hunh... much fancier than gist. Lemme see.
mistym has quit [Remote host closed the connection]
<mustmodify>
ah, instance_Eval ... that's right, kind of remember it provides a local scope.
<mustmodify>
ljarvis: That's the missing piece. Thanks! Not knowing that has been bothering me for a while. :)
<ljarvis>
sure, and btw I use proc and not lambda there because lambda will chose if you don't provide the argument (the Person instance will be sent in instance_eval)
<ljarvis>
proc wont choke
<ljarvis>
>> lambda { }.call(1)
<eval-in__>
ljarvis => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/221492)
<jhass>
masterkorp: please use irb for experiments, eval-in is for demonstration
<masterkorp>
yeah, sorry
nelsonsar has quit [Remote host closed the connection]
arBmind has quit [Ping timeout: 265 seconds]
mustmodify has left #ruby-lang [#ruby-lang]
SuMo_D has joined #ruby-lang
mamantoha_ has joined #ruby-lang
nelsonsar has joined #ruby-lang
tenderlove has quit [Quit: Leaving...]
arBmind has joined #ruby-lang
chadwtaylor has joined #ruby-lang
apt-get_ has quit [Quit: Quitte]
sarkyniin has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
seank__ has joined #ruby-lang
SuMo_D has joined #ruby-lang
mamantoha_ has quit [Ping timeout: 245 seconds]
tenderlove has joined #ruby-lang
seank_ has quit [Ping timeout: 255 seconds]
g0bl1n has quit [Ping timeout: 245 seconds]
SuMo_D has quit [Ping timeout: 265 seconds]
ruby-lang293 has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
jxie has quit [Ping timeout: 244 seconds]
jxie has joined #ruby-lang
cleopatra has joined #ruby-lang
apeiros_ has joined #ruby-lang
thagomizer has quit [Quit: Leaving.]
jxie has quit [Ping timeout: 264 seconds]
thagomizer has joined #ruby-lang
chadwtaylor has quit [Remote host closed the connection]
ruby-lang293 has quit [Ping timeout: 246 seconds]
tbuehlmann has joined #ruby-lang
yfeldblum has joined #ruby-lang
j4cknewt has joined #ruby-lang
pricees has joined #ruby-lang
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
<darix>
masterkorp: or pry
jxie has joined #ruby-lang
<masterkorp>
yeah I am using pry
yfeldblum has quit [Ping timeout: 255 seconds]
isale-eko has joined #ruby-lang
apeiros_ has quit [Ping timeout: 245 seconds]
nofxx_ has quit [Ping timeout: 256 seconds]
cleopatra has quit [Quit: Saliendo]
nofxx_ has joined #ruby-lang
godd2 has quit [Remote host closed the connection]
cleopatra has joined #ruby-lang
SuMo_D has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
cmhobbs_ has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
imkmf has joined #ruby-lang
SuMo_D has quit [Ping timeout: 250 seconds]
havenwood has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 264 seconds]
j4cknewt has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
klmlfl_ has joined #ruby-lang
siwica has quit [Remote host closed the connection]
siwica has joined #ruby-lang
Lingos has quit [Quit: Be back later ...]
dagda1 has joined #ruby-lang
Lingos has joined #ruby-lang
klmlfl has quit [Ping timeout: 265 seconds]
mamantoha_ has joined #ruby-lang
sarkyniin has quit [Quit: Quitte]
Thecrazylumberja has quit [Quit: Leaving]
siwica has quit [Remote host closed the connection]
siwica has joined #ruby-lang
nelsonsar has quit [Remote host closed the connection]
Lingos has quit [Ping timeout: 264 seconds]
mamantoha_ has quit [Ping timeout: 264 seconds]
Versality has quit [Quit: Be back later ...]
Versality has joined #ruby-lang
nelsonsar has joined #ruby-lang
danijoo has quit [Remote host closed the connection]
danijoo has joined #ruby-lang
gix- has quit [Ping timeout: 265 seconds]
Versality has quit [Ping timeout: 240 seconds]
ldnunes has quit [Quit: Leaving]
Mon_Ouie has quit [Ping timeout: 265 seconds]
Thecrazylumberja has joined #ruby-lang
GBrawl has quit [Quit: (null)]
gix has joined #ruby-lang
Sunlorhic has joined #ruby-lang
kyb3r_ has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has quit [Ping timeout: 256 seconds]
j4cknewt has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
pricees has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby-lang
nofxx_ has quit [Ping timeout: 245 seconds]
nofxx_ has joined #ruby-lang
nofxx_ has quit [Changing host]
nofxx_ has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
mistym_ has joined #ruby-lang
GBrawl has joined #ruby-lang
dagda1 has joined #ruby-lang
mistym has quit [Ping timeout: 264 seconds]
mistym_ has quit [Remote host closed the connection]
sarkyniin has joined #ruby-lang
nofxx_ has quit [Ping timeout: 245 seconds]
nelsonsar has quit [Remote host closed the connection]
[spoiler] has quit [Quit: Leaving]
nofxx_ has joined #ruby-lang
nofxx_ has quit [Changing host]
nofxx_ has joined #ruby-lang
faces has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lingos has joined #ruby-lang
face has quit [Ping timeout: 255 seconds]
sarkyniin has quit [Quit: Quitte]
ta has quit [Ping timeout: 250 seconds]
dda has joined #ruby-lang
fusillicode has joined #ruby-lang
setanta_ has joined #ruby-lang
_fritchie has joined #ruby-lang
ta has joined #ruby-lang
snooc_ has quit [Quit: see-ya]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
tkuchiki has joined #ruby-lang
pricees has joined #ruby-lang
nelsonsar has joined #ruby-lang
ironhide_604 has quit [Quit: ironhide_604]
jgpawletko has quit [Quit: jgpawletko]
wallerdev has joined #ruby-lang
siwica has quit [Remote host closed the connection]
siwica has joined #ruby-lang
fusillicode1 has joined #ruby-lang
ledestin has quit [Ping timeout: 272 seconds]
chussenot has quit [Quit: chussenot]
gianlucadv has quit [Ping timeout: 255 seconds]
j4cknewt has joined #ruby-lang
fusillicode has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Ping timeout: 240 seconds]
fusillicode1 has quit [Quit: Leaving.]
fusillicode has joined #ruby-lang
siwica1 has joined #ruby-lang
siwica has quit [Ping timeout: 250 seconds]
Fessenden has joined #ruby-lang
<Fessenden>
Howdy, helpful folks. I'm having an issue with nesting classes in a gem - it seems to think that some classes I'm using are subordinate to others? Rather than just trying to use ClassThatNeedsCalling, it seems to want to classify it as ClassBeingCalledFrom::ClassThatNeedsCalling, and it's throwing errors because it's not subordinate, just required.
imperator has quit [Ping timeout: 264 seconds]
michaeldeol has joined #ruby-lang
<Fessenden>
Uninitialized constant ClassBeingCalledFrom::ClassThatNeedsCalling (NameError). Which .. is confounding, since the former is also being called from another class elsewhere, which had no trouble differentiating.
<Fessenden>
Hm. I might try that, feels a bit cleaner. Will the solution I used cause problems, or is it just overwrought?
mannyt has quit [Quit: Connection closed for inactivity]
<pipework>
I just prefer to not use autoload.
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fusillicode has joined #ruby-lang
siwica1 has quit [Remote host closed the connection]
siwica has joined #ruby-lang
<jhass>
fessenden: what I don't like is that it has unpredictable load order
<jhass>
not that your files should depend on that
GBrawl has quit [Quit: (null)]
mistym has joined #ruby-lang
fusillicode has quit [Client Quit]
<Fessenden>
jhass: Reasonable. All the files here are at the same level, all mutually independent. Just sort of a collection of job schedulers to run.
j4cknewt_ has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
<jhass>
yeah, it's more a "doesn't feel right" instead of real technical reasons, therefore "I prefer" ;)
<Fessenden>
:) With you, but too harried to worry about my preferences atm. Thanks for the tip, though, I'll TODO:: it.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby-lang
dagda1 has joined #ruby-lang
isale-eko has quit [Quit: ChatZilla 0.9.91 [Firefox 33.1/20141106120505]]
<|jemc|>
a lot of problems crop up when using autoload in ruby implementations without a GIL when the autoloaded library isn't written to be threadsafe for autload
<pipework>
I'm still sad that ruby requires into the global namespace. :(
fusillicode1 has joined #ruby-lang
GBrawl has joined #ruby-lang
<darix>
pipework: yes the loading libraries into the local namespace and then having 3 different versions of the same library running in the same program (as it can happen with nodejs) is much better. ;)
fusillicode has joined #ruby-lang
<pipework>
darix: Well, it is, especially when it's not nodejs but it's lua.
fusillicode1 has quit [Ping timeout: 256 seconds]
<|jemc|>
darix: actually, I might venture to say it is - when done right (I don't use nodejs, so I can't comment on that)
<|jemc|>
there's no reason I shouldn't be able to run two distinct versions of a library in two separate parts of a program running on the same VM - as long as they don't have to interoperate with eachother
<|jemc|>
there's a lot of interesting possibilities that open up in the realm of compartmentalized live code loading, etc..
<|jemc|>
of course, powerful features must be used responsibly
allomov has joined #ruby-lang
enebo has joined #ruby-lang
<darix>
|jemc|: that is a total maintenance nightmare
<darix>
imagine lib B requires lib A 0.5.0
<darix>
C requires lib A in 0.4.0
caseydriscoll has quit [Remote host closed the connection]
<darix>
but 0.4.0 has a big security hole which can only be fixed with an api change that would break C
<|jemc|>
darix: that problem seems unrelated - C would have to be ported to the new version to be secure, just as it would in our current "global" paradigm
<darix>
|jemc|: for some fun install etherpad via npm
<|jemc|>
but without the security problem - C should be free to use whatever version's API best serves its needs
<pipework>
I actually dislike using non-system package managers for installing apps.
<pipework>
Libraries for development, sure.
<darix>
|jemc|: sure ... but with just one library per app that problem is more visible
<darix>
|jemc|: nodejs installs each local library in a subdirectory of each library requiring it
<|jemc|>
darix: there's no reason it couldn't be just as visible
<pipework>
But honestly, packaging for system package managers is hard.
<pipework>
Unless you're slackware. :D
<darix>
pipework: it isnt
<|jemc|>
and I don't use nodejs, so I can't comment on it in an informed way
siwica has quit [Remote host closed the connection]
matp has joined #ruby-lang
<darix>
|jemc|: i looked into the mess for packaging etherpad :)
<jhass>
pipework: I think arch is even easier :P
<|jemc|>
but just because X does foo and it sucks doesn't mean Y can't do foo and have it be great - sounds like a fallacy
<pipework>
darix: Yeah, I think packaging non-tool non-app ruby libraries into packages is dumb.
<pipework>
jhass: That somehow is supposed to answer my question?
<jhass>
anybody can sign up and upload their packages
<pipework>
I mean, people have checkinstall, but any package maintainer for debian would laugh so hard.
<darix>
pipework: it isnt if you a) want to support them for customer, b) want to do security fixes.
<pipework>
jhass: Being able to submit a package and packaging well isn't exactly the same.
matp_ has quit [Ping timeout: 272 seconds]
<pipework>
darix: It is.
<darix>
and with that i mean backports
<pipework>
Just bundle your dependencies into the application.
<pipework>
Are you sharing the dependencies?
pricees has quit [Ping timeout: 255 seconds]
<darix>
pipework: that is like static linking
<darix>
which is again a nightmare
<darix>
of course
<pipework>
Not it isn't.
<darix>
bundling *is* static linking
<pipework>
It's not a nightmare.
<darix>
with our system i install 1 fixed rails package e.g.
<darix>
and all apps have the fixed rails version
<pipework>
With our system there are multiple versions of gems being used.
<darix>
which might just be the same version with the fix backported
<luka__>
hi, are there any docs/tutorials/books that present ruby in detail, but in a condensed style? (for someone who used to know ruby very well and wants to regain the knowledge without reading too much :D)
<pipework>
Which would mean you need multiple containers/servers
<zenspider>
is this even remotely about ruby? because it looks like more linux BS to me
<pipework>
zenspider: It's about ruby and packaging.
<darix>
zenspider: it is neither BS nor linux specific
<pipework>
jhass: If it stands up to people who package for arch well, I'm happy it exists.
cleopatra has quit [Ping timeout: 245 seconds]
<zenspider>
sure looks like BS to me. It isn't helping anyone learn / do ruby.
<darix>
zenspider: managing the lifecycle of the apps you write after you learned it, is just as important.
<luka__>
@<zenspider>, thx, just what I needed
<pipework>
zenspider: That makes sense to me if you're the kind of rubyist who doesn't care about packaging.
<zenspider>
luka__: awesome.
<pipework>
IMO, rubyists aren't the best citizens when it comes to using and building libraries and applications that can reasonably work well when you can only have one version of a gem installed.
luka__ has quit [Quit: Leaving]
<havenwood>
gems need manpages!
<pipework>
darix: A couple places I worked tried hard, but the need for one application to use a different version of a gem was just too great and it made deployment a nightmare.
<darix>
pipework: with great power comes great responsibilities.
<pipework>
We decided disk was cheap and we could package the shared gems if we want.
tkuchiki has quit [Remote host closed the connection]
<darix>
pipework: disk is cheap. maintenance isnt.
<pipework>
darix: Yeah, and the inflexibility of a single shared package means that your cost of upgrading is large.
slawrence00 has joined #ruby-lang
tkuchiki has joined #ruby-lang
<darix>
pipework: we can still have 2 rails branches packaged just fine
<darix>
but the advantage is: when we have 3 apps all using the same version of the library. we release 1 fixed package for the library and all 3 apps are fixed.
<pipework>
darix: Then you need to manage the PATH that each app uses.
<darix>
we dont have to rerelease 3 app packages
<darix>
:)
<pipework>
darix: Maybe I just work with a different breed of sysadmins that are better adapted to bundling unshared dependencies.
<darix>
pipework: been there done that. :)
<pipework>
darix: I've been there and done that for yours too. :)
j4cknewt_ has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
tkuchiki has quit [Ping timeout: 250 seconds]
imkmf has quit [Ping timeout: 264 seconds]
nelsonsar has quit [Remote host closed the connection]
nelsonsar has joined #ruby-lang
enebo has quit [Quit: enebo]
ducklobster has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
nelsonsar has quit [Ping timeout: 250 seconds]
whippythellama has quit [Quit: whippythellama]
jimbach has quit [Remote host closed the connection]
parenjitsu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sarkyniin has joined #ruby-lang
siwica has quit [Remote host closed the connection]