Dude007 has quit [Remote host closed the connection]
kyoshero has joined #ruby
Dude007 has joined #ruby
Dude007 has quit [Remote host closed the connection]
pasokk is now known as Pasok
oso96_2000 is now known as oso|away
Spami has joined #ruby
Dude007 has joined #ruby
dain has joined #ruby
jdj_dk has quit [Ping timeout: 244 seconds]
beilabs_________ has joined #ruby
<Earthnail>
is there a way to get a temporary file name without creating the file itself? Tempfile.new always creates the file...
Earthnail has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
rylev has quit []
Earthnail has joined #ruby
<Earthnail>
sry, got disconnected.
<Earthnail>
is there a way to get a temporary file name without creating the file itself? Tempfile.new always creates the file...
mjuszczak has quit []
tjbiddle has quit [Quit: tjbiddle]
charliesome has quit [Quit: zzz]
startupality has quit [Quit: startupality]
<lbrf>
Earthnail: what's the problem in create the file?! O_o
<Earthnail>
lbrf: calling an external program (ffmpeg) to populate the file for me; ffmpeg complains about the file being there (yes, there is a -y option to make ffmpeg shut up but its ugly).
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rkalfane has joined #ruby
Bilge- has quit [Client Quit]
x1337807x has joined #ruby
dain has quit [Quit: dain]
Bilge- has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
rkalfane has quit [Client Quit]
<lbrf>
Earthnail: you can't change it to call ffmpeg only when file is not temporary?
mary5030 has joined #ruby
Bilge- is now known as Bilge
<shevy>
Earthnail I don't think there is a thing like a temporary file that is not a file, unless you handle it all in RAM
<rpag>
Earthnail, you could generate a unique filename with SecureRandom and pass that to ffmpeg without much fuss
<Earthnail>
rpag: yes, that would work. I was just wondering if something already existed in the standard libraries. Node's tempfile package has it, I think Python has it too.
DLSteve has quit [Quit: Leaving]
Tranquility has quit [Quit: Connection closed for inactivity]
jonr22 has joined #ruby
sevenseacat has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
<SHyx0rmZ>
Earthnail, Dir::Tmpname.create looks good to me
<SHyx0rmZ>
require 'tmpdir'
adriancb has quit [Remote host closed the connection]
x1337807x has quit [Read error: Connection reset by peer]
<Earthnail>
SHyx0rmZ: awesome, thanks
oo_ has joined #ruby
x1337807x has joined #ruby
jdj_dk has joined #ruby
adriancb has joined #ruby
charliesome has joined #ruby
mloveless has quit [Remote host closed the connection]
jdj_dk has quit [Read error: Connection reset by peer]
jdj_dk has joined #ruby
nkumari has joined #ruby
dorei has quit []
kirun has quit [Quit: Client exiting]
timonv_ has joined #ruby
adriancb has quit [Ping timeout: 244 seconds]
zcreative has joined #ruby
edwardloveall has joined #ruby
davedev24_ has quit [Ping timeout: 256 seconds]
x1337807x has quit [Read error: Connection reset by peer]
lemur has joined #ruby
timonv_ has quit [Ping timeout: 272 seconds]
nkumari has quit [Remote host closed the connection]
x1337807x has joined #ruby
St_Marx has quit [Quit: WeeChat 1.0.1]
davedev24_ has joined #ruby
konsolebox has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
vieq has quit [Ping timeout: 240 seconds]
weeb1e has quit [Ping timeout: 258 seconds]
vieq has joined #ruby
bkolden has joined #ruby
weeb1e has joined #ruby
t0rc has joined #ruby
t0rc has left #ruby [#ruby]
St_Marx has joined #ruby
St_Marx has quit [Client Quit]
robustus has quit [Ping timeout: 250 seconds]
nkumari has joined #ruby
Takle has quit [Remote host closed the connection]
MattB2 has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robustus has joined #ruby
shvelo has joined #ruby
St_Marx has joined #ruby
<shvelo>
Anyone use chunky_png?
razieliyo has quit [Quit: Saliendo]
<P1RATEZ>
cambells.jpg
armyriad has joined #ruby
MattB2 has quit [Ping timeout: 264 seconds]
exadeci has quit [Quit: Connection closed for inactivity]
rshetty has joined #ruby
lkba has joined #ruby
P1RATEZ has quit [Quit: Bill Gates 1976-2014]
AndChat- has quit [Ping timeout: 265 seconds]
<redjack1964>
Why i get a NameError exception when i create my object like that : my_session = Session.new("a string")
<redjack1964>
class Session
<redjack1964>
31 attr_accessor :name
<redjack1964>
32
<redjack1964>
33 def initialize(name)
<redjack1964>
34 @name = name
<redjack1964>
what's wrong?
adriancb has joined #ruby
<sevenseacat>
depends on the full error
<benzrf>
redjack1964: where is the namerror
<sevenseacat>
also, use gist for code chunks, dont paste them here.
<redjack1964>
i precise Class Session is set in another file (training.rb)
<redjack1964>
training.rb:35:in `initialize': undefined local variable or method ` ' for #<Session:0x000000011e4870 @name="a string"> (NameError)
<sevenseacat>
so whats on line 35
<redjack1964>
35 @exercises = []
<sevenseacat>
yeah thats not valid syntax
<redjack1964>
just an empty array
<sevenseacat>
thats whats wrong :P
<apeiros>
method ` ' # you probably have an unprintable character there which shouldn't be there
<apeiros>
probably a non-breaking space.
<sevenseacat>
did you mean ||= ?
<apeiros>
also as sevenseacat already said - gist the code
<sevenseacat>
or just @exercises = [] ?
<redjack1964>
i think apeiros has right
tkuchiki has joined #ruby
<redjack1964>
i use vim
<havenwood>
redjack1964: we demand code!
<apeiros>
giving it piecemeal is somewhat anoying
<apeiros>
+n
<redjack1964>
i removed this line and type it again, and right now, i don't have this error anymore
<KLVTZ>
process of elimination...
<KLVTZ>
redjack1964: btw, vim has a great plugin called gist-vim. Once you set it up, you just have to call :Gist and it will post to your personal account with an available link.
jonr2219 has joined #ruby
<KLVTZ>
makes the process of sharing much easier
<redjack1964>
good to know :-)
marr has quit []
cashnguns has joined #ruby
rshetty has quit [Remote host closed the connection]
davasaurous has quit [Remote host closed the connection]
jonr2219 has quit [Ping timeout: 272 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
boombadaroomba has joined #ruby
zz_jrhorn424 is now known as jrhorn424
renier has joined #ruby
boombadaroomba has quit [Ping timeout: 258 seconds]
rshetty has joined #ruby
Dude007 has quit [Remote host closed the connection]
Dude007 has joined #ruby
Dude007 has quit [Client Quit]
NoNMaDDeN has quit [Remote host closed the connection]
reinaldob has joined #ruby
davasaurous has joined #ruby
reinaldob has quit [Ping timeout: 255 seconds]
hamakn has quit [Remote host closed the connection]
Earthnail has quit []
x1337807x has quit [Read error: Connection reset by peer]
arescorpio has joined #ruby
kiyote23 has joined #ruby
vyorkin has quit [Ping timeout: 240 seconds]
x1337807x has joined #ruby
jonr22 has quit [Remote host closed the connection]
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #ruby
Areessell has quit [Ping timeout: 245 seconds]
jonr22 has joined #ruby
jonr22 has quit [Remote host closed the connection]
chris613 has quit [Ping timeout: 265 seconds]
hamakn has joined #ruby
sdwrage has joined #ruby
fabrice31 has joined #ruby
echooo has joined #ruby
wsmoak has quit [Ping timeout: 250 seconds]
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
adriancb has quit [Remote host closed the connection]
<miah>
ah ya; my gf doesnt really speak cantonese well but she understands it
<ericwood>
her dad told me I had better skills than her, it was the apex of my chopsticks career
<miah>
hah
<ericwood>
lol GF only understands commands her mom would yell at her
<pontiki>
the fork thing reminds me one time i took my daughter to a chinese place; we were using chopsticks, but she was having a bit of problem. waiter walked up and slapped a fork down next to her and shouted at her "you need fork!"
<ericwood>
"come here" "stop that"
<ericwood>
pontiki: the only way to teach 'em is to have them starve unless they learn
<pontiki>
um
<pontiki>
she was like 16
<miah>
wow
mikepack has quit [Remote host closed the connection]
<pontiki>
she does know how to use them
<pontiki>
but everyone has a bad day, you know?
mary5030 has quit [Remote host closed the connection]
<ericwood>
haha
mloveless has quit [Read error: No route to host]
<miah>
day/week/month, ya =)
mary5030 has joined #ruby
<ericwood>
I think my parents gave them to us a lot for entertainment value
<pontiki>
... i was not above such things ...
<miah>
where i grew up they dont give you chopsticks really; nobody knows how to use them i didnt use them until my 20's
synergyz has quit [Read error: Connection reset by peer]
<pontiki>
but my partner and i used chopsticks a lot, and the girls wanted to use them too
echooo1 has joined #ruby
<miah>
ya; my daughters see us using them and they try too
<ericwood>
it's a good skill!
<pontiki>
it is
<miah>
i make it difficult though because im left handed so showing them my technique; it doesnt really translate
mloveless has joined #ruby
synergyz has joined #ruby
echooo has quit [Ping timeout: 264 seconds]
<ericwood>
lol we're discussing chopsticks while #javascript slowly comes unravelled
<ericwood>
granted it's settled down
arescorpio has quit [Excess Flood]
<pontiki>
give them a fork
mary5030 has quit [Ping timeout: 265 seconds]
<ericwood>
they've lost their chopsticks priveleges
nkumari has quit [Remote host closed the connection]
<miah>
hah
<pontiki>
lol
<ericwood>
this time of night is when a lot of non-english speakers hop in, things can get interesting
boombadaroomba has joined #ruby
davasaurous has quit [Remote host closed the connection]
<ericwood>
frustrating for both parties :\
<Nameo0>
Hello. I am suck trying to scrap a website using Nokogiri (like someone suggested earlier) and Mechanize. The website is pute html and I am trying to find the nth time that the "b" element appears and scrap the text from that element. I cannot figure this out and any advice would be greatly appreciated. =)
geowy has joined #ruby
<Nameo0>
pure html = no css, no id, no name
<ericwood>
Nameo0: mechanize seems a bit overkill! Why not use open-uri instead?
<Nameo0>
I am just trying to find a way to make this work. =)
davasaurous has joined #ruby
oo_ has joined #ruby
<ericwood>
one sec, lemme whip something up
boombadaroomba has quit [Ping timeout: 255 seconds]
<aust>
or it could check for uniqueness when writing to the file as well
Joufflu has quit [Read error: Connection reset by peer]
<apeiros_>
read the lines into a set, write it back to file
<shevy>
hanmac1 lol
<shevy>
rpag showed me the binding-eval trick to load code into modules at runtime
j416 has quit [Quit: o/]
<shevy>
as long as that works I am happy
Spami has quit [Quit: This computer has gone to sleep]
<shevy>
though - when I tried to use it in real code, it actually seemed too complex to my eyes so I did not use it in the end :(
j416 has joined #ruby
francisfish has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
Timgauthier has joined #ruby
CpuID has joined #ruby
melik_______ has quit [Quit: (null)]
troulouliou_dev has quit [Quit: Leaving]
karmatr0n has quit [Remote host closed the connection]
j416 has quit [Quit: o/]
<hanmac1>
shevy next weekend i might work on rwx again ... because nobu did break it, and currently i might have problems to fix it again (means rwx will currently not work with ruby-trunk) ...
<aust>
thanks
j416 has joined #ruby
aust has quit [Quit: Page closed]
ldnunes has joined #ruby
Hobogrammer has quit [Quit: さようなら]
bigkevmcd_ has joined #ruby
bigkevmcd_ has quit [Read error: Connection reset by peer]
<shevy>
\o/
Timgauthier is now known as timgauthier_away
32NAAK9JA has joined #ruby
francisfish has quit [Remote host closed the connection]
Areessell has quit [Ping timeout: 272 seconds]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Timgauthier has joined #ruby
<Timgauthier>
shevy sup
timonv_ has quit [Remote host closed the connection]
<shevy>
hey Mr. Tim
<shevy>
like Tim the Enchanter from the movie "The holy grail"
TPBallbag has joined #ruby
<Timgauthier>
YES!
<Timgauthier>
LIGHTNING BOLT!
<shevy>
haha
<shevy>
Tim: "I do.?You seek the Holy Grail!"
tkuchiki has quit [Remote host closed the connection]
<shevy>
Arthur: "That is our quest, you know much that is hidden, O Tim."
<shevy>
Tim: "Quite."
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
timonv_ has joined #ruby
marr has joined #ruby
timonv_ has quit [Remote host closed the connection]
<hanmac1>
shevy last weekend i did play to much with simutrans again ... what would be if the world would have such a growing industry than in my game? ;P
fabrice31 has quit [Remote host closed the connection]
<Timgauthier>
i love games
<Timgauthier>
with simulations
<Timgauthier>
what game
jusmyth has joined #ruby
jusmyth has left #ruby [#ruby]
Crisix has joined #ruby
tkuchiki has quit [Ping timeout: 252 seconds]
<shevy>
hanmac1 what is simutrans?
Crisix has quit [Max SendQ exceeded]
<shevy>
and why are there not more games in ruby
<shevy>
hanmac1 I was young when SimCity 1 came out on DOS!
<shevy>
I recently played some DOS games... gotta say, most of them were actually crap. but some really had great ideas going for them
<hanmac1>
apeiros_ hm why not File.readlines("path").uniq ?
<gregf_>
apeiros_: sets are O(1)?
<apeiros_>
gregf_: lookup, yes. so the problem is O(n)
<gregf_>
yeah, faster :/
ponga has joined #ruby
ponga has joined #ruby
<apeiros_>
hanmac1: that's the convenient solution for small files, yes
<gregf_>
apeiros_++; hanmac1 thats good to know `uniq` :)
voltage_ has joined #ruby
<apeiros_>
hanmac1: depending on whether you count \n to be part of the line or not, you have to adjust for last line without newline
ajaiswal has quit [Quit: Leaving]
<apeiros_>
(same for all solutions, tho)
<shevy>
Timgauthier yeah sucks; people get way too punch-happy. but seriously, to punch girls? that dude is just insane
bayed has joined #ruby
<shevy>
oops... the article actually says it was a stone or a bat, not the fist ...
Photism has joined #ruby
<Timgauthier>
yeah its much much worse then punching
<Timgauthier>
he left and came back
<Timgauthier>
to beat her to death
jonr22 has joined #ruby
fabrice31 has joined #ruby
iamninja has quit [Remote host closed the connection]
<Timgauthier>
woowt, wrote my brothers thankyou card from my wedding, yea they're redicuously late lol
sk87 has joined #ruby
<gregf_>
theres also an interview by abc on the cop that killed that young boy. now, i could be mistaken in that i'm trying to justify that cops action :/
<gregf_>
but one needs to listen to both sides :/
<gregf_>
he could've tasered him tho'. shooting is a bit too far, but.. in self defence :/
<Timgauthier>
he didn't carry a tazer
Zackio has quit [Remote host closed the connection]
<Timgauthier>
and i know a ton of cops who don't
jonr22 has quit [Ping timeout: 245 seconds]
<shevy>
Timgauthier you thank your brothers for getting married? :>
lkba has joined #ruby
<Timgauthier>
the whole situation sounds really weird, and the fact that it didn't go to the supreme court is more weird. but in this situation it COUDL have been justified, there however is a huge culture issue if black people feel so singled out. That needs to be addressed
kobain has joined #ruby
<Timgauthier>
I thank my brother for coming to my wedding shevy
<shevy>
gregf_ what confuses me is that he quit duty afterwards despite the jury stating he is free of error
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
agjacome_ has joined #ruby
kobain has quit [Max SendQ exceeded]
<shevy>
Timgauthier ah ok ... I forgot, you married in Canada, Germany or somewhere else? I assume your brothers would live in or near Canada... would seem adventorous to travel over half the world to attend the marriage of a brother! :D
abuzze has quit [Remote host closed the connection]
Zackio has joined #ruby
Bish has joined #ruby
<shevy>
wow difficult word... *adventurous
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
<Timgauthier>
we got married in canada, and in germany :P
charliesome has joined #ruby
<Timgauthier>
adventurous
<Timgauthier>
yeah thats a weird one
charliesome has quit [Client Quit]
AndChat| has quit [Ping timeout: 240 seconds]
<shevy>
oh... so I guess two parties
<shevy>
you must really like cake
Guest1882 has joined #ruby
Areessell has joined #ruby
<Timgauthier>
a total of two bites of cake from my weddings :P
agjacome has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
Takle_ has quit [Read error: Connection reset by peer]
ta has quit [Ping timeout: 264 seconds]
CpuID has quit [Quit: This computer has gone to sleep]
Takle has joined #ruby
wsmoak has joined #ruby
wsmoak has joined #ruby
kirloo has joined #ruby
kirloo is now known as Guest35729
oo_ has joined #ruby
nagaraj1 has joined #ruby
rshetty has joined #ruby
Guest1882 has quit [Ping timeout: 264 seconds]
rshetty has quit [Remote host closed the connection]
rodfersou has joined #ruby
iamninja has joined #ruby
Linuus has quit [Ping timeout: 258 seconds]
ctp has joined #ruby
ta has joined #ruby
nagaraj has quit [Ping timeout: 272 seconds]
oo_ has quit [Ping timeout: 252 seconds]
ringarin has quit [Read error: Connection reset by peer]
upp3r has joined #ruby
User458764 has joined #ruby
supersym has joined #ruby
kobain has joined #ruby
kobain has quit [Client Quit]
SCHAAP137 has joined #ruby
Tranquility has joined #ruby
kobain has joined #ruby
<hanmac1>
Timgauthier: hm did you tryout simutrans too? imo its cool for a bit playing under linux
davidhq has joined #ruby
<hanmac1>
apeiros_ spam from Guest35729
Morkel_ has joined #ruby
iamninja has quit [Remote host closed the connection]
<Timgauthier>
hanmac1 no i havn't and i'm on a mac
timonv_ has joined #ruby
<Timgauthier>
apeiros_ hanmac1 i also had that spam
<shevy>
do we have a programming language that is built around a UNIX pipe model? e. g. each action that can be performed, is a filter-process
Morkel has quit [Ping timeout: 265 seconds]
Morkel_ is now known as Morkel
apoorvparijat has quit []
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atta_ has quit [Remote host closed the connection]
atta has joined #ruby
weemsledeux has quit [Ping timeout: 264 seconds]
krz has quit [Quit: WeeChat 1.0.1]
stan5 has joined #ruby
krz has joined #ruby
elaptics is now known as elaptics`away
jespada has joined #ruby
nagaraj1 has quit [Ping timeout: 244 seconds]
User458764 has quit [Ping timeout: 264 seconds]
shazaum has quit [Quit: This computer has gone to sleep]
<stan5>
\quit
rshetty has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<shevy>
no don't
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
<Timgauthier>
i need to build a photo gallery that is password protected and i'd like to host my photos on aws to limit my costs
User458764 has joined #ruby
<stan5>
TIME
ctp has joined #ruby
<Timgauthier>
hm?
quimrstorres has quit [Remote host closed the connection]
<stan5>
you want to build it from scratch?
stan5 has quit [Quit: WeeChat 1.0.1]
abuzze has joined #ruby
<hanmac1>
shevy i would like something in the style of RollerCoasterTycoon(1-2) written in Ruby, what do you think, would you like that?
quimrstorres has joined #ruby
_5kg_ has joined #ruby
Spami has joined #ruby
_5kg has quit [Ping timeout: 258 seconds]
Linuus has quit [Ping timeout: 264 seconds]
SCHAAP137 has quit [Ping timeout: 245 seconds]
Linuus has joined #ruby
ringarin has joined #ruby
Takle_ has joined #ruby
SCHAAP137 has joined #ruby
Takle has quit [Ping timeout: 252 seconds]
posixpascal has joined #ruby
jimbach has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
upp3r has quit [Quit: upp3r]
yfeldblum has quit [Remote host closed the connection]
godd2 has quit [Ping timeout: 240 seconds]
User458764 has quit [Ping timeout: 240 seconds]
bMalum has joined #ruby
shvelo has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
jimbach has quit [Ping timeout: 258 seconds]
yfeldblum has joined #ruby
bmichelsen has joined #ruby
robustus is now known as robustus|Off
<Timgauthier>
naw, can't beat the efficency of assembler bra
yfeldblum has quit [Ping timeout: 240 seconds]
kuda_ has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
livathin_ has joined #ruby
t3h_j4n170r has quit [Ping timeout: 258 seconds]
dark_lord has joined #ruby
t7y9r has quit [Ping timeout: 265 seconds]
DaniG2k_ has joined #ruby
<dark_lord>
Hey I have opened two different terminal. In one of that I am checking gem list, it showed different output when I am doing the same on other terminal
renderful has joined #ruby
<dark_lord>
Am I doing something wrong ?
t3h_j4n170r has joined #ruby
t7y9r has joined #ruby
Takle_ has quit [Read error: Connection reset by peer]
Takle has joined #ruby
livathinos has quit [Ping timeout: 272 seconds]
DaniG2k has quit [Ping timeout: 252 seconds]
upp3r has joined #ruby
<hanmac1>
Timgauthier: hey! ... i did wrote once a bit with a binding for a 3d engine like ogre ... my ruby app did had similar FPS than the C++ programm
<Timgauthier>
cool
<hanmac1>
so if written correctly a binding should not have much overhead than the library itself ...
<Timgauthier>
yea
phutchins has joined #ruby
<Timgauthier>
i want to setup a photogallery using AWS for hosting my photos
<Areessell>
Okay, almost any question you ask that contains "get an error" or "exception" or something along those lines, go ahead and /include/ that exception with yout question. Cause that's gonna be the next thing asked
<hanmac1>
olivier_bK: dont you want to use redefine or something?
<olivier_bK>
no i just want to call colorize
<Areessell>
Oh he did! I'm dumb
moritzschaefer has quit [Ping timeout: 255 seconds]
<Areessell>
You;re only defining a module that has the colorize method
yfeldblum has quit [Ping timeout: 245 seconds]
<Areessell>
If you want to call `"Some string".colorize` then you need to include that in a `class String`
yvemath has quit [Remote host closed the connection]
BLuEGoD has quit [Remote host closed the connection]
TPBallbag has quit [Remote host closed the connection]
<shevy>
hanmac1 not sure I k now that; I only know TransportTycoon which was ok
agjacome_ has quit [Ping timeout: 258 seconds]
yfeldblum has joined #ruby
MattB2 has joined #ruby
<Areessell>
Life isnt complete until you've built a death roller coaster and trapped your visitors in a park in RCT
<hanmac1>
but currently you did define Color#colorize, but that does have nothing todo with String#colorize
BLuEGoD has joined #ruby
anaeem1 has quit [Remote host closed the connection]
Linuus has quit [Ping timeout: 264 seconds]
<hanmac1>
Areessell: hey, i did make an accident that in a very small park the bob-bahn has a little bumb, and the train did fly away ... dont blame me, blame the physics ;P
<olivier_bK>
in my class i've wrote include color
yfeldblu_ has joined #ruby
<hanmac1>
olivier_bK: yes, that should crash, dont ask me why it didnt ... first it should have been "include Color" not "require color", second, it still does not affect String
<olivier_bK>
ok
kirun has joined #ruby
chinmay_dd has joined #ruby
<Areessell>
olivier_bK: You wrote `require` which is different. But even if you did, that it still wouldn't work
<hanmac1>
shevy do you mean simutrans or RollerCoaterTycoon?
kish has quit [Changing host]
kish has joined #ruby
<Areessell>
You are doing `"wget: #{f}".colorize("blue")` which is String#colorize, as hanmac1 said.
rylev has joined #ruby
iwishiwerearobot has quit [Ping timeout: 256 seconds]
iwishiwerearobot has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
<Areessell>
Remove `require color` in line 5 of down.rb, and on line 2 add `class String; include Color; end`
fabrice31 has joined #ruby
iaj has joined #ruby
<Areessell>
What you are doing with that is reopening the String class definition and including that Color module. This will define the `color` method to all String instances
rshetty has quit [Remote host closed the connection]
<Areessell>
arup_r: Yeah sure, one of the most popular open source games
<arup_r>
Which one ?
<shevy>
arup_r return can sometimes be unexpected
<Areessell>
arup_r: return means "Stop everything that's happening and return the method
<Areessell>
No it's fully expected
<shevy>
Areessell no that is not true
<shevy>
Areessell try return in attr_writer style methods
<Areessell>
It breaks out of all loops, it stop the block excution, everything
<Areessell>
breaks out of all conditionals as demonstrated here
snath has quit [Ping timeout: 258 seconds]
<arup_r>
Areessell: You meant Virtus change the Ruby parser parse rule?
<Areessell>
Anyways, you are setting an instance variable based on the result of a contitional.
<Areessell>
What? How did you infer that from what I said
<arup_r>
Ahh! sorry :-)
<arup_r>
Then where was I wrong ?
aclearman037 has joined #ruby
<arup_r>
I didn't get you then
<Areessell>
Anyways, you are setting an instance variable based on the result of a contitional - and in the conditional you have a return statement. So it was skipping the assignment of the instance variable which Ruby said "Hey! That makes no sense"
<arup_r>
Why not am I allowed to return inside the if-else block ?
<Areessell>
Because return breaks out of everything and returns the given value immediantly
<Areessell>
No, you can. But the if/else block (called a conditional) is an expression in this case that the result of which will set a variable
<Areessell>
But you are skipping the setting of the variable by useing `return`
<arup_r>
makes sense now.. But will that behaviour consistent with any kind of assignment ?
<Areessell>
...Yes
<Areessell>
It's Ruby
<shevy>
Areessell return returns the passed value?
<arup_r>
Thanks for the explanation
posixpascal has joined #ruby
kg76 has joined #ruby
bMalum has quit [Quit: bMalum]
goodenough has quit [Remote host closed the connection]
<Areessell>
Of course
DaniG2k_ has quit [Ping timeout: 252 seconds]
<arup_r>
shevy: "void"
<shevy>
class Foo; def set=(i); return 33; i; end; end; foo = Foo.new; result = foo.set = 1
jusmyth has joined #ruby
<shevy>
will result be 33?
<Areessell>
>> class Foo; def set=(i); return 33; i; end; end; foo = Foo.new; result = foo.set = 1
<shock_one>
Hi. How would I continuously read the optput of a subprocess? Like I start a webserver, which doesn't block execution of the current process, and then want to read the port it started on from the output. I tried this, but it requires closing a pipe before reading. https://gist.github.com/anonymous/33a6c99e07ed99872151
<TomyWork>
what part of "bundle exec rails server -e $environment -p $port -b $iface $daemon" is application-specific? everything after "server"?
<Areessell>
That's disgusting =S I hate little patches on logic like that. "Here is how this works! For everything! (except this one very very specific case)"
<shevy>
hehe
<shevy>
no rule without exception!
Crazy_Atheist has joined #ruby
<shevy>
^^^ expect an exception to the above rule!
User458764 has joined #ruby
<Areessell>
shock_one: I think you can just `loop { puts werr.gets }`
<Areessell>
I don't really spawn other processes too often
vyorkin has joined #ruby
<shock_one>
Areessell, werrr is the write-only end of the pipe, I can't read from it.
shvelo has quit [Ping timeout: 245 seconds]
NoNMaDDeN has joined #ruby
doki-worry has joined #ruby
<Areessell>
I guess I meant `wout`?
<shock_one>
Ah, right. Wout is the write-only end of the pipe, I can't read from it.
<Areessell>
Or rout I dunno ambiguous names!
adriancb has joined #ruby
<shock_one>
;)
<Areessell>
I name things like `pipe_read_output` n stuff
<Areessell>
We actually were discussing that the other day
<Areessell>
We found a method with 18 underscores in the name
mjuszczak has joined #ruby
<shevy>
woot is a cool name for a pipe component
<shock_one>
And root?
<shevy>
root reminds me of beer
chu has joined #ruby
<shock_one>
Like when you had a couple of beers it's better not to login as a root?
<shevy>
shock_one let me try to find the method with 18 underscores, you will stand paralyzed in awe ...
Xeago has joined #ruby
<shevy>
hmm I don't have it in my IRC scrollback log here
adriancb has quit [Ping timeout: 240 seconds]
<TomyWork>
Areessell bollocks, the app is documented horr^H^H^H^Hnot at all
uber_hulk has quit [Ping timeout: 258 seconds]
cibs has quit [Remote host closed the connection]
cibs has joined #ruby
livingstn has joined #ruby
elaptics`away is now known as elaptics
<Areessell>
I hate when apps are documented horr^H^H^H^Hnot
upp3r has quit [Quit: upp3r]
<Areessell>
=p
<TomyWork>
:)
Xeago has quit [Read error: Connection reset by peer]
<TomyWork>
where would i find the source to whatever executes first?
<shevy>
aha found it!
<Areessell>
Like the main entry point of your program?
<TomyWork>
yes
Xeago has joined #ruby
<Areessell>
That would be which ever ruby file you are running
<Areessell>
Rails apps are bloated and a bit needlessly convoluted IMHO so it might take a minute to wrap your head around it
diego_ar has quit [Remote host closed the connection]
bMalum has quit [Quit: bMalum]
rkalfane has joined #ruby
gccostabr has joined #ruby
<shevy>
rails apps are not fat
<shevy>
just heavy boned
samsquanch has joined #ruby
<Areessell>
Heavy boned? You mean big boned?
<Takumo>
nah, heavy boned
<Takumo>
lead bones
<Areessell>
I can have heavy bones but not fat... like cast iron bones
spyderman4g63 has joined #ruby
brendenb has quit [Ping timeout: 258 seconds]
<Areessell>
I hate when I get a case of the lead bones
<Areessell>
From working at the factory
nagaraj has quit [Quit: nagaraj]
<TomyWork>
Areessell there's no "rails" directory here
upp3r has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<TomyWork>
is that odd or do i just skip the step?
<Areessell>
rails.. directory?
boombadaroomba has joined #ruby
<TomyWork>
yes, as mentioned in steps 1.5, 1.6 and 1.8 for instance
brendenb has joined #ruby
Trieste has quit [Ping timeout: 258 seconds]
<Areessell>
Did you read the header of that article?
tylersmith has quit [Ping timeout: 258 seconds]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Areessell>
"This guide explains the internals of the initialization process in Rails as of Rails 4."
<Areessell>
You're gonna want to skip toooo (hold on)
tkuchiki has joined #ruby
AFKGeek has quit [Quit: Fades into the shadows]
<TomyWork>
this is 3.2, too
rshetty has joined #ruby
<Areessell>
So that article is talking about the enitre initialization process of a Rails app
Seich has quit [Ping timeout: 258 seconds]
Trieste has joined #ruby
uber_hulk has joined #ruby
tylersmith has joined #ruby
<Areessell>
It finally gets to files within your project around 1.10
triple_b has joined #ruby
<Areessell>
See? Rails is so heavy-boned
Seich has joined #ruby
<shevy>
it's cool that the higher the rails versions, the longer the installation procedure
boombadaroomba has quit [Ping timeout: 252 seconds]
<shevy>
Areessell what do you use for web-related stuff in ruby? sinatra?
rkalfane has joined #ruby
<Areessell>
I only use rails for really big projects. Most projects I can get away with Middleman or similar but for dynamic stuff I use Sinatra, sure.
lxsameer has quit [Quit: Leaving]
<Areessell>
But I mostly just make webUIs for my applications or small sites I sell for far more than they are worth to some sap
<Areessell>
Sure, refactor with `port = stderr.find { ... }`
<Areessell>
No wait
<Areessell>
Meh not really, it looks fine
gr33n7007h has joined #ruby
<Areessell>
What was wrong with using `rout.gets`? Did it throw an error or something?
<shevy>
woot.gets !
diego_ar has joined #ruby
joonty has quit [Quit: Leaving]
<Areessell>
Meh, I'm off
yfeldblum has quit [Ping timeout: 244 seconds]
shvelo has quit [Ping timeout: 240 seconds]
Areessell is now known as Areessell[ZZZ]
bluOxigen has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<Areessell[ZZZ]>
Just a thought, should make a github crawler who's sole job is to find the method with the most underscores in the name and other completely useless facts
tkuchiki has joined #ruby
<shevy>
yes
<shevy>
IceDragon suggested that too
<shevy>
I'll put this into my todo file
<shevy>
I also have a temporary name for it ... class JokeStats
shortCircuit__ has quit [Remote host closed the connection]
BaconOverflow has quit [Quit: Connection closed for inactivity]
paulfm_ has joined #ruby
webgen has quit [Ping timeout: 255 seconds]
arup_r has quit [Remote host closed the connection]
DaniG2k has joined #ruby
DaniG2k has quit [Client Quit]
tkuchiki has quit [Ping timeout: 272 seconds]
tesaf has joined #ruby
_5kg_ has quit [Ping timeout: 255 seconds]
chinmay_dd has joined #ruby
uber_hulk has quit [Ping timeout: 250 seconds]
diego_ar has quit [Remote host closed the connection]
wsmoak has quit [Quit: wsmoak]
shvelo has joined #ruby
joonty has joined #ruby
diego_ar has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ConstantineXVI has quit [Remote host closed the connection]
corehook has joined #ruby
ConstantineXVI has joined #ruby
upp3r has joined #ruby
mynameisbrian has joined #ruby
<apeiros>
MasterPiece: don't mix sudo and non-sudo gem installations.
<mynameisbrian>
I really can't decide whether I should learn Ruby or Python, this is difficult. there are many pros and cons for both
<MasterPiece>
apeiros, Thanks! your answer was helpful to me :)
linojon has joined #ruby
ringarin has quit [Read error: Connection reset by peer]
<mynameisbrian>
if anyone has any good links comparing the languages send them my way
beef-wellington has joined #ruby
francisfish has quit [Remote host closed the connection]
ringarin has joined #ruby
timonv_ has quit [Remote host closed the connection]
Kricir has joined #ruby
doki-worry has joined #ruby
Taranis has joined #ruby
francisfish has joined #ruby
sambao21 has joined #ruby
i8igmac has quit [Ping timeout: 250 seconds]
Stoge88 has joined #ruby
ringarin has quit [Read error: Connection reset by peer]
ebbflowgo has joined #ruby
mynameisbrian has quit [Quit: Page closed]
adriancb has quit [Ping timeout: 244 seconds]
francisfish has quit [Ping timeout: 255 seconds]
jonr22 has joined #ruby
jheg has quit [Ping timeout: 244 seconds]
mattmcclure has joined #ruby
adriancb has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
rkalfane has joined #ruby
corehook has quit []
j2p2 has joined #ruby
shvelo has quit [Ping timeout: 272 seconds]
moritzs has joined #ruby
jonr22 has quit [Ping timeout: 240 seconds]
Stoge88 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
adriancb has quit [Ping timeout: 264 seconds]
bmichelsen has joined #ruby
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tranquility has quit [Quit: Connection closed for inactivity]
adriancb has joined #ruby
mary5030 has joined #ruby
j2p2 has quit [Ping timeout: 256 seconds]
mary5030 has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
moritzs has quit [Ping timeout: 252 seconds]
mary5030 has joined #ruby
noaon has joined #ruby
nrsk has joined #ruby
robertt_dex has joined #ruby
yalue has joined #ruby
noop has quit [Ping timeout: 256 seconds]
bMalum has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
ccal has joined #ruby
posixpascal has joined #ruby
Stoge88 has joined #ruby
sk87 has joined #ruby
maestrojed has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
allcentury has joined #ruby
karmatr0n has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
Linuus has quit [Ping timeout: 240 seconds]
doki-worry has quit [Ping timeout: 272 seconds]
startupality has joined #ruby
sevenseacat has quit [Remote host closed the connection]
tjbiddle has joined #ruby
uber_hulk has joined #ruby
gsd has joined #ruby
jobewan has joined #ruby
MattB2 has joined #ruby
tagrudev has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 265 seconds]
Photism has joined #ruby
thsig_ has quit [Remote host closed the connection]
thsig has joined #ruby
doki-worry has joined #ruby
uber_hulk has quit [Client Quit]
Takle has quit [Read error: Connection reset by peer]
klmlfl has joined #ruby
Takle has joined #ruby
klmlfl has quit [Remote host closed the connection]
iaj has quit [Ping timeout: 272 seconds]
Stoge88 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta has joined #ruby
Timgauthier is now known as timgauthier_away
axl_ has joined #ruby
timonv_ has joined #ruby
survili_ has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Stoge88 has joined #ruby
dopie has quit [Remote host closed the connection]
chinmay_dd has quit [Quit: Leaving]
rylev has quit [Remote host closed the connection]
rylev has joined #ruby
shock_one has quit [Quit: Be back later ...]
elaptics is now known as elaptics`away
doki-worry has quit [Ping timeout: 250 seconds]
vinleod has joined #ruby
elaptics`away is now known as elaptics
yfeldblum has joined #ruby
arup_r has joined #ruby
<survili_>
hi @all, I'm using a gem that uses HTTParty. The gem's main class is defined as follows: "module Namecheap;class Client; include HTTParty"(; is newline). I've created the instance of the gem using "api = Namecheap::Client.new(x,y)" and I need to use a method "default_timeout" which is part of HTTParty. When I call in on my object "api.default_timeout" I get "undefined method" error. My question is, how can I access "default_timeout"
rylev has quit [Ping timeout: 252 seconds]
yfeldblu_ has joined #ruby
kapil__ has quit [Quit: Connection closed for inactivity]
hanmac1 has quit [Quit: Leaving.]
rippa has joined #ruby
SCHAAP137_ has joined #ruby
kwd has quit [Quit: Sleeping now. ZZZzzz…]
duplex has quit [Ping timeout: 250 seconds]
Linuus has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
SCHAAP137 has quit [Ping timeout: 265 seconds]
Takle_ has joined #ruby
yfeldblu_ has quit [Ping timeout: 258 seconds]
upp3r has quit [Quit: upp3r]
32NAAK9JA has quit [Remote host closed the connection]
dol37_ has joined #ruby
nateberkopec has joined #ruby
bMalum has quit [Quit: bMalum]
charliesome has quit [Quit: zzz]
AlexRussia has joined #ruby
Takle has quit [Ping timeout: 272 seconds]
anarang has quit [Quit: Leaving]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shazaum has quit [Quit: Leaving]
j2p2 has joined #ruby
it0a has joined #ruby
krz has joined #ruby
tobago has quit [Remote host closed the connection]
<ericwood>
survili_: looking at the docs I don't see any mention of "Client"
<survili_>
ericwood: I'm using another gem, that uses HTTParty. And it's gem's class definition goes as I wrote "module Namecheap;class Client; include HTTParty"(; is newline).
<ericwood>
it'd be cool if you told us what the gem was
<survili_>
ericwood: and then I create my object "api = Namecheap::Client.new(x,y)" . And here I need default_timeout
iaj has joined #ruby
rshetty has quit [Remote host closed the connection]
<ericwood>
survili_: according to the docs timeout is a class method
<ericwood>
not an instance method
madbytes has joined #ruby
paulfm_ has quit []
francisfish has joined #ruby
ctp has joined #ruby
francisfish has quit [Read error: Connection reset by peer]
<madbytes>
I installed ruby2.1 on win7 from rubyinstaller.org. Now when i try to install any gem. it shows this error: http://pastie.org/pastes/9754314/text Any help?!
Guest84036 is now known as C0deMaver1ck
francisfish has joined #ruby
<gregf_>
survili_: whats does Namecheap::Client::instance_variables print?
dblessing has joined #ruby
paulfm_ has joined #ruby
<dblessing>
hey all. can you recommend a good (preferably free) online resource for a student to learn ruby?
rippa has quit [Read error: Connection reset by peer]
<redjack1964>
which GUI toolkit is more used in Ruby?
<ericwood>
redjack1964: Shoes
<survili_>
ericwood: so, I need to modify the gem(3rd party), the one that uses HTTParty ?
<madbytes>
This is really weird. cannot find any resources to guide with the error, even on google!
<ericwood>
survili_: you can probably pop open the class and add attr_accessor
<ericwood>
but that's weird and scary
<ericwood>
there's probably a better way to do this
hamakn has joined #ruby
<survili_>
ericwood: pop open ? i.e. monkey patch ?
thsig has quit []
shock_one has joined #ruby
<ericwood>
yepyepyep
mkaesz has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
<survili_>
ericwood: got it :( . btw, what would have been the correct way for the gem developer to expose all the functionality of HTTParty ? would he have to go over every single method and put attr_accessor ?
diegovio1 has joined #ruby
<redjack1964>
ericwood, thanks
diegovio1 is now known as diegovio1a
<ericwood>
survili_: not 100% sure off the top of my head but I'm splitting my time between this and work so I don't have chance to give it a good hard look :)
upp3r has joined #ruby
<survili_>
ericwood: ok, thanks a lot! As I'm not ruby expert yet, I though maybe I was missing something. Thanks a lot again
<ericwood>
np
TPBallbag has quit [Remote host closed the connection]
msgodf has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 265 seconds]
adriancb has joined #ruby
bMalum has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Spami has quit [Quit: This computer has gone to sleep]
mleone has joined #ruby
<redjack1964>
ericwood, i just installed shoes through gem but i don't have the `shoes` command to execute code
<ericwood>
redjack1964: iirc you just run your program via the ruby command like any other ruby code
joonty has quit [Quit: Leaving]
joncol has joined #ruby
SCHAAP137 has joined #ruby
<redjack1964>
ericwood, Sorry, this gem currently does nothing. Team Shoes is working on Gemifying Shoes, and this is just a placeholder until then.
<ericwood>
redjack1964: ah okay, I haven't worked with it so I wasn't sure
dumdedum has joined #ruby
<ericwood>
redjack1964: Ruby has Tk bindings, although they may not be advanced enough for what you want to do
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ericwood>
there's probably also GTK bindings as well via a gem
rylev has joined #ruby
<ericwood>
honestly, for GUI work Ruby isn't the greatest choice :\
fedexo has quit [Read error: Connection reset by peer]
<joncol>
I'm updating a project from 1.8.6 to 1.9.3, and I ran into some problems with String#hash. In 1.8.6 "hello".hash returns the same thing every time, but in 1.9.3, it seem to vary randomly... Can anyone explain this behavior?
<redjack1964>
ericwood, i think Qt is better than theses lasts one :)
<workmad3>
ericwood: I think they seeded it so as to avoid some attacks based on being able to predict the hash values and force collisions
<workmad3>
ericwood: so if they moved to a consistent hash that provided the same advantage, that would likely mean SHA256 or better... and then it starts to get a bit expensive for such a heavily used calculation ;)
<ericwood>
yepyepyep!
<workmad3>
(hell, MD5 is probably too expensive for that)
CustosLimen has quit [Ping timeout: 258 seconds]
rockdon has quit [Ping timeout: 258 seconds]
ikaros has quit [Quit: Ex-Chat]
Darryl_ has joined #ruby
<rpag>
workmad3, that is the reason, there was a vulnerability for it years ago
<workmad3>
rpag: I had a vague recollection about seeing that vulnerability in a ruby weekly
<workmad3>
rpag: but not enough to confidently state it was the reason for seeding :)
<alex88>
hi guys, I've this module and spec file https://gist.github.com/alex88/1ba36bc70bd2b106c3a2 problem is, after configuring ImageStore in second spec the third always fails, is there a way to reset the class between those tests
<alex88>
?
<alex88>
or any other useful best practice
anaeem1_ has quit [Remote host closed the connection]
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rpag>
httparty is the wrapper around net/http right?
eichenwald has joined #ruby
dfinninger has joined #ruby
<workmad3>
survili_: for your situation, considering how inactive that repo is, I'd suggest simply forking the repository into your own github repo and modifying that line I just linked you to so that it passes the :timeout option into self.class.get
upp3r has joined #ruby
<workmad3>
survili_: and then install the gem from your github fork (I'm assuming you're using bundler and so can do that easily)
<survili_>
workmad3: ok, so no way for me to call default_timeout without monkey patching correct ?
<workmad3>
rpag: pretty much, yeah
qba73 has quit []
<ericwood>
workmad3: do you think making attr_accessor on that variable would be valid?
<ericwood>
I think monkeypatching it is more fun :)
<workmad3>
survili_: you may also be able to simply do 'Namecheap::Client.default_timeout 10' btw
<robertt_dex>
alex88: remove_class_variable before :each
<workmad3>
survili_: if you just have a static timeout you want to apply
<workmad3>
ericwood: it's not an instance-level attribute, so no attr_accessor would not be valid
joncol has quit [Quit: leaving]
<ericwood>
yeah I guess so :\
jonr22 has joined #ruby
MattB2 has quit [Ping timeout: 245 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<survili_>
workmad3: that worked!! that's what I was looking for :) got it now! in C++(my roots), if you call "static" method on object, it works fine, in ruby it's not..
<workmad3>
survili_: yeah, class methods aren't in the lookup chain for instances in ruby ;)
ghostmoth has joined #ruby
<robertt_dex>
alex88: you would probably want to check if class_variable_defined? before call remove
sambao21 has joined #ruby
<ericwood>
what's the coolest way to add elements from an array to the beginning of another array
<ericwood>
currently doing this:
<workmad3>
survili_: partly because who would know when to stop at that point :)
<survili_>
workmad3: thanks a lot! btw, you mentioned above "self.class.get", it's really confusing. what is it for ? is it some kind of idom/pattern ?
<workmad3>
ericwood: I quite like your splat :)
ponga has quit [Quit: Leaving...]
<ericwood>
it's pretty awesome, right?!
livathinos has joined #ruby
<robertt_dex>
np alex88. PM me if you have specific problems with your code.
<ericwood>
array concatenation makes sense, I feel dumb now
<workmad3>
survili_: 'self.class' calls the 'class' method on self
vyorkin has joined #ruby
<ericwood>
although it's not as sexy
Channel6 has joined #ruby
<alex88>
robertt_dex: thanks a lot for the help! it works fine btw ;) maybe I could either clear @client during the configuration part
<workmad3>
survili_: so 'self.class.whatever' is an idiom for calling a class method from an instance method in ruby, without needing to hard-code the class name
<alex88>
I'm not sure anyone would run configure 2 times
benzrf|offline is now known as benzrf
<survili_>
workmad3: coool! neat, thanks a lot
robustus is now known as robustus|Off
chinmay_dd has joined #ruby
<workmad3>
alex88: 'not sure anyone would do X' <-- expect X to be the most common thing anyone ever complains about
sailias has quit [Read error: Connection reset by peer]
sailias1 has joined #ruby
sailias1 is now known as sailias
<robertt_dex>
alex88: make it idempotent would be good, but... don't waste time with it if you really dont need it.
<robertt_dex>
alex88: may be a warn
<alex88>
workmad3: in my case is a library and the config is done in the initializers, btw as robertt_dex adviced, maybe I'm going to remove the actual client class when re-running the configure method
jonr22 has quit [Ping timeout: 244 seconds]
beilabs_________ has quit [Quit: Be back later ...]
Timgauthier has joined #ruby
<workmad3>
alex88: in that case, I beg you to not create a client library that only allows a single instance to be created in a ruby process
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<alex88>
workmad3: so work as an Instantiable class and define the instance as global variable in the initializer?
allcentury has quit [Ping timeout: 258 seconds]
noaon has quit [Quit: WeeChat 1.0.1]
<workmad3>
alex88: or, much more preferably, give sample code using connection_pool to show how to create a thread-safe pool of clients that you can check out ;)
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
<workmad3>
alex88: that way you don't screw over people who run multi-threaded clients or servers using your library ;)
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alex88>
workmad3: shouldn't people using multi-threaded things instanciate a client for each thread?
<workmad3>
alex88: that's what connection_pool does
dkphenom has joined #ruby
gsd has joined #ruby
dkphenom has quit [Client Quit]
kidoz has joined #ruby
<workmad3>
alex88: and if you've got a setup process that only allows the creation of a single client... you just screwed over every multi-threaded app out there :P
timonv^ has joined #ruby
geggam has joined #ruby
<alex88>
well making it an instanciable class let you have n clients
chinmay_dd has quit [Quit: Leaving]
<workmad3>
alex88: at which point, I'd still use connection_pool... but I'd be forced into using it to make sure only 1 thread was accessing the client at a time ;)
claudiuinberlin has joined #ruby
claudiuinberlin has quit [Client Quit]
<alex88>
ok gotcha, gonna have a look at that! thanks a lot man!
<redjack1964>
qtbindings (4.8.6.0 ruby x86-mingw32) does x86-mingw32 means it is available only for Windows?
<ericwood>
redjack1964: it's there to support it on windows most likely
<ericwood>
the github page shows it supports a ton of platforms
jfran has joined #ruby
JimmyNeutron has quit [Quit: Leaving]
upp3r has left #ruby [#ruby]
<workmad3>
redjack1964: that says that there's a 4.8.6.0 for plain ruby, and a specific build for x86-mingw32
lemur has joined #ruby
vyorkin has quit [Ping timeout: 245 seconds]
<workmad3>
redjack1964: the plain ruby version will have native extensions that should compile on most *nix platforms (as long as you have QT dev headers and libraries available, I suspect)
rylev has joined #ruby
<workmad3>
redjack1964: but getting a sane compilation toolchain on windows can be difficult to impossible... so it's fairly common for gems with native extensions to provide pre-built binaries for windows under the x86-mingw32 platform
ta has quit [Remote host closed the connection]
alex88 has quit []
shvelo has joined #ruby
anaeem1 has joined #ruby
fedexo has quit [Ping timeout: 255 seconds]
survili_ has quit [Quit: Page closed]
<redjack1964>
workmad3, ok :)
<gregf_>
ericwood: php guys would do this: a,b = [1,2,3],[4,5,6];while 1; a.unshift(b.pop); break if b.length == 0;end; a :/
<ericwood>
kill me now
anaeem1 has quit [Remote host closed the connection]
<workmad3>
rpag: why couldn't they have just used :: like so many other languages? :P
<shevy>
one \ is better than two chars though
eindoofus_ has joined #ruby
<workmad3>
rpag: other than because they'd already been idiotic morons and used :: for something else? :)
<shevy>
why is there a leading \ though?
<rpag>
workmad3, i dont think it was technically possible
<rpag>
yeah
St_Marx has quit [Quit: WeeChat 1.0.1]
<havenwood>
i think a better delimiter for them would have been: (╯°□°)╯
troyready has joined #ruby
<rpag>
hahahaha
<workmad3>
how about `rm -rf`?
<workmad3>
err, `rm -rf /`
St_Marx has joined #ruby
<workmad3>
that would have been a fun 'namespace delimiter' >:D
<eindoofus_>
hi, i'm learning the ruby language and i was just wondering if there is any major difference between 2.0.0 and 2.1.5 that would affect my studies?
<ericwood>
workmad3: love the inject solution
<jhass>
rm -rf .* is much better
mary5030 has quit [Remote host closed the connection]
lemur has quit [Read error: Connection reset by peer]
<workmad3>
jhass: `ls -a /**/* | rm -f`? :D
<jhass>
.* already does that
<rpag>
starting to look like namespaces in perl now
<jhass>
matches ..
<jhass>
and recurses into that
lemur has joined #ruby
<eindoofus_>
jhass, already have 2.0.0 installed. will eventuall install 2.1 but i don't want to waste time with the environment right now if possible
<jhass>
sure, go ahead
deric_skibotn has joined #ruby
<eam>
workmad3: why the two stars?
andikr has quit [Remote host closed the connection]
<havenwood>
eindoofus_: 2.0 is fine for learning. It's a short list of changes to catch up to 2.1.
<eindoofus_>
thanks
<havenwood>
nothing to unlearn, your code will work in 2.1 ;)
stunder has joined #ruby
NoNMaDDeN has quit [Quit: Leaving...]
devoldmx has quit [Ping timeout: 258 seconds]
<workmad3>
eam: so I could drop the -r from rm and rely on ls to keep on going in the presence of permission issues (not sure rm -rf does anything if you don't have permission for the starting point)
sambao21 has quit [Quit: Computer has gone to sleep.]
devoldmx has joined #ruby
<shevy>
try rm -rf /*
<rpag>
it roots your machine, and then proceeds to delete everything when that happens
ki0 has quit [Ping timeout: 264 seconds]
drager has quit [Ping timeout: 265 seconds]
<workmad3>
shevy: ooh... should I use that with sudo, yeah? :D
<shevy>
workmad3 no, sudo users must not use dangerous code
drager has joined #ruby
<workmad3>
shevy: aww, you ruin all my fun :(
<eam>
workmad3: I mean, ** is the same as * inside ``
<shevy>
eam knows all the ancient tricks
<eam>
(also, you need xargs)
<shevy>
he was there when unix was born
xymbol has joined #ruby
livingstn has quit [Ping timeout: 256 seconds]
lemur has quit [Ping timeout: 258 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<workmad3>
eam: 'ls *' and 'ls **/*' return very different things inside `` on my machine :/
sambao21 has joined #ruby
<shevy>
one returns cats
<shevy>
the other one candy
<workmad3>
oh... but same as 'ls */*'... I see what you mean
rockdon has quit [Ping timeout: 258 seconds]
<shevy>
will there be a x-mas release of ruby?
shvelo has quit [Ping timeout: 240 seconds]
allcentury has joined #ruby
bricker`work has joined #ruby
<eam>
workmad3: nope, they are identical
<eam>
echo *|md5 ; echo **|md5
alaa has quit [Ping timeout: 252 seconds]
<eam>
unless your machine has some crazy non-bourne shell /bin/sh
<workmad3>
eam: echo **/*|md5
<eam>
workmad3: ** and * are the same, the / doesn't matter
<benzrf>
ive been bourne again
<shevy>
the more * the better
<eam>
in zsh ** recurses, but /bin/sh isn't zsh
<shevy>
let's consolidate on ***
<workmad3>
eam: ah... I use zsh :)
centrx has joined #ruby
<shevy>
benzrf you have the monad shell
<eam>
shevy: also the same as *!
<eam>
workmad3: yeah, but you won't get zsh in ruby ``
mjuszczak has joined #ruby
Channel6 has quit [Quit: Leaving]
<workmad3>
eam: I do :P
tadassce has joined #ruby
mityaz has quit [Quit: Leaving]
<ericwood>
you can do `zsh`
<workmad3>
eam: but I agree that you can't rely on it universally
<eam>
workmad3: did you replace /bin/sh on your system?
<workmad3>
nope
<ericwood>
you use chsh
<ericwood>
or change the login stuffs
<workmad3>
I used chsh, yeah
Hijiri has joined #ruby
gmas has joined #ruby
<eam>
chsh will not change ruby's 11
<eam>
``
<eam>
doesn't matter
<eam>
your login shell is unrelated to the shell ruby uses to parse backticks
<ericwood>
exactly
<ericwood>
but you can tell code to execute with zsh
einarj has quit [Remote host closed the connection]
<ericwood>
`code | zsh`
<eam>
sure, or use other symbols or any other number of things which weren't used above :)
<Solsist>
hello everybody! i am new to ruby, i would like to ask you if i can promt the user for entering an integer and let ruby to create as many arrays as the integer promted by the user, and every array with Random.rand...
<wasamasa>
yes
rockdon has joined #ruby
<centrx>
yes, you can
<workmad3>
eam: I think this is getting rather too pedantic for a flippant suggestion about PHP being idiotic btw ;)
ghr has quit [Ping timeout: 258 seconds]
<eam>
you can run php in ``~
allcentury has quit [Ping timeout: 258 seconds]
oleo__ has joined #ruby
<Solsist>
thank you something like puts"...." n=gets.chomp
<workmad3>
eam: yeah... my suggestion was that the `` thing should be used by PHP for namespace separators
<Solsist>
and then?
<workmad3>
eam: so it wasn't really regarding ruby anyway :P
pwh has quit []
jerius_ has joined #ruby
<workmad3>
eam: and I hadn't exactly bothered to make sure it was something that would work universally either ;)
gmas has quit [Client Quit]
<shevy>
Solsist yes. one step at a time. via gets, you get user input. that is step #1
oleo__ has quit [Read error: Connection reset by peer]
sea_local has joined #ruby
<jhass>
Solsist: convert it to an integer, have a look at the docs for the String class
<shevy>
now you have finished step #1, it is time to go to step #2. you need to take that input, and create n arrays
<workmad3>
eam: but still... it seems that you're right, `` just hadn't changed the $SHELL value while still parsing with /bin/sh
<Solsist>
yeah thats where i got stuck
<shevy>
Solsist here is an example of creating a 5x5 matrix
<workmad3>
work_op: fair enough... I think it's a slightly older book though, btw... enumerators have changed quite a bit in recent versions of ruby
lifenoodles has joined #ruby
<work_op>
i picked this one up because Matz's name is on it, but I'm more than open to something up to date. I def want to be up to date
kiyote23 has quit [Ping timeout: 250 seconds]
dANO has quit []
sailias1 has quit [Read error: Connection reset by peer]
sailias has joined #ruby
boombadaroomba has joined #ruby
S3thc0n has joined #ruby
n1lo has quit [Client Quit]
n1lo has joined #ruby
adriancb has quit [Remote host closed the connection]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
Narzew has joined #ruby
freerobby has joined #ruby
noop has joined #ruby
dfinninger has quit [Remote host closed the connection]
checkit has joined #ruby
vyorkin has joined #ruby
testing123 has joined #ruby
CustosLimen has joined #ruby
ConstantineXVI has quit []
diego_ar is now known as diego_ar|AFK
konsolebox has joined #ruby
rylev has quit [Remote host closed the connection]
rylev has joined #ruby
psy has quit [Disconnected by services]
psy_ has joined #ruby
testing123 has quit [Ping timeout: 258 seconds]
beef-wellington has quit [Ping timeout: 258 seconds]
j_mcnally has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
sambao21 has quit [Quit: Computer has gone to sleep.]
Jake232 has joined #ruby
psy_ has quit [Max SendQ exceeded]
j_mcnally has quit [Read error: Connection reset by peer]
tibbon has joined #ruby
psy_ has joined #ruby
fabrice31 has joined #ruby
<havenwood>
work_op: you have the 1.9 version of The Ruby Programming Language, yeah?
rylev has quit [Ping timeout: 265 seconds]
<havenwood>
that's a good book
<havenwood>
'the Sparrows'
<tibbon>
Looking through the Ruby source; where is the unary operator method defined for usage in symbol to proc? (&:reverse) I see the sym_to_proc in string.c
<work_op>
i was using 2.1, just because it's the latest
sambao21 has joined #ruby
<jhass>
tibbon: yes, & calls .to_proc on its operand, you can't completely redefine it
<havenwood>
work_op: as long as the book is 1.9+ everything's copacetic
wallerdev has joined #ruby
ixti has quit [Ping timeout: 272 seconds]
AlexRussia is now known as AlexFromNowhere
ghr has joined #ruby
<jhass>
tibbon: so you got the right method
arclitgold has joined #ruby
allcentury has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<work_op>
i figured as much. so whats the best book then? like i said, i chose matz since he's an authority figure, but im open
<tibbon>
jhass: Mostly looking to see how they made it happen, out of curiosity. I see where they define the .to_proc method, but not the & operator in the C code
circ-user-cnelk has quit [Ping timeout: 265 seconds]
fabrice31 has quit [Ping timeout: 240 seconds]
sarlalian has joined #ruby
<havenwood>
work_op: i like the book you have (assuming it's the one i'm thinking of). was just confirming it is the Sparrow you're talking about.
weemsledeux has quit [Read error: Connection reset by peer]
Eiam has joined #ruby
nkumari has joined #ruby
<havenwood>
i didn't notice that ruby-2.2.0-preview2 came out over the weekend
testing123 has quit [Client Quit]
<adam12>
I'm using self.inherited(base) and base.class_eval to ensure included modules are available in subclasses. Does this sound right? I would assume including in the super class would make the methods available in subclasses.
anaeem1_ has quit [Remote host closed the connection]
karmatr0n has quit [Ping timeout: 240 seconds]
anaeem1_ has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tibbon has joined #ruby
karmatr0n has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
<centrx>
Try and enjoy programming with Ruby 2.2.0-preview2, and report us your knowledge!
<centrx>
adam12, You shouldn't need to do anything special to make mixin methods be available in subclasses?
beef-wellington has joined #ruby
ixti has joined #ruby
graydot has joined #ruby
<adam12>
centrx: That was my thoughts, but just using Class#include inside the super class isn't making the mixin methods available in the subclasses.
mjuszczak has quit []
karmatr__ has joined #ruby
ValicekB has quit [Ping timeout: 258 seconds]
karmatr0_ has quit [Ping timeout: 244 seconds]
devoldmx has quit [Ping timeout: 244 seconds]
devoldmx has joined #ruby
karmatr0n has quit [Ping timeout: 255 seconds]
kaspertidemann has joined #ruby
<Hanmac>
adam12: what methods are you talking about? can you show us an example?
<adam12>
Let me put something together quick.
robustus|Off is now known as robustus
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
yfeldblum has joined #ruby
<fxn>
adam12: that happens if there's one level of indirection, that is, if you include a module in a mixin
ValicekB_ has joined #ruby
livathinos has quit []
mityaz has joined #ruby
rshetty has joined #ruby
<fxn>
so, if M is include in C, and after that you include N in M, C instances do not respond to the methods in N (which is kind of incosistent)
gregf has joined #ruby
ta has joined #ruby
kenichi has joined #ruby
ValicekB_ is now known as ValicekB
MatthewsFace has joined #ruby
<evanjs>
mmmmm meds
<adam12>
fxn: Thanks. I didn't realize that.
gsd has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
sinequanon has joined #ruby
<adam12>
Anyways, I can't reproduce my issue now. Just calling Class#include inside the base class without any Class.inherited magic works as I assumed it would.
<fxn>
adam12: it's a gotcha, Ruby linearizes the ancestor chain, and does not update it if included modules get their own chain modified, modules in MRI do not have links back to where they are included to be able to update
<fxn>
if method lookup was truly dynamic, those methods should be found
rshetty has quit [Ping timeout: 245 seconds]
ta has quit [Ping timeout: 250 seconds]
vyorkin has joined #ruby
nkumari has quit [Remote host closed the connection]
Soda has joined #ruby
tsyan has joined #ruby
alex88 has quit []
TPBallbag has joined #ruby
livathinos has joined #ruby
devoldmx has quit [Ping timeout: 258 seconds]
dkphenom has joined #ruby
adriancb has joined #ruby
workmad3 has quit [Ping timeout: 258 seconds]
tiagonobre___ has quit []
vyorkin has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
TPBallbag has quit [Remote host closed the connection]
tiagonobre___ has joined #ruby
tiagonobre___ has quit [Client Quit]
jdj_dk has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
iamninja has quit [Remote host closed the connection]
econerd4ever has joined #ruby
<tsyan>
Does anyone know why '&' was chosen as the operator for Ruby's symbol-to-proc implementation?
<tsyan>
For example some_objects.map(&:foo). I understand that '&' is the unary ampersand, that it's calling .to_proc on :foo, and then passes the resulting block { |x| x.foo } as the argument to the .map method.
<tsyan>
I understand what's going on, but I want to know why it makes sense to use '&' for this functionality rather than some other symbol or word.
<jhass>
which symbol would make more sense in your opinion?
<tsyan>
(sorry for extra lines, pasted from Sublime)
anaeem1_ has joined #ruby
<havenwood>
tsyan: there're only so many symbols
vyorkin has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood>
that are only a shift away*
<tsyan>
but & already has lots of meanings
ndrei has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tsyan>
jhass: not sure what I would choose instead. probably a word.
<Hanmac>
tsyan: there are only a few symbols that can be typed with the qwerty keyboard ... and its not a problem to reuse operators if it does make sense
jonr22 has joined #ruby
pawprint has joined #ruby
Timgauthier is now known as timgauthier_away
<tsyan>
sure, but why pick that one? it sounds like you're saying it was picked at random, and I would guess that wasn't the case.
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ixti has quit [Ping timeout: 245 seconds]
<Hanmac>
tsyan: i already have a problem with the "->" stabby lambda ...
tibbon has joined #ruby
AlexFromNowhere is now known as AlexRussia
baweaver has joined #ruby
<Hanmac>
tsyan: and it was good that it was a one-symbol operator used for the block/proc thing, otherwise you would save less chars from it
freerobby has quit [Quit: Leaving.]
kaspertidemann has quit []
<tsyan>
hanmac: yup, I agree, but that doesn't answer the underlying question
freerobby has joined #ruby
sinequanon has quit []
nkumari has joined #ruby
jonr22 has quit [Ping timeout: 240 seconds]
livathinos has quit []
sambao21 has joined #ruby
baweaver has quit [Remote host closed the connection]
<tsyan>
@shevy off the top of my head, maybe ^, as it only has one other common meaning which is exponent, and it's fairly obvious exponents wouldn't apply. ^ also seems to indicate converting to something because it's somewhat arrow-like. It's a tenuous connection, sure, but I'd say it's better than & which already has a strong meaning of joining two thin
<tsyan>
gs.
<shevy>
hmm
<rpag>
shevy, before 25th
<shevy>
array.map(^:to_s)
<peteyg>
Is there a way to tell Ruby execute a certain block of code for x amount of time? Semantically, I want to do something like: "Execute { block } for 5000 milliseconds. If it did not return in that time, throw Timeout error."
<bulters>
Is this the right place to ask about license stuff for Gems?
ghr has quit [Ping timeout: 250 seconds]
<shevy>
bulters you could try #rubygems - the caretakers are on that channel like drbrain
<bulters>
shevy: thanks, will try
<shevy>
and he is not here on #ruby :(
<shevy>
neither is chris2 ... nor manveru ... there are a lot of people on other channels but not on #ruby ...
<rpag>
he's with the cool kids in #ruby-lang
<shevy>
yeah
<shevy>
our enemies
mjuszczak has quit []
<shevy>
the SPLITTERS
x1337807x has joined #ruby
<bulters>
omg... fractions within fractions
<peteyg>
What's the difference between this channel and ruby-lang?
<shevy>
from the popular people's front
<bulters>
peteyg: probably politics
<peteyg>
bulters: Oh :(
<bulters>
left-wing rubyist vs right-wing rubyists
<shevy>
peteyg we bringt light, they bring darkness!
dumdedum has quit [Quit: foo]
robustus|Off is now known as robustus
<bulters>
some prever (1..2).to_a, others prefer (*0..2)
<bulters>
erm [*0..2)
<bulters>
I'm away, learning to type again...
devoldmx has quit [Ping timeout: 245 seconds]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bayed has quit [Quit: Connection closed for inactivity]
<shevy>
peteyg in more seriousness, I think #ruby was registered first (not sure), the channel owner vanished or so, so #ruby-lang got used (I think) and somehow sticked to it ... but I might be totally wrong
rylev has quit [Ping timeout: 240 seconds]
<peteyg>
Huh, interesting.
devoldmx has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
<peteyg>
So I should lurk in both channels to get maximum ruby exposure :P?
anaeem1 has joined #ruby
<bulters>
peteyg: One can only handle a certain amount of exposure
<shevy>
peteyg I guess you'd get more discussion in total
<bulters>
I mean... rubies "radiate"... we all know too much radiation is bad for you
<peteyg>
Hahaha :P
<shevy>
for me it is too much to handle so I stick to #ruby only; plus I must register to talk on #ruby-lang and I can't do that
<havenwood>
bulters: don't forget the `3.times.to_a` folk!
<peteyg>
shevy: Why can't you register?
<bulters>
havenwood: arent those lurking in #rails?
<havenwood>
bulters: if it works without ActiveSupport, it is unholy!
<bulters>
true
<peteyg>
Wow, 3.times.to_a? Dang, that's a thing? Learned something new today...
<bulters>
peteyg: know it, forget it... :P
razieliyo has joined #ruby
nik_-_ has quit [Quit: nik_-_]
valeriansaliou has joined #ruby
anaeem1 has quit [Ping timeout: 240 seconds]
econerd4ever has quit [Remote host closed the connection]
yfeldblum has joined #ruby
econerd4ever has joined #ruby
<bulters>
havenwood: talking about falling of the end-of-the-world... Is there a map of some kind which shows where ruby-land begins and rails-world ends?
dumdedum has joined #ruby
<havenwood>
bulters: it begins by going down the rabbit hole: gem install rails
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
robustus is now known as robustus|Off
shvelo has joined #ruby
sambao21 has joined #ruby
adriancb has joined #ruby
fabrice31 has joined #ruby
kiyote23 has quit [Remote host closed the connection]
some_stranger has joined #ruby
doodlehaus has joined #ruby
<some_stranger>
if you overload an array accessor, and then overload the []= method, does that second overload take into account the first?
tyll_ is now known as tyll
<rpag>
ruby doesnt have method overloading
<rpag>
it just redefines the method
<rpag>
first definition is lost
anaeem1 has quit [Remote host closed the connection]
The_NetZ has joined #ruby
jimmyhoughjr has joined #ruby
<some_stranger>
for arrays
fabrice31 has quit [Ping timeout: 256 seconds]
<some_stranger>
like def []
<rpag>
yeah it redefines the method
<some_stranger>
if i redefine [] and then define []=. does []= use the new [] or the old []
<some_stranger>
fine
anaeem1 has joined #ruby
<apeiros>
[]= is unrelated to []
anaeem1 has quit [Remote host closed the connection]
<apeiros>
they are separate methods
<crome>
they are 2 different methods
<rpag>
it doesn't use [] at all, but depends on your implementation of []=
<some_stranger>
i know that
<apeiros>
it's like asking "if I redefine foo, does bar use the old foo or the new"
<rpag>
it would use the new one, if you used it from []=
anaeem1_ has joined #ruby
<The_NetZ>
hrm.... question. I can compile 2.1.5 on archlinux for x86_64, i686, and mingw-w64, but trying the same against ruby trunk fails.
anaeem1_ has quit [Remote host closed the connection]
<apeiros>
and as rpag already said - if you redefine a method, the old one is gone
<apeiros>
so no matter from where you call it, the new one will be used.
<The_NetZ>
on extinit.c I get a helluvalotta undefined references to Init_{standardextshere}
aspires has quit []
jgrevich has quit [Quit: jgrevich]
Xeago has joined #ruby
jgrevich has joined #ruby
n1lo has quit [Quit: Leaving]
alvaro_o has quit [Quit: Ex-Chat]
rodfersou has quit [Quit: leaving]
Galas has joined #ruby
vyorkin has joined #ruby
mary5030 has joined #ruby
<The_NetZ>
I know what Init_bigdecimal is, for example. its the function that gets called when you require 'bigdecimal', but checking extinit.c on trunk and 2.1.5 shows the same code.... bit befuddling.
nkumari has quit [Remote host closed the connection]
perrier has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
some_stranger has quit [Ping timeout: 246 seconds]
cndiv has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
<ericwood>
glad we have a gem cache server here...
aspires has joined #ruby
iamninja has joined #ruby
yfeldblum has joined #ruby
<The_NetZ>
great.
chaos_ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
Hijiri has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
quimrstorres has joined #ruby
quimrstorres has quit [Remote host closed the connection]
nkumari has quit [Ping timeout: 244 seconds]
anaeem1_ has joined #ruby
<chaos_>
Hello, I'd like to implement something similar to this chess.com/explorer in Ruby, specifically the part where the pieces move around drag and drop, can someone recommend what technologies/classes I would need to achieve that
<s2013>
i cant seem to instlal gem
doki-worry has joined #ruby
<havenwood>
s2013: dns servers are being ddosed
<rpag>
havenwood, why?
<havenwood>
rpag: likely fun or profit. i'm not the one doing it! :P
<rpag>
if you want to be on the attacking side apparently you get a plane to china
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
n1lo has quit [Quit: Leaving]
<redjack1964>
what is this syntax ? button = Gtk::Button.new :label =>'Button'
<redjack1964>
:label => '..'
<redjack1964>
?
<rpag>
it's a hash literal
yfeldblum has joined #ruby
<rpag>
creates a Hash object
<redjack1964>
ah ok
<redjack1964>
thanks
<jjconti>
redjack1964: as first param of new
chrisja has joined #ruby
<jjconti>
it's the same as Class.new({label: 'Button'})
<redjack1964>
thank you for example
geggam__ has joined #ruby
beilabs_________ has quit [Ping timeout: 258 seconds]
beilabs_________ has joined #ruby
ctp has joined #ruby
rylev has joined #ruby
Milkweed has joined #ruby
geggam has quit [Disconnected by services]
geggam__ is now known as geggam
philpd has joined #ruby
<shevy>
redjack1964 hey you are learning ruby gtk
ringarin has joined #ruby
seanosaur has joined #ruby
pengin has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
<eam>
<?ruby
pengin has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elaptics is now known as elaptics`away
pwh has joined #ruby
pwh has quit [Client Quit]
weaksauce has joined #ruby
<shevy>
eam better than php!
robertt_dex has quit [Remote host closed the connection]
jdj_dk has joined #ruby
jackjackdrpr has joined #ruby
nyanz has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jackjackdrpr has quit [Max SendQ exceeded]
seanosaur has quit [Client Quit]
beilabs_________ has quit [Ping timeout: 264 seconds]
NGC3982 has joined #ruby
doki-worry has quit [Ping timeout: 264 seconds]
Trynemjoel has quit [Ping timeout: 265 seconds]
pengin has quit [Ping timeout: 252 seconds]
patrick99e99 has quit [Ping timeout: 252 seconds]
_1_mohammed2 has joined #ruby
<NGC3982>
I'm new to Ruby. I'm trying to install subbot (from git hub) and it tells me to 'bundle install'. It tries to connect to rubygems.org - which seems to be down.
<NGC3982>
Is there any way around it, or do i wait for the site to go up again?
<shevy>
NGC3982 yeah it is down, can't install gems from there right now
beilabs_________ has joined #ruby
<shevy>
in theory if you were to use non-rubygems.org gems, but not sure if there is a clean way to force that
* NGC3982
is not even sure why he needs more online content.
<NGC3982>
Ok.
<shevy>
you just need to fullfil the dependencies
<shevy>
I always keep gems I use locally too
<NGC3982>
Ok.
<_1_mohammed2>
:'(
<NGC3982>
The thing is, when the site is up i know i'll get an error message (i was originally about to contact you guys for).
anaeem1_ has quit [Remote host closed the connection]
<NGC3982>
But i'll wait.
<NGC3982>
Better not make bad things horribly more worse.
sambao21 has joined #ruby
<shevy>
that sounds exciting
<shevy>
to wait and wait - just for an error to come next
<jjconti>
there should be a mirror
philpd has quit [Ping timeout: 252 seconds]
<NGC3982>
shevy: I know. When i got it while installing the application last night i notet that the error message was horribly hard to google, and i did not really understand it.
<NGC3982>
But yes, i'll wait (or i'll have to re-install linux again).
ringaring has joined #ruby
Trynemjoel has joined #ruby
pwh has joined #ruby
aspires has quit []
pwh_ has joined #ruby
beilabs_________ has quit [Ping timeout: 265 seconds]
ringarin has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
anaeem1_ has joined #ruby
decoponio has quit [Quit: Leaving...]
pwh has quit [Read error: Connection reset by peer]
ringaroses2 has joined #ruby
ghr has joined #ruby
goodenough has quit [Remote host closed the connection]
ndrei has quit [Read error: Connection reset by peer]
beilabs_________ has joined #ruby
ndrei has joined #ruby
valeriansaliou has joined #ruby
Takle_ has quit [Read error: Connection reset by peer]
Takle has joined #ruby
linojon has quit [Quit: linojon]
_1_mohammed2 has quit [Quit: WhatsChat IRC Android APP]
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
goodenough has joined #ruby
felltir has joined #ruby
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
ringaring has quit [Ping timeout: 264 seconds]
AndyBotwin has joined #ruby
AndyBotwin has quit [Changing host]
AndyBotwin has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
jimmyy has joined #ruby
dr4 has joined #ruby
jrochkind has joined #ruby
diego_ar has quit [Remote host closed the connection]
theRoUS|afk|bbia is now known as theRoUS|bbia
theRoUS|bbia is now known as theRoUS
<dr4>
can anyone help me out with mod_ruby? ;_; tried 3 distros and nothing worked so far
<redjack1964>
rubygems.org is down :-(
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
beilabs_________ has quit [Ping timeout: 272 seconds]
<centrx>
dr4, I think mod_ruby is ancient and no one uses it
<jrochkind>
as far as security, I dont' know if there's any reason to choose one over the other, they all ought to be secure. (Aside from WEBrick, which just cause nobody uses it for production and it's not intended for such, might be more likely to have security problems)
peterhu_ has joined #ruby
sumark_ has joined #ruby
<jrochkind>
For ease of use with good performance, I personally like passsenger a lot.
iceden has quit [Remote host closed the connection]
kalleth_ has joined #ruby
jerrett_ has joined #ruby
heftig_ has joined #ruby
quazimod1 has joined #ruby
xsdg_ has joined #ruby
kish_ has joined #ruby
dazeddev_ has joined #ruby
<jrochkind>
passenger installs fine on centos, i've done it.
atta_ has joined #ruby
jzigmund_ has joined #ruby
triple_b_ has joined #ruby
qubit has left #ruby [#ruby]
byte48_ has joined #ruby
genpaku_ has joined #ruby
<dr4>
ok, thank you
jdj_dk has quit [Remote host closed the connection]
<dr4>
passenger it is then
vyorkin1 has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
<dr4>
did you use apache or nginx? or is that a stupid question?
<dr4>
because I'd like to use apache
Crazy_Atheist has quit [Ping timeout: 240 seconds]
ponga has quit [Ping timeout: 258 seconds]
<jrochkind>
not a stupid question. i use apache. many people use nginx. use whichever you already have and are comfortable with.
danijoo has joined #ruby
<jrochkind>
unless you feel like learning nginx, just use apache, sure.
<dr4>
hm, no, I like nginx
<dr4>
but I have only worked with apache so far
<jrochkind>
ha, you just said you'd like to use apache!
oleo__ has joined #ruby
s2013 has quit [Ping timeout: 252 seconds]
Prawnzy_ has joined #ruby
noop has quit [Ping timeout: 258 seconds]
<jrochkind>
you can use either one, both will work fine. nginx is thought to have better performance. the difference is probably of no account unless you are at a very large scale.
diego_ar has joined #ruby
tekacs has joined #ruby
blackgoat_ has joined #ruby
leslie_ has joined #ruby
cescalante has joined #ruby
<dr4>
yeah, it's not high demand
shtirlic_ has joined #ruby
tekacs is now known as Guest36707
Jello__Raptor has joined #ruby
mclee_ has joined #ruby
v0n has quit [Quit: WeeChat 1.0.1]
<jrochkind>
some people like nginx better, it's got somewhat more sane configuration and such. either will work fine with passenger.
mozzarel1 has joined #ruby
treehug88 has quit [Remote host closed the connection]
CpuID has quit [Quit: This computer has gone to sleep]
<jrochkind>
you have to recompile nginx to install passenger, since nginx doesn't have plugins. apache is probably simpler. i don't really know, i've only used apache.
eichenwald1 has joined #ruby
tzero_ has joined #ruby
it0a_ has joined #ruby
treehug88 has joined #ruby
lpaste_ has joined #ruby
<jrochkind>
passenger installation should be straightforward either way, the passenger team is really good at making things that Just Work.
v0n has joined #ruby
arrubin_ has joined #ruby
musicmatze1 has joined #ruby
M-Techni1 has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
JStoker has quit [Killed (wolfe.freenode.net (Nickname regained by services))]
JStoker has joined #ruby
rotor` has joined #ruby
benj1 has joined #ruby
arrubin_ is now known as arubin
ndrei has joined #ruby
stunder has quit [Ping timeout: 252 seconds]
mleone_ has joined #ruby
Narzew has quit [Ping timeout: 245 seconds]
pasv^_^_ has joined #ruby
ConstantineXVI has quit [Remote host closed the connection]
oleo__ has quit [Quit: Verlassend]
nkumari has quit [Remote host closed the connection]
SOLDIERz_ has quit [Quit: Be back later ...]
dopie has joined #ruby
greenis has quit [Quit: Leaving]
Crazy_Atheist has joined #ruby
mleone has quit [Ping timeout: 264 seconds]
bulters has quit [Ping timeout: 245 seconds]
duncannz has joined #ruby
goodenough has quit [*.net *.split]
Trynemjoel has quit [*.net *.split]
ctp has quit [*.net *.split]
lucianosousa has quit [*.net *.split]
baweaver has quit [*.net *.split]
vyorkin has quit [*.net *.split]
dfinninger has quit [*.net *.split]
devoldmx has quit [*.net *.split]
tiagonobre has quit [*.net *.split]
oleo has quit [*.net *.split]
eichenwald has quit [*.net *.split]
triple_b has quit [*.net *.split]
arrubin has quit [*.net *.split]
spastorino has quit [*.net *.split]
it0a has quit [*.net *.split]
j2p2 has quit [*.net *.split]
Photism has quit [*.net *.split]
maestrojed has quit [*.net *.split]
kish has quit [*.net *.split]
atta has quit [*.net *.split]
quazimodo has quit [*.net *.split]
exadeci has quit [*.net *.split]
bigkevmcd has quit [*.net *.split]
sumark has quit [*.net *.split]
Vile` has quit [*.net *.split]
bracky has quit [*.net *.split]
apeiros has quit [*.net *.split]
toretore has quit [*.net *.split]
comma8 has quit [*.net *.split]
kith has quit [*.net *.split]
jhc76 has quit [*.net *.split]
dazeddev has quit [*.net *.split]
hfp has quit [*.net *.split]
ht__th has quit [*.net *.split]
bennyDaBeard has quit [*.net *.split]
cescalante_ has quit [*.net *.split]
bestie has quit [*.net *.split]
huddy has quit [*.net *.split]
Prawnzy has quit [*.net *.split]
maZtah has quit [*.net *.split]
aspiers has quit [*.net *.split]
_whitelogger has quit [*.net *.split]
jonathanwallace has quit [*.net *.split]
Guest45628 has quit [*.net *.split]
pasv^_^ has quit [*.net *.split]
twistedpixels has quit [*.net *.split]
peterhu has quit [*.net *.split]
mclee has quit [*.net *.split]
rotor has quit [*.net *.split]
SpaceKookie has quit [*.net *.split]
amitchellbullard has quit [*.net *.split]
shtirlic has quit [*.net *.split]
chrisseaton has quit [*.net *.split]
heftig has quit [*.net *.split]
blackgoat has quit [*.net *.split]
MiracleBlue has quit [*.net *.split]
unclouded has quit [*.net *.split]
tzero has quit [*.net *.split]
jimeh has quit [*.net *.split]
byte48 has quit [*.net *.split]
jzigmund has quit [*.net *.split]
Dwarf has quit [*.net *.split]
RoryHughes has quit [*.net *.split]
mattjbarlow has quit [*.net *.split]
Jello_Raptor has quit [*.net *.split]
lpaste has quit [*.net *.split]
shevy has quit [*.net *.split]
M-Technic has quit [*.net *.split]
xsdg has quit [*.net *.split]
mozzarella has quit [*.net *.split]
jerrett has quit [*.net *.split]
genpaku has quit [*.net *.split]
musicmatze has quit [*.net *.split]
kalleth has quit [*.net *.split]
leslie has quit [*.net *.split]
snapcase has quit [*.net *.split]
last_staff has quit [Remote host closed the connection]
lucianosousa_ is now known as lucianosousa
Jello__Raptor is now known as Jello_Raptor
M-Techni1 is now known as M-Technic
Fire-Dragon-DoL has quit [Quit: Leaving.]
tiagonobre_ is now known as tiagonobre
failshell has joined #ruby
spastorino_ is now known as spastorino
stunder has joined #ruby
bestie_ is now known as bestie
exadeci_ is now known as exadeci
chrisseaton_ is now known as chrisseaton
ndrei has quit [Ping timeout: 258 seconds]
Narzew has joined #ruby
oleo__ has joined #ruby
comma8 has joined #ruby
Fire-Dragon-DoL has joined #ruby
econerd4ever has quit [Remote host closed the connection]
oleo__ is now known as oleo
vyorkin1 has quit [Quit: WeeChat 1.0.1]
havenwood has quit [Remote host closed the connection]
diego_ar has quit [Remote host closed the connection]
TinkerTyper has quit [Quit: ZNC restarting...]
beilabs_________ has quit [Ping timeout: 258 seconds]
MiracleBlue_ is now known as MiracleBlue
huddy_ is now known as huddy
beilabs_________ has joined #ruby
fabrice31 has joined #ruby
maZtah_ is now known as maZtah
jheg has joined #ruby
evanjs has quit [Remote host closed the connection]
_whitelogger has joined #ruby
_whitelogger has joined #ruby
<nateberkopec>
toertore: properties?
<apeiros__>
god I hate those assholes (the dos'ers)
<apeiros__>
toerte… :D
<toertore>
dosers are assholes, this is true
<jrochkind>
toertore: `about`? `metadata`?
Gadgetoid has quit [Ping timeout: 244 seconds]
<toertore>
nateberkopec: best one yet
<nateberkopec>
better probably to pick something based on the kind of data you were storing
<jheg>
banzrf nah I aint got leathery wings
<lucianosousa>
another DDos? hacksummit already said is that the problem with them today
nkumari has quit [Remote host closed the connection]
<toertore>
nateberkopec: it's arbitrary :)
<nateberkopec>
ouch
<nateberkopec>
lol
<toertore>
pretty much a shitty key/value store in a table
nkumari has joined #ruby
<nateberkopec>
Call it PropertyManager ;)
charliesome has joined #ruby
<jrochkind>
keys_and_values?
<nateberkopec>
not_a_hash
<toertore>
yeah
<jrochkind>
stored_values
<toertore>
mongos
freerobby has quit [Quit: Leaving.]
beilabs_________ has quit [Ping timeout: 256 seconds]
<jrochkind>
fields
epicmonkey has joined #ruby
mary5030_ has quit [Remote host closed the connection]
<toertore>
fields is a good one
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
<Rene>
nateberkopec: actually i was trying ton install a gem, and had trouble with getting to https://rubygems.org, so i thouvht that maybe my ruby-install was too old.. apparently https://rubygems.org has the same problem as lvm.io
<toertore>
damnit, i want to use "attributes"
epicmonkey has left #ruby [#ruby]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsd has joined #ruby
arubin is now known as arrubin
beilabs_________ has joined #ruby
rdark has quit [Quit: leaving]
<toertore>
going with properties, thanks nateberkopec
<nateberkopec>
(thumbsup)
<toertore>
one virtual awkward hug for you
mayday_jay has quit [Quit: c ya!]
rylev has quit [Remote host closed the connection]
<nateberkopec>
i feel... awkward.
<toertore>
relax.. just let it happen
konsolebox has joined #ruby
x1337807x has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
moted has joined #ruby
pwh_ has quit []
tesaf has quit [Quit: Lost terminal]
ghr has joined #ruby
che has joined #ruby
x1337807x has quit [Client Quit]
Alina-malina has quit [Ping timeout: 272 seconds]
che is now known as Guest96162
anaeem1_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
sevvie has joined #ruby
leslie_ has quit [Quit: Have you ever tried to eat a clock? It's very time consuming.]
psycho_one has quit [Ping timeout: 258 seconds]
sambao21 has joined #ruby
jherbst has quit [Ping timeout: 255 seconds]
beilabs_________ has quit [Ping timeout: 264 seconds]
failshell has quit [Remote host closed the connection]
Alina-malina has joined #ruby
peterhu_ is now known as peterhu
francisfish has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 245 seconds]
oleo has quit [Quit: Verlassend]
s2013 has quit [Remote host closed the connection]
CpuID has joined #ruby
oleo has joined #ruby
wjimenez5271 has joined #ruby
thumpba has joined #ruby
nkumari has quit [Remote host closed the connection]
devoldmx has joined #ruby
blackmesa has joined #ruby
<Rene>
is there existing a mirror for rubygems.org?
rshetty has joined #ruby
Dopagod has quit [Remote host closed the connection]
thumpba has quit [Remote host closed the connection]
claymore has quit [Quit: Leaving]
fxn has quit [Quit: zZzZzZ...]
ptrrr has quit [Quit: ptrrr]
x1337807x has joined #ruby
mleone_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
triple_b_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beilabs_________ has joined #ruby
x1337807x has quit [Read error: Connection reset by peer]
linojon has quit [Quit: linojon]
allcentury has quit [Ping timeout: 250 seconds]
nkumari has joined #ruby
jimmyy has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
ohaibbq has quit [Remote host closed the connection]
rshetty has quit [Ping timeout: 264 seconds]
dotix has joined #ruby
workmad3 has quit [Client Quit]
workmad3 has joined #ruby
ponga has joined #ruby
<dotix>
hey guys. What's the best way to create a Hash from an array => %w(key value key value) ?
whoisjake has quit []
<jheg>
to_h
<jheg>
?
<apeiros__>
ha
<apeiros__>
*na
apeiros__ is now known as apeiros
<dotix>
to_h on arrays? :D
<apeiros>
>> Hash[%w(key value key value)]
<eval-in__>
apeiros => /tmp/execpad-0b0091c748fa/source-0b0091c748fa:2: warning: wrong element type String at 0 (expected array) ... (https://eval.in/229128)
<jrochkind>
the fact that bundler documentation is not currently up makes it more challenging to answer, although there's probably a cached version in google/wayback
nkumari has joined #ruby
<workmad3>
joshua___: you can use 'bundle pack' to produce a 'packed' bundle, which is a copy of all the .gem files, which can then be installed without network access
Hijiri has quit [Quit: WeeChat 1.0.1]
<workmad3>
joshua___: probably better than storing a fully vendored gem repo in your repository, as you maintain at least some machine independence (native extensions will still get compiled on the target machine, rather than simply breaking if you happen to develop on a mac and deploy on debian)
FutureTense has joined #ruby
adamski2600 has quit []
beilabs_________ has quit [Ping timeout: 272 seconds]
<workmad3>
joshua___: probably won't help you until rubygems is back up though
<FutureTense>
im trying to install jekyll and other packages but I'm getting a certificate verify failed problem. This is on Windows 8
<joshua___>
workmad3: thanks :/
<joshua___>
I need to deploy desperately
<FutureTense>
oh, is ruby gems down now?
<jrochkind>
ah, i was going to ask about that! how powerful is `bundle pack` for architecture differences though? for instance, concurrent_ruby has native extensions that only work on linux. If I bundle pack on OSX, and move it to linux, do I lose the native extensions?
Hijiri has joined #ruby
SCHAAP137 has joined #ruby
<jrochkind>
FutureTense: DNS to rubygems is down, which is causing all manner of problems
<FutureTense>
oh... that makes sense
kiyote23 has quit [Ping timeout: 244 seconds]
deric_skibotn has quit [Ping timeout: 244 seconds]
<workmad3>
jrochkind: as long as it's a single .gem file, rather than separate platform-specific gems (like the x86-mingw32 platform variants), you'll pack the entire file, so it should work
devdazed has quit [Quit: Computer has gone to sleep.]
centrx has quit [Quit: Did gyre and gymble in ye wabe]
evanjs has joined #ruby
jerius has quit [Ping timeout: 245 seconds]
DLSteve has quit [Read error: Connection reset by peer]
gccostabr has quit [Remote host closed the connection]
<jrochkind>
workmad3: ah, makes sense, I have no way of knowing which are platform-specific gems, but that could def be a problem.
DLSteve has joined #ruby
gccostabr has joined #ruby
<workmad3>
jrochkind: it's a problem if you're installing with --deployment anyway
kirun has quit [Quit: Client exiting]
<jrochkind>
workmad3: why would installing with —deployment make a difference?
<workmad3>
jrochkind: because the Gemfile.lock will then count as being locked to a different version
baweaver has quit [Remote host closed the connection]
<jrochkind>
ah, righto. hmm.
mattjbarlow has joined #ruby
RoryHughes has joined #ruby
beef-wellington has quit [Ping timeout: 252 seconds]
deric_skibotn has joined #ruby
<jrochkind>
workmad3: wait, I don't think the Gemfile.lock has platform-specificities in it, does it? Needs further investigation.
<workmad3>
jrochkind: I've certainly encountered people where the windows-specific version got locked to and it caused --deployment to flag up an error ;)
<jrochkind>
workmad3: clearly, I'm probably not the only one wondering if there could/should be a way to deal with this in way that works accross platform differences, to create a way to do deploys reliably without weird edge cases, when rubygems is unavailable.
freezey has joined #ruby
ohaibbq has joined #ruby
<workmad3>
jrochkind: tbh, I think it's probably correct that if your Gemfile.lock last saw a windows-specific precompiled version and you're installing on a linux target then there's a definite inconsistency
<eam>
finalizers calling close() :(
Solsist has quit []
CpuID has quit [Quit: This computer has gone to sleep]
banister has quit [Ping timeout: 250 seconds]
<workmad3>
jrochkind: as for reliable deploys... you could run your own gem repo with mirrored copies of all the gems you need... you could build an omnibus installation of your app with all your gems (and all other required libraries) already installed into it, and then install that as a .deb or .rpm
stunder has quit [Quit: Screw you guys I'm going home]
graydot has quit [Quit: graydot]
diego_ar has quit []
<s2013>
damn it. is rubygems still down
linojon has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<workmad3>
jrochkind: and you could hook either of those up to a CI build server, so that the build server can push new/updated gems to a repository or build your .deb/.rpm file and push that to a company package repository (preferably starting with dev)
<jrochkind>
workmad3: an automatic mirror is intriguing, built into bundler so every time you install something it stores that thing in your mirror automatically. Still platform-specific issues, though. The platform-specificities seem like the main sticking point, without them gem pack would be fine.
rylev has joined #ruby
<workmad3>
jrochkind: so in the case of a failure you're not stopped from deploying your current version, just your builds can't go ahead if they require gem changes
Alina-malina has quit [Ping timeout: 264 seconds]
<jrochkind>
workmad3: in general, I don't think Gemfile.lock has platform-specificness, it just lists the gem version you have installed. But there could be weird edge cases. Ah, so long as the gem has the same name and version on every platform — where it would woudl break where one platform has a dependency on another single-platform gem, like widget-jruby or widget-32linux or whatever.
<workmad3>
jrochkind: I personally don't see the platform issue as a sticking point... if you're looking for reliable builds/deploys, then you should be running your tests, dev and staging servers on at least the same architecture
valeriansaliou has joined #ruby
<jrochkind>
workmad3: i think it's pretty common to dev on osx but staging/prod on something else.
benj1 has quit [Quit: WeeChat 0.4.2]
banister has joined #ruby
StephenA1 has joined #ruby
snath has quit [Ping timeout: 264 seconds]
<workmad3>
jrochkind: ah, by 'dev' I don't mean 'dev machines' I mean 'dev server' as in 'this is the current absolutely latest version of the code so we know it deploys cleanly and devs can poke at it'
rikai has quit [Ping timeout: 240 seconds]
rylev has quit [Remote host closed the connection]
<jrochkind>
workmad3: i think it's pretty common to not have such a 'dev' environment. :)
gccostabr has quit [Quit: ZZZzzz…]
circ-user-cnelk has joined #ruby
<workmad3>
jrochkind: I wouldn't do without it ;)
ghr has joined #ruby
beilabs_________ has joined #ruby
<workmad3>
jrochkind: but still... your CI server producing your builds, staging and prod should be homogenous to at least OS level, IMO
<jrochkind>
you're unusual. I do fine with an OSX dev box, a staging server, and a production server. The problem is that when rubygems is gone, with a typical capistrano setup, there's no good way to go from dev workstation to staging OR from staging to prod.
CpuID has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
s2013 has quit [Quit: Leaving]
thumpba has joined #ruby
<jrochkind>
unless no gem dependencies have changed, of course.
beilabs_________ has quit [Read error: Connection reset by peer]
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sambao21 has joined #ruby
<shevy>
all breaks down without rubygems.org
<waxjar>
i wonder if there are any p2p package managers
davasaurous has quit [Remote host closed the connection]
valeriansaliou has quit [Ping timeout: 250 seconds]
rkalfane has joined #ruby
hydrajump has joined #ruby
<godd2>
like a Rubygems Blockchain?
<workmad3>
jrochkind: heh :) I try to stay away from capistrano builds triggered from dev machines... they seem unnecessarily primitive (I'd like to get a company artifact server set up... but alas, no time so I'm still only doing chef-managed installs with bundling happening on deploy)
ConstantineXVI has joined #ruby
<waxjar>
godd2: i have no idea what it would look like
<hydrajump>
has anyone else experienced memory leaks with ruby 2.1.x on heroku?
davasaurous has joined #ruby
ConstantineXVI has quit [Remote host closed the connection]
<jrochkind>
workmad3: so even in your setup, you're not gonna be able to deploy without rubygems, if gem dependencies aren't already set up on the target machine, right?
<hydrajump>
I'm trying to help a friend diagnose his first rails 4 app.
rylev has joined #ruby
<workmad3>
jrochkind: no... but I know the way I'd solve that (as already said)
<workmad3>
jrochkind: and it's nothing particularly novel, tbh
<godd2>
waxjar each push could be a transaction, and then set the difficulty so that every 30 minutes a new block is forged by the network
ghr has quit [Ping timeout: 264 seconds]
<jrochkind>
making custom .deb/.rpm seems like overkill for this to me. But to each their own, it would certainly be one solution.
<godd2>
no wait, the other direction. make blocks happen every minute or so. orphan blocks wont matter if there's no reward for completing a block
<jrochkind>
and now i'm off.
<workmad3>
godd2: rubygems would need to sort out the difficulties in producing signed, verifiable packages before that would be feasible, IMO
momomomomo has joined #ruby
StephenA1 has quit [Quit: StephenA1]
<workmad3>
jrochkind: you could also produce docker images ;)
snath has joined #ruby
nkumari has quit [Remote host closed the connection]
SCHAAP137 has quit [Quit: Leaving]
<workmad3>
jrochkind: basically all the solutions work on moving the grabbing of dependencies from deploy-time to a build step though (bundle pack, creating a .deb, push new dependencies to a mirror, create a new docker image...)
<workmad3>
jrochkind: hf :)
<jrochkind>
yeah, I like bundle pack, except for the platform specificity issues.
<workmad3>
jrochkind: only time I've seen issues is windows dev -> *nix deploy
<godd2>
workmad3 you mean so that pushes are only possible by the original private key holder?
giuseppesolinas has joined #ruby
graydot has joined #ruby
linojon has quit [Quit: linojon]
<workmad3>
godd2: no, that would be problematic I suspect (orphaned names are a PITA)
<jrochkind>
i can think of other cases where it could be a problem, with native extensions that only install on some platforms. i've been working with ruby_concurrent lately, which does such things, not sure if it does them in a way that would cause a problem here (and they keep reconsidering how they do it too).
Alina-malina has joined #ruby
<workmad3>
godd2: but there needs to be a better verification and key distribution setup, so that we can easily verify that the author of a gem is someone we expect/trust
rshetty has joined #ruby
<jrochkind>
A solution that "should probably work unless one of the gems happens to have done something that is known to break it" is not a trustworthy one, heh
eichenwald1 has quit [Quit: WeeChat 1.0.1]
Soliah has joined #ruby
baweaver has joined #ruby
thumpba has quit [Remote host closed the connection]
shvelo has quit [Ping timeout: 255 seconds]
<godd2>
workmad3 there'd be a separate problem of the size of a push. surely every node wouldn't want to hold on to arbitrarily sized data. that could easily get out of hand
bulters has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
<workmad3>
godd2: it would be pretty awesome if that information could be embedded in the blockchain too though... along the lines of needing to push a block with your key in it before you could push a gem release
<godd2>
I suppose there could just be a p2p network that mirrors rubygems.org
<workmad3>
godd2: and then the client flags up a warning if a gem author changes, so you can decide whether to trust the new author
hackeron_ has joined #ruby
zipper has joined #ruby
<workmad3>
godd2: or pin a key, so the client only looks at, e.g. a rails gem pushed with the rails key authoring it
<zipper>
Uh what could be causing this error?
b3itz has joined #ruby
finisherr has joined #ruby
<workmad3>
zipper: if it's an error installing gems, probably that rubygems is down
dotix has quit [Ping timeout: 245 seconds]
<b3itz>
hey guys.. what would the regexp be to search for an IPv4 address in a line?
<b3itz>
im walking through a file searching for ipv4 addresses
hackeron has quit [Ping timeout: 265 seconds]
rshetty has quit [Ping timeout: 244 seconds]
<workmad3>
b3itz: 4 blocks of up to 3 digits, separated by a .
evanjs has quit [Remote host closed the connection]
AndChat| has joined #ruby
baweaver has joined #ruby
<zipper>
workmad3: rubygems is down?
<finisherr>
Do “here docs” have string interpolation?
<workmad3>
zipper: DNS issues
<b3itz>
just curious about how to actually write that
evanjs has joined #ruby
Takle has quit [Remote host closed the connection]
CorySimmons has joined #ruby
<workmad3>
b3itz: what have you attempted so far? :)
<godd2>
zipper downloading the gems manually is not recommended, but it is a possible alternative if you *neeeeed* them
<zipper>
I don't know the IP address
<zipper>
:(
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
linojon has joined #ruby
<jhass>
check my link
<bricker`work>
zipper: two people have linked you to it in the past 3 minutes
<jhass>
(read more than the initial tweet)
evanjs has quit [Ping timeout: 244 seconds]
<workmad3>
jhass: I had issues with an /etc/hosts entry... it worked fine for fetching the source index, but couldn't manage to download from the aws repository mirrors
jimmyy has joined #ruby
<zipper>
jhass: Yeah I'm sorry. I can be stoopid
<godd2>
zipper they give an ip address in a tweet on the rubygems_status account
<jhass>
workmad3: you need a second entry for bb-m., see my link
ponga has quit [Ping timeout: 245 seconds]
fabrice31 has joined #ruby
georgedrummond has joined #ruby
<godd2>
lol I like how status.rubygems.org still says everything is okay
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<bricker`work>
lol from twitter: "Lord! You guys have had this problem for years now. Any real solutions in sight? Have Oracle buy your "company"."
<workmad3>
havenwood: did you add a hosts entry? :)
jheg has quit [Quit: jheg]
<bricker`work>
what does it mean to "scrub the traffic"? I've never heard that term.
mikepack has quit [Remote host closed the connection]
livingstn has joined #ruby
reactor has joined #ruby
parus has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 250 seconds]
havenn has joined #ruby
Spami has joined #ruby
<zipper>
Hey it's been a while since I used ruby. ANyway I tried installing some gems and got:
<zipper>
`Your user account isn't allowed to install to the system Rubygems.`
<zipper>
Shouldn't those gems just install into ~/.gem ? I don't see what's so complex. I'm running a bundle install.
SCHAAP137 has quit [Quit: Leaving]
<workmad3>
bricker`work: I guess they have queues of requests that they need to empty out
havenwood has quit [Remote host closed the connection]
<bricker`work>
workmad3: oh
axl_ has quit [Quit: axl_]
lbrf has joined #ruby
<bricker`work>
workmad3: why do they need their data center to hook something up to do that?
<finisherr>
Is it possible to pass multple values to an option with any of the existing ruby option parsers?
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pwh has joined #ruby
<workmad3>
bricker`work: god knows where the queues and bad requests are... wouldn't surprise me if a lot of them were in routers that don't have remotely accessible admin panels to allow them to drop requests
SCHAAP137 has joined #ruby
<workmad3>
bricker`work: I'm working on supposition here, but I can see why they'd need someone at the data-center to sort things
nkumari has quit [Remote host closed the connection]
rkalfane has joined #ruby
phutchins has quit [Ping timeout: 264 seconds]
<workmad3>
bricker`work: hell, even more mundanely than that... their admin access would be at the *back* of the queues of data too ;)
adriancb has quit [Remote host closed the connection]
<bricker`work>
workmad3: heh
<godd2>
So DNSimple's solution to a volumetric DDoS is to increase capacity?
<Rene>
why does not rubygems (and any other big site9 run their own dns??
nkumari has joined #ruby
<bricker`work>
Rene: $$$$
stunder has joined #ruby
<bricker`work>
(and time)
<bricker`work>
but time = $$$ as we all know
<Rene>
bricker`work: it does not cost anything...
<workmad3>
Rene: it costs server resources
jheg has joined #ruby
<workmad3>
Rene: an in order to cope with an attack, it costs a fair bit of server resources... and network resources... and administration time
gccostabr has joined #ruby
<Rene>
i have run my own dns for my sites since i have had a server (about since 2000)
<bricker`work>
Rene: maybe you should volunteer to do it for them :)
<Rene>
and it's pretty much set and forget..
<Rene>
all you need is two ip:s..
<workmad3>
Rene: ever been targetted with a DDoS DNS amplification attack?
<bricker`work>
Rene: Offer to do it for them for free
<bricker`work>
I'm sure they would be thrilled
nanashiRei has joined #ruby
<godd2>
bricker`work unless they realize that sometimes you get what you pay for :P
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Rene>
well, if you get struck by DDoS, then it's targeted at you, and you can't do much about it. HAving a big DNS-provider struck by DDoS makes you just suffer :-(
<shevy>
how much do they pay for PHP
<ericwood>
fuck fuck fuck
<godd2>
bricker`work also, my question was out of curiosity. Are there no other solutions to a volumetric ddos?
<ericwood>
how do I get gems installed without rubygems.org?
<shevy>
THIS IS ARMAGEDDON
<shevy>
YOU CAN'T!
<ericwood>
I need curses installed NOW for a presentation in an hour
<workmad3>
ericwood: you go get a coffee
<ericwood>
fucking shit fuck
<workmad3>
ericwood: and cry
<shevy>
hmm I don't have this .gem
<shevy>
otherwise I could upload it quickly
baweaver has quit [Remote host closed the connection]
<ericwood>
I've been preparing for this for a while...ugh...
<workmad3>
ericwood: whereas I go to bed because it's midnight here and I don't need rubygems for another 10 hours :P
<ericwood>
never ran any of my demos since I reimaged my machine
<workmad3>
shevy: with a lot of volumetric attacks, the source IP isn't really the one running the target
<bricker`work>
shevy: it's distributed
<godd2>
2.1.0 removed curses
baweaver has joined #ruby
<workmad3>
shevy: basically, what you do is you send a packet to a DNS server with a spoofed source IP of the server you want to attack
davasaurous has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
<workmad3>
shevy: and the DNS server responds with more data than was in the original packet
<workmad3>
shevy: sending it on to the server you're attacking
<godd2>
workmad3 you seem to know a lot about how to attack rubygems...
<ericwood>
workmad3: well, I'm still boned because installing a new ruby version means installing the other deps for this
<shevy>
godd2 he also wears a pyjama when he goes to bed
<workmad3>
godd2: last time there was a DNS amplification attack, I read up on how they work ;)
<bricker`work>
workmad3: JE ACCUSE!
<ericwood>
which is impossible! ROFL
x1337807x has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
<workmad3>
godd2: anyway, I'm off to bed
<shevy>
ericwood can't you download the zip and install it? https://github.com/ruby/curses - setup.rb should work just as gem install should
<workmad3>
godd2: you'll know if it was me if the attack suddenly stops :P
lukeholder has joined #ruby
<soahccc>
workmad3: am I right that DNSsec could protect against amplification attack?
<workmad3>
soahccc: don't think so
b3itz has joined #ruby
CorySimmons has quit [Quit: Bye!]
<b3itz>
hey guys, im getting several errors on this line and im not sure why.. im new to regex and ruby together: puts line.scan(?:\d{1,3}\.{3}\d{1,3})
<b3itz>
the first is an unexpected $undefined on the d
Hijiri has quit [Quit: WeeChat 1.0.1]
<havenn>
b3itz: a regexp literal starts and ends with /
<workmad3>
soahccc: I'd need to think about it, but aiui, there isn't a way that DNSSec could protect against the way most DNS amplification attacks work
blackmesa has quit [Quit: WeeChat 1.0.1]
joshua___ has quit [Remote host closed the connection]
<ericwood>
fuck. I absolutely cannot live without the serialport gem...which is uninstalled
<workmad3>
soahccc: I'd be interested in hearing your view on it... but I really do need to run
davasaurous has joined #ruby
<workmad3>
soahccc: so maybe I'll pick your brain tomorrow if you're around and I remember? :)
<ericwood>
can someone walk me through installing a gem from source
<b3itz>
havenn: so with puts line.scan(/?:\d{1,3}\.{3}\d{1,3}/) i get a target of repeat operator is not specified?
<workmad3>
ericwood: download .gem file, run 'gem install <file>'
<ericwood>
ah duh
<twohlix_>
just change your hosts file to make rubygems.org go to 54.186.104.15
<twohlix_>
and it should work
<twohlix_>
as a temporary fix.
econerd4ever has quit [Quit: Leaving...]
<ericwood>
ah thanks
<shevy>
you don't need a gem though, you can use setup.rb too https://github.com/rubyworks/setup - but if you have the .gemspec file you can simply build a new gem from there
<soahccc>
workmad3: my view on what? I'm not a DNS crack :) According to Microsoft DNSsec is more of a problem rather than the solution... Anyway you may zombie my brain anytime ;)
davasaurous has quit [Remote host closed the connection]
<shevy>
nope
<shevy>
54.186.104.15 does not work at all
<havenn>
reap the brains before they become zombies!
Trieste has quit [Ping timeout: 272 seconds]
SCHAAP137 has joined #ruby
<havenn>
shevy: we ddosed it
<shevy>
it's down :(
baweaver has quit [Remote host closed the connection]
AndyBotwin has quit [Quit: Leaving]
<twohlix_>
shevy: works great for me right now :\
<ericwood>
okay, thanks for the tip, this saved my presentation
<soahccc>
I'm really thankful that we only had generic untargeted attacks. Oh well and we ddos'd ourselves once by selling a product for free (which was not intended unfortunately) :S Damn you reddit!
<shevy>
workmad3 go try!
<havenn>
shevy: works stateside
<shevy>
he is from the UK - that's like 50% to europe and 50% to USA :)
<shevy>
but I face the same dilemma... I have to sleep soon
<b3itz>
havenn: ok so i got the line to work without errors.... but its not picking out any IP addresses at all: puts line.scan(/\d{1,3}\.{3}.\d{1,3}/)
<havenn>
just bought another drone, i may have a drone addiction
<shevy>
why do you need the drones?
<shevy>
building skynet?
<chrisja>
I can't ping 54.186.104.15 here in the UK.
toertore has quit [Quit: This computer has gone to sleep]
dcunit3d has joined #ruby
<rpag>
chrisja, thats normal, it's not pingable
bulters has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<shevy>
chrisja yay! the pain is shared! let's hug