apeiros changed the topic of #ruby to: Ruby 2.1.1; 2.0.0-p451; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
cjsarette has quit [Ping timeout: 245 seconds]
Xuisce has quit [Quit: Leaving...]
oso|away is now known as oso96_2000
mven has joined #ruby
cjsarette has joined #ruby
geopet has quit []
<bricker> prionic: Second "professionl" development gig, 3 years at my first one and now 2 years here
axl_ has quit [Quit: axl_]
Atw has joined #ruby
Hobogrammer___ has joined #ruby
satan_ has quit [Remote host closed the connection]
<bricker> gotta go, see ya
bricker has quit [Quit: leaving]
<itadder> hi
parduse has quit [Ping timeout: 264 seconds]
itadder has quit [Remote host closed the connection]
Megtastique has quit []
itadder has joined #ruby
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
macclearich has joined #ruby
lpavan has quit [Read error: Connection reset by peer]
lpvn has quit [Read error: Connection reset by peer]
lpavan has joined #ruby
dorei has quit []
lpvn has joined #ruby
tt1187_ has quit [Ping timeout: 264 seconds]
jefflyne has quit [Ping timeout: 244 seconds]
Hobogrammer has joined #ruby
srji has joined #ruby
monkegjinni has joined #ruby
predator217 has joined #ruby
itadder has quit [Ping timeout: 264 seconds]
Hobogrammer___ has quit [Ping timeout: 264 seconds]
subbyyy has joined #ruby
jefflyne has joined #ruby
crystal77 has joined #ruby
monkegjinni has quit [Read error: No route to host]
monkegjinni has joined #ruby
srji_ has quit [Ping timeout: 252 seconds]
mocfive has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 252 seconds]
lkba has joined #ruby
lpavan has quit [Read error: Connection reset by peer]
lpavan has joined #ruby
lpvn has quit [Read error: Connection reset by peer]
DropsOfS_ has quit [Read error: Connection reset by peer]
d5sx43 has joined #ruby
DropsOfSerenity has joined #ruby
Nirgali42 has joined #ruby
lpvn has joined #ruby
jzig has joined #ruby
mocfive has joined #ruby
m00nlight__ has joined #ruby
m00nlight_ has quit [Ping timeout: 264 seconds]
AlSquirikou has quit [Quit: This computer has gone to sleep]
aces1up9939 has joined #ruby
lpavan has quit [Read error: Connection reset by peer]
lpvn has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
SCommette has quit [Client Quit]
lpavan has joined #ruby
<aces1up9939> how would you guys overwrite kernel.puts so that I could trace all the puts calls? I have some weird output going to the console, trying to figure where its coming from some gem probably.
lpvn has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
NalloK has joined #ruby
<centrx> But it could be coming from Kernel.print or something else
NalloK has quit [Max SendQ exceeded]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<aces1up9939> hrmm yeh.. what are all the root output functions i should hook?
lpavan has quit [Read error: Connection reset by peer]
<aces1up9939> also how would i hook it? just Ovverride Kernel.puts like def puts(*args) ; super args ; end ???
lpavan has joined #ruby
lpvn has quit [Read error: Connection reset by peer]
sotoj has quit [Quit: Leaving]
jonah_k has quit [Remote host closed the connection]
sotoj has joined #ruby
lpvn has joined #ruby
<centrx> aces1up9939, If you really think the puts is a problem, just raise an error and that will show you where it came from
<centrx> aces1up9939, I would just search the source code myself, or remove all the code and isolate which gem it is from
ffranz has quit [Quit: Leaving]
Kricir has joined #ruby
jkamenik has left #ruby [#ruby]
phutchins has joined #ruby
dik_dak has quit [Quit: Leaving]
gigetoo has quit [Remote host closed the connection]
sotoj has quit [Quit: Leaving]
NalloK has joined #ruby
sotoj has joined #ruby
sotoj has quit [Client Quit]
gigetoo has joined #ruby
NalloK has quit [Max SendQ exceeded]
jetblack has joined #ruby
<aces1up9939> centrx how would i just override puts?
axl_ has joined #ruby
<aces1up9939> detect if certain thing is in the string
<aces1up9939> then just drop the trackback
<aces1up9939> i already tried searching for puts etc.
<centrx> module Kernel; def puts; ...; end
mansi has joined #ruby
<aces1up9939> here is what i have
<aces1up9939> do i need to super it?
<aces1up9939> i guess not eh?
weie has quit [Ping timeout: 264 seconds]
DropsOfSerenity has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lw has joined #ruby
lpvn has quit [Read error: Connection reset by peer]
lpavan has quit [Read error: Connection reset by peer]
bthesorceror has joined #ruby
lpvn has joined #ruby
lpavan has joined #ruby
mocfive has quit [Remote host closed the connection]
Gadgetoid has quit [Ping timeout: 264 seconds]
SegFaultAX has quit [Excess Flood]
go|dfish has quit [Ping timeout: 244 seconds]
forced_request has quit [Read error: Connection reset by peer]
bthesorceror has quit [Remote host closed the connection]
lpvn has quit [Read error: Connection reset by peer]
Salve_ has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
Salve has joined #ruby
lw has quit [Quit: s]
lpvn has joined #ruby
lw has joined #ruby
lw has quit [Max SendQ exceeded]
lw has joined #ruby
lw has quit [Client Quit]
lpavan has quit [Read error: Connection reset by peer]
yfeldblu_ has quit [Remote host closed the connection]
panchiniak_ has quit [Remote host closed the connection]
lpavan has joined #ruby
yfeldblum has joined #ruby
go|dfish has joined #ruby
lpvn has quit [Read error: Connection reset by peer]
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
lpvn has joined #ruby
Salve has quit [Ping timeout: 264 seconds]
Geniack has quit [Disconnected by services]
Geniack_ has joined #ruby
recursive has quit [Ping timeout: 252 seconds]
scarolan_ has joined #ruby
terrellt has joined #ruby
davy has quit [Remote host closed the connection]
Jake232 has joined #ruby
davy has joined #ruby
sailias has joined #ruby
sleepersawake_ has joined #ruby
sleepersawake_ has quit [Read error: Connection reset by peer]
sleepersawake has joined #ruby
pietr0 has joined #ruby
toastynerd has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 244 seconds]
lw has joined #ruby
mocfive has joined #ruby
cashnguns has joined #ruby
Salve has joined #ruby
sleepersawake has quit [Remote host closed the connection]
DropsOfSerenity has joined #ruby
hermanmu_ has quit [Ping timeout: 264 seconds]
Kricir has quit [Remote host closed the connection]
eruthven has quit [Quit: Textual IRC Client: www.textualapp.com]
VTLob has quit [Quit: VTLob]
lpvn has quit [Ping timeout: 252 seconds]
lpavan has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
jfelchner_ has quit [Quit: Connection closed for inactivity]
sleepersawake has joined #ruby
bthesorceror has joined #ruby
d5sx43 has quit [Remote host closed the connection]
philcris_ has joined #ruby
philcris_ is now known as philcrissman_
binaryhat has joined #ruby
sleepersawake has quit [Remote host closed the connection]
fridim__ has joined #ruby
snath has joined #ruby
philcrissman has quit [Ping timeout: 252 seconds]
mikepack_ has joined #ruby
jetblack has quit [Ping timeout: 252 seconds]
hermanmunster has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
Salve_ has joined #ruby
jcs222 has quit [Quit: leaving]
snuffeluffegus has joined #ruby
forced_request has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
Salve has quit [Ping timeout: 240 seconds]
robustus has quit [Ping timeout: 244 seconds]
mikepack_ has quit [Ping timeout: 240 seconds]
sailias has quit [Ping timeout: 240 seconds]
NalloK has joined #ruby
pel_daniel1 has left #ruby [#ruby]
Avahey has joined #ruby
NalloK has quit [Max SendQ exceeded]
Megtastique has joined #ruby
robustus has joined #ruby
lpavan has joined #ruby
weeems has joined #ruby
monkegjinni has quit [Remote host closed the connection]
lmickh has quit [Remote host closed the connection]
lpvn has joined #ruby
pierre1_ has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
weems has quit [Disconnected by services]
weeems is now known as weems
weems has quit [Changing host]
weems has joined #ruby
<soahccc> Is there an alternative to (n)curses when I want output at the top and command input at the bottom?
recursive has joined #ruby
jgoss has quit [Ping timeout: 265 seconds]
yourmysin has joined #ruby
axsuul has joined #ruby
charlies_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mocfive has quit [Remote host closed the connection]
nobitanobi has quit [Ping timeout: 252 seconds]
davy has quit [Remote host closed the connection]
v1n has quit [Ping timeout: 252 seconds]
snuffeluffegus has quit [Ping timeout: 240 seconds]
Salve_ has quit [Remote host closed the connection]
forced_request has quit [Ping timeout: 264 seconds]
GinoMan has quit [Ping timeout: 252 seconds]
Salve has joined #ruby
recursive has quit [Ping timeout: 240 seconds]
snuffeluffegus has joined #ruby
pietr0 has quit [Quit: pietr0]
IceyEC has joined #ruby
apeiros has joined #ruby
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dseitz has joined #ruby
Salve has quit [Ping timeout: 240 seconds]
GinoMan has joined #ruby
Megtastique has quit []
TuxLyn has joined #ruby
<TuxLyn> Heya...
<TuxLyn> So by running open-uri command like open(url, &:read) it auto-closes connection ?
<TuxLyn> and what about open(url).read ?
maletor has quit [Quit: Computer has gone to sleep.]
x1337807x has quit [Ping timeout: 264 seconds]
yasushi has joined #ruby
<centrx> TuxLyn, Use a block with open
IceDragon has quit [Quit: Space~~~]
<TuxLyn> centrx, this is not what I'm aksing :)
<bricker`LA> TuxLyn: open() opens the connection, fetches the URL, dumps the response into an IO, closes the connection, and returns the IO
Kricir has joined #ruby
vlad_starkov has joined #ruby
<TuxLyn> bricker`LA, yes but is this same for both open(url, &:read) and open(url).read ?
<centrx> Based on the source code, #open only closes the connection if a block is given...
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
timonv has joined #ruby
pranny1 has quit [Quit: Leaving.]
<TuxLyn> so you're saying without using a block its not closing connection ?
yasushi has quit [Ping timeout: 252 seconds]
<centrx> TuxLyn, That is how it appears from the source code, yes.
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
<centrx> TuxLyn, Using a block is also good practice to make it clear what your code is doing
<TuxLyn> damn, that no good
<TuxLyn> well if you want tiny method this is overkill :)
kloeri_ is now known as kloeri
<TuxLyn> alright thanks
george2 has quit [Ping timeout: 264 seconds]
<centrx> TuxLyn, Looks like you can use #read directly
lpvn has quit [Read error: Connection reset by peer]
<centrx> TuxLyn, That will use open with a block
lpavan has quit [Read error: Connection reset by peer]
<centrx> The stdlib documentation sucks
lpavan has joined #ruby
lpvn has joined #ruby
<TuxLyn> yeah it is
<TuxLyn> this why I was asking ^_^
<bricker`LA> From HTTP.start documentaiton:
<bricker`LA> "If the optional block is given, the newly created Net::HTTP object is passed to it and closed when the block finishes."
<TuxLyn> ok thanks
<bricker`LA> that the block is giving
Hobogrammer has quit [Ping timeout: 252 seconds]
<bricker`LA> therefore, the connection is closed
<bricker`LA> *given
<bricker`LA> if the documentation is to be trusted
stdim has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 252 seconds]
<bricker`LA> Oops, I was looking at the wrong start method
george2 has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
<bricker`LA> Oh, same thing anyways:
<bricker`LA> "When this method is called with a block, it passes the Net::HTTP object to the block, and closes the TCP connection and HTTP session after the block has been executed."
robbyoconnor has joined #ruby
lpavan has quit [Read error: Connection reset by peer]
lpvn has quit [Read error: Connection reset by peer]
<TuxLyn> yeah the only close I see there is io.close and ftp.close
<TuxLyn> will look at this last link one sec
lpavan has joined #ruby
DropsOfSerenity has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lpvn has joined #ruby
CaptainJet has quit []
ringaroses1 has quit [Quit: Leaving]
randomnick_ has quit [Quit: Leaving]
thumpba has quit [Remote host closed the connection]
tylersmith has joined #ruby
<TuxLyn> there you go :) it says it auto closes it
<TuxLyn> wait but this is for Net::HTTP
ringaroses has joined #ruby
<TuxLyn> I'm using stdlib open-uri
vlad_starkov has quit [Ping timeout: 240 seconds]
<bricker`LA> TuxLyn: which uses Net::HTTP for URIs
<TuxLyn> oh ok
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bricker`LA> do_finish contains @socket.close
<bricker`LA> do_finish is called when HTTP#start is given a block
<TuxLyn> cool thanks :D
<bricker`LA> HTTP#start is given a block in open-uri's #open
<bricker`LA> convinced yet? :)
<TuxLyn> yeah
justinxreese has quit [Ping timeout: 246 seconds]
shadoi has joined #ruby
<TuxLyn> I thought this would be stupid if it did not close connection automatilcy ^_^
<bricker`LA> yes, I guess the method name is a little confusing in that way though
<bricker`LA> eh I guess not
<bricker`LA> with a block it makes sense
rbartos has quit [Ping timeout: 264 seconds]
<TuxLyn> ok how would you use open-uri in method ?
moneydouble has joined #ruby
thumpba has joined #ruby
tymat has quit [Quit: Leaving]
shadoi1 has quit [Ping timeout: 252 seconds]
<bricker`LA> what?
agent_white has quit [Quit: leaving]
<centrx> >> require 'open-uri'; uri = URI("http://www.google.com"); uri.read
Kricir has quit [Ping timeout: 240 seconds]
<TuxLyn> bricker`LA, I'm just asking how would you do it ;)
ringaroses has quit [Ping timeout: 264 seconds]
<centrx> URI#read with OpenURI will close the connection
<TuxLyn> I do this now > data = open(url).read
razrunelord has quit []
moneydouble1 has joined #ruby
<centrx> data = URI(url).read
<TuxLyn> then use data to do whatever :)
<TuxLyn> ok thanks guys
_maes_ has joined #ruby
TripTastic has joined #ruby
justinxreese has joined #ruby
moneydouble has quit [Ping timeout: 252 seconds]
JBreit has quit [Ping timeout: 264 seconds]
TripTastic is now known as JBreit
TuxLyn has quit [Quit: Leaving]
xeno has quit [Ping timeout: 245 seconds]
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
aryaching_ has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
Celm has quit []
sdouglas has joined #ruby
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
SegFaultAX has quit [Excess Flood]
whomp has quit [Quit: leaving]
invinceable has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jph98 has joined #ruby
thumpba has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
subbyyy has joined #ruby
freerobby has joined #ruby
v1n has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
jph98 has quit [Ping timeout: 252 seconds]
subbyyy has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
IceyEC has quit [Quit: IceyEC]
Hanmac has quit [Ping timeout: 244 seconds]
agent_white has joined #ruby
pierre1_ has quit [Ping timeout: 264 seconds]
soahccc has quit [Ping timeout: 264 seconds]
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
kitak has quit [Ping timeout: 250 seconds]
phutch1ns has joined #ruby
moneydouble1 has quit [Quit: Leaving.]
freerobby has quit [Quit: Leaving.]
agarie has quit [Quit: Leaving...]
moneydouble has joined #ruby
markisonfire has quit [Quit: markisonfire]
Salve has joined #ruby
sputnik13 has quit [Ping timeout: 240 seconds]
axsuul has quit [Ping timeout: 252 seconds]
emergion has joined #ruby
dave_wang has joined #ruby
dave_wang has quit [Client Quit]
macclearich has quit [Quit: Computer has gone to sleep.]
macclearich has joined #ruby
v1n has quit [Ping timeout: 252 seconds]
mlpinit has joined #ruby
Xuisce has joined #ruby
DropsOfSerenity has joined #ruby
Artemicion has joined #ruby
bklane has joined #ruby
macclearich has quit [Ping timeout: 252 seconds]
hiyosi has quit [Ping timeout: 252 seconds]
MomsSphaghetti has joined #ruby
Xuisce has quit [Client Quit]
shadoi1 has joined #ruby
snuffeluffegus has quit [Quit: Leaving]
Xuisce has joined #ruby
alexherbo2 has joined #ruby
Faris has quit [Ping timeout: 244 seconds]
mercwithamouth has quit [Ping timeout: 264 seconds]
soheil has quit [Remote host closed the connection]
dingus_khan has quit [Remote host closed the connection]
aryaching has joined #ruby
pierre1_ has joined #ruby
dingus_khan has joined #ruby
shadoi1 has quit [Ping timeout: 245 seconds]
phutch1ns has quit [Ping timeout: 264 seconds]
17SAAMJ1A has quit [Quit: Leaving.]
reset has quit [Quit: Leaving...]
freerobby has joined #ruby
Spami_ has quit [Quit: This computer has gone to sleep]
Spami has quit [Quit: This computer has gone to sleep]
freerobby has quit [Client Quit]
moneydouble has quit [Quit: Leaving.]
whomp has joined #ruby
marcdel has joined #ruby
jrhorn424 is now known as zz_jrhorn424
<whomp> my program throws up an error about my method being undefined when it's not declared before it's invoked. how can i fix this?
wjlafrance has joined #ruby
brian____ has joined #ruby
Solnse has quit [Quit: Leaving.]
lpavan has quit [Read error: Connection reset by peer]
lpavan has joined #ruby
afex has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
axl_ has quit [Quit: axl_]
sailias has joined #ruby
pierre1_ has quit [Ping timeout: 240 seconds]
phutch1ns has joined #ruby
lpavan has quit [Read error: Connection reset by peer]
terence has joined #ruby
lpavan has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Salve_ has joined #ruby
Salve has quit [Ping timeout: 252 seconds]
NalloK has joined #ruby
<stephenmac7> Why aren't blocks objects?
NalloK has quit [Max SendQ exceeded]
epireve has joined #ruby
<bnagy> whomp: that question pretty much answers itself, no?
sepp2k has quit [Read error: Connection reset by peer]
<whomp> bnagy, in some cases i don't have to declare the method before invoking it
phutch1ns has quit [Ping timeout: 240 seconds]
phutch1n1 has joined #ruby
robbyoconnor has joined #ruby
<bnagy> stephenmac7: good question, I guess... Mostly they are simple to turn into Proc objects whenever you need to do that
<stephenmac7> bnagy: Then why not just have procs?
<stephenmac7> and no blocks
<bnagy> well a proc is bulky syntax
<stephenmac7> So just make procs blocks
<stephenmac7> Then we get rid of & and Proc.new
<bnagy> a block is just a naked chunk of code :)
<pontiki> lego
<bnagy> whereas having Procs as first class vars is very useful
<stephenmac7> bnagy: I see, so it's easier for the interpreter?
<bnagy> for a subset of problems anyway
<stephenmac7> Less overhead for blocks?
<bnagy> I can't answer canonically, but that's my guess
<bnagy> why objectify a chunk of code that is being invoked immediately and never again
<stephenmac7> True
<terence> I defined a method in C and call it in Ruby, but Ruby says it's undefined! I'm not using FFI, but instead I'm using rb_define_singleton_method(...)
sdouglas has quit [Remote host closed the connection]
senayar has quit []
joelroa has quit [Ping timeout: 252 seconds]
wsq has joined #ruby
phutch1n1 has quit [Ping timeout: 240 seconds]
binaryhat has quit [Quit: Leaving]
<bnagy> whomp: pretty sure you do have to declare a method before invoking it.
robbyoconnor has quit [Ping timeout: 245 seconds]
<whomp> bnagy, true thx
<bnagy> but that doesn't mandate an order in a .rb file
<bnagy> cause it's a matter of whether it's defined at runtime by the time the code that invokes it happens
<wsq> hi all, which ruby IDE is more friendly?
<bnagy> there is much hate and little love for IDEs for ruby
robbyoconnor has joined #ruby
<stephenmac7> wsq: Sublime Text? (If that counts as an IDE)
<bnagy> you'll find that almost all established rubyists just use one of the 'standard' editors
pierre1_ has joined #ruby
epireve has quit [Quit: Leaving...]
<bnagy> imvho ( and just saying it makes me fear the flamewar ) ST is the easiest to get started with if you don't know any of them
epireve has joined #ruby
iliketurtles has joined #ruby
NalloK has joined #ruby
phutch1ns has joined #ruby
NalloK has quit [Max SendQ exceeded]
Artemicion has quit []
farmallfan has joined #ruby
MomsSphaghetti has left #ruby [#ruby]
<bnagy> stephenmac7: a related question that comes up a lot is why methods aren't objects
<stephenmac7> bnagy: I wondered that too
<stephenmac7> Why have procs when you can have methods?
sailias has quit [Quit: Leaving.]
frem has quit [Quit: Connection closed for inactivity]
<bnagy> I kind of wish they were too, just so people would stfu about it
<bnagy> but, same thing, you can get a Method object easily if you want one
bricker`1A has joined #ruby
<centrx> methods are messages sent to an object.
<bnagy> again I can only assume it's a implementation thing
<centrx> calls
farmallfan has quit [Client Quit]
Hanmac1 has quit [Ping timeout: 264 seconds]
<bnagy> well the method itself exists
<bnagy> like there's a chunk of bytecode / whatever ( depending on interpreter impl )
epireve has quit [Quit: Linkinus - http://linkinus.com]
Hobogrammer has joined #ruby
bricker`LA has quit [Ping timeout: 244 seconds]
wsq has quit [Quit: leaving]
<bnagy> it's just not an object in the sense that some languages have automatically
<bnagy> more of a syntax wart than anything imv
<agent_white> seivan: He means that he can't provide it, because your issue is ambiguous.
<agent_white> MT
<agent_white> :D
<bnagy> stephenmac7: but procs and methods are fundamentally different, because closures
<stephenmac7> Procs have no closures?
<bnagy> no procs are
pfg has quit [Ping timeout: 252 seconds]
<bnagy> methods shouldn't be
<bnagy> and Methods aren't afaik
<bnagy> but I haven't actually checked
<bnagy> usually you have to rebind methods, which implies not-closure
monkegjinni has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
wsq has joined #ruby
pfg has joined #ruby
absolutezeroff has quit [Disconnected by services]
ff__ has joined #ruby
<havenwood> blocks, procs and lambdas, oh my!
* stephenmac7 drops his things
<stephenmac7> Ruby has lambdas too?
lpavan has quit [Read error: Connection timed out]
<stephenmac7> So, blocks, procs, lambdas, AND methods?
sdouglas has joined #ruby
<havenwood> stephenmac7: the latter not being a proper closure
<havenwood> stephenmac7: lambdas and stabby lambdas ->{:stabby_stab_stab}
* stephenmac7 raises his eyebrows
<stephenmac7> What's a stabby lambda?
lpvn has quit [Read error: Connection timed out]
<RubyPanther> >> ->(stab){"%s got stabbed with a lambda" % stab}.call("stephenmac7")
<eval-in___> RubyPanther => "stephenmac7 got stabbed with a lambda" (https://eval.in/107308)
<havenwood> stephenmac7: `lambda { |arg| arg }` is in stabby form `->(arg){ arg }`
Dwarf has joined #ruby
<stephenmac7> Ahm that
<havenwood> stephenmac7: and you can call a lambda/proc in various fashions
<havenwood> >> [->{}.call, ->{}[], ->{}.()]
<eval-in___> havenwood => [nil, nil, nil] (https://eval.in/107309)
<stephenmac7> Buy they are still the same thing
<centrx> Creating an object is expensive
<havenwood> stephenmac7: stabby lambda is just syntactic sugar for a lambda
pierre1_ has quit [Ping timeout: 240 seconds]
<stephenmac7> I don't really care about different syntax (though the sheer amount of syntax is almost as bad as Perl and PHP)
<havenwood> stephenmac7: but a lambda and proc vary in strictness of arity and locality of return
Hobogrammer_ has joined #ruby
<centrx> PHP is an abomination and a scourge on the face of the earth.
Hobogrammer has quit [Ping timeout: 264 seconds]
<stephenmac7> centrx: I didn't touch it after the first day I took a look at it
hiyosi has joined #ruby
Hanmac has joined #ruby
timonv has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
yourmysin has quit [Remote host closed the connection]
<banister> stephenmac7 block is really just a proc, it's just a syntactic thing really
alvaro_o has quit [Quit: Ex-Chat]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
Valesk has joined #ruby
mneorr has joined #ruby
NalloK has joined #ruby
wsq has quit [Ping timeout: 264 seconds]
NalloK has quit [Max SendQ exceeded]
forced_request has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
whomp has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 252 seconds]
confounds has joined #ruby
brucele_ has joined #ruby
Valesk has quit [Client Quit]
Hobogrammer has joined #ruby
<havenwood> stephenmac7: so a nice lambda or stabby lambda (syntactic sugar) or to not violate tennet's correspondence principle a proc or a block (syntactic sugar)
aryaching has quit [Ping timeout: 240 seconds]
inversesquarelaw has quit [Quit: rm -rf /]
<havenwood> stephenmac7: a lot of sweetener!
Hobogrammer_ has quit [Ping timeout: 264 seconds]
<havenwood> stephenmac7: part of the Ruby way is having more than one way to do it, but there is often an idiomatic way amongst the many
Vivekananda has joined #ruby
<banister> stephenmac7 one pretty interesting perspective i read recently is that ruby only really has one closure, blocks
mneorr_ has quit [Ping timeout: 265 seconds]
<banister> everything else that's a closure is built on blocks, e.g: lambda { } <---- 'lambda' method that takes a block, proc { } <------------ 'proc' method that takes a block
mneorr has quit [Ping timeout: 264 seconds]
<havenwood> banister: interesting, a blog post?
<havenwood> or book?
<banister> havenwood it was a comment on reddit i read a few years go ;)
<havenwood> aha!
<banister> so not recently.. i geuss
<havenwood> hehe
lpavan has joined #ruby
<banister> define_method(:foo) { } <--- 'define_method' method that takes a block ;)
alexju has quit [Remote host closed the connection]
<RubyPanther> >> (stabby = ->(who,times=1){"%s got stabbed with a lambda! " % (times > 1 ? stabby[who,times-1]+who : who)})["Rubby",3]
<eval-in___> RubyPanther => "Rubby got stabbed with a lambda! Rubby got stabbed with a lambda! Rubby got stabbed with a lambda! " (https://eval.in/107315)
lpvn has joined #ruby
<havenwood> define_method :'\o/', ->{ :cheer }
<RubyPanther> that is what the world would look like if everybody used fp
Vovko has quit [Remote host closed the connection]
whomp has joined #ruby
fridim__ has quit [Ping timeout: 252 seconds]
Vivekananda has quit [Read error: Connection reset by peer]
<RubyPanther> >> puts send( define_method :'\o/', ->{ :cheer } )
<eval-in___> RubyPanther => cheer ... (https://eval.in/107318)
lpavan has quit [Read error: Connection reset by peer]
monkegjinni has quit [Read error: Connection reset by peer]
lpavan has joined #ruby
sdouglas has quit [Remote host closed the connection]
<banister> >> RUBY_VERSION
<eval-in___> banister => "2.1.0" (https://eval.in/107319)
vlad_starkov has joined #ruby
<banister> >> require 'pry'
<centrx> >> RUBY_VERSION.to_f / 2.1
<eval-in___> centrx => 1.0 (https://eval.in/107320)
<banister> >> ls
<eval-in___> banister => undefined local variable or method `ls' for main:Object (NameError) ... (https://eval.in/107321)
<banister> >> Enumerator.new { |y| loop { y << rand(100) } }.lazy.select(&:even?).first(10)
lpvn has quit [Read error: Connection reset by peer]
lpavan has quit [Read error: Connection reset by peer]
<eval-in___> banister => [82, 32, 40, 88, 46, 82, 4, 92, 32, 0] (https://eval.in/107322)
lpavan has joined #ruby
lpvn has joined #ruby
radic has quit [Ping timeout: 264 seconds]
yubrew has joined #ruby
thomasxie has joined #ruby
browndawg has joined #ruby
dseitz has joined #ruby
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
pranny has joined #ruby
dseitz has quit [Client Quit]
cjsarette has quit [Ping timeout: 245 seconds]
dseitz has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
pranny has quit [Client Quit]
geopet has joined #ruby
geopet has quit [Client Quit]
poguez__ has quit [Quit: Connection closed for inactivity]
geopet has joined #ruby
cjsarette has joined #ruby
radic has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
DropsOfSerenity has quit [Read error: Connection reset by peer]
binaryhat has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<terence> I defined a method in C and call it in Ruby, but Ruby says it's undefined! I'm not using FFI, but instead I'm using rb_define_singleton_method(...), I'm curious!
jzig has quit [Remote host closed the connection]
jzig has joined #ruby
bklane has quit [Remote host closed the connection]
bklane has joined #ruby
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
crystal77 has quit [Quit: Computer has gone to sleep.]
Jake232 has quit [Ping timeout: 240 seconds]
jzig has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby
bklane_ has joined #ruby
bklane has quit [Ping timeout: 264 seconds]
NalloK has joined #ruby
jgoss has joined #ruby
kzrl has quit [Ping timeout: 240 seconds]
NalloK has quit [Max SendQ exceeded]
binaryhat has quit [Quit: Leaving]
joelroa has quit [Ping timeout: 252 seconds]
virtualize has quit []
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
thumpba has joined #ruby
shadoi has quit [Quit: Leaving.]
lpavan has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
lpavan has joined #ruby
DropsOfSerenity has joined #ruby
virtualize has joined #ruby
jgoss has quit [Ping timeout: 252 seconds]
lpavan has quit [Read error: Connection reset by peer]
mlpinit has quit [Ping timeout: 252 seconds]
lpavan has joined #ruby
jgoss has joined #ruby
thumpba has quit [Ping timeout: 240 seconds]
dingus_khan has quit [Remote host closed the connection]
Jetchisel has quit [Ping timeout: 256 seconds]
nobitanobi has joined #ruby
moneydouble has joined #ruby
moneydouble has quit [Max SendQ exceeded]
deepender has joined #ruby
moneydouble has joined #ruby
Jetchisel has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
mikepack has joined #ruby
whomp has quit [Ping timeout: 240 seconds]
zachallett has joined #ruby
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
Brian520 has quit []
mikepack has quit [Ping timeout: 240 seconds]
scarolan_ has quit [Ping timeout: 252 seconds]
shadoi has joined #ruby
bklane_ has quit [Quit: Leaving...]
whomp has joined #ruby
cdime has joined #ruby
kzrl has joined #ruby
zachallett has quit [Remote host closed the connection]
Salve_ has quit [Remote host closed the connection]
Salve has joined #ruby
brian____ has quit [Quit: brian____]
<terence> I defined a method in C and call it in Ruby, but Ruby says it's undefined! I'm not using FFI, but instead I'm using rb_define_singleton_method(...), I'm curious!
terence has quit [Quit: Page closed]
maroloccio has quit [Ping timeout: 252 seconds]
Salve has quit [Ping timeout: 264 seconds]
terence has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
invinceable has joined #ruby
lpavan has quit [Read error: Connection reset by peer]
dodosan has joined #ruby
lpavan has joined #ruby
jonah_k has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
terence has quit [Client Quit]
deepender has quit [Ping timeout: 264 seconds]
chipotle has quit [Quit: cya]
BackEndCoder has quit [Ping timeout: 245 seconds]
maletor has joined #ruby
lpavan has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
zumba_addict has joined #ruby
lpavan has joined #ruby
rootshift has joined #ruby
chipotle has joined #ruby
<zumba_addict> good evening folks. My ruby has Sinatra and Rackup. When I connect to it, I use http://localhost:9292. Now, I'd like to add SSL support so that I'll run it this way, https://localhost:9292. I can also access this rackup server from my Windows VM and I use http://172.16.1.195:9292. I need SSL for CORS workaround
yubrew has joined #ruby
dingus_khan has joined #ruby
rootshift has quit [Client Quit]
Nirgali42 has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 240 seconds]
browndawg has quit [Ping timeout: 264 seconds]
whomp has quit [Ping timeout: 252 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
animehti has joined #ruby
<animehti> Hello, I am a ruby beginner.
<animehti> What does a scripting language mean?
<animehti> What does an interpret language mean?
<confounds> animehti welcome to the best language evar!
<animehti> Thank you, I am a beginner programmer. I want to learn how to program, I think it's cool.
<confounds> animehti don't think about those terms for now
<animehti> What does it mean though please, I just want to know.
<animehti> Would please elaborate and explain in great detail/emphasis please?
dingus_khan has quit [Ping timeout: 240 seconds]
<confounds> you can also use http://lmgtfy.com/
moneydouble has quit [Quit: Leaving.]
kenneth has joined #ruby
markisonfire has joined #ruby
mlpinit has joined #ruby
browndawg has joined #ruby
<animehti> Would someone tell me what a scripting language is please and why ruby is one?
jtreminio has joined #ruby
nate_h has quit [Ping timeout: 245 seconds]
P1RATEZ has joined #ruby
<confounds> animehti what's your current understanding of it
<jtreminio> Hi all - is there an off-topic, community ruby channel on freenode?
yetanotherdave has joined #ruby
<confounds> have you read the wiki article or googled it?
deepender has joined #ruby
<animehti> not sure, I think that us why I am asking. confounds I appreciate the help but if you aren't going you give me what I am looking for then you're wasting your time.
<animehti> Thanks for helping though.
<testcore> A scripting language or script language is a programming language that supports scripts
Jetchisel has quit [Ping timeout: 256 seconds]
<confounds> testcore animehti has asked that it be explained "in great detail" :)
<animehti> testcore, thank you. Can you now tell me more please, this is what I was looking for.
<animehti> What are scripts or scripting?
Jetchisel has joined #ruby
<testcore> programs written for a special run-time environment
<jtreminio> bash is for scripts
<testcore> the term "script" often used for small programs (up to a few thousand lines of code)
<animehti> testcore what is a "special run-time environment" and what is "bash"?
lpavan has quit [Read error: Connection reset by peer]
<testcore> you should learn to use wikipedia, my friend
<confounds> lol
lpavan has joined #ruby
<jtreminio> If you don't know what bash is, maybe Ruby isn't the language for you (yet).
brucele_ has quit [Ping timeout: 240 seconds]
<testcore> in fact, anyone who could explain what bash or scripting is, has spent plenty of time reading on their own first
<testcore> read then ask
crantron has joined #ruby
<confounds> animehti also, if you look for help, you should be prepared to at least describe your current understanding
moeSeth_ has joined #ruby
bthesorceror has quit []
markisonfire has quit [Read error: Connection reset by peer]
nobitanobi has quit [Remote host closed the connection]
weie has joined #ruby
<confounds> seems to be either trolling or just has an 'interesting' sense of entitlement
<jtreminio> confounds: I am looking for a community, or off-topic ruby channel on freenode. Know of any?
<animehti> #anime?
<confounds> jtreminio what do you mean by off-topic ruby?
<jtreminio> Specifically looking for some Ruby devs who may be interested in contributing to a FOSS Vagrant/Puppet project.
<confounds> hm
<confounds> github must be a decent one
<confounds> whatever their irc channel is
lewix has joined #ruby
<testcore> Vagrant project?
<jtreminio> Vagrant and Puppet.
<testcore> is it an existing project? I've done chef, and would like to pick up puppet as well
<jtreminio> Technically the Vagrant stuff is < 100 lines, while I'm over several thousand Puppet lines so far.
<jtreminio> testcore: www.puphpet.com
browndawg has quit [Ping timeout: 264 seconds]
<confounds> jtreminio there's a docker channel
<jtreminio> Basically I've built a GUI for configuring a vagrant/puppet box. I'm wanting to branch out beyond PHP and add in support for more languages, like Ruby.
<testcore> cool. on github?
<jtreminio> confounds: my question isn't for docker devs, it's for Ruby devs. I want to properly add Ruby as a language to my project, and offer options as I do for PHP.
<jtreminio> testcore: github.com/puphpet/puphpet
<confounds> jtreminio i hear you, but i think the docker channel (and the github one) could be decent starting points
<jtreminio> confounds: however, I want to be certain I'm doing it the right way from the start. I *could* study Ruby myself for several months to figure it out, but ...
vertroa has joined #ruby
mary5030 has joined #ruby
<confounds> jtreminio github has a pretty deep ruby pedigree and its channel should have plenty of devs
<jtreminio> Makes sense
wiku5_ has joined #ruby
<testcore> looking...
<confounds> (ruby devs that is)
<jtreminio> testcore: the frontend is PHP, as well as what pulls all the information together into the puppet yaml files.
iliketurtles has quit [Quit: zzzzz…..]
P1RATEZ has quit []
<confounds> jtreminio lol @ blog post title
top4o has joined #ruby
pierre1_ has joined #ruby
<testcore> so what is it that needs to be done in ruby?
<jtreminio> testcore: if you see on the www.puphpet.com page you'll notice all the options for PHP.
<jtreminio> I know how to properly install PHP, configure it, what extensions are best by default to have. I set up Xdebug (the debugger), package manager (composer), etc.
<testcore> You're wanting to add things like "installing non-PHP tools like Ruby, Python, Node.js, etc"
<jtreminio> I want to add Ruby as an option with all the tools most Ruby devs would want out of the box, similar to how I've set up php
mary5030 has quit [Remote host closed the connection]
<jtreminio> testcore: Python/Node will come later
confounds has quit [Quit: Textual IRC Client: www.textualapp.com]
<jtreminio> but, yes
<testcore> lemme poke around a bit, see if I can help
<jtreminio> good times :)
timonv has joined #ruby
<testcore> ok, so I'm not a php guy... how do I deploy this? :/
kzrl has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
<jtreminio> pretty much the default options on the gui. change the vhost to puphpet.dev, document root to /var/www/puphpet.dev/web
<jtreminio> then checkout from github to /var/www/puphpet.dev
* DriftingInCode woke up
animehti has quit [Quit: Page closed]
<testcore> typing...
<jtreminio> (I should provide a quickstart option for dev!)
agarie has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
arianit has joined #ruby
noop has joined #ruby
top4o has quit [Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424]]
<testcore> lol... I don't even have mod_fcgi installed
iliketurtles has joined #ruby
<jtreminio> testcore: ok if I pm?
<testcore> sure
mlpinit has quit [Remote host closed the connection]
Xuisce has quit [Quit: Leaving...]
yubrew has joined #ruby
iliketurtles has quit [Client Quit]
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
NalloK has joined #ruby
prionic has quit [Ping timeout: 264 seconds]
NalloK has quit [Max SendQ exceeded]
yubrew has quit [Ping timeout: 240 seconds]
lpavan has quit [Quit: Saindo]
phutchins has quit [Remote host closed the connection]
kzrl has joined #ruby
cloud|nix has joined #ruby
vlad_starkov has joined #ruby
zumba_addict has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
cloud|nix has quit [Client Quit]
cloud|nix has joined #ruby
cloud|nix is now known as cloud|zzz
SegFaultAX has quit [Excess Flood]
vlad_starkov has quit [Ping timeout: 264 seconds]
lpvn has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
DriftingInCode has quit []
markisonfire has joined #ruby
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
geopet has quit []
kopasetik has joined #ruby
mr-rich has joined #ruby
cloud|zzz is now known as cloud|nix
<mr-rich> I just learned of the passing of Jim Weirich ...
quatron has joined #ruby
dodosan has quit [Remote host closed the connection]
<mr-rich> Sad ... very sad ... big loss for the Ruby community ...
culturelabs has joined #ruby
OdNairy has joined #ruby
<mr-rich> rest in peace, my friend ...
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
joelroa has joined #ruby
brucele_ has joined #ruby
yfeldblum has joined #ruby
popl has joined #ruby
popl has joined #ruby
dingus_khan has joined #ruby
davedev2_ has quit [Remote host closed the connection]
ff__ has quit [Quit: Leaving]
absolutezeroff has joined #ruby
joelroa has quit [Ping timeout: 240 seconds]
inversesquarelaw has joined #ruby
kopasetik has left #ruby [#ruby]
mary5030 has joined #ruby
shadoi1 has joined #ruby
eVRiAL has joined #ruby
ixti has quit [Ping timeout: 244 seconds]
[lewellyn] has quit [Remote host closed the connection]
sdouglas has joined #ruby
eVRiAL has quit [Ping timeout: 252 seconds]
mocfive has joined #ruby
iliketurtles has joined #ruby
axsuul has joined #ruby
shakeel has joined #ruby
quatron has quit [Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424]]
testcore has quit [Quit: [BX] Man and mouse alike, both end up in pussy]
sdouglas has quit [Ping timeout: 265 seconds]
shakeel has left #ruby [#ruby]
browndawg has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
NalloK has joined #ruby
dingus_khan has quit [Remote host closed the connection]
NalloK has quit [Max SendQ exceeded]
axsuul has quit [Read error: Connection reset by peer]
nfk has joined #ruby
axsuul has joined #ruby
lewellyn has joined #ruby
inversesquarelaw has quit [Quit: rm -rf /]
yubrew has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<agent_white> Night folks
agent_white has left #ruby [#ruby]
yubrew has quit [Ping timeout: 252 seconds]
browndawg has quit [Ping timeout: 240 seconds]
x1337807x has joined #ruby
deepender has quit [Ping timeout: 252 seconds]
kzrl has quit [Ping timeout: 252 seconds]
thomasxie has left #ruby [#ruby]
dodosan has joined #ruby
angusiguess has joined #ruby
rippa has joined #ruby
bricker`1A is now known as bricker`LA
moeSeth_ has quit [Quit: Connection closed for inactivity]
timonv has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
stkowski has joined #ruby
stkowski has left #ruby [#ruby]
kzrl has joined #ruby
cloud|nix has quit [Ping timeout: 264 seconds]
eVRiAL has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
eVRiAL has quit [Max SendQ exceeded]
m00nlight__ has quit [Quit: Konversation terminated!]
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tgkokk has joined #ruby
havenwood has quit []
mocfive has quit [Ping timeout: 240 seconds]
kenneth has joined #ruby
yubrew has joined #ruby
sdouglas has joined #ruby
cloud|nix has joined #ruby
dodosan has quit [Remote host closed the connection]
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
decoponio has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
Brian520 has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
pierre1_ has quit [Ping timeout: 240 seconds]
`MArceLL` has joined #ruby
Salve has joined #ruby
kzrl has quit [Ping timeout: 240 seconds]
sdouglas has quit [Ping timeout: 264 seconds]
tacos1de has quit [Ping timeout: 240 seconds]
centrx has quit [Quit: All this computer hacking is making me thirsty]
k03ll has quit [Ping timeout: 264 seconds]
Asher has joined #ruby
lw has quit [Quit: s]
angusiguess has joined #ruby
OdNairy_ has joined #ruby
OdNairy has quit [Ping timeout: 252 seconds]
nari has joined #ruby
cloud|nix has quit [Quit: Ex-Chat]
cloud|nix has joined #ruby
dingus_khan has joined #ruby
dgfdgf has joined #ruby
pierre1_ has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
Vovko has joined #ruby
Salve has quit [Remote host closed the connection]
Salve has joined #ruby
geopet has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> wheee
<shevy> finally woke up
<shevy> man I was dead yesterday
Salve has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
joelroa has joined #ruby
arianit has quit [Ping timeout: 264 seconds]
sparrovv has joined #ruby
<NotSomeCheese> I feel like shit and my sleep is shit
<NotSomeCheese> effexor withdrawal (  ;____;)
emergion has quit [Ping timeout: 260 seconds]
<NotSomeCheese> holyshit, 2014 is a leap year?
arefaslani has joined #ruby
<shevy> hmm no
joelroa has quit [Ping timeout: 252 seconds]
<shevy> - if year is divisible by 400 then leap year is true
<shevy> - else if year is divisible by 100 then leap year is false
bluOxigen has joined #ruby
<shevy> - else if year is divisible by 4 then leap year is true
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> 2016 will be the next one (divisable by 4)
Aryasam has joined #ruby
sparrovv has quit [Ping timeout: 264 seconds]
<NotSomeCheese> oh
dgfdgf has quit [Ping timeout: 246 seconds]
`MArceLL` has joined #ruby
Vovko has quit [Remote host closed the connection]
alexju has joined #ruby
arefasla_ has joined #ruby
arefaslani has quit [Ping timeout: 252 seconds]
Vovko has joined #ruby
shadoi1 has quit [Quit: Leaving.]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
<shevy> how long would it take debian to make
<shevy> ruby-1.9.3-p545.tar.bz2 available?
arefaslani has joined #ruby
rm__ has quit [Remote host closed the connection]
arefasla_ has quit [Ping timeout: 240 seconds]
rm_ has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
angusiguess has quit [Ping timeout: 240 seconds]
Dragonai has joined #ruby
<NotSomeCheese> >> 2560.0 / 1700.0
<eval-in___> NotSomeCheese => 1.5058823529411764 (https://eval.in/107357)
<NotSomeCheese> shevy: 20 years
tvw has joined #ruby
<Dragonai> If anyone's got a bit: I'm working on a pretty easy interview question, but haven't used Ruby very much, so I'd just like some pointers and guidance on the language's conventions. Message me if you'd like to help :)
arefaslani has quit [Remote host closed the connection]
thumpba has joined #ruby
charliesome has quit [Ping timeout: 240 seconds]
<NotSomeCheese> ask here
<Dragonai> Haha alright
<NotSomeCheese> don't ask other people to message you privately
<Dragonai> Yeah, I gotcha
derek_c has joined #ruby
<Dragonai> So I wrote a script in Ruby that takes in the URL for a HAR file and picks out the name and time of the fastest and slowest resources to load
<Dragonai> The second part of the question says to simply refactor the script to be more object-oriented
<shevy> NotSomeCheese hehe ... at work I could use ruby 1.9.3 but some older p*** variant
<shevy> p545 is quite young
rm_ has quit [Ping timeout: 252 seconds]
dingus_khan has quit [Remote host closed the connection]
jonah_k has quit [Remote host closed the connection]
<shevy> Dragonai is your script a class already
<Dragonai> Nope, just a straight script
<shevy> k
<shevy> move it into a class slowly then
<shevy> that should suffice to answer the interview question ;)
eVRiAL has joined #ruby
<shevy> class HAR; end
<Dragonai> Yeah, I was thinking, should this mean essentially compartmentalizing the script into methods?
<Dragonai> ahaha
<shevy> yes
<shevy> and to use the object to do the checks
<Dragonai> Hmm
<shevy> har.report
<shevy> har = Har.new 'remote url goes here'
<Dragonai> Interesting
brucele_ has quit [Ping timeout: 252 seconds]
<shevy> "The slowest resource is at amazon, the fastest in ur mom's cellar."
<Dragonai> haha
Atw has quit [Ping timeout: 244 seconds]
<shevy> no idea what your code actually does
thumpba has quit [Ping timeout: 264 seconds]
<shevy> but you can split up the tasks into logical chunks and let your class handle it all
chihhsin has quit [Ping timeout: 252 seconds]
<shevy> Dragonai using a class makes it much easier to (re)use your code in other projects
<Dragonai> So that's kind of what I was thinking already, dope. Would it best to transform the script into one class and have another class for the file?
<Dragonai> Right, right
<shevy> well
<shevy> that is more difficult to answer
<shevy> some love to use many tiny classes
<Dragonai> I'm very familiar with OO, but this one is a thinker
<Dragonai> Yeah I don't want to make it annoyingly OO
<Dragonai> haha
<Dragonai> Just reasonably.
<shevy> it probably depends on your style as well
<shevy> I find there is always a cost associated when using a class
<shevy> you need to write an extra skeleton after all
<Dragonai> I think the best approach would be to class-ize the script first and then determine if I'd need a class for the file, I suppose
<Dragonai> Yeah totally
dachi has quit [Ping timeout: 246 seconds]
<shevy> and some tasks to do are complicated
Xiti` has quit [Quit: Leaving]
oso96_2000 is now known as oso|away
skaflem has joined #ruby
Zespre has quit [Ping timeout: 252 seconds]
<shevy> for example
<shevy> I have one class called Compile
<shevy> that class handles compiling in any way imaginable
Zespre has joined #ruby
mneorr has joined #ruby
<shevy> remote URL, local url, source vs. binary, scons vs. gnu autoconfigure vs. cmake, different prefixes, register compilation report somewhere, and so forth and so forth
iliketurtles has joined #ruby
claymore has joined #ruby
<Dragonai> right, right
yubrew has joined #ruby
geopet has quit []
<shevy> sure I can put up sub-tasks into other classes, but class Compile is still the central repository for all these tasks. it likes connects all those tasks
<Dragonai> yeah, I gotcha!
<shevy> anyway
eVRiAL has quit [Ping timeout: 252 seconds]
<shevy> for small things, sure, go use a class. I even have classes that do only one thing alone
Aryasam has quit [Ping timeout: 240 seconds]
<Dragonai> so if the script alone can take care of all these tasks for the file, it doesn't really make sense to bother with another class just for the file
<Dragonai> yeah
<shevy> class RgbToHex
<shevy> guess what this class does!
<Dragonai> hahaha
<shevy> RgbToHex[22,33,44] # => "#16212C"
<Dragonai> converts ascii to assembly, of course
<shevy> it can not do anything more than that
<Dragonai> haha
<shevy> Dragonai I tried to find a gem for that but all the gems I found did a lot more
<Dragonai> haha I do love gems
pierre1_ has quit [Ping timeout: 252 seconds]
deadlock has joined #ruby
<shevy> Dragonai yeah, if your class solves the task at hand, you don't need to artifically make more classes for no real reason
<Dragonai> yeah
<shevy> the skeleton of a class can become annoying
<shevy> class Foo
<shevy> def initialize(i)
<shevy> @i = i
<shevy> end
<shevy> end
<Dragonai> I'm new to Ruby but I've already fallen for it - gems are the shit
<Dragonai> right
<Dragonai> It's already a bit annoying that I have to OO-ize such a simple script :p but it's good practice
justinmcp_ has quit []
<shevy> well see
<shevy> you could just put everything into initialize() alone :P
<Dragonai> haha
<Dragonai> I was literally considering that
<shevy> though I dont do that myself, I delegate to other methods inside initialize
<Dragonai> but it's a dick move. I'm friends with the interviewing engineer but he probably wouldn't appreciate it
<Dragonai> hahaha
<Dragonai> that's an interesting idea
<shevy> but if you already use methods even without a class, you solved 50% of that question at least
<Dragonai> right
yubrew has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
chihhsin has joined #ruby
<Dragonai> haha funnily enough, the initial code was a bit compartmentalized like that but I deconstructed it so I could re-implement it in the second part :p
<Dragonai> so yes, I'm partially done
<Dragonai> haha
<Dragonai> hmm
<Dragonai> okay, well, thank you so much!
<Dragonai> I appreciate the guidance. I'll OO up the script and take it from there. I doubt I'll need to make a class for the URL, but I'll decide that afterward
<Dragonai> cheers!
justinmcp has joined #ruby
brucele_ has joined #ruby
<shevy> well
<shevy> I think the only difference will be that you have to think whether the method would make sense inside of the class
<shevy> I usually have a method call run()
<shevy> which bundles the sub-tasks together
<shevy> for some larger classes a method called reset() to restore/initialize the initial state
forced_request has quit [Read error: Connection reset by peer]
<Dragonai> hmm
thomasxie has joined #ruby
<Dragonai> Actually, now that I'm here, I do have two other easier questions I'd like to ask, if you're up for it :)
<Dragonai> actually never mind those
<Dragonai> haha
<Dragonai> 's all good
<Dragonai> also, just to specify, the second part of the question says "refactor your script to follow object-oriented design principles". I take it that's still in line with what we discussed, as opposed to just being made of functions
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
pierre1_ has joined #ruby
mostlybadfly has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Dragonai> I'm gonna bounce and knock the rest of this code out, but thank you so much once again, pal
<Dragonai> much love
<Dragonai> :)
Dragonai has quit [Quit: peace.]
popl has quit [Ping timeout: 264 seconds]
Vovko has quit [Remote host closed the connection]
brucele_ has quit [Ping timeout: 240 seconds]
wiku5_ has quit [Ping timeout: 252 seconds]
kenneth has joined #ruby
DrCode has joined #ruby
blackmesa has joined #ruby
Salve has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
NovapaX has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
brucele_ has joined #ruby
Salve has quit [Ping timeout: 240 seconds]
yacks has joined #ruby
Vovko has joined #ruby
derek_c has quit [Quit: Leaving]
andrewlio has joined #ruby
timonv has joined #ruby
Kricir has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
lewix has quit [Remote host closed the connection]
_5kg_ has quit [Ping timeout: 265 seconds]
sotoj has joined #ruby
relix has joined #ruby
OdNairy_ has quit []
moeSeth_ has joined #ruby
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
angusiguess has joined #ruby
brucele_ has quit [Ping timeout: 264 seconds]
mneorr has quit [Remote host closed the connection]
cdime has quit [Remote host closed the connection]
sotoj has quit [Ping timeout: 264 seconds]
mneorr has joined #ruby
mehlah has joined #ruby
OdNairy has joined #ruby
OdNairy has quit [Client Quit]
<shevy> ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]
<shevy> hmm
angusiguess has quit [Ping timeout: 240 seconds]
tgkokk has quit [Quit: Textual IRC Client: www.textualapp.com]
mneorr has quit [Ping timeout: 252 seconds]
yubrew has joined #ruby
mehlah has quit [Read error: No route to host]
mehlah has joined #ruby
chuk has joined #ruby
yetanotherdave has quit [Quit: Lost terminal]
yubrew has quit [Ping timeout: 264 seconds]
sotoj has joined #ruby
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
SegFaultAX has quit [Excess Flood]
Xeago has joined #ruby
SegFaultAX has joined #ruby
cherry_l1n has joined #ruby
<cherry_l1n> uhhh how do I get invited to a rails channel
thomasxie has left #ruby [#ruby]
chuk has left #ruby ["Leaving"]
<cherry_l1n> I wonder if anyone knows how to spawn unicorns on demand or maybe another server workers
dseitz has joined #ruby
<cherry_l1n> I'm using another application's API to process requests for my users but that API is being slow sometimes, so all unicorns are getting blocked and no new requests are being processed
tgkokk has joined #ruby
ws2k33 has joined #ruby
AlexRussia has joined #ruby
vlad_starkov has joined #ruby
arefaslani has joined #ruby
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
<shevy> cherry_l1n are you registered on freenode?
<shevy> usually an invite must happen when someone inside the channel specifically invites you
<shevy> or they have a keyword, which you can use to join the channel
shabgard has joined #ruby
shabgard has joined #ruby
<cherry_l1n> ahh, I used to be registered, but I lost my password
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sotoj has quit [Quit: Leaving]
arefasla_ has joined #ruby
sotoj has joined #ruby
arefaslani has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
SegFaultAX has quit [Excess Flood]
GinoMan has quit [Ping timeout: 264 seconds]
jhass|off is now known as jhass
Xeago has left #ruby [#ruby]
Xeago has joined #ruby
SegFaultAX has joined #ruby
sotoj has left #ruby [#ruby]
fulgore_ has joined #ruby
sotoj has joined #ruby
tylersmith has quit [Remote host closed the connection]
guilleiguaran has quit [Quit: Connection closed for inactivity]
sotoj has quit [Client Quit]
sotoj has joined #ruby
arefasla_ has quit [Ping timeout: 252 seconds]
tylersmith has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
AlexRussia has joined #ruby
gbt has joined #ruby
ace_striker has quit [Ping timeout: 245 seconds]
timonv has quit [Ping timeout: 240 seconds]
BeLucid has joined #ruby
arefaslani has joined #ruby
phansch has joined #ruby
Salve has joined #ruby
carraroj has quit [Ping timeout: 264 seconds]
brucele_ has joined #ruby
pontiki has quit [Quit: WeeChat 0.3.2]
maroloccio has joined #ruby
Salve has quit [Ping timeout: 252 seconds]
browndawg has joined #ruby
andy__ has joined #ruby
arietis has joined #ruby
<shevy> I have my password but I lost my mind
joelroa has joined #ruby
crystal77 has joined #ruby
andy__ has quit [Ping timeout: 240 seconds]
BackEndCoder has joined #ruby
klaut has joined #ruby
claymore has quit [Ping timeout: 264 seconds]
sensen has joined #ruby
nouitfvf has joined #ruby
xbob has joined #ruby
cloud|nix_ has joined #ruby
joelroa has quit [Ping timeout: 252 seconds]
cloud|nix has quit [Ping timeout: 264 seconds]
pepewerk is now known as sourcerer
sourcerer has quit [Changing host]
sourcerer has joined #ruby
sourcerer has joined #ruby
sourcerer is now known as Spacecloud
weeb1e_ has quit [Ping timeout: 264 seconds]
spider-mario has joined #ruby
nari has quit [Ping timeout: 252 seconds]
xbob has quit [Ping timeout: 252 seconds]
epireve has joined #ruby
xbob has joined #ruby
<NotSomeCheese> >> 2560.0 / 1700.0
<eval-in___> NotSomeCheese => 1.5058823529411764 (https://eval.in/107406)
epireve has quit [Client Quit]
claymore has joined #ruby
nouitfvf_ has joined #ruby
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
deadlock has quit [Read error: Connection reset by peer]
thumpba has joined #ruby
NalloK has joined #ruby
nouitfvf has quit [Ping timeout: 240 seconds]
NalloK has quit [Max SendQ exceeded]
jackneill has joined #ruby
barratt has joined #ruby
arefaslani has quit [Remote host closed the connection]
eVRiAL has joined #ruby
eVRiAL has quit [Max SendQ exceeded]
thumpba has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 240 seconds]
Aquilo has quit [Ping timeout: 264 seconds]
markisonfire has quit [Quit: markisonfire]
kitak has joined #ruby
stdim has joined #ruby
agjacome has joined #ruby
cloud|nix_ has quit [Ping timeout: 264 seconds]
pontiki3 has joined #ruby
maximski has joined #ruby
Salve has joined #ruby
Notte has joined #ruby
Jetchisel has quit [Ping timeout: 256 seconds]
sotoj has quit [Ping timeout: 252 seconds]
fedesilva has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
lkba has joined #ruby
Salve has quit [Ping timeout: 240 seconds]
bluenemo has joined #ruby
<shevy> NotSomeCheese still calculating leap years? :D
claymore has quit [Ping timeout: 252 seconds]
Notte has quit [Remote host closed the connection]
carraroj has joined #ruby
<pontiki3> shevy :)
gbt has quit [Quit: Leaving...]
claymore has joined #ruby
<shevy> ack
<shevy> there are 3 pontikis
<shevy> I may be triple drunk
tvw has quit []
<shevy> ruby 1.9.3p545 (2014-02-24 revision 45159) [i686-linux]
<shevy> \o/
NalloK has joined #ruby
<pontiki3> wait, 3?
<NotSomeCheese> shevy: no, aspect ratios
NalloK has quit [Max SendQ exceeded]
vlad_starkov has quit [Remote host closed the connection]
<shevy> pontiki3 yah! there is a 3 in you!
<shevy> NotSomeCheese cool sounds like video processing
<shevy> NotSomeCheese do you know AviSynth? http://avisynth.nl/index.php/Main_Page
SegFaultAX has quit [Excess Flood]
<shevy> it's like method calls
<shevy> Version() ReduceBy2 Trim(120,150) FadeOut(10)
<shevy> Version.ReduceBy2.Trim(120,150).FadeOut(10)
arianit has joined #ruby
<shevy> version.reduce_by2.trim(120,150).fade_out(10)
SegFaultAX has joined #ruby
<shevy> hmm or perhaps
<shevy> version.reduce_by(2).trim(120,150).fade_out(10)
tt1187_ has joined #ruby
stdim has quit [Quit: leaving]
sparrovv has joined #ruby
charliesome has joined #ruby
Jetchisel has joined #ruby
maroloccio has quit [Ping timeout: 252 seconds]
ikaros has joined #ruby
DaniG2k has joined #ruby
maroloccio has joined #ruby
yfeldblum has quit [Remote host closed the connection]
_bart has joined #ruby
yubrew has joined #ruby
carraroj has quit [Ping timeout: 252 seconds]
DaniG2k has quit [Quit: leaving]
blackmesa has joined #ruby
billy_ran_away has quit [Ping timeout: 252 seconds]
yubrew has quit [Ping timeout: 264 seconds]
kirun has joined #ruby
fgo has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
JViz has joined #ruby
<shevy> how many different colour variants do you have in RGB? 3x 0..255
<shevy> 16581375 ?
<JViz> is there anything like passportjs for ruby?
mostlybadfly has quit [Quit: Connection closed for inactivity]
<Xeago> shevy: why not audio.transform do reduce_by 2; trim 120, 150; fade_out 10 end
<Xeago> instead of chaining
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
eVRiAL has joined #ruby
eVRiAL has quit [Max SendQ exceeded]
<Xeago> shevy: 255^3
<shevy> Xeago it is from the AviSynth scripting
<Xeago> ah
<Xeago> ok
<shevy> they have not ruby available, but my idea is to extend on it, in ruby eventually, I just wonder about elegant expressions
<shevy> they usually do it: one line per instruction
<Xeago> I don't think version.reduce_by(2).trim(120,150).fade_out(10) is elegant :P
<Xeago> use a block
<shevy> yeah
brucele_ has quit [Ping timeout: 264 seconds]
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
<JViz> i'm guessing omniauth?
twiceaday has quit [Ping timeout: 244 seconds]
<Xeago> JViz: what does passportjs do?
<JViz> it's an authentication middleware
twiceaday has joined #ruby
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<JViz> it handles talking to facebook, google, etc
<JViz> oauth2, openid
<shevy> Xeago the really nice thing with AviSynth was that you could really do all sorts of video and audio manipulation with scripting alone
<shevy> it's like the missing features on unix pipes :D
wjlafrance has quit [Quit: This computer has gone to sleep]
<JViz> it has a ton of providers/strategies
<Xeago> JViz: devize is the biggest featureful mess of things
<Xeago> shevy: yea that is very cool yea :)
<shevy> JViz sounds like "one ring to bind them all"
Czupa has joined #ruby
sparrovv has quit [Remote host closed the connection]
<shevy> or perhaps rack
<Xeago> http://rubygems.org/search?utf8=✓&query=authentication
NovapaX has joined #ruby
alexju has quit [Remote host closed the connection]
cloud|nix has joined #ruby
randomnick_ has joined #ruby
Wolland has joined #ruby
codeitagile has joined #ruby
certaint1 is now known as certainty
redlines has quit [Ping timeout: 240 seconds]
redlines has joined #ruby
Wolland has quit [Client Quit]
ikaros has quit [Quit: Ex-Chat]
<JViz> thank you
arianit has quit [Ping timeout: 252 seconds]
m8 has joined #ruby
timonv has joined #ruby
cloud|nix has quit [Ping timeout: 240 seconds]
<pontiki3> omniauth seems up to date with 2.1
tgkokk has joined #ruby
Salve has joined #ruby
tylersmith has quit [Remote host closed the connection]
fulgore_ has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
fulgore_ has joined #ruby
<pontiki3> wow for omniauth strategies: https://rubygems.org/search?utf8=%E2%9C%93&query=omniauth-
Faris has joined #ruby
NalloK has joined #ruby
kitak has quit [Remote host closed the connection]
NalloK has quit [Max SendQ exceeded]
Salve has quit [Ping timeout: 264 seconds]
kitak has joined #ruby
mercwithamouth has joined #ruby
brucele_ has joined #ruby
thomasxie has joined #ruby
vlad_starkov has joined #ruby
tylersmith has quit [Ping timeout: 240 seconds]
wjlafrance has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
davedev24 has joined #ruby
AndChat| has joined #ruby
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
culturelabs has quit [Quit: Connection closed for inactivity]
browndawg has quit [Ping timeout: 240 seconds]
prateekp has joined #ruby
<prateekp> hello, while i have installed plotrb gem but i am getting load error on require
<prateekp> am i missing on something
<prateekp> ?
pedda has joined #ruby
<prateekp> while when i do gem 'plotrb' it says true
_5kg has joined #ruby
<apeiros> prateekp: show the require and the precise exception
claymore has quit [Ping timeout: 264 seconds]
quatron has joined #ruby
fedesilva has quit [Remote host closed the connection]
angusiguess has joined #ruby
mourest has joined #ruby
<apeiros> prateekp: I see you use it in rails; did you add the gem to your Gemfile
<prateekp> yeah its there
joelroa has joined #ruby
<prateekp> also when i do gem 'plotb' it gives true
<apeiros> that's odd. no idea then.
popl has quit [Quit: Touch the frog.]
wjlafrance has quit [Quit: This computer has gone to sleep]
Beoran has quit [Ping timeout: 264 seconds]
<prateekp> apeiros : check for irb https://gist.github.com/papriwalprateek/9288736
browndawg has joined #ruby
kyle__ has quit [Ping timeout: 264 seconds]
joelroa has quit [Ping timeout: 240 seconds]
kyle__ has joined #ruby
<jhass> hm, interesting, https://rubygems.org/search?utf8=%E2%9C%93&query=plotrb returns no results?
<jhass> prateekp: what do you get on gem which plotrb ?
browndawg1 has joined #ruby
NalloK has joined #ruby
NalloK has quit [Max SendQ exceeded]
<prateekp> hmm yeah its not available on rubygems repository. and doing which plotrb its returning error
<prateekp> no such methid error
<prateekp> jhass : ^^
<jhass> huh, no such method? are you sure?
<prateekp> ohh sorry its returns nothing actually
<prateekp> no path
<prateekp> its returning nothing
nari has joined #ruby
monkegjinni has joined #ruby
<jhass> hm, I'd try installing the git version
browndawg has quit [Ping timeout: 252 seconds]
<prateekp> ok
<jhass> gem 'plotrb', github: 'zuhao/plotrb'
<jhass> bundle
<prateekp> ok
claymore has joined #ruby
<shevy> hmmm
<shevy> does such a line work without bundle as well?
<shevy> the gem() something line
<jhass> it originates from rubygems, doesn't it?
<prateekp> but i installed it locally as well
<jhass> to activate specific versions of gems
<prateekp> then why should it be a problem?
dp__ has joined #ruby
<shevy> prateekp dunno. perhaps on older gems
<shevy> I had to use gem from ruby 1.8.7 at work
<shevy> :(
<shevy> even I moved to 1.9.3 already!
<prateekp> hmm u might be right
<prateekp> but then if i need to make changes to that gem
<prateekp> then i had to pull the gem make changes and push it back to git
<prateekp> and then bundle again to update
<prateekp> isnt it ?
<dp__> where(" system || id || part_number || add_material_info || ipc like ?","%#{search}%") #is this the right way to writte OR
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
Beoran has joined #ruby
atno has joined #ruby
brucele_ has quit [Ping timeout: 264 seconds]
eVRiAL has joined #ruby
<jhass> dp__: that's a #RubyOnRails or #sql question, isn't it?
eVRiAL has quit [Max SendQ exceeded]
<dp__> yes I think so
<apeiros> dp__: no, || is not OR in SQL
<apeiros> OR is OR
<apeiros> in some sql flavors, || is string concatenation
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
popl has quit [Client Quit]
<dp__> aha ok because it is not working well
vlad_starkov has quit [Remote host closed the connection]
<apeiros> also, practically no language understand (a OR b OR c) == d the way you intend it to
<jhass> prateekp: not sure what you're asking. If you want to use a local working copy of a gem inside a project to develop that gem further, the sane way is to use something like bundle config local.plotrb ~/projects/plotrb
jph98 has joined #ruby
thor_ has joined #ruby
zerun0 has quit [Ping timeout: 264 seconds]
brian_____ has joined #ruby
zerun0 has joined #ruby
blackmesa has quit [Remote host closed the connection]
blackmes1 has joined #ruby
blackmes1 has quit [Remote host closed the connection]
dp__ has left #ruby [#ruby]
phansch has quit [Quit: WeeChat 0.4.2]
arianit has joined #ruby
arianit has joined #ruby
arianit has quit [Changing host]
<shevy> hmm
<shevy> def foo; puts 'Hello from foo().'; end
invinceable has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> is there a way to relocate this method into a module at runtime?
p8952 has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
<shevy> and if it is not at runtime, is there a way to put a whole .rb file into a module dynamically? like a file foo.rb that has the above single line, and put it into module_foo.rb with the modulename becoming Foo by auto-deducing and inferring from the name of the method
sensen has quit [Read error: Connection reset by peer]
DropsOfSerenity has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
popl has quit [Client Quit]
<prateekp> jhass : i bundle config local.plotrb /path/to/plotrb but i am still not getting 'which ruby'
Salve has joined #ruby
kyle__ has quit [Remote host closed the connection]
_bart has quit []
akitada has joined #ruby
kyle__ has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
sparrovv has joined #ruby
<jhass> prateekp: you need to make sure to be in a bundler environment. Try if bundle exec irb and then require 'plotrb' works now
<jhass> shevy: why don't you fix your design instead? :P
thomasxie has quit [Remote host closed the connection]
thomasxie has joined #ruby
Salve has quit [Ping timeout: 264 seconds]
<pontiki3> only way i know to do that is to eval the string in whatever context is most appropriate for it
pskosinski has joined #ruby
blackmesa has joined #ruby
yasushi has joined #ruby
<jhass> >> def relocate_to(mod, meth); mod.define_singleton_method meth, method(meth); eval "undef #{meth}"; end; def foo; "bad shevy"; end; module Foo; end; relocate_to Foo, :foo; Foo.foo
<eval-in___> jhass => "bad shevy" (https://eval.in/107452)
<jhass> seriously, don't do that
codeitagile has quit [Quit: Leaving.]
dachi has joined #ruby
codeitagile has joined #ruby
xcv has joined #ruby
<apeiros> jhass: no need for eval to undef
<apeiros> see undef_method and remove_method
jph98 has quit [Quit: jph98]
<pontiki3> ghpds, that is ugly
NalloK has joined #ruby
<jhass> hm, is that new in 2.1?
NalloK has quit [Max SendQ exceeded]
OdNairy has joined #ruby
razibog has joined #ruby
<apeiros> no, those exist since 1.8 at leat
<apeiros> *least
<popl> jhass: no, it's here in 1.9.3
<pontiki3> what is the use case for this, shevy?
<jhass> hm, rubydoc.info doesn't seem to list them interestingly
<apeiros> pontiki3: are you sure you want to go down that rabbit hole? :D
<pontiki3> lol, no
renklaf__ has joined #ruby
<apeiros> that's 1.8.6, rdoc.info doesn't have anything older
OdNairy has quit [Client Quit]
<apeiros> I think it was there even in 1.6
<popl> sweet, I want to see the implementation of those
<pontiki3> anyone know, is aptana studio just a repackaged eclipse?
postmodern has quit [Quit: Leaving]
<popl> The documentation for undef_method says that remove_method will delete the method, but implies that undef_method still lets ruby search superclasses and mixins
AlexRussia has quit [Read error: Connection reset by peer]
<popl> d'oh
<apeiros> nice… docbug, I'd report that
<apeiros> probably a yard or even rubydoc specific issue
yubrew has joined #ruby
ace_striker has joined #ruby
ace_striker is now known as Guest82992
AlexRussia has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
tgkokk has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
tgkokk has quit [Client Quit]
browndawg1 has quit [Read error: Connection timed out]
browndawg has joined #ruby
mary5030 has joined #ruby
codeitagile has quit [Quit: Leaving.]
joelroa has joined #ruby
<apeiros> hey popl, btw., got any tests written for tabledata?
mary5030 has quit [Ping timeout: 240 seconds]
Brian520 has quit []
<popl> apeiros: I was actually working on it right now, but in short: nope. Sorry. If you want to write them yourself or have someone else do it, I understand.
joelroa has quit [Ping timeout: 252 seconds]
<apeiros> popl: no worries. it's not pressing, there's still enough to do. you're working on Column and Row, right? just so I don't write tests for those too.
<popl> Yeah, I was going to do those two to start out with. I noticed you didn't write a few tests in table.rb (I think at least Table#== would be quite involved).
codeitagile has joined #ruby
OdNairy has joined #ruby
yasushi has quit [Remote host closed the connection]
<apeiros> yes, I've still some pending API questions, which I want to answer before writing tests
<popl> gotcha
<apeiros> e.g. for Table#==, whether it should only consider data, or also metadata (like has_headers, has_footer, etc.)
<apeiros> atm I ponder making Table#== simply @data == other.data
<apeiros> and have Table#eql? check for is_a? Table, same metadata and ==
rootshift has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Guest82992 has quit [Ping timeout: 245 seconds]
super_g has joined #ruby
super_g is now known as super_g
ocx has joined #ruby
noop has quit [Ping timeout: 264 seconds]
<ocx> hi what is wrong with my cdoe ?http://pastie.org/8814668
<apeiros> ocx: you tell use
<apeiros> *us
<apeiros> note that variables starting with an uppercase letter are constants. use lowercased variables.
<ocx> warning: already initialized constant T1 R1 .
<ocx> ok
<apeiros> also, $TKBPS is not the same as TKBPS
<apeiros> $var are globals
<jhass> don't use globals
<apeiros> use #{} for interpolation
<apeiros> `foo #{var}`
<apeiros> and "foo #{var}"
<jhass> and most of us prefer loop do end over while true
<apeiros> no need for interpolation with a string variable. `print "#{foo}"` is an expensive way to say `print foo` if foo is already a string
<apeiros> and a verbose way to say foo.to_s if it isn't a string.
dingus_khan has joined #ruby
<jhass> ruby can do arithmetic just fine, no need to shell out to expr, just to_i your variables
<jhass> and use .fdiv for / if you don't want to floor the result
<ocx> tbps= #{t2}.to_i - {t1}.to_i ?
<jhass> yes, though I'd to_i before assigning them to the variable already
bonhoeffer has joined #ruby
<jhass> lastly I'd try r1 = File.read('/sys/...').to_i
<apeiros> curious, would you guys consider this OK? https://gist.github.com/apeiros/9289539 (tweeted this question too)
Speed has joined #ruby
<ocx> r2=`cat /sys/class/net/wlan4/statistics/rx_bytes`.to_i ?
sepp2k has joined #ruby
<bonhoeffer> i'm curious about this pattern https://gist.github.com/tbbooher/9289524
browndawg has quit [Read error: Connection timed out]
<bonhoeffer> it doesn't seem very ruby
<certainty> def forever; while true; yield; end end to hide the nasty loop and show intent
eVRiAL has joined #ruby
eVRiAL has quit [Max SendQ exceeded]
<jhass> certainty: isn't that Kernel#loop ?
browndawg has joined #ruby
<certainty> jhass: d'oh, correct. Could just alias
xcv has quit [Remote host closed the connection]
<apeiros> Kernel#loop is slightly better than that
<apeiros> it rescues StopIteration
<pontiki3> seems legit, apeiros
xcv has joined #ruby
dingus_khan has quit [Ping timeout: 264 seconds]
<certainty> also, you already said that Kernel#loop is preferred
VTLob has joined #ruby
<ocx> no good
<jhass> apeiros: hm I'm asking myself whether you'd want to catch other.data not being there or other.data.== not being there or both (likely the last one), it smells a little bit like exceptions for control flow
<jhass> ocx: just tbps = t2 - t1
<jhass> tkbps = tbps.fdiv(1024)
renklaf__ has quit [Remote host closed the connection]
<pontiki3> seems like a nice bit of duck typing to me
<apeiros> jhass: IMO == should always return, defaulting to false.
<apeiros> jhass: not sure I should actually restrict to NoMethodError
sparrovv has quit [Remote host closed the connection]
<ocx> jhass: i dont need float div
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<ocx> i need div so using .div(1024)
<pontiki3> what else would you rescue?
noop has joined #ruby
<jhass> ocx: tkpbs = tbps / 1024 is just fine then
<ocx> than kyou
<jhass> apeiros: dunno, I think I'd just do other.respond_to?(:data) && other.data == @data, but it's a style thing I'd say
Es0teric has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
<apeiros> jhass: I originally wrote it as an optimistic version of other.respond_to?(:data) && other.data == @data
tgkokk has joined #ruby
<apeiros> given that I'd expect the check to usually be superfluous
<apeiros> now I ponder whether I can just conflate the issue of "is not comparable, thus == is false" with "and it doesn't have the proper methods for me to compare it with"
<pontiki3> maybe i'm confused. isn't that what you are doing?
<apeiros> yeah, I think I'll just plain rescue, not rescue NoMethodError
<apeiros> hrm
<apeiros> then again
<apeiros> damit
<pontiki3> i dunno about that
<pontiki3> RuntimeError?
NalloK has joined #ruby
<apeiros> `rescue` == `rescue StandardError`
NalloK has quit [Max SendQ exceeded]
<jhass> what's with good old blame the user apeiros
<apeiros> RuntimeError is a subclass of StandardError, and only raised by plain `raise "Foo"`
<apeiros> ah damn
<pontiki3> yeah, but why would you rescue that?
<jhass> maybe I want to understand that the thing I pass there doesn't conform to what you expect
<apeiros> I'll leave it at rescue NoMethodError
<apeiros> don't burry bugs.
<apeiros> classes should implement ==
<pontiki3> and NoMethodError isn't a StandardError, is it?
<apeiros> == should not raise a NoMethodError
<apeiros> pontiki3: it is
<apeiros> plain rescue would rescue a NoMethodError
yfeldblum has joined #ruby
<pontiki3> oh, right, NameError is a StandardError
<apeiros> rescue RuntimeError wouldn't rescue a NoMethodError
stringoO has joined #ruby
<pontiki3> no, i was asking why you'd want to rescue RuntimeError in that, sorry was not clear
<ocx> jhass: something wrong with this: http://pastie.org/8814703 :/
codeitagile has quit [Remote host closed the connection]
super_g has quit [Ping timeout: 245 seconds]
Salve has joined #ruby
<jhass> ocx: for one thing you now have this beautiful ruby thing and still all you do is writing shell script :P
<pontiki3> maybe they like the shell
bonhoeffer has quit [Quit: bonhoeffer]
vlad_starkov has joined #ruby
<apeiros> ocx: sticky=`cat /root/sticky` --> sticky = File.read('/root/sticky')
yfeldblum has quit [Ping timeout: 265 seconds]
elaptics`away is now known as elaptics
Salve has quit [Ping timeout: 264 seconds]
stringoO has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
arianit has quit [Ping timeout: 240 seconds]
bonhoeffer has joined #ruby
donove_ has joined #ruby
<jhass> ocx: what should the elsif branch be doing? empty the file?
<shevy> pontiki3 I want to use modules in both ways - standalone, and module-tied
stringoO has joined #ruby
invinceable has joined #ruby
<shevy> stratch the first module, replace with code
vlad_starkov has quit [Ping timeout: 252 seconds]
claymore has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
claymore has joined #ruby
vlad_starkov has joined #ruby
mostlybadfly has joined #ruby
yubrew has joined #ruby
rootshift has joined #ruby
ixti has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
blackmesa has quit [Quit: WeeChat 0.4.3]
<apeiros> holy fuck, opened the windows, it's freezing cold :-S
bonhoeffer has quit [Quit: bonhoeffer]
tgkokk has quit [Ping timeout: 240 seconds]
codeitagile has joined #ruby
yubrew has quit [Ping timeout: 264 seconds]
<ocx> jhass: yes
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
claymore has quit [Ping timeout: 240 seconds]
bluenemo has quit [Read error: Connection reset by peer]
<jhass> ocx: http://paste.mrzyx.de/p9b0f18bf/ there no need for the shell
NalloK has joined #ruby
<ocx> you wrote it all!
NalloK has quit [Max SendQ exceeded]
fedesilva has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claymore has joined #ruby
snath has quit [Ping timeout: 240 seconds]
<ocx> jhass: ndefined local variable or method `received_bps' for main:Object (NameError)
<popl> jhass: you made a typo on line 17
<apeiros> popl: oh, Column#[] changes. it now only considers body rows, to be consistent with Table#[]
carraroj has joined #ruby
<jhass> popl: ocx: right, just for demo purposes anyway ;P
<popl> SHAME
<popl> ;P
<apeiros> popl: same for Column#each
Speed has quit [Ping timeout: 252 seconds]
razibog has quit [Quit: Leaving.]
<shevy> wuest haha I am having way too much fun ever since you told me how to colourize kde konsole now http://oi57.tinypic.com/2upfgar.jpg
bluenemo has joined #ruby
<shevy> wuest next task will be to dump my local knowledgebase onto a kde konsole tab :P
<popl> apeiros: OK
joelroa has joined #ruby
bal1 has joined #ruby
browndawg has quit [Quit: Leaving.]
<ocx> jhass: if sticky == '1' File.write ZERO_COUNTER_FILE, "\n0", mode: 'a' is never matched
Notte has joined #ruby
bal1 has quit [Client Quit]
xcv has quit [Ping timeout: 240 seconds]
codeitagile has quit [Remote host closed the connection]
JBreit has quit [Read error: Connection reset by peer]
shiin has joined #ruby
<jhass> ocx: then either /root/sticky never contains what you think it does (print sticky it with p) or transmitted_kbps never is 0 (print it with p too)
joelroa has quit [Ping timeout: 264 seconds]
<ocx> jhass: sticky is one using print
<ocx> and this is matching too transmitted_kbps == 0
<ocx> is this correct? if sticky == '1'
<jhass> what is sticky.class? (and get used to the p method, you'll see what type an object has over the time)
<jhass> maybe it's "1\n" ?
<jhass> try sticky = File.read(STICKY_FILE).chomp
<ocx> correct
frode15243__ is now known as frode15243
frode15243 has quit [Changing host]
frode15243 has joined #ruby
rightfold has joined #ruby
rightfold has quit [Quit: rightfold]
Speed has joined #ruby
<shevy> a sticky file is icky
AlSquirikou has joined #ruby
JBreit has joined #ruby
<jhass> ocx: I think I still see a bit shell script thinking in the logic here, you're using ZERO_COUNTER to count consecutive times transmitted_kbps is 0, right?
stringoO has quit [Quit: stringoO]
SHyx0rmZ has joined #ruby
mark_locklear has joined #ruby
<jhass> er, /root/zero_counter
_Andres has joined #ruby
thumpba has joined #ruby
<ocx> jhass: yes
<jhass> then I'd suggest this method: http://paste.mrzyx.de/pc7dc320f/
forced_request has joined #ruby
<jhass> (+ the .chomp fix)
moeSeth_ has quit [Quit: Connection closed for inactivity]
yasushi has joined #ruby
IceDragon has joined #ruby
eVRiAL has joined #ruby
thumpba has quit [Read error: Operation timed out]
klaut has quit [Remote host closed the connection]
<ocx> jhass: thanks
diegoviola has joined #ruby
crystal77 has joined #ruby
rootshift has joined #ruby
yasushi has quit [Ping timeout: 264 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
eVRiAL has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
xaq has joined #ruby
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thor_ has quit [Quit: Lost terminal]
thomasxie has quit [Quit: Leaving.]
yfeldblum has joined #ruby
ddd_ is now known as ddd
Salve has joined #ruby
barratt has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 240 seconds]
Salve has quit [Ping timeout: 252 seconds]
tgkokk has joined #ruby
yubrew has joined #ruby
TripTastic has joined #ruby
JBreit has quit [Ping timeout: 252 seconds]
NalloK has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
NalloK has quit [Max SendQ exceeded]
lxsameer has quit [Quit: Leaving]
yubrew has quit [Ping timeout: 264 seconds]
tbrock has joined #ruby
billy_ran_away has joined #ruby
eka has joined #ruby
arietis has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
sotoj has joined #ruby
timonv has joined #ruby
<ocx> jhass: `/var/www/test.sh #{name} &` is not being sent to the bg
<ocx> i need to execute this not on stdout console but in the background and not on the default console
<jhass> no it isn't. Look into Kernel#spawn
scarolan has joined #ruby
cloud|nix has joined #ruby
<ocx> jhass: spawn(/var/www/test.sh #{name} ) ?
cloud|nix has quit [Read error: Connection reset by peer]
lw has joined #ruby
<jhass> yep
<ocx> something weird is happening, when the sh bash file is called, the while loop hangs
tgkokk has quit [Ping timeout: 264 seconds]
tgkokk has joined #ruby
<ocx> the output of bash gets into stdout and it stays there
simono has joined #ruby
<ocx> it looks like bash is blocking the way even with the spawn
NalloK has joined #ruby
<apeiros> popl: pushed some changes and more docs.
<ocx> works now
<ocx> i am loving ruby.
ndrei has joined #ruby
crystal77 has quit [Remote host closed the connection]
crystal77 has joined #ruby
WormDrink has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
joelroa has joined #ruby
<ocx> jhass: in case i do a killall program and then next command is execute program, if killall draws an error like process not found the next command is not executed is this normal?
popl has quit [Ping timeout: 264 seconds]
<jhass> you're still shellscripting
<jhass> don't killall
<jhass> spawn gives you the pid
xcv has joined #ruby
zxq9 has quit [Ping timeout: 264 seconds]
razibog has joined #ruby
<ocx> jhass: but i need to execute the killall since i dont know the pid of the process in memory
<ocx> killall is nice since i can kill it without knowing the pid
TripTastic is now known as JBreit
sotoj has quit [Quit: Leaving]
joelroa has quit [Ping timeout: 264 seconds]
<jhass> well,, I guess you can do success = system("killall -q #{sad_panda}")
invinceable has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ocx> thats not equiv to shell ?
xaq has quit [Read error: Connection reset by peer]
donove_ has quit [Quit: Page closed]
<jhass> it is
<jhass> system just gives you true/false depending on the exit status so you can know whether it was successful or not
vlad_starkov has joined #ruby
fridim__ has joined #ruby
pfg has joined #ruby
pfg has quit [Max SendQ exceeded]
pfg has joined #ruby
xaq has joined #ruby
`MArceLL` has quit [Remote host closed the connection]
`MArceLL` has joined #ruby
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<certainty> also you can use condition->list to get a nice way to work on the condition
<certainty> sorry
dayepa has joined #ruby
ItSANgo_ has quit [Quit: Leaving...]
<jhass> who do you betray us with? :(
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brandonjmckay has joined #ruby
xcv has quit [Ping timeout: 264 seconds]
brandonjmckay has left #ruby [#ruby]
<jhass> ocx: just btw. the need to programmatically killall something smells like a bad system configuration to me. Normally you should either have CLI tools for some supervisor you can resort to (systemd, upstart, daemontools, god, etc.) or at least some sort of pidfile you could read (/var/run/whatever.pid). Just sayin'
AndyWojo_ has quit [Ping timeout: 240 seconds]
xcv has joined #ruby
<ocx> hmm
Megtastique has joined #ruby
AndyWojo has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
kitak has quit [Remote host closed the connection]
mary5030 has joined #ruby
k03ll has joined #ruby
xcv has quit [Remote host closed the connection]
<shevy> certainty is this perl!
xcv has joined #ruby
<jhass> shevy: add a $ and it's worse... PHP!
zxq9 has joined #ruby
ocx has quit [Ping timeout: 245 seconds]
xcv has quit [Read error: Connection reset by peer]
xcv has joined #ruby
<certainty> hah! it's a CHICKEN scheme thing. Actually i just wanted to change my irssi window, but somehow send the last line from my history. Shouldn't do it with one hand.
browndawg has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
relix has joined #ruby
keen__ has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
gregf has joined #ruby
xcv_ has joined #ruby
xcv has quit [Read error: Connection reset by peer]
Sp4rKy has quit [Ping timeout: 265 seconds]
hiyosi has quit [Quit: WeeChat 0.4.1]
prc has quit [Ping timeout: 264 seconds]
<shevy> I was more productive in php than I was in perl :(
yubrew has joined #ruby
hiyosi has joined #ruby
yfeldblum has joined #ruby
<shevy> from my php days, some code survived it and went into different ruby modules. from my perl days though, I only got regexes and how to use .cgi, as a language itself not really anything
Speed has quit [Ping timeout: 240 seconds]
Salve has joined #ruby
mansi_ has joined #ruby
<jhass> so only bad things from perl :P
Speed has joined #ruby
yubrew has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
sailias has joined #ruby
<prateekp> what does %i[x y] yield
Salve has quit [Ping timeout: 252 seconds]
ItSANgo has joined #ruby
<jhass> I think that's not valid ruby
<prateekp> does that existed before
<prateekp> ?
<prateekp> and yielded array of sybols
<jhass> ah , you mean just `%i[x y]`? that's [:i, :y]
<prateekp> symbols?
browndawg has quit [Read error: Connection timed out]
diegoviola has quit [Quit: WeeChat 0.4.3]
<jhass> it's new in ruby 2.0
<prateekp> yeah !!
<jhass> just another variant of what we had before, %q(for strings) %w(for string arrays) etc
Salve has joined #ruby
<shevy> why did they not pick %s for symbols
GinoMan has joined #ruby
<prateekp> %i is not valid in 1.9.3
<prateekp> whats the alternative
<prateekp> ?
<Xeago> %w[].map &:to_sym or something
olivier_bK has joined #ruby
keen__ has joined #ruby
<jhass> wrong answer! updating to 2.1 is the alternative of course! :P
lukec has joined #ruby
<prateekp> but i have a doubt
<prateekp> how a gem which is 8 months old is using %i
<Xeago> 2.1.0 is fairly old isn't it?
<Xeago> oh it is in 2.0 even
<Xeago> ruby2 is like late 2012 I believe?
tbrock has quit [Quit: Computer has gone to sleep.]
ReCoin has left #ruby [#ruby]
mansi_ has quit [Remote host closed the connection]
<jhass> one would think so, right? It's a year ago: https://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/
mansi_ has joined #ruby
Symbiosisz has quit [Quit: Leaving]
<prateekp> hmm , its posted on feb 2013
Symbiosisz has joined #ruby
<prateekp> i must get myself updated lol
Symbiosisz has left #ruby [#ruby]
<jhass> prateekp: look at the topic, we're at 2.1.1 now ;P
<prateekp> hmm i am updating to 2.1.0
IceDragon has quit [Ping timeout: 252 seconds]
rootshift has joined #ruby
yasushi has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> nah, skip .0
<jhass> it's our new Ruby 1.9.1 ;) (ok not as bad, but still...)
Sirupsen has joined #ruby
WormDrink has quit [Read error: Connection reset by peer]
Sp4rKy has joined #ruby
<prateekp> hmm i use 1.9.3
mansi_ has quit [Ping timeout: 252 seconds]
<prateekp> works great
<prateekp> built an app as well
fridim__ has quit [Ping timeout: 264 seconds]
<prateekp> rails application ... check out http://algorithm.daqwest.com/
m8 has quit [Quit: Sto andando via]
nari has quit [Ping timeout: 252 seconds]
lyanchih has joined #ruby
recursive has joined #ruby
WormDrink has joined #ruby
browndawg has joined #ruby
rm_ has joined #ruby
codeitagile has joined #ruby
<shevy> I am on 1.9.3 as well
Salve has quit [Remote host closed the connection]
Salve has joined #ruby
webgen has quit [Remote host closed the connection]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
sailias has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby
cloud|nix has joined #ruby
mlpinit has quit [Quit: Leaving...]
IceDragon has joined #ruby
joelroa has quit [Read error: Operation timed out]
Salve has quit [Ping timeout: 252 seconds]
cloud|nix has quit [Client Quit]
maletor has joined #ruby
cloud|nix has joined #ruby
mark_locklear has quit [Ping timeout: 240 seconds]
deadlock has joined #ruby
Hobogrammer has quit [Ping timeout: 264 seconds]
darth has joined #ruby
deadlock has quit [Max SendQ exceeded]
perldork has joined #ruby
mehlah has quit [Quit: Linkinus - http://linkinus.com]
deadlock has joined #ruby
darth has left #ruby [#ruby]
<shevy> hmm
<shevy> how do you call < and > in english?
deadlock has quit [Max SendQ exceeded]
deadlock has joined #ruby
mary5030 has quit [Remote host closed the connection]
<jhass> angle brackets I think? (not a native speaker either)
rootshift has joined #ruby
Hobogrammer has joined #ruby
Xuisce has joined #ruby
mary5030 has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> utf-8 char names are lower than and greater than, but there also is left-pointing angle bracket and right-pointing angle bracket for very similar characters
tgkokk has joined #ruby
kzrl has joined #ruby
<jhass> *lower/greater than sign
Aquilo has joined #ruby
<shevy> true
mary5030 has quit [Remote host closed the connection]
<jhass> ah actually there's also Right and Left angle bracket as equivalent characters
dh64 has quit [Ping timeout: 252 seconds]
<jhass> so depends on context
<shevy> angle brackets
dayepa has quit [Quit: dayepa]
Hobogrammer has quit [Ping timeout: 252 seconds]
maroloccio has quit [Quit: WeeChat 0.4.3]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
tt1187_ has quit [Quit: Leaving]
<prateekp> Duplicate names for Data object
<prateekp> getting argument error
<prateekp> ^^
<shevy> wat
cloud|nix has quit [Quit: Ex-Chat]
<jhass> prateekp: we can't read your mind nor see your screen ;)
<prateekp> sorry for this
senayar has quit [Ping timeout: 264 seconds]
weems has quit [Ping timeout: 252 seconds]
<shevy> I can read his mind
<shevy> that's why I went wat
<shevy> you wouldn't want to be able to read his mind, trust me
<shevy> it's a mess
<shevy> like php in the brain
<jhass> at least not perl!
IceDragon has quit [Ping timeout: 240 seconds]
<jhass> like yours...
<shevy> no, I never had perl in my brain really
IceDragon has joined #ruby
<shevy> I wrote something, a few weeks later my own code totally confused me
yubrew has joined #ruby
<shevy> perl just kept on slipping away
v1n has joined #ruby
<shevy> in ruby this is much better because the code itself is like a very solid explanation (like 90% of the time)
<shevy> regexes are where I must look much harder for bugs
Solnse has joined #ruby
chuk has joined #ruby
<shevy> and @@vars
yubrew has quit [Read error: Operation timed out]
Garii has joined #ruby
xerox357 has joined #ruby
rawtaz has joined #ruby
Garii is now known as JDHankle
AndChat| has quit [Ping timeout: 240 seconds]
Salve has joined #ruby
<rawtaz> hey everyone. im having an issue with sass after installing `rvm`. in short sass can no longer be run from the command line. http://pastebin.mozilla.org/4434371
<shevy> do you guys use this to remove html? string.gsub(/\<.+?\>/,'')
shiin has left #ruby ["Textual IRC Client: www.textualapp.com"]
ktosiek has joined #ruby
<rawtaz> before i go ahead and try to just completely remove rvm (since i dont have time for problems right now), do you think there's a simple fix to that issue?
yfeldblum has joined #ruby
mansi_ has joined #ruby
<jhass> shevy: iirc there was a reason why you wouldn't want to do that as a security measure
crystal77 has quit [Quit: Computer has gone to sleep.]
cashnguns has joined #ruby
<jhass> rawtaz: you tried gem install sass?
<rawtaz> i have done `gem update` which tells me there's nothing to install/update
<rawtaz> i can try reinstalling it perhaps
perldork has quit [Remote host closed the connection]
<jhass> try it. Also have a look at rvm info, I think your RVM ruby isn't (correctly) activated
senayar has joined #ruby
<rawtaz> hm ok
<rawtaz> i did source that rvm script it asked me to source
<shevy> rawtaz use the source man :D
WormDrink has quit [Read error: Connection reset by peer]
<shevy> wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p545.tar.bz2
<rawtaz> :)
<rawtaz> eh whaddayaknow. running `gem install sass` installed a new version and made it work
Salve has quit [Ping timeout: 252 seconds]
<rawtaz> so am i understanding it right if i say that rvm keeps its own local installation of ruby (and deps perhaps), and it uses homebrew for it?
xerox357 has quit [Remote host closed the connection]
xaq has quit [Remote host closed the connection]
<rawtaz> i.e. whatever other version of ruby there is in the system is meant to be "overloaded"
yfeldblum has quit [Ping timeout: 265 seconds]
xerox357 has joined #ruby
<jhass> I'm not sure what you mean with the "and uses homebrew for it" part, but yes
<rawtaz> im on os x so i know there is/was an old installation. i also think there was a manual installation atop that. but now rvm's version probably overrides both those two
<jhass> sure, it just sets GEM_HOME, modifies PATH etc.
<rawtaz> jhass: well the thing is that when i installed rvm, i got a complaint from git about a homebrew formulae having been edited locally. i had to reset that file to continue. so somehow rvm is using homebrew
<jhass> have a look at rvm info / gem env
<shevy> I dont think it uses homebrew rawtaz, what would be the reason for that?
<rawtaz> aha ok
<rawtaz> shevy: if it didnt i dont know how i would possibly get an error about a homebrew formulae :D
<jhass> shevy: I guess that's the autolibs feature
<shevy> autolibs?
<jhass> shevy: nowadays rvm automagically tries to install the deps you need to compile ruby
<jhass> yes, it made the situation with it worse :P
<rawtaz> here's a copy of what im talking about: http://pastebin.mozilla.org/4434441
<rawtaz> jhass: so i guess for the autolibs/deps it uses brew then?
WormDrink has joined #ruby
<jhass> I guess so
<rawtaz> :)
<shevy> odd
<rawtaz> well, i think i'd rather have it use brew than a completely own infrastructure
guilleiguaran has joined #ruby
aryaching has joined #ruby
xerox357 has quit [Ping timeout: 252 seconds]
<rawtaz> so i was just curious heh
ringaroses has joined #ruby
carraroj has quit [Ping timeout: 264 seconds]
lewix has joined #ruby
<shevy> brew is that package manager in ruby?
* shevy pokes rawtaz
<existensil> no, he's referring to homebrew handling ruby dependencies on os x during rvm install
<jhass> shevy: you know, hipster version of good old dpkg ;)
mary5030 has joined #ruby
<shevy> eeks
<shevy> dpkg depends on perl
<shevy> I found that out when I removed perl site dir
<shevy> know what would be cool? an embedded package manager in (compiled) mruby!
yeticry has joined #ruby
<jhass> I think opkg does a fairly good job
<shevy> opkg?
<jhass> successor of ipkg
<shevy> "Strona g?ówna OPGK Kraków"
Xeago has quit [Remote host closed the connection]
<shevy> apparently opkg is polish, judging from the google search results
browndawg has left #ruby [#ruby]
<rawtaz> shevy: it's a package manager for os x, google "homebrew mac"
poguez__ has joined #ruby
tylersmith has joined #ruby
<jhass> shevy: your google is broken, http://wiki.openwrt.org/doc/techref/opkg
brandonjmckay has joined #ruby
<shevy> polish techref? :D
fungoat has joined #ruby
fungoat has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
brandonjmckay has quit [Client Quit]
Cooler_ has joined #ruby
noop has quit [Ping timeout: 252 seconds]
deadlock has quit [Read error: Operation timed out]
ringaroses has quit [Read error: Connection timed out]
recursive has quit [Ping timeout: 240 seconds]
nomenkun has joined #ruby
brandonjmckay has joined #ruby
diegoviola has joined #ruby
jzig has joined #ruby
shaileshg has joined #ruby
joelroa has joined #ruby
Megtastique has quit []
npearson has joined #ruby
p8952 has quit [Ping timeout: 252 seconds]
lw has quit [Quit: s]
joelroa has quit [Read error: Operation timed out]
lkba has joined #ruby
stephenmac7 has quit [Remote host closed the connection]
prateekp has left #ruby [#ruby]
mgorbach has quit [Quit: ZNC - http://znc.in]
huttan has left #ruby [#ruby]
noop has joined #ruby
mgorbach has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
eichenwald has joined #ruby
v1n has quit [Ping timeout: 240 seconds]
perldork has joined #ruby
yubrew has joined #ruby
xaq has joined #ruby
oracal has joined #ruby
p8952 has joined #ruby
yubrew has quit [Read error: Operation timed out]
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
npearson has quit [Remote host closed the connection]
twopugs has joined #ruby
npearson has joined #ruby
tommyvdesigneryo has quit [Quit: Connection closed for inactivity]
tgkokk has joined #ruby
vlad_starkov has joined #ruby
twopugs has quit []
perldork has quit [Remote host closed the connection]
k03ll has quit [Ping timeout: 240 seconds]
npearson has quit [Ping timeout: 252 seconds]
angusiguess has joined #ruby
Salve has joined #ruby
oracal has quit [Quit: Leaving]
yfeldblum has joined #ruby
Jake232 has joined #ruby
skinny_much_ is now known as skinny_much
einarj has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
Salve has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 264 seconds]
deadlock has joined #ruby
Notte has quit [Remote host closed the connection]
eichenwald has quit [Ping timeout: 240 seconds]
lyanchih has quit [Quit: lyanchih]
mgorbach has quit [Quit: ZNC - http://znc.in]
x1337807x has joined #ruby
snuffeluffegus has joined #ruby
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crystal77 has joined #ruby
mgorbach has joined #ruby
Kruppe has quit [Ping timeout: 265 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
sdouglas has joined #ruby
VeinMelted has joined #ruby
Kruppe has joined #ruby
sepp2k has quit [Quit: Leaving.]
k03ll has joined #ruby
yasushi has quit [Remote host closed the connection]
sigurding has joined #ruby
havenwood has joined #ruby
mary5030 has quit [Remote host closed the connection]
<sigurding> guys short question. I have a list of object which reflect constants. I wanted to store them in yaml files and read them in. Is there any lib/or best practices?
Xeago_ has joined #ruby
jph98 has joined #ruby
ndrei has quit [Quit: leaving]
kate_r has joined #ruby
<sigurding> so something like that: http://blog.jayfields.com/2006/12/ruby-constant-values.html just with objects. Does that seem reasonable?
fschuindt has joined #ruby
ndrei has joined #ruby
<havenwood> sigurding: Maybe consider using YAML::Store:
<havenwood> sigurding: Though I don't really get what you're doing.
brandonjmckay has left #ruby [#ruby]
<sigurding> havenwood: I will give you an sample, wait a sec
rm_ has quit [Remote host closed the connection]
whomp has joined #ruby
VeinMelted has quit [Quit: Lingo - http://www.lingoirc.com]
rm_ has joined #ruby
<sigurding> havenwood: I have this set of objects, which should be loaded as "constant" and "uneditable" objects into the code: https://gist.github.com/jhiemer/9293869
rm__ has joined #ruby
senayar has quit [Remote host closed the connection]
stephenmac7 has joined #ruby
senayar has joined #ruby
<sigurding> havenwood: any good suggestion?
Daemonik has quit [Ping timeout: 264 seconds]
rm_ has quit [Ping timeout: 264 seconds]
tjr9898_ has joined #ruby
<havenwood> sigurding: So you're starting with the JSON above, you want to parse it, assign the keys as new constants with the values as values and persist it to YAML?
<shevy> sigurding you can store constants in yaml
chaos_ has joined #ruby
<sigurding> havenwood: nope this should only reflect the data
<havenwood> sigurding: I don't understand.
<shevy> in yaml explicitely it would be like this:
<shevy> - !ruby/symbol test
<shevy> which should be like :test
<sigurding> if I'd store in yaml or json
Administrator has joined #ruby
<sigurding> doesn't actually matter for me.
<havenwood> sigurding: ahh, so you don't care what it is serialized as?
Administrator is now known as Guest92037
Guest92037 has quit [Client Quit]
<havenwood> sigurding: is it starting as Ruby or JSON?
<sigurding> yes, I just want to load into the code, so that the user is able to select from is set of constants
<sigurding> JSON, due to portability
<sigurding> or YAML
chaos_ has quit [Remote host closed the connection]
<shevy> !ruby/regexp '/a.b/'
mv5mith has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
<shevy> !ruby/struct
joelroa has joined #ruby
senayar has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arietis has joined #ruby
<shevy> I don't think you can do that in json
<sigurding> shevy: what?
<shevy> to store something like a struct in json
chaos_ has joined #ruby
toddbranch has joined #ruby
<sigurding> mh ok, I made an mapper this week, pulling the json into objects
chaos_ is now known as soahccc
<shevy> yeah, you get the data, then you fill up an object on your own. you can do this from any text file :P
<sigurding> hehe
<sigurding> that's true
diegoviola has quit [Quit: WeeChat 0.4.3]
<sigurding> so you would store in a YAML?
Megtastique has joined #ruby
<shevy> sure
<shevy> the problem is, a constant in itself isn't useful, it points to your object in question right? and your object could be super duper complicated, I dont think yaml was built to store super duper complicated objects
<shevy> there is marshal
sdouglas has quit [Remote host closed the connection]
<shevy> hmmm
<shevy> is that possible in mruby btw?
mercwithamouth has joined #ruby
joelroa has quit [Ping timeout: 252 seconds]
<shevy> look wuest now you made me add another useless gem https://rubygems.org/gems/konsole_colours
rm__ has quit [Remote host closed the connection]
rm_ has joined #ruby
rubyoskarpro has joined #ruby
x1337807x has quit [Quit: Textual IRC Client: www.textualapp.com]
Hobogrammer has joined #ruby
lyanchih_ has joined #ruby
yubrew has joined #ruby
x1337807x has joined #ruby
rm_ has quit [Ping timeout: 252 seconds]
LadyRainicorn has joined #ruby
NovapaX has joined #ruby
davidcollom_ is now known as davidcollom
<sigurding> shevy: the object won't get to complicated
sdouglas has joined #ruby
Xeago_ has quit [Remote host closed the connection]
tbrock has joined #ruby
<sigurding> the only advantage I see for marshal would be store for binary data?
Xeago_ has joined #ruby
<shevy> dunno really
<shevy> I always avoiding storing complicated objects
Hobogrammer has quit [Ping timeout: 252 seconds]
<shevy> your use case is already well past my use cases :)
yubrew has quit [Ping timeout: 240 seconds]
Hobogrammer has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
jonah_k has joined #ruby
<havenwood> sigurding: Added a comment to your gist with how you might persist to disk with YAML::Store then set Constants (if that is *really* what you want to do?).
atno__ has joined #ruby
fedesilva has quit [Remote host closed the connection]
rubyoskarpro has quit [Quit: Page closed]
lewix has quit [Remote host closed the connection]
atno has quit [Ping timeout: 252 seconds]
<sigurding> havenwood: will take a look
timonv has quit [Remote host closed the connection]
Xeago_ has quit [Ping timeout: 240 seconds]
olivier_bK has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
<havenwood> sigurding: Or maybe simpler yet with ydbm, if you want to store in a simple database rather than a flat file: http://www.ruby-doc.org/stdlib-2.1.0/libdoc/yaml/rdoc/YAML/DBM.html
Megtastique has quit []
davidcollom is now known as davidcollom_
<sigurding> havenwood: actually that looks pretty awesome
timonv has quit [Ping timeout: 240 seconds]
phutchins has joined #ruby
jph98 has quit [Quit: jph98]
Czupa has quit [Quit: Wychodzi]
<shevy> what is the name of the '-' character again?
<shevy> is that a hyphen?
<sigurding> yes
<jhass> or a minus :P
sepp2k has joined #ruby
Rainicorn has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
prionic has joined #ruby
DropsOfSerenity has joined #ruby
phutchin1 has joined #ruby
phutchin1 has quit [Client Quit]
<shevy> hmmm
chuk has quit [Quit: Leaving]
<jhass> hyphen: ‐ hyphen minus: - figure dash: ‒ minus sign: −
<jhass> I'm just scratching the surface
LadyRainicorn has quit [Ping timeout: 264 seconds]
<shevy> a dash is a hyphen?
Salve has joined #ruby
vlad_starkov has joined #ruby
amclain has joined #ruby
yfeldblum has joined #ruby
xlogic has joined #ruby
fridim__ has joined #ruby
<Rainicorn> hyphendash--
<shevy> hey are you Lady Rainicorn
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Rainicorn> I am.
<shevy> ok
<shevy> you look so different now
mansi_ has quit [Remote host closed the connection]
Rainicorn is now known as LadyRainicorn
<LadyRainicorn> I know. This is my not-a-ghost form.
<LadyRainicorn> When I kill my ghost I will resume my previous shape.
hfp is now known as hfp`away
Salve has quit [Ping timeout: 252 seconds]
* LadyRainicorn resettles into a more familiar manifestation.
yfeldblum has quit [Ping timeout: 265 seconds]
senayar has quit [Remote host closed the connection]
mocfive has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
rm_ has joined #ruby
Megtastique has joined #ruby
klaut has joined #ruby
timonv has joined #ruby
angusiguess has joined #ruby
Salve has joined #ruby
axl_ has joined #ruby
DropsOfSerenity has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sigurding has quit [Quit: sigurding]
Devanon has joined #ruby
sepp2k1 has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
Salve has quit [Ping timeout: 240 seconds]
mv5mith has quit [Quit: leaving]
sepp2k has quit [Ping timeout: 264 seconds]
ahawkins has joined #ruby
fedesilva has joined #ruby
<shevy> yay!
<shevy> that is so much better!
<shevy> happiness rays are so more noble when it comes from LadyRainicorn
<shevy> rather than the more mundane Rainicorn form
rm_ has quit [Ping timeout: 264 seconds]
jglover has joined #ruby
swks has joined #ruby
<jglover> I can't think of a name for this controller. What should I call a Rails controller that handles just public page kind of stuff. like the home page, and maybe a features page?
<swks> ContentController maybe
<jhass> jglover: Commonly PagesController. Anyway more of a #rubyonrails topic ;)
<jglover> I would really like to call it PublicContentController
<LadyRainicorn> AwesomenessController
<jglover> jhass: yeah but I like you guys better
<swks> guys, do you know some job sites for rubyists
<jglover> I'll call it pages controller. I just don't know the conventions of these things
<swks> i'm from Ukraine, and as you know war with Russia has begun
davidcollom_ is now known as davidcollom
<jglover> swks: elance I think
<swks> I'm affraid that I will have no opportunity to get online if war action start
Megtastique has quit []
<swks> maybe to leave in thailand
timonv has quit [Remote host closed the connection]
Zespre has quit [Quit: leaving]
<swks> or Bali
<Devanon> quit
Devanon has quit [Quit: WeeChat 0.4.2]
timonv has joined #ruby
<swks> I have nice job now in very nice project, but I'm affraid that when army come in my city I will lost my job
<swks> and not only
Xeago_ has joined #ruby
Devanon has joined #ruby
<swks> maybe to continue to work with my client remotely from other country
Zespre has joined #ruby
ctp has joined #ruby
<LadyRainicorn> Eek, make sure you can get out.
noop has quit [Ping timeout: 240 seconds]
<LadyRainicorn> War is not nice. ;-;
Salve has joined #ruby
<swks> I'm scared because Russians dropped about 7k units
<swks> wtf war in 2014
wjlafrance has joined #ruby
<jglover> well good luck
<swks> Hope it will be
<swks> Also EURUco will be canceled
<swks> because of recent situation
mansi has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
<shevy> why cancelled
<shevy> why not relocated
whomp_ has joined #ruby
<swks> maybe will be relocated
<shevy> swks and where were the fights :P
<swks> but it won't be in kiev
vertroa has quit [Quit: Textual IRC Client: www.textualapp.com]
Mon_Ouie has joined #ruby
<swks> shevy: wat?
<shevy> swks wat wat
mary5030 has joined #ruby
<shevy> <swks> wtf war in 2014
<shevy> ^^^
monkegjinni has quit [Remote host closed the connection]
<swks> forget, sorry for the offtop
mikee has quit [Ping timeout: 246 seconds]
<pontiki3> wow, that sucks, swks
<pontiki3> can you get out?
whomp has quit [Ping timeout: 264 seconds]
<LadyRainicorn> You expected 2014 to be the End of War?
poguez__ has quit [Quit: Connection closed for inactivity]
DropsOfSerenity has joined #ruby
speckle has joined #ruby
<swks> Have no idea where, I have nice project in my company, but I'm affraid of smth
<shevy> so the official date is 21st of June, 2014
davidcollom is now known as davidcollom_
yfeldblum has joined #ruby
<shevy> that's almost four months
Megtastique has joined #ruby
<speckle> hi, one thing I really like about Ruby is that it seems to take breaking language changes in stride. Python was split between 2 and 3, and Perl was split between 5 and 6, but Ruby doesn't seem to split up when the language doesn't maintain backwards compatibility. Is this true?
<shevy> well I guess they need to write around for proper and suitable locations
<swks> speckle: 1.8.7 has problems
<speckle> swks, so there are 1.8.7ers just like people got stuck on Python 2 and Perl 5?
<shevy> speckle ruby has had some incompatibilities from 1.8 to 1.9. to 2.x
<speckle> Or are those the minority?
mary5030 has quit [Ping timeout: 240 seconds]
<speckle> If they're the minority, *that's* what I like... if not then that's news to me!
<shevy> speckle well I suppose so but not so much as python 2 and perl 5. perl 5 have no real options, python 2 no real incentive for python 3
markisonfire has joined #ruby
<shevy> here on #ruby 1.8.x is a minority, I'd say 5% at max, perhaps 8%
CaptainJet has joined #ruby
<shevy> there may be a bit more legacy users, like debian never-update server guys
<shevy> at work we had an ubuntu server last update 2011 with ruby 1.8.7
joelroa has joined #ruby
<speckle> but I suppose there are RoR enterprise apps or something
<speckle> yeah
<shevy> probably but then the are probably rails 1 or 2 :P
<speckle> debian isn't that legacy, try CentOS :D
sigurding has joined #ruby
<shevy> and if they were stuck on 1.8.x they probably had no compelling reason to switch
<shevy> probably CentOS is more widespread in the USA
<shevy> due to redhat
<speckle> I mean that CentOS/RHEL is much more outdated in terms of packages
monkegjinni has joined #ruby
DropsOfSerenity has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> you make me sad speckle
<speckle> I don't think the latest CentOS even has Python 3
<speckle> Why do I make you sad?
<shevy> you should look into the future rather than dig in the past
tbrock has quit [Quit: Computer has gone to sleep.]
<shevy> the latest debian does not have ruby 2.x either I think
<speckle> But that's exactly what I'm so happy about - Ruby seems more future-focused than other mainstream languages
klaut has quit [Read error: Connection reset by peer]
timonv has joined #ruby
yubrew has joined #ruby
Waheedi has joined #ruby
klaut has joined #ruby
<shevy> or perhaps because less people use it :P
<shevy> the python transition was probably the worst
<shevy> perl 6 kinda died and I don't think they can ress it
carraroj has joined #ruby
mary5030 has joined #ruby
joelroa has quit [Ping timeout: 252 seconds]
glebm_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kricir has joined #ruby
senayar has joined #ruby
<LadyRainicorn> Python 3 is more like 1.9
<LadyRainicorn> Actually 1.8.7
glebm has joined #ruby
Megtastique has quit []
ahawkins has quit [Quit: leaving]
tbrock has joined #ruby
<LadyRainicorn> CentOS is unabashedly awful.
jonah_k has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
<speckle> it is?
senayar has quit [Read error: Connection reset by peer]
senayar_ has joined #ruby
brandonjmckay_ has joined #ruby
<havenwood> shevy: Debian should be shipping 2.0 in Jessie+: https://packages.debian.org/testing/ruby/ruby2.0-dev
mneorr has joined #ruby
<shevy> what is jesus+
jonah_k has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
<havenwood> shevy: just distro release codename
<speckle> I feel like Ruby evolves so fast that it's not worth using the distro-packaged Ruby, unless you're on a rolling release distro
<shevy> like horny hippo, sexy serpent and angry ape?
<speckle> I prefer... what was it called, rvm or something
dawkirst has quit [Ping timeout: 244 seconds]
<shevy> speckle I think it depends on whether you must maintain a cluster or server, or be an end user
<havenwood> shevy: Now that RedHat bought CentOS maybe we'll get Fedora's nice Ruby packages soon.
<shevy> havenwood I think it has been like 10 years ago since I last used fedora
sigurding has quit [Read error: No route to host]
<havenwood> speckle: RVM, ruby-install/chruby or ruby-build/rbenv.
<havenwood> shevy: It is nice.
sigurding has joined #ruby
<speckle> wouldn't that defeat the purpose of CentOS, havenwood? I thought CentOS packages were intentionally the most conservative of any mainstream free Linux distribution
dodosan has joined #ruby
dodosan has quit [Remote host closed the connection]
recursive has joined #ruby
<havenwood> speckle: Well, point was to be a community enterprise edition, but any amount of being behind RHEL was due to lack of resources not intention to be behind.
<speckle> RHEL is already super-conservative as it is
dodosan has joined #ruby
senayar_ has quit [Ping timeout: 240 seconds]
guest12345 has joined #ruby
<havenwood> speckle: And a better funded Fedora is producing results that hopefully will make RHEL and CentOS better without sacrificing stability, dunno.
F1skr has joined #ruby
<guest12345> hi is anyone here?
<jhass> guest12345: no, you're all alone
<guest12345> i need some simple regular expression help pofavor
<havenwood> speckle: Scientific Linux was making CentOS look bad, imho. Glad RedHat decided to support CentOS or I'd worry it would fade.
<speckle> I hear Fedora isn't that great, though. I hear OpenSUSE is the way to go if you want a solid, modern RPM distro
<havenwood> speckle: People do love their OpenSUSE. Let the holy wars begin.
<speckle> CentOS? Fade?? I thought it was used a lot by cheapskate companies
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
<guest12345> if i have output like this
<guest12345> <a class="pull-left mr10" href="http://www.hotnewhiphop.com/mac-miller-amen-feat-dash-ab-soul-vince-staples-retch-new-song.1835982.html" title="Mac Miller - Amen Feat. Da$h, Ab-Soul, Vince Staples &amp; RetcH" itemprop="url"> <em class="overflow"> <img src="http://thumbs.hh.ulximg.com/public/img/song/38_1393692059_macamen_44.jpg" class="image38" alt="Cover of Mac Miller - Amen Feat. Da$h, Ab-Soul, Vince Staples &amp; RetcH" title="Cov
<guest12345> and NO white space
<guest12345> whats the expression to separate out the a links?
<havenwood> speckle: Scientific Linux was/is a direct competitor in that space though. RHEL clones ftw? >.>
<jhass> guest12345: use nokogiri to parse html
<guest12345> and the hrefs
<guest12345> i am
<guest12345> my nokogiri output is one big jumble though
<guest12345> it wont puts what i want on spearate lines
<guest12345> and im not well versed in regular expressions
<speckle> why not read a reg exp tutorial?
<jhass> guest12345: there's no need at all here for regular expressions
<speckle> or find an html parser, I guess
<guest12345> well i need the title the href and other stuff separated
<jhass> guest12345: whatever.css('a').each do |a_tag| puts "#{a.text} - #{a['href']}"; end
<jhass> s/a_tag/a
<guest12345> whats that s/a_tag/a?
<jhass> typo correction, search & replace
centrx has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
mikee has joined #ruby
Devanon has quit [Quit: WeeChat 0.4.2]
shevy has quit [Ping timeout: 264 seconds]
<guest12345> and ive tried and read that bastards link...thoes simple examples really dont work for a complex page parse
Xeago_ has quit [Remote host closed the connection]
<guest12345> so where to i put that?
<guest12345> s/a_tag/a
<jhass> sigh
<jhass> Nokogiri(your_html).css('a').each do |a| puts "#{a.text} - #{a['href']}"; end
chrisseaton has joined #ruby
Xeago_ has joined #ruby
<havenwood> guest12345: You can use CSS or XPath selectors. A nice browser will let you copy a CSS path or XPath.
<guest12345> lmao
jonah_k has quit [Remote host closed the connection]
<guest12345> ok thanks
jonah_k has joined #ruby
<guest12345> im gonna try it and ask
fedesilva has quit [Remote host closed the connection]
jonah_k has quit [Remote host closed the connection]
dawkirst has joined #ruby
shaileshg has quit [Quit: Connection closed for inactivity]
Xeago_ has quit [Ping timeout: 252 seconds]
zeade has joined #ruby
Kricir has quit [Remote host closed the connection]
hiyosi has quit [Ping timeout: 240 seconds]
Xeago_ has joined #ruby
s_kilk has joined #ruby
tbrock has joined #ruby
jph98 has joined #ruby
jcs222 has joined #ruby
predator217 has quit [Remote host closed the connection]
shevy has joined #ruby
einarj has quit [Remote host closed the connection]
Vovko has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
prc has joined #ruby
spinlock has joined #ruby
alexju has joined #ruby
fflush has quit [Ping timeout: 264 seconds]
sigurding has quit [Ping timeout: 240 seconds]
fflush has joined #ruby
nomadic has quit [Ping timeout: 240 seconds]
recursive has quit [Ping timeout: 240 seconds]
tgkokk has joined #ruby
mary5030 has quit [Remote host closed the connection]
tgkokk has quit [Max SendQ exceeded]
chuk has joined #ruby
nomadic has joined #ruby
elaptics is now known as elaptics`away
sigurding has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
mary5030 has joined #ruby
swks has quit []
rm_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
eichenwald has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
itadder has joined #ruby
tgkokk has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
tgkokk has quit [Max SendQ exceeded]
tgkokk has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.3]
timonv has quit [Remote host closed the connection]
rm_ has quit [Ping timeout: 240 seconds]
Azulinho has joined #ruby
nomenkun has quit [Remote host closed the connection]
timonv has joined #ruby
klaut has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 252 seconds]
Megtastique has joined #ruby
lw has joined #ruby
Megtastique has quit [Client Quit]
timonv has quit [Ping timeout: 252 seconds]
klaut has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 265 seconds]
Shidash has quit [Ping timeout: 252 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
Emmanuel_Chanel has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonah_k has joined #ruby
IceDragon has joined #ruby
Es0teric has joined #ruby
jcs222 has quit [Quit: leaving]
dodosan has quit [Remote host closed the connection]
jph98 has quit [Quit: jph98]
ixti has quit [Ping timeout: 253 seconds]
dodosan has joined #ruby
yubrew has joined #ruby
Xuisce has quit [Quit: Leaving...]
akitada has quit [Quit: Connection closed for inactivity]
nouitfvf_ has quit []
<shevy> test
falkone has joined #ruby
itadder has quit [Remote host closed the connection]
<jhass> shevy: failed. again.
ahawkins has joined #ruby
<jhass> how disappointing shevy
itadder has joined #ruby
prionic has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
brucele_ has joined #ruby
joelroa has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
Vovko has joined #ruby
sigurding has quit [Quit: sigurding]
dodosan has quit [Ping timeout: 264 seconds]
iliketurtles has joined #ruby
kzrl has quit [Ping timeout: 240 seconds]
itadder has quit [Ping timeout: 264 seconds]
einarj has quit [Ping timeout: 240 seconds]
joelroa has quit [Ping timeout: 264 seconds]
<atmosx> hello
GinoMan has quit [Ping timeout: 264 seconds]
DrCode has quit [Write error: Connection reset by peer]
pskosinski has quit [Write error: Connection reset by peer]
atmosx has quit [Write error: Broken pipe]
end_guy has quit [Write error: Broken pipe]
senayar has joined #ruby
mansi has joined #ruby
falkone has quit [Ping timeout: 240 seconds]
pskosinski has joined #ruby
itadder has joined #ruby
lewix has joined #ruby
lentil has joined #ruby
itadder has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 240 seconds]
itadder has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
<havenwood> hi
atmosx has joined #ruby
<shevy> hey atmosx
itadder has quit [Ping timeout: 240 seconds]
sigurding has joined #ruby
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bonhoeffer has joined #ruby
lewix has quit [Remote host closed the connection]
bluenemo_ has joined #ruby
bluenemo_ has joined #ruby
brandonjmckay_ has quit [Quit: Computer has gone to sleep.]
bluenemo has quit [Remote host closed the connection]
bluenemo_ has quit [Remote host closed the connection]
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
mneorr has quit [Remote host closed the connection]
estebanrules has joined #ruby
mneorr has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
xaq has quit [Remote host closed the connection]
jph98 has joined #ruby
Devanon has joined #ruby
hiyosi has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
mneorr has quit [Ping timeout: 252 seconds]
mneorr has joined #ruby
hiyosi has quit [Read error: Operation timed out]
mark_locklear has joined #ruby
<shevy> atmosx still railsing your way?
Devanon has left #ruby ["WeeChat 0.4.2"]
vertroa has joined #ruby
Devanon has joined #ruby
Rainicorn has joined #ruby
LadyRainicorn has quit [Ping timeout: 264 seconds]
kennym has joined #ruby
Faris has quit [Ping timeout: 240 seconds]
Devanon has left #ruby [#ruby]
Solnse has quit [Read error: Connection reset by peer]
Rainicorn is now known as LadyRainicorn
gregf has joined #ruby
Devanon has joined #ruby
cdime has joined #ruby
jlast has joined #ruby
kennym has left #ruby [#ruby]
kzrl has joined #ruby
Devanon has left #ruby [#ruby]
sdouglas has quit [Remote host closed the connection]
timonv has joined #ruby
kenneth has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
sdouglas has joined #ruby
yacks has quit [Ping timeout: 252 seconds]
rm_ has joined #ruby
xaq has joined #ruby
tgkokk has joined #ruby
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has quit [Quit: Quitting]
lxsameer has joined #ruby
<lxsameer> how can i create an instance_method dynamically for an instance ?
<centrx> def instance.instance_method
<centrx> or instance.define_singleton_method
cdime has quit [Quit: Leaving]
rm_ has quit [Ping timeout: 252 seconds]
Thanatermesis has quit [Read error: Connection reset by peer]
randomnick_ has quit [Remote host closed the connection]
randomnick_ has joined #ruby
Hobogrammer has joined #ruby
x77686d has joined #ruby
razibog has quit [Quit: Leaving.]
jph98 has quit [Quit: jph98]
cdime has joined #ruby
x77686d has quit [Client Quit]
x77686d has joined #ruby
cdime_ has joined #ruby
Azulinho has quit [Ping timeout: 240 seconds]
cdime_ has quit [Client Quit]
kzrl has quit [Ping timeout: 264 seconds]
fschuindt has quit [Quit: Textual IRC Client: www.textualapp.com]
predator117 has joined #ruby
yubrew has joined #ruby
<jhass> lxsameer: keep in mind that repeatedly doing significantly reduces performance
<jhass> *doing that
Vovko has quit [Remote host closed the connection]
senayar has joined #ruby
sigurding has quit [Quit: sigurding]
yubrew has quit [Ping timeout: 264 seconds]
binaryhat has joined #ruby
jetblack has joined #ruby
randomnick_ has quit [Ping timeout: 264 seconds]
Xuisce has joined #ruby
randomnick_ has joined #ruby
Vivekananda has joined #ruby
Vovko has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Thanatermesis has joined #ruby
Vovko has quit [Remote host closed the connection]
inversesquarelaw has joined #ruby
ahawkins has quit [Quit: leaving]
joelroa has joined #ruby
<atmosx> shevy: no, just finished spell-checking for grammar errors an article I wrote on bitcoin for HN
s_kilk has quit [Quit: Leaving]
estebanrules has quit [Quit: Textual IRC Client: www.textualapp.com]
<atmosx> shevy: I'm a bit tired today, I won't study any more rails today :-)
timonv has quit [Ping timeout: 252 seconds]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
joelroa has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Read error: Connection reset by peer]
p8952 has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
timonv has joined #ruby
Su7 has joined #ruby
bonhoeffer has joined #ruby
<Su7> Hi !
<Su7> I'm having an issue installing REE on my Debian 7 box
kotakotakota has joined #ruby
lxsameer has quit [Quit: Leaving]
<jhass> uh, ree is still maintained?
Tolnaiz has joined #ruby
<Su7> well, that could explain things
kotakotakota has quit [Client Quit]
<jhass> "Notice: Ruby Enterprise Edition has reached End of Life in 2012. The website is still up, and it still works, but it's no longer actively developed and it is no longer supported." http://www.rubyenterpriseedition.com/
lukec has quit [Quit: lukec]
<Su7> I read that I needed to install REE to speed up my Redmine installation and to lower its memory consumption
kirun has quit [Quit: Client exiting]
xbob has quit [Ping timeout: 240 seconds]
rootshift has joined #ruby
<jhass> try ruby 2.0, it should run if you're not on windows according to http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Ruby-interpreter
<jhass> and there's no benefit from ree over 2.0
Kricir has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
<Su7> Is it really woth it ?
kotakotakota has joined #ruby
<centrx> Most of the REE performance improvements were integrated into Ruby 1.9+
<Su7> well I'm on 1.9.something already
<centrx> REE is only on 1.8
shabgard has quit [Quit: Aji maji la taraji]
<havenwood> Su7: Use 2.1.1 if you can. ;)
<Su7> centrx: I gave up installing REE right now.
ikaros has joined #ruby
<havenwood> Su7: Latest stable (2.1.1) is quite nice.
lw has quit [Quit: s]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Su7> havenwood: ruby 2 isn't available in Debian repos.
lw has joined #ruby
xbob has joined #ruby
<Su7> havenwood: I'm on stable right now :-(
mostlybadfly has quit [Quit: Connection closed for inactivity]
<havenwood> Su7: Mmm, then ruby-install/chruby, RVM, or ruby-build/rbenv would be options. A shame system Ruby hasn't been updated yet.
<centrx> Su7, You can also do First, check for a backport on <debian-backports>. If unavailable: 1) Add a deb-src line for sid (not a deb line!); ask me about <deb-src sid> 2) enable debian-backports (see <bdo>) 3) aptitude update; aptitude install build-essential; aptitude build-dep packagename; apt-get -b source packagename; 4) install the resultant debs. To change compilation options, see <package recompile>; for versions newer than si
<centrx> d see <uupdate>.
DropsOfSerenity has joined #ruby
<centrx> Su7, This will compile a backport from the Debian repository for testing/unstable
DropsOfSerenity has quit [Client Quit]
fedesilva has joined #ruby
<Su7> centrx: I'll definitely test this if I can
weems has joined #ruby
<Su7> but I'll try to understand what my issue is first.
weems has quit [Changing host]
weems has joined #ruby
heftig has joined #ruby
<Su7> let me paste you some lines from my htop
xcv_ has quit [Remote host closed the connection]
invinceable has joined #ruby
Atw has joined #ruby
invinceable has quit [Max SendQ exceeded]
Kricir has joined #ruby
Sirupsen has joined #ruby
<Su7> (if i manage to copy them)
claymore has quit [Quit: Leaving]
saarinen has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
p8952 has joined #ruby
skaflem has quit [Quit: Leaving]
ahp_ has joined #ruby
<Su7> well forget it, it seems it's calming down on a RAM usage point of view
<Su7> centrx: I'm keeping your backport manual somewhere for later, thanks !
mark_locklear has quit [Ping timeout: 264 seconds]
ekinmur has joined #ruby
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DropsOfSerenity has joined #ruby
alexju has quit [Remote host closed the connection]
Targen_ has quit []
ixti has joined #ruby
xcv has joined #ruby
wlanboy_ has quit [Changing host]
wlanboy_ has joined #ruby
xbob has quit [Ping timeout: 252 seconds]
wlanboy_ is now known as wlanboy
DropsOfSerenity has quit [Ping timeout: 252 seconds]
yeticry_ has joined #ruby
vlad_starkov has joined #ruby
brandonjmckay_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
vlad_starkov has joined #ruby
mgomezch has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
xbob has joined #ruby
tbrock has joined #ruby
rm_ has joined #ruby
markisonfire has quit [Quit: markisonfire]
mocfive has quit [Remote host closed the connection]
pabloh has joined #ruby
mocfive has joined #ruby
sdouglas has quit [Remote host closed the connection]
Kricir has joined #ruby
SteveBenner09 has joined #ruby
rm_ has quit [Ping timeout: 240 seconds]
kobain has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
yubrew has joined #ruby
mocfive has quit [Ping timeout: 253 seconds]
guest12345 has quit [Ping timeout: 245 seconds]
dodosan has joined #ruby
brandonjmckay_ has quit [Quit: Lingo - http://www.lingoirc.com]
maletor has joined #ruby
mourest has quit [Remote host closed the connection]
tjr9898_ has quit [Ping timeout: 240 seconds]
senayar_ has joined #ruby
ravster has joined #ruby
jonah_k has quit [Ping timeout: 252 seconds]
yubrew has quit [Ping timeout: 240 seconds]
binaryhat has quit [Quit: Leaving]
k03ll has quit [Read error: No route to host]
<ravster> Hey all. I'm using AASM, and I want an instance method called everytime the model goes into a particular state. The documentation says I should use :before_enter, but that doesn't work.
senayar has quit [Ping timeout: 264 seconds]
maletor has quit [Client Quit]
<ravster> Does anyone know any other way to make sure a function is called everytime a state becomes the active one?
dodosan has quit []
fschuindt has joined #ruby
binaryhat has joined #ruby
jonah_k has joined #ruby
iliketurtles has joined #ruby
<SteveBenner09> sry not familiar with AASM
mary5030 has quit [Remote host closed the connection]
davidcollom_ is now known as davidcollom
<shevy> can you not insert an extra method call before, in the method you want to call?
<shevy> like just extending the superclass on the fly
mary5030 has joined #ruby
ikaros has quit [Quit: Ex-Chat]
mocfive has joined #ruby
<SteveBenner09> I was wondering: what is the best gem/lib for concurrent downloads in ruby? Typhoeus?
<SteveBenner09> yeah thats what I would do shevy
ikaros has joined #ruby
jglover has quit [Quit: Lost terminal]
mois3x has joined #ruby
armyriad has joined #ruby
diegoviola has joined #ruby
<ravster> shevy: so just call that function before I change the state?
mary5030 has quit [Ping timeout: 240 seconds]
<shevy> not sure, I do not know how AASM is structured
havenwood has quit [Remote host closed the connection]
diegoviola has quit [Client Quit]
kobain_ has joined #ruby
<shevy> I avoid too specialized ruby code when possible
<shevy> is it a github based project? if so I would report an issue
havenwood has joined #ruby
joelroa has joined #ruby
<shevy> that way I got bugs resolved, or recieved help, from the project coderay
lentil has left #ruby [#ruby]
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
maletor has joined #ruby
kobain has quit [Read error: Connection timed out]
confounds has joined #ruby
davidcollom is now known as davidcollom_afk
charliesome has joined #ruby
charliesome has quit [Max SendQ exceeded]
jlast has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mocfive has quit [Remote host closed the connection]
sdouglas has joined #ruby
mocfive has joined #ruby
joelroa has quit [Ping timeout: 264 seconds]
lentil has joined #ruby
invinceable has joined #ruby
xcv has quit [Remote host closed the connection]
mansi has joined #ruby
<bonhoeffer> shouldn't === return true or false -- i'm getting an error "bad value for range"
<bonhoeffer> all variables are DateTime
<bonhoeffer> my range is "2014-01-30T00:00:00+00:00..2014-02-05T23:59:59+00:00"
charliesome has joined #ruby
davidcollom_afk is now known as davidcollom
axsuul has quit [Ping timeout: 252 seconds]
davidcollom is now known as davidcollom_
<bonhoeffer> casting to_i doesn't help
mocfive has quit [Ping timeout: 252 seconds]
mark_locklear has joined #ruby
<havenwood> bonhoeffer: paste a Gist of the offending code?
mansi has quit [Ping timeout: 240 seconds]
<bonhoeffer> sure
<havenwood> bonhoeffer: what is the class of the min and max?
<bonhoeffer> lots of gem's https://gist.github.com/tbbooher/9298222
thumpba has joined #ruby
Matriks has joined #ruby
<bonhoeffer> integer
<bonhoeffer> Fixnum
maletor has quit [Quit: Computer has gone to sleep.]
kobain has joined #ruby
<havenwood> >> 1..'1'
<eval-in___> havenwood => bad value for range (ArgumentError) ... (https://eval.in/107630)
<bonhoeffer> pretty sure i have fixnum's though
<bonhoeffer> yeah -- the range is fine
<bonhoeffer> 1391040000..1391644799
kobain_ has quit [Read error: Connection timed out]
hiyosi has joined #ruby
tjr9898 has joined #ruby
<bonhoeffer> 1391601600 === 1391040000..1391644799 => bad value for range
thumpba has quit [Ping timeout: 264 seconds]
<havenwood> 1391601600 === (1391040000..1391644799)
SteveBenner09 has quit []
<bonhoeffer> ah!!!!
<bonhoeffer> <-- needs to start thinking
kotakotakota has quit [Ping timeout: 240 seconds]
<bonhoeffer> thanks
maletor has joined #ruby
<havenwood> bonhoeffer: i didn't catch it at first, but often Ranges do need parens for the interpreter's sake
<havenwood> bonhoeffer: np
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andrewlio has quit [Remote host closed the connection]
bluenemo has quit [Remote host closed the connection]
hiyosi has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
sigurding has joined #ruby
<havenwood> bonhoeffer: (1391040000..1391644799).cover? 1391601600 #=> true
<bonhoeffer> strange: 1391601600 === (1391040000..1391644799) => false
<bonhoeffer> (1391040000..1391644799).cover? 1391601600 => true
<bonhoeffer> what gives? :(
hl has quit [Ping timeout: 264 seconds]
<havenwood> bonhoeffer: but if you reversed the left and right with the threequals it would be `true`, however #cover? is better for several reasons
<havenwood> bonhoeffer: even better than #include? :)
<bonhoeffer> so i need to read up on the === operator
<jhass> alternative with one less object created: 1391601600.between?(1391040000, 1391644799)
klaut has quit [Remote host closed the connection]
kzrl has joined #ruby
x77686d has quit [Quit: x77686d]
sigurding has quit [Client Quit]
<jhass> bonhoeffer: it's pretty ease, === is a method, 1391601600.===(1391040000..1391644799)
<jhass> so it's Fixnum#=== vs Range#===
hl has joined #ruby
<bonhoeffer> got it
<ravster> thanks, shevy
sambao21 has joined #ruby
rm_ has joined #ruby
fschuindt has quit [Quit: Textual IRC Client: www.textualapp.com]
wjlafrance has quit [Ping timeout: 240 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
v1n has joined #ruby
<bonhoeffer> jhass: excellent -- thanks again :)
charliesome has joined #ruby
jlast has joined #ruby
wjlafrance has joined #ruby
sambao21 has quit [Ping timeout: 264 seconds]
monkegjinni has quit [Remote host closed the connection]
Nirgali42 has joined #ruby
rootshift has joined #ruby
tjr9898 has quit [Remote host closed the connection]
_HolyCow has quit [Quit: Leaving.]
Waheedi has quit [Quit: Waheedi]
xaq has quit [Remote host closed the connection]
SHyx0rmZ has quit [Ping timeout: 264 seconds]
ekinmur has quit []
Tolnaiz has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Kricir has quit [Remote host closed the connection]
markisonfire has joined #ruby
mlpinit has joined #ruby
dingus_khan has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
tjr9898 has joined #ruby
sparrovv has joined #ruby
MatthewsFace has joined #ruby
tjr9898_ has joined #ruby
jackneill has quit [Ping timeout: 240 seconds]
tjr9898__ has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
skywritergr has joined #ruby
skywritergr has quit [Max SendQ exceeded]
tjr9898 has quit [Ping timeout: 240 seconds]
skywritergr has joined #ruby
skywritergr has quit [Max SendQ exceeded]
claymore has joined #ruby
jonah_k has quit [Remote host closed the connection]
lewix has joined #ruby
mjs2600 has joined #ruby
tjr9898_ has quit [Ping timeout: 264 seconds]
skywritergr has joined #ruby
tjr9898 has joined #ruby
rahult has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
WillAmes has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
WillAmes has joined #ruby
tjr9898_ has joined #ruby
tjr9898__ has quit [Ping timeout: 265 seconds]
tjr9898__ has joined #ruby
vlad_sta_ has joined #ruby
tjr9898 has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
tjr9898_ has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
jcs222 has joined #ruby
lewix has quit [Remote host closed the connection]
xbob has quit []
quatron has quit [Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424]]
joelroa has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
tvw has joined #ruby
endash_ has joined #ruby
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
schaary has joined #ruby
joelroa has quit [Ping timeout: 240 seconds]
xlogic has quit [Remote host closed the connection]
Mon_Ouie has quit [Read error: Operation timed out]
mansi has joined #ruby
ahp_ has quit [Remote host closed the connection]
perldork has joined #ruby
cashnguns has quit [Ping timeout: 252 seconds]
Waheedi has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
skywritergr has quit [Quit: Textual IRC Client: www.textualapp.com]
mansi has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
mark_locklear has quit [Ping timeout: 264 seconds]
eichenwald has quit [Quit: Leaving]
Kricir has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
confounds has quit [Quit: Textual IRC Client: www.textualapp.com]
xlogic has joined #ruby
rootshift has joined #ruby
jonah_k has joined #ruby
Salve has quit [Remote host closed the connection]
sailias has joined #ruby
iliketurtles has joined #ruby
Salve has joined #ruby
workmad3 has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
hfp`away is now known as hfp
timonv has quit [Ping timeout: 252 seconds]
hiyosi has joined #ruby
Kricir has joined #ruby
jlast has quit [Remote host closed the connection]
Salve has quit [Ping timeout: 240 seconds]
redlines has quit [Ping timeout: 240 seconds]
Thanatermesis has joined #ruby
Thanatermesis has quit [Changing host]
Thanatermesis has joined #ruby
redlines has joined #ruby
tjr9898__ has quit [Ping timeout: 265 seconds]
claymore has quit [Quit: Leaving]
hiyosi has quit [Ping timeout: 240 seconds]
Abathur has joined #ruby
John_John_ has joined #ruby
Megtastique has joined #ruby
Hanmac has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
DigitalDarwin has joined #ruby
<DigitalDarwin> why does "asdf".hash give different values
<DigitalDarwin> that's fucked up
Abathur has quit [Read error: Connection reset by peer]
nath_schwarz has joined #ruby
<jhass> no it's not
<jhass> .hash is a fast hash, not a secure hash
<DigitalDarwin> what should I use for a secure hash
<DigitalDarwin> ?
<jhass> out of my mind the stuff under OpenSSL::Digest but maybe there are convenience wrapper somewhere
<centrx> Digest
Hanmac1 has quit [Ping timeout: 252 seconds]
<havenwood> DigitalDarwin: require 'digest/sha2'; Digest::SHA512.hexdigest 'asdf'
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
Jetchisel has joined #ruby
lukec has joined #ruby
recursive has joined #ruby
aasmith has joined #ruby
Mongey has joined #ruby
Salve has joined #ruby
codeitagile has quit [Remote host closed the connection]
snuffeluffegus has quit [Quit: Leaving]
<nath_schwarz> Hello everyone, I've got a small problem right now. I'm looking into ruby for a bit and are currently stuck at the blocks. When i run it i only get "undefined method '<blockname>' for <classname>:Class
BraddPitt has joined #ruby
<nath_schwarz> so basically i seem to be defining the block the wrong way
Hobogrammer has quit [Quit: WeeChat 0.4.3]
Hanmac1 has joined #ruby
yubrew has joined #ruby
Hobogrammer has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<havenwood> nath_schwarz: line 7 isn't doing what you want it to, no interpolating outside of strings!
Salve_ has joined #ruby
<havenwood> nath_schwarz: A good general rule is never use @@class_variables, you're better off with @instance_variables.
<DigitalDarwin> jhass centrx havenwood : thanks for your help
mocfive has joined #ruby
v1n has quit [Ping timeout: 252 seconds]
scttnlsn has quit [Ping timeout: 264 seconds]
<jhass> nath_schwarz: where should the test method come from? what should it do?
dingus_khan has quit [Remote host closed the connection]
<havenwood> nath_schwarz: the Ruby interpreter sees that `#` on line 7 as the start of a comment
<jhass> nath_schwarz: also we prefer underscore_case for method names
andy___ has joined #ruby
<nath_schwarz> havenwood: that's odd because it worked correctly without trying the blocks
wjlafrance has quit [Quit: Leaving]
andy___ is now known as Guest94360
Salve has quit [Ping timeout: 240 seconds]
<havenwood> nath_schwarz: it is seeing: @cust_id = @@number_of_customers += 1
<nath_schwarz> jhass: without the test-block it puts out two customers with name, id and the classcount. just a few lines of code to get along with ruby
<havenwood> nath_schwarz: just happenstance it seems to work ;P
yubrew has quit [Ping timeout: 264 seconds]
<havenwood> nath_schwarz: it is going to the next line to get the arguement
Notte has joined #ruby
perldork has quit [Remote host closed the connection]
lewix has joined #ruby
scttnlsn has joined #ruby
lkba has joined #ruby
<havenwood> nath_schwarz: as jhass asked, what's up with calling #test there inside the class? what are you meaning to do?
droptone_ is now known as droptone
sailias has quit [Ping timeout: 240 seconds]
rootshift has joined #ruby
eVRiAL has joined #ruby
eVRiAL has quit [Max SendQ exceeded]
eVRiAL has joined #ruby
eVRiAL has quit [Max SendQ exceeded]
spider-mario has quit [Remote host closed the connection]
<nath_schwarz> havenwood: jhass: i'm just fooling around with ruby, trying the different possibilities
eVRiAL has joined #ruby
brucele_ has quit [Ping timeout: 264 seconds]
<nath_schwarz> havenwood: jhass: so I'm not really intending to do something with it - it just wanted to see how the blocks work in ruby
prionic has joined #ruby
Nirgali42 has quit [Ping timeout: 252 seconds]
<havenwood> nath_schwarz: aha. i don't think #test does what you think it does but no matter! for testing checkout Minitest or Test::Unit in the stdlib.
<jhass> nath_schwarz: so what behavior do you expect?
<nath_schwarz> havenwood: according to what i read, yield should call and execute the block
<havenwood> nath_schwarz: or rspec is quite popular or bacon too
<havenwood> nath_schwarz: you aren't calling the method with a block though
SHyx0rmZ has joined #ruby
<jhass> havenwood: I don't think he wants to unit test
<havenwood> jhass: yeah, i don't quite follow - but you don't think `test` was meant to be `assert`? dunno
<havenwood> nath_schwarz: do you want to unit test?
<nath_schwarz> jhass: havenwood: http://www.tutorialspoint.com/ruby/ruby_blocks.htm this is where it got the infos about the blocks in ruby
<havenwood> nath_schwarz: ah, so in that example they just defined the `test` method with `def test`.
<nath_schwarz> no, i just called the block "test", it could also have been "block" or else
<havenwood> nath_schwarz: you have to define the method before you call it (there is confusingly also a Kernel#test method)
<jhass> nath_schwarz: no, that's not right. You call a method _with_ a block, you don't name the block or anyhting
<jhass> a block is anonymous snippet of code
<nath_schwarz> so the syntax block_name{ assign1
<nath_schwarz> } is basically wrong?
<jhass> nath_schwarz: so you don't call the "block 'test'" you call the method 'test' with a block
<jhass> no
_bart has joined #ruby
<havenwood> nath_schwarz: in your example, you'd call the `printDetails` method something like: cust1.printDetails { puts 'hi' } # and that block goes where the yields are
<nath_schwarz> havenwood: ok i see, thanks you two jhass
<havenwood> nath_schwarz: you're just making a few errors: you didn't define a #test method, you're trying to call that method you didn't define inside the class definition, outside where you've instantiated you need to pass #printDetails a block
cashnguns has joined #ruby
<havenwood> nath_schwarz: :)
sdouglas has quit [Remote host closed the connection]
jlast has joined #ruby
<havenwood> jhass: yeah, you were totally right - nothing to do with unit tests :O
ikaros has quit [Quit: Ex-Chat]
<nath_schwarz> jhass: havenwood: besides - do you know a good website, that sums up the differences between ruby and other languages and/or gives a brief introduction from other languages? i didn't find one up until now, needless to say that the most were deprecated
jlast_ has joined #ruby
<havenwood> nath_schwarz: Did you try the ruby-lang.org "From Other Languages" yet?: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/
Mongey has quit [Quit: Mongey]
snath has joined #ruby
<havenwood> nath_schwarz: A very brief run-through here: http://learnxinyminutes.com/docs/ruby/
The_NetZ has joined #ruby
<nath_schwarz> havenwood: No, it's blocked in our network (it's very strict, a miracle that irc works^^), i will have to ask the sysad to make the address accessable
<havenwood> nath_schwarz: http://tryruby.org/ is pretty basic but good to breeze through maybe
<The_NetZ> yo. you can extend mri ruby with c, same principles for using c++ instead?
invinceable has quit [Ping timeout: 240 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
jlast has quit [Ping timeout: 264 seconds]
<havenwood> nath_schwarz: yeah, have them give you access to ruby-lang.org, good links to documentation and tutorials there as well as "From other Languages" for some of the common culprits.
<nath_schwarz> havenwood: thanks, i will have a look at the websites, tryruby.org e.g. works :D
mjs2600 has quit [Remote host closed the connection]
<jhass> The_NetZ: afaik you just need to call the C-API functions, from where you do that, ruby doesn't care
<havenwood> The_NetZ: or use ffi
jlast_ has quit [Ping timeout: 240 seconds]
senayar_ has quit [Ping timeout: 264 seconds]
<The_NetZ> noted, many thanks.
mesamoo has joined #ruby
mansi has joined #ruby
rootshift has joined #ruby
bobdobbs has joined #ruby
alexju has joined #ruby
Mongey has joined #ruby
mesamoo has quit [Client Quit]
<bobdobbs> I'm using rbenv. I'm using sass from the commandline. I want to try sass 3.3 (pre), so I installed it. 'sass' from the commandline invokes sass stable. How do I switch between gems?
thumpba has joined #ruby
sailias has joined #ruby
<The_NetZ> bobdobbs: no clue about rbenv; rvm has gem bundles you can setup.
<RubyPanther> bobdobbs: you might have to run rbenv rehash
<bobdobbs> oh yeah. I forgot about rehash
pskosinski has quit [Quit: Til rivido Idisti!]
joelroa has joined #ruby
<The_NetZ> any definitive guide on extending ruby with c/++ while embedding an interpreter?
<bobdobbs> hey, that didn't do it, but I think I found it. I can pass an arg on the commandline: 'myget _version_ ...'
<The_NetZ> eg, one executable binary, contains the ruby interpreter and extensions, double click to launch?