fullofca_ has quit [Read error: Connection reset by peer]
tmtwd has joined #ruby
fullofcaffeine has joined #ruby
yfeldblum has joined #ruby
Klumben has joined #ruby
bryanray has joined #ruby
bmn has joined #ruby
prosodyVC has joined #ruby
devn has joined #ruby
joaomdmoura has joined #ruby
Guest44773 has joined #ruby
troter____ has joined #ruby
Archyme_ has joined #ruby
kramsee_ has joined #ruby
snapcase has joined #ruby
leslie has joined #ruby
rcs has joined #ruby
Billias has joined #ruby
andersh has joined #ruby
Gnubie_ has joined #ruby
n1ftyn8_ has joined #ruby
rflot has joined #ruby
DarkBushido has joined #ruby
pygospa has joined #ruby
z3uS has joined #ruby
ltd has joined #ruby
SHyx0rmZ has joined #ruby
terrellt has joined #ruby
ammar has joined #ruby
tinyhippo has joined #ruby
Killerkeksdose has joined #ruby
Guest84489 has joined #ruby
bartj3_ has joined #ruby
mistym has joined #ruby
ex0ns has joined #ruby
Liothen has joined #ruby
pipework has joined #ruby
Miron has joined #ruby
CpuID has joined #ruby
charles81 has joined #ruby
daxroc has joined #ruby
cball has joined #ruby
tobiasvl has joined #ruby
iooner has joined #ruby
bf4 has joined #ruby
Keltia has joined #ruby
drbrain has joined #ruby
BustyLoliChan has joined #ruby
skakri has joined #ruby
tskogberg has joined #ruby
cstrahan has joined #ruby
eregon has joined #ruby
Takumo has joined #ruby
ZYPP has joined #ruby
DoubleMalt has joined #ruby
catbusters has joined #ruby
hostess has joined #ruby
shtirlic has joined #ruby
worstcase has joined #ruby
Tempesta has joined #ruby
Bugboy1028 has joined #ruby
zipkid has joined #ruby
SenpaiSilver_ has joined #ruby
cek has joined #ruby
jhass has joined #ruby
mighty_gorilla has joined #ruby
bafbomb has joined #ruby
niko has joined #ruby
blackjid has joined #ruby
kiki_lamb has joined #ruby
manveru has joined #ruby
universa1 has joined #ruby
george2 has joined #ruby
jimeh has joined #ruby
tejasmanohar has joined #ruby
Cyther_ has joined #ruby
AnoHito has joined #ruby
jpinnix______ has joined #ruby
verdoc_ has joined #ruby
korolyov has joined #ruby
zemmihates has joined #ruby
cschneid has joined #ruby
voxxit has joined #ruby
crdpink has joined #ruby
M-Kodo has joined #ruby
`derpy has joined #ruby
znz_jp has joined #ruby
teotwaki has joined #ruby
benlakey has joined #ruby
fedexo has joined #ruby
sjums has joined #ruby
apipkin has joined #ruby
LBRapid_ has joined #ruby
harryk has joined #ruby
adaedra has joined #ruby
pwnd_nsfw has joined #ruby
boshhead has joined #ruby
bascht has joined #ruby
FastJack has joined #ruby
ZeeNoodleyGamer has joined #ruby
lokulin has joined #ruby
cwong_on_irc has joined #ruby
WizJin has quit [Changing host]
WizJin has joined #ruby
TDJACR has joined #ruby
machty has quit [Changing host]
machty has joined #ruby
[BNC]BLuEGoD has quit [Changing host]
[BNC]BLuEGoD has joined #ruby
inukshuk has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
ta has quit [Read error: Connection reset by peer]
inukshuk has joined #ruby
sivoais_ has joined #ruby
ElSif has joined #ruby
blackmesa has quit [Quit: WeeChat 1.3]
xybre has joined #ruby
XxionxX has joined #ruby
sgambino has joined #ruby
bcavileer has joined #ruby
Mission-Critical has joined #ruby
tmtwd has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 268 seconds]
tsou has quit [Remote host closed the connection]
first-time-stude has joined #ruby
<first-time-stude>
Hi All, is this the right place to ask for advice/help on Ruby problems?
tmtwd has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
tmtwd has quit [Remote host closed the connection]
tmtwd has joined #ruby
<Aria>
Yep!
<Aria>
Welcome!
<first-time-stude>
OKay! I am a new student and I have a query: My teacher would like me to find the longest word in a string. I figured out how to do this with Ruby's sort! method and a comparative operator, but my teacher has mandated that I must use a Loop in order to accomplish this task
arthurix_ has joined #ruby
uber has quit [Changing host]
uber has joined #ruby
kurzweil has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amoeba has joined #ruby
<first-time-stude>
What is the best approach to solve this problem>
JStoker has quit [Changing host]
JStoker has joined #ruby
wedgwood has joined #ruby
wedgwood has quit [Changing host]
TDJACR has quit [Changing host]
TDJACR has joined #ruby
goldfish6744 has joined #ruby
scottstamp has joined #ruby
mrtomme has joined #ruby
PlasmaStar has joined #ruby
heinrich5991 has joined #ruby
armyriad has joined #ruby
A124 has quit [Changing host]
A124 has joined #ruby
Coldblackice has joined #ruby
joast is now known as Guest69039
Tristan-Speccy is now known as Guest51228
RobertBirnie has joined #ruby
ged_ is now known as Guest34193
EvilJStoker is now known as Guest93258
romero is now known as Guest69698
Vile` is now known as Guest47655
unreal is now known as Guest45706
PaulCapestany has joined #ruby
__chris has joined #ruby
oetjenj has joined #ruby
Brando753 has joined #ruby
Guest93258 has quit [Changing host]
Guest93258 has joined #ruby
Azure has joined #ruby
ruboto_ has joined #ruby
Guest93258 is now known as EvilJStoker
BraddPitt has joined #ruby
hanmac has quit [Ping timeout: 250 seconds]
finisherr has quit [Quit: finisherr]
prosodyVC is now known as prosodyvVC
<jhass>
first-time-stude: probably grilling the teacher over an open fire. Best solution: split.max_by(&:size), desired solution: max = ""; words.each do |word| max = word if word.size > max.size; end;
mission712 has joined #ruby
<jhass>
the latter is pretty much just reimplementing max_by of course
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dmolina has quit [Quit: Leaving.]
__chris has quit [Client Quit]
[BNC]BLuEGoD is now known as BLuEGoD
tubuliferous has quit [Ping timeout: 268 seconds]
BLuEGoD is now known as Guest75924
chopin_ has quit [Remote host closed the connection]
baweaver has joined #ruby
Kharma has joined #ruby
clamstar has joined #ruby
<first-time-stude>
jhass, thank you for your advice. I'm going to study this and get back if I have ny questions
<first-time-stude>
Do the semicolons in your syntax mean new line?
stannard has joined #ruby
<baweaver>
Avoid semicolons in ruby
dgynn has joined #ruby
<baweaver>
chances are high you won't actually need them
<jhass>
yes
<jhass>
it's valid syntax but real code should replace them with newlines
<first-time-stude>
right, but I mean in jhass's code, I think he is using the semicolons to indicate a new line
oetjenj has quit [Ping timeout: 260 seconds]
ledestin has joined #ruby
<first-time-stude>
thanks lol, I just started learning code iterally 3 weeks ago, so yea
<havenwood>
first-time-stude: yup, semicolons in examples means use real newlines in real life
<drbrain>
>> out = []; out << 'unless'; out << 'you'; out << 'submit'; out << 'to'; out << 'ruboto'; out.join ' '
7F1AASOXA has quit [Quit: Computer has gone to sleep.]
joaomdmoura has quit [Ping timeout: 246 seconds]
<first-time-stude>
Hi all, I have a question regarding my earlier query: Finding longest word in a given string. Can someone walk me through this piece of code and explain how it works? http://rubyfiddle.com/riddles/3af73
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spuk has joined #ruby
CloCkWeRX has joined #ruby
dikaio has joined #ruby
<havenwood>
first-time-stude: Line one begins to define a method #longest_word with a single `sentence` argument that's presumably a String.
Rickmasta has joined #ruby
tomchapin has joined #ruby
etrae has joined #ruby
<first-time-stude>
Okay, I follow so far, Havenwoord
<havenwood>
first-time-stude: Line two sets the `words` local variable to an Array of Strings created from splitting the `sentence` String on spaces.
scripore has quit [Quit: This computer has gone to sleep]
<havenwood>
first-time-stude: At this point the code strays from the idiomatic path.
Guest69039 has quit [Quit: Leaving.]
oetjenj has quit [Ping timeout: 260 seconds]
<first-time-stude>
what does that mean? Does that mean That the code goes against best practice and opts for the more difficult path?
joast has joined #ruby
jordanm has joined #ruby
<havenwood>
first-time-stude: Yeah, it's not the path of perfection. There are technically better ways.
tomchapin has joined #ruby
<havenwood>
first-time-stude: On line four the local variable `longest_word` is initialized as `nil` (itself a sign things may be wonky) which is the same bareword as the `longest_word` method it's inside.
oetjenj has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
fullofcaffeine has joined #ruby
<havenwood>
first-time-stude: In irb or pry try creating a method and instance variable with the same bareword. See which ends up getting called when you make one then the other, restart irb and try the other order.
djcp1 has joined #ruby
mary5030 has joined #ruby
tkuchiki has quit [Ping timeout: 265 seconds]
<first-time-stude>
what do you mean by bareword?
xybre has quit [Quit: oh shit its the fbi]
xybre has joined #ruby
<havenwood>
first-time-stude: Just letters with no sigil in front or anything like that. Both local variables and methods are "barewords."
<havenwood>
first-time-stude: Like `words`, `sentence`, `word_idx` but not `1`, `:example`, `"hi"`, etc.
<first-time-stude>
Ah, I think I understand, barewords have no inherent value within themselves, because they are created on the spot by the user - is this correct?
EllisTAA has quit [Quit: EllisTAA]
<havenwood>
first-time-stude: They're either local variables or methods. Try playing with it in irb or pry.
mistermocha has joined #ruby
<havenwood>
first-time-stude: Have you used irb or pry?
ruurd has joined #ruby
<first-time-stude>
Nope :) My teacher has not set it up for the class
mrconfused has joined #ruby
<first-time-stude>
But I understand what you mean by barewords now
devoldmx has joined #ruby
<first-time-stude>
Atleast, I understand enough for the context of this lesson
<havenwood>
first-time-stude: From your commandline type: irb
l_tonz has quit [Remote host closed the connection]
<havenwood>
first-time-stude: For example a simpler version of that method might read: def longest_word(sentence); sentence.split.max_by(&:size) end
saddad has joined #ruby
sivoais_ is now known as sivoais
sivoais has quit [Changing host]
sivoais has joined #ruby
ruurd has quit [Client Quit]
<first-time-stude>
I typed IRB in my mac's terminal
oetjenj has joined #ruby
<havenwood>
first-time-stude: Try causing an error by just typing: word
mistermocha has quit [Ping timeout: 240 seconds]
parus has quit [Ping timeout: 268 seconds]
fullofcaffeine has quit [Remote host closed the connection]
<first-time-stude>
yes, the error of undefined LocalVariable is my return
<havenwood>
first-time-stude: It should be a NameError.
<havenwood>
Ah, 1.8?
slushdot has joined #ruby
<first-time-stude>
uh
<havenwood>
nevermind
<first-time-stude>
Havenword, I think it might be worth mentioning I dont have Ruby installed on my Mac, does this matter?
<havenwood>
first-time-stude: Now try: def word; 'sekret' ; end
tkuchiki has quit [Ping timeout: 260 seconds]
<xybre>
It comes pre-installed usually
<capin>
yup
<havenwood>
first-time-stude: (Hit return for a newline in place of the semicolons.)
<slushdot>
Hello. FUCK ALL SPICS, NIGGERS, JEWS, CHRISTIANS, SAND NIGGERS, DUNE COONS, KIKES, CHINKS, WETBACKS, FAGS, DYKES, AND PEOPLE WHO LIKE PEACH ICE CREAM, JOIN #WEB FOR FREE OPS AND TELL THEM EMERSON SENT YOU. FREE GAY MIDGET PORN!!!!!!!!!!!!!!!!!!
blue_deref has quit [Quit: Taking myself out of hear.]
<havenwood>
first-time-stude: So the local variable `word` stomped on the method `word`.
<havenwood>
first-time-stude: Now again try: def word; 'trying'; end
tkuchiki_ has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
first-time-stude: And one more time check: word
<first-time-stude>
a local variable
<first-time-stude>
is the return^
<havenwood>
first-time-stude: So if there's a local variable and a method of the same name, the local variable wins.
<first-time-stude>
I see
oetjenj has quit [Ping timeout: 256 seconds]
<havenwood>
first-time-stude: So it's confusing to have both local variables and methods with the same name.
bryanray has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Ping timeout: 252 seconds]
<havenwood>
first-time-stude: And if neither is defined but you try it it'll raise an error.
<first-time-stude>
Havenwood, if I may interject - are you basically informing me to caution against using similar words in defining methods/variables?
cwong_on_irc has joined #ruby
<havenwood>
first-time-stude: Yup, exactly.
djcp1 has joined #ruby
djcp1 has quit [Client Quit]
oetjenj has joined #ruby
<first-time-stude>
I see, you must understand that my teacher is trying to Mr.Miyagi us and have us to Wax on Wax off in Ruby until we can write small scale code the hard/long way first before we learn better techniques
<first-time-stude>
tldr; its a pain in the ass, but who am I to complain
tkuchiki_ has quit [Ping timeout: 260 seconds]
novtopro has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mrconfused has left #ruby [#ruby]
<havenwood>
first-time-stude: The last line of the method implicitly returns so you should drop the `return` and just have `longest_word` on the last line.
diegoaguilar has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
<havenwood>
first-time-stude: The last evaluated statement of the method will be its return value if there isn't an early return.
Kara has joined #ruby
mistermocha has joined #ruby
<first-time-stude>
I understand this part, yes, but this code was written by my teacher - so I must live with it lol
<havenwood>
first-time-stude: Koans are good. Meditate on code to reach enlightenment!
moredhel has left #ruby ["undefined"]
fullofcaffeine has quit [Remote host closed the connection]
<havenwood>
first-time-stude: aha
bruno- has joined #ruby
oetjenj has quit [Ping timeout: 246 seconds]
<first-time-stude>
But Havenwood, I believe my problem of undertanding lies in specifically Lines 8-13 of my teacher's code
<havenwood>
first-time-stude: You may enjoy going through the Ruby Koans to learn some Ruby while also learning testing: http://rubykoans.com
fullofcaffeine has joined #ruby
<first-time-stude>
Do you think you can explain this to me?
<havenwood>
first-time-stude: Strings have indexes starting at zero for the first character.
podman has quit [Quit: Connection closed for inactivity]
<havenwood>
first-time-stude: `word` is a String so line eight sets the local variable `current_word` to the `word_idx` (Integer) index of `words` (String).
jessemcgilallen has quit [Ping timeout: 240 seconds]
skcin7 has joined #ruby
skcin7 has quit [Client Quit]
<first-time-stude>
Okay, I understand both of your concepts
yo61 has joined #ruby
oetjenj has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
<havenwood>
first-time-stude: So the `word_idx` starts at `0` and sets `current_word` to the first element of the `words` Array.
<havenwood>
first-time-stude: So the local variable `current_word` is the first word on the first iteration of the Array.
bryanray has joined #ruby
novtopro has quit [Quit: Leaving.]
<havenwood>
first-time-stude: The `longest_word` starts out as `nil` as per line four.
ItSANgo has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 246 seconds]
Rickmasta has joined #ruby
ItSANgo has joined #ruby
<havenwood>
first-time-stude: So on the first iteration the `longest_word` will always be `nil` and the if statement will set `longest_word` to now be `current_word`.
GriffinHeart has joined #ruby
diegoaguilar has joined #ruby
<first-time-stude>
Ok
<havenwood>
first-time-stude: On subsequent iterations it wont be `nil` anymore so the `elsif` clause will check if it's longer than the current word.
<havenwood>
first-time-stude: If so, it'll replace the old `longest_word` with the `current_word`.
jmhmccr has joined #ruby
<first-time-stude>
Okay, I have understood what you have said so far
<havenwood>
first-time-stude: Then line sixteen increments the index counter to manually move onto the next iteration.
lacrosse has joined #ruby
boxrick1 has joined #ruby
<first-time-stude>
so how does this code compare the lengths of specific words against other words in the array?
<havenwood>
first-time-stude: It'll go back to the `while word_idx < words.length` and if the newly +1ed `word_idx` is now >= `words.length` it'll break.
GriffinHeart has quit [Remote host closed the connection]
<havenwood>
first-time-stude: It's an awkward way to manually start at index zero of the Array and iterate until the last element is reached.
<havenwood>
first-time-stude: If it's the first iteration it sets longest_word to current_word. Otherwise it updates longest_word only if the current_word is longer than the previous longest_word.
GriffinHeart has joined #ruby
psy has quit [Ping timeout: 264 seconds]
fedexo has joined #ruby
psy has joined #ruby
zenguy_pc has quit [Ping timeout: 272 seconds]
l_tonz has joined #ruby
Guest86745 has joined #ruby
oetjenj has quit [Ping timeout: 260 seconds]
ELLIOTTCABLE has joined #ruby
preyalone has joined #ruby
mary5030 has quit [Remote host closed the connection]
krzkrz has joined #ruby
mary5030 has joined #ruby
oetjenj has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
<first-time-stude>
wait a minute, I think I understand this now
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
<first-time-stude>
it loops through the array and compares the length of the current word against the longest word
tkuchiki has joined #ruby
Heero has joined #ruby
arup_r has joined #ruby
keyvan has joined #ruby
joaomdmoura has joined #ruby
im0b has joined #ruby
nateberkopec has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
pcfreak30 has joined #ruby
user083 has joined #ruby
<pcfreak30>
Novice question. is there a reason to use a module over a class for static methods? I know a module inherits a class.
GriffinHeart has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
Spami has joined #ruby
A124 has quit [Read error: No route to host]
devbug__ has joined #ruby
devbug has quit [Ping timeout: 256 seconds]
LMity has quit [Ping timeout: 260 seconds]
devbug_ has quit [Ping timeout: 268 seconds]
darkf has joined #ruby
darkf has quit [Changing host]
darkf has joined #ruby
oetjenj has joined #ruby
Soda has quit [Remote host closed the connection]
Renich has quit [Quit: Lost terminal]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mloy has joined #ruby
favadi has joined #ruby
nettoweb has joined #ruby
favadi has quit [Client Quit]
gsingh93 has quit [Ping timeout: 240 seconds]
cemez has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
G has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gsingh93 has joined #ruby
nettoweb has quit [Client Quit]
ramfjord has quit [Ping timeout: 240 seconds]
htmldrum has joined #ruby
davidcelis has quit [Ping timeout: 240 seconds]
lorn_ has quit [Ping timeout: 240 seconds]
oetjenj has quit [Ping timeout: 260 seconds]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
lorn has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
bruno- has joined #ruby
htmldrum has quit [Ping timeout: 256 seconds]
iateadonut has joined #ruby
oetjenj has joined #ruby
teotwaki has quit [Ping timeout: 246 seconds]
soloone has quit [Ping timeout: 240 seconds]
ammar has quit [Ping timeout: 246 seconds]
ammar has joined #ruby
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Takumo has quit [Ping timeout: 246 seconds]
leslie has quit [Ping timeout: 246 seconds]
iooner has quit [Ping timeout: 246 seconds]
leslie has joined #ruby
leslie has quit [Changing host]
leslie has joined #ruby
soloone has joined #ruby
iooner has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
teotwaki has joined #ruby
tflat has joined #ruby
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
Rodya_ has joined #ruby
Rodya_ has quit [Client Quit]
djbkd has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
krz has quit [Read error: Connection reset by peer]
zenguy_pc has quit [Ping timeout: 272 seconds]
mloy has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 250 seconds]
oetjenj has quit [Ping timeout: 272 seconds]
finisherr has quit [Quit: finisherr]
gizmore has joined #ruby
maletor has joined #ruby
Zamyatin has joined #ruby
tkuchiki has quit [Remote host closed the connection]
joufflu has quit [Ping timeout: 252 seconds]
diegoaguilar has quit [Remote host closed the connection]
oetjenj has joined #ruby
<Nilium>
I think I've spent too long doing PHP maintenance and not enough time writing stuff that goes really fast
arup_r has quit [Quit: Leaving]
htmldrum has joined #ruby
lkba has joined #ruby
Dopagod has joined #ruby
jun__ has joined #ruby
lkba_ has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
zenguy_pc has joined #ruby
rrichardsr3 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
saddad has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
oetjenj has quit [Ping timeout: 260 seconds]
duncannz has joined #ruby
GriffinHeart has joined #ruby
failshell has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
iamjarvo_ has quit [Quit: Computer has gone to sleep.]
failshell has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
oetjenj has joined #ruby
tenderlove has joined #ruby
havenn has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
freerobby1 has joined #ruby
houhoulis has quit [Remote host closed the connection]
patdoher_ has joined #ruby
patdohere has quit [Read error: Connection reset by peer]
haraoka has joined #ruby
tkuchiki has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
krz has joined #ruby
WizJin has quit [Excess Flood]
ledestin has quit [Read error: Connection reset by peer]
WizJin has joined #ruby
ledestin has joined #ruby
l_tonz has quit [Read error: Connection reset by peer]
l_tonz has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
cmoneylu_ has joined #ruby
oetjenj has quit [Ping timeout: 272 seconds]
astrobun_ has joined #ruby
SylarRuby has joined #ruby
tkuchiki has quit [Remote host closed the connection]
oetjenj has joined #ruby
G has quit [Quit: leaving]
maletor has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
G has joined #ruby
speakingcode has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
GriffinHeart has joined #ruby
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fullofcaffeine has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SylarRuby has quit []
bruno- has quit [Ping timeout: 260 seconds]
favadi has joined #ruby
iamjarvo_ has joined #ruby
cmoneylu_ has quit [Remote host closed the connection]
patdoher_ is now known as patdohere_afk
iamjarvo_ has quit [Client Quit]
speakingcode has joined #ruby
khebbie has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
patdohere_afk is now known as patdoher_
oetjenj has quit [Ping timeout: 260 seconds]
freerobby1 has quit [Quit: Leaving.]
speakingcode has quit [Ping timeout: 240 seconds]
patdoher_ has quit [Read error: Connection reset by peer]
oetjenj has joined #ruby
rrichardsr3 has quit [Quit: The road to hell is paved with good intentions...]
grekkos has joined #ruby
moonman has joined #ruby
<grekkos>
not sure if this is the best place to ask btu I'm trying to troubleshoot my jekyll install, it's failing to load a plugin for some reason. It does a require with the full path to the file but I get a LoadError and I don't know why
tenderlove has quit [Read error: Connection reset by peer]
speakingcode has joined #ruby
patdohere has joined #ruby
krz has quit [Quit: WeeChat 1.2]
tenderlove has joined #ruby
<grekkos>
if I output the file it's trying to require, it's pointing to the right path and everything
arescorpio has quit [Quit: Leaving.]
l_tonz has quit [Remote host closed the connection]
patdohere has quit [Read error: Connection reset by peer]
unreal has joined #ruby
bb010g has joined #ruby
peteykun has joined #ruby
fullofcaffeine has quit [Ping timeout: 260 seconds]
deg_ has joined #ruby
Guest45706 has quit [Ping timeout: 240 seconds]
GriffinHeart has quit [Remote host closed the connection]
psy_ has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
etrae has joined #ruby
dhjondoh has joined #ruby
Cyther_ has quit [Read error: Connection reset by peer]
awrfas2 has quit [Ping timeout: 250 seconds]
oetjenj has quit [Ping timeout: 260 seconds]
l_tonz has joined #ruby
jessemcgilallen has quit [Ping timeout: 256 seconds]
oetjenj has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<BraddPitt>
can you paste the error and some relevant code, grekkos ?
last_staff has joined #ruby
stardiviner has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
patdohere has joined #ruby
fullofcaffeine has joined #ruby
devoldmx has joined #ruby
jenrzzz has joined #ruby
ruurd has joined #ruby
hanmac has quit [Ping timeout: 240 seconds]
hanmac has joined #ruby
ruurd has quit [Client Quit]
oetjenj has quit [Ping timeout: 260 seconds]
fullofcaffeine has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
jackjackdripper has joined #ruby
RobertBirnie has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Client Quit]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duoi has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
low-prof1 has joined #ruby
conrfrmn has joined #ruby
chussenot has joined #ruby
trautwein has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
oetjenj has joined #ruby
duncannz has quit [Remote host closed the connection]
tagrudev has joined #ruby
GriffinHeart has joined #ruby
duoi has joined #ruby
patdohere has quit [Ping timeout: 250 seconds]
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
Renich has joined #ruby
User458764 has joined #ruby
moonman has quit [Quit: Page closed]
chussenot has quit [Quit: chussenot]
maletor has quit [Quit: Computer has gone to sleep.]
akkad has quit [Excess Flood]
khebbie has joined #ruby
Dopagod has quit [Ping timeout: 250 seconds]
sanjayu has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aganov has joined #ruby
oetjenj has quit [Ping timeout: 260 seconds]
akkad has joined #ruby
oetjenj has joined #ruby
khebbie has quit [Ping timeout: 264 seconds]
fullofcaffeine has joined #ruby
zenguy_pc has quit [Ping timeout: 268 seconds]
ramfjord has joined #ruby
codecop has joined #ruby
Renich has quit [Quit: leaving]
jun__ has quit [Remote host closed the connection]
<certainty>
moin
astrobun_ has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
meowz has joined #ruby
tesuji has joined #ruby
Pupp3tm4st3r has joined #ruby
bMalum has joined #ruby
<baweaver>
Interesting problem I just remembered
<baweaver>
Given multiple lines, turn their text into columns
magicalunicorn has joined #ruby
aibot has joined #ruby
<baweaver>
make a variant for left, center, and right alignment
* baweaver
is futzing with the idea in pry right now.
oetjenj has quit [Ping timeout: 260 seconds]
<baweaver>
given the string: "abc de fg\nawef feawfwef fefew\nawf efwaf fewfwewfe \nfewafe fef efefaew\nfewafe fewaf aefwf\n"
shoutsid has joined #ruby
tubuliferous has joined #ruby
<baweaver>
adjust the spacing to align the words
<baweaver>
left alignment for now
* baweaver
goes back to pry
spuk has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
shoutsid has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
Bloodshot has joined #ruby
oetjenj has joined #ruby
devbug__ has quit [Read error: Connection reset by peer]
Bloodshot has quit [Client Quit]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
psy_ has quit [Ping timeout: 246 seconds]
shoutsid has joined #ruby
shoutsid has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
oetjenj has quit [Ping timeout: 260 seconds]
Oog has joined #ruby
bruno- has joined #ruby
failshell has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
chipotle has joined #ruby
eGGsha has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
diegoaguilar has joined #ruby
favadi has quit [Ping timeout: 246 seconds]
swgillespie[GT] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Guest84489>
Then I have re = Regexp.new(map.keys.map { |x| Regexp.escape(x) }.join('|'))
<Guest84489>
And then I call it here re = Regexp.new(map.keys.map { |x| Regexp.escape(x) }.join('|'))
JohnBat26 has joined #ruby
<Guest84489>
the problem is, it's taking everything that is blablan*nil*blah and making it NULL... I want it just to take a line that only has nil not words before or after it
<TomyWork>
you pasted the same line twice, Guest84489
Alina-malina has quit [Ping timeout: 250 seconds]
uber has quit [Ping timeout: 240 seconds]
<TomyWork>
also you might want to pick a more memorable nickname :)
<Guest84489>
TomyWork: sorry.. I call it here sqlFile.write (GenerateSQLInsert(csvFile,eachRow).gsub(re, map))
<Guest84489>
oh, my session expired
mark2 has joined #ruby
peteykun has quit [Ping timeout: 250 seconds]
Guest84489 is now known as awk
fullofcaffeine has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
SylarRuby has quit []
<TomyWork>
awk oh you're the guy who's doing sql the hard, injection-prone way
<TomyWork>
just use a framework
<awk>
TomyWork: give me a break , im a noob at ruby
<awk>
im trrying and took your advice, I re-did all my code the way you advised
radgeRayden has joined #ruby
<awk>
using CSV.parse, etc... and match key -> value with hashes
<TomyWork>
might work similarly for other databases
etrae has quit [Ping timeout: 240 seconds]
<awk>
got it working thanks
dhjondoh has quit [Quit: dhjondoh]
Alina-malina has joined #ruby
<awk>
TomyWork: I'm going to go through that in my ruby book, because i see it's going to save me allot of time.. im using to much of a 'bash' mentality when using ruby and thats my downfall.. thats why I re-wrote it using the CSV gem and GoogleDrive gem
lea has joined #ruby
shoutsid has quit [Remote host closed the connection]
<TomyWork>
think of prepared statements as the equivalent of the quote-every-expansion rule then :)
timonv has joined #ruby
grekkos has quit [Ping timeout: 260 seconds]
dhjondoh has joined #ruby
uber has joined #ruby
shoutsid has joined #ruby
lsmola_ has joined #ruby
jas02 has quit [Ping timeout: 252 seconds]
djbkd has quit [Quit: My people need me...]
bruno- has joined #ruby
firstdayonthejob has quit [Ping timeout: 252 seconds]
dhjondoh has quit [Client Quit]
jas02 has joined #ruby
shoutsid has quit [Ping timeout: 255 seconds]
GriffinHeart has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 268 seconds]
fullofcaffeine has joined #ruby
krz has joined #ruby
zenguy_pc has quit [Ping timeout: 272 seconds]
Kara has joined #ruby
<waxjar>
does anyone know a good way of sharing a folder of configuration files between different rack deployments? i'd like to deploy config changes separate from application code changes. config changes apply to multiple rack apps, so i'd like to be able to deploy them to all apps at once, but it should also be possible to deploy them to a subset them
dmolina has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
Kara_ has joined #ruby
yeshacker has joined #ruby
<bougyman>
waxjar: puppet or chef.
doddok has joined #ruby
krisquigley has joined #ruby
Sembei has joined #ruby
rushed has quit [Quit: rushed]
BSaboia has joined #ruby
astrobun_ has quit [Remote host closed the connection]
rushed has joined #ruby
grn has quit []
BSaboia has quit [Read error: Connection reset by peer]
joncol has joined #ruby
Voker57 has joined #ruby
<joncol>
How would I test (using rspec) that a method m in module M calls a method n in the same module M? I want to mock the method n, and just test that the method m does what it should.
ifmy has joined #ruby
tkuchiki has joined #ruby
lenwood has quit [Remote host closed the connection]
<certainty>
alternatively: before { allow(M).to receive(:n) }; it "works" { M.m; expect(M).to have_received(:n) }
mdih has joined #ruby
kimegede has joined #ruby
chthon has joined #ruby
wpp has joined #ruby
Kendos-Kenlen has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
ChampS_ has joined #ruby
MrDSmith has left #ruby ["Leaving"]
<ChampS_>
jhass: good morning, I imploded and removed my .rvm dir from Ben home directory and installed it in another users homedir. But when I wanna use this command "passenger-install-apache2-module" as that other user, it returns /usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find passenger. As User Ben it will work, but I stopped it.
nofxx has quit [Read error: Connection reset by peer]
failshell has joined #ruby
awrfas2 has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Read error: Connection reset by peer]
etrae has joined #ruby
krz has quit [Ping timeout: 268 seconds]
RobertBirnie has joined #ruby
djbkd has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
failshell has quit [Ping timeout: 252 seconds]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
XxionxX has quit [Ping timeout: 240 seconds]
krz has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
miskatonic has joined #ruby
last_staff has quit [Quit: last_staff]
tkuchiki has quit [Remote host closed the connection]
DEA7TH has joined #ruby
<EdwardIII>
hey if you wanted to say do 3 tasks at the same time (e.g. 3 slow http calls) then aggregate all the results to display them what would be the right tool for that? Background worker?
<EdwardIII>
in python i'd probably use celery
blaxter has joined #ruby
marr has joined #ruby
<EdwardIII>
also i use rails - not sure if that has anything builtin for this
User458764 has joined #ruby
baweaver has quit [Remote host closed the connection]
dikaio has quit [Quit: ........]
<miskatonic>
is there a canonical way to implement stacked hashes in ruby?
<joncol>
certainty: thanks. It didn't work in my case. I'm trying to test some EventMachine stuff. Specifically I want to test that send_datagram is called by my receive_data method when it gets certain data. But I get the error that "PingServer does not implement: send_datagram", where PingServer is my module m.
<EdwardIII>
maybe EventMachine would be the right choice for me actually? although that mostly seems to be to do with async network stuff rather than just firing off things into an eventloop...
chipotle has joined #ruby
leafybas_ has quit [Remote host closed the connection]
lamer14449036960 has quit [Read error: Connection reset by peer]
lamer14449848587 has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
beast has quit [Quit: Leaving]
Kendos-Kenlen has joined #ruby
UtkarshRay has joined #ruby
<certainty>
joncol: what kind of method is that in your module? Can you gist what you did?
tkuchiki has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Alina-malina has quit [Ping timeout: 250 seconds]
Guest40665 has quit [Ping timeout: 240 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
diegoaguilar has quit [Remote host closed the connection]
BSaboia has joined #ruby
shredding has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
psy_ has joined #ruby
lessless has joined #ruby
<certainty>
joncol: if you want to test the methods like this you have to include the module into a class and run the expectations on the class. If the methods make sense on their own, you can make them module_functions and have your expectations as I showed
kalz has quit [Quit: exit]
bMalum has quit [Quit: bMalum]
<joncol>
certainty: Cool, I have to read up on module_function. Long time since Ruby.
kalzz has joined #ruby
fullofcaffeine has quit [Ping timeout: 260 seconds]
<EdwardIII>
but i want to be able to do multiple requests for sort of... anything, like i can in js or with celery
bruno- has quit [Ping timeout: 240 seconds]
<EdwardIII>
not necessarily just http requests
duncannz has quit [Remote host closed the connection]
<joncol>
certainty: still not sure about how to test the EventMachine stuff. The problem is that send_datagram is not a member of my module, it is part of EventMachine::Connection, which dynamically mixes in my module. So how could I set up mock expectations for send_datagram to be called?
astrobun_ has quit [Remote host closed the connection]
vigintas has quit [Client Quit]
vigintas has joined #ruby
Hounddog has joined #ruby
<Porfa>
this never happened to me before.. i can't put the contents of a var, but the var name instead
fullofcaffeine has joined #ruby
vigintas has quit [Client Quit]
vigintas has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grekkos has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
platzhirsch has joined #ruby
_Archyme_ has joined #ruby
Archyme_ has quit [Ping timeout: 246 seconds]
GriffinHeart has quit [Remote host closed the connection]
haxrbyte has joined #ruby
nettoweb has joined #ruby
dawkirst has joined #ruby
RobertBirnie has joined #ruby
Kara_ has quit [Ping timeout: 240 seconds]
Kara has quit [Ping timeout: 240 seconds]
quazimodo has joined #ruby
dawkirst has quit [Client Quit]
Kara has joined #ruby
haxrbyte_ has quit [Ping timeout: 240 seconds]
Kara_ has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest75348
haxrbyte has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Ping timeout: 260 seconds]
Guest75348 has quit [Ping timeout: 256 seconds]
chipotle has quit [Max SendQ exceeded]
GriffinHeart has joined #ruby
bruno-_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<EdwardIII>
ah i think i have two versions installed: eventmachine (1.0.8, 1.0.4) heh how the hell did that happen
varunwachaspati has joined #ruby
<EdwardIII>
hmm ok down to 1 version but still seeing the error
khebbie has joined #ruby
lessless has quit [Ping timeout: 260 seconds]
Kara_ has quit [Ping timeout: 246 seconds]
Kara has quit [Ping timeout: 246 seconds]
htmldrum has joined #ruby
chipotle has joined #ruby
User458764 has joined #ruby
zenguy_pc has quit [Ping timeout: 256 seconds]
Igorshp has joined #ruby
Porfa has quit [Quit: Porfa]
GriffinHeart has quit [Remote host closed the connection]
<workmad3>
EdwardIII: that would probably be because MultiRequest comes from the em-http-request gem, which you will need to install & require
GriffinHeart has joined #ruby
workmad3 has quit [Quit: Reconnecting]
Porfa has joined #ruby
workmad3 has joined #ruby
<ChampS_>
I have a user Ben and a user Ruby, as the name describes, the ruby user is for my ruby installation. In my ruby users home dir now I have a .rvm and a .gem directory. So I installed rvm for this user. Now I tried this: passenger-install-apache2-module with my ruby user, but an error appears /usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find passenger (>= 0). But I've
<ChampS_>
installed ruby-passenger with apt-get. With my user Ben, I can execute this command without any problem
nettoweb has quit [Ping timeout: 244 seconds]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
Porfa has quit [Read error: Connection reset by peer]
Porfa has joined #ruby
Porfa has quit [Read error: Connection reset by peer]
Porfa has joined #ruby
Kara has joined #ruby
Kara_ has joined #ruby
rdark has joined #ruby
rdark has joined #ruby
bruno-_ has quit [Ping timeout: 244 seconds]
zenguy_pc has joined #ruby
nfk|laptop has quit [Quit: yawn]
User458764 has quit [Ping timeout: 244 seconds]
Kara__ has joined #ruby
Kara___ has joined #ruby
Alina-malina has joined #ruby
Kara__ has quit [Remote host closed the connection]
Kara_ has quit [Ping timeout: 246 seconds]
Kara has quit [Ping timeout: 246 seconds]
Kara___ has quit [Ping timeout: 240 seconds]
Rickmasta has joined #ruby
Rollabunna has joined #ruby
cdg has joined #ruby
Kara_ has joined #ruby
Kara has joined #ruby
joncol has joined #ruby
fullofca_ has quit [Ping timeout: 260 seconds]
adac has quit [Ping timeout: 240 seconds]
failshell has joined #ruby
tubuliferous has joined #ruby
subscope has quit [Ping timeout: 244 seconds]
tmtwd has joined #ruby
fullofcaffeine has joined #ruby
khebbie has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
tubuliferous has quit [Ping timeout: 246 seconds]
failshell has quit [Ping timeout: 268 seconds]
dEPy has joined #ruby
bkxd has joined #ruby
joonty has quit [Quit: joonty]
_Archyme_ has quit [Read error: Connection reset by peer]
<shevy>
ChampS_ yeah you use more than one ruby version so problems appear
<EdwardIII>
workmad3: damn
chipotle has quit [Quit: cheerio]
<darix>
ChampS_: if i recall correctly you dont need to have passenger in your gemfile
<workmad3>
EdwardIII: you don't want to install another gem? :)
<EdwardIII>
workmad3: no, i love installing gems. more in reference to the fact i didn't realise that it was a separate module
<workmad3>
hehe :)
User458764 has joined #ruby
phutchins has joined #ruby
<EdwardIII>
back after playing a bit more i'm starting to think that something like Sidekiq might be better than just EventMachine if i want to execute anything async and get a result rather than just, saw, bare http requests
stardiviner has joined #ruby
<nofxx>
EdwardIII, sidekiq is almost better than a toaster. Really can't tell which one I could live w/o.
Feyn has quit [Quit: Leaving]
<nofxx>
toaster is the second greatest invetion of mankind, follow by sliced bread*
<EdwardIII>
you're referring to the mechanical toaster rather than the ruby lib 'toaster' right?
<nofxx>
yup
<EdwardIII>
just looking with someone here about doing a little social network aggregator thing for giggles
<EdwardIII>
and didn't want it to slow down with each new network it queries
<nofxx>
that quote is nice, just wanted to say sidekiq rocks. Btw, I prefer italian bread, slice and toast... hmm. olive oil or cheese. hehe
<EdwardIII>
heh sorry which quote?
<nofxx>
EdwardIII, scale horizontally easily with sidekiq... you're db will be the bottleneck quickly
<nofxx>
EdwardIII, toaster second great invention followed by sliced bread
<shevy>
lol
<miskatonic>
sliced arrays?
joonty has joined #ruby
<dEPy>
Are there any examples of really good object oriented ruby code?
kristofferR has joined #ruby
quazimodo has quit [Ping timeout: 256 seconds]
soc42 has quit [Read error: Connection reset by peer]
<dEPy>
Something beyond a trivial app.
<shevy>
everywhere
<EdwardIII>
it's all on github you can look at rails eh?
<shevy>
look at the source code of rack
<ChampS_>
shevy: right, but for rvm this should be no problem I think
<miskatonic>
is rexml really good object oriented code?
<shevy>
the above output looks like debian-gem output
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
nofxx has quit [Ping timeout: 246 seconds]
<ChampS_>
I try to uninstall the debian ruby package
<ChampS_>
lets see whats happens
failshell has joined #ruby
rodfersou has joined #ruby
mikecmpbll has quit [Quit: ciao.]
fullofcaffeine has quit [Ping timeout: 260 seconds]
Igorshp has quit [Remote host closed the connection]
grekkos has quit [Ping timeout: 272 seconds]
ndrei has joined #ruby
cdg has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
rushed has joined #ruby
Kara_ has quit [Remote host closed the connection]
Kara_ has joined #ruby
bMalum_ has quit [Quit: bMalum_]
Igorshp has joined #ruby
adac has joined #ruby
bMalum has joined #ruby
dEPy has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dhjondoh has quit [Quit: dhjondoh]
tenderlove has quit [Ping timeout: 255 seconds]
dhjondoh has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 268 seconds]
paolochiodi has joined #ruby
lsmola_ has quit [Ping timeout: 246 seconds]
stamina has joined #ruby
subscope has joined #ruby
GriffinHeart has joined #ruby
hanmac has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
<paolochiodi>
Hi, does already exist a gem that can concat Enumerables? So that when I dot concatenated.next it will return me elements from the first until it's empty then return from the second?
<paolochiodi>
this could be useful for lazy enumerables
dhjondoh has quit [Client Quit]
shredding has quit [Ping timeout: 252 seconds]
GnuYawk has quit [Ping timeout: 240 seconds]
gregoriokusowski has joined #ruby
dhjondoh has joined #ruby
dhjondoh has quit [Client Quit]
Xzanron has joined #ruby
GriffinHeart has quit [Ping timeout: 246 seconds]
miskatonic has quit [Quit: miskatonic]
Igorshp has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
devoldmx has quit [Remote host closed the connection]
deps has joined #ruby
karapetyan has joined #ruby
devoldmx has joined #ruby
Rickmasta has joined #ruby
etrae has joined #ruby
Igorshp has joined #ruby
Voker57 has quit [Remote host closed the connection]
awrfas2 has quit [Ping timeout: 240 seconds]
khebbie has joined #ruby
Pupp3tm4st3r has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 265 seconds]
karapetyan has joined #ruby
big|bad|wolf has joined #ruby
<jhass>
ChampS_: you did gem install passenger inside your new RVM environment? again check rvm current to make sure it's active
dmolina has quit [Quit: Leaving.]
crdpink has quit [Quit: q term]
User458764 has joined #ruby
senayar has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
patrick_star has joined #ruby
peteykun has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
gregf has joined #ruby
YaknotiS has joined #ruby
WizJin has joined #ruby
jenrzzz has joined #ruby
ifmy has quit [Quit: Page closed]
Kara_ has quit [Remote host closed the connection]
dionysus69 has joined #ruby
paolochiodi has quit [Quit: paolochiodi]
psy_ has quit [Ping timeout: 260 seconds]
fedexo has joined #ruby
teclator has joined #ruby
lxsameer has joined #ruby
prestorium_ has joined #ruby
Kara has quit [Ping timeout: 246 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atmosx has quit [Quit: Lost in trance]
n008f4g_ has joined #ruby
pvac has quit [Quit: Leaving]
Bellthoven has joined #ruby
karapetyan has quit [Remote host closed the connection]
V1s1ble has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
<EdwardIII>
tbh as none of the languages i've used really support threading (other than a bit of C# back in the day) it's kind of a foreign concept to me
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<EdwardIII>
i see stuff like "requires thread-safety of your code and all dependencies." and i'm like... how big an issue is that for me?
Icey has joined #ruby
beauby has joined #ruby
Kara has joined #ruby
riotjone_ has joined #ruby
Kara_ has joined #ruby
tomaz_b has joined #ruby
Guest67473 is now known as b3nt_pin
b3nt_pin is now known as beagles
krisquigley has quit [Remote host closed the connection]
riotjon__ has quit [Ping timeout: 272 seconds]
zenguy_pc has quit [Ping timeout: 268 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
Kendos-Kenlen has quit [Quit: Konversation terminated!]
Kara_ has quit [Remote host closed the connection]
supergeek has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kara__ has joined #ruby
Kara_ has joined #ruby
Kara has quit [Read error: No route to host]
Coldblackice has quit [Ping timeout: 260 seconds]
Kendos-Kenlen has joined #ruby
senayar has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
V1s1ble has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
krisquigley has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
naftilos76 has joined #ruby
tvw has joined #ruby
beauby has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kara has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 268 seconds]
fullofcaffeine has quit [Ping timeout: 260 seconds]
joncol has quit [Quit: leaving]
Igorshp has joined #ruby
htmldrum has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
big|bad|wolf has joined #ruby
sgambino has joined #ruby
Kara has joined #ruby
Zackio has joined #ruby
nateberkopec has quit [Client Quit]
big|bad|wolf has quit [Client Quit]
fullofcaffeine has joined #ruby
khebbie has joined #ruby
htmldrum has quit [Ping timeout: 246 seconds]
<odigity>
It's great that we have structured metadata formats like RDoc and gemspec that makes awesome tools like rubygems.org and rdoc.info possible. I'm surprised there's not yet one for Changelogs. Would love to make a dashboard that shows me changes across all my gems in the last week/month/etc
workmad3 has quit [Quit: Lost terminal]
Igorshp has quit [Remote host closed the connection]
<EdwardIII>
unless you get their non-foss pro thing that includes 'batches'
<EdwardIII>
and it kinda looks like you can't do that with resque either, seems more like a normal message queue
jessemcgilallen has joined #ruby
c0m0 has joined #ruby
nateberkopec has joined #ruby
Bellthoven has quit []
segfalt has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
ndrei has quit [Ping timeout: 250 seconds]
V1s1ble has quit [Ping timeout: 260 seconds]
`tim` has joined #ruby
karapetyan has quit [Remote host closed the connection]
Kendos-Kenlen has joined #ruby
subscope has joined #ruby
workmad3 has joined #ruby
Kara has quit [Remote host closed the connection]
segfalt_ has joined #ruby
Kendos-Kenlen has quit [Remote host closed the connection]
blackjid has quit [Max SendQ exceeded]
prefixed has joined #ruby
blackjid has joined #ruby
segfalt has quit [Ping timeout: 260 seconds]
segfalt_ is now known as segfalt
Kara has joined #ruby
solocshaw has joined #ruby
Kendos-Kenlen has joined #ruby
Encapsulation has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 255 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
peteykun has joined #ruby
atomical has joined #ruby
JohnBat26 has joined #ruby
`tim` has joined #ruby
`tim` has quit [Client Quit]
Kara has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Igorshp has joined #ruby
Gnomethrower has quit [Ping timeout: 240 seconds]
Kara has joined #ruby
khebbie has quit [Ping timeout: 256 seconds]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
Zamyatin has joined #ruby
tk__ has joined #ruby
naftilos76 has quit [Ping timeout: 246 seconds]
Porfa_ has joined #ruby
Porfa has quit [Read error: Connection reset by peer]
Porfa_ is now known as Porfa
grekkos has joined #ruby
Encapsulation has joined #ruby
Porfa has quit [Client Quit]
haylon has joined #ruby
Kendos-Kenlen has quit [Remote host closed the connection]
Zackio has quit [Remote host closed the connection]
mdih has quit [Remote host closed the connection]
sanjayu has quit [Ping timeout: 240 seconds]
Zamyatin has quit [Ping timeout: 268 seconds]
<EdwardIII>
ah actually it looks like i might be able to use sidekiq along with this lib that turns the jobs (tasks? threads? workers?) into promises: https://github.com/jamesotron/sidekiq-promise
JohnBat26 has quit [Remote host closed the connection]
fullofcaffeine has quit [Ping timeout: 260 seconds]
<ruboto_>
jhass # => "505050505555050027411682610093162639191707102445083998136999255337586664724449168995470686397553704 ...check link for more (https://eval.in/452060)
roshanavand has joined #ruby
<bigmac_>
god you are amazing
<ChampS_>
jhass: sry I didn't know that I can install passenger with gem itself. But now I have and this works fine except that apache can't start because it can't handle RailsEnv and several properties I defined in my sites-available apache config
<adaedra>
jhass is a god? :o
<jhass>
adaedra: only a pope, some people can't tell the difference
<adaedra>
:')
<jhass>
ChampS_: that doesn't sound like you have passenger loaded
momomomomo has joined #ruby
dopamean_ has quit [Ping timeout: 268 seconds]
<ChampS_>
used gem install passenger and then passenger-install-apache2-module
<bigmac_>
"%d" % 5.0505050555505e+245
<ChampS_>
both was running successfully
<bigmac_>
can this be explained with basic math terms?
favadi has quit [Client Quit]
<jhass>
bigmac_: "explained"?
<bigmac_>
"%d" => not sure what this is and why its in quote
<jhass>
ennn means * 10 to the power of nnn
AnoHito_ has joined #ruby
<bigmac_>
i see
<jhass>
and that's basically just moving the . to the right by nnn places
<jhass>
bigmac_: ^ so it's just a Float, IEEEIcanneverrememberthenumber precision issues apply
<moss>
I am thinking of switching my Rails server from Unicorn to Puma. Do I need to make any code changes to have this work properly or is it just a matter of deployment?
stannard has joined #ruby
k3asd` has quit [Remote host closed the connection]
<bigmac_>
jhass: so, if im looking to perform this large math and want precise results, its best to use something like bigdecimal ?
tagrudev has quit [Remote host closed the connection]
<jhass>
?rails moss
<ruboto_>
moss, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
zenguy_pc has quit [Ping timeout: 272 seconds]
s2013 has joined #ruby
<jhass>
bigmac_: yeah
sankaber has quit [Remote host closed the connection]
AnoHito_ has quit [Read error: Connection reset by peer]
<davethecat>
Can anyone please help? When i use .reverse_each method i have no problem, but when i change it to .each i get error "undefined method `source_key' for nil:NilClass"
freezevee has quit [Remote host closed the connection]
sankaber has joined #ruby
AnoHito_ has joined #ruby
aganov has quit [Quit: aganov]
<jhass>
EdwardIII: I still don't know eventmachine
dopie has quit [Quit: This computer has gone to sleep]
<jhass>
?code davethecat
<ruboto_>
davethecat, We can't help you without your code, please post it to https://gist.github.com
qba73 has joined #ruby
<davethecat>
doh fixed it
<EdwardIII>
jhass: hmm maybe a lot of people don't bump into these kind of issues
<EdwardIII>
i'd think it's fairly common though
<EdwardIII>
pretty much everything i do is very http-request-heavy
Igorshp has quit [Remote host closed the connection]
marr has quit [Ping timeout: 260 seconds]
<EdwardIII>
doing that kind of stuff in php is an absolute, complete and utter nightmare
naftilos76 has joined #ruby
<EdwardIII>
doing it in JS is pretty simple
lucas has joined #ruby
last_staff has joined #ruby
Xzanron has quit [Quit: Leaving]
<pcfreak30>
What is the ruby feature called for this syntax ":controller => 'site', :action => 'login'"
<bigmac_>
jhass: ok, one more thing lol how can i multiply X by 2(800.times)
<havenwood>
pcfreak30: A Hash. Those `=>`s are called Hash rockets.
<bigmac_>
with out using a loop?
<bigmac_>
800.times{|y| x*2}
davethecat has left #ruby ["Leaving"]
<pcfreak30>
havenwood: do you need {} if passing multiple hashes
karapetyan has joined #ruby
Igorshp has joined #ruby
fullofca_ has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
momomomomo has quit [Quit: momomomomo]
stardiviner has quit [Ping timeout: 260 seconds]
favadi has joined #ruby
lucas has quit [Client Quit]
momomomomo has joined #ruby
teclator has quit [Quit: leaving]
stardiviner has joined #ruby
lucas has joined #ruby
last_staff has quit [Quit: last_staff]
karapetyan has quit [Ping timeout: 250 seconds]
peteykun has quit [Ping timeout: 256 seconds]
The_Phoenix has joined #ruby
Zamyatin has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
parus has joined #ruby
varunwachaspati has quit [Quit: Connection closed for inactivity]
<caliostro>
how can i add clean task to an array of prerequisities tasks?
zenguy_pc has joined #ruby
joneshf-laptop has joined #ruby
cball has quit [Quit: Leaving]
<caliostro>
need something like this task :compile => clean + sources do |t,args|
<canton7>
task :task1 => [:task2, :task3] do ...
sdothum has quit [Read error: Connection reset by peer]
<canton7>
^ that's the syntax. you can use all of ruby's array methods to make that array of dependent tasks
cajone has joined #ruby
Dopagod has joined #ruby
fullofca_ has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
sdothum has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
<caliostro>
found! task :compile => ( sources.unshift(:clean) ) do |t,args|
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<canton7>
caliostro, task :compile => [*sources, :clean] do ... is another
<caliostro>
i nees to prepend the clean task
ruurd has joined #ruby
<canton7>
oops
<canton7>
=> [:clean, *sources]
<canton7>
then :clean comes "before" *sources visually, as well
<caliostro>
ah, ok! let me see the * operator
<canton7>
it's called the "splat operator", for your googling
<caliostro>
rake is not my preferred tool, i prefer mallet (big hammer)
tenderlove has joined #ruby
<canton7>
that's very hard to google for, apparently
<canton7>
given that mallets are often used in building stuff...
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
htmldrum has quit [Ping timeout: 256 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
treehug88 has joined #ruby
p0wn3d_ has quit [Ping timeout: 244 seconds]
subscope has joined #ruby
<EdwardIII>
so in ruby, fat arrow doesn't just mean "value for this hash key?"
dopamean_ has joined #ruby
doddok has quit [Remote host closed the connection]
vigintas has quit [Ping timeout: 268 seconds]
<canton7>
that's what it means here, as well
<jhass>
it's also used in the rescue clause, but that's all I remember atm
pandaant has joined #ruby
<canton7>
expanded, that's task({:compile => [stuff]) do ... end
DoubleMalt has quit [Remote host closed the connection]
<canton7>
oops, task({:compile => [stuff]}) do .. end
qba73 has quit []
<EdwardIII>
ah ok that makes it clearer heh
Rollabunna has joined #ruby
Dreamer3 has joined #ruby
jas02 has quit [Quit: jas02]
Kara_ has quit [Ping timeout: 244 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vigintas has joined #ruby
s2013 has joined #ruby
Kara has quit [Ping timeout: 264 seconds]
axl_ has joined #ruby
<EdwardIII>
so in ruby, if it's all on one line, you can just plug away with key/value pairs and it's shorthand for a hash?
<canton7>
when you're calling a method, you can skip the {} around hashes and ruby will insert them
<EdwardIII>
right ok
Jardayn has joined #ruby
<EdwardIII>
just a little more sugar then
ledestin has joined #ruby
<EdwardIII>
kinda does away with the need for kwargs too then i guess
idefine has joined #ruby
<canton7>
I think that was the intention - you can also use foo: 3 instead of :foo => 3
<EdwardIII>
although it looks like you have that now too
<canton7>
.. but it has downsides to kwargs, so that came later
<EdwardIII>
does it?
<canton7>
using standard parameters is easy. plucking the values you want out of a hash starts to get annoying
lolmaus has quit [Quit: Konversation terminated!]
jessemcgilallen has joined #ruby
ndrei has joined #ruby
dmolina1 has joined #ruby
dmolina has quit [Read error: Connection reset by peer]
matp has joined #ruby
polysics has joined #ruby
Alina-malina has joined #ruby
matp has quit [Max SendQ exceeded]
wpp has quit [Quit: ZZZzzz…]
User458764 has joined #ruby
matp has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
matp has quit [Max SendQ exceeded]
Igorshp has quit [Remote host closed the connection]
SamGerber has joined #ruby
Igorshp has joined #ruby
matp has joined #ruby
shredding has joined #ruby
matp has quit [Max SendQ exceeded]
ruurd has joined #ruby
matp has joined #ruby
nfk|laptop has quit [Read error: Connection reset by peer]
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
Peg-leg has quit [Quit: Leaving.]
skweek has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
p0wn3d_ has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fullofcaffeine has quit [Remote host closed the connection]
tesuji has quit [Ping timeout: 240 seconds]
Porfa has joined #ruby
platzhirsch has quit [Remote host closed the connection]
dorei has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
bigmac_ has quit [Ping timeout: 250 seconds]
Dopagod has quit [Ping timeout: 260 seconds]
roshanavand has quit [Remote host closed the connection]
khebbie has quit [Ping timeout: 244 seconds]
ruurd has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
momomomomo_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
polysics has quit []
deps has left #ruby [#ruby]
<prefixed>
yo. what is the RDOC way of specifying the valid options of a method's options hash?
Channel6 has joined #ruby
momomomomo has quit [Ping timeout: 255 seconds]
momomomomo_ is now known as momomomomo
`tim` has joined #ruby
inteq has joined #ruby
tk__ has quit [Quit: ばいばい]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopie has joined #ruby
tubuliferous has joined #ruby
hindenbug has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
roshanavand has joined #ruby
hindenbug has joined #ruby
dmolina has joined #ruby
programmerq has quit [Changing host]
programmerq has joined #ruby
jobewan has joined #ruby
dmolina1 has quit [Read error: Connection reset by peer]
momomomomo has quit [Quit: momomomomo]
ndrei has joined #ruby
mwlang has joined #ruby
eminencehc has joined #ruby
jenrzzz has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
mary5030 has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
<mwlang>
Does Ruby have a better way to grep file contents than backticks: `grep -lr pattern *` I found the grep for Strings, but wondering specifically about same for files.
symm- has joined #ruby
northfurr has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
devoldmx has joined #ruby
jobewan has quit [Ping timeout: 268 seconds]
<ChampS_>
jhass: passenger is installed and in my apache config file I've included <IfModule mod_passenger.c>PassengerRoot /home/ruby/.rvm/gems/ruby-.2.1/gems/passenger-5.0.20 PassengerDefaultRuby /home/ruby/.rvm/gems/ruby-2.2.1/wrappers/ruby </IfModule>
fullofcaffeine has joined #ruby
<jhass>
ChampS_: ruby-.2.1 looks weird
<ChampS_>
oh u're right
<ChampS_>
its 2.2.1
<ChampS_>
so a bug in passenger output
<ChampS_>
I copy pasted this line cause the output was telling me to do so
<ChampS_>
mh nope in my file its 2.2.1
<ChampS_>
just a copy paste failure of me from file to irc
jenrzzz has quit [Ping timeout: 272 seconds]
weihan has joined #ruby
idefine_ has joined #ruby
<treehug88>
mwlang you might be interested in "ack". Though I'm not exactly clear what your question is
wldcordeiro has joined #ruby
idefine has quit [Read error: Connection reset by peer]
<prefixed>
YO. what kind of exception would you throw if a shell command fails?
<prefixed>
*raise
<jhass>
what does it do?
<prefixed>
rsync
<jhass>
sounds like the whole purpose of the script is to call it
ruurd has quit [Quit: ZZZzzz…]
<jhass>
are you going to rescue it?
<prefixed>
it could fail a myriad number of ways, but i'd like to make it clear that the shell program failed
roshanavand has quit [Remote host closed the connection]
<prefixed>
and no, i'm not going to rescue
<jhass>
then I'd use Kernel#abort
chopin has joined #ruby
<prefixed>
why
peteykun has joined #ruby
<mwlang>
treehug88: well, essentially, Dir.glob(‘*’).select{|fn| File.read(fn) =~ /some_pattern/} but with recursion into the folders
<jhass>
because you won't recover the error
<prefixed>
hm. reasonable
unreal_ has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
ngscheurich has joined #ruby
kobain has joined #ruby
roshanavand has joined #ruby
umgrosscol has joined #ruby
shinnya has joined #ruby
northfurr has quit [Read error: Connection reset by peer]
unreal has quit [Ping timeout: 255 seconds]
northfurr has joined #ruby
fullofcaffeine has joined #ruby
jobewan has joined #ruby
ruurd has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rewzn has quit [Quit: WeeChat 1.1]
dfinninger has joined #ruby
cdg_ has joined #ruby
cdg has quit [Read error: Connection reset by peer]
shredding has quit [Ping timeout: 272 seconds]
_aeris_ has joined #ruby
unreal has joined #ruby
<ChampS_>
woooooow
TomyWork has quit [Remote host closed the connection]
unreal_ has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
roshanavand has quit [Remote host closed the connection]
rfeyn has joined #ruby
dfockler has joined #ruby
<EdwardIII>
hrm so if i install a gem like "gem 'sidekiq-promise'" i'd generally expect to be able to "require 'gem 'sidekiq-promise'" - reasonable? i'm seeing require': cannot load such file -- sidekiq-promise (LoadError)
<rfeyn>
In the top level of a ruby program, self is an object of class Object. What's the default definee in the top level?
<jhass>
rfeyn: Object, default method visibility is private
<EdwardIII>
havenwood: thanks!
inteq has quit [Quit: Leaving]
<rfeyn>
jhass: Is the default definee the singleton class of self in the top level?
polishdub has joined #ruby
<jhass>
no, Object
inteq has joined #ruby
blaxter has quit [Quit: foo]
<treehug88>
mwlang: oh cool. Now you just need to add some sort of 'find' moral equivalent.
joncol has joined #ruby
roshanavand has joined #ruby
atmosx has joined #ruby
chriscarpenter12 has joined #ruby
<joncol>
What's a good way of accessing a Logger in Ruby? I want to be able to switch out the file log, used in a normal run of the program, with some mocks when testing.
<ChampS_>
jhass: strange, it only works when I do the rigth things xD
<atmosx>
joncol: you can create env variables and have your initialize method read the 'RUBY_ENV' variable. Then use Logger.new('/path/to/production.log') or Logger.new '/path/to/dev.log'
beauby has quit [Ping timeout: 244 seconds]
fullofcaffeine has quit [Remote host closed the connection]
podman has joined #ruby
fullofcaffeine has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<rfeyn>
jhass: So the default definee is the Object class? And all methods become private methods?
maletor has joined #ruby
<jhass>
yes
<chriscarpenter12>
Whats the easiest way to convert this string to an array: "[[1, product1],[2, product2]]" I'm scraping a url and the array returned is a string
<jhass>
chriscarpenter12: that's not defined to be in a particular format?
<chriscarpenter12>
jhass: I don't follow?
<jhass>
chriscarpenter12: looks like YAML parses your example
ReK2 has joined #ruby
ReK2 has joined #ruby
<EdwardIII>
hmm not sure i can use sidekiq for this
<EdwardIII>
damnit this is way harder than i anticipated
mark2 has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
<treehug88>
i was just showing how it would be easy to confirm it looks like yaml without writing any code
<joncol>
Is there a way to detect if you're currently running RSpec tests?
cdg has joined #ruby
<jhass>
you shouldn't
roshanavand has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
blue_deref has joined #ruby
helpa has quit [Remote host closed the connection]
armyriad has joined #ruby
helpa has joined #ruby
helpa has quit [Remote host closed the connection]
cdg_ has quit [Ping timeout: 260 seconds]
helpa has joined #ruby
roshanavand has joined #ruby
senayar has quit []
armyriad has quit [Max SendQ exceeded]
rfeyn has quit [Quit: Page closed]
The_Phoenix has quit [Quit: Leaving.]
jpfuentes2 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
armyriad has joined #ruby
Spami has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
Channel6 has quit [Ping timeout: 272 seconds]
rewzn has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
ruurd_ has joined #ruby
LMity has joined #ruby
[Butch] has joined #ruby
arthurix has joined #ruby
grekkos has joined #ruby
l_tonz has quit [Remote host closed the connection]
Mon_Ouie has quit [Quit: WeeChat 1.3]
lavros has quit [Quit: leaving]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
avahey has quit [Quit: Connection closed for inactivity]
p0wn3d__ has joined #ruby
arthurix_ has quit [Ping timeout: 256 seconds]
p0wn3d_ has quit [Ping timeout: 260 seconds]
Channel6 has joined #ruby
rodfersou is now known as rodfersou|lunch
shoutsid has quit [Remote host closed the connection]
khebbie has joined #ruby
michaeldeol has joined #ruby
grekkos has quit [Ping timeout: 244 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
maletor has quit [Quit: Computer has gone to sleep.]
beauby has joined #ruby
diegoaguilar has quit [Ping timeout: 250 seconds]
Channel6 has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SirCmpwn has joined #ruby
<SirCmpwn>
h
<SirCmpwn>
b high
<SirCmpwn>
god dammit
<SirCmpwn>
sorry
<jhass>
hi ;)
<SirCmpwn>
came here to ask what appeals to people about ruby
failshell has quit [Remote host closed the connection]
new_student has joined #ruby
V1s1ble has joined #ruby
zenguy_pc has quit [Ping timeout: 260 seconds]
bryanray has joined #ruby
chussenot has quit [Quit: chussenot]
<SirCmpwn>
my only exposure to it has been deploying a rails app and man, that sucked. What does it bring to the table that makes it super popular?
ndrei has quit [Ping timeout: 264 seconds]
fullofcaffeine has quit [Remote host closed the connection]
<jhass>
I'd say a very open yet consistent type system, high introspection and metaprogramming abilities and a rich stdlib
<Coraline>
Add to that readability and conciseness
<jhass>
but judging Ruby from a Rails install is like judging Python from deploying Django
<ljarvis>
development speed, metaprogramming capabilities, decent testing tools
krisquigley has quit [Remote host closed the connection]
<SirCmpwn>
except that deploying django is super easy
<SirCmpwn>
can you tell me more about ruby and metaprogramming?
<jhass>
I always find it at least equally hard
<new_student>
Hello All, I am a new student and have a question regarding my teacher's code. The code is checking Strings to see whether they are palindromes. Here is a link: http://www.pythontutor.com/visualize.html#code=def+FirstReverse(str%29%0D%0A++reverse_string+%3D+%22%22%09%0D%0A++i+%3D+0%0D%0A++while+i+%3C+str.length%0D%0A++++reverse_string+%3D+str%5Bi%5D+%2B+reverse_string(%29%0D%0A++++i+%2B%3D+1%0D%0A++end%0D%0A++return+reverse_string
<new_student>
I understand everything except Line 5
<new_student>
Thats the correct code^ I understand everything except line 4
<jhass>
?gist_usage new_student
<ruboto_>
new_student, To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
MasterPiece has joined #ruby
<jhass>
but got any specific question about it? It's not very idiomatic Ruby for sure
LMity has quit [Read error: Connection reset by peer]
devdazed has quit [Quit: Bye]
ruurd_ has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
dfinninger has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 250 seconds]
skade has joined #ruby
joncol has joined #ruby
ruurd has joined #ruby
gaboesquivel has joined #ruby
sdothum has joined #ruby
User458764 has joined #ruby
snockerton has joined #ruby
wpp has joined #ruby
arup_r has joined #ruby
maletor has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
marr has joined #ruby
GriffinHeart has joined #ruby
northfurr has quit [Quit: northfurr]
GriffinHeart has quit [Remote host closed the connection]
ruurd has quit [Ping timeout: 272 seconds]
zotherstupidguy has quit [Ping timeout: 272 seconds]
jackjackdripper has joined #ruby
nemo_ has quit [Remote host closed the connection]
stan has quit [Ping timeout: 256 seconds]
dfinninger has joined #ruby
NullVoxPopuli has joined #ruby
htmldrum has joined #ruby
shoutsid has joined #ruby
<NullVoxPopuli>
anybody know why ruby rsa keys can't be imported by python?
dfinninger has quit [Remote host closed the connection]
<NullVoxPopuli>
python expects the format of BEGIN RSA PUBLIC KEY, but ruby only exports BEGIN PUBLIC KEY
tubuliferous has quit [Ping timeout: 260 seconds]
roshanavand has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
armyriad has quit [Ping timeout: 272 seconds]
platzhirsch has joined #ruby
roshanavand has joined #ruby
htmldrum has quit [Ping timeout: 272 seconds]
User458764 has joined #ruby
nemo_ has joined #ruby
zotherstupidguy has joined #ruby
ruurd has joined #ruby
<NullVoxPopuli>
figured it out, it was a difference between x.509 including information about what made the key, and python not doing that
shoutsid has quit [Remote host closed the connection]
shoutsid has joined #ruby
<metlx>
havenwood: Is RVM beneficial in any way?
<havenwood>
metlx: If you need more flexibility than those packages you can use an install/switcher like RVM to build your own Rubies. Or ruby-install is a simpler tool for installing Rubies and chruby for switching: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
diegoaguilar has quit [Remote host closed the connection]
<havenwood>
metlx: It works on obscure system with old Rubies that require patches to install.
djbkd has quit [Remote host closed the connection]
GarethAdams has quit [Ping timeout: 252 seconds]
metlx has quit [Quit: Page closed]
eminencehc has quit [Remote host closed the connection]
pandaant has joined #ruby
lorn has quit [Changing host]
lorn has joined #ruby
balazs_ has quit [Ping timeout: 265 seconds]
idefine has joined #ruby
ruurd has joined #ruby
treehug88 has quit [Read error: Connection reset by peer]
shoutsid has quit [Remote host closed the connection]
arthurnn has quit [Quit: bye...]
GarethAdams has joined #ruby
shoutsid has joined #ruby
baweaver has quit [Remote host closed the connection]
bl0ndie has joined #ruby
htmldrum has joined #ruby
terrellt is now known as tpendragon
ramfjord has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
khebbie has quit [Ping timeout: 268 seconds]
idefine has quit [Ping timeout: 256 seconds]
eminencehc has joined #ruby
oetjenj has joined #ruby
vigintas has joined #ruby
momomomomo has joined #ruby
User458764 has joined #ruby
vigintas has quit [Remote host closed the connection]
vigintas has joined #ruby
p0wn3d_ has joined #ruby
pandaant has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
mary5030 has joined #ruby
hakunin has joined #ruby
p0wn3d__ has quit [Ping timeout: 250 seconds]
A124 has quit [Quit: '']
dionysus69 has joined #ruby
idefine has joined #ruby
shoutsid has quit [Remote host closed the connection]
hanmac has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
shoutsid has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
timonv has joined #ruby
hakunin has quit [Ping timeout: 240 seconds]
vigintas has quit [Quit: vigintas]
vigintas has joined #ruby
balazs_ has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
varunwachaspati has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
symm- has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
JJM has joined #ruby
jenrzzz has joined #ruby
shoutsid has quit [Remote host closed the connection]
krisquigley has joined #ruby
p0wn3d__ has joined #ruby
shoutsid has joined #ruby
devoldmx has quit []
ruurd has joined #ruby
DoubleMalt has joined #ruby
iateadonut has quit [Quit: Leaving.]
p0wn3d_ has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
zotherstupidguy has quit [Ping timeout: 252 seconds]
swgillespie has joined #ruby
Quandl has joined #ruby
MuffinPimp has joined #ruby
krisquigley has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
eminencehc has quit [Remote host closed the connection]
A124 has joined #ruby
eminencehc has joined #ruby
treehug88 has joined #ruby
MasterPiece has quit [Quit: Leaving]
timonv has quit [Ping timeout: 250 seconds]
Musashi007 has joined #ruby
lokson has joined #ruby
craigs has joined #ruby
Lucky__ has joined #ruby
shoutsid has quit [Remote host closed the connection]
Jason____ has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jerematic has joined #ruby
rdavila has joined #ruby
<Jason____>
Hi all, I have a beginner question invovling morphing strings
davedev24 has joined #ruby
<momomomomo>
Jason____: !ask
<momomomomo>
?ask
<ruboto_>
Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
s2013 has joined #ruby
<Jason____>
What is the best approach to transform individual letters in a given string to the next letter of the alphabet? I want to write this as a function
<Jason____>
In your code, I recognize all methods except .chars and the &:succ passed to .map
<Jason____>
Of course, I will look up documentation
<Jason____>
But I am a first time student, so perhaps you can Mr.Miyagi lecture me?
<pipework>
Jason____: You'll find #chars in String's docs, &:any_method uses Symbol#to_proc, which you can read about in that documentation, and #succ is also in String's documentation.
<pipework>
succ means successor.
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
nemo_ has quit [Remote host closed the connection]
<rdavila>
I know that Hash.new { |k, v| k[v] = [] } solves the problem but don't know exactly how it works
s00pcan_ has joined #ruby
craigs is now known as cas__
bl0ndie has quit [Ping timeout: 272 seconds]
dvarrui has joined #ruby
kirun has joined #ruby
idefine has quit [Remote host closed the connection]
cas__ is now known as cas26
<pipework>
rdavila: You're modifying the array you're passing into the hash, not getting a new array for each new unknown key in the hash.
DoubleMalt has quit [Ping timeout: 244 seconds]
<momomomomo>
rdavila: "If a block is specified, it will be called with the hash object and the key, and should return the default value. It is the block’s responsibility to store the value in the hash if required." http://ruby-doc.org/core-2.1.1/Hash.html#method-c-new
fullofcaffeine has joined #ruby
cas26 has quit []
iam3 has joined #ruby
s00pcan_ has quit [Ping timeout: 272 seconds]
NullVoxPopuli has quit [Remote host closed the connection]
<pipework>
If you do assignment as whale, you can store the value.
adac has quit [Ping timeout: 272 seconds]
idefine has quit [Ping timeout: 265 seconds]
<Zarthus>
shevy: yes they did.
<pipework>
But modifying the array destructively doesn't assign the key with the value's result, it just modifies the value. Any subsequent assignments that use the default value will use the array that you modified.
northfurr has quit [Quit: northfurr]
shoutsid has quit [Remote host closed the connection]
dsjethzs_ has joined #ruby
baweaver has joined #ruby
northfurr has joined #ruby
<rdavila>
momomomomo pipework thanks a lot for the great examples
shoutsid has joined #ruby
craigs has quit [Client Quit]
<rdavila>
it was a bit tricky to understand on my won
<rdavila>
* own
craigs has joined #ruby
<pipework>
rdavila: no worries. Glad we could help.
idefine has joined #ruby
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has joined #ruby
eminencehc has quit [Remote host closed the connection]
<momomomomo>
pipework: your example didn't show much up there
<pipework>
momomomomo: Sure it did. It showed that when you use the value returned from passing an unknown key into the hash and then assign a value to it, it uses the default value.
baweaver has quit [Remote host closed the connection]
<pipework>
Whereas, when you destructively modify the default value without doing assignment, it doesn't behave like one might expect.
baweaver has joined #ruby
BraddPit1 has joined #ruby
blackmesa has joined #ruby
craigs has quit [Client Quit]
<momomomomo>
nah, your example just obfuscates
Guest50 has joined #ruby
p0wn3d__ has quit [Read error: Connection reset by peer]
craigs has joined #ruby
JJM has joined #ruby
p0wn3d__ has joined #ruby
<momomomomo>
it is useful to show how to set something to the default value, though
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
xelkarin has joined #ruby
shoutsid has quit [Remote host closed the connection]
mary5030 has joined #ruby
baweaver has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 244 seconds]
jamesaxl has joined #ruby
Dopagod has joined #ruby
mhib has quit [Read error: Connection reset by peer]
solocshaw has quit [Ping timeout: 240 seconds]
fullofca_ has joined #ruby
speakingcode has joined #ruby
speakingcode has quit [Client Quit]
inascime has joined #ruby
radgeRayden has quit [Ping timeout: 244 seconds]
shoutsid has joined #ruby
jones_ has joined #ruby
etrae has joined #ruby
jones_ has quit [Client Quit]
djbkd has joined #ruby
<xelkarin>
I'm trying to write a user management script using ruby-ldap, and I'm trying to figure out how to change passwords.
fullofcaffeine has quit [Read error: Connection reset by peer]
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
<xelkarin>
I've done this once before with a standalone EXOP command under Java, and while ruby provides controls for extended operations it seems these are only used to extend basic LDAP commands.
adac has joined #ruby
fullofca_ has quit [Read error: Connection reset by peer]
davedev2_ has quit []
<pipework>
xelkarin: Have you considered using jruby?
fullofcaffeine has joined #ruby
<momomomomo>
jruby is dope, but you can't use apache spark with it :(
<xelkarin>
Actually, I haven't. I may look into it now.
yfeldblum has joined #ruby
<xelkarin>
I'm guessing there's no way to do it under standard ruby though?
blackmesa has quit [Ping timeout: 240 seconds]
awrfas2 has joined #ruby
shoutsid has quit [Remote host closed the connection]
etrae has quit [Ping timeout: 240 seconds]
<pipework>
momomomomo: Why can't you?
<pipework>
Spark is on the JVM, right?
prefixed has quit [Remote host closed the connection]
<momomomomo>
pipework: serialization etc
djbkd has quit [Ping timeout: 264 seconds]
<pipework>
momomomomo: I bet it can be done.
fullofcaffeine has quit [Ping timeout: 260 seconds]
<pipework>
If Spark is on the JVM, and since spark is open source, the limitation is that no one has done it, not that it can't be done.
<pipework>
momomomomo: I think that it's actually possible, but I'd need to check with the jruby team to see if I'm being silly.
<momomomomo>
doooo it
BraddPit1 has joined #ruby
<momomomomo>
I'd love to have a spark/torquebox cluster
<momomomomo>
rather than looking at scala/play framework
BraddPit2 has joined #ruby
<pipework>
I think that they wouldn't have to update spark to support jruby objects, but that someone would need to write code to serialize the jruby objects to what spark expects.
BraddPit2 has quit [Client Quit]
<momomomomo>
I haven't looked to deep into it, because using scala/play won't be that bad if needed
<momomomomo>
or python/django or something
craigs has quit [Remote host closed the connection]
RobertBirnie has quit [Read error: Connection reset by peer]
RobertBi_ has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
BraddPitt has quit [Quit: leaving]
gaboesquivel has quit [Read error: Connection reset by peer]
gaboesquivel has joined #ruby
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
kfpratt has joined #ruby
BraddPit1 has quit [Quit: leaving]
BraddPitt has joined #ruby
baweaver has quit []
rushed has quit [Quit: rushed]
northfurr has quit [Quit: northfurr]
karapetyan has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 260 seconds]
etrae has joined #ruby
karapetyan has joined #ruby
shoutsid has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
speakingcode has joined #ruby
BraddPitt has quit [Quit: leaving]
awrfas2 has quit [Ping timeout: 240 seconds]
User458764 has joined #ruby
skweek has quit [Ping timeout: 264 seconds]
shoutsid has quit [Remote host closed the connection]
BraddPitt has joined #ruby
rushed has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
shoutsid has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
idefine has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
BraddPitt has quit [Client Quit]
codecop has quit [Remote host closed the connection]
BraddPitt has joined #ruby
bryanray has joined #ruby
BraddPitt has quit [Client Quit]
BraddPitt has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
p0wn3d__ has quit [Ping timeout: 260 seconds]
lxsameer has quit [Quit: Leaving]
blue_deref has joined #ruby
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bryanray has quit [Ping timeout: 250 seconds]
David27 has joined #ruby
craigs has joined #ruby
FernandoBasso has quit [Quit: Leaving]
<agent_white>
Afternoon!
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dfinninger has quit [Remote host closed the connection]
lokson has quit [Quit: WeeChat 1.0.1]
BraddPitt has quit [Quit: leaving]
BraddPitt has joined #ruby
BraddPitt has quit [Client Quit]
BraddPitt has joined #ruby
BraddPitt has quit [Client Quit]
dfockler has quit [Ping timeout: 264 seconds]
last_staff has joined #ruby
craigs has quit [Ping timeout: 272 seconds]
moredhel has joined #ruby
BraddPitt has joined #ruby
idefine has joined #ruby
zenguy_pc has joined #ruby
User458764 has joined #ruby
Coldblackice has joined #ruby
NullVoxPopuli has quit [Read error: Connection reset by peer]
doddok has quit [Quit: Leaving]
NullVoxPopuli has joined #ruby
verdoc_ is now known as verdoc
djbkd has joined #ruby
solars has quit [Ping timeout: 272 seconds]
agent_white has quit [Quit: brb]
dfinninger has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
<BraddPitt>
if I have a loop running in a thread, is it possible to have that thread update a variable /outside/ of the thread scope while in the loop? Without joining to the main thread?
Renich has joined #ruby
<shevy>
BraddPitt isn't that what mutex is all about?
Voker57 has quit [Read error: Connection reset by peer]
n_blownapart has joined #ruby
baweaver has joined #ruby
n_blownapart has quit [Client Quit]
spuk has joined #ruby
JDiPierro has quit [Remote host closed the connection]
rikkipitt has joined #ruby
symm-_ has joined #ruby
karapetyan has joined #ruby
victortyau has quit [Ping timeout: 250 seconds]
symm- has quit [Ping timeout: 272 seconds]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pauly_oc has quit [Ping timeout: 252 seconds]
bryanray has joined #ruby
maletor has joined #ruby
dotrb has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
blackmesa has joined #ruby
idefine has joined #ruby
shoutsid has quit [Remote host closed the connection]
balazs_ has joined #ruby
<dotrb>
a want to convert adecimal range into hex bytecode, a la '\x3A' but (1..254).to_a.map &:chr isn't purely hex; it's escape sequences for the entire ascii encoding. whats the ideal way to do this?
symm-_ has quit [Client Quit]
karapetyan has quit [Remote host closed the connection]
umgrosscol has quit [Remote host closed the connection]
ngscheurich has quit [Ping timeout: 260 seconds]
idefine has quit [Ping timeout: 244 seconds]
fullofcaffeine has joined #ruby
<darix>
dotrb: does that help?
bl0ndie has joined #ruby
oetjenj has joined #ruby
ldnunes has quit [Quit: Leaving]
<darix>
otherwise pack/unpack can be your friends
colstrom_ has joined #ruby
<dotrb>
darix: it does, thank you. although it seems like i remember being able to generate the whole ascii range in hex including the escap chars, like "\x01"
baweaver has quit [Remote host closed the connection]
<jhass>
dotrb: you're confusing representation and value
<dotrb>
darix: yeah, it was pack i used last time.
karapetyan has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<dotrb>
jhass: you're right, i see what yoou mean
<jhass>
do you want a byte sequences with the byte values 0 - 255 or do you want a string with two characters that when interpreted as hexadecimal map to 0-255
sepp2k has quit [Quit: Leaving.]
dzejrou__ has joined #ruby
<jhass>
*a two character sequence
shoutsid has joined #ruby
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
<dotrb>
jhass: i need a four character sequence, i just need the bytecode
Azure has quit [Remote host closed the connection]
Chaoborid has joined #ruby
dfinninger has quit [Remote host closed the connection]
craigs has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
ecksit has joined #ruby
failshell has joined #ruby
jenrzzz has joined #ruby
wldcordeiro has quit [Ping timeout: 264 seconds]
leafybasil has joined #ruby
krisquigley has quit [Ping timeout: 260 seconds]
awrfas2 has joined #ruby
shoutsid has joined #ruby
etrae has quit [Ping timeout: 268 seconds]
adac has quit [Ping timeout: 272 seconds]
varunwachaspati has quit [Quit: Connection closed for inactivity]
failshell has quit [Ping timeout: 244 seconds]
haylon has quit [Quit: Leaving]
shoutsid has quit [Remote host closed the connection]
segfalt has quit [Quit: segfalt]
seydar has joined #ruby
<seydar>
anyone going to rubykaigi?
shoutsid has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
<baweaver>
Matz
Chaoborid has quit [Remote host closed the connection]
dopamean_ has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
Chaoborid has joined #ruby
Rollabunna has joined #ruby
shoutsid has quit [Remote host closed the connection]
seydar has quit [Client Quit]
<havenwood>
seydar: Going to RubyConf but not going to make it to Japan.
<pipework>
havenwood: I bet you'd have a kickass time in Nippon (I can be such a weabo)
idefine has joined #ruby
shoutsid has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
dzejrou_ has joined #ruby
Meeh has quit [Read error: Connection reset by peer]
Meeh has joined #ruby
oetjenj has quit [Ping timeout: 260 seconds]
<ecksit>
hey everyone, i'm trying to build a reusable http client for my gem and i've hit a snag. i'd like to be able to create a single instance of a "client" and then reference that from within other parts of my gem. see code sample at https://gist.github.com/anonymous/bd162bfd3f18feff2044. could someone guide me in the right direction to get the second part working?
shoutsid has quit [Remote host closed the connection]
<havenwood>
ecksit: What does `client.user` return at the moment?
<havenwood>
ecksit: What have you tried to get it working?
<ecksit>
at the moment, just a string but i realise it needs to return an object to operate on
stannard has joined #ruby
craigs has quit [Ping timeout: 250 seconds]
<ecksit>
i've tried putting it into modules and including them from the client but i think i'm having issues with inheritence and passing on the variables i need
bruno- has joined #ruby
Azure has joined #ruby
Testo has joined #ruby
<shevy>
BraddPitt cool, I hope you'll upload it when it works
stannard has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
<BraddPitt>
most certainly will
Meeh has quit [Read error: Connection reset by peer]
stannard has joined #ruby
<Testo>
Hi all
<ecksit>
havenwood, i've found an example of how i want it to look to the person using it https://github.com/zendesk/zendesk_api_client_rb#usage (`client.tickets.some_method`) but i don't need the modelling associated with it
Meeh has joined #ruby
shoutsid has quit [Remote host closed the connection]
mary5030_ has joined #ruby
shoutsid has joined #ruby
imperator has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 265 seconds]
kies^ has quit [Ping timeout: 264 seconds]
dzejrou__ has joined #ruby
<Testo>
can someone explain to me why this code out put `\n` after `without`?
monq has joined #ruby
<Testo>
require 'yaml'¬
<Testo>
hasho = {:string => "Any changes you've made will be lost. Are you sure you want to continue without saving?"}¬
<Testo>
p hasho.to_yaml¬
<Testo>
"---\n:string: Any changes you've made will be lost. Are you sure you want to continue without\n saving?\n"
polishdub has quit [Quit: Leaving]
speakingcode has quit [Remote host closed the connection]
<ecksit>
something in your editor Testo?
Macaveli has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<darix>
Testo: because to_yaml wants to keep a certain width?
<darix>
maybe proposed by the yaml standard
<shevy>
Testo yeah you have some hidden newline
mary5030 has quit [Ping timeout: 265 seconds]
stannard has quit [Remote host closed the connection]
bryanray has joined #ruby
<ecksit>
apparently not - i get the same results
Ox0dea has joined #ruby
<shevy>
>> >> require 'yaml'; hasho = {:string => "Any changes you've made will be lost. Are you sure you want to continue without saving?"}; p hasho.to_yaml
<ruboto_>
shevy # => /tmp/execpad-8222a2e27d81/source-8222a2e27d81:2: syntax error, unexpected >> ...check link for more (https://eval.in/452428)
<shevy>
oops
<shevy>
>> require 'yaml'; hasho = {:string => "Any changes you've made will be lost. Are you sure you want to continue without saving?"}; p hasho.to_yaml
<ruboto_>
shevy # => "---\n:string: Any changes you've made will be lost. Are you sure you want to continue without\n sa ...check link for more (https://eval.in/452429)
<shevy>
ohhh
baweaver has joined #ruby
<shevy>
interesting
<shevy>
I am using syck
<shevy>
seems like a bug in psych then
<ecksit>
use `p hasho.to_yaml({:line_width => -1})` instead
dzejrou_ has quit [Ping timeout: 250 seconds]
`tim` has joined #ruby
<ecksit>
that removes the additional new lines i was seeing
shoutsid has quit [Remote host closed the connection]
<darix>
see setting
<shevy>
>> require 'yaml'; hasho = {:string => "Any changes you've made will be lost. Are you sure you want to continue without saving?"}; p hasho.to_yaml({:line_width => -1})
<ruboto_>
shevy # => "---\n:string: Any changes you've made will be lost. Are you sure you want to continue without savin ...check link for more (https://eval.in/452430)
<Ox0dea>
shevy: Why do you use Syck?
<darix>
Ox0dea: probably he is still on 1.8 ;)
nb_bez___ has joined #ruby
<shevy>
Ox0dea I have invalid yaml files and psych refuses to work with these
<Ox0dea>
shevy: Have you considered fixing the YAML files?
oetjenj has quit [Ping timeout: 250 seconds]
<shevy>
Ox0dea yeah it is not possible
<Ox0dea>
Not with that attitude.
<shevy>
I told you how it is
<darix>
shevy: what did Aaron say when you reported the issue?
<shevy>
what issue?
mary5030_ has quit [Remote host closed the connection]
<Ox0dea>
The one causing your Stockholm syndrome.
freerobby has quit [Quit: Leaving.]
pathrocle has joined #ruby
<shevy>
The one causing your annoyance syndrome.
mary5030 has joined #ruby
<Ox0dea>
Calm down.
rdavila has quit [Read error: Connection reset by peer]
<shevy>
Calm down.
oetjenj has joined #ruby
shoutsid has joined #ruby
podman has joined #ruby
orion has joined #ruby
Testo has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Quit: dionysus69]
<orion>
Hi. What's the return type of File.read in this line of code?: File.read(DATABASE).include?(code)
Testo has joined #ruby
ecksit has quit [Read error: Connection reset by peer]
eminencehc has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 240 seconds]
jessemcgilallen has joined #ruby
blackmesa has joined #ruby
ecksit has joined #ruby
stamina has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
eminencehc has joined #ruby
wldcordeiro has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
<shevy>
File.read() itself should return a String
<shevy>
.include?() should return true or false
djbkd has joined #ruby
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
craigs has joined #ruby
craysiii has quit [Remote host closed the connection]
shoutsid has quit [Remote host closed the connection]
riotjon__ has joined #ruby
Chaoborid has quit []
wldcordeiro has quit [Client Quit]
wldcordeiro has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
riotjone_ has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
craigs has quit [Ping timeout: 265 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wpp has quit [Read error: Connection reset by peer]
<t0code>
i got everything working now. just keep forgetting to make sure im converting my objects to the correct format?
oetjenj has joined #ruby
karapetyan has quit [Remote host closed the connection]
<t0code>
.to_i etc
shoutsid has joined #ruby
d3sp0t_ has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
tomchapin has joined #ruby
Rollabunna has joined #ruby
<t0code>
someone here yesterday recommended to me to try to finish a program with all methods and no classes to understand why we use classes. just got it lol
Rollabunna has quit [Remote host closed the connection]
<shevy>
yeah
<Ox0dea>
>> self.class # t0code
<shevy>
once you have methods, it is easy to put them into a class
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Doing or believing somebody else told you to with no rational justification.
<Ox0dea>
*something somebody
mary5030 has joined #ruby
<baweaver>
ritualization of code practices that serve no real purpose.
jackjackdripper1 has quit [Quit: Leaving.]
shoutsid has quit [Remote host closed the connection]
<shevy>
t0code if the code works, create a new .rb file, with the very same code, and try to just make it into a class instead; the $ variable can easily become a @ variable instead, initialize it in "def initialize" for example
DanKnox[away] is now known as DanKnox
<baweaver>
worst offenders: OO, Design Patterns
<t0code>
certainly am that
craigs has quit [Ping timeout: 250 seconds]
shoutsid has joined #ruby
<t0code>
so whats the proper way to declare an object such as a game character with a variety of variables and method?
workmad3 has joined #ruby
<Ox0dea>
t0code: A class.
<baweaver>
Also, use spaces instead of tabs
<t0code>
ok. thats where my efficienty conclusions came from.
<baweaver>
ruby indentation tends to be 2 space
<baweaver>
much easier to read.
<Ox0dea>
t0code: "Efficiency" is a loaded word.
<shevy>
it will be more efficient because it'll be easier to reuse as a class
<Ox0dea>
You want "productivity" in this case.
<Ox0dea>
baweaver: LLVM'
<Ox0dea>
3
<Ox0dea>
3
<Ox0dea>
That wasn't me.
<Ox0dea>
LLVM C is also two spaces, which caught me off guard.
shoutsid has quit [Remote host closed the connection]
quazimodo has joined #ruby
shoutsid has joined #ruby
shoutsid has quit [Client Quit]
arthurix_ has joined #ruby
craigs has quit [Ping timeout: 246 seconds]
idefine has joined #ruby
Bellthoven has joined #ruby
<atmosx>
hello shevy
<atmosx>
hello everyone
<shevy>
yo atmosx
<shevy>
did you finally get your degree
<atmosx>
shevy: how are you?
<atmosx>
shevy: no, I have to start studying for the state exams, 8/12
<atmosx>
shevy: it's the last exam, if I pass this, it's over no more exams
<shevy>
quite ok, I am about 20% done porting my last project from the ruby 1.8.x era
arthurix has quit [Ping timeout: 250 seconds]
<atmosx>
shevy: degre ein June 16
failshell has quit [Ping timeout: 272 seconds]
<atmosx>
wow
<shevy>
and after I have finished I shall never never never ever again do any rewrite. ever
<atmosx>
I'm rewriting argosnap and writing my first rails project too
<atmosx>
haha
<shevy>
atmosx if you pass the state exam you'll get the degree?
<atmosx>
shevy: I could yes.
<shevy>
what do you mean you "could" :D
HAL2328 has joined #ruby
<atmosx>
shevy: my thesis is ready, the states exams are ok. I will wait another 6 months but it's just ... waiting (if I pass) nothing more
<shevy>
hehe... those waiting times are so strange
<atmosx>
shevy: after thesis submition, I have to take the state exams. Once I pass the state exams, I need to 'present' my thesis and THEN I get the degree.
<atmosx>
shevy: it's a scheme I devised in order to make it 5 years
<atmosx>
shevy: otherwise would be 3.5 years which is not acceptable for MDPharm
<atmosx>
not in Greece
<atmosx>
in the UK it's fine
slawrence00 has quit [Ping timeout: 256 seconds]
<shevy>
so strange
<atmosx>
nor Italy, Germany, Austria (IIRC), etc.
<shevy>
yeah
dikaio has quit [Quit: ........]
<atmosx>
shevy: the strange is that I managed to finnish earlier bascially...
<atmosx>
They let me take more classes per year
oetjenj has quit [Ping timeout: 250 seconds]
<atmosx>
I did medicinal chemistry and analytical chemistry the same sem. You normaly don't do that. You take first analytical and then medicinal
awrfas2 has joined #ruby
etrae has quit [Ping timeout: 260 seconds]
DanKnox is now known as DanKnox[away]
colstrom_ has joined #ruby
oetjenj has joined #ruby
idefine has quit [Remote host closed the connection]
JammyHammy has joined #ruby
baweaver has quit [Remote host closed the connection]
scripore has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
jgt has quit [Ping timeout: 260 seconds]
<t0code>
when is it appropriate to use a module?
nxa has joined #ruby
<nxa>
How does the coerce method work in ruby/
<Ox0dea>
t0code: Are you familiar with the notion of namespaces?
<t0code>
no, looking it up
V1s1ble has quit [Quit: Leaving]
<t0code>
an idea of grouping related files/activities
<Ox0dea>
Sort of, but not quite.
<Ox0dea>
Really, it's right there on the tin; it's a space for names.
<t0code>
ok
<Ox0dea>
It's perfectly reasonable to exepct two different things to want, say, a Thing class, but they can't both have it, so they'd stick it in a module to disambiguate.