bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davejlong has quit [Remote host closed the connection]
solocshaw has joined #ruby
davejlong has joined #ruby
amclain_ has joined #ruby
jrvlima has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
klaas has quit [Read error: Connection reset by peer]
chandlerbing has joined #ruby
klaas has joined #ruby
klaas has quit [Excess Flood]
klaas has joined #ruby
amclain has quit [Ping timeout: 250 seconds]
jbrhbr has quit [Quit: Leaving.]
bmurt has joined #ruby
RegulationD has quit [Remote host closed the connection]
nateberkopec has joined #ruby
axl__ has joined #ruby
RegulationD has joined #ruby
jbrhbr has joined #ruby
jbrhbr has quit [Client Quit]
maneco has joined #ruby
supermar_ has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has quit [Quit: Leaving...]
RegulationD has quit [Ping timeout: 256 seconds]
colleenmcguckin has quit [Read error: Connection reset by peer]
JDiPierro has joined #ruby
colleenmcguckin has joined #ruby
supermarin has joined #ruby
jhonglim has joined #ruby
ap4y has joined #ruby
[k- has quit [Ping timeout: 272 seconds]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edwinvdgraaf has joined #ruby
jbrhbr has joined #ruby
CloCkWeRX has joined #ruby
amclain_ has quit [Quit: Leaving]
Asher has quit [Quit: Leaving.]
amclain_ has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DLSteve has joined #ruby
peterhil_ has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Ping timeout: 240 seconds]
diegoviola has quit [Ping timeout: 264 seconds]
Asher has joined #ruby
diego1 has joined #ruby
amclain_ is now known as amclain
asteros has quit [Quit: asteros]
amclain has quit [Client Quit]
amclain has joined #ruby
asteros has joined #ruby
axl__ has quit [Read error: Connection reset by peer]
circ-user-mgcmJ has quit [Ping timeout: 246 seconds]
mloy|afk has quit [Quit: Leaving]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
bronson has joined #ruby
Mon_Ouie has joined #ruby
banister has joined #ruby
supermarin has quit [Remote host closed the connection]
jgt3 has quit [Ping timeout: 240 seconds]
kobain has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
GiveMe1Like has quit [Quit: Leaving]
[k- has joined #ruby
jessemcgilallen has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
nettoweb has quit [Ping timeout: 256 seconds]
zeroDivisible has joined #ruby
skweek has joined #ruby
djstorm has quit [Ping timeout: 256 seconds]
veduardo has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crdpink2>
if I seed random for the purpose of a single method is it considered best practice at the end to reset it to previous seed value, leave as is, or reseed.
cwong_on_irc has quit [Quit: Leaving.]
babblebre has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Ping timeout: 240 seconds]
davejlong has quit []
supermarin has joined #ruby
chandlerbing has quit []
<jhass>
crdpink2: use Random.new and let it fall out of scope at the end of the method
jgt3 has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wmdrossard has quit [Ping timeout: 256 seconds]
<crdpink2>
jhass: that makes perfect sense. thanks!
slackbotgz has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
wildlander has joined #ruby
gsingh93 is now known as synack
asteros has quit [Quit: asteros]
synack is now known as Guest40077
cdg has quit [Remote host closed the connection]
diego1 has quit [Changing host]
diego1 has joined #ruby
cdg has joined #ruby
diego1 is now known as diegoviola
wldcordeiro has joined #ruby
Guest40077 is now known as gsingh93
gigetoo has quit [Ping timeout: 272 seconds]
cdg has quit [Ping timeout: 250 seconds]
akem has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
sankaber has joined #ruby
asteros has joined #ruby
gsingh93 is now known as guest12345
guest12345 is now known as synack1
synack1 is now known as synack2
bruce_lee2 has joined #ruby
synack2 is now known as gsingh93
pwnd_nsfw has quit [Ping timeout: 240 seconds]
asteros has quit [Client Quit]
azgil has quit [Quit: Leaving]
saneax is now known as saneax_AFK
djbkd has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
supermar_ has joined #ruby
bruce_lee has quit [Ping timeout: 256 seconds]
thiagofm has quit [Ping timeout: 250 seconds]
sneakerhax has quit [Quit: Leaving]
jgt3 has quit [Ping timeout: 272 seconds]
skweek has quit [Remote host closed the connection]
gigetoo has joined #ruby
skweek has joined #ruby
supermarin has quit [Ping timeout: 256 seconds]
akem has quit [Remote host closed the connection]
CloCkWeRX has quit [Read error: Connection reset by peer]
CloCkWeRX1 has joined #ruby
RegulationD has joined #ruby
JDiPierro has quit [Remote host closed the connection]
calderonroberto has quit [Ping timeout: 272 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
marr has quit [Ping timeout: 256 seconds]
RegulationD has quit [Ping timeout: 250 seconds]
CrazyEddy has joined #ruby
diegoviola has quit [Ping timeout: 256 seconds]
pwnd_nsfw has joined #ruby
dlitvak_ has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
diego1 has joined #ruby
christiandsg has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
MartynKeigher has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
thiagofm has joined #ruby
dstarh has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
asteros has joined #ruby
cdg has joined #ruby
akem has joined #ruby
dlitvak_ has quit [Ping timeout: 272 seconds]
nbdy has joined #ruby
slackbotgz has quit [Remote host closed the connection]
<MartynKeigher>
hey all.. having an issue getting mysql2 ruby gem to show the value of a sql query. here is the code... http://pastebin.com/KWhKu8Ru. can someone spot whats wrong with that? thanks.
<ruboto>
MartynKeigher, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<MartynKeigher>
sorry ruboto ... didnt know which chan id have the best of luck with
djbkd_ has quit [Ping timeout: 256 seconds]
Arnvald has joined #ruby
nerium has joined #ruby
devoldmx has joined #ruby
IrishGringo has joined #ruby
djbkd has quit [Remote host closed the connection]
lemur has quit [Ping timeout: 250 seconds]
akem has quit [Remote host closed the connection]
djbkd has joined #ruby
diego1 has joined #ruby
nateberkopec has quit [Quit: Leaving...]
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola is now known as Guest16140
diego1 is now known as diegoviola
govg has quit [Ping timeout: 256 seconds]
ScottNYC has quit [Quit: WeeChat 1.3]
Guest16140 has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
djbkd has quit [Ping timeout: 240 seconds]
babblebre has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
<jbrhbr>
never anger mr. ruboto
blackmesa has quit [Ping timeout: 256 seconds]
govg has joined #ruby
dlitvak_ has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
TomPeed has joined #ruby
skweek has quit [Remote host closed the connection]
nertzy has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has joined #ruby
<rismoney1>
I have a regex for a string in code [[:alpha:]]{2,4}[[:digit:]]{0,1} which is 2 to 4 alpha characters followed optionally by a single digit, but I want to change the regex to be 2-4 alpha but if 4 no digit
<jhass>
rismoney1: match 2-3 alpha and a digit or 4 alpha
<jhass>
(?:...|...)
<rismoney1>
i am regex impaired :( and losing my mind
skweek has quit [Remote host closed the connection]
dstarh has quit [Client Quit]
<crdpink2>
where did they say they didn't want a capture group?
patdohere has joined #ruby
<jhass>
where did they say they want one?
<jhass>
their original regex didn't had one
skweek has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
<crdpink2>
I think for someone learning it is less to digest, and the output is easier to match to the components of the regex
ascarter has joined #ruby
<jhass>
way too few people use non-capturing groups, creating harder to decipher access to the actually relevant ones. I rather teach what I consider good habits from the start. The capture groups seems superfluous here, so I omitted it
veduardo has quit [Quit: WeeChat 0.4.2]
pwnd_nsfw has quit [Quit: Leaving]
pwnd_nsfw has joined #ruby
patdohere has quit [Ping timeout: 272 seconds]
bubbys has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 240 seconds]
bubbys has joined #ruby
user083 has quit [Quit: leaving]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
user083 has joined #ruby
pwnd_nsfw has quit [Remote host closed the connection]
akem has joined #ruby
colleenmcguckin has quit []
maloik has joined #ruby
user083 has quit [Client Quit]
diegoviola has quit [Ping timeout: 256 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
user083 has joined #ruby
jbrhbr has quit [Quit: Leaving.]
TomPeed has joined #ruby
user083 has quit [Client Quit]
nerium has quit [Quit: nerium]
user083 has joined #ruby
pwnd_nsfw has joined #ruby
maneco has left #ruby ["WeeChat 1.3"]
ajaiswal has joined #ruby
skweek has joined #ruby
maloik has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
blackmesa has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
kobain has joined #ruby
bubbys has quit [Ping timeout: 256 seconds]
<crdpink2>
Use them where it makes sense to. But just let groups be unless you explicitly want to ignore some, and if you need them then go the other way and explicitly name them with (?<name>...) for clarity. I see your opinion, but would not teach it personally :)
elton has joined #ruby
bubbys has joined #ruby
shanemcd has joined #ruby
<havenwood>
crdpink2: It's faster to use non-capture groups and it's more portable, in that methods that care about captures don't get borked.
myztic has joined #ruby
cdg has joined #ruby
DLSteve has joined #ruby
<havenwood>
crdpink2: I like the idea of keeping it simple but when in the land of regex... ;)
<crdpink2>
numbered capture groups are riskier than named
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
<crdpink2>
havenwood: well I certainly agree there.
tropico has joined #ruby
bb010g has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
shanemcd has quit [Ping timeout: 256 seconds]
diegoviola has joined #ruby
cdg has quit [Ping timeout: 256 seconds]
patdohere has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
fullofcaffeine has joined #ruby
lacuna has quit [Remote host closed the connection]
tropico has quit [Remote host closed the connection]
Yzguy has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
ajaiswal has quit [Ping timeout: 250 seconds]
Moosashi has joined #ruby
Axy has quit [Ping timeout: 256 seconds]
Moosashi has quit [Client Quit]
nateberkopec has joined #ruby
patdohere has quit [Ping timeout: 256 seconds]
uri_ has joined #ruby
krzkrzkrz has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
patdohere has joined #ruby
Renich has joined #ruby
patdohere has quit [Max SendQ exceeded]
houhoulis has joined #ruby
ajaiswal has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 250 seconds]
ixti has quit [Ping timeout: 256 seconds]
molay has quit [Quit: Leaving]
krzkrzkrz has quit [Ping timeout: 272 seconds]
slackbotgz has joined #ruby
patdohere has joined #ruby
<zacts>
is the well grounded rubyist still recommended as a book?
<zacts>
(the latest edition)
<zacts>
or what is a good book for a total ruby newbie, who knows a bit of Perl5?
<zacts>
(I say Perl5 as Perl6 is soon to be released I hear)
B1n4r10 has joined #ruby
bronson has joined #ruby
ur5us has quit [Remote host closed the connection]
RegulationD has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
patdohere has quit [Ping timeout: 256 seconds]
codecop has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 256 seconds]
nateberkopec has quit [Quit: Leaving...]
devoldmx has quit [Remote host closed the connection]
<pandb>
What might be the cause of the error: "could not find FOO-x.y.z in any of the sources; Run `bundle install` to install missing gems," when I execute a command outside of the directory it was built in?
<pandb>
it works fine i'm in the directory, but i'd like to be able to use the command outside it
CrazyEddy has quit [Ping timeout: 256 seconds]
will_wielder has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
wldcordeiro has quit [Ping timeout: 256 seconds]
supermarin has joined #ruby
JDiPierro has joined #ruby
gix has joined #ruby
devoldmx_ has joined #ruby
revengeofbigd has joined #ruby
arescorpio has quit [Quit: Leaving.]
JDiPierro has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 240 seconds]
[k-_ has joined #ruby
[k- has quit [Read error: Connection reset by peer]
nerium has quit [Quit: nerium]
govg has quit [Ping timeout: 256 seconds]
solocshaw has quit [Ping timeout: 256 seconds]
psy_ has quit [Ping timeout: 256 seconds]
CrazyEddy has joined #ruby
rismoney1 has quit [Ping timeout: 272 seconds]
tjad has joined #ruby
calderonroberto has quit [Ping timeout: 264 seconds]
cjbottaro has joined #ruby
safe has joined #ruby
ramfjord has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lacuna has joined #ruby
lacuna has joined #ruby
govg has joined #ruby
elton has joined #ruby
inteq has joined #ruby
elton has quit [Remote host closed the connection]
berserk_ren has quit [Remote host closed the connection]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: Zzz...]
sarkis has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 272 seconds]
tjbiddle has quit [Quit: tjbiddle]
saneax_AFK is now known as saneax
crdpink2 has quit [Remote host closed the connection]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djellemah_ has joined #ruby
FLeiXiuS has quit [Remote host closed the connection]
crdpink has joined #ruby
sarkis has joined #ruby
diego1 has joined #ruby
mallu has quit [Ping timeout: 252 seconds]
diego1 has quit [Changing host]
diego1 has joined #ruby
darkf has joined #ruby
diegoviola has quit [Ping timeout: 264 seconds]
djellemah has quit [Ping timeout: 260 seconds]
<boxofrox>
pandb: rvm may be switching your gem environment when you leave the command's directory.
devoldmx_ has joined #ruby
supermarin has quit [Remote host closed the connection]
tjbiddle has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
diego1 has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 256 seconds]
supermarin has joined #ruby
elton has quit [Remote host closed the connection]
sarkis has joined #ruby
crazydiamond has quit [Remote host closed the connection]
supermarin has quit [Remote host closed the connection]
RegulationD has joined #ruby
bronson has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
juddey has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
delsol has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 272 seconds]
arooni has joined #ruby
diego1 has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
<delsol>
Question: So if I have a has_many THINGS relation... that 95+% of the time, DOESNT have any... rather than check the other associations table for the relations (if any), and active record querying the DB potentially a few hundred times to get COUNT of 0, couldn't I just use a has_many with a condition statement, and store THINGS 0/1 as a boolean in the main table?
hahuang65 has quit [Quit: WeeChat 1.3]
<delsol>
since its getting table.* anyways, at least then it wouldn't be loading the other tables unless there were actually records going to be there.
<delsol>
? Or should I just eager load/preload the relation and not care about the extra potential hundreds of queries?
sarkis has joined #ruby
cwong_on_irc has joined #ruby
delsol has quit [Changing host]
delsol has joined #ruby
delsol has quit [Changing host]
delsol has joined #ruby
supermarin has joined #ruby
rubie has quit [Remote host closed the connection]
safe has quit [Read error: Connection reset by peer]
sarkis has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Arnvald has joined #ruby
chadmandoo has joined #ruby
<chadmandoo>
i have some issues installing RVM on OSX
<chadmandoo>
i have to low of a version of bash
<chadmandoo>
but if i brew upgrade bash then i have to high of a version
revengeofbigd has quit [Quit: Connection closed for inactivity]
timonv has quit [Ping timeout: 250 seconds]
Wsewolod has joined #ruby
Wsewolod has quit [Read error: Connection reset by peer]
blaxter has joined #ruby
TomyWork has joined #ruby
sarkis has joined #ruby
blackms has joined #ruby
[k- has joined #ruby
Pumukel has joined #ruby
brunto has quit [Ping timeout: 272 seconds]
mkosaki has quit [Quit: Leaving...]
Moosashi has joined #ruby
jeffreylevesque has quit [Remote host closed the connection]
sarkis has quit [Ping timeout: 256 seconds]
RobertoS has quit [Ping timeout: 252 seconds]
GinoManWorks has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
dlitvak has joined #ruby
TheHodge has joined #ruby
solars has joined #ruby
juddey has joined #ruby
arup_r has joined #ruby
Moosashi has quit [Client Quit]
brunto has joined #ruby
Hounddog has joined #ruby
anisha has joined #ruby
sarkis has joined #ruby
mark4 has joined #ruby
arup_r has quit [Client Quit]
dlitvak has quit [Ping timeout: 256 seconds]
juddey has quit [Ping timeout: 250 seconds]
skade has joined #ruby
tvw has joined #ruby
iwmrby has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
bronson has quit [Remote host closed the connection]
sarkis has joined #ruby
<iwmrby>
Hi. One small question. Newbie trying to create a blog app in Ruby. I have articles and comments. I am working on the controller for comments: when a new comment is created and saved I want to redirect back to the article with the id from params. Can I do that by doing redirect to /articles/#{params[:article_id]}? All the examples I find online are for more complicated things.
Mon_Ouie has joined #ruby
blackmesa has joined #ruby
lubarch has quit [Ping timeout: 256 seconds]
lubarch has joined #ruby
armyriad has quit [Ping timeout: 246 seconds]
hahuang65 has quit [Quit: WeeChat 1.3]
sarkis has quit [Ping timeout: 256 seconds]
joonty has joined #ruby
<janno>
@iwmrby I think you should do something like this: redirect_to article_path(id: params[:article_id])
<janno>
better yet, you could get article from saved comment like this: redirect_to comment.article
<iwmrby>
I can do that?!
<iwmrby>
Yes, I can because I have index defined for article.
lyoshajapan has quit [Remote host closed the connection]
<iwmrby>
Ah, I kind of love Ruby.
<iwmrby>
Thank you a lot!
qiukun has joined #ruby
sarkis has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
shadoi has quit [Quit: Leaving.]
htmldrum has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
lyoshajapan has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
lyoshajapan has quit [Remote host closed the connection]
passerine has left #ruby ["Leaving"]
blackmesa has quit [Ping timeout: 240 seconds]
lyoshajapan has joined #ruby
drptbl has joined #ruby
Xentil has joined #ruby
symm- has joined #ruby
supermarin has joined #ruby
ibouvousaime has joined #ruby
hahuang65 has joined #ruby
sarkis has joined #ruby
tomphp has joined #ruby
B1n4r10 has joined #ruby
Snowy has joined #ruby
christiandsg has joined #ruby
Snowy has quit [Remote host closed the connection]
huyderman has joined #ruby
supermarin has quit [Ping timeout: 250 seconds]
sarkis has quit [Ping timeout: 256 seconds]
B1n4r10 has quit [Ping timeout: 272 seconds]
<jhass>
?rails iwmrby
<ruboto>
iwmrby, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jhass>
for the future ;)
christiandsg has quit [Ping timeout: 265 seconds]
lyoshajapan has quit [Remote host closed the connection]
Suntzu has quit [Ping timeout: 260 seconds]
circ-user-mgcmJ has joined #ruby
bnizzle has left #ruby [#ruby]
sarkis has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
lkba has quit [Remote host closed the connection]
lyoshajapan has joined #ruby
NeverDie has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
NeverDie has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
Zackio has quit [Read error: Connection reset by peer]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
Zackio has joined #ruby
marr has joined #ruby
Bloomer has quit [Remote host closed the connection]
rdark has joined #ruby
DeXterbed has quit [Ping timeout: 250 seconds]
fouriek has joined #ruby
sarkis has joined #ruby
jbrhbr has quit [Quit: Leaving.]
fouriek has quit [Client Quit]
lyoshajapan has quit [Remote host closed the connection]
<iwmrby>
did not know that. Thanks and apologies!
lyoshajapan has joined #ruby
wmdrossard has quit [Quit: leaving]
wmdrossard has joined #ruby
Fredrich010 has quit []
sarkis has quit [Ping timeout: 240 seconds]
qiukun has quit [Quit: qiukun]
fouriek has joined #ruby
lyoshajapan has quit [Ping timeout: 256 seconds]
fouriek has quit [Client Quit]
lurch_ has joined #ruby
DeXterbed has joined #ruby
lubarch has quit [Ping timeout: 272 seconds]
lubarch has joined #ruby
elton has quit [Remote host closed the connection]
<jhass>
the help/--help of all those tools should get you started
<blackms>
thank you again
<blackms>
you helped me a lot
<jhass>
(rubygems executable is gem)
<blackms>
gem it's the same as python pip
<jhass>
pretty much yes
fullofcaffeine has joined #ruby
shanemcd has quit [Ping timeout: 250 seconds]
dmolina has joined #ruby
<blackms>
ok, I can start really fast now
arup_r has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
Peg-leg has joined #ruby
sarkis has joined #ruby
<darix>
banister: do you know if there is something like pry for python. especially with a binding.pry alike?
<banister>
darix ipython i think
toretore has joined #ruby
solars has quit [Ping timeout: 272 seconds]
solars has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
fullofcaffeine has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
azgil has joined #ruby
qiukun has joined #ruby
cwong_on_irc has quit [Ping timeout: 250 seconds]
qiukun has quit [Client Quit]
cwong_on_irc has joined #ruby
jgt3 has quit [Ping timeout: 240 seconds]
vayan has left #ruby [#ruby]
skade has joined #ruby
qiukun has joined #ruby
qiukun has quit [Client Quit]
cwong_on_irc1 has joined #ruby
sarkis has joined #ruby
qiukun has joined #ruby
qiukun has quit [Client Quit]
qiukun has joined #ruby
qiukun has quit [Client Quit]
cwong_on_irc has quit [Ping timeout: 264 seconds]
tomaz_b has joined #ruby
<jhass>
blackms: ^ reminds me, replace irb (REPL) with pry right away, install pry-doc too
qiukun has joined #ruby
qiukun has quit [Client Quit]
qiukun has joined #ruby
qiukun has quit [Client Quit]
<blackms>
jhass, I'm using an IDE to develop, I don't need an interactive shell for now
elton has joined #ruby
<blackms>
well... could be usefull anyway, ok I'm going to install it
sarkis has quit [Ping timeout: 256 seconds]
qiukun has joined #ruby
cwong_on_irc1 has quit [Ping timeout: 240 seconds]
<jhass>
blackms: pry is also a good debugger and still good for quick experiments. It has tab completion, show docs, show source and all that stuff
qiukun has quit [Remote host closed the connection]
blackmesa has joined #ruby
qiukun has joined #ruby
qiukun has quit [Client Quit]
cwong_on_irc has joined #ruby
lyoshajapan has joined #ruby
elton has quit [Ping timeout: 240 seconds]
sarkis has joined #ruby
blackmesa has quit [Quit: WeeChat 1.3]
<azgil>
jhass, is possible create debugger for crystal, simialr to visual studio or idea ide
<jhass>
azgil: wrong channel?
Arnvald_ has quit [Remote host closed the connection]
qiukun has joined #ruby
<azgil>
jahss, why& i only asl one question
<azgil>
*ask
<azgil>
jhass
<jhass>
but it's not a Ruby question and Crystal has its own channel
<azgil>
and crystal similar to ruby
ldnunes has joined #ruby
<ddv>
asl jhass
<jhass>
only on the surface
<ddv>
??, male, germany
nfk|laptop has joined #ruby
lyoshajapan has quit [Ping timeout: 256 seconds]
sarkis has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
bigmac has quit [Ping timeout: 245 seconds]
circ-user-mgcmJ has joined #ruby
sarkis has joined #ruby
platzhirsch has joined #ruby
B1n4r10 has joined #ruby
benhuda has joined #ruby
afisher has joined #ruby
zotherstupidguy has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
iwmrby has joined #ruby
<ljarvis>
heh
<darix>
blackms: you have no idea how much it rocks to do "binding.pry" in your script and get a REPL right in that spot. with all data present so you can tinker with it
skade has quit [Quit: Computer has gone to sleep.]
B1n4r10 has quit [Ping timeout: 272 seconds]
InvGhost has joined #ruby
Spami has joined #ruby
blackmesa has joined #ruby
Pathfinder has joined #ruby
iwmrby has quit [Client Quit]
casadei has joined #ruby
Industrial has joined #ruby
<[k->
i nvr used a debugger for ruby in my entire lyfe
<Industrial>
Hi. I remember there being a gem that gives you a git command that does a stash (if any), pull and rebase and cancels the whole thing and puts it back in unconflicted state if it messes up anywhere along the line
<Industrial>
Anyone know the name?
sarkis has joined #ruby
colegatron has quit [Remote host closed the connection]
colli5ion has joined #ruby
BSaboia has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
supermarin has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
lubarch has joined #ruby
cwong_on_irc has quit [Ping timeout: 264 seconds]
<blackms>
darix, I achieve the same thing with rubymine in debug mode
<blackms>
and yes, it's essential for me
wmdrossard has quit [Ping timeout: 256 seconds]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
<blackms>
fundamental it's a better word to describe it
cwong_on_irc has joined #ruby
supermarin has quit [Ping timeout: 240 seconds]
lubarch has quit [Client Quit]
ta_ has joined #ruby
shredding has quit [Ping timeout: 272 seconds]
bigmac has joined #ruby
sarkis has joined #ruby
ta has quit [Ping timeout: 240 seconds]
christiandsg has joined #ruby
Pathfinder has quit [Ping timeout: 256 seconds]
chridal has quit [Changing host]
chridal has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
madhatter has quit [Remote host closed the connection]
_joes__ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
c-c has joined #ruby
<c-c>
Quadtree - would using NArray with arrays of arrays like [[[],[],[],[]],[...],[],[]] be a good or bad idea for this?
sarkis has joined #ruby
kam270 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wmdrossard has joined #ruby
saneax is now known as saneax_AFK
evlute has joined #ruby
shredding has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wasane has joined #ruby
Mon_Ouie has joined #ruby
saneax_AFK is now known as saneax
<TTilus>
blackms: believe me, it is not the same thing, just check shell mode, show-method, edit-method, state navigation, gist integration, et.al. ;)
brunto has quit [Ping timeout: 250 seconds]
ponga has joined #ruby
<blackms>
TTilus, ok, I'll give it a try :)
sameerynho has joined #ruby
zarubin has joined #ruby
DurstBurger has joined #ruby
sarkis has joined #ruby
<TTilus>
rubymine debugging works nicely and you sure will use it if you continue using rubymine, but still, pry is way worthy addition to your toolbox
nazar has quit [Read error: Connection reset by peer]
zarubin has quit [Ping timeout: 250 seconds]
skade has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
elton has quit [Ping timeout: 272 seconds]
lyoshajapan has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
bMalum_ has joined #ruby
CloCkWeRX1 has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
bMalum has quit [Ping timeout: 272 seconds]
bMalum_ is now known as bMalum
wireshark has joined #ruby
Bloomer has quit [Remote host closed the connection]
jgt3 has joined #ruby
lyoshajapan has quit [Ping timeout: 256 seconds]
kp666 has quit [Remote host closed the connection]
mooe has quit [Quit: Connection closed for inactivity]
Ishido has joined #ruby
monthy has joined #ruby
Macaveli has joined #ruby
jgt3 has quit [Ping timeout: 272 seconds]
Macaveli has quit [Max SendQ exceeded]
dlitvak has joined #ruby
maloik has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
wmdrossard has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
sarkis has joined #ruby
kam270 has quit [Ping timeout: 250 seconds]
HakN96 has joined #ruby
mostlybadfly has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilkarl has left #ruby [#ruby]
djbkd has joined #ruby
jgpawletko has joined #ruby
casadei has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
casadei has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
benhuda has joined #ruby
HakN96 has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 256 seconds]
Coldblackice has quit [Ping timeout: 240 seconds]
Pathfinder has joined #ruby
HakN96 has joined #ruby
krzkrzkrz has joined #ruby
Pathfinder has quit [Remote host closed the connection]
legohead has joined #ruby
<legohead>
Hey, is there anyway in a rake task to run tests and get if they all passed or not?
Robert_ has joined #ruby
<jhass>
?xy legohead
<ruboto>
legohead, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
Robert_ is now known as Guest53569
wmdrossard has joined #ruby
Mon_Ouie has quit [Ping timeout: 250 seconds]
brunto has joined #ruby
qiukun has quit [Quit: qiukun]
jschmid1 has quit [Remote host closed the connection]
edwinvdg_ has joined #ruby
jschmid has joined #ruby
edwinvdgraaf has quit [Ping timeout: 250 seconds]
<afisher>
Hi. I'm a ruby newbie and have recently configured rubocop on my project.
<afisher>
I've a couple of methods that fail the ABC metric. Instead of turning off the check, I was wondering if anyone would like to offer refactoring suggestions?
<mcanevet>
If I puts some debug just after the instruction it does not print
B1n4r10 has joined #ruby
<jhass>
that's your only assertion for "it fails"?
zotherstupidguy has quit [Ping timeout: 240 seconds]
<mcanevet>
jhass, well "I don't know what happens" if you prefers :-)
<jhass>
then how do you know that is wrong at all?
Vivekananda has quit [Ping timeout: 256 seconds]
kam270 has joined #ruby
* afisher
thinks mcanevet might be stalking him :)
yfeldblu_ has joined #ruby
duckpuppy has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheRokh has quit [Read error: Connection reset by peer]
<mcanevet>
jhass, If I add "puts 'foo'" just after "begin $stdout.reopen(stdout) rescue puts "failure" end" it does not print either 'foo' nor 'failure'
<jhass>
mcanevet: that's pretty expected, Kernel#puts is essentially $stdout.puts
yfeldblum has quit [Ping timeout: 264 seconds]
<mcanevet>
jhass, ok
<mcanevet>
jhass, how can I add some debugging stuffs ?
B1n4r10 has quit [Ping timeout: 256 seconds]
<jhass>
get a copy of the inherited stdout before reopening it
<jhass>
&ri IO::dup
<`derpy>
class `IO`: The IO class is the basis for all input and output in Ruby. An I/O stream may be… • http://rubydoc.info/stdlib/core/IO
<jhass>
hrm
<jhass>
nvm that one
devbug has joined #ruby
minimalism has joined #ruby
lyoshajapan has joined #ruby
bronson has joined #ruby
<[k->
i think you use . for class methods
<apeiros>
not in documentation
<jhass>
meh, guess you have to open a random file or make a pipe and reopen it to the original stdout prior reopen stdout to whatever you reopen it to
<apeiros>
ri uses . for "either instance- or class-method"
<apeiros>
and ::/# when you want to be specific
banister has joined #ruby
banister has quit [Client Quit]
<mcanevet>
jhass, OK thanks, now I understand at least why my puts does not print... I'll try to debug a bit more
SOLDIERz has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
DeXterbed has joined #ruby
lyoshajapan has quit [Ping timeout: 256 seconds]
lkba has joined #ruby
InvGhost has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
sdothum has joined #ruby
aryaching has joined #ruby
dlitvak has quit [Remote host closed the connection]
lubarch has joined #ruby
<krzkrzkrz>
Is there a better way to write this: `"foo-profile,bar-profile".split(',').map(&:underscore).map(&:classify)` which should return `['FooProfile', 'BarProfile']`
<krzkrzkrz>
Im more concerned about declaring `map` twice. Too bad you can't do `map(&:underscore.classify)`
blackmesa has joined #ruby
skade has joined #ruby
joonty has joined #ruby
<c-c>
krzkrzkrz: find real problems to solve ;)
<c-c>
you've reached the pinnacle of string handling in the world of computer science
InvGhost has quit [Ping timeout: 250 seconds]
<mcanevet>
jhass, OK I outputed the debug to a file and noticed that the problem does not come from IO.reopen. Thanks for pointing me out that when reopening $stdout I couldn't output to stdout anymore
InvGhost has joined #ruby
tulak has joined #ruby
<krzkrzkrz>
c-c: Hehe ok, will stick with the double map
<c-c>
technically, you could just substitute '-p' with 'P' but that solution will work for much smaller subset
synthroid has joined #ruby
InvGhost has quit [Ping timeout: 250 seconds]
Guest53569 has quit [Ping timeout: 240 seconds]
akem has quit [Read error: No route to host]
codecop has joined #ruby
d0nn1e has quit [Ping timeout: 272 seconds]
supermarin has joined #ruby
arup_r has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 250 seconds]
d0nn1e has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
yfeldblu_ has quit [Ping timeout: 240 seconds]
supermarin has quit [Ping timeout: 264 seconds]
joonty has quit [Quit: joonty]
dorei has joined #ruby
blackmesa has joined #ruby
saddad has joined #ruby
GinoManWorks has joined #ruby
jgt3 has joined #ruby
DeXterbed has quit [Ping timeout: 256 seconds]
Bellthoven has joined #ruby
saneax is now known as saneax_AFK
christiandsg has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
arup_r has joined #ruby
Bellthoven has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 272 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
Macaveli_ has joined #ruby
Vivekananda has joined #ruby
Macaveli_ has quit [Read error: Connection reset by peer]
Macaveli_ has joined #ruby
Macaveli has quit [Ping timeout: 250 seconds]
kam270 has quit [Ping timeout: 240 seconds]
joonty has joined #ruby
leslie has quit [Quit: Have you ever tried to eat a clock? It's very time consuming.]
sameerynho has quit [Quit: Leaving]
InvGhost has joined #ruby
B1n4r10 has joined #ruby
c355E3B has joined #ruby
Tempesta has quit [Quit: See ya!]
sgambino has joined #ruby
goodcodeguy has joined #ruby
skweek has quit [Ping timeout: 272 seconds]
faisal has joined #ruby
brendan- has joined #ruby
thelasti_ has quit [Ping timeout: 240 seconds]
CrazyEddy has quit [Ping timeout: 240 seconds]
lyoshajapan has joined #ruby
kobain has joined #ruby
shanemcd has joined #ruby
joonty has quit [Quit: joonty]
saddad has quit [Ping timeout: 250 seconds]
aryaching has quit [Ping timeout: 250 seconds]
elton has joined #ruby
nopolitica has joined #ruby
monthy has quit [Remote host closed the connection]
ponga has quit []
lyoshajapan has quit [Ping timeout: 256 seconds]
colli5ion has quit [Ping timeout: 255 seconds]
joonty has joined #ruby
aryaching has joined #ruby
atomical has joined #ruby
CrazyEddy has joined #ruby
elton has quit [Ping timeout: 256 seconds]
favadi has joined #ruby
Jardayn has joined #ruby
sarkis has joined #ruby
kam270 has joined #ruby
zotherstupidguy has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
<zotherstupidguy>
is there a gem for html_safe?
<shevy>
hmm what is html safe doing
<zotherstupidguy>
it escapes dangerous stuff :)
<shevy>
well there is CGI.escape_html() or so, not sure if that is the safeness you want though
<zotherstupidguy>
its a method in rails's active support gem,
<shevy>
aha, then it probably does more than what CGI offers
<jhass>
zotherstupidguy: that's not actually how it works
<shevy>
can't you actually factor out that code zotherstupidguy? the methods should be in pure ruby, there usually is a "view source" link
<jhass>
zotherstupidguy: it rather is marking a string for exemption from escaping by the template engine
<zotherstupidguy>
jhass aha
<shevy>
jackcom asks me in PM how to get unbanned... which channel was it again where he could ask?
<shevy>
I think it's the second time he managed to get banned now :D
CloCkWeRX has joined #ruby
<zotherstupidguy>
so all the banned from ruby and ruby-offtopic end up there? :D
<[k->
only if they want to appeal their bans
<zotherstupidguy>
they should organize a party
steffkes has quit [Ping timeout: 256 seconds]
Jardayn has quit [Quit: Leaving]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #ruby
<shevy>
#ruby-offtopic is different, they play unicode hangman there
jds has quit [Quit: Connection closed for inactivity]
<Zarthus>
I wonder how much of it my client will choke on
JDiPierro has joined #ruby
banister has joined #ruby
tjad has quit [Ping timeout: 256 seconds]
<shevy>
your ruby IRC client?
<Zarthus>
my windows mIRC IRC client that finds it funny to replace non-ascii to [?] symbols at ranodm
<Zarthus>
it seems like it's encoding is ensured 50% of the time.
shanemcd has quit []
shanemcd has joined #ruby
<shevy>
ohhh... good old mIRC... people love doing this
<c-c>
Perhaps it is your ssh client that has incorrect encoding.
shanemcd has quit [Client Quit]
shanemcd has joined #ruby
B1n4r10 has quit [Ping timeout: 250 seconds]
skweek has joined #ruby
ItSANgo_ has quit [Quit: Leaving...]
jackcom has left #ruby [#ruby]
skweek has quit [Max SendQ exceeded]
skweek has joined #ruby
ramortegui has joined #ruby
skweek has quit [Max SendQ exceeded]
yaewa has joined #ruby
skweek has joined #ruby
sankaber has quit [Remote host closed the connection]
<GinoManWorks>
How well do you have to know ruby to write a script that will look for #include "*" 's and expand them and write the resultant file to the hard drive?
skweek has quit [Max SendQ exceeded]
moei has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
andikr has quit [Remote host closed the connection]
sankaber has joined #ruby
TomPeed has joined #ruby
<c-c>
GinoManWorks: you mean, read files, look for string, and whats "expand them", substitute with path? and write?
<GinoManWorks>
substitute with file contents
tulak has quit [Remote host closed the connection]
<canton7>
so basically 'gcc -E'?
<GinoManWorks>
I'm on windows though
moei has joined #ruby
Jardayn has joined #ruby
<canton7>
gcc exists on windows
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pandb has quit [Remote host closed the connection]
<canton7>
I'm just saying that using gcc is probably going to be easier. You haven't mentioned it, but presumably you'll need to do this recursively? And pay attention to include guards?
<GinoManWorks>
canton7: other problem, gcc -E preprocesses defines and ifdefs
<c-c>
is this like rewriting make in ruby?
<c-c>
lol
<c-c>
GinoManWorks: perhaps you actually wanted Rake
<GinoManWorks>
canton7: actually not paying attention to include guards
<canton7>
so if one file's included twice, it's substituted twice?
<GinoManWorks>
canton7: I don't mind that, the include guards are part of the file contents
<canton7>
right. how about recursive #includes?
yaewa has quit [Ping timeout: 240 seconds]
mariusz_eu has left #ruby [#ruby]
<GinoManWorks>
essentially the point is to take a header which is a composite header (just contains a whole bunch of #include "..." lines) and form it into a single header file without needing all it's extras
<c-c>
do you ever get the feeling that you are doing it wrong?
<c-c>
I get that all the time, phew
<GinoManWorks>
c-c: you're right, the "right way" would be to copy the entire directory structure .h, .mm, and .cpp files and all into my include path
skweek has quit [Ping timeout: 250 seconds]
legohead has quit [Ping timeout: 250 seconds]
<GinoManWorks>
Doesn't seem quite right to me though to have all that extra stuff (.mm and .cpp files) in my include dir
<GinoManWorks>
or for the includes to be split among a messy directory tree that increases typing
CloCkWeRX has left #ruby [#ruby]
lukeasrodgers has joined #ruby
Didac has quit [Max SendQ exceeded]
<c-c>
Perhaps you should start with asking the right question. What is it that you actually wanted to do
<GinoManWorks>
and yes, recursive including will need to be done. I think the most efficient way to do that is to then process the subbed file contents after subbing them
chandlerbing has joined #ruby
legohead has joined #ruby
bnizzle has joined #ruby
ItSANgo has joined #ruby
mary5030 has joined #ruby
blackmesa has joined #ruby
bnizzle has left #ruby [#ruby]
<GinoManWorks>
I have an open source library that I downloaded which is compatable with windows and provides a lot of functionality I want in C++ (my lingua franca for most things) but they have a directory with seperate modules, then each module is it's own directory, then each module dir has a single "module_name.h" and a lithany of sub-modules that the "module_name.h" includes. additionally there's a "module_name.cpp" file which conditionally includes the
<GinoManWorks>
submodule's .cpp/.mm files depending on platform and contains all the implimentation when preprocessed.
trajing has joined #ruby
<c-c>
GinoManWorks: I get the feeling you should learn how to use rubygems, and then use the cmake gem(s) to use ruby to use cmake to play with your project build/templates.
<c-c>
yeah, implies: learn cmake
dlitvak has joined #ruby
<ljarvis>
caching
<ljarvis>
how do you work
Didac has joined #ruby
christiandsg has joined #ruby
mary5030 has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
<GinoManWorks>
c-c: Ultimately the goal is to have .dlls and .lib files that you can either statically or dynamically link that library
Macaveli_ has quit [Read error: Connection reset by peer]
<c-c>
often so when using C++
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
colli5ion has joined #ruby
Macaveli has joined #ruby
weckl has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
<c-c>
"Builds C, C++ and Objective-C projects using GCC."
babblebre has joined #ruby
<c-c>
written in ruby
kam270 has quit [Ping timeout: 256 seconds]
<c-c>
GinoManWorks: try typing in console: gem search rake-builder
christiandsg has quit [Ping timeout: 265 seconds]
colli5ion has quit [Ping timeout: 255 seconds]
symm- has joined #ruby
daivyk has joined #ruby
rawrwx has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
<c-c>
GinoManWorks: oops, that may not work on Windows, has xutils-dev as dependency - at the least would need Cygnus on Win, maybe not enough
<GinoManWorks>
Cygwin you mean?
<c-c>
whatsitcalled yeah
<GinoManWorks>
But ultimately I would need to know strings, file io, regexs,
<GinoManWorks>
arrays
<c-c>
not regexes necessarily
scepticulous has joined #ruby
nettoweb has quit [Ping timeout: 240 seconds]
chadmandoo has joined #ruby
<c-c>
compared to C++, ruby is something of a cakewalk
<chadmandoo>
hey all. I have an issue installing rvm because on my mac I have a lower version of BASH but when i use homebrew to update bash i then too high of a version
lyoshajapan has joined #ruby
anisha has quit [Quit: Leaving]
<scepticulous>
compared to c++ most languages shine
<c-c>
chadmandoo: thats not really a ruby problem
<c-c>
chadmandoo: but I believe you should be able to set the target bash version to install with your package manager
rodfersou is now known as rodfersou|lunch
wireshark has quit [Quit: Leaving]
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
<GinoManWorks>
well, I was thinking regexes because [ #include "..."] and [# include "..."] and [ # include "..."] are all legal
<chadmandoo>
i have ruby installed by default its version 2.0 something. is that high enough to do most things in ruby for learning?
<evlute>
Papierkorb: hello, are you here? :)
<chadmandoo>
ruby 2.0.0p481
<Papierkorb>
evlute:
<chadmandoo>
for learning purposes that version of ruby ok?
elton has joined #ruby
<Papierkorb>
chadmandoo: meh. uses 2.2 if at all possible
<chadmandoo>
ok
<chadmandoo>
i may need a vagrant box then
lyoshajapan has quit [Ping timeout: 256 seconds]
malconis has joined #ruby
<Papierkorb>
chadmandoo: esp "for learning purposes". there doesn't have been *that* many changes since that version, still, learning the old junk while there's something newer is strange to me
chandlerbing has quit []
<Papierkorb>
chadmandoo: use chruby or rvm
chandlerbing_ has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
<chadmandoo>
Papierkorb: the problem i am running into is trying to install rvm mac OSX version of bash is lower and if i upgrade via homebrew it raises to a too high of version of bash. so im struggling with trying to get the correct version of bash just to install
<chadmandoo>
maybe ill try chruby
<Papierkorb>
there's a third tool to get you a recent ruby, but I forgot its name
govg has joined #ruby
<evlute>
Papierkorb: yesterday you showed me about the composite pattern. now i tried so create a pseudo filesystem objecttree on this pattern - http://nopaste.linux-dev.org/?878901 - it's the composite principle, right?
<evlute>
your example was better Papierkorb - but this uses the right principle - doesn't it?
<Papierkorb>
evlute: the code isn't really ruby-ish, but apart from that, looks like one, yes.
elton has quit [Ping timeout: 250 seconds]
<evlute>
because i'm not using attr_reader/writer?
uri_ has joined #ruby
thejoecarroll has joined #ruby
bronson has joined #ruby
whippythellama has joined #ruby
arup_r has quit [Remote host closed the connection]
<scepticulous>
evlute: for example because of the explicit "return"
<chadmandoo>
found something called ruby-install
<Papierkorb>
evlute: for one, yes (That's actually a sign of bad code if you don't use them). second, ruby uses_this_scheme andNotThis for methods. the 'get', 'set' prefix for variable getters/setters is discouraged (see attr_*)
<Papierkorb>
Explicit return is another thing. if not needed, leave it out
<evlute>
the return is a "bad" habit from another langs...
<Papierkorb>
yeah it takes some getting used to at first
<scepticulous>
big_boobs_xxx.avi ... I see
<Papierkorb>
mixing german and english code is also interesting
<evlute>
this was just a joke...
* Papierkorb
afk
<scepticulous>
of course
bronson has quit [Ping timeout: 256 seconds]
aibot has quit [Remote host closed the connection]
<[k->
afterwards, you might get a scolding from jhass too
<jhass>
kgirthofer: what's wrong with your current specs?
banister has joined #ruby
<[k->
to clarify, what i meant was, since puts is the last statement executed in the method, it would return nil
rubie has quit [Read error: Connection reset by peer]
tulak has joined #ruby
dopie has quit [Ping timeout: 250 seconds]
<kgirthofer>
it fails - it says expected 'policy' received nil
<jhass>
code could be simplified to @status = @type || "error" or probably even getting rid of either and @status ||= "error"
<pontiki>
maybe i'm missing something, but how does @type in set_type get set?
<shevy>
by magic!
<jhass>
kgirthofer: then you probably never call it
rubie has joined #ruby
radgeRayden has quit [Ping timeout: 240 seconds]
<Sou|cutter>
I don't see set_type called at all
radgeRayden_ has joined #ruby
<pontiki>
thanks! i forget magic!
<jhass>
this hard to judge without seeing all of the code
<Sou|cutter>
also I'm curious - does this object actually DO something with the type? It might be more worth testing the behavior of what it does with that variable than the value of the variable itself. Hard to tell from this snippet though
<[k->
hm, seems like i completely failed to read the code
colegatron has joined #ruby
<kgirthofer>
not yet - it just sets status depending on the type passed in
<kgirthofer>
i'm going to do things with it later
arup_r has quit [Remote host closed the connection]
<kgirthofer>
and @type is set with let(:type) { 'policy' }
PaulCapestany has quit [Quit: .]
<Sou|cutter>
that does not call set_type
<pontiki>
that's not something i've ever seen rspec do...
colli5ion has joined #ruby
<Sou|cutter>
it just creates a memoized variable 'type'
<Sou|cutter>
expect(type).to eq 'policy' <-- that's all you're getting from that statement
dionysus69 has joined #ruby
[k- has left #ruby [#ruby]
<kgirthofer>
ahhhhhh
christiandsg has joined #ruby
<kgirthofer>
ok
<kgirthofer>
before do
<kgirthofer>
subject.set_type
InvGhostt has joined #ruby
<kgirthofer>
I see so I have to call each method in the code to action - makes sense now
<jhass>
probably something your initialize should do
The_Phoenix has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
<kgirthofer>
is it best to call each block in initialize? or in each definition
The_Phoenix has quit [Max SendQ exceeded]
ibouvousaime has quit [Read error: Connection reset by peer]
<Sou|cutter>
line 23-24 the description of that block does not match the actual setup
dlitvak has joined #ruby
<kgirthofer>
2nd half of line 2?
<Sou|cutter>
also set_type appears to set a status variable, which means the method name is not descriptive
ixti has quit [Quit: WeeChat 1.3]
rippa has joined #ruby
<pontiki>
unless "set" is an adjective, not a verb
The_Phoenix has joined #ruby
InvGhost has quit [Ping timeout: 240 seconds]
<pontiki>
but then i'd expect it to return the set type
<kgirthofer>
setting status var is just temporary so I can get used to writing the spec tests
<Sou|cutter>
kgirthofer: nil and '' are not the same
<Sou|cutter>
that's what I was saying there
futilegames has joined #ruby
<kgirthofer>
ah ok I understand
<kgirthofer>
empty is a better word choice - you're right
PaulCapestany has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
<Sou|cutter>
It might help to write the test without looking at the implementation so that you can make the test describe what you actually want the code to do instead of nailing down this exact implementation
casadei has joined #ruby
Bloomer has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
lyoshajapan has quit [Ping timeout: 256 seconds]
puria has joined #ruby
grill has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
sarkis has quit [Quit: WeeChat 1.3]
pwnd_nsfw has quit [Ping timeout: 264 seconds]
yardenbar has quit [Ping timeout: 240 seconds]
aganov has quit [Remote host closed the connection]
jds has joined #ruby
dmcp has joined #ruby
<Sou|cutter>
e.g. context "#status" { it "defaults to 'policy' when no --type is supplied" { expect(Foo.new('').status).to eq 'policy' } }
jessemcgilallen has joined #ruby
<Sou|cutter>
Now #set_type is an implementation detail that the test doesn't care about
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Sou|cutter>
assuming it gets called in the constructor or something
skade has quit [Quit: Computer has gone to sleep.]
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
<Sou|cutter>
I'm making a lot of assumptions here because I have no idea what the code is really doing
<kgirthofer>
no - I think you're right on point
skade has joined #ruby
podman has joined #ruby
lacuna has joined #ruby
skade has quit [Client Quit]
afisher has quit [Ping timeout: 252 seconds]
joonty has quit [Quit: joonty]
banister has joined #ruby
faisal_ has joined #ruby
faisal has quit [Read error: Connection reset by peer]
_joes__ has quit []
_joes__ has joined #ruby
Coral has joined #ruby
Coral is now known as Guest76729
banister has quit [Client Quit]
dmcp has quit [Ping timeout: 240 seconds]
DeXterbed has quit [Ping timeout: 272 seconds]
trautwein has joined #ruby
mary5030 has quit [Remote host closed the connection]
akem has joined #ruby
davedev24 has joined #ruby
pwnd_nsfw has joined #ruby
troulouliou_div2 has joined #ruby
renderful has joined #ruby
arup_r has joined #ruby
huyderman has quit [Remote host closed the connection]
DiCablo has joined #ruby
dhollinger has joined #ruby
joonty has joined #ruby
vasilakisfil has joined #ruby
casadei has quit [Remote host closed the connection]
krzkrzkrz has quit [Ping timeout: 240 seconds]
<vasilakisfil>
is it a good idea to use memoization pattern in a self class (a class that is defined using class << self)?
CrazyEddy has quit [Remote host closed the connection]
tjad has joined #ruby
loechel has joined #ruby
NeverDie has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
sucks has joined #ruby
aufi has quit [Quit: Konversation terminated!]
troulouliou_div2 has quit [Ping timeout: 260 seconds]
saddad has joined #ruby
loechel has quit [Excess Flood]
Pumukel has joined #ruby
pdoherty has quit [Ping timeout: 240 seconds]
wottam has joined #ruby
dopie has joined #ruby
slackbotgz has joined #ruby
Xentil has quit [Ping timeout: 256 seconds]
dmcp has joined #ruby
<droptone>
Question: I'm leveraging ActiveRecord in my Ruby script, and so far it's working great. I seem to have a situation though, where a function, on the second or third time, will not be able to access the updated info from the DB,
<droptone>
so I'm worried I have a race condition
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
rodfersou|lunch is now known as rodfersou
<droptone>
Is there a known-method for forcing ActiveRecord instructions to wait until execution is complete?
CrazyEddy has joined #ruby
psy_ has joined #ruby
benhuda has joined #ruby
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
banister has joined #ruby
blackmesa has joined #ruby
aibot has quit [Remote host closed the connection]
mary5030 has joined #ruby
aibot has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
nettoweb has joined #ruby
scepticulous has quit [Ping timeout: 250 seconds]
rflot has quit []
hectortrope has quit [Remote host closed the connection]
rflot has joined #ruby
supermarin has joined #ruby
Wsewolod has joined #ruby
dmcp has quit [Ping timeout: 240 seconds]
blaxter has quit [Ping timeout: 250 seconds]
synthroid has quit [Remote host closed the connection]
nettoweb has quit [Ping timeout: 272 seconds]
supermarin has quit [Ping timeout: 250 seconds]
Caius has left #ruby [#ruby]
tjad has quit [Ping timeout: 272 seconds]
touchstone has left #ruby ["WeeChat 1.3"]
Pumukel has quit [Ping timeout: 250 seconds]
tjad has joined #ruby
Rickmasta has quit [Ping timeout: 272 seconds]
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Client Quit]
dmcp has joined #ruby
duckpupp1 has joined #ruby
heidar has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
wmdrossard has quit [Ping timeout: 240 seconds]
lacuna has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
duckpuppy has quit [Ping timeout: 250 seconds]
SCHAAP137 has quit [Remote host closed the connection]
lacuna has joined #ruby
cwong_on_irc has joined #ruby
RobertBirnie has joined #ruby
Spami has joined #ruby
heidar has quit [Client Quit]
renderfu_ has joined #ruby
tjad has quit [Ping timeout: 256 seconds]
dmcp has quit [Read error: Connection reset by peer]
troulouliou_div2 has joined #ruby
heidar has joined #ruby
dmcp has joined #ruby
duckpupp1 has quit [Ping timeout: 250 seconds]
system64 has joined #ruby
casadei has joined #ruby
heidar has quit [Client Quit]
heidar has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
lyoshajapan has joined #ruby
hobodave has joined #ruby
S01780 has quit [Quit: Connection closed for inactivity]
renderful has quit [Ping timeout: 240 seconds]
hobodave has quit [Read error: Connection reset by peer]
supermarin has joined #ruby
hobodave has joined #ruby
christiandsg has joined #ruby
mwlang has joined #ruby
hectortrope has joined #ruby
blaxter has joined #ruby
<mwlang>
how do I match on all all “&” that are not also “&”? For example , I’m trying to turn “This & that, but not here & there” into ““This & that, but not here & there”
[Butch] has joined #ruby
jbrhbr has joined #ruby
<Sou|cutter>
mwlang: /&(?!\w+;)/ possibly something like that
lyoshajapan has quit [Ping timeout: 256 seconds]
<Sou|cutter>
or /&(?!amp;)/ to be more-specific
solars has quit [Ping timeout: 250 seconds]
nateberkopec has joined #ruby
tulak has quit [Remote host closed the connection]
<mwlang>
Sou|cutter: nice. that did the trick.
christiandsg has quit [Ping timeout: 265 seconds]
<Sou|cutter>
for future reference, (?! is a negative look-ahead
workatnight has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pontiki>
i always forget about that
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
slackbotgz has quit [Remote host closed the connection]
duckpupp1 has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
elton has joined #ruby
nfk|laptop has quit [Quit: yawn]
griffindy has joined #ruby
kies has joined #ruby
<shevy>
you are a big old forgetter!
<shevy>
one day you will forget #ruby
stannard has quit [Remote host closed the connection]
skade has quit [Client Quit]
pdoherty has joined #ruby
rcvalle has joined #ruby
stannard has joined #ruby
<pontiki>
i forget more and more every day
elton has quit [Ping timeout: 256 seconds]
<Sou|cutter>
gotta make room for the kardashians
griffindy has quit [Ping timeout: 256 seconds]
maloik has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
hakunin has joined #ruby
shredding has quit [Ping timeout: 240 seconds]
tildes has joined #ruby
B1n4r10 has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
synthroid has joined #ruby
maloik has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bloomer has quit [Remote host closed the connection]
blackms has quit [Quit: Leaving]
lacuna has joined #ruby
zast has joined #ruby
NeverDie has joined #ruby
Rodya_ has quit [Remote host closed the connection]
christiandsg has quit [Ping timeout: 265 seconds]
govg has joined #ruby
cdg has joined #ruby
brunto has joined #ruby
snockerton has joined #ruby
govg is now known as Guest93950
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
thejamespinto has joined #ruby
drptbl has joined #ruby
amclain has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elton has joined #ruby
centrx has quit [Remote host closed the connection]
Guest93950 has quit [Ping timeout: 256 seconds]
mrtomme has quit [Ping timeout: 246 seconds]
[Butch] has quit [Quit: I'm out . . .]
mrtomme has joined #ruby
KensoDev has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
misz_ has joined #ruby
Zamerick has joined #ruby
dlitvak has joined #ruby
dionysus69 has quit [Quit: dionysus69]
elton has quit [Ping timeout: 256 seconds]
dmolina has quit [Quit: Leaving.]
dmolina has joined #ruby
blackmesa has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
kobain has quit [Read error: Connection reset by peer]
Asher has quit [Quit: Leaving.]
govg has joined #ruby
govg is now known as Guest16800
jessemcgilallen has joined #ruby
misz_ has quit [Quit: misz_]
agit0 has joined #ruby
codecop has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
moeabdol has joined #ruby
dmolina has quit [Ping timeout: 240 seconds]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
shanemcd has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
lubarch has quit [Quit: leaving]
jbrhbr has joined #ruby
bMalum has joined #ruby
<chrisseaton>
does anyone know where the algorithm for resolving which version of gems to use, based on declared dependency version constraints, is implemented?
<c-c>
there must be one in bundler
<chrisseaton>
ah of course it's a bundler thing isn't it? RubyGems doesn't have this part of it
<adaedra>
it does
<c-c>
well
<c-c>
rubygems must have one too
sh4d0wD has joined #ruby
FLeiXiuS has joined #ruby
<FLeiXiuS>
Why doesnt this net ssh channel close when data is given to the channel? http://pastie.org/10621232
<c-c>
Or perhaps the problem is closing the channel, but not the session, FLeiXiuS
<OS-18137>
s/difinatly/definitely/
ruby-lang734 has joined #ruby
<FLeiXiuS>
c-c, channel.close should start the tear down. Regardless of the execs data.
<FLeiXiuS>
At least from what Im reading.
<hfp>
Hi, I'm trying to write an algorithm that checks if a sequence of words matches the following rule: the next word in the sequence must be composed of all the letters from the previous word + 1 letter. This is what I have: https://gist.github.com/anonymous/b0cef050eaaefd747410. It works well except when there is a word that contains the same letter twice because Array#uniq discards the double letter. Any pointers
<hfp>
how I could make the code work with the third case too?
duckpupp1 has joined #ruby
lemur has quit [Remote host closed the connection]
<c-c>
FLeiXiuS: how about some #close (Net::SSH::Connection::Session)
<c-c>
perhaps you could also poke at it with an .on_eof handler, to see if thats what you should handle
Xentil has joined #ruby
<FLeiXiuS>
It just doesnt make sense that I cant force the session to shut down immediately
<FLeiXiuS>
I should be able to do ssh.close
<c-c>
you probably can, probably the session, not channel
thejamespinto has quit [Remote host closed the connection]
saddad has quit [Ping timeout: 256 seconds]
RobertBirnie has joined #ruby
tomphp_ has joined #ruby
<shutto>
is ruby 1.9.3 EOL'ed?
bronson has joined #ruby
<shutto>
oh yeah it totally is
ht__ has quit [Quit: Konversation terminated!]
tomphp has quit [Ping timeout: 250 seconds]
kgirthofer has joined #ruby
ht__ has joined #ruby
<centrx>
totally
<centrx>
it's totally over
tomphp_ has quit [Client Quit]
platzhirsch has left #ruby [#ruby]
casadei has quit [Remote host closed the connection]
<kgirthofer>
how can I do a case with two conditions? i.e. case a, b when a ==z and b == x when a == f b==c etc
tvw has quit [Remote host closed the connection]
ohsnap_ has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
TheNet has joined #ruby
ohsnap_ has quit [Client Quit]
RegulationD has quit [Remote host closed the connection]
nertzy has joined #ruby
rismoney1 has joined #ruby
duckpupp1 has quit [Ping timeout: 256 seconds]
decoponio has quit [Quit: Leaving...]
yorickpeterse has joined #ruby
madhatter has joined #ruby
<norc>
?xy kgirthofer
<ruboto>
kgirthofer, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
cyb3rspy has quit [Ping timeout: 245 seconds]
duckpupp1 has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
IrishGringo has quit [Ping timeout: 256 seconds]
hobodave has joined #ruby
nettoweb has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
<FLeiXiuS>
kgirthofer, use a ,
cyb3rspy has joined #ruby
ht__ has joined #ruby
axl_ has quit [Quit: axl_]
B1n4r10 has joined #ruby
kirun has joined #ruby
<FLeiXiuS>
kgirthofer, "when foo, bar" will cover the condition when either foo or bar is met
<FLeiXiuS>
kgirthofer, though, it sounds like you can probably just use an if, elsif statement.
hobodave has quit [Quit: Computer has gone to sleep.]
<mg^>
you want me to give a pastie of a warning from a Java-based IDE GUI and a stacktrace that doesn't exist?
<FLeiXiuS>
mg^, Ewww java based IDE
<mg^>
My company bought it for me, figured I'd try it out.
hobodave has joined #ruby
<FLeiXiuS>
mg^, java IDE and drinking the koolaid. Ewww
freerobby has joined #ruby
<FLeiXiuS>
mg^, go sublime or go home ;-)
<jbrhbr>
i just noticed that you can use @instance variables within functions and those variables will be within the scope of any nested function definition. is this by design or just an accidental convenience? like what is this an instance variable *on*? the current function object? and how does that work for the subfunction in OO terms? is the sub function dynamically interpreted as a subclass?
<c-c>
FLeiXiuS: if you ask SSH to provide a pty you are effectively telling SSH that "I'll connect this session to a user terminal", thus programs on the receiving end expect that they can prompt for input, and provide coloured output, etc. In short they think they're talking to you over an interactive session, because by assigning a pty, Bash has been started in non-login, interactive mode.
<norc>
mg^: Either way, syntactically that will parse { message } as a block
<mg^>
norc: yes, it's valid
<norc>
mg^: Which means if logger.log expects an argument it will not get any (aside from the block given)
ht__ has joined #ruby
<mg^>
norc: my complaint is that the linting functionality of this tool thinks it is not
<jhass>
jbrhbr: there are no functions and "nested function definitions" most likely don't do what you think they do
<FLeiXiuS>
c-c, yeah, but channels should exit regardless of the PTY when i tell it to close. ;-P
<norc>
mg^: Ah.
<jbrhbr>
jhass: so does 'def foo ..' without scope actually define Object#foo? or what
<mg^>
FLeiXiuS: I'm usually a plain text editor guy, so as far as IDEs go, I'm not sure what to expect, but Rubymine doesn't seem that terrible
<jhass>
jbrhbr: yup
<jbrhbr>
by "without scope" i should have just said "at the top level"
<norc>
On another node, are there actually people around knowledged in the internals of cruby?
<jhass>
jbrhbr: and the toplevel has Object as definee and Object.new as self
<jbrhbr>
jhass: and then when i call foo, is it actually Object.new.foo?
<jhass>
yes
<jhass>
not a new instance for each call though
<norc>
Well. Its not like an Object is created every time.
<jbrhbr>
it seems like maybe the instance is persistent
dlitvak_ has joined #ruby
<jhass>
it is
<jbrhbr>
right, ok
<jhass>
>> [self, self.class]
lacuna has quit [Read error: Connection reset by peer]
<Ziggy>
dumb question. I'm trying to clean up a deployment image (it's quite large). is there any reason that I can't remove APP_ROOT/vendor/bundle/ruby/2.2.0/cache/*.gem after I bundle install?
<jbrhbr>
yes but when i pasted your code, that also included your false :)
<norc>
jbrhbr: It is supposed to return true.
<norc>
jbrhbr: Just end your pry session, start a fresh one, and paste that code.
<jbrhbr>
i'm confused
<jbrhbr>
rubuto returned false
<jbrhbr>
ok
sucks has quit [Remote host closed the connection]
timonv has joined #ruby
<jbrhbr>
mine's true as it has been
<jbrhbr>
rubuto's was false though
lubarch has quit [Quit: leaving]
shanemcd has quit [Ping timeout: 256 seconds]
<jbrhbr>
for this line: def foo; end; Object.instance_methods(false).include?(:foo) irc://irc.freenode.org:6667/# jbrhbr
<jbrhbr>
that expanded weird
<jbrhbr>
in case there is ambiguity, i'm referring to your 11:40 comment (pst)
kies has joined #ruby
RobertBirnie has quit [Ping timeout: 256 seconds]
DoubleMalt has joined #ruby
elton has joined #ruby
dlitvak_ has joined #ruby
ap4y has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
nettoweb has joined #ruby
elton has quit [Ping timeout: 256 seconds]
nettoweb has quit [Max SendQ exceeded]
RobertBirnie has joined #ruby
NeverDie has joined #ruby
evlute has quit [Read error: No route to host]
lkba has joined #ruby
<apeiros>
Object.instance_methods(false).include?(:foo) is bad form
<apeiros>
use Object.method_defined?(:foo)
<apeiros>
@ jbrhbr
<jbrhbr>
@ channel really, but thanks
<apeiros>
ah you wanted to specifically check against private methods?
<apeiros>
there's also private_method_defined?
<jbrhbr>
yes, that's what we were testing
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jbrhbr>
i was just pasting what jhass and norc wrote but thanks
imperator has left #ruby ["Leaving"]
goodcodeguy has joined #ruby
imperator has joined #ruby
<shevy>
15 days to xmas
<norc>
jhass: Okay, C macros made it really annoying to figure out how. https://github.com/ruby/ruby/blob/trunk/inits.c#L24 -- So top_self is created during the setup of Ruby itself before even the VM gets booted.
<jhass>
mkay
sandstrom has quit [Quit: My computer has gone to sleep.]
lacuna has quit []
NeverDie has quit [Max SendQ exceeded]
circ-user-mgcmJ has quit [Ping timeout: 246 seconds]
<norc>
Though top_self resides in the VM.. so. :)
<zacts>
what is a good learning / reading path for ruby?
pandaant has quit [Remote host closed the connection]
DoubleMalt has quit [Max SendQ exceeded]
RobertBirnie has joined #ruby
bMalum has quit [Quit: bMalum]
DoubleMalt has joined #ruby
lyoshajapan has joined #ruby
Coldblackice has quit [Ping timeout: 272 seconds]
rawrwx has joined #ruby
DoubleMalt has quit [Max SendQ exceeded]
<norc>
Jesus, how can anyone work with this nightmare of a source code of Ruby.
<centrx>
Exorcism?
Moosashi has joined #ruby
DoubleMalt has joined #ruby
<norc>
Ruby forces you to somehow preprocess every single source and header before you can actually look at it.
symbol has quit [Read error: No route to host]
darkf has quit [Quit: Leaving]
akkmaxon has quit [Remote host closed the connection]
<centrx>
Huh?
<centrx>
oh I see
<centrx>
The SOURCE code
DoubleMalt has quit [Max SendQ exceeded]
lyoshajapan has quit [Ping timeout: 256 seconds]
rawrwx has quit [Ping timeout: 250 seconds]
<norc>
I got this bizarre function with 14 years of commits, even recent documentation changes - someone ought to use this function, even the objects contain references to it - but of course there is no explicit calls to it.
bruce_lee has quit [Read error: Connection reset by peer]
<norc>
Because Japanese folks seem to like C macros a lot.
<norc>
Especially to construct function names with...
DoubleMalt has joined #ruby
Coldblackice has joined #ruby
JDiPierro has joined #ruby
sandstrom has joined #ruby
bronson has quit [Remote host closed the connection]
fullofcaffeine has quit [Ping timeout: 250 seconds]
timonv has quit [Ping timeout: 240 seconds]
avdi_ has quit []
rawrwx has joined #ruby
avdi has joined #ruby
christiandsg has quit [Read error: Connection reset by peer]
christiandsg has joined #ruby
zacts has joined #ruby
fullofca_ has quit [Remote host closed the connection]
saddad has joined #ruby
<norc>
jhass: Yeah, top_self is generally shared for everything. The only exception is when you use Kernel#load with wrap=true. Even threads share the same top_self (another reason to keep your fingers away from top_self).
DoubleMalt has quit [Ping timeout: 272 seconds]
uri_ has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
<eam>
hfp: in terms of n where n is your word_chain list what you have looks correct
rawrwx has joined #ruby
codecop has quit [Remote host closed the connection]
ht__ has quit [Quit: Konversation terminated!]
<slash_mode>
eam: my only doubt is whether that #split makes it n^2
ht__ has joined #ruby
skade has joined #ruby
Renich has joined #ruby
<eam>
often there can be multiple dimensions of n, so you could have O(n) where n is the number of elements in word_chain, but also O(m) where m is the length of the strings in the list
<Mon_Ouie>
The complexity of split is in terms of the string
<hfp>
eam: Yes, I meant it's O(n) and depends on how long word_chain is. Thanks
<Mon_Ouie>
i.e. the size an element, instead of the amount of elements
FooMunki has quit [Quit: FooMunki]
<eam>
which is why in real world functions you often say things like O(mn)
<slash_mode>
that looks better
<norc>
eam: Also arr1 - arr2 depends on the length of each array.
<hfp>
How can I know what's the O of built-in methods?
<norc>
sry, I meant hfp.
<norc>
hfp: Look at the implementation.
<eam>
you can guess, based on obvious algos, but often have to RTFS
<norc>
And good luck with that.
ramfjord has joined #ruby
<hfp>
haha
<norc>
But once you get through all the missing documentation and macro hell, it's not so bad. :)
<hfp>
hmm so O(mn) is bad, isn't it?
<eam>
there was one notable one from a few months ago where someone found that Array#reject! was far slower than Array#reject, for example
<eam>
ah, ruboto doesn't pass that through, but the latter didn't finish, time budget
rawrwx has quit [Ping timeout: 272 seconds]
<Papierkorb>
eam: Range is Enumerable, you can call #reject on it directly.
<hfp>
Any comments on my implementation? I'm checking whether a given list of words follows the rule: the next word must be 1 char longer than the previous one and contain all chars from the previous word. Chars order doesn't matter/
akem has joined #ruby
<eam>
Papierkorb: but not reject!
<norc>
eam: There should not be a significant difference between the two.
<slash_mode>
hfp: fun... sounds like an adventofcode puzzle
<norc>
eam: In fact I would expect Array#reject! to be faster looking at the implementation
<Papierkorb>
eam: and there's Range#to_a too :P No need for the expensive splat operator
<eam>
norc: the reason for the difference is that reject! shifts every element of the array for each iteration that rejects!
<eam>
Papierkorb: ruby is a language for my ease of use, not the computer's :)
<eam>
I don't like writing (1..10).to_a
RobertBirnie has quit [Ping timeout: 256 seconds]
<Papierkorb>
I .. do.
lemur has joined #ruby
<eam>
anyway, it's O(n^2) for reject! and O(n) for reject
<Papierkorb>
slash_mode: that's exactly what I told eam, yes
<slash_mode>
i believe that
<eam>
Range won't implement !
speaking1ode is now known as speakingcode
<eam>
(obviously)
<slash_mode>
Papierkorb: nuh uh
<Papierkorb>
slash_mode: [22:05] <Papierkorb> eam: Range is Enumerable, you can call #reject on it directly.
dlitvak_ has quit [Ping timeout: 272 seconds]
<eam>
gentlepersons
* slash_mode
+corrected
<norc>
eam: #5ec029d1e
<norc>
About a year ago
<eam>
norc: ;)
dlitvak has joined #ruby
haxrbyte has quit [Remote host closed the connection]
DurstBurger has joined #ruby
haxrbyte has joined #ruby
dlitvak has quit [Remote host closed the connection]
<eam>
anyway, just one example of many -- it's easy to guess at runtime but also surprisingly easy to get it wrong
circ-user-mgcmJ has joined #ruby
<norc>
eam: Yeah. Was delete_at btw not shift.
berserk_ren has quit [Ping timeout: 272 seconds]
<norc>
But still.
last_staff has quit [Quit: last_staff]
<eam>
I had one just earlier this week that got me and someone here helped figure out: Guess why this code is O(n^2) where n is the size of buf https://gist.github.com/eam/db9b3e7cd3b42743455b
<eam>
ostensibly it's only O(n), paging through buf in 4k chunks
<eam>
(iirc credit to drbrain
sandstrom has joined #ruby
rawrwx has joined #ruby
<eam>
answer is that String#slice() has O(n) cost because it reads the entire string up to pos in order to count characters instead of using byte offsets in the char array
s00pcan has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
<hfp>
Is it a safe way to check my big O result by feeding the script a list of say 4 elements, run it, see how long it takes. Then rerun it but with 8 elements and see how much longer it takes and use these two times to verify if it's linear or not?
<eam>
so changing the character encoding changes the code from O(n^2) to O(n) -- and on a 50M input has a runtime difference of microseconds to like an hour
<norc>
rb_str_subpos I see it.
ht__ has quit [Quit: Konversation terminated!]
calderonroberto has quit [Ping timeout: 272 seconds]
root_murdoc has joined #ruby
<norc>
Or mmm
s00pcan has joined #ruby
<norc>
hfp: No.
myztic has quit [Ping timeout: 250 seconds]
rawrwx has quit [Ping timeout: 250 seconds]
<norc>
hfp: From Ruby side the entire lexer/parser/compiler/execution construction alone would severely skew any such minimalistic test.
dlitvak has quit [Remote host closed the connection]
<norc>
Or wait, that was dumb,
<hfp>
norc: How do you make sure you calculated your big O properly then?
<norc>
I somehow was picturing you with a stopwatch....
<slash_mode>
hfp: two times will always be linear
<norc>
:-)
tomphp has joined #ruby
<norc>
hfp: To calculate you really have to look at the implementation
SlaytanicOne has joined #ruby
<hfp>
slash_mode: Oh right, O(mn) is the same as O(n) as far as big O is concerned, isn't it?
htmldrum has joined #ruby
radgeRayden_ has joined #ruby
radgeRayden has quit [Ping timeout: 256 seconds]
<hfp>
norc: haha no stopwatch, I wanted to use `time ruby script.rb`
SlaytanicOne has left #ruby [#ruby]
<slash_mode>
i just mean that... if you draw a line between two points, it'll always be a line... if you're looking for the shape of a curve, you'll need more than two points.
jpfuentes2 has quit [Ping timeout: 240 seconds]
<norc>
hfp: Actually that would be the same mistake.
<norc>
So my point remains valid after all.
<hfp>
norc: so if I wanted to do that, I should use Ruby's Benchmark
<slash_mode>
it is interesting that the length of the words in the word chain grow by 1 with each additional word
<norc>
That would be a better start. Then you need to create multiple datapoints enough to model a function through.
root_murdoc has quit [Remote host closed the connection]
<norc>
And they need to be large enough to not be influenced by caching or random things.
braincrash has quit [Ping timeout: 256 seconds]
<hfp>
This puzzle is a lot more complicated than I initially thought
<norc>
hfp: And as eam has pointed out, looking at the implementation takes a while, and you will end up at a lot of archaic and badly documented functions, where it is really easy to miss some accidental O(n^2) function blowing an assumed O(1) function up
InvGhosttt has joined #ruby
jpfuentes2 has joined #ruby
<hfp>
I first thought I could solve it with a regex but the fact that letters can change order made this impractical. So then I decided to split every word in the array, call uniq on it and make sure the result was the same length as the last entry in the word_chain array. But no dice, because words with the same letter twice broke it. So then I came up with the current implementation which I think is linear depending
<hfp>
on the word_chain size
<norc>
hfp: Out of curiosity, is this just educational, or are you genuinely worried about performance?
InvGhost has joined #ruby
IrishGringo has joined #ruby
micmagis has quit [Quit: Connection closed for inactivity]
ap4y has quit [Quit: WeeChat 1.3]
<hfp>
It's a puzzle I was asked to solve and one of the parameters of the puzzle is that the input can be as long as 750k words long
bb010g has quit [Quit: Connection closed for inactivity]
<hfp>
So I have to pay attention to performance
<norc>
Unless performance is part of the task, I would focus on an elegant and correct solution.
<hfp>
Although the input is composed of several word chains, so no word chain would be that long most of the time
<slash_mode>
hfp: oh god... 750words... that n parameter is absolutely important
<norc>
750k words is nothing.
<slash_mode>
word 1 has 1 character... word 750000 has 750000 characters
<norc>
hfp: As a general guideline: Write code that works. Test it. Profile it. Optimize it.
<norc>
In that order.
InvGhostt has quit [Ping timeout: 240 seconds]
anime4christ has joined #ruby
anime4christ has quit [Remote host closed the connection]
InvGhostt has joined #ruby
<norc>
hfp: Rather than thinking about O(x) about everything, its much better to write stuff first, and use a profiler to immediately see where most time is lost - IF you notice it is an issue.
<norc>
Much better use of your time. ;-)
<zacts>
am I voiced here? :-)
<zacts>
I have ruby questions
<slash_mode>
zacts: no, but you don't need it to talk
<hfp>
norc: I see, thanks for the tip. Will I still get something out of using a profiler for a short list of 8 words or should I make it much longer for the profiler to be of any use?
InvGhosttt has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
<zacts>
slash_mode: so everyone here can hear me?
<hfp>
zacts: yup
<norc>
hfp: The profiler is only for *when* you have performance issues.
rawrwx has joined #ruby
daivyk has quit [Quit: ZZZzzz…]
<zacts>
cool
<norc>
hfp: So no matter how large your dataset, if its large enough for you to notice, profiling will help.
<norc>
Dont think about the size.
<zacts>
I'm just wondering if the ruby black book (latest edition) is a good book to begin learning ruby with
benhuda has quit [Ping timeout: 272 seconds]
InvGhosttt has joined #ruby
<zacts>
I checked the filter logs but couldn't find responses to my previous questions
emilkarl has quit [Quit: emilkarl]
InvGhost has quit [Ping timeout: 240 seconds]
<norc>
zacts: Sometimes questions go under. Feel free to reask. :)
<zacts>
ok :-)
RobertBirnie has quit [Ping timeout: 272 seconds]
<norc>
hfp: So again, focus on writing clean code that works. Then if applicable write unit tests. If you have performance issues, profile and only optimize the parts that need optimizing. -- I emphasize again: In that order.
s00pcan has quit [Ping timeout: 256 seconds]
<norc>
95% of the time performance should not be your concern.
<zacts>
I just know that for #perl they have many books they _do not_ recommend, thus why I'm asking if this one is ok for ruby
<zacts>
my plan was: ruby black book (latest edition) --> Metaprogramming Ruby (pragmatic press) --> poodr
sandstrom has joined #ruby
s00pcan has joined #ruby
<zacts>
(and throwing in Eloquent Ruby in there somewhere)
<zacts>
if that sounds like an ok start, just say yes or no, and I'll be happy
rawrwx has quit [Ping timeout: 250 seconds]
InvGhostt has quit [Ping timeout: 264 seconds]
RobertBirnie has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
dlitvak has joined #ruby
<norc>
zacts: from what I can tell everybody here has their own opinion.
<norc>
zacts: The majority here seems to favor taking some online resource and just diving in, rather than reading a book.
fullofcaffeine has quit [Remote host closed the connection]
jessemcgilallen has quit [Quit: jessemcgilallen]
Mon_Ouie has quit [Quit: WeeChat 1.3]
shellie_ has quit [Quit: brb.]
<zacts>
ah ok
<zacts>
which is an online resource you like norc?
skade has quit [Quit: Computer has gone to sleep.]
<slash_mode>
Radar: i've only had one possible employer say "welllll... we really like what we've got going here with php, so you might not be a good fit"
c0ncealed has joined #ruby
<Radar>
slash_mode: Was that at "Mediocre Inc"?
rawrwx has joined #ruby
<norc>
slash_mode: Honestly Im glad PHP exists as a holding center for the real idiots out there.
<slash_mode>
Radar: hmm let me check.. chronicle studios, their offices are at the Innovation Depot
<norc>
It keeps serious languages clean. :-)
<slash_mode>
"innovation"
<Radar>
lol
jpfuentes2 has quit [Ping timeout: 240 seconds]
<Papierkorb>
I'm not sure what I like less. JS or PHP.
<Papierkorb>
I find both to be horrific
trautwein has quit [Client Quit]
<norc>
Papierkorb: JS is actually pretty decent.
<shevy>
just use both JS and PHP together Papierkorb
<Radar>
QUICK: give me the argument order for both strstr and str_replace.
<norc>
It's just decades of kids who have given the whole thing a bad reputation.
ramfjord has quit [Quit: leaving]
<Radar>
(The fact that everything is a top-level function in PHP really grates on me now)
ramfjord has joined #ruby
lukeasrodgers has quit [Quit: Leaving.]
<Radar>
Anyway, it's offtopic :P
<norc>
Radar: I would really like methods to be first class objects like functions in JS. :-P
lyoshajapan has quit [Ping timeout: 256 seconds]
<norc>
Or blocks as objects
<Radar>
norc: Well have I got a language for you: Elixir!
johnzorn has quit [Ping timeout: 260 seconds]
<norc>
Heh.
<darix>
mirah
<darix>
too
<darix>
maybe
rawrwx has quit [Ping timeout: 272 seconds]
<Papierkorb>
I'm waiting for crystal to become useful for production
calderonroberto has joined #ruby
<Radar>
Elixir is already useful for production and imo everyone should be learning that after they learn Ruby.
maloik has quit [Ping timeout: 250 seconds]
synthroid has quit []
<norc>
Radar: Well its definitely on my todo list. Though I just got started with Ruby for real.
<Papierkorb>
didn't like it when I took a look. I do like OOP. for me, crystal gets many many things right.
elton has joined #ruby
yfeldblum has joined #ruby
<norc>
Im just so sad that it seems downright impossible to get hold of the pointer to the current thread with Fiddle.
<norc>
Though wait..
ta has quit [Ping timeout: 264 seconds]
ta has joined #ruby
braincrash has joined #ruby
elton has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Ping timeout: 256 seconds]
stannard has quit [Remote host closed the connection]
pdoherty has quit [Ping timeout: 240 seconds]
saddad has quit [Ping timeout: 256 seconds]
rawrwx has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
DurstBurger has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
DurstBur2er has joined #ruby
zotherstupidguy has quit [Ping timeout: 256 seconds]
RobertBirnie has joined #ruby
stannard has joined #ruby
rawrwx has quit [Ping timeout: 272 seconds]
fullofcaffeine has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
dmolina has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
JDiPierro has quit [Remote host closed the connection]
dfockler has quit [Ping timeout: 256 seconds]
sdothum has joined #ruby
lxsameer has quit [Quit: Leaving]
rakm has joined #ruby
Idakyne has joined #ruby
rawrwx has joined #ruby
jpfuentes2 has joined #ruby
B1n4r10 has quit [Ping timeout: 272 seconds]
uri_ has quit [Ping timeout: 240 seconds]
B1n4r10 has joined #ruby
puria has joined #ruby
pdoherty has joined #ruby
B1n4r10 has quit [Ping timeout: 250 seconds]
lemur has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
norc has quit [Ping timeout: 252 seconds]
devbug has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
ap4y has joined #ruby
sandstrom has joined #ruby
rdavila has joined #ruby
stannard has quit [Remote host closed the connection]
Yzguy has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zacts>
Radar: elixir does look neat
twistedpixels has joined #ruby
<zacts>
I think it's based on erlang right?
<zacts>
it's erlang with ruby syntax
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
freerobby has quit [Quit: Leaving.]
dfinninger has quit [Remote host closed the connection]
<shevy>
I approve of languages with ruby-esque syntax
<pipework>
shevy: try crystal
<pipework>
elixir too
<shevy>
I am an old man now, my tinker days are long gone
<pipework>
shevy: You're shevy, no longer a tinker, now a stinker.
zquad has joined #ruby
<shevy>
yeah
jhill has quit [Ping timeout: 240 seconds]
<zquad>
I want to execute this command: redis-cli EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 pattern:*
<pipework>
do it!
<zquad>
I used system with the above command is is getting an error
vcoinminer_ has quit [Ping timeout: 250 seconds]
<diegoviola>
are we getting 2.3 for xmas?
<zquad>
how do you execute that cli command?
mroth has quit [Ping timeout: 240 seconds]
<havenwood>
diegoviola: if you're good
cardoni has quit [Ping timeout: 250 seconds]
tejasmanohar has quit [Ping timeout: 250 seconds]
knowtheory has quit [Ping timeout: 250 seconds]
ec has quit [Ping timeout: 250 seconds]
<havenwood>
diegoviola: otherwise coal!
<pipework>
havenwood: Do even gingers get rubies for christmas?
<havenwood>
pipework: Unless they're naughty!
jmhmccr has quit [Ping timeout: 250 seconds]
rflot has quit [Ping timeout: 240 seconds]
andersh has quit [Ping timeout: 240 seconds]
<eam>
rubies could be a nickname for gingers
akahn has quit [Read error: Connection reset by peer]
* pipework
is definitely getting coal
ckrailo has quit [Ping timeout: 240 seconds]
<diegoviola>
what does being good means? being a good programmer and writing good code? :)
dukedave has quit [Ping timeout: 264 seconds]
boxrick1 has quit [Ping timeout: 250 seconds]
jabreity__ has quit [Ping timeout: 264 seconds]
newmanships has joined #ruby
danzilio has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
jpinnix______ has quit [Read error: Connection reset by peer]
acadavid has quit [Ping timeout: 250 seconds]
jpfuentes2 has quit [Ping timeout: 240 seconds]
calderonroberto has quit [Ping timeout: 250 seconds]
glowcoil has quit [Ping timeout: 264 seconds]
Jackneill has quit [Ping timeout: 240 seconds]
<shevy>
diegoviola our gift will be a new ruby release at xmas
<shevy>
you can be good or naughty
lyoshajapan has joined #ruby
<diegoviola>
naughty? no thanks, not interested
Lucky__ has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
lemur has joined #ruby
imperator has quit [Quit: Leaving]
jpfuentes2 has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
IrishGringo has quit [Ping timeout: 256 seconds]
davedev24 has joined #ruby
lyoshajapan has quit [Ping timeout: 256 seconds]
SenpaiSilver_ has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
circ-user-mgcmJ has quit [Ping timeout: 246 seconds]
arooni has quit [Ping timeout: 240 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
brunto has quit [Ping timeout: 250 seconds]
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
circ-user-mgcmJ has joined #ruby
Wsewolod has quit [Ping timeout: 250 seconds]
elton has joined #ruby
brunto has joined #ruby
ec\ is now known as ELLIOTTCABLE
Rickmasta has joined #ruby
ruid has quit [Ping timeout: 250 seconds]
elton has quit [Ping timeout: 256 seconds]
puria has quit [Ping timeout: 250 seconds]
<grilled-cheese>
Is there a way to check what versions a ruby script is backward compatible to?
RobertBirnie has quit [Ping timeout: 256 seconds]
<grilled-cheese>
I want to assert a minimum ruby version needed, but I wrote it against 2.1
<adaedra>
Running it with older versions
<grilled-cheese>
hmm…
<grilled-cheese>
so rvm is basically my best bet
<havenwood>
grilled-cheese: An app or a gem?
<grilled-cheese>
script
<grilled-cheese>
uses a gem or two though
<havenwood>
grilled-cheese: Err, so a gem that hasn't been cut?
rawrwx has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
<grilled-cheese>
sure
<adaedra>
grilled-cheese: if you use a CI, you can set it up there for it to do it itself (assuming you have tests)
<grilled-cheese>
not so much
<havenwood>
grilled-cheese: Yeah, I'd typically check to see what versions are tested in the .travis.yml file.
Wsewolod has joined #ruby
<grilled-cheese>
single file script, not a full rails app or anything
RobertBirnie has joined #ruby
<havenwood>
grilled-cheese: If you cut it into a gem you could specify for example a: spec.required_ruby_version = ['>= 2.1.0', '< 2.2.3']
dfinninger has joined #ruby
<grilled-cheese>
true
mroth has joined #ruby
<grilled-cheese>
I was going to put my version checking a level up in puppet code
<grilled-cheese>
as part of the install module
mroth has quit [Remote host closed the connection]
<havenwood>
grilled-cheese: Easy enough to cut a gem even if you've no intention of uploading it to RubyGems. You can install gems locally only.
kith_ has joined #ruby
<havenwood>
grilled-cheese: Using gem conventions might make your script more accessible to others or yourself in the future as well.
mary5030 has quit [Remote host closed the connection]
hahuang65 has joined #ruby
DurstBur2er has quit [Ping timeout: 256 seconds]
<grilled-cheese>
true
dukedave has joined #ruby
Seich has quit [Ping timeout: 264 seconds]
hplar has quit [Ping timeout: 245 seconds]
hplar has joined #ruby
ledestin has joined #ruby
sucks has joined #ruby
Seich has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
jhill has joined #ruby
exadeci has joined #ruby
CloCkWeRX has joined #ruby
nertzy has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
BTRE has quit [Read error: Connection reset by peer]
mroth has joined #ruby
kam270 has joined #ruby
sneakerhax has joined #ruby
kies has quit [Ping timeout: 250 seconds]
howdoicomputer has quit [Ping timeout: 256 seconds]
acadavid has joined #ruby
kam270 has quit [Max SendQ exceeded]
jpinnix______ has joined #ruby
ckrailo has joined #ruby
zarubin has joined #ruby
dhollinger has quit [Quit: WeeChat 1.3]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ec has joined #ruby
BTRE has joined #ruby
kam270 has joined #ruby
puria has joined #ruby
akahn has joined #ruby
ledestin_ has joined #ruby
colegatron has quit [Ping timeout: 240 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jmhmccr has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
glowcoil has joined #ruby
sneakers has joined #ruby
knowtheory has joined #ruby
vcoinminer_ has joined #ruby
whippythellama has quit [Quit: WeeChat 1.3]
sneakerhax has quit [Ping timeout: 250 seconds]
rflot has joined #ruby
<devster31>
what's the equivalent of python's sys.maxsize? the largest integer value supported by the platform?
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rayzaum>
hey, someone can help me, im install rails now and show me this msg when a i put "rails server" Usage: rails new APP_PATH [options], and more option..
Renich has quit [Ping timeout: 256 seconds]
Xentil has quit [Client Quit]
Xentil has joined #ruby
Renich has joined #ruby
tejasmanohar has joined #ruby
mary5030 has joined #ruby
async_prince has quit [Ping timeout: 245 seconds]
BTRE has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
Idakyne has quit [Ping timeout: 240 seconds]
dopie has quit [Quit: This computer has gone to sleep]
jgt4 has joined #ruby
BTRE has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
zarubin has quit [Remote host closed the connection]