apeiros changed the topic of #ruby-lang to: Ruby 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste code on http://gist.github.com
pricees has joined #ruby-lang
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.
michael_mbp has joined #ruby-lang
imkmf has quit [Quit: Textual IRC Client: www.textualapp.com]
<darix> oliver___: why do you care so much about it?
<darix> oliver___: if that is a killer argument for framework shopping... oh my
slawrence00 has quit [Ping timeout: 245 seconds]
elia has quit [Quit: Computer has gone to sleep.]
oleo__ has joined #ruby-lang
dwknoxy has quit [Quit: Textual IRC Client: www.textualapp.com]
jmrepetti has quit [Ping timeout: 255 seconds]
<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
<lilsheep> as in unprompted input
parenjitsu has quit [Quit: Textual IRC Client: www.textualapp.com]
lilsheep has quit [Remote host closed the connection]
jimbach has joined #ruby-lang
<jdecuirm__> guys, i have some methods here in a library program, but i have my doubts
<jdecuirm__> in the library.rb i have a method called add_book
hahuang65 has quit [Ping timeout: 265 seconds]
<jdecuirm__> can anyone give me some advices about the parameters?
<pipework> jdecuirm__: I'd use a hash.
<pipework> Or if you're on 2.1, I'd use named parameters.
<jdecuirm__> now that's something to read about
<jdecuirm__> the named parameters!
cornerma1 has joined #ruby-lang
<pipework> jdecuirm__: That's using a hash, which is fine, if you want named parameters, it's more like def initialize(key_name: default_value)
nathanstitt has quit [Quit: I growing sleepy]
michael_mbp has quit [Excess Flood]
cornerman has quit [Ping timeout: 255 seconds]
cornerma1 is now known as cornerman
<pipework> jdecuirm__: Chat here. :)
michael_mbp has joined #ruby-lang
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
Rojo has joined #ruby-lang
<jdecuirm__> oh sorry
robbyoconnor has joined #ruby-lang
<jdecuirm__> now i edited the book.rb to use a hash, how can i modify the add_book method in library.rb to use the hash?
<pipework> jdecuirm__: Book.new(name: name, author: author, publicist: publicist, date: date, serial: serial)
wallerdev has quit [Quit: wallerdev]
amclain has quit [Quit: Leaving]
<jdecuirm__> thanks! pipework!
nathanstitt has joined #ruby-lang
j4cknewt has joined #ruby-lang
apeiros__ has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
amsha has joined #ruby-lang
siwica has quit [Quit: siwica]
caseydriscoll has quit [Remote host closed the connection]
joshingly has joined #ruby-lang
dwknoxy has quit [Quit: Textual IRC Client: www.textualapp.com]
<jdecuirm__> i'm trying to make a count with a hash, can you help? this is what i have @books.each { |book|puts @book_count[book.name] += 1 }
<jdecuirm__> it's working, but it prints 1 2 1
<jdecuirm__> wait
<pipework> So you want to make a count of something where the hash has book names and a number as the value?
amclain has joined #ruby-lang
mkaesz has joined #ruby-lang
djbkd has quit [Quit: My people need me...]
<pipework> Use @books.each_with_object({}) {|book, count_hash| count_hash[book.name] ||= 0; count_hash[book.name] += 1 } I think
<jdecuirm__> what is that hash doing after each_with_object?
<pipework> jdecuirm__: Look at the docs for each_with_object
<pipework> It's similar to #inject
<jdecuirm__> thanks pipe!
<jdecuirm__> so there's no need to create a hash just to count right? it's better to create it local?
j4cknewt has quit [Read error: Connection reset by peer]
Rojo has quit [Ping timeout: 244 seconds]
j4cknewt has joined #ruby-lang
<pipework> jdecuirm__: I like creating and returning the hash in the method call, don't you?
<pipework> It's a bit nicer.
lilsheep has joined #ruby-lang
<jdecuirm__> thanks
skiMoo has quit [Read error: Connection reset by peer]
<jdecuirm__> but how can i return the count?
<jdecuirm__> just count_hash?
<pipework> jdecuirm__: It returns the count_hash already
<pipework> Try it
<jdecuirm__> this is what i get :P
<jdecuirm__> {#<Book:0x000000020e96e0 @name="Maze Runner", @author="James Dashner", @publicist="V&R", @date="18/03/2012", @serial="ERF331">=>1, #<Book:0x000000020e95c8 @name="Maze Runner", @author="Jam
<pipework> You didn't call user.name
<pipework> I mean book.name
<pipework> jdecuirm__: make sure you're calling book.name in the count_hash[]
<jdecuirm__> OMG thanks lol
mistym has quit [Remote host closed the connection]
<pipework> lilsheep: You're back!
<lilsheep> hii
j4cknewt_ has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
<pipework> lilsheep: Look into this: http://www.sitepoint.com/ruby-tcp-chat/
<lilsheep> kk ty pipework
hahuang65 has joined #ruby-lang
pricees has joined #ruby-lang
kyb3r_ has joined #ruby-lang
pricees has quit [Ping timeout: 240 seconds]
wnd has quit [Excess Flood]
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> jdecuirm__: That's definitely bullshit.
<pipework> Private methods are great.
<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.
rahul_j has joined #ruby-lang
haraoka_ has joined #ruby-lang
<ledestin> it just won’t call proc until Ctrl-C
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]
NoNMaDDeN has joined #ruby-lang
mark06 has left #ruby-lang ["http://pidgin.renatosilva.me - Pidgin++"]
AKASkip has joined #ruby-lang
ruskie has quit [Ping timeout: 265 seconds]
SuMo_D has quit [Remote host closed the connection]
Rojo has quit [Ping timeout: 255 seconds]
SuMo_D has joined #ruby-lang
SuMo_D has quit [Read error: Connection reset by peer]
SuMo_D has joined #ruby-lang
pnbeast has quit [Quit: leaving]
fluuflu has joined #ruby-lang
pricees has joined #ruby-lang
marcdel has joined #ruby-lang
oliver___ has joined #ruby-lang
pricees has quit [Ping timeout: 272 seconds]
amclain has quit [Quit: Leaving]
mskaesz has quit [Ping timeout: 245 seconds]
marcdel has quit [Ping timeout: 250 seconds]
symm- has joined #ruby-lang
mistym has joined #ruby-lang
marcdel has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
|jemc| has quit [Read error: Connection reset by peer]
marcdel has quit []
marcdel has joined #ruby-lang
|jemc| has joined #ruby-lang
AKASkip has quit [Ping timeout: 264 seconds]
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Quit: Konversation terminated!]
SuMo_D has quit [Remote host closed the connection]
skade has joined #ruby-lang
symm- has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
gianlucadv has joined #ruby-lang
ahmetkapikiran has quit [Quit: ahmetkapikiran]
marcdel has quit []
Xzanron has joined #ruby-lang
ruskie has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
arBmind has joined #ruby-lang
mkaesz has joined #ruby-lang
symm- has joined #ruby-lang
NoNMaDDeN has quit [Remote host closed the connection]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 264 seconds]
AKASkip has joined #ruby-lang
rahul_j has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<ddfreyne> yorickpeterse: sweet :)
apeiros has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
NoNMaDDeN has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
q_leonetti has joined #ruby-lang
oleo__ has quit [Quit: Verlassend]
gmas has quit [Ping timeout: 265 seconds]
pricees has joined #ruby-lang
solars has joined #ruby-lang
pricees has quit [Ping timeout: 258 seconds]
brushbox_ has joined #ruby-lang
q_leonetti has quit [Quit: q_leonetti]
mkaesz has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
siwica has joined #ruby-lang
solars has quit [Ping timeout: 244 seconds]
clauswitt has joined #ruby-lang
jmrepetti has joined #ruby-lang
ledestin has quit [Ping timeout: 256 seconds]
skade has quit [Quit: Computer has gone to sleep.]
matp has quit [Remote host closed the connection]
matp has joined #ruby-lang
skade has joined #ruby-lang
q_leonetti has joined #ruby-lang
emmesswhy has joined #ruby-lang
chussenot has joined #ruby-lang
ta has quit [Ping timeout: 250 seconds]
vondruch has joined #ruby-lang
apeiros has joined #ruby-lang
solars has joined #ruby-lang
apeiros has quit [Ping timeout: 258 seconds]
mistym has quit [Remote host closed the connection]
bradland has quit [Ping timeout: 255 seconds]
|jemc| has quit [Read error: Connection reset by peer]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has quit [Remote host closed the connection]
jxie has quit [Quit: leaving]
skade has quit [Quit: Computer has gone to sleep.]
mkaesz has joined #ruby-lang
kwd has joined #ruby-lang
hahuang61 has joined #ruby-lang
apeiros has joined #ruby-lang
hahuang65 has quit [Ping timeout: 265 seconds]
ur5us has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
mkaesz has quit [Ping timeout: 244 seconds]
erratis has quit [K-Lined]
mamantoha has joined #ruby-lang
RitterJack has joined #ruby-lang
mamantoha has quit [Remote host closed the connection]
jmrepetti has quit [Remote host closed the connection]
mamantoha has joined #ruby-lang
jmrepetti has joined #ruby-lang
allomov has joined #ruby-lang
robbyoconnor has joined #ruby-lang
ledestin has joined #ruby-lang
sMecKs has quit [Read error: Connection reset by peer]
rahul_j has quit [Quit: rahul_j]
Versality has joined #ruby-lang
allomov has quit [Remote host closed the connection]
allomov has joined #ruby-lang
elia has joined #ruby-lang
mikecmpbll has joined #ruby-lang
chussenot has quit [Quit: chussenot]
skade has joined #ruby-lang
jmrepetti has quit []
francisfish has joined #ruby-lang
nofxx_ has quit [Ping timeout: 245 seconds]
ur5us has quit [Remote host closed the connection]
pricees has joined #ruby-lang
arBmind has joined #ruby-lang
benlovell has joined #ruby-lang
rahul_j has joined #ruby-lang
ur5us has joined #ruby-lang
ironhide_604 has quit [Remote host closed the connection]
pricees has quit [Ping timeout: 265 seconds]
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby-lang
oliver___ has quit []
rahul_j has quit [Ping timeout: 265 seconds]
rahul_j has joined #ruby-lang
chussenot has joined #ruby-lang
ta has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
Miphix has joined #ruby-lang
ta has quit [Ping timeout: 264 seconds]
<yorickpeterse> morning
ta has joined #ruby-lang
<ljarvis> moin
dangerousdave has joined #ruby-lang
chussenot has quit [Quit: chussenot]
chussenot has joined #ruby-lang
chussenot has quit [Client Quit]
dangerousdave has quit [Ping timeout: 245 seconds]
mnngfltg has joined #ruby-lang
fluuflu was banned on #ruby-lang by ljarvis [*!*fluuflu@213.143.61.*]
fluuflu was kicked from #ruby-lang by ljarvis [be away with your spam]
<yorickpeterse> ha, still spamming?
<ljarvis> they'll get a kline anyway
th_ has joined #ruby-lang
chussenot has joined #ruby-lang
chussenot has quit [Client Quit]
michael_mbp has quit [Excess Flood]
chussenot has joined #ruby-lang
quatron has left #ruby-lang [#ruby-lang]
apeiros_ has joined #ruby-lang
michael_mbp has joined #ruby-lang
chussenot has quit [Client Quit]
apeiros_ has quit [Ping timeout: 265 seconds]
rahul_j has quit [Quit: rahul_j]
<yorickpeterse> So I have this code here that's supposed to spawn a sub process, then detach
<yorickpeterse> ...it never worked
<yorickpeterse> That is, it spawns shit using Spoon (instead of Process.spawn for w/e reason) but never actually detaches the output
<Eising> yorickpeterse: how does your code look? I don't use Spoon, but I have code that does that within my Sinatra app
* yorickpeterse is rewriting this whole thing
<yorickpeterse> bloody jruby has no fork so ugh
<yorickpeterse> well bloody jvm
<yorickpeterse> and redirecting stdout & friends doesn't actually seem to do anything
<ljarvis> dat jvm
duderonomy has quit [Read error: Connection reset by peer]
allomov has quit [Remote host closed the connection]
allomov has joined #ruby-lang
vesan has joined #ruby-lang
yfeldblum has joined #ruby-lang
vesan has quit [Client Quit]
<yorickpeterse> I admire the person who wrote this but I honestly don't see how this could've ever worked in the first place
workmad3 has joined #ruby-lang
chussenot has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
NoNMaDDeN has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
<yorickpeterse> weee fixed it
<yorickpeterse> Process.spawn(ENV, exec_path, *argv, :out => :close, :err => :close, :in => :close)
<yorickpeterse> dat ruby
<Eising> Glad you did :)
<whitequark> ljarvis: what did you kick fluuflu for?
<yorickpeterse> whitequark: privmsg spam
<whitequark> oh
Forgetful_Lion has quit [Ping timeout: 272 seconds]
allomov has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
chussenot has quit [Quit: chussenot]
SuMo_D has quit [Ping timeout: 264 seconds]
<zenspider> how does that bastard keep getting in?
<zenspider> we already had a ban on that name I thought
<ljarvis> doesn't appear to be
<zenspider> huh. a number of bans from a few days ago seem to be gone
<yorickpeterse> seems we have a mole amongst us
<zenspider> oh, wait.
Forgetful_Lion has joined #ruby-lang
<zenspider> no... apeiros banned in #ruby but not here
jxie has joined #ruby-lang
chussenot has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<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?
siwica1 has quit [Remote host closed the connection]
<mustmodify> that fails with "undefined method `say' for main:Object
siwica has joined #ruby-lang
klmlfl has quit [Remote host closed the connection]
Versality has quit [Ping timeout: 255 seconds]
nelsonsar has joined #ruby-lang
GBrawl has quit [Quit: (null)]
<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)
<ljarvis> >> proc { }.call(1)
<eval-in__> ljarvis => nil (https://eval.in/221493)
<ljarvis> you could of course use `lambda { |p| p.say("yes") }`
<ljarvis> and then use `p.call(self)` instead of instance_eval
<ljarvis> I prefer that since it's a bit more obvious of what the context is inside your lambda
<mustmodify> ok
<headius> yorickpeterse: redirects all work in 9k
jimbach has quit [Remote host closed the connection]
thagomizer has joined #ruby-lang
<mustmodify> headius: he isn't on this channel.
<mustmodify> headius: Oh wait, sorry. I guess he is. Apparently I can't read.
<headius> I am everywhere
<headius> and so is he
<headius> yeah I saw him saying something about jruby above :-)
<ljarvis> and if you can't find him, follow the rage
<mustmodify> headius: that sounds exhausing.
<headius> mustmodify: you have no idea
tbuehlmann has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
amsi has joined #ruby-lang
ahmetkapikiran has joined #ruby-lang
RobertBirnie has joined #ruby-lang
fusillicode has quit [Ping timeout: 272 seconds]
nelsonsar has quit [Remote host closed the connection]
imkmf has joined #ruby-lang
nofxx_ has joined #ruby-lang
RobertBi_ has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
RobertBirnie has quit [Ping timeout: 258 seconds]
yfeldblum has joined #ruby-lang
michaeldeol has joined #ruby-lang
yfeldblum has quit [Ping timeout: 256 seconds]
mkaesz has quit [Remote host closed the connection]
nelsonsar has joined #ruby-lang
Sunlorhic has quit [Ping timeout: 245 seconds]
Miphix has quit [Quit: Leaving]
pricees has joined #ruby-lang
nelsonsar has quit [Remote host closed the connection]
chadwtaylor has joined #ruby-lang
nelsonsar has joined #ruby-lang
seank_ has quit []
jimbach has joined #ruby-lang
seank_ has joined #ruby-lang
klmlfl has joined #ruby-lang
mistym has joined #ruby-lang
Sunlorhic has joined #ruby-lang
mikecmpbll has joined #ruby-lang
mamantoha has joined #ruby-lang
haraoka_ has quit [Ping timeout: 244 seconds]
jimbach has quit [Ping timeout: 265 seconds]
rahul_j has joined #ruby-lang
wallerdev has joined #ruby-lang
emmesswhy has joined #ruby-lang
mamantoha has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
apeiros_ has joined #ruby-lang
parenjitsu has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
GBrawl has joined #ruby-lang
siwica has quit [Remote host closed the connection]
sarkyniin has joined #ruby-lang
wallerdev has joined #ruby-lang
siwica has joined #ruby-lang
wallerdev has quit [Remote host closed the connection]
emmesswhy has quit [Quit: This computer has gone to sleep]
wallerdev has joined #ruby-lang
siwica has quit [Remote host closed the connection]
<yorickpeterse> ljarvis: hey I heard that
siwica has joined #ruby-lang
bin7me has joined #ruby-lang
chadwtaylor has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
Lingos has joined #ruby-lang
apt-get_ has joined #ruby-lang
j4cknewt has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
tharindu has quit [Ping timeout: 250 seconds]
sarkyniin has quit [Ping timeout: 240 seconds]
matp_ has joined #ruby-lang
hahuang61 has joined #ruby-lang
siwica has quit [Ping timeout: 258 seconds]
j4cknewt has quit [Remote host closed the connection]
matp has quit [Ping timeout: 258 seconds]
Sunlorhic has quit [Ping timeout: 258 seconds]
pricees has quit [Ping timeout: 258 seconds]
caseydriscoll has joined #ruby-lang
arBmind1 has quit [Ping timeout: 272 seconds]
nelsonsar has quit [Remote host closed the connection]
siwica has joined #ruby-lang
theotherstupidgu has joined #ruby-lang
snooc_ has joined #ruby-lang
masterkorp has joined #ruby-lang
<masterkorp> hello
snooc has quit [Ping timeout: 250 seconds]
arrubin has quit []
jimbach has joined #ruby-lang
<masterkorp> I need to sanitize some epoch data values to always contains miliseconds
<masterkorp> 1415990395 like this
<mustmodify> epoch data? as in, the epoch is changing?
<masterkorp> this one only contains data up to the second
<masterkorp> i need to make sure it always contains miliseconds
nelsonsar has joined #ruby-lang
<mustmodify> are they all "to the second"
<mustmodify> ?
<masterkorp> in this case just add zeros
<masterkorp> mustmodify: not all
<jhass> masterkorp: it's called "multiplication"
<masterkorp> jhass: yeah its what i am doing now
<masterkorp> but i need to check if they are or not
<mustmodify> here's the thing
<mustmodify> How do you know whether they are in seconds or not?
<masterkorp> usually by the size of the number
<mustmodify> If all you have is the number, then if all the numbers with 5 decimals are seconds, then add decimals.
<jhass> no, you don't know by looking at the number
<mustmodify> But if you can't make that assumption
<mustmodify> which you probably can't
<mustmodify> then you will need some meta-data
<masterkorp> right
<mustmodify> to tell you the current scale.
<mustmodify> or precision or whatever.
<masterkorp> $ date -d @1415990395
Versality has joined #ruby-lang
<masterkorp> Fri Nov 14 18:39:55 WET 201
<masterkorp> *2014
<masterkorp> $ date -d @14159903951232
<masterkorp> Mon Jun 30 06:07:12 WEST 450679
<mustmodify> masterkorp: or just Time.now.to_i
skade has joined #ruby-lang
<mustmodify> or
<mustmodify> Time.at( 1415990395 )
arBmind has joined #ruby-lang
<masterkorp> will that autofill miliseconds
<masterkorp> ?
<jhass> no, it expects seconds
<jhass> I think fractions work
<jhass> >> Time.at(0.1234)
<eval-in__> jhass => 1970-01-01 00:00:00 +0000 (https://eval.in/221518)
SuMo_D has quit [Remote host closed the connection]
imkmf has quit [Quit: Textual IRC Client: www.textualapp.com]
<masterkorp> >> Time.at($ date -d @14159903951232
<eval-in__> masterkorp => /tmp/execpad-2b9875fe82d4/source-2b9875fe82d4:2: `$ ' is not allowed as a global variable name ... (https://eval.in/221519)
<masterkorp> errp
<masterkorp> >> Time.at(1415990395)
<eval-in__> masterkorp => 2014-11-14 18:39:55 +0000 (https://eval.in/221520)
<masterkorp> >> Time.at(1415990395123)
<eval-in__> masterkorp => 46840-12-12 17:18:43 +0000 (https://eval.in/221522)
<jhass> >> Time.at(0.1234).usec
<eval-in__> jhass => 123399 (https://eval.in/221523)
<masterkorp> >> Time.at(1415990395).usec
<eval-in__> masterkorp => 0 (https://eval.in/221526)
<masterkorp> >> Time.at(1415990395123).usec
<eval-in__> masterkorp => 0 (https://eval.in/221527)
<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.
<jhass> fessenden: Please share your code on https://gist.github.com
<jhass> don't try to be abstract, don't invent new term
<Fessenden> Hard not to, I don't really know the existing terms. :/ Sorry.
<Fessenden> Also, of course, the second I went for help, I stumbled onto the solution.
<Fessenden> Was trying to load my require files with a reference "./bin/*.rb", needed to use File.join(File.dirname(__FILE__),"./biznet/*.rb"
<Fessenden> Er, bin, not biznet.
<Fessenden> Sorry to waste your concern and time.
<Fessenden> :)
fusillicode has quit [Quit: Leaving.]
<jhass> if you're inside a gem you shouldn't need an absolute path
<jhass> just require relative to your lib/
<jhass> require 'mygem/filea'; require 'mygem/fileb';
tkuchiki has joined #ruby-lang
<jhass> personanly I prefer to list out requires
Sunlorhic has quit [Ping timeout: 245 seconds]
<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)
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
<|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
siwica has joined #ruby-lang
<pipework> jhass: Well, I don't know. You don't have to use slackbuild. I love slack because fuck package managers.
<pipework> darix: I don't package gems into system packages.
<pipework> I package applications.
luka__ has joined #ruby-lang
<darix> pipework: sure
<darix> you mean like
<jhass> I actually do package gems I intend to use system wide
<jhass> gem2arch makes that too easy to not do it
<pipework> I tend to package tools and applications.
<darix> pipework: which uses the gems packaged into rpms:)
<pipework> jhass: And it stands up to the criticism of people who actually package for arch repos?
<jhass> pipework: https://aur.archlinux.org
<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.
<pipework> Not really linux specific.
<zenspider> luka__: my ruby quickref?
<jhass> pipework: oh, misunderstood you there. https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/ruby-mail example that's in official repos. Basically the same code gem2arch generates
<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]
parenjitsu has joined #ruby-lang
siwica has joined #ruby-lang
amsha has quit [Quit: Lingo: www.lingoirc.com]
ducklobster has joined #ruby-lang
sarkyniin has quit [Client Quit]
klmlfl_ has quit [Ping timeout: 264 seconds]
houhoulis has quit [Remote host closed the connection]
ducklobster has quit [Quit: Bye!]
ducklobster has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
pricees has joined #ruby-lang
siwica has quit [Remote host closed the connection]
siwica has joined #ruby-lang
bin7me has quit [Quit: Leaving]
Blaguvest has joined #ruby-lang
matp_ has joined #ruby-lang
pricees has quit [Ping timeout: 256 seconds]
robbyoconnor has joined #ruby-lang
matp has quit [Ping timeout: 264 seconds]
marr has quit [Ping timeout: 244 seconds]
marr has joined #ruby-lang
apeiros_ has joined #ruby-lang
ur5us has joined #ruby-lang
matp has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
matp_ has quit [Ping timeout: 244 seconds]
apeiros_ has quit [Ping timeout: 272 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dda has quit [Remote host closed the connection]
jo__ has quit [Quit: Connection closed for inactivity]
ur5us has quit [Remote host closed the connection]
AKASkip has quit [Ping timeout: 250 seconds]
imkmf has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
GBrawl has quit [Quit: (null)]
araujo has quit [Read error: Connection reset by peer]
jimbach has joined #ruby-lang
araujo has joined #ruby-lang
solars has quit [Ping timeout: 265 seconds]
Lingos has quit [Quit: Be back later ...]
Lingos has joined #ruby-lang
David_H_Smith has quit [Remote host closed the connection]
David_H_Smith has joined #ruby-lang
David_H_Smith has quit [Remote host closed the connection]
David_H_Smith has joined #ruby-lang
Lingos has quit [Ping timeout: 255 seconds]
siwica has quit [Remote host closed the connection]
siwica has joined #ruby-lang
Fessenden has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
David_H_Smith has quit [Ping timeout: 264 seconds]
shinnya has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
imkmf has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has quit [Remote host closed the connection]
thagomizer has quit [Quit: Leaving.]
matled has quit [Remote host closed the connection]
matled has joined #ruby-lang
faces has quit [Read error: Connection reset by peer]
face has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
RitterJack has quit [Remote host closed the connection]
Benstr has joined #ruby-lang
NoNMaDDeN has quit [Remote host closed the connection]
hinbody has quit [Quit: leaving]
michaeldeol has joined #ruby-lang
siwica has quit [Ping timeout: 244 seconds]