<yeboot>
hi, I'm getting an error that I kind-of know how to fix (from stack overflow) but would like to understand. The error is "ArgumentError: invalid byte sequence in UTF-8" and it happens when I try to use regex on a string like "( � ?? �)" from a file, but /.*$/.match("( � ?? �)") gives me an appropriate "#<MatchData "� ?? �">", so I'm lost
<yeboot>
also you have a spam bot named ziptte
klmlfl has quit [Ping timeout: 264 seconds]
linojon has joined #ruby
jottr_ has quit [Ping timeout: 268 seconds]
Sgeo has joined #ruby
cpruitt has quit [Quit: cpruitt]
b00stfr3ak has quit [Ping timeout: 246 seconds]
toretore has joined #ruby
rdavila has joined #ruby
bruno- has joined #ruby
mocfive has quit [Remote host closed the connection]
krainboltgreene has joined #ruby
<yeboot>
for reference the char sequence is supposedly "\xB0 ?? \xB0)"
GhettoJava has quit [Quit: Leaving]
linojon has quit [Ping timeout: 240 seconds]
<wallerdev>
sounds like your ruby script is in a different encoding than the file
Kricir has quit [Remote host closed the connection]
<krainboltgreene>
banister: Hey, your native extension for include_complete is broken :(
<banister>
krainboltgreene yeah it's 1.9.2 only
Kricir has joined #ruby
<yeboot>
Encoding::InvalidByteSequenceError: "\xB0" on UTF-8. when I try to do string.encode("UTF-16")
<krainboltgreene>
Awwww.
<krainboltgreene>
banister: I was so happy to find it :(
slester has quit [Ping timeout: 240 seconds]
<wallerdev>
why are you using UTF-16 lol
rafacv has quit []
mocfive_ has joined #ruby
<banister>
krainboltgreene yeah ruby 1.9.3 killed all the fun, they closed of the C API
tylersmith has quit []
<wallerdev>
you doing windows scripting?
<wallerdev>
:(
n_blownapart has quit []
<yeboot>
wallerdev I'm not sure, someone in this logfile used shift art and I'm just trying to get it to parse
lsone has joined #ruby
GinoMan has quit [Ping timeout: 264 seconds]
<yeboot>
like I said I'm pretty lost
<wallerdev>
are you on windows?
<yeboot>
debian
<wallerdev>
apeiros: can you ban ziptte
<wallerdev>
spambot
thagomizer has quit [Quit: Leaving.]
GinoMan has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
bruno- has quit [Ping timeout: 240 seconds]
krainboltgreene has left #ruby ["Textual IRC Client: www.textualapp.com"]
mg^ is now known as mg^afk
ghostmoth has quit [Quit: ghostmoth]
tvw has quit []
Kricir has quit [Ping timeout: 245 seconds]
<wallerdev>
if the file is encoded as utf-16 you can just File.read and specify utf-16
<wallerdev>
then force_encodingg 'utf-8' on the string
Juanchito has quit [Quit: Connection closed for inactivity]
lsone has quit [Client Quit]
<yeboot>
I mean, I don't know what charset \xB0 is from, I'm not sure what the encoding is
<wallerdev>
well it could be from a lot of different encodings
sepp2k has quit [Quit: Konversation terminated!]
lsone has joined #ruby
<wallerdev>
you could try running "file blah.txt" on your terminal to try to determine the encoding of the file
lsone has quit [Client Quit]
<yeboot>
ISO-8859
orolo has joined #ruby
cougarten_ has joined #ruby
cougarten has quit [Ping timeout: 250 seconds]
<wallerdev>
8859-1 ?
<wallerdev>
so latin1 i guess
<yeboot>
it just says 8859
SCHAAP137 has joined #ruby
<yeboot>
"with very long lines"
<wallerdev>
lol
lemur has joined #ruby
<wallerdev>
well read the file into a string and specify the encoding
rdavila has quit [Read error: Connection reset by peer]
benzrf|offline is now known as benzrf
<wallerdev>
then do what i said above
<wallerdev>
no need for utf-16 at all
nanoyak has quit [Read error: Connection reset by peer]
aspires has quit []
CaptainJet has quit []
zorak8 has joined #ruby
n_blownapart has joined #ruby
fabrice31 has joined #ruby
<yeboot>
wallerdev specify the encoding in open("bleh")? or do I do File.read("bleh", { :encoding => 'ISO-8859' } )
<wallerdev>
id do the 2nd one
<wallerdev>
then your string you can do like p my_result.encoding
<wallerdev>
and you should what encoding it is
linojon has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
skfax has quit [Quit: Page closed]
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
phreakocious has joined #ruby
ptierno has quit [Quit: leaving]
Rollabunna has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
Lewix has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
oo_ has joined #ruby
doodlehaus has joined #ruby
Mars__ has quit [Remote host closed the connection]
Jarboe has joined #ruby
Mars__ has joined #ruby
<yeboot>
ugh, I find it frustrating that I might have to detect the encoding every time someone does shift art on IRC, in order to go through the logs in ruby
kriskropd has quit [Quit: leaving]
andrewjanssen has joined #ruby
andrewjanssen has quit [Client Quit]
kireevco1 has quit [Quit: Leaving.]
Rollabunna has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 246 seconds]
gccostabr has quit [Ping timeout: 245 seconds]
kaspergrubbe has quit [Remote host closed the connection]
zz_karupa is now known as karupa
emocakes has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<bonhoeffer>
hey — i have to download a bunch of paystubs — on mac — looking for good ways to automate (login, download latest form) — hoping for a ruby script idea, but looking for other solutions as well
linojon has quit [Ping timeout: 276 seconds]
slester has joined #ruby
<nobitanobi>
bonhoeffer: are you stuck at some point of the script?
grokdancer has quit [Quit: Leaving.]
<wallerdev>
phreakocious: what do you expect the output to be..?
ghr has joined #ruby
oleo is now known as Guest3107
oleo__ has joined #ruby
<phreakocious>
well that second byte in the output should not be 00
<phreakocious>
since some of the bits are 1s
sambao21 has quit [Quit: Computer has gone to sleep.]
duggiefresh has joined #ruby
linojon has joined #ruby
nfk has quit [Quit: yawn]
<wallerdev>
youre specifying the string numbers though right?
<phreakocious>
but it should take 8 bits at a time from vlanlist, reverse the order of the bits, and then smash those into single bytes
Deele has joined #ruby
<wallerdev>
not actual bits?
<phreakocious>
I was using numbers originally but pack didn't seem to like working with numbers as input
<phreakocious>
pack('B8*') is supposed to interpret those as a sequence of bits and make it into a byte
<jhass>
phreakocious: try building an array of slices, join them and call pack on the result (["10011001", "00110011].pack("B*"))
Guest3107 has quit [Ping timeout: 255 seconds]
lsone has joined #ruby
PanPan has joined #ruby
RichardLitt has quit [Ping timeout: 245 seconds]
ghr has quit [Ping timeout: 240 seconds]
cephalostrum has quit [Ping timeout: 250 seconds]
niklasb has quit [Ping timeout: 276 seconds]
rezzack has quit [Quit: Leaving.]
<phreakocious>
jhass: will give it a shost
melik has quit [Quit: Computer has gone to sleep.]
snath has joined #ruby
melik has joined #ruby
oo_ has joined #ruby
LudicrousMango has quit [Read error: Connection reset by peer]
LudicrousMango has joined #ruby
<bonhoeffer>
nobitanobi: nope, i haven’t started — thinking it through now
cephalostrum has joined #ruby
<bonhoeffer>
not sure if a ruby script is the way to go, versus something like mac automator
aleatorik has joined #ruby
<bonhoeffer>
i would love to parse the downloaded pdf — but the paystub is presented as an html file, which looks fairly structured — might be able to use to nokogiri or something similiar
Mars` has quit [Ping timeout: 272 seconds]
aleatorik is now known as wolves_cs
<bonhoeffer>
thinking open uri — but not sure now to input the password to the right field
Mars` has joined #ruby
<wallerdev>
mechanize probably
<wallerdev>
will handle cookies and form submissions etc
<bonhoeffer>
thanks, i’ll look into that — much appreciated
melik has quit [Ping timeout: 255 seconds]
<wallerdev>
assuming the site works without javscript!
kireevco has quit [Remote host closed the connection]
blackoperat has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
mclee_ is now known as mclee
kireevco has joined #ruby
blackoperat has quit [Client Quit]
kireevco has quit [Client Quit]
OffTheRails has quit [Ping timeout: 268 seconds]
lemur has joined #ruby
zeroNones has joined #ruby
gr33n7007h has joined #ruby
InhalingPixels has joined #ruby
Heartbroken has joined #ruby
troyready has quit [Quit: Leaving]
<phreakocious>
jhass|off: thanks for the pointer, I figured it out...
phreakocious has left #ruby ["Leaving..."]
linojon has joined #ruby
SouL_ has quit [Read error: Connection reset by peer]
braincra- has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
SouL has joined #ruby
yeboot has joined #ruby
yeboot has quit [Client Quit]
cndiv has joined #ruby
yetanoth1rdave has quit [Quit: Lost terminal]
duggiefresh has quit []
sparrovv has joined #ruby
bricker`work has quit [Ping timeout: 255 seconds]
Channel6 has quit [Quit: Leaving]
<bonhoeffer>
any tricks with mechanize to understand the page state?
braincrash has quit [Ping timeout: 245 seconds]
mpistone has quit [Remote host closed the connection]
<bonhoeffer>
i’m working pretty iteratively — it seems like form.submit should load the next page, right?
Mars__ has quit [Remote host closed the connection]
ursooperduper has joined #ruby
shock_one has joined #ruby
Mars__ has joined #ruby
<bonhoeffer>
and . . . it does use javascript— hmm .. . i can’t submit the form onclick=“javascript:if(verifyClick()){return true;}else{return false;};”
<cleopatra>
hello to all
alvaro_o has quit [Quit: Ex-Chat]
linojon has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
<cleopatra>
ziptte, is joking?
davedev24_ has quit [Ping timeout: 245 seconds]
<wallerdev>
bonhoeffer: yeah form.submit should return the next page
<bonhoeffer>
page won’t even load without javascript enabled
<wallerdev>
oh god asp.net lol
<bonhoeffer>
yeah . . .
<wallerdev>
disabled right click
<wallerdev>
what is this 1992
<bonhoeffer>
ha ha
bousquet has quit [Remote host closed the connection]
shock_one has quit [Ping timeout: 276 seconds]
Mars__ has quit [Ping timeout: 255 seconds]
lemur has joined #ruby
davedev24_ has joined #ruby
sevvie has joined #ruby
felixjet_ has joined #ruby
ghr has joined #ruby
wigglewiggle1 has joined #ruby
starless has quit [Quit: Leaving]
felixjet has quit [Ping timeout: 246 seconds]
linojon has joined #ruby
LudicrousMango has quit [Remote host closed the connection]
rim-k has quit [Remote host closed the connection]
LudicrousMango has joined #ruby
GriffinHeart has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
nucatus has quit [Remote host closed the connection]
nucatus has joined #ruby
helpa has quit [Remote host closed the connection]
bricker`LA has joined #ruby
helpa has joined #ruby
<Radar>
WHO TOUCHED HELPA
LudicrousMango has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
bmurt has quit []
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
nucatus has quit [Remote host closed the connection]
x1337807x has joined #ruby
jack_rabbit has quit [Ping timeout: 245 seconds]
nucatus has joined #ruby
charliesome has joined #ruby
autonomousdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
Deele has quit [Ping timeout: 276 seconds]
GriffinHeart has quit [Ping timeout: 268 seconds]
Takle has joined #ruby
jack_rabbit has joined #ruby
mocfive_ has quit [Remote host closed the connection]
InhalingPixels has quit [Ping timeout: 252 seconds]
mocfive has joined #ruby
linojon has quit [Quit: linojon]
manzo has quit [Ping timeout: 276 seconds]
darkxploit has joined #ruby
linojon has joined #ruby
tectonic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bonhoeffer>
wallerdev: so strange, mechanize can load the page, but can’t submit
thomasxie has left #ruby [#ruby]
patrick99e99 has quit [Ping timeout: 246 seconds]
<bonhoeffer>
you think phantomJS has the solution?
mocfive has quit [Ping timeout: 252 seconds]
<wallerdev>
probably, or selenium/other browser automationt ools
<wallerdev>
i could probably get it working with mechanize but i did automation for like 5 years of my life haha
Takle has quit [Ping timeout: 240 seconds]
linojon_ has joined #ruby
wigglewiggle1 has quit [Quit: Leaving.]
<bonhoeffer>
ha
<wallerdev>
im heading home now though, phantomJS looks really cool, maybe try playing with that :)
linojon has quit [Ping timeout: 268 seconds]
linojon_ is now known as linojon
<bonhoeffer>
i’m familiar with selenium, but phantomJS might be newer . . . thanks
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tfittsy has quit [Remote host closed the connection]
<bonhoeffer>
probably not worth it . . . what a pain
tfittsy has joined #ruby
<wallerdev>
lol
zeroNones has quit [Ping timeout: 255 seconds]
thomasxie has joined #ruby
<centrx>
bonhoeffer, Usually you can rig up the corresponding POST request in Mechanize, or whatever the Javascript is doing
<bonhoeffer>
ah . . . got it — that makes sense
<centrx>
bonhoeffer, Use your browser's Developer Console to observe the network behavior while the page is loading or when you click the button or whatever
pu22l3r has joined #ruby
<bonhoeffer>
i like that idea
emmesswhy has joined #ruby
<bonhoeffer>
frustrating — it opens a new page and I can’t grab the post — i think js opens the new page
orolo has quit [Ping timeout: 272 seconds]
_reset has joined #ruby
<bonhoeffer>
i think the js is doing some spreading sequence or something
cocotton has quit [Remote host closed the connection]
<bonhoeffer>
maybe mac automator would be much better
mikepack has quit [Remote host closed the connection]
<bonhoeffer>
they are pushing an accessString and GID and globalID and dttm to the page via GET after login
grokdancer has joined #ruby
mattstratton has quit [Ping timeout: 255 seconds]
_reset has quit [Ping timeout: 246 seconds]
CorySimmons has joined #ruby
<centrx>
bonhoeffer, JS opens new pages only by sending HTTP requests
reset has quit [Ping timeout: 276 seconds]
CorySimmons has quit [Client Quit]
<bonhoeffer>
target=“_blank” or similar?
emocakes has quit []
wallerdev has quit [Quit: wallerdev]
dapz has joined #ruby
Scotteh has quit [Ping timeout: 245 seconds]
<centrx>
bonhoeffer, Sometimes data is retrieved with AJAX requests, which also show up in the Developer Console
<bonhoeffer>
yeah
orolo has joined #ruby
melik has joined #ruby
<centrx>
bonhoeffer, You should find listed the exact parameters sent by the page to retrieve the data/new page
<bonhoeffer>
ok — i’ll keep poking
<centrx>
bonhoeffer, It does require some sleuthing and it's not always a walk in the park
<bonhoeffer>
yeah — it submits a check_login page
<centrx>
bonhoeffer, Using a scripter/automator like PhantomJS or Selenium is a perfectly good solution
<bonhoeffer>
via post
<bonhoeffer>
perhaps i should go that route
<centrx>
bonhoeffer, but right now I am scraping like 12 very different sites, and Mechanize is able to handle them
davispuh has quit [Ping timeout: 245 seconds]
<centrx>
bonhoeffer, the browser automator handles other Javascript too, not just page requests, whereas Mechanize doesn't handle JS, so web browser emulator can be the best
seamon has joined #ruby
<centrx>
depending on what you're doing
<bonhoeffer>
got it
axsuul has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
mikepack has joined #ruby
x1337807x has quit [Client Quit]
_maes_ has joined #ruby
benzrf is now known as benzrf|offline
darkxploit has quit [Ping timeout: 264 seconds]
zwichenzug has joined #ruby
krz has joined #ruby
JayLeon has joined #ruby
benzrf|offline is now known as benzrf
emocakes has joined #ruby
Rollabunna has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<centrx>
what the heck: "We have released 1.9.2-p330, the final release of the 1.9.2 series."
kireevco has joined #ruby
timmmaaaayyy has joined #ruby
shadowbq has joined #ruby
<shadowbq>
join #rails
shock_one has joined #ruby
<timmmaaaayyy>
i'm helping a friend move hist ruby web app to a new server. it's currently using nginx and unicorn (though honestly i have no idea how nginx is actually forwarding to unicorn). is that how it's always done? can i not do this using just nginx?
<timmmaaaayyy>
sorry.....ruby on rails
<centrx>
#rubyonrails
Rollabunna has quit [Ping timeout: 252 seconds]
Cork has quit [Ping timeout: 260 seconds]
<centrx>
timmmaaaayyy, but yes it is how it's usually done
<timmmaaaayyy>
ok thanks
shock_one has quit [Ping timeout: 264 seconds]
pu22l3r has quit [Remote host closed the connection]
Cork has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mocfive has joined #ruby
centrx has quit [Quit: Mead error: Connection reset by beer]
sdwrage has quit [Ping timeout: 246 seconds]
thomasxie has quit [Remote host closed the connection]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
autonomousdev has joined #ruby
mocfive has quit [Ping timeout: 255 seconds]
ghr has joined #ruby
sdwrage has joined #ruby
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
axwheeler has joined #ruby
autonomousdev has joined #ruby
grokdancer has quit [Quit: Leaving.]
w3pm has quit [Quit: This computer has gone to sleep]
autonomousdev has quit [Client Quit]
bennylope has quit [Quit: My Tandy 1000 has gone to sleep. ZZZzzz…]
cajone has left #ruby [#ruby]
ghr has quit [Ping timeout: 268 seconds]
axsuul has joined #ruby
axwheeler has quit [Client Quit]
pontiki has joined #ruby
magical_mystery has quit [Ping timeout: 276 seconds]
bruno- has joined #ruby
chrishough has joined #ruby
Channel6 has joined #ruby
RichardLitt has joined #ruby
GriffinHeart has joined #ruby
JohnFord has joined #ruby
radic has joined #ruby
zeroNones has joined #ruby
shadowbq has quit [Quit: leaving]
bonhoeffer has quit [Quit: bonhoeffer]
end_guy has quit [Remote host closed the connection]
rubyonrailed has joined #ruby
cajone has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
ghanima has quit [Ping timeout: 268 seconds]
radic_ has quit [Ping timeout: 252 seconds]
GriffinHeart has quit [Ping timeout: 246 seconds]
carlyle has joined #ruby
aspires has quit []
cajone has quit [Remote host closed the connection]
cndiv has quit [Ping timeout: 276 seconds]
KC9YDN has quit [Ping timeout: 264 seconds]
sevvie has quit [Ping timeout: 252 seconds]
seamon has quit [Quit: Zzzzzzz]
end_guy has joined #ruby
axsuul has quit [Read error: No route to host]
seamon has joined #ruby
cajone has joined #ruby
nucatus has quit [Remote host closed the connection]
axsuul has joined #ruby
seamon has quit [Client Quit]
aspires has joined #ruby
GriffinHeart has joined #ruby
adrenaline_ has quit [Read error: Connection reset by peer]
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
autonomousdev has joined #ruby
emocakes has quit []
autonomousdev has quit [Client Quit]
braincra- has quit [Quit: bye bye]
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
zeroNones has quit [Ping timeout: 268 seconds]
mpistone has joined #ruby
emocakes has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
GriffinHeart has quit [Remote host closed the connection]
aspires has quit []
GriffinHeart has joined #ruby
DrCode has joined #ruby
eivindml has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubyonrailed has quit [Remote host closed the connection]
JohnFord has quit [Ping timeout: 245 seconds]
emocakes has joined #ruby
sparrovv has joined #ruby
oo_ has quit [Remote host closed the connection]
melik has quit [Quit: Computer has gone to sleep.]
sparrovv has quit [Ping timeout: 245 seconds]
autonomousdev has joined #ruby
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
karupa is now known as zz_karupa
arup_r has joined #ruby
butters has joined #ruby
butters is now known as amateurbutter
mocfive has joined #ruby
armyriad has quit [Disconnected by services]
amateurbutter is now known as armyriad
emocakes has quit []
kenneth has joined #ruby
kenneth has quit [Max SendQ exceeded]
kenneth has joined #ruby
JBreit has left #ruby ["Leaving"]
cirn0 has joined #ruby
pu22l3r has joined #ruby
ghr has joined #ruby
autonomousdev has joined #ruby
autonomousdev has quit [Client Quit]
bunzz has quit [Ping timeout: 260 seconds]
zorak8 has quit [Ping timeout: 276 seconds]
melik has joined #ruby
mary5030 has joined #ruby
cirn0 has quit [Ping timeout: 245 seconds]
mary5030 has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 246 seconds]
mary5030 has joined #ruby
BadQuanta has joined #ruby
arup_r_ has joined #ruby
arup_r_ has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 276 seconds]
bryanhowarth has joined #ruby
tlarevo has joined #ruby
patrick99e99 has joined #ruby
fabrice31 has joined #ruby
oo_ has joined #ruby
Kricir has joined #ruby
absolutezeroff has joined #ruby
saarinen has joined #ruby
duncannz has joined #ruby
patrick99e99 has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Ping timeout: 245 seconds]
kennet___ has joined #ruby
kennet___ has quit [Max SendQ exceeded]
oo_ has quit [Ping timeout: 272 seconds]
JohnFord has joined #ruby
kenneth has quit [Ping timeout: 260 seconds]
sonots_ has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
oo_ has joined #ruby
ARCADIVS has joined #ruby
kenneth has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
saarinen has quit [Read error: Connection reset by peer]
sleepee has quit [Quit: Leaving]
saarinen has joined #ruby
tlarevo has quit [Ping timeout: 260 seconds]
pu22l3r has quit [Remote host closed the connection]
orolo has joined #ruby
mr-foobar has quit [Quit: Leaving...]
shock_one has joined #ruby
arup_r has quit [Quit: Leaving.]
pu22l3r has joined #ruby
Kricir has quit [Remote host closed the connection]
baroquebobcat_ has joined #ruby
shock_one has quit [Ping timeout: 255 seconds]
Kricir has joined #ruby
aspires has joined #ruby
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ziptte has quit []
daed has joined #ruby
mikepack has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 245 seconds]
ziptte has joined #ruby
Rollabunna has joined #ruby
mary5030 has joined #ruby
Kricir has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
mattstratton has joined #ruby
avita1 has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
bousquet has joined #ruby
Rollabunna has quit [Ping timeout: 245 seconds]
WildBamboo-Josh has quit [Quit: Leaving]
phoo1234567 has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Ping timeout: 276 seconds]
phoo1234567 has quit [Max SendQ exceeded]
phoo1234567 has joined #ruby
WildBamboo-Josh has joined #ruby
avita1 has quit [Read error: Connection reset by peer]
avita11 has joined #ruby
bruno- has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
Kricir has quit [Remote host closed the connection]
nobitanobi has joined #ruby
Kricir has joined #ruby
wolves_cs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kriskropd has joined #ruby
Lewoco has joined #ruby
jusmyth has joined #ruby
<Lewoco>
With Open3.popen3, how do I redirect :out from the child process to :out of the parent?
bruno- has quit [Ping timeout: 255 seconds]
ghr has joined #ruby
bennylope has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
mahlon has quit [Read error: Connection reset by peer]
Channel6 has quit [Quit: Leaving]
mahlon has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
skarn has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
terrellt has quit [Ping timeout: 240 seconds]
bennylope has quit [Ping timeout: 245 seconds]
JBreit has joined #ruby
JBreit has left #ruby [#ruby]
kriskropd has quit [Quit: leaving]
tobago has joined #ruby
dawkirst has joined #ruby
terrellt has joined #ruby
MaciejCzyzewski has joined #ruby
Takle has joined #ruby
j4jackj has joined #ruby
rockdon_ is now known as rockdon|away
MaciejCzyzewski has quit [Client Quit]
skarn has joined #ruby
skarn is now known as Guest62656
earthquake has joined #ruby
Takle has quit [Ping timeout: 276 seconds]
oleo__ has quit [Quit: Verlassend]
kireevco has quit [Quit: Leaving.]
nucatus has joined #ruby
GinoMan has quit [Ping timeout: 245 seconds]
niklasb has joined #ruby
anaeem1_ has joined #ruby
marcules has quit [Ping timeout: 264 seconds]
thumpba has quit [Remote host closed the connection]
zz_karupa is now known as karupa
thumpba has joined #ruby
kennet___ has joined #ruby
earthquake has quit [Quit: earthquake]
kenneth has quit [Ping timeout: 260 seconds]
pu22l3r has quit [Remote host closed the connection]
nucatus has quit [Ping timeout: 246 seconds]
kenneth has joined #ruby
thumpba has quit [Ping timeout: 276 seconds]
sinkensabe has joined #ruby
kennet___ has quit [Ping timeout: 255 seconds]
orolo has quit [Quit: This computer has gone to sleep]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
BlkDynmt has joined #ruby
Kerber0s has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
orolo has joined #ruby
dapz has joined #ruby
jusmyth has left #ruby [#ruby]
JohnFord has quit [Ping timeout: 264 seconds]
shock_one has joined #ruby
nobitanobi has quit [Remote host closed the connection]
bousquet has quit [Remote host closed the connection]
bousquet has joined #ruby
tlarevo has joined #ruby
shock_one has quit [Ping timeout: 276 seconds]
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
shock_one has joined #ruby
txdv has quit [Read error: Connection reset by peer]
txdv_ has quit [Read error: Connection reset by peer]
hamakn has quit [Remote host closed the connection]
txdv has joined #ruby
txdv_ has joined #ruby
earthquake has joined #ruby
earthquake has quit [Client Quit]
<Lewoco>
Is there really no easy way to execute a command (without a shell) and raise an exception if the process if the command can't be started or returns non-zero?
JAG-Ducati has joined #ruby
JAG-Ducati has left #ruby [#ruby]
bousquet has quit [Ping timeout: 264 seconds]
mocfive has quit [Ping timeout: 252 seconds]
niklasb has quit [Quit: WeeChat 0.4.3]
<Lewoco>
Oh and I want stdout/stderr inherited from the parent process.
Jarboe has quit []
arup_r has joined #ruby
mocfive has joined #ruby
hamakn has joined #ruby
dohzya has joined #ruby
<dohzya>
hi
jack_rabbit has quit [Ping timeout: 245 seconds]
bruno- has joined #ruby
tkuchiki_ has joined #ruby
drjfreeze has quit [Ping timeout: 240 seconds]
drjfreeze has joined #ruby
kaspergrubbe has joined #ruby
narcan has joined #ruby
tkuchiki has quit [Ping timeout: 264 seconds]
bruno- has quit [Ping timeout: 246 seconds]
<Lewoco>
'system' uses a shell. 'spawn' (and popen which calls spawn) has no way of reliably returning the return code (at least on windows).
kaspergrubbe has quit [Ping timeout: 276 seconds]
Kerber0s has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
gaussblurinc1 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Kerber0s has quit [Remote host closed the connection]
Kerber0s has joined #ruby
thomasxie has joined #ruby
starkhalo has quit [Ping timeout: 260 seconds]
ghr has joined #ruby
RichardLitt has quit [Quit: RichardLitt]
anaeem1_ has quit [Ping timeout: 245 seconds]
tagrudev has joined #ruby
ht__th has joined #ruby
Hanmac has quit [Remote host closed the connection]
melik has quit [Quit: Computer has gone to sleep.]
JoshGlzBrk has joined #ruby
Hanmac has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
mr-foobar has joined #ruby
gr33n7007h has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
fabrice31 has joined #ruby
ziptte has quit [Ping timeout: 268 seconds]
bryanhowarth has quit [Quit: sleep | bryan.howarth@gmail.com | twitter.com/bryanhowarth]
dawkirst_ has joined #ruby
mattstratton has joined #ruby
tkuchiki_ has quit [Read error: Connection reset by peer]
dawkirst has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
ARCADIVS has quit [Ping timeout: 272 seconds]
BTRE has quit [Ping timeout: 255 seconds]
baroquebobcat_ has quit [Quit: baroquebobcat_]
fabrice31 has quit [Ping timeout: 255 seconds]
lxsameer has joined #ruby
ziptte has joined #ruby
anaeem1_ has joined #ruby
ARCADIVS has joined #ruby
phoo1234567 has quit [Quit: Leaving]
saarinen has quit [Quit: saarinen]
blueOxigen has joined #ruby
amclain has quit [Quit: Leaving]
bluOxigen has quit [Ping timeout: 260 seconds]
_Kerber0s_ has joined #ruby
apeiros has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
apeiros has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
ta has quit [Remote host closed the connection]
chipotle has joined #ruby
Kerber0s has quit [Ping timeout: 264 seconds]
lele has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
patrick99e99 has quit [Ping timeout: 246 seconds]
BlkDynmt has quit [Quit: BlkDynmt]
BTRE has joined #ruby
sinkensabe has joined #ruby
absolutezeroff has quit [Ping timeout: 245 seconds]
aganov has joined #ruby
lele has joined #ruby
thumpba has joined #ruby
dopiee has joined #ruby
bal has joined #ruby
dopie has quit [Ping timeout: 255 seconds]
Diaoer has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
twin has joined #ruby
<twin>
hey
twin has quit [Client Quit]
<Lewoco>
Why does Process.waitpid2(spawn(*argv)) occassionally not return a pid/status even though the process started?
guojinyun has joined #ruby
codecop has joined #ruby
lemur has quit [Read error: Connection reset by peer]
sinkensabe has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
lemur has joined #ruby
orolo has joined #ruby
_Kerber0s_ has quit [Remote host closed the connection]
Kerber0s has joined #ruby
jimmyy has quit [Ping timeout: 264 seconds]
jusmyth has joined #ruby
jusmyth has quit [Client Quit]
jusmyth has joined #ruby
DEA7TH has quit [Ping timeout: 264 seconds]
techsethi has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Azulinho has joined #ruby
adironduck has joined #ruby
aspires has quit []
guojinyun has quit [Quit: Leaving]
Kricir has joined #ruby
Azulinho has quit [Ping timeout: 272 seconds]
bruno- has joined #ruby
bousquet has joined #ruby
chipotle has quit [Quit: cya]
tectonic has joined #ruby
Rollabunna has joined #ruby
relix has joined #ruby
quitobro has joined #ruby
<dopiee>
hey all
dopiee has quit [Quit: Leaving]
quitobro has quit [Remote host closed the connection]
dopie has joined #ruby
dohzya has left #ruby ["undefined"]
<dopie>
woot woot
AmBienCeD has quit []
bruno- has quit [Ping timeout: 264 seconds]
Rollabunna has quit [Ping timeout: 272 seconds]
anildigital has joined #ruby
anildigital has quit [Changing host]
cirn0 has joined #ruby
<adironduck>
Just another encoding problem: I have a string that’s coming from a UTF-8-encoded DB. The string ”thinks” that it is UTF8-encoded, but it has been incorrectly encoded at some point, so it shows up like this: "\"M\\xC3\\xB6bler\””. It’s supposed to be ”Möbler”. You can get something similar by force_encoding a UTF-8-string to ASCII-8BIT: ”Möbler”.force_encoding(”ASCII-8BIT”). I thought forcing to ASCII-8BIT and back to UTF-8 ag
<adironduck>
would solve the problem. This works for the example above because \xC3 seems to represent a byte. But in the string that comes from DB, the original bytes have been lost. So instead of \xC3 representing a single byte, it is just four characters. Does anyone know a good way of restoring the original characters? Gsub-galore?
ghr has joined #ruby
mpistone has quit [Remote host closed the connection]
Morkel has joined #ruby
max06 has joined #ruby
cirn0 has quit [Ping timeout: 252 seconds]
ghr has quit [Ping timeout: 246 seconds]
froggy has joined #ruby
quitobro has joined #ruby
froggy is now known as froggo
_Kerber0s_ has joined #ruby
lkba has joined #ruby
quitobro has quit [Client Quit]
Kricir has quit [Remote host closed the connection]
kyb3r_ has joined #ruby
Kricir has joined #ruby
Takle has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
Kerber0s has quit [Ping timeout: 268 seconds]
HelperW has joined #ruby
fabrice31 has joined #ruby
Scotteh has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
axsuul has quit [Read error: Connection reset by peer]
<dopie>
Hey all
ringarin has joined #ruby
Scotteh has quit [Ping timeout: 245 seconds]
avita11 has quit [Quit: Leaving.]
shock_one has quit [Quit: Computer has gone to sleep.]
Px12 has joined #ruby
dumdedum has joined #ruby
avita1 has joined #ruby
AndChat| has joined #ruby
ringarin has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
Lewoco has quit [Ping timeout: 252 seconds]
nucatus has joined #ruby
charliesome has quit [Quit: zzz]
ringarin has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
jacobat has joined #ruby
rockdon|away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nucatus has quit [Ping timeout: 276 seconds]
JohnFord has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
orolo has joined #ruby
terlar has quit [Read error: No route to host]
ringaring has joined #ruby
Xeago has joined #ruby
kalusn has joined #ruby
Advocation has joined #ruby
JohnFord has quit [Ping timeout: 268 seconds]
ringarin has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
shock_one has joined #ruby
ziptte has quit [Read error: Connection reset by peer]
Px12 has quit [Ping timeout: 260 seconds]
shock_one has quit [Client Quit]
shock_one has joined #ruby
toretore has quit [Read error: Connection reset by peer]
andikr has joined #ruby
toretore has joined #ruby
anaeem1_ has quit [Read error: Connection reset by peer]
anaeem1_ has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
terlar has joined #ruby
blackmesa has joined #ruby
Deele has joined #ruby
Kerber0s has joined #ruby
Kerber0s has quit [Remote host closed the connection]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kerber0s has joined #ruby
wallerdev has quit [Quit: wallerdev]
Px12 has joined #ruby
andrewlio has joined #ruby
MengHX has joined #ruby
_Kerber0s_ has quit [Ping timeout: 245 seconds]
Diaoer has quit [Ping timeout: 255 seconds]
Veidit has quit [Ping timeout: 260 seconds]
sinkensabe has quit [Read error: Connection reset by peer]
Veidit has joined #ruby
sinkensabe has joined #ruby
MengHX has quit [Client Quit]
vt102 has quit [Ping timeout: 252 seconds]
alex88 has joined #ruby
anarang has joined #ruby
eivindml has joined #ruby
sinkensabe has quit [Client Quit]
arup_r has quit [Remote host closed the connection]
ptrrr has joined #ruby
nairys has quit [Quit: nairys]
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has joined #ruby
yacks has quit [Ping timeout: 260 seconds]
KesUK has joined #ruby
rockdon_ has joined #ruby
KesUK has quit [Client Quit]
bMalum has joined #ruby
avita1 has quit [Quit: Leaving.]
chth0n has joined #ruby
ghr has quit [Ping timeout: 268 seconds]
Px12 has quit [Remote host closed the connection]
ephemerian has joined #ruby
shredding has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
sk87 has joined #ruby
bousquet has quit []
qba73 has joined #ruby
sk87 has quit [Client Quit]
mijicd has joined #ruby
BlkDynmt has joined #ruby
BadQuanta has quit [Ping timeout: 272 seconds]
sk87 has joined #ruby
Xeago has quit [Remote host closed the connection]
enriclluelles has joined #ruby
patrick99e99 has joined #ruby
Xeago has joined #ruby
jacobat_ has joined #ruby
arup_r has joined #ruby
jacobat has quit [Ping timeout: 260 seconds]
<dopie>
youre on all the channels anyways
patrick99e99 has quit [Ping timeout: 264 seconds]
zarubin has joined #ruby
mikecmpbll has joined #ruby
Advocation has quit [Quit: Advocation]
Advocation has joined #ruby
jhaals_ has joined #ruby
adironduck has quit [Quit: adironduck]
olivier_bK has joined #ruby
adironduck has joined #ruby
Takle has quit [Remote host closed the connection]
jacobat_ has quit [Ping timeout: 276 seconds]
ghr has joined #ruby
rockdon_ is now known as rockdon|away
jusmyth has left #ruby [#ruby]
rockdon|away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nfk has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
yfeldblum has joined #ruby
tectonic has quit []
Jake232 has joined #ruby
JohnFord has joined #ruby
pierombaabu has joined #ruby
<pierombaabu>
How do I make an indefinite loop where a user has to enter correct credentials to login?
yfeldblum has quit [Remote host closed the connection]
grumbel_ has quit [Quit: Ex-Chat]
fabrice31 has quit [Read error: No route to host]
W0rmDr1nk has joined #ruby
yfeldblum has joined #ruby
fabrice31 has joined #ruby
orolo has joined #ruby
<Hanmac>
pierombaabu: with loop {} ?
<pierombaabu>
Hanmac could you please write a short code for me to refer to?
orolo has quit [Quit: This computer has gone to sleep]
<Hanmac>
hey i already did better with cutting the write_file into sections
bruno- has quit [Ping timeout: 246 seconds]
jarto has joined #ruby
<Wolland>
atmosx: for highcharts you need to multiple by 1000, once you do it, you will have to divide it in ruby by 1000 otherwise it's what you are getting. to_i for highcharts is what you want to generate datetime series
orolo has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
andikr has joined #ruby
duncannz has quit [Ping timeout: 272 seconds]
Trynemjoel has quit [Ping timeout: 245 seconds]
mengu has joined #ruby
mooru has joined #ruby
JohnFord has joined #ruby
oo_ has quit [Remote host closed the connection]
jacobat has quit [Ping timeout: 246 seconds]
oo_ has joined #ruby
Trynemjoel has joined #ruby
jimmyy has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kith has quit [Quit: kith]
Takle has joined #ruby
kith has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
nickjj has quit [Read error: Connection reset by peer]
JohnFord has quit [Ping timeout: 260 seconds]
nickjj has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
Soda has joined #ruby
narph has joined #ruby
<atmosx>
From ruby to JS do I need to multiply time_object.to_i * 1000 ?
<atmosx>
Wolland: From ruby to JS do I need to multiply time_object.to_i * 1000 ?
<Wolland>
yes
<atmosx>
cool
<atmosx>
thanks
francisfish has joined #ruby
<Wolland>
js is expecting milliseconds
Xeago has quit [Remote host closed the connection]
<atmosx>
Wolland: I've lost yesterday all day long trying to make this work.
riotjones has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<atmosx>
Wolland: I'm not using rails, I'm using Sinatra + Sequel and I couldn't make it work :-( although it looked very much what I needed to contine with other parts of the program :-(
pierombaabu has quit [Remote host closed the connection]
anaeem___ has joined #ruby
bMalum has joined #ruby
Takle has quit [Remote host closed the connection]
zarubin has quit []
anaeem1_ has quit [Ping timeout: 268 seconds]
nucatus has joined #ruby
a has joined #ruby
a is now known as Guest54785
PeterBoy has joined #ruby
bruno- has joined #ruby
MCDev has quit [Ping timeout: 250 seconds]
jusmyth1 has joined #ruby
timgauthier has quit [Read error: Connection reset by peer]
orolo has quit [Quit: This computer has gone to sleep]
timgauthier has joined #ruby
timgauthier has quit [Max SendQ exceeded]
Takle has joined #ruby
nucatus has quit [Ping timeout: 264 seconds]
arup_r has quit [Remote host closed the connection]
diegoviola has joined #ruby
oo_ has quit [Remote host closed the connection]
arup_r has joined #ruby
orolo has joined #ruby
Akagi201 has joined #ruby
Takle has quit [Remote host closed the connection]
<Hanmac>
tobiasvl: that user does not want help like that ... i already did link him to Kernel#loop but he did ignore it and nearly asked the same questions again ...
<wasamasa>
silly users
pushpak has joined #ruby
<shevy>
kill them all
JohnFord has joined #ruby
<wasamasa>
developers should just develop software for themselves to use
<wasamasa>
oh wait
<tobiasvl>
Hanmac: I figured as much actually. I didn't expect him to provide code (and I doubt he's done authentication)
arup_r has quit [Remote host closed the connection]
<Hanmac>
tobiasvl: currently from the look like it, it does smell if he want to have a keylogger or something that does force the user to enter his password ...
doodlehaus has joined #ruby
<wasamasa>
Hanmac: I rather thought of a school assignment actually
workmad3 has quit [Ping timeout: 272 seconds]
mwlang has joined #ruby
<Hanmac>
wasamasa: possible too ... but i really hate it when they ignore you when you want to help them
<wasamasa>
Hanmac: yeah, that sucks
tanath has quit [Ping timeout: 264 seconds]
fsapo has joined #ruby
<wasamasa>
Hanmac: especially if they do a /query or PM on a forum and ask whether they can just fork cash over
<Hanmac>
or you did help them, and then they disappear and you don’t know if the help was successful
krz has quit [Quit: WeeChat 1.0]
PeterBoy has quit [Remote host closed the connection]
<mwlang>
is anyone else having trouble compiling therubyracer on ruby 2.1.2? The logged error is suspiciously mixing ruby 2.1.2 and 2.1.0 paths, which are non-existent: “rubies/ruby-2.1.2/include/ruby-2.1.0” entire message here: https://gist.github.com/mwlang/21f1acda65ffd90ead36
Jon-Xie_ has joined #ruby
malcolmva has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
ARCADIVS has quit [Quit: WeeChat 0.4.3]
arup_r has joined #ruby
Takle has joined #ruby
<shevy>
hmmm
<mwlang>
is it common for 2.1.2 and 2.1.0 paths to be mixed like that? If so, I’ll sleuth elsewhere for possible issues, if not, I’ll dig further into figuring out how to change the include path.
<shevy>
I wish I could subclass methods
<balance>
Can I think of the yield statement as a tool for injecting specific logic into a function?
bluenemo has joined #ruby
bluenemo has quit [Read error: Connection reset by peer]
the7ak3 has joined #ruby
jcromartie has joined #ruby
<Hanmac>
mwlang: 2.1.2 is the API version ... 2.1.0 is the ABI version
adironduck has quit [Quit: adironduck]
azul1 has quit [Quit: Leaving]
fold has quit [Ping timeout: 240 seconds]
postmodern has quit [Remote host closed the connection]
<Hanmac>
then the warning "ld: warning: directory not found for option '-L/Users/travis/.sm/pkg/active/lib'" does appear because your current user mwlang where the rvm is installed, might not have access to the user travis files ...
tanath has joined #ruby
<jhass>
balance: pretty much, yeah
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
slester has joined #ruby
_Kerber0s_ has joined #ruby
PeterBoy has joined #ruby
<balance>
jhass ty. And can someone tell me why they are usinga Block in line 13/19 for the assignment? Can't I do something like emulator=emulate? http://pastebin.com/JCPNpbrF
maasha has joined #ruby
jottr_ has joined #ruby
<mwlang>
Hanmac: thanks for explaining that. Give’s me something to work with.
<Hanmac>
balance: no because yield wants a block
<tobiasvl>
balance: emulate yields an emulator
<jhass>
balance: the method expects a block, it does unconditionally yield. I guess the idea of the author was to "protect" from exceptions
<tobiasvl>
there you go, three slightly different explanations :)
<jhass>
balance: it simply gives no means to return the created emulator instance
<balance>
Yeah of coruse, I mean I'd just return it at line 30.
narcan has joined #ruby
<tobiasvl>
sure! you can do that instead.
yfeldblum has quit [Remote host closed the connection]
<atmosx>
Wolland: Well it works, but the graph doesn't display lines, it just displays dots in the graph, even though some dots belong to the same color/name any idea why that is? I'm using chartkick's line_chart method.
hrrz has joined #ruby
riotjone_ has joined #ruby
<Hanmac>
hm it might be changed with adding "to_enum(__method__) unless block_given?" at the beginning of the emulate method
pushpak has quit [Quit: Leaving...]
<maasha>
So if you "require 'profile'" in a script that uses fork you get a really messy output - basically a report per process?.
yfeldblum has joined #ruby
riotjones has quit [Read error: Connection reset by peer]
<atmosx>
+ the time is again displayed erroneously which is awkard.
<atmosx>
hm
mengu has quit [Ping timeout: 268 seconds]
Kerber0s has quit [Ping timeout: 260 seconds]
the7ak3 has quit [Read error: Connection reset by peer]
<jhass>
Hanmac: nope, it doesn't enumerate something, so that'd be silly
<balance>
Hanmac, tobiasvl jhass ok thanks, makes it clearer.
<Hanmac>
jhass: hm maybe but you can still use it to have something that can be called later with still having that exception protection
<Wolland>
no idea atmosx, see if you can get it working with hard coded data, then mimic it with your data
AmBienCeD has joined #ruby
<Wolland>
just follow their docs and examples
<atmosx>
okay
<atmosx>
ty
<Wolland>
could be format difference or something silly
<Wolland>
like strings instead of integers for values
<jhass>
Hanmac: no worth to clutter the return with tons of useless methods
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mengu has joined #ruby
anaeem___ has quit [Remote host closed the connection]
MCDev has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
anaeem1_ has joined #ruby
riotjone_ has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
<atmosx>
Haha, when I start thin as a rack server, time objects are all wrong, when I start foreman (which calls thin) time objects are displayed correctly. Go figure..
francisfish has joined #ruby
Px12 has joined #ruby
<shevy>
lol
<shevy>
atmosx don't you hate consistency ;)
<atmosx>
shevy: hahahaha, yeah especially when it comes to programming langauges! :-P
PeterBoy has quit [Remote host closed the connection]
sevenseacat has joined #ruby
hrrz has quit [Quit: hrrz]
bricker`LA has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Ping timeout: 246 seconds]
Boohbah has quit [Remote host closed the connection]
Boohbah has joined #ruby
patrick99e99 has joined #ruby
<wasamasa>
kk
doodlehaus has quit [Remote host closed the connection]
lxsameer has quit [Remote host closed the connection]
Sgeo has quit [Read error: Connection reset by peer]
<shevy>
why don't we have a hybrid of module and classes
<Hanmac>
shevy did you hear that my gemtree now can parse Bundler's Gemfile even when it has links to gemspecs? the funny thing it that it does even work when the required gems in the Gemfile or the gemspec does not exist ... which makes it now better than "bundle viz" in that point
ldnunes has joined #ruby
<shevy>
we have:
<shevy>
class Foo
<shevy>
module Foo
<shevy>
when you wish to extend either, you must write:
<shevy>
class Foo
<shevy>
module Foo
<shevy>
but when they reside in a namespaced container, you don't have to know which one is the first part
<shevy>
module Foo; class Bar
<shevy>
class Foo::Bar
enriclluelles has quit [Remote host closed the connection]
<shevy>
but you still have to know that Bar is a class, in order to extend it like that
cocotton has joined #ruby
<shevy>
I find that rather strange that you must know what it is in order to extend it
cocotton has quit [Remote host closed the connection]
<shevy>
Hanmac cool, perhaps you can replace bundler altogether
<Hanmac>
hm i might not be able to replace it with that, but i can parse its files without bundler
patrick99e99 has quit [Ping timeout: 276 seconds]
<jhass>
shevy: not sure I followed your question but in module Foo; class Bar; you reopen both objects, where as in class Foo::Bar you only reopen Bar, Foo is untouched
sambao21 has joined #ruby
britneywright has joined #ruby
cocotton has joined #ruby
PeterBoy has joined #ruby
horrror has joined #ruby
horrror has quit [Client Quit]
<atmosx>
switching from google to higcharts did the job!!! YAY!!!!
doodlehaus has joined #ruby
manzo has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
chipotle has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
aclearman037 has joined #ruby
jheg has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
jusmyth1 has left #ruby [#ruby]
endash has joined #ruby
orolo has joined #ruby
doodlehaus has quit [Remote host closed the connection]
pierombaabu was kicked from #ruby by apeiros [pierombaabu]
GreatSUN has joined #ruby
<wasamasa>
oh dear
<wasamasa>
Hanmac: looks like your assumption was just right
<wasamasa>
Hanmac: as sad as it is
<shevy>
hey Hanmac
<shevy>
your friend is back
<Hanmac>
shevy: correction! he WAS back ;P
<apeiros>
nice how he pastes the password...
<shevy>
he has more to paste once he gets back again
<apeiros>
Hanmac, shevy: he already spammed this channel?
techsethi has quit [Quit: techsethi]
Takle has quit [Remote host closed the connection]
<shevy>
lemme scroll back
<wasamasa>
apeiros: yeah, I'm wondering what to do with it
<shevy>
<Hanmac> tobiasvl: that user does not want help like that ... i already did link him to Kernel#loop but he did ignore it and nearly asked the same questions again ...
<shevy>
that was what Hanmac had to say about pierombaabu
<shevy>
a good friend :)))
<Hanmac>
apeiros: hm it was not spamming before because it was only one line and no respond ...
<apeiros>
ok
sigurding has joined #ruby
pierombaabu has joined #ruby
Rollabunna has joined #ruby
<wasamasa>
pierombaabu: you should never ever paste your email address and password
<wasamasa>
pierombaabu: change those ASAP
<pierombaabu>
Those are dummy content
<wasamasa>
uhuh
MCDev has quit [Ping timeout: 250 seconds]
gccostabr has quit [Quit: ZZZzzz…]
aleatorik has joined #ruby
britneywright has joined #ruby
_lazarevsky has joined #ruby
<_lazarevsky>
hello all
mkaesz has joined #ruby
<_lazarevsky>
I need to write a ruby script which basically just sends an http request programatically to an endpoint
paulfm has joined #ruby
<pierombaabu>
So how do I keep looping until the user enters correct details?
<_lazarevsky>
is there something like curl in ruby?
nettoweb has quit [Max SendQ exceeded]
* wasamasa
ejects
<pierombaabu>
Thanks!!
Rollabunna has quit [Ping timeout: 255 seconds]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
yfeldblum has joined #ruby
<shevy>
pierombaabu Hanmac answered your question but you did not respond to him, you are not nice
<mikecmpbll>
_lazarevsky: net::http ?
workmad3 has joined #ruby
<mikecmpbll>
or open-uri perhaps
nettoweb has joined #ruby
ctp has joined #ruby
ctp has quit [Client Quit]
<jhass>
_lazarevsky: there are tons of http libraries many being abstractions upon other ones net/http is the one hat ships with ruby, open-uri is an abstraction upon it
<jhass>
_lazarevsky: other popular choices include faraday, rest-client and typhoeus
yfeldblu_ has joined #ruby
<pierombaabu>
Shevy I must have been offline
<pierombaabu>
Thanks Hanmac
Takle has joined #ruby
rubyonrailed has joined #ruby
<shevy>
<pierombaabu> How do I make an indefinite loop where a user has to enter correct credentials to login?
<shevy>
<Hanmac> pierombaabu: with loop {} ?
<shevy>
<pierombaabu> Hanmac could you please write a short code for me to refer to?
<_lazarevsky>
jhass: thanks man. Had a look at the net:http.. suits my needs
<jhass>
_lazarevsky: Please do not crosspost without at least telling so. Experience shows that people don't bother to inform the other channels of provided solutions, therefore it is considered rude.
PeterBoy has joined #ruby
rubyonrailed has quit [Ping timeout: 272 seconds]
dc__ has quit [Remote host closed the connection]
timgauthier is now known as timgauthier_isaw
txdv_ has quit [Quit: leaving]
freerobby has quit [Quit: Leaving.]
Advocation has joined #ruby
Xeago_ has quit [Remote host closed the connection]
sepp2k has joined #ruby
pierombaabu has quit [Remote host closed the connection]
OffTheRails has joined #ruby
techsethi has joined #ruby
Heartbroken has quit [Quit: pai pai...]
Heartbroken has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<atmosx>
wh0ah
<atmosx>
pizza or what?
<atmosx>
mcdonalds/
freerobby has joined #ruby
jottr_ has quit [Quit: WeeChat 1.0]
weems|mac has joined #ruby
weems|mac has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
PeterBoy has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<atmosx>
there's an excellent online wbeiste in Brno where you can order from any restaurant, works great. IMHO makes loads of money... with students and all
anildigital is now known as zz_anildigital
<shevy>
cool
<arup_r>
shevy: How are you ?
KrzaQ has joined #ruby
<atmosx>
Estimated delivery time is 60 minutes .. I think I'm gonna die
<atmosx>
Going to Istanbul the 27th of Sept.
slester has quit [Ping timeout: 245 seconds]
<atmosx>
can't wait
Trieste has quit [Ping timeout: 240 seconds]
PeterBoy has joined #ruby
<KrzaQ>
Is there an one liner equivalent to `find #{dir}` that doesn't require find? I googled Dir['gcc_release/**/*.*'] but it's not recursive
drawingthesun has quit [Quit: Leaving]
<arup_r>
atmosx: my codebase got hacked..
<arup_r>
;(
drawingthesun has joined #ruby
freerobby has quit [Quit: Leaving.]
snath has quit [Ping timeout: 260 seconds]
andrewlio has quit [Quit: Leaving.]
<atmosx>
arup_r: how is that possible?
<shevy>
arup_r shitlots of things to do... right now I am in the final 30% of rewriting an old project
<atmosx>
I keep my code on Github, it's as secure as it gets!
<shevy>
but I had to drop some stuff too because else it takes me too long. I hate rewrites...
<shevy>
atmosx what are you doing in Istanbul
<atmosx>
I could secure my freebsd server too, but I'm too lazy...
pandaant has joined #ruby
<atmosx>
shevy: vacations primarily, and there's a startup istanbul event that I'll visit too.
<shevy>
KrzaQ what do you mean it is not recursive? you get all subdirs + subfiles, then simply .grep() on the result
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jprovazn has joined #ruby
sylvanica has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
<dawkirst_>
hello. I'm struggling to figure out exactly when to use modules and when to use classes. any advice?
Channel6 has joined #ruby
rubyonrailed has joined #ruby
<jhass>
dawkirst_: use a module to share common functionality between classes
binaryhat has quit [Remote host closed the connection]
<jhass>
dawkirst_: for example look at the Enumerable module in core, it contains the common implementations between Array, Hash etc.
Squarepy has joined #ruby
binaryhat has joined #ruby
arup_r has quit [Remote host closed the connection]
<dawkirst_>
jhass: ah ok. so if it's functionality that's not shared between classes, but just used by one particular class, it's better that the said functionality live in a class?
mary5030 has joined #ruby
<jhass>
it should even live in that particular class!
<jhass>
that said modules can be useful to extract a domain out of a class even though it's not used by any other class
<dawkirst_>
jhass: in my case I'm trying to let each class honour the SRP, but I can see where it'd make sense for it to live in the particular class
ndrei has quit [Ping timeout: 272 seconds]
<jhass>
but first you should try to give that domain its own class and let the original class delegate to it
<dawkirst_>
jhass: makes sense, thanks! :)
bMalum has quit [Quit: bMalum]
PeterBoy has quit [Remote host closed the connection]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
rubyonrailed has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
ndrei has joined #ruby
jobewan has joined #ruby
lsone has joined #ruby
manzo has quit [Ping timeout: 255 seconds]
St_Marx has quit [Remote host closed the connection]
Grantlyk has joined #ruby
MaciejCzyzewski has joined #ruby
<shevy>
it's weird because both subclassing and module-inclusion extend behaviour of code
PeterBoy has joined #ruby
sambao21 has joined #ruby
Advocation has joined #ruby
klmlfl has joined #ruby
klmlfl has quit [Remote host closed the connection]
speakingcode has quit [Ping timeout: 245 seconds]
klmlfl has joined #ruby
ItSANgo has quit [Read error: Connection reset by peer]
klmlfl has quit [Remote host closed the connection]
Advocation has quit [Client Quit]
klmlfl has joined #ruby
ItSANgo__ has joined #ruby
banister has joined #ruby
failshell has joined #ruby
speakingcode has joined #ruby
TheNet_ has joined #ruby
albedoa has joined #ruby
<jhass>
shevy: inheritance is more focused on refining or overriding behavior while mixins generally extend it
andrewlio has joined #ruby
lmickh has joined #ruby
sailias has joined #ruby
timmmaaaayyy has left #ruby ["Leaving..."]
jacobat has quit [Ping timeout: 260 seconds]
Ankhers has joined #ruby
TheNet has quit [Ping timeout: 272 seconds]
relix has joined #ruby
tylerkern has joined #ruby
tvw has quit []
Fire-Dragon-DoL has joined #ruby
mikepack has quit [Remote host closed the connection]
ursooperduper has joined #ruby
AlSquirrel has joined #ruby
AlSquire has quit [Ping timeout: 246 seconds]
BlkDynmt has quit [Quit: BlkDynmt]
mary5030 has quit [Remote host closed the connection]
vt102 has joined #ruby
rbrs has joined #ruby
timgauthier_isaw is now known as timgauthier
JohnFord has joined #ruby
anarang has quit [Quit: Leaving]
Macaveli has quit [Ping timeout: 276 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
coderhs has joined #ruby
ta has quit [Remote host closed the connection]
zwichenzug is now known as zwischenzug
patrick99e99 has joined #ruby
cocotton has quit [Remote host closed the connection]
BlkDynmt has joined #ruby
PeterBoy has quit [Remote host closed the connection]
mr-foobar has quit [Quit: Leaving...]
JohnFord has quit [Ping timeout: 252 seconds]
LudicrousMango has quit [Remote host closed the connection]
LudicrousMango has joined #ruby
davedev2_ has joined #ruby
dumdedum has quit [Ping timeout: 260 seconds]
davedev24_ has quit [Ping timeout: 245 seconds]
coderhs has quit [Quit: Leaving]
rubyonrailed has joined #ruby
rubyonrailed has quit [Remote host closed the connection]
patrick99e99 has quit [Ping timeout: 264 seconds]
JohnFord has joined #ruby
sambao21 has joined #ruby
volcanix has joined #ruby
<volcanix>
Is there a way to identify which module has registered a rake task?
LudicrousMango has quit [Ping timeout: 260 seconds]
<volcanix>
Is there some place I could bind pry to see this?
emocakes has joined #ruby
<balance>
why would you prefere passind arguments via a block for the constructor then using the functions signature ("normal" way)?
<balance>
*passing
<mozzarella>
guys
marcules has quit [Ping timeout: 252 seconds]
<mozzarella>
why am I getting both ri and darkfish documentation?
momomomomo has joined #ruby
Tomme has joined #ruby
sambao21 has quit [Ping timeout: 255 seconds]
<Hanmac>
the darkfish/rdoc part is for the html output you can see with "gem server"
<shevy>
mozzarella you are so tasty, I want a bite
<jhass>
volcanix: try p Rake::Task["my:task"].sources
<jhass>
balance: in case you have many
<balance>
jhass why not using an options array?
sdwrage has joined #ruby
<mozzarella>
Hanmac: it uses both?
<jhass>
you mean an options hash? no argument validation
emocakes has quit []
jraphael has joined #ruby
jraphael has left #ruby [#ruby]
<Hanmac>
mozzarella: the ri documentation is only for the ri program, not for the html output, and the darkfish is only the html and can not be used for ri ... thats why it does use both
jtharris has joined #ruby
<jhass>
o.i_made_a_tpo = ... vs .new(i_made_a_tpo: ...)
sk87 has joined #ruby
<jhass>
also more room for complex computation of the options
jacobat has joined #ruby
<jhass>
if Config.do_this? o.do_that = Config.do_that else o.dont_do_this = true; end
<sprung>
Hi. I am not a ruby/rails developer but a sysadmin who is running a rails application that uses the rackup command to initialize. I want to ensure that the application is always running, and if it for some reason breaks I want it automatically restarted. I know I can accomplish this through monit. The only thing I need for monit to work is a pidfile. is there a built-in way for rackup to create a pidfile? just trying to save some time if it's easy
arup_r has joined #ruby
<sprung>
if not i will write a wrapper
mooru has joined #ruby
<toretore>
probably easier for you to write a wrapper
<shevy>
toretore in that example, the namespace of class Bar will be class Object?
<jhass>
balance: well sure it is. but then you always call that one success, the point of passing a proc is that you can replace the implementation from the caller side
<shevy>
or perhaps, let me reformulate:
<shevy>
class Foo < Bar::Ble
<shevy>
class Object::Foo < Bar::Ble
<shevy>
is that the same?
<jhass>
yes
<toretore>
shevy: no, it's just "toplevel"
<jhass>
toretore: Object is toplevel
rockdon_ has joined #ruby
<toretore>
really?
<shevy>
cool
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<balance>
jhass hmm, I don't get this. If I want to change what happens on success, I change the success function. Otherwise I'd have to change the proc. Which basically is the same, I don't see the point.
<balance>
*method
bal has quit [Quit: bal]
Jon-Xie_ has quit [Remote host closed the connection]
<toretore>
jhass: ok that makes sense
<toretore>
kind of
<jhass>
balance: if that's your own class and your only instance of it and during runtime what should happen in success always stays the same, sure
DaveTaboola has joined #ruby
poguez_ has joined #ruby
<jhass>
balance: passing a proc is for the cases where that isn't the case, it's basically the same as passing a block in fact
PeterBoy has joined #ruby
<balance>
jhass I just don't see why I should pass aproc and not just use methods.
koderok has joined #ruby
koderok has quit [Client Quit]
<jhass>
balance: in that case you probably shouldn't. The cases where you should are pretty obvious
<DaveTaboola>
hey! :) i hope i wont be annoying by asking that question but i need some help with compressing large files with ruby, i keep reaching the heap_size and somehow incressing my server memory to bazliion TB won't seem logic so i guess i'm processing the data in a wrong method
<jhass>
balance: for example think of an asynchronous http library that you pass a callback
arturaz has quit [Remote host closed the connection]
<toretore>
DaveTaboola: code
<jhass>
balance: or better yet, two callbacks, one for success and one for failure
<balance>
jhass yeah, I actually think there are a few aehm situations where I would use blocks/procs, but I think they are quite rare but also, this is a new concept to me. thanks.
<DaveTaboola>
yap i know :\ thats the problem
lbwski has joined #ruby
Channel6 has quit [Quit: Leaving]
<toretore>
read and write in chunks
<toretore>
and your problem is solved
<DaveTaboola>
haha that's why i'm here i'm not sure what's the best way to do that
<lagweezle>
So ... peering at a 'ruby interview questions' page, and came across this gem: "Is the line of code below valid Ruby code? If so, what does it do? Explain your answer." The line in question: -> (a){p a}["Hello world"]
<jhass>
DaveTaboola: but honestly, I would find shelling out to gzip in that case acceptable
LudicrousMango has joined #ruby
<DaveTaboola>
toretore: couldn't agree more, but i was reading it 3 times already :)
<DaveTaboola>
jhass: i thought of that, as i'm not sure how gzip works i'm afraid it will use the same method
<jhass>
easy enough to give it a try though
<lagweezle>
I can't help but think that that question is a perfect example of a stupid trivia question that is pointless to have or ask in terms of finding out how well a person will do. Great for finding if they have memorized obscure trivia, but otherwise pretty useless. :/
<lagweezle>
I am, however, curious if folks have a differing view on this, though...
<toretore>
DaveTaboola: 1) open the file 2) read x bytes from file 3) write x bytes to gzip 4a) if more bytes -> 2 4b) no more bytes, close file
lsone has quit [Ping timeout: 245 seconds]
<balance>
I have to convert the proc into a block because I use the yield statement here? http://pastebin.com/zHVUnjuT
cougarten has quit [Ping timeout: 250 seconds]
<lagweezle>
[A
<lagweezle>
[A
sigurding has quit [Quit: sigurding]
<lagweezle>
[A
<lagweezle>
gah, sorry
<jhass>
balance: yes
Kerber0s has quit [Ping timeout: 272 seconds]
ffranz has joined #ruby
<jhass>
balance: also your each doesn't accept a regular parameter and a proc is a regular object
aganov has quit [Remote host closed the connection]
<jhass>
balance: and most people construct procs with Kernel#proc instead of Proc.new
<DaveTaboola>
toretore: at first step before loading everything to the memory, what i did is open a listener and once data is written to the file i was processing it out using the Zlib, and while i could unzip it later on the desination that i'm uploading the data to, couldn't
lsone has joined #ruby
<balance>
jhass I know that each, as a method of e.g. array, only accepts blocks, but this shouldn't matter here since I'm redefining it and the games.each shouldn't care about the proc since it doesn't get intouch. doesn't it?
<toretore>
DaveTaboola: this is http?
b00stfr3ak has joined #ruby
<DaveTaboola>
nope, logstash
<toretore>
so you are writing to disk?
<DaveTaboola>
toretore: yap
<shevy>
balance that code does not make that much sense
<toretore>
write to temp file, rename when done
<shevy>
here is how you normally use yield
<jhass>
balance: right, doesn't invalidate anything I said though
<shevy>
def foo
<shevy>
yield if block_given?
<shevy>
end
<shevy>
foo { puts 'heya' }
<balance>
jhass If I overload an existing method, does ruby expect the same signature?
<jhass>
balance: methods don't magically accept proc objects, they just magically accept a block
<balance>
shevy why shouldn't it make any sense?
fabrice31 has quit [Remote host closed the connection]
<jhass>
balance: no
gsd has joined #ruby
<jhass>
balance: thus we have no overloading, just redefinition
<toretore>
balance: a block is just a magic invisible variable that contains a proc
<shevy>
balance because you use a method called each, inside that method you call games which looks to be empty, and you always yield without checking whether you passed anything
* lagweezle
curses at himself for yet again having the wrong window.
<shevy>
balance and you don't even have an initialize method defined
SilkFox has quit [Ping timeout: 260 seconds]
<shevy>
also you use pastebin.com
quitobro has joined #ruby
jheg has quit [Quit: jheg]
<balance>
shevy it's from an excersice, the only thing is to understand procs, blocks etc. that's why it probably looks bad, unfunctional etc. they run it in their sandbox where everything exists.
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bricker`LA has joined #ruby
avita1 has joined #ruby
BadQuanta has joined #ruby
<balance>
shevy who cares what pastebin I use?
<toretore>
i do
<toretore>
pastebin sucks
ta has joined #ruby
<balance>
toretore, why?
<shevy>
yeah
<shevy>
it has flash ads
<shevy>
the colour highlighting is god awful
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jacobat has quit [Ping timeout: 240 seconds]
<toretore>
it sssuuuuuuuuuxxxxxxxxxx111111!!!!
sivam has joined #ruby
<shevy>
I can not even directly copy paste your code balance
<shevy>
both examples can be copy pastied directly \o/
<balance>
shevy yeah for real project problems. but for simple questions with a little example :) anyway. I'll stop using pastbin if it is hated that mutch
<shevy>
erm... *pasted
<shevy>
for all questions
mpistone has joined #ruby
<centrx>
Tense situation here in #ruby over pasties
<shevy>
the more convenient you make it for others to answer your question
<toretore>
also, that's not a good paste
<shevy>
the better and more likely you get an answer to
Rollabunna has joined #ruby
<centrx>
and you're shoe's untied!
<toretore>
you should paste entire files, by themselves as gist allows you to do
abuzze has quit [Ping timeout: 245 seconds]
<shevy>
balance ok let's test the channel
<jhass>
balance: people #rubyonrails have bot that automatically explains it, people on #archlinux have it on a bot command. It is hated that much
<shevy>
balance next 3 questions you ask in regards to ruby you should put onto pastebin, I'll be silent :)
<balance>
shevy git got a pastebin? gist? didn't know that. :P will use this 4 sure.
<shevy>
yeah
<mikecmpbll>
man, people who do data structures that aren't arrays when there's only one item, but are when there's multiple just give me a headache
<shevy>
you can make public and private pasties, and delete them
renderful has joined #ruby
<shevy>
on github
yfeldblum has quit [Ping timeout: 245 seconds]
arup_r has quit [Quit: Leaving.]
<mikecmpbll>
if you have an api that returns `languages`, it should always be a fucking array.
<shevy>
mikecmpbll what about hashes?
<toretore>
mikecmpbll: +1
<jhass>
mikecmpbll: time for the good old [*im_not_sure].each hack ;)
icebourg has joined #ruby
<mikecmpbll>
jhass: oooh. i was doing [im_not_sure].flatten
<balance>
so thanks again, another little question, is a stab lambda only a shortcut fora normal lambda or is there a technical difference?
<centrx>
Array.wrap
d2dchat has quit [Read error: Connection reset by peer]
<jhass>
mikecmpbll: breaks on return values like [[1,2],[3,4]]
OffTheRails has joined #ruby
<centrx>
balance, stabby is just a shortcut
<balance>
centrx, ty
<centrx>
balance, lambdas (both of them) are slightly different from plain Procs though
<jhass>
centrx: Array::wrap is Activesupport
<mikecmpbll>
jhass: yours breaks if the item is a hash
<mikecmpbll>
:[
<jhass>
oh, yeah :/
<mikecmpbll>
well, it converts it to an array, which may not be desirable.
<mikecmpbll>
that's the problem i was having with Array(unsure)
<centrx>
jhass, it was added to Ruby 3.5, I've come back in time to tell you about it
<mikecmpbll>
converts `unsure` to an array if it's a hash
<balance>
centry I know that theres a difference, don't know what but I'll read that up :)
sevenseacat has quit [Quit: Leaving.]
<jhass>
mikecmpbll: .flatten(1) then :/
kotk has joined #ruby
Nss has joined #ruby
<mikecmpbll>
jhass: ah, wasn't aware flatten took an arg, tidy. that's the silvert bullet methinks.
jusmyth has quit [Quit: Leaving.]
<jhass>
it's so verbose though!
<mikecmpbll>
indeed ;(
bousquet has joined #ruby
<Nss>
hello, I'm trying to do the union between two arrays inside an erb template, the problem is that using the "array1 | array2" syntax, the result seems to be "true"
chrishough has joined #ruby
<Nss>
do you know how to do do the union inside an erb template?
kotk_ has quit [Ping timeout: 264 seconds]
<centrx>
Nss, maybe one of them is not an array and it has nothing to do with ERB?
codearmster has quit [Quit: Leaving]
<centrx>
Nss, it should work fine, show us the complete syntax you are using
theRoUS` has left #ruby ["Off to another part of the maze of twisty little passages"]
<apeiros>
but people are all about "me me me" and don't care about wasting others' time.
<centrx>
Phrogz, The channels each have their different aspects
<jhass>
klmlfl: sure, simple rules: give it time: Don't repost in the same hour, anywhere. Inform: tell you asked this previously and where you did. Share: share solutions everywhere you asked
mg^ has joined #ruby
<klmlfl>
i know the rules now
qba73 has quit []
<centrx>
Phrogz, There's also #rubyonrails that's another big division
<Phrogz>
Not sure what you mean by "you always have that". I'm saying that there's not #haml1 and #haml2, or #lua1, #lua2, #lua3. Yet we have #ruby and #ruby-lang with no (discernible to me) difference in purpose.
<klmlfl>
i wont cross post again
kireevco has joined #ruby
Tuxero has joined #ruby
paulfm has joined #ruby
<centrx>
Phrogz, #ruby-lang is for super-l337 Rubyists, and complete n00bs who found it on the website
Grantlyk has quit [Remote host closed the connection]
<Phrogz>
centrx: True, but like #sinatra that has a specific purpose.
Grantlyk has joined #ruby
<Phrogz>
Hah
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<klmlfl>
jhass: common sense. ill use it next time.
<centrx>
klmlfl, you're forgiven :)
<Phrogz>
The root of this problem is the asshole domain squatter who kept Matz from getting www.ruby.com ;)
dapz has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
paulfm_ has quit [Ping timeout: 245 seconds]
Morkel has quit [Quit: Morkel]
<Phrogz>
! And it's been sold to Kay jewelers. Damnit, I bet he made out well on that, too.
<balance>
Phorgz doesn't ruby have a right for ruby.com? trademark stuff?
<jhass>
balance: you can't pass a block in a regular parameter
SCHAAP137 has joined #ruby
<balance>
jhass *ding* :P
<Phrogz>
IANAL, but I am pretty sure no.
ndrei has joined #ruby
olivier_bK has quit [Ping timeout: 268 seconds]
<centrx>
balance, Ruby is a general word, and trademarks are specific to industry/purpose
<centrx>
balance, it might make sense for domain names to go to trademark holders, but there would be many people with "Ruby" trademarks
<jhass>
balance: if you want to assign a block to a variable you have to turn it into a proc. Don't worry about useless conversions, ruby has optimizations for these cases under the hood
<Phrogz>
Ruby's diner, for example.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<balance>
centrx yeah, probably, really not into that law stuff
<jhass>
balance: no, that would try to pass the return value of the block as first parameter to games.each
<centrx>
the law of the code
nfk has joined #ruby
<jhass>
balance: the def each(&block); games.each(&block); end; version was correct
<balance>
jhass so I have to use a proc or lambda if I want to have a block executed for each iteration of each?
JohnFord has joined #ruby
<jhass>
balance: not necessarily, the def each; games.each do |game| yield game; end; end; version works too
diegoviola has joined #ruby
<balance>
jhass of course
aspires has quit []
zorak8 has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
<balance>
jhass, thanks I'm gone :) bye
britneywright has joined #ruby
jheg has quit [Quit: jheg]
<mwlang>
balance: TM rights can only be enforced if you’ve trademarked the name (ruby in this case) and you did it before the cybersquatter took the domain AND you can show the squatter is not using the domain name in a way conducive to his business (in other words, he doesn’t “park” the domain)
<manacit>
(like nissan.com)
rdark has quit [Quit: leaving]
ghostmoth has joined #ruby
<balance>
mwlang that sucks
<mwlang>
so basically, its pretty tough to take a domain from a squatter.
lkba has quit [Read error: Connection reset by peer]
<workmad3>
mwlang: doesn't it depend on the policies of the top-level registrar too?
jheg has joined #ruby
jheg has quit [Client Quit]
anaeem1_ has joined #ruby
<mwlang>
workmad3: nope
theRoUS has quit [Changing host]
theRoUS has joined #ruby
RaCx has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
<mwlang>
workmad3: I think for a while it worked that way, but it got challenged in court
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3>
mwlang: I'd be interested to know which court(s), as the top-level registrars tend to be rather international :)
enriclluelles has quit [Remote host closed the connection]
<eam>
that's not entirely accurate. TM rights can be enforced for any mark infringement
froggy_ has quit [Ping timeout: 246 seconds]
himsin has quit [Quit: himsin]
<eam>
that's not the same as taking control of the domain name
<workmad3>
mwlang: so I doubt the country-level registrar for china is going to particularly care about either a US lawsuit or a US trademark infringement :)
ndrei has joined #ruby
<mwlang>
workmad3: yeah, I doubt it, too.
<mwlang>
more to the point is whether the registrar will revoke a squatter’s rights to a domain and award it to the challenger
Scripore has joined #ruby
tlarevo has joined #ruby
OffTheRails has joined #ruby
yfeldblum has joined #ruby
<eam>
there could be no TM infringement if ruby.com is being used to sell rubies
W0rmDr1nk has quit [Ping timeout: 255 seconds]
Photism has quit [Quit: Leaving]
<apeiros>
or if it's miss ruby, selling bunga bunga parties…
<pumpkintits>
I'm trying to do something rather simple in Ruby, echo a ruby variable in the middle of an "execute <bash statement>". Is there a way to use a ruby variable while doing an echo in bash?
<jhass>
File.read(path, encoding: 'utf-8') even
<Hanmac>
or what jhass says
<centrx>
pumpkintits, do you mean interpolate or put in instead of echo?
iko1 has joined #ruby
<centrx>
in the system(string)?
<pumpkintits>
interpolate I guess?
<pumpkintits>
so I'm echoing this...
<pumpkintits>
echo "$timestamp - <need to put ruby variable here>"
<iko1>
i have installed ruby2 as local user on a ubuntu system but its a older installed in the system. how do i choose which version its going to use when installing gems?
<Phrogz>
pumpkintits: Or in your case: `echo #{ruby_var}`
tectonic has quit [Max SendQ exceeded]
<pumpkintits>
Phrogz, I'll give that a shot
<Phrogz>
apeiros: duplicate of jhass, but thx :)
<apeiros>
ah, only saw the other suggestions
darkxploit has quit [Max SendQ exceeded]
sigurding has quit [Ping timeout: 245 seconds]
<jhass>
pumpkintits: I think you can that in pure ruby
hamakn has joined #ruby
darkxploit has joined #ruby
<apeiros>
why do game consoles always have to have utterly sucking UIs? >:(
<pumpkintits>
I suck at ruby :P I tried to do a simple timestamp and could get that to work, but then converting that timestamp to the proper timezone was a pita
<pumpkintits>
(in ruby that is)
carraroj has joined #ruby
bryanhowarth has joined #ruby
p0sixpscl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
d2dchat has joined #ruby
iko1 has quit [Quit: leaving]
nairys has joined #ruby
<jhass>
pumpkintits: File.write('/root/changes.txt', "#{Time.now.strftime("%Y-%m-%d %Z")} and so on", mode: 'a') I guess
<Phrogz>
apeiros: Because including a framework is too much overhead? Because game programmers are full of hubris and like to do it all themselves? Because the UI is an afterthought and unimportant to the game (in their minds)?
cirn0 has joined #ruby
darkxploit has quit [Max SendQ exceeded]
Mars__ has quit [Remote host closed the connection]
hamakn has quit [Ping timeout: 245 seconds]
darkxploit has joined #ruby
cocotton has quit [Remote host closed the connection]
shackleford has quit [Remote host closed the connection]
<pumpkintits>
jhass I'll play with that real quick and see
pandaant has quit [Remote host closed the connection]
Smujo has quit [Ping timeout: 246 seconds]
fsapo has joined #ruby
<Hanmac>
apeiros: do you mean the UI of the menu of the consoles or do you mean the Ingame UI of the games?
<pumpkintits>
how do I cast that time in a certain timezone?
kaspertidemann has joined #ruby
<apeiros>
Hanmac: console OS
pandaant has joined #ruby
<apeiros>
Hanmac: though most ingame UIs (before you start the game) suck as well
<Phrogz>
pumpkintits: What do you mean by 'cast'? If it's 8am CST, and you want to 'cast' to EST, should that 11am EST or 8am EST?
<apeiros>
worst example encountered so far in games is super smash bors
<apeiros>
*bros
<pumpkintits>
so I want to convert the current system time to PST
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Scotteh has joined #ruby
<Hanmac>
hmmm I liked the SuperMarioBros Movie ;P
rockdon|away is now known as rockdon_
dc__ has joined #ruby
SilkFox has quit [Ping timeout: 268 seconds]
<Phrogz>
If the current system time is 10:58am in your (non-PST) timezone, do you want the result to be 10:58am PST, or whatever time it currently is in PST?
RaCx_ has quit [Quit: Computer has gone to sleep.]
<workmad3>
Hanmac: that takes the total number of likes up to 1!
<pumpkintits>
whatever time it currently is in PST
abuzze has joined #ruby
<Grantlyk>
Anyone here got the goal of becoming a rails developer in San Fran?
cirn0 has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
darkxploit has quit [Max SendQ exceeded]
agjacome has joined #ruby
baroquebobcat_ has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkxploit has joined #ruby
froggy_ has joined #ruby
<eam>
Time is kinda missing a good way to pass the time zone isn't it? It can be done, but ugly
<workmad3>
sprung: because you like living with ridiculous rents, in boiling hot conditions under the threat of sliding into the sea?
<sprung>
Grantlyk, you miss the point of my question
<eam>
workmad3: hot? In San Francisco?
<eam>
are you nuts
<workmad3>
eam: I live in britain
<sprung>
Grantlyk, why do you need to physically be in san fran
<workmad3>
eam: anything over 20 degrees C is 'hot' :P
<sprung>
as would any manager
havenwood has joined #ruby
<Grantlyk>
sprung: Your question is to why i'm actually wanting to move to San Fran when i can easily work remotely or work elsewhere as a rails developer
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
also awesome - how an SD card is required to transfer data between two wi-fi capable consoles in the same room…
<apeiros>
shame on nintendo
<sprung>
Grantlyk, but you can easily work remotely from anywhere
<eam>
workmad3: it's three degress colder here than in London, right now
<pumpkintits>
thank you Phrogz
darkxploit has quit [Max SendQ exceeded]
cocotton has joined #ruby
<sprung>
Grantlyk, just admit it, you are looking for a way to live in san francisco and that's what you're really interested in.
sambao21 has quit [Quit: Computer has gone to sleep.]
Guest14443 has quit [Ping timeout: 255 seconds]
<Grantlyk>
sprung: I never at any point denied that
mocfive has quit [Remote host closed the connection]
darkxploit has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
mocfive has joined #ruby
<workmad3>
eam: fair enough... looks like your average temps are on a par... but your highs are much higher and your lows aren't as low ;)
<sprung>
Grantlyk, where do you live now, i'm just curious
<eam>
in san francisco?
<workmad3>
eam: yeah
<Grantlyk>
sprung: Edinburgh, Scotland.
cocotton has quit [Remote host closed the connection]
<eam>
it never gets warm here
<workmad3>
eam: record highs of 39 degrees...
timonv_ has joined #ruby
roolo has quit [Quit: Leaving...]
<workmad3>
eam: and lows of -5...
<workmad3>
eam: at least according to the data I found :)
ghr has joined #ruby
<Phrogz>
Converting all-lowercase string to initial capital: name.sub(/./,&:upcase) whee :)
<eam>
workmad3: you're looking at something inaccurate I think, highs are generally 21
<Grantlyk>
workmad3: -5 is worth it for the 39s, -5 is nothing to scotland :D
yfeldblum has joined #ruby
wallerdev has joined #ruby
<sprung>
Grantlyk, Ah. Let me help you with something. If you move to California, particularly San Francisco, the housing available for what you will be paid is more than likely going to give you a lower quality of life than you are accustomed to (a cardboard box).
<eam>
there's like a 5-20 degree variation in the city
<Grantlyk>
sprung: Yeah, i've looked into housing and it is rather expensive
* Hanmac
remins a bit a few winters ago when he was alone for weeks and it was -20°C outside ... and i did play the game "Little Inferno" ;P
elstif has quit [Quit: Leaving.]
<eam>
workmad3: now if you go outside to the rest of the bay area, 45+
echevemaster has joined #ruby
<sprung>
Grantlyk, it's quite literally the second most expensive place to live in the country
<Grantlyk>
sprung: What alternative options would you suggest?
<sprung>
Grantlyk, if I were you I would look at working in Austin, it's the new silicon valley, cost of living is significantly more agreeable
darkxploit has quit [Max SendQ exceeded]
malcolmva has quit [Ping timeout: 260 seconds]
<eam>
where I live we hit a high of 110F / 43c this year
Xeago has quit [Remote host closed the connection]
<Grantlyk>
sprung: I'll look into austin
<eam>
cost of living in the bay area is fine, SF itself is high but most people don't live there
darkxploit has joined #ruby
<sprung>
Grantlyk, Texas is where the most startups are popping up. I lived there for 3 years, Austin is the place to be right now for startup land
mocfive has quit [Ping timeout: 246 seconds]
<eam>
and most tech work isn't in SF -- it's in San Jose
<eam>
SF isn't silicon valley
ndrei has quit [Ping timeout: 245 seconds]
<Grantlyk>
sprung: Cool
<eam>
like less than 10% of tech is in SF
<Grantlyk>
eam: No one said SF is silicon valley
<sprung>
another city that's almost as startup friendly is Google FIber land, kansas city
<eam>
Grantlyk: you said silicon valley is expensive and referenced SF cost of living :P
<Grantlyk>
eam: I didn't mean to mention silicon valley at all, if I did.
<workmad3>
eam: 43c high is pretty high to me
cocotton has joined #ruby
sambao21 has joined #ruby
<eam>
workmad3: yeah it's hot out where I am
<workmad3>
eam: I don't like more than about 22 :)
aspires has quit []
mikepack has joined #ruby
<eam>
workmad3: illustrating the extreme micro-climates around the bay
Tomme has joined #ruby
<eam>
we have areas that are essentially always 10-20, we have areas that are often 40+
<workmad3>
eam: but then I'm also fine down to about -10 before I consider putting on a thicker jacket... :)
yfeldblum has quit [Ping timeout: 255 seconds]
ghr has quit [Ping timeout: 260 seconds]
ndrei has joined #ruby
PeterBoy has quit [Read error: Connection reset by peer]
<eam>
we keep our snow up by tahoe
<workmad3>
I didn't get any snow this year :(
<sprung>
Grantlyk, you also need to understand that with Ruby you're competing with the entire world, because honestly they can outsource this stuff almost as easily as java programmers. you need to have systems engineering skills or database development skills to back it all up if you really want to compete
<workmad3>
anyway, I need to head home now
<workmad3>
hf all
PeterBoy has joined #ruby
darkxploit has quit [Max SendQ exceeded]
<centrx>
Silicon Valley is a traffic and smog-filled wasteland, so everyone hooked up to the Matrix/Cloud and that's why they are the tech leaders now
<Grantlyk>
sprung: I've got SQL skills as well
PeterBoy has quit [Remote host closed the connection]
aspires has joined #ruby
darkxploit has joined #ruby
ptrrr has joined #ruby
tylersmith has joined #ruby
<sprung>
Grantlyk, set up a ruby application server with your own custom API on the amazon cloud connecting to redshift and have a github with the commits and you'll have something to demo in an interview. sounds hard, but actually it's really not
nanoyak has joined #ruby
<sprung>
a REST based web hook
<Grantlyk>
sprung: Congratulations, you've just given me the best advice anyone could have given me
Hanmac has quit [Quit: Leaving.]
<sprung>
lately "do you have a github" has been an interview question lately at my company
Morkel has joined #ruby
<Grantlyk>
sprung: I've recently been forced to leave university without getting my degree, so i'm going to start your project idea right now
<Grantlyk>
sprung: I've already got a github, with a blogging engine that I was programming on it
<sprung>
you don't need a degree i don't have one and i'm in the second highest tax bracket
Hanmac has joined #ruby
<sprung>
(that means i'm doing quite well salary wise)
<Grantlyk>
Do you mind telling me what that tax bracket covers?
<eam>
400k+ :)
GreatSUN has quit [Ping timeout: 246 seconds]
Mars__ has joined #ruby
BlkDynmt has quit [Quit: BlkDynmt]
<sprung>
i'm not even much of a ruby programmer i am a devops admin that the ruby and java developers here at my company need, they have me make servers, databases and load balancer stuff for them
<eam>
(there's a reason real estate is expensive here, people can afford to drive up prices)
darkxploit has quit [Max SendQ exceeded]
workmad3 has quit [Ping timeout: 272 seconds]
<sprung>
eam oh, third then
<sprung>
lol
lele has quit [Ping timeout: 260 seconds]
<eam>
sprung: they've added a few :)
wallerdev_ has joined #ruby
sk87 has joined #ruby
darkxploit has joined #ruby
<sprung>
yep seeing as i'm married filing jointly that puts me in third
anaeem1 has joined #ruby
nanoyak has quit [Ping timeout: 245 seconds]
lagweezle has left #ruby [#ruby]
<Grantlyk>
damn
<eam>
CA just added three new brackets as well, previously it topped out at an incredible 50k
wallerdev has quit [Ping timeout: 264 seconds]
wallerdev_ is now known as wallerdev
thagomizer has joined #ruby
<sprung>
but yeah, in IT they don't care about degrees. they care about results
<eam>
which meant basically everyone was paying top bracket
rocknrollmarc has joined #ruby
<eam>
(super refressive)
<eam>
regressive
<eam>
also, completely agree with sprung
<Grantlyk>
Do you mind explaining to me what redshift is?
<wasamasa>
sounds like the US
<eam>
I also don't have a degree and have on-par compensation
mark_locklear has quit [Quit: Leaving]
kenneth has joined #ruby
<eam>
wasamasa: yeah
<sprung>
Grantlyk, but you know how europeans complain about the "typical american"? well you're being the typical foreigner right now wanting to move to San Francisco. it's a bad move.
sk87 has quit [Client Quit]
malcolmva has joined #ruby
<eam>
move to hayward
<wasamasa>
I'm not in the US
<sprung>
Grantlyk, it's a distributed postgres database system
<eam>
wasamasa: a lot of states don't have income tax at all
bricker`work has quit [Read error: Connection reset by peer]
<wasamasa>
I don't plan moving there
<sprung>
Grantlyk, the reason why i'm saying you should do stuff on amazon is that everybody wants to do stuff "on the #%^$#&$^ cloud". you could do Rackspace or others as well but everybody knows amazon
bricker`work has joined #ruby
darkxploit has quit [Max SendQ exceeded]
deric_skibotn has joined #ruby
kriskropd has joined #ruby
Wolland has quit [Remote host closed the connection]
<Grantlyk>
sprung: Awesome, is that a good project to show for a junior level interview or a developer level interview?
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
g0bl1n has quit [Quit: g0bl1n]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eam>
the other big problem with our tax system is that the truly rich folks (including many tech workers in the valley) take their comp in equity instead of salary and pay less than half of the taxes (including not paying into social programs)
darkxploit has joined #ruby
<sprung>
Grantlyk, it would demonstrate you can write a web app in ruby that uses real-world production grade technology so i would say developer level
<sprung>
Grantlyk, if you live in the united states the other thing you will want to look for is "matched 401k"
<sprung>
go look it up
<Grantlyk>
sprung: Awesome, thanks again for the help, I stay in the UK
Grantlyk has quit [Read error: Connection reset by peer]
Morkel has quit [Read error: Connection reset by peer]
darkxploit has quit [Max SendQ exceeded]
Grantlyk has joined #ruby
nb_bez__ has joined #ruby
klmlfl_ has joined #ruby
<eam>
it doesn't say whether it's matching 401k or not, but honestly it's not very important
klmlfl_ has quit [Remote host closed the connection]
klmlfl has quit [Read error: Connection reset by peer]
lsone has quit [Ping timeout: 240 seconds]
rklfn has joined #ruby
<eam>
401k contributions top out around 17k/year, so that kind of benefit at best can get you around that much more
<sprung>
when i worked at rackspace they match 1 to 1 at 6% it was pretty awesome
darkxploit has joined #ruby
<eam>
up to 6%?
klmlfl has joined #ruby
<eam>
at best that's an extra 17k
<sprung>
meh it was vanguard too which is awesome
Morkel has joined #ruby
<eam>
and to get 17k @ 6% you need a base of 283k
spastorino has joined #ruby
<sprung>
really the best employers are the oil companies
<eam>
yeah they are
lele has joined #ruby
<sprung>
they have amazing benefits
troyready has joined #ruby
cpruitt has joined #ruby
<eam>
work for aramco, get pension and medical for life
aspires has quit []
Mars__ has quit [Remote host closed the connection]
Mars__ has joined #ruby
<eam>
the unspoken secret to the bay area is that companies set compensation based on fashionable living (like in SF) so if you live somewhere cheaper you can pocket the enormous difference
darkxploit has quit [Max SendQ exceeded]
nanoyak has joined #ruby
thumpba_ has quit [Remote host closed the connection]
<centrx>
I thought the secret was to work at a place with free laundry and all meals and live at the office for free
hellangel7 has quit [Remote host closed the connection]
darkxploit has joined #ruby
aspires has joined #ruby
<pipework>
I thought the secret was to get rich and not have to worry about cost of living.
d2dchat has quit [Remote host closed the connection]
PeterBoy has joined #ruby
<sprung>
i used to see the draw of living out there but now i really don't. austin has all of that and a bag of chips they just don't have an ocean. They do have a nice warm clean river that you can kayak in though
doodlehaus has quit [Ping timeout: 255 seconds]
saarinen has joined #ruby
<eam>
meals are like what, 3k/year benefit?
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
<mozzarella>
how can I delete ri and darkfish documentation?
claymore_ has joined #ruby
<eam>
I'd rather work for a company that gives me equity :P
<sprung>
i would only consider it if the job were at the GooglePlex
blackope_ has joined #ruby
<eam>
I hear austin is really nice
saarinen has quit [Client Quit]
Tomme has quit [Ping timeout: 245 seconds]
hellangel7 has joined #ruby
claymore has quit [Remote host closed the connection]
<sprung>
yeah, so did everybody else though. that's why it's the fastest growing city in the country.
orolo has quit [Quit: This computer has gone to sleep]
sepp2k has quit [Quit: Konversation terminated!]
dc__ has quit [Remote host closed the connection]
<eam>
pipework: people get rich by living within their means :)
Mars__ has quit [Ping timeout: 245 seconds]
saarinen has joined #ruby
klmlfl has quit [Read error: Connection reset by peer]
<pipework>
eam: I wouldn't know. I'm not what I would call rich.
aspires has quit [Client Quit]
darkxploit has quit [Max SendQ exceeded]
klmlfl has joined #ruby
hellangel7 has quit [Max SendQ exceeded]
<eam>
it's all relative, we've got time to chat on the internet so compared to the world population everyone here is doing pretty excellent
darkxploit has joined #ruby
hellangel7 has joined #ruby
eivindml has quit [Ping timeout: 252 seconds]
CaptainJet has joined #ruby
RaCx has joined #ruby
rocknrollmarc has quit [Ping timeout: 276 seconds]
kaldrenon has joined #ruby
xenomorph is now known as {xenomorph}
m8 has joined #ruby
<kaldrenon>
If I have an instance of class Foo::Bar and I call .class.to_s on that instance, I get "Foo::Bar". Is there a quick way, without a regex, to get just "Bar" off an instance of Bar?
shackleford has joined #ruby
blackope_ has quit [Ping timeout: 245 seconds]
darkxploit has quit [Max SendQ exceeded]
lsone has joined #ruby
cougarten_ has joined #ruby
darkxploit has joined #ruby
Mars__ has joined #ruby
superscott[8] has joined #ruby
khyber has joined #ruby
<jhass>
kaldrenon: .name
<jhass>
ah, no that's with the namespace too
<jhass>
.name.split('::').last then
<mattpolito>
kaldrenon: are you in rails or plain ruby?
<kaldrenon>
mattpolito: Rails
MCDev has joined #ruby
<mattpolito>
#demodulize
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shackleford has quit [Remote host closed the connection]
kaspertidemann has quit [Ping timeout: 268 seconds]
hellangel7 has quit [Remote host closed the connection]
shackleford has joined #ruby
kristofferR has joined #ruby
<khyber>
has anybody worked with wombat gem in ruby
rklfn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<khyber>
it is used for crawling
<kaldrenon>
mattpolito: Thanks, I'll give that a shot
doodlehaus has joined #ruby
tobago has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 246 seconds]
ta has joined #ruby
shock_one has quit [Quit: Computer has gone to sleep.]
cougarten has quit [Ping timeout: 245 seconds]
mocfive has joined #ruby
wallerdev has quit [Quit: wallerdev]
darkxploit has quit [Max SendQ exceeded]
PeterBoy has quit [Remote host closed the connection]
RaCx has quit [Ping timeout: 272 seconds]
darkxploit has joined #ruby
PeterBoy has joined #ruby
chrishough has joined #ruby
<kaldrenon>
mattpolito: Looks like demodulize didn't get patched into the class I want to use it on (it's a support class, not a class in core rails). I'm content settling for a split like jhass suggested
khyber has left #ruby [#ruby]
AlSquirrel has quit [Quit: This computer has gone to sleep]
{xenomorph} is now known as xenomorph
<kaldrenon>
Wait, never mind - I'm dumb and dropped the to_s off when I put in the demodulize
User458764 has joined #ruby
<kaldrenon>
Thought it was a method on Class, need to read more carefully
orolo has joined #ruby
ghanima has joined #ruby
darkxploit has quit [Max SendQ exceeded]
aspires has joined #ruby
doodlehaus has quit [Ping timeout: 252 seconds]
rbenv has joined #ruby
darkxploit has joined #ruby
RaCx has joined #ruby
chrisja has joined #ruby
britneywright has joined #ruby
wallerdev has joined #ruby
AlSquire has joined #ruby
tylerkern has quit [Quit: Connection closed for inactivity]
AlSquire has quit [Remote host closed the connection]
shredding has joined #ruby
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework>
I find it a bit humourous that we get a christmas present from a mormon.
<centrx>
that seems pretty far away though
tlarevo_ has quit [Remote host closed the connection]
<centrx>
is there any way we could move xmas forward
niklasb has joined #ruby
<centrx>
or backwards is it
yfeldblum has quit [Ping timeout: 264 seconds]
yetanotherdave has joined #ruby
<shevy>
not unless you can time travel
sepp2k has joined #ruby
darkxploit has quit [Max SendQ exceeded]
<centrx>
is that a feature in Ruby 2.2?
<pipework>
centrx: You could always cause yourself to go into a coma.
<atmosx>
Anyone knows if Mini_Magick can resize a picture based only on height?
<atmosx>
I don't wanna full resize, I wanna the height to be 150px
ghr has joined #ruby
<centrx>
hmm you would like that wouldn't you
darkxploit has joined #ruby
anaeem1 has quit [Remote host closed the connection]
<atmosx>
tried some code that looked good but didn't work hm
Mars____ has joined #ruby
Mars__ has quit [Ping timeout: 255 seconds]
jottr has joined #ruby
comma8 has quit [Ping timeout: 272 seconds]
User458764 has quit [Ping timeout: 255 seconds]
milkohol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MaciejCzyzewski has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
darkxploit has quit [Max SendQ exceeded]
ghr has quit [Ping timeout: 245 seconds]
darkxploit has joined #ruby
renderful has quit [Remote host closed the connection]
dawkirst_ has quit [Quit: Leaving...]
baroquebobcat_ has quit [Quit: baroquebobcat_]
PeterBoy has quit [Remote host closed the connection]
benweint has joined #ruby
claymore_ has quit [Quit: Leaving]
rockdon_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
linojon_ has joined #ruby
Mars____ has quit [Remote host closed the connection]
darkxploit has quit [Max SendQ exceeded]
RaCx has quit [Read error: Connection reset by peer]
Mars__ has joined #ruby
gsd has joined #ruby
linojon has quit [Ping timeout: 264 seconds]
linojon_ is now known as linojon
darkxploit has joined #ruby
axsuul has joined #ruby
diegoviola has joined #ruby
lemur has joined #ruby
User458764 has quit [Client Quit]
GriffinHeart has joined #ruby
j_mcnall_ has joined #ruby
j_mcnall_ is now known as j_mcnally
SilkFox has joined #ruby
linojon_ has joined #ruby
darkxploit has quit [Max SendQ exceeded]
Mars__ has quit [Ping timeout: 240 seconds]
RaCx has joined #ruby
kaspergrubbe has joined #ruby
brandonshowers has joined #ruby
andrewlio has quit [Remote host closed the connection]
linojon has quit [Ping timeout: 252 seconds]
linojon_ is now known as linojon
darkxploit has joined #ruby
yacks has quit [Quit: Leaving]
bricker`LA has joined #ruby
jheg has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
bonhoeffer has joined #ruby
Photism has joined #ruby
GriffinHeart has quit [Ping timeout: 268 seconds]
<bonhoeffer>
i'm on a locked down mac for work -- and want to do some ruby . . . is there a way to install without admin (1.8.7 is installed, but I can't install bundler, for example)
<pipework>
lolmaus: Don't be afraid to read documentation. It's worth your time to know the tools you're trying to use.,
Mars__ has quit [Remote host closed the connection]
Mars__ has joined #ruby
echevemaster has quit [Remote host closed the connection]
<sdegutis>
lolmaus: h.values.first is it
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
britneywright has joined #ruby
<sdegutis>
pipework: I can't see a shorter way.
PeterBoy has quit [Remote host closed the connection]
Dylan` has joined #ruby
<lolmaus>
Thank you, sdegutis.
<pipework>
sdegutis: There isn't one. He just comes in here asking for code.
pasties has joined #ruby
mikepack has quit [Ping timeout: 276 seconds]
andrewlio has joined #ruby
<sdegutis>
pipework: that doesn't mean he hasn't read the docs
<pipework>
sdegutis: stick around. :)
<sdegutis>
pipework: perhaps he has read them and is seeking a second opinion in case he missed something
darkxploit has quit [Max SendQ exceeded]
jheg has joined #ruby
<sdegutis>
pipework: I've been on IRC for half a decade so I know both happen.
<pipework>
sdegutis: You'll see if you stick around a bit. <lolmaus> But i thought there might be a shorter way
<pipework>
Oops, wrong paste.
vinleod has quit [Quit: Computer has gone to sleep.]
mikepack_ has quit [Ping timeout: 260 seconds]
darkxploit has joined #ruby
chrishough has joined #ruby
<sdegutis>
Also, it's not necessarily cheating to ask questions in IRC before checking the docs. I would consider that fair game for a few reasons.
Dylan` has quit [Client Quit]
<sdegutis>
First of all because it helps you refine your question well enough so that you can understand it better.
<lolmaus>
sdegutis: you da real MVP.
mikepack has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
St_Marx has quit [Quit: Ex-Chat]
j_mcnally has quit [Ping timeout: 264 seconds]
Mars__ has quit [Ping timeout: 245 seconds]
<sdegutis>
Second, because if you ask in here and someone else answers (or you answer yourself), lurkers may benefit.
<sdegutis>
(Whereas if you just read the docs and never talk in IRC, nobody can learn from what you learned.)
<pipework>
sdegutis: your patience and interest in giving people straight answers without making them think is far greater than mine.
saarinen has quit [Quit: saarinen]
<sdegutis>
Third, because it helps people refine their knowledge to answer basic questions.
vinleod has joined #ruby
<sdegutis>
In other words, the best way to learn is often to teach.
<shevy>
pipework usually links people to the documentation
InhalingPixels has quit [Remote host closed the connection]
timgauthier_isaw is now known as timgauthier
<shevy>
so you have to trick him
InhalingPixels has joined #ruby
<shevy>
ask questions where there is no documentation available
<sdegutis>
I've seen many (many) dumb/simply/obvious questions get answered on IRC that could have been 2 seconds of searching the documentation. It's not necessarily bad.
<pipework>
shevy: I've been learning your tricks.
<pipework>
"There is. Try harder."
<shevy>
now now now, I only ask the strange questions myself
InhalingPixels has quit [Read error: Connection reset by peer]
<shevy>
like when to use a :symbol and when to use a 'string' in my hash
darkxploit has quit [Max SendQ exceeded]
InhalingPixels has joined #ruby
saarinen has joined #ruby
<sdegutis>
pipework: So you're mistaken, I have no patience for dumb questions or for doing other people's work for them. But that doesn't mean they shouldn't ask, or that I should point them to the docs.
darkxploit has joined #ruby
InhalingPixels has quit [Read error: Connection reset by peer]
<pipework>
sdegutis: Perhaps. It's been my observation that certain known people come here and resist reading documentation even when told to.
<sdegutis>
On IRC people come and go, both askers and answerers, of all types.
InhalingPixels has joined #ruby
<sdegutis>
pipework: It happens and always will.
mikepack has quit [Remote host closed the connection]
ghostmoth has joined #ruby
W0rmDr1nk has joined #ruby
<pipework>
sdegutis: I don't like wasting my time repeating things like that. I'll leave that kind of help to those who have more patience for the kind of people who want someone's time to explain something.
W0rmDr1nk has quit [Changing host]
W0rmDr1nk has joined #ruby
benzrf|offline is now known as benzrf
KC9YDN has joined #ruby
<sdegutis>
Fine, and understandable.
<shevy>
where is the documentation
<sdegutis>
All I'm saying is that it's not necessarily wrong to do what they're doing.
<pipework>
You should set up some scopes that include related docsets.
<sdegutis>
pipework: Hmm good idea.
<pipework>
"r:" is all ruby-related docsets.
emmesswhy has quit [Quit: This computer has gone to sleep]
Jackneill has quit [Read error: Connection reset by peer]
darkxploit has joined #ruby
<sdegutis>
Although we're not actually using Rails at work, so I have no Rails projects.
<wasamasa>
mjolnir?
<sdegutis>
I've been experimenting with it to see if its viable to rewrite our site in it.
<sdegutis>
wasamasa: Yes.
<wasamasa>
I remember such a clojure project
<sdegutis>
wat
<wasamasa>
yes
<sdegutis>
Oh yeah.
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
wasamasa: are you a clojurian?
<wasamasa>
something about close to the metal and all that
mkaesz has joined #ruby
<sdegutis>
I asked tbaldridge if I could reuse the name.
<wasamasa>
havenwood: I've learned a bit of it, wrote a few lines, but other than that
<pipework>
Close to the VM, amirite
<sdegutis>
havenwood: I am. I wrote cleancoders.com is Clojure.
<pipework>
Virtual Metal
<wasamasa>
havenwood: I only know some names :P
carraroj has quit [Quit: Konversation terminated!]
<sdegutis>
*in
<havenwood>
sdegutis: nice
<wasamasa>
and I also dimly remember sdegutis did some clojure
<wasamasa>
so I asked
<sdegutis>
It's okay.
<sdegutis>
I like the not whole not having to worry about shadowing a method name.
<sdegutis>
*the whole
darkxploit has quit [Max SendQ exceeded]
bruno- has joined #ruby
<sdegutis>
In Rails it's a bit scary to name things, because it might conflict with a base-class's method name.
<sdegutis>
But other than that, I haven't really seen Clojure to be much better than Ruby, in my 2 years of using Clojure and 4 years of using Ruby.
darkxploit has joined #ruby
<shevy>
perhaps Clojure is worse than Ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
<sdegutis>
Not really.
<havenwood>
shevy: Clojure and JRuby sitting in a tree, K-I-S- this is going to take too long to type
RasElg00l has quit [Ping timeout: 245 seconds]
<pipework>
havenwood: Way too long.
<pipework>
jrubby
lsone has quit [Ping timeout: 245 seconds]
<pipework>
Jrubby, most favorite rubby
anshin has quit [Read error: No route to host]
timgauthier is now known as timgauthier_isaw
darkxploit has quit [Max SendQ exceeded]
failshel_ has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
darkxploit has joined #ruby
failshell has quit [Read error: Connection reset by peer]
<Phrogz>
I'm not sure what I'm doing wrong. Maybe I'm too hungry to think straight. Please help: why am I getting this error, and how do I modify the code to work as desired? https://gist.github.com/Phrogz/c0e33e9b7c8cc23f56aa
anshin has joined #ruby
cocotton has quit [Remote host closed the connection]
<n_blownapart>
really sdegutis, I'm going to buy the pickaxe.
<Klaus_Dieter>
when I run rake assets:precompile I am getting this: http://dl.ffm.freifunk.net/pasteme segfault. The system is a debian system. what can I do to stop this?
<sdegutis>
+1
failshell has quit []
decoponio has quit [Quit: Leaving...]
zorak8 has quit [Ping timeout: 245 seconds]
<n_blownapart>
someone told me ruby was the canada of python. :)
darkxploit has quit [Max SendQ exceeded]
darkxploit has joined #ruby
pu22l3r has joined #ruby
dblessing has quit [Quit: dblessing]
sigurding has joined #ruby
mattpolito has joined #ruby
<havenwood>
n_blownapart: so the united states copies canada all the time?
<sdegutis>
n_blownapart: Ruby and Python are literally identical languages.
<sdegutis>
n_blownapart: There's no use in trying to compare them.
MatthewsFace has joined #ruby
<havenwood>
sdegutis: flask, etc, etc
cpuguy83 has joined #ruby
<havenwood>
sdegutis: Ruby seems to be testing ground for a lot of nice ideas.
<havenwood>
i mean libs not the lang
<sdegutis>
Ah.
darkxploit has quit [Max SendQ exceeded]
<sdegutis>
Good ideas like to get shared.
ghr has joined #ruby
<havenwood>
n_blownapart: To me it's more like Python is watermelon flavored bubble gum. I'm sure it's fine but I can't convince myself I like it as much as the other flavors.
Scub has joined #ruby
darkxploit has joined #ruby
<Scub>
evening gents, is there an easy way to get the line thats about to be executed when you call require "debug" inline?
<dorei>
python is ugly, it looks more like an ugly cousin of C, ruby is beautiful :)
<havenwood>
Watermelon flavored gum is nothing like watermelon! What chemical is it?!?
<sdegutis>
My main problem with Python was the inconsistencies and oddities I found when learning it deeply.
Rubie has quit [Quit: Page closed]
<sdegutis>
Since then, I've found that all languages have this, without exception.
<Scub>
wow so much py hatred XD
nanoyak has joined #ruby
<havenwood>
Crush the snake!
JoshGlzBrk has joined #ruby
<sdegutis>
My second main problem was the indentation was painful to use in my editor. Then I found a new editor.
rafacv has quit [Read error: Connection reset by peer]
saarinen has quit [Quit: saarinen]
<apipkin>
I’m going through the course at codeacademy.com and I came to “‘puts’ and ‘print’”. It says print command just takes whatever you give it and prints it to the screen. Would this be similar to `console.log()` in Nodejs?
darkxploit has joined #ruby
rafacv has joined #ruby
<jhass>
apipkin: maybe, I think console.log is closer to `p` though
<jhass>
in that it's more for debug printing
<tockitj>
apipkin, it would be if not for interrupt configuration error
brandonshowers has joined #ruby
mattpolito has quit [Quit: Leaving...]
brandonshowers has quit [Max SendQ exceeded]
<pipework>
apipkin: Well, ti's not really just printing to the screen. It writes to stdout.
omosoj has quit [Ping timeout: 264 seconds]
<apipkin>
`p`? I haven’t seen that one yet :)
mkaesz has quit [Ping timeout: 276 seconds]
<apipkin>
Ah, okay, I know stdout from doing some C a few years ago.
darkxploit has quit [Max SendQ exceeded]
<apipkin>
Thanks for the insight :)
<tockitj>
apipkin, there isn't any problem
threesixes has joined #ruby
<pipework>
apipkin: nodejs behaves the same way, writing to stdout, assuming that console's log() function is the default one.
darkxploit has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tockitj>
pipework, maybe - but in nodejs suspicious pointer corrupted virtual machine
sdegutis has left #ruby ["Leaving..."]
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
<apipkin>
Yeah, I haven’t worked with any custom console’s (just yet) in Node. I imagine this means prints to the output device specified by stdout?
lemur has joined #ruby
darkxploit has quit [Max SendQ exceeded]
GriffinHeart has joined #ruby
rimenes has joined #ruby
darkxploit has joined #ruby
<tockitj>
apipkin, that would be because the console doesn't work.
<apipkin>
tockitj: I’ve never had an issue with it :-/
<tockitj>
apipkin, try magnetic interference from money/credit cards
<Guest54785>
darkxploit: cool name
timgauthier_isaw is now known as timgauthier
darkxploit has quit [Max SendQ exceeded]
lemur has quit [Ping timeout: 246 seconds]
<Guest54785>
exploited himself out of IRC apparently
seamon has quit [Quit: Zzzzzzz]
<hfp_work>
Hey, if I use Dir.mkdir with relative paths i.e. `Dir.mkdir "dirname"`, is the new directory going to be created in the same location as the script is running?
darkxploit has joined #ruby
<hfp_work>
Sorry
<hfp_work>
Didn't mean to send that
<hfp_work>
Please disregard :)
altamic has quit [Quit: altamic]
KC9YDN has quit [Quit: beebop]
<Guest54785>
It would be useful if there existed Object#maybe in Ruby
seamon has joined #ruby
Wolland has joined #ruby
<jhass>
for anyone that cares, it's relative to Dir.pwd which defaults to directory from where the script was started
GriffinHeart has quit [Ping timeout: 264 seconds]
<jhass>
Guest54785: what would it do?
RaCx has joined #ruby
<hfp_work>
jhass: Yeah, figured it out before asking with a simple script
<Guest54785>
jhass: I just started fleshing out an example, I suppose it's not entirely trivial :)
darkxploit has quit [Max SendQ exceeded]
<Guest54785>
jhass: for instance, I was thinking about this case: unless my_object && my_object.length > 2 ....
superscott[8] has quit [Remote host closed the connection]
<jhass>
Guest54785: do you look for Object#try?
<Guest54785>
jhass: my_object.maybe.length > 2 # would be a potentially nicer solution than nil-checking
<jhass>
ah, meh, railsism, sorry
* Guest54785
checks rails api
darkxploit has joined #ruby
superscott[8] has joined #ruby
saarinen has joined #ruby
zorak8 has quit [Remote host closed the connection]
<hfp_work>
What I do want to ask though is this: With that snippet https://gist.github.com/Coaxial/e31d47c6cbe5be51fe20, I'm trying to move tmp_dir and rename it at the same time. But when I run this code, nothing seems to happen. tmp_dir is still there and nothing gets put at the destination. What gives?
mkaesz has joined #ruby
timonv_ has quit [Remote host closed the connection]
mskaesz has quit [Ping timeout: 264 seconds]
<centrx>
hfp_work, to move a directory you need to use mv_r or some options or something
seamon has quit [Client Quit]
jheg has quit [Quit: jheg]
<hfp_work>
centrx: Ah, FileUtils.mv is for files and Dir.mv_r is for dirs? Makes sense
PeterBoy has quit [Remote host closed the connection]
<Guest54785>
jhass: seems a bit like what I'm talking about. But it wouldn't support chaining per-se (which is what I was hoping for, and where triviality is defenstrated)
darkxploit has quit [Max SendQ exceeded]
soulcake has quit [Quit: Quack.]
<Guest54785>
I don't know what this darkxploit is doing to exceed the network's Max SendQ and spam this channel with quits, but I suspect he's being an a-hole somewhere
OffTheRails has quit [Ping timeout: 268 seconds]
darkxploit has joined #ruby
zorak8 has joined #ruby
<centrx>
hfp_work, I can't seem to find it, but you'll see there is FileUtils.cp_r
<hfp_work>
centrx: Dir/mv_r doesn't exist. I guess I'll have to Dir.cp_r and then Dir.rm_r or something like that
soulcake has joined #ruby
<centrx>
hfp_work, yeah, you can always do system("mv x y") too, that would have faster performance
<centrx>
hfp_work, seems like a gap in stdlib coverage
brandonshowers has joined #ruby
darkxploit has quit [Max SendQ exceeded]
<hfp_work>
centrx: Meh, I feel weird when making direct system calls
mikepack has joined #ruby
<centrx>
hfp_work, Put it in a method called FileUtils.mv_r :)
<jhass>
>> d = Dir.new("/tmp"); "#{d}" # hfp_work might be part of the issue
treehug88 has quit [Read error: Connection reset by peer]
<centrx>
hmm
<centrx>
yeah it could be something else
<jhass>
should be valid
<jhass>
if you want to be sure File.expand_path it
OffTheRails has joined #ruby
darkxploit has quit [Max SendQ exceeded]
<jhass>
I'm pretty sure your issue is interpolating a Dir object
<hfp_work>
jhass: Could be, I felt weird when writing it
KC9YDN has joined #ruby
<jhass>
see above
<hfp_work>
jhass: Yes, will try that
fabrice31 has joined #ruby
yfeldblum has joined #ruby
darkxploit has joined #ruby
wallerdev has joined #ruby
renderfu_ has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 255 seconds]
darkxploit has quit [Max SendQ exceeded]
darkxploit has joined #ruby
grokdancer has quit [Quit: Leaving.]
grokdancer has joined #ruby
invsblduck has quit [Ping timeout: 272 seconds]
invsblduck has joined #ruby
dblessing has joined #ruby
tris has quit [Ping timeout: 272 seconds]
tris has joined #ruby
darkxploit has quit [Max SendQ exceeded]
seamon has joined #ruby
grokdancer has quit [Client Quit]
jheg has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
RaCx has quit [Quit: Computer has gone to sleep.]
darkxploit has joined #ruby
PeterBoy has quit [Remote host closed the connection]
jheg has quit [Client Quit]
timonv_ has quit [Ping timeout: 260 seconds]
darkxploit has quit [Max SendQ exceeded]
jottr_ has joined #ruby
darkxploit has joined #ruby
grokdancer has joined #ruby
Smujo has joined #ruby
PeterBoy has joined #ruby
darkxploit has quit [Max SendQ exceeded]
davedev2_ has quit [Ping timeout: 255 seconds]
jottr has quit [Ping timeout: 252 seconds]
cocotton has quit [Remote host closed the connection]
failshell has joined #ruby
darkxploit has joined #ruby
cocotton has joined #ruby
RaCx has joined #ruby
darkxploit has quit [Max SendQ exceeded]
gsd has joined #ruby
darkxploit has joined #ruby
freerobby has quit [Quit: Leaving.]
w3pm has quit [Quit: This computer has gone to sleep]
BadQuanta has quit [Ping timeout: 272 seconds]
BadQuanta has joined #ruby
paulfm has quit []
omosoj has joined #ruby
aclearman037 has quit []
sparrovv has joined #ruby
darkxploit has quit [Max SendQ exceeded]
sigurding has quit [Quit: sigurding]
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkxploit has joined #ruby
himsin has quit [Quit: himsin]
darkxploit has quit [Max SendQ exceeded]
pu22l3r has quit [Ping timeout: 260 seconds]
Morkel has quit [Quit: Morkel]
darkxploit has joined #ruby
Scotteh has joined #ruby
bmurt has quit []
cirn0 has joined #ruby
ctp has joined #ruby
darkxploit has quit [Max SendQ exceeded]
darkxploit has joined #ruby
timonv_ has joined #ruby
olivier_bK has quit [Ping timeout: 260 seconds]
darkxploit has quit [Max SendQ exceeded]
guimaluf has quit [Remote host closed the connection]
darkxploit has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
cirn0 has quit [Ping timeout: 264 seconds]
xzarxzes has joined #ruby
renderful has joined #ruby
darkxploit has quit [Max SendQ exceeded]
Beoran has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
darkxploit has joined #ruby
nettoweb has quit [Max SendQ exceeded]
nettoweb has joined #ruby
davedev24_ has joined #ruby
nettoweb has quit [Max SendQ exceeded]
b00stfr3ak has quit [Ping timeout: 252 seconds]
Azure has joined #ruby
sambao21 has joined #ruby
nettoweb has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
supersco_ has joined #ruby
darkxploit has quit [Max SendQ exceeded]
<shevy>
bugs bugs bugs
<shevy>
one day we will have machines write bug free code
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkxploit has joined #ruby
<centrx>
Until then, there's *!~shevy~!*
<shevy>
:(
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
I have a question
ghr has joined #ruby
<shevy>
module Foo; def self.bla
prologepilog has left #ruby [#ruby]
<shevy>
we say that bla is a class method right?
supersco_ is now known as superscott[8]_
<centrx>
to fix the bugs, shevy fixes the bugs
MCDev has quit [Ping timeout: 250 seconds]
<shevy>
bugs are such a waste of time
RaCx has joined #ruby
kcm has joined #ruby
<centrx>
shevy, I would call it a module method (but not a module_function)
<shevy>
yeah I was wondering about that too
<shevy>
but I think they are also called class methods in a module
<shevy>
which confuses me
banister has quit [Read error: Connection reset by peer]
darkxploit has quit [Max SendQ exceeded]
<centrx>
I'm sure people say it, but it seems sloppy, Module doesn't even inherit from Class
banister has joined #ruby
<centrx>
but it's basically the same thing so it makes sense
superscott[8] has quit [Ping timeout: 245 seconds]
Takle has quit [Remote host closed the connection]
anaeem1 has quit [Remote host closed the connection]
b00stfr3ak has joined #ruby
darkxploit has joined #ruby
sylvanica has quit [Quit: sylvanica]
<shevy>
hmm
<shevy>
Hanmac, how are class methods realized on the C level side of ruby?
Tricon has joined #ruby
benlieb has joined #ruby
darkxploit has quit [Max SendQ exceeded]
Stalkr^ has joined #ruby
<Guest54785>
centrx: *!~something~!* <- what's that notation? looks familiar
ghr has quit [Ping timeout: 272 seconds]
<centrx>
Guest54785, super awesome funtime notation
<Stalkr^>
Hey, don't know why I can't figure this out. I need to run pry on a file that takes two arguments, how do I do this? The -e option doesn't work
quitobro has quit [Remote host closed the connection]
quitobro has joined #ruby
<Junior_>
is rails any good?
<olance>
and, if autoload is dead, is there any kind of replacement available?
<olance>
Junior_: yes it is! ^^
<olance>
shevy: any idea? ^^
darkxploit has joined #ruby
<centrx>
Junior_, What are you looking to do?
<shevy>
olance dunno, I always manually load my code
TheNet has quit [Remote host closed the connection]
<shevy>
I don't use automagical stuff like require_dependency()
lmickh has quit [Remote host closed the connection]
Guest36497 has quit [Ping timeout: 268 seconds]
<shevy>
olance so you have one directory with .rb files
TheNet has joined #ruby
<shevy>
so: Dir[your_dir+'*.rb'].sort.each {|file| require file }
CaptainJet has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
<Blizzy>
good gem for request?
GinoMan has joined #ruby
<shevy>
while you iterate through it, register the module name into an array, then include those names when having inferred the real name (like via .to_camelcase or something... Object.const_get() should work with that I think)
<Blizzy>
*requests.
<Junior_>
centrx: im looking to build a big learing platform built out of smaller 'mini-apps'. I already know ruby, so i now just need to pick a framework
<olance>
that would do, but I cannot avoid the other gem calling require_dependency, and internally this calls Kernel.load
TheNet has quit [Remote host closed the connection]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx>
Junior_, what's a learing platform and what are the smaller mini-apps going to be like?
<olance>
so that would kinda have the same effect wouldn't it?
TheNet has joined #ruby
snath has joined #ruby
orolo has joined #ruby
spider-mario has quit [Remote host closed the connection]
axsuul has quit [Read error: Connection reset by peer]
narcan has joined #ruby
ephemerian has quit [Quit: Leaving.]
<shevy>
hmm
<shevy>
the last one to load() will re-evaluate the content of the file and overwrite
darkxploit has quit [Max SendQ exceeded]
kcm has quit [Quit: Leaving]
<jhass>
Junior_: Rails can mount other rack applications at subpaths, so using rails for the base app and deciding on a case by case what to use for the mini apps might actually be a good choice
darkxploit has joined #ruby
thumpba has joined #ruby
<atmosx>
hello
<shevy>
proof:
<shevy>
>> class Foo; end; module Bar; def test; 'yo'; end; end; class Foo; include Bar; end; module Bar; def test; 'yo2'; end; end; class Foo; include Bar; end; Foo.new.test
<olance>
shevy: yep but apparently with the gem I'm using (cequel), it will act more like a class reopening and try to add stuff to the existing class, thus duplicating things
<shevy>
ruby code can always be reopened
pontiki has joined #ruby
MCDev has quit [Ping timeout: 250 seconds]
renderful has joined #ruby
<shevy>
whoever is the last to add, wins
<shevy>
:>
inChargeOfIT has joined #ruby
<olance>
hmm yeah but no :P
Mars`_ has joined #ruby
<shevy>
you could call .freeze on your class before calling external gems
<shevy>
and then rescue RuntimeError
<shevy>
but this sucks because you can not unfreeze
<shevy>
it's one of the most useless features in ruby
bennylope has joined #ruby
<olance>
:P
dideler has joined #ruby
<shevy>
or you could use a dummy class
<shevy>
but none of this is elegant
<olance>
indeed
<olance>
I'll have a look at how things work in Cequel
<shevy>
evil of you to use a feature that matz deprecated :D
<pontiki>
making an object immutable is not a useless feature *at all*
<shevy>
pontiki ok and what if all objects are immutable
CaptainJet has quit [Ping timeout: 245 seconds]
darkxploit has quit [Max SendQ exceeded]
<pontiki>
what if?
<shevy>
yeah what if
<shevy>
how useful is that?
<pontiki>
why are you asking that?
<pipework>
whut if
<shevy>
object << 'hey dude' # OMG YOU CAN NOT DO THAT
cirn0 has joined #ruby
darkxploit has joined #ruby
icarus has quit [Read error: Connection reset by peer]
<olance>
shevy: evil to them not to update the docs correctly!
CaptainJet has joined #ruby
<shevy>
yeah
<shevy>
well
<shevy>
technically it is not *yet* deprecated
<pipework>
Turns out, shevy doesn't get immutability.
<olance>
:P
<shevy>
so it is there in the 2.x era
<pontiki>
turns out, i don't really care
<shevy>
pipework did you have to use .freeze yet in your projects?
<olance>
but will disappear
<pipework>
shevy: Of course.
<pipework>
Don't you?
<shevy>
pipework in which one?
<pipework>
shevy: I use it at work all the time.
<shevy>
show some code
Inhaling_ has quit [Remote host closed the connection]
renderful has quit [Remote host closed the connection]
<jhass>
olance: I mean AS is dumb sometimes, but I couldn't believe it's dumb enough to unconditionally load without checking $LOADED_FEATURES or something ;)
<Blizzy>
well, yeah, and it seems like Rest-client has the most downloads.
<olance>
^_^
axsuul has quit [Read error: No route to host]
axsuul has joined #ruby
Squarepy has quit [Ping timeout: 260 seconds]
superscott[8] has quit [Remote host closed the connection]
<olance>
Added `ActiveSupport::Dependencies.mechanism = :require` to my boot code and everything works as a charm
<olance>
thanks jhass ;)
<jhass>
you're welcome
<Blizzy>
hmm, now I have to choose between restful and faraday.
<olance>
and thanks shevy too :) I'll stick to autoload for the moment though ^^
kireevco has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
charliesome has joined #ruby
olance has quit [Quit: Page closed]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]