<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
<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."
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 )
<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]
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>
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.
<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]
<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]
<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!]
<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
<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]
<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.]
<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
<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?
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?
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>
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(/\<.+?\>/,'')
<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]
<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
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?
<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
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
<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]
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
<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]
<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
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
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.]
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?
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
<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?
<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
<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?