apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
S1kx has quit [Ping timeout: 245 seconds]
ciopte7 has quit [Ping timeout: 244 seconds]
iocor has quit [Quit: Computer has gone to sleep.]
ciopte7 has joined #ruby
looopy has quit [Remote host closed the connection]
jenrzzz-mac has joined #ruby
liluo has joined #ruby
ping-pong has joined #ruby
froy has quit [Remote host closed the connection]
test34- has joined #ruby
test34 has quit [Ping timeout: 244 seconds]
wvms has quit [Quit: wvms]
looopy has joined #ruby
ciopte7 has quit [Quit: ciopte7]
wvms has joined #ruby
b1rkh0ff has quit [Ping timeout: 246 seconds]
pk1001100011 has quit [Ping timeout: 248 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
atmosx has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
pk1001100011 has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
davidcelis has quit [Quit: K-Lined]
c0rn has quit [Quit: Computer has gone to sleep.]
cableray has quit [Quit: cableray]
baba_bubba has left #ruby ["Leaving"]
seanstickle has joined #ruby
syamajala has joined #ruby
atmosx has quit [Ping timeout: 248 seconds]
atmosx has joined #ruby
dbgster has joined #ruby
alegacyreborn has quit [Read error: Connection reset by peer]
C0deMaver1ck has quit [Remote host closed the connection]
alegacyreborn_ has joined #ruby
Progster has quit [Ping timeout: 244 seconds]
slmnwise81 has joined #ruby
C0deMaver1ck has joined #ruby
kevinbond has quit [Quit: kevinbond]
kevinbond has joined #ruby
Araxia_ has quit [Read error: No route to host]
jrist is now known as jrist-out
Araxia_ has joined #ruby
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby
jetblack has joined #ruby
luxurymode has quit [Quit: Computer has gone to sleep.]
slmnwise81 has left #ruby [#ruby]
jeebster has left #ruby [#ruby]
td123 has quit [Quit: WeeChat 0.3.7]
jenrzzz-mac has joined #ruby
Criztian has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
kevinbond has quit [Quit: kevinbond]
atmosx has quit [Ping timeout: 248 seconds]
bigoldrock has quit [Quit: Leaving.]
jimeh has quit [Ping timeout: 240 seconds]
<alegacyreborn_> cya guys
alegacyreborn_ has quit [Quit: Leaving]
atmosx has joined #ruby
mvangal__ has joined #ruby
adamkittelson has quit [Remote host closed the connection]
binaryplease has quit [Quit: WeeChat 0.3.7]
shevy2 has joined #ruby
liluo has quit [Remote host closed the connection]
moted has quit [Ping timeout: 245 seconds]
mvangala_mac has quit [Ping timeout: 246 seconds]
Vert has quit [Ping timeout: 252 seconds]
mikepack has quit [Read error: Connection reset by peer]
shevy has quit [Ping timeout: 245 seconds]
akem has quit [Read error: Connection reset by peer]
moted has joined #ruby
kevinbond has joined #ruby
akem has joined #ruby
mvangala_mac has joined #ruby
atmosx has quit [Ping timeout: 252 seconds]
jchauncey has joined #ruby
jchauncey has quit [Client Quit]
mvangal__ has quit [Ping timeout: 248 seconds]
Urth|Away is now known as Urthwhyte
atmosx has joined #ruby
dbgster has quit [Quit: dbgster]
carlyle has quit [Remote host closed the connection]
mikepack has joined #ruby
perryh_away is now known as perryh
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
demian`_ has quit [Ping timeout: 252 seconds]
friskd has joined #ruby
balki has joined #ruby
<balki> can i change a hash like {:this => "that"} to an associative argument list?
billiamii has quit [Remote host closed the connection]
<balki> like method1(:this => that)
<samuelkadolph> balki: Those are the same thing.
<balki> instead of method1({:this => that})
<samuelkadolph> You can omit the {} if the hash is an argument to a method
<balki> no, because i'm trying to inject them into an *args with a bunch of other stuff
<balki> i have the hash, i need to append to a list of arguments
<samuelkadolph> Then append it
<samuelkadolph> foo(*(args << {}))
jenrzzz-mac has quit [Quit: jenrzzz-mac]
_adeponte has quit [Remote host closed the connection]
denysonique has quit [Max SendQ exceeded]
Vert has joined #ruby
sdferfx has quit [Quit: Leaving]
albemuth has quit [Quit: Computer has gone to sleep.]
chson has joined #ruby
<balki> ahh
<balki> thx
denysonique has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
mikepack has quit [Remote host closed the connection]
liluo has joined #ruby
mikepack has joined #ruby
vitor-br has joined #ruby
jenrzzz-mac has joined #ruby
zemanel has quit [Quit: Remote hottie closed the connection]
zemanel has joined #ruby
kylemcgi_ has joined #ruby
atmosx has quit [Ping timeout: 244 seconds]
wilmoore has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
kylemcgill has quit [Ping timeout: 265 seconds]
alindeman has joined #ruby
uris has joined #ruby
Vert has quit [Read error: Connection reset by peer]
libertyprime has quit [Quit: Lost terminal]
libertyprime has joined #ruby
colon_D has joined #ruby
iamjarvo has quit [Ping timeout: 244 seconds]
iamjarvo has joined #ruby
yoklov has quit [Quit: computer sleeping]
CheeToS has joined #ruby
ciopte7 has joined #ruby
Hanmac has joined #ruby
yoklov has joined #ruby
khakimov has joined #ruby
beneggett has joined #ruby
libertyprime has quit [Client Quit]
brianpWins has quit [Quit: brianpWins]
libertyprime has joined #ruby
hadees has quit [Quit: hadees]
xnm has joined #ruby
t0mmyvyo has joined #ruby
maletor has joined #ruby
kylemcgi_ has quit [Ping timeout: 265 seconds]
arooni-mobile has joined #ruby
t0mmyvyo has quit [Client Quit]
<arooni-mobile> hi folks; i have a line of code to rescue mail exceptions: rescue Net::SMTPAuthenticationError => e ' in my code that is erroring with an exception: uninitialized constant Net::SMTPAuthenticationError ... this is a valid exception name so i'm a little curious whats going on
nfluxx_ has joined #ruby
nfluxx_ has quit [Client Quit]
itnomad has joined #ruby
nfluxx has quit [Ping timeout: 245 seconds]
replore has joined #ruby
kylemcgill has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
fayimora has joined #ruby
igaiga has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
chienpo has left #ruby [#ruby]
havenn has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
frishi has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
wargasm has joined #ruby
tayy has quit [Remote host closed the connection]
dbgster has joined #ruby
jgrevich_ has joined #ruby
jgrevich has quit [Remote host closed the connection]
jgrevich has joined #ruby
albemuth has joined #ruby
jgrevich has quit [Remote host closed the connection]
jgrevich_ has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
eko has quit [Quit: This computer has gone to sleep]
bambanx has joined #ruby
jgrevich_ has joined #ruby
<bambanx> hi
kenperkins has quit [Ping timeout: 245 seconds]
jgrevich has quit [Read error: Operation timed out]
jgrevich_ is now known as jgrevich
eko has joined #ruby
libertyprime has quit [Quit: Lost terminal]
libertyprime has joined #ruby
wvms has quit [Quit: wvms]
bricker88 has quit [Quit: Leaving.]
cantonic has joined #ruby
atmosx has quit [Read error: Operation timed out]
jmontross has quit [Quit: Leaving.]
adeponte has joined #ruby
atmosx has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
akem has quit [Read error: Operation timed out]
mvangala_mac has quit [Read error: Connection reset by peer]
mvangala_mac has joined #ruby
maletor has joined #ruby
wvms has joined #ruby
cj3kim has joined #ruby
mvangala_mac has quit [Read error: Connection reset by peer]
mvangal__ has joined #ruby
atmosx has quit [Ping timeout: 248 seconds]
akem has joined #ruby
stepnem has quit [Quit: ZNC - http://znc.sourceforge.net]
altivec has quit [Quit: WeeChat 0.3.0]
Juul has joined #ruby
Juul has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
stephenjudkins has joined #ruby
atmosx has joined #ruby
werdnativ has joined #ruby
kevinbond has quit [Quit: kevinbond]
itnomad has quit [Quit: Leaving]
stepnem has joined #ruby
mvangal__ has quit [Remote host closed the connection]
pk1001100011 has quit [Ping timeout: 245 seconds]
akem has quit [Read error: Operation timed out]
akem has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
<werdnativ> I just installed rbenv; rbenv global; bundle. It says my gems are installed in /usr/local/rbenv/versions/1.9.3-p194/ but I can't rehash because of this error:
<werdnativ> rbenv: cannot rehash: /usr/local/rbenv/shims/.rbenv-shim exists
<werdnativ> what does this mean?
akem has quit [Max SendQ exceeded]
kylemcgill has quit [Ping timeout: 248 seconds]
nirakara has joined #ruby
kylemcgill has joined #ruby
x0F has quit [Disconnected by services]
beneggett has quit [Quit: Computer has gone to sleep.]
x0F_ has joined #ruby
x0F_ is now known as x0F
adeponte has quit [Remote host closed the connection]
ibash has quit [Quit: ibash]
<werdnativ> however: /usr/local/rbenv/shims/.rbenv-shim: No such file or directory
<werdnativ> it's lying to me.
syamajala has quit [Remote host closed the connection]
amalvagomes_ has joined #ruby
mvangala_mac has joined #ruby
jrajav has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
nbdy has joined #ruby
amalvagomes has quit [Ping timeout: 252 seconds]
amalvagomes_ is now known as amalvagomes
nbdy has left #ruby [#ruby]
nbdy has joined #ruby
nbdy has left #ruby [#ruby]
noodletraveler has joined #ruby
albemuth has joined #ruby
keppy has quit [Quit: Leaving]
wargasm has left #ruby [#ruby]
joast has quit [Ping timeout: 244 seconds]
adac has quit [Read error: Operation timed out]
luckyruby has quit [Remote host closed the connection]
apok has quit [Quit: apok]
L-----D has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
rmascarenhas has quit [Quit: leaving]
Urthwhyte is now known as Urth|Away
libertyprime has quit [Quit: Lost terminal]
<bambanx> exist any way to see all my logs here on the channel?
philcrissman has quit [Remote host closed the connection]
philcrissman has joined #ruby
libertyprime has joined #ruby
ciopte7 has quit [Quit: ciopte7]
beilabs has joined #ruby
libertyprime has quit [Client Quit]
libertyprime has joined #ruby
<seanstickle> bambanx: if you logged the, yes
jamesaxl has quit [Remote host closed the connection]
ciopte7 has joined #ruby
hadees has joined #ruby
shadoi has quit [Remote host closed the connection]
nirakara has quit [Quit: This computer has gone to sleep]
radic_ has joined #ruby
radic has quit [Disconnected by services]
radic_ is now known as radic
baroquebobcat has joined #ruby
td123 has joined #ruby
Araxia_ has quit [Quit: Araxia_]
yannis has quit [Quit: yannis]
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby
<bambanx> seanstickle, what u mean with logged the?
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
<seanstickle> If you logged them
ZachBeta has joined #ruby
ibash has joined #ruby
<bambanx> yeah
<bambanx> i was logged all time seanstickle
<bambanx> howw i can see my logs?
<seanstickle> Beats me
<seanstickle> Depends on your IRC client
savage- has joined #ruby
<bambanx> xchat 2
test34- has quit [Ping timeout: 240 seconds]
<seanstickle> I don't have the log systems memorized for all IRC clients
<seanstickle> Look it up online
<bambanx> and all ruby channel it dont have logs in some web?
<seanstickle> Nope
<bambanx> is very important i lost a lot of work :/ i do with help of this channel
mvangal__ has joined #ruby
<bambanx> so i need see logs
<bambanx> you dont have logs can share me?
<seanstickle> Nope
cj3kim has left #ruby ["Leaving"]
<bambanx> some guys are always connected
<bambanx> saving all
<bambanx> oh men seanstickle look http://irclog.whitequark.org/ruby/2012-05-01
jenrzzz-mac has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
mvangala_mac has quit [Ping timeout: 245 seconds]
<bambanx> cool
benyarb has quit [Read error: Connection reset by peer]
jrallison has joined #ruby
seivan has joined #ruby
benyarb has joined #ruby
ibash has quit [Quit: ibash]
<sec_> any plugin ruby for eclipse?
stepnem has quit [Quit: ZNC - http://znc.sourceforge.net]
mvangala_mac has joined #ruby
wilmoore has joined #ruby
zemanel has quit [Quit: Remote hottie closed the connection]
philcrissman has quit [Ping timeout: 246 seconds]
mvangal__ has quit [Ping timeout: 250 seconds]
stepnem has joined #ruby
alanp has quit [Remote host closed the connection]
balki has quit [Read error: Connection reset by peer]
<banisterfiend> sec_: why the heck do u want to develop ruby with eclipse
<banisterfiend> elipse is horrible
<sec_> banisterfiend: which good one?
<seanstickle> vim
mohits has quit [Ping timeout: 248 seconds]
hamfz_ has joined #ruby
<sec_> :|
<seanstickle> No joke
replore has quit [Remote host closed the connection]
<sec_> ok
<sec_> seanstickle: pure vim?
<seanstickle> Yup.
<bnagy> morning, humans
<seanstickle> Hey snaggy
<sec_> seanstickle: so run test by other terminal or :! ruby %0 or?
<seanstickle> sec_: terminal
mib_mib has joined #ruby
<seanstickle> sec_: use tmux and you can make something that all hangs together, if you prefer that look
balki has joined #ruby
alanp has joined #ruby
test34 has quit [Ping timeout: 244 seconds]
<bambanx> sec_, i use sublime text is cool http://www.sublimetext.com/
test34 has joined #ruby
<jrajav> +1 @ Sublime Text
ibash has joined #ruby
rakm has quit [Disconnected by services]
<jrajav> The responsiveness, minimalism, and usability of Vim minus the Linux elitism and archaic interface
rakm_ has joined #ruby
ipoval has joined #ruby
<seanstickle> :P
<bnagy> plus the OSX arrogance, obviously
Sgeo__ has joined #ruby
<jrajav> Haha
<seanstickle> Or use Sublime.
<seanstickle> Either way.
<mib_mib> more like the osx nooobery
<sec_> seanstickle: tmux always hangs with me
<mib_mib> jk
<jrajav> I still use a terminal for scripts and tests
<sec_> seanstickle: it detect wrong shourtcut key
<jrajav> I just dislike it for editing
<seanstickle> But for god's sake use a text editor.
<seanstickle> And not some braindead IDE
<seanstickle> Use emacs if you really must
<sec_> seanstickle: same as if i want type some things in window 1, i type in window 1 with no display, switch to window 2, then switch to window 1 for display
<seanstickle> sec_: well, then don't use tmux
<seanstickle> sec_: consider screen
<seanstickle> sec_: or, if you're on a Mac, iTerm2
<seanstickle> Or what I have to imagine are dozens of other options
<jrajav> Not really :/
yonggu_ has joined #ruby
<seanstickle> "bunch of terminal windows" is always an option
<jrajav> TBH I've never found anything better than Terminal.app
<seanstickle> I prefer iTerm2
<bnagy> total terminal, or whatever it's called
<jrajav> And I work with it all the time
yonggu has quit [Ping timeout: 246 seconds]
Sgeo_ has quit [Ping timeout: 246 seconds]
<otters> I love total terminal
<jrajav> Oh, but I was saying not really to the "lots of options"
<seanstickle> Better responsiveness for terminal Vim than Terminal.app
<bnagy> gives you a really nice drop-down tabbed terminal
<jrajav> iTerm2 isn't bad by any means
<jrajav> I want native urxvt on OS X :(
WikiPack has quit [Read error: Connection reset by peer]
bummytime has joined #ruby
WikiPack has joined #ruby
nickchow has joined #ruby
choffstein has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 252 seconds]
ibash has quit [Quit: ibash]
kenperkins has joined #ruby
dbgster has quit [Quit: dbgster]
ghanima has quit [Quit: Leaving.]
looopy has quit [Remote host closed the connection]
WikiPack has quit [Quit: WikiPack]
BBonifield has quit [Quit: ZNC - http://znc.in]
bummytime has quit [Quit: bummytime]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
beilabs has joined #ruby
eywu has joined #ruby
digitalcakestudi has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
L-----D has quit [Quit: Leaving]
choffstein has joined #ruby
mvangal__ has joined #ruby
<dekz> Is yielding and returning a common practice or avoided?
uris has quit [Quit: leaving]
<bnagy> they're both common
<bnagy> but I don't know exactly what pattern you're talking about if you mean (yielding & returning)
mvangala_mac has quit [Ping timeout: 245 seconds]
c0rn has joined #ruby
<banisterfiend> dekz: 'map' yields (to build up the new array) and then 'returns' (to return the newly constructed array). but not really sure what u mean
<bnagy> morning banisterfiend, wearing your work nick today, I see
kenperkins has joined #ruby
<banisterfiend> bnagy: i finally got unbanned from #ruby-lan g:)
<banisterfiend> lang
<banisterfiend> bnagy: and they have a login policy
jgrevich has quit [Read error: Connection reset by peer]
<bnagy> wow, that was only what, a year?
<banisterfiend> so i have to use my registered nick
<bnagy> was it a year and a day, like in storybooks?
<banisterfiend> bnagy: well, in actual fact he thought he unbanned me ages ago
jgrevich has joined #ruby
<banisterfiend> i dont think he intended it to be so long, he just unbanned the wrong nick
<banisterfiend> and yesterday was the first time i asked to be unbanned, too
<banisterfiend> you're not a rails user though (neither am i) so it's probably irrelevant, and anyway looks like the best we'll get is a commented out thingy in the Gemfile
libertyprime has quit [Quit: Lost terminal]
libertyprime has joined #ruby
hamfz_ has quit [Ping timeout: 246 seconds]
<sec_> what attr_accessor does in class?
banisterfiend has quit [Remote host closed the connection]
<bnagy> it's a shortcut for defining getter and setter instance methods for an @ivar
azm has quit [Ping timeout: 252 seconds]
<sec_> ok
<bambanx> sec_, you see sublime text?
t0mmyvyo has joined #ruby
<sec_> bambanx: i am using vim
<bambanx> ok
simao_ has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
seanstickle has quit [Quit: Nihil sub sole novum]
looopy has joined #ruby
mvangala_mac has joined #ruby
ananthakumaran has joined #ruby
AlbireoX_ is now known as AlbireoX
simao has quit [Ping timeout: 260 seconds]
choffstein has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
mvangal__ has quit [Ping timeout: 265 seconds]
williamcotton has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
<mikeycgto> anyone familiar with em-synchrony?
becom33 has quit [Ping timeout: 248 seconds]
werdnativ has quit [Ping timeout: 246 seconds]
igotnolegs has joined #ruby
looopy has quit [Remote host closed the connection]
<bnagy> not really, but what's the question?
maletor has joined #ruby
maletor has quit [Client Quit]
td123 has quit [Quit: WeeChat 0.3.7]
libertyprime has quit [Quit: Lost terminal]
akem has joined #ruby
becom33 has joined #ruby
shadoi has joined #ruby
<davidcelis> banisterfiend: I didn't know you created pry
keppy has joined #ruby
<banisterfiend> davidcelis: really? i really didnt keep it a secret :)
<banisterfiend> in fact i talked about it quite often here
libertyprime has joined #ruby
<davidcelis> i've manage to avoid being in here when that happens, apparently
<davidcelis> thank you for the awesome piece of software
mvangala_mac has quit [Remote host closed the connection]
<banisterfiend> davidcelis: no prob
adeponte has joined #ruby
keppy has quit [Client Quit]
<banisterfiend> davidcelis: how did u find out anyway?
<davidcelis> banisterfiend: Your twitter
mvangala_mac has joined #ruby
<banisterfiend> davidcelis: how/when did u see my twitter?
L-----D has joined #ruby
<davidcelis> someone I follow retweeted you
<banisterfiend> oh ok
<davidcelis> then I followed you and saw your blurb and was like, "wat"
kylemcgill has quit [Remote host closed the connection]
<banisterfiend> hehe
<banisterfiend> davidcelis: why is it so unbelievable? :)
<banisterfiend> davidcelis: i take my trolling as seriously as my programming
<banisterfiend> brb
<davidcelis> surprise wasn't really a factor, i just didn't know. but i've talked to you before on here so it was just a, "hey i know that guy" moment
banister_ has joined #ruby
<banister_> .
banister_ is now known as banisterfiend`
graspee has joined #ruby
looopy has joined #ruby
CheeToS has quit [Ping timeout: 246 seconds]
<bambanx> what the hell mean this Invalid char `\x1C' in expression
brianpWins has joined #ruby
<davidcelis> \x1C would appear to be an invalid character, good sir
<davidcelis> for your expression
hamfz_ has joined #ruby
dv310p3r has quit [Ping timeout: 246 seconds]
C0deMaver1ck has quit [Remote host closed the connection]
dv310p3r has joined #ruby
pdtpatrick has joined #ruby
ciopte7 has quit [Quit: ciopte7]
<bambanx> damn
ciopte7 has joined #ruby
banisterfiend has quit [Ping timeout: 260 seconds]
<davidcelis> Yes, quite
<davidcelis> Appy polly loggies, friend!
looopy has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
tomb__ has quit [Ping timeout: 244 seconds]
<bambanx> :)
atmosx has quit [Ping timeout: 252 seconds]
tomb_ has joined #ruby
<sec_> how expand method missing?
<sec_> same as String.me will print my name
atmosx has joined #ruby
<davidcelis> sec_: wut
<sec_> davidcelis: ?
rippa has joined #ruby
<davidcelis> sec_: whachu talkin about
banisterfiend` is now known as banisterfiend
test34 has quit [Ping timeout: 240 seconds]
keanehsiao has quit [Quit: keanehsiao]
<sec_> davidcelis: nvm
Chryson has quit [Quit: Leaving]
test34 has joined #ruby
berserkr has quit [Quit: Leaving.]
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
looopy has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
trend has joined #ruby
mvangala_mac has quit [Remote host closed the connection]
Vert has joined #ruby
malcolmva has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
mib_mib has quit [Quit: Page closed]
beilabs has quit [Ping timeout: 252 seconds]
alienvenom has quit [Ping timeout: 244 seconds]
sepp2k has joined #ruby
tonini has joined #ruby
ananthakumaran has joined #ruby
macmartine has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
yoklov has quit [Quit: bye!]
bambanx has quit [Quit: Saliendo]
cj3kim has joined #ruby
petercs has joined #ruby
<interopc1p> anybody here? in the gem capistrano, where does the Capfile go?
<interopc1p> i.e. the docs are confusing - it appears that the Capfile is for a server, so it belongs in /etc/ maybe
<interopc1p> but what if there are two Capfiles?
L-----D has quit [Quit: Leaving]
friskd has quit [Read error: Operation timed out]
alienvenom has joined #ruby
tfitts has quit [Ping timeout: 252 seconds]
gmci has quit [Ping timeout: 245 seconds]
gmci has joined #ruby
beilabs has joined #ruby
freeayu1 has joined #ruby
freeayu1 has quit [Client Quit]
freeayu__ has joined #ruby
<freeayu__> how to combine two strings into a new variable
a_a_g has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
<interopc1p> new_var = "#{str1}#{str2}"
jdahm has quit [Quit: WeeChat 0.3.7]
banisterfiend has joined #ruby
jrallison has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<freeayu__> how to refactor the code http://pastie.org/3999655
nlc has quit [Quit: Leaving]
<Mon_Ouie> freeayu__: Use an Array instead lineN variables
<freeayu__> Mon_Ouie not too clear
<Mon_Ouie> instead line1 = "a", line2 = "b", …, use lines = ["a", "b", …]
robbyoconnor has quit [Read error: Connection reset by peer]
<Mon_Ouie> And use a recursive method to iterate over it
thecreators has quit [Quit: thecreators]
tewecske has joined #ruby
robbyoconnor has joined #ruby
brianpWins has quit [Quit: brianpWins]
ryanf has joined #ruby
yxhuvud has joined #ruby
CheeToS has joined #ruby
yonggu has joined #ruby
beilabs has quit [Quit: Leaving]
yonggu_ has quit [Ping timeout: 245 seconds]
macmartine has quit [Quit: macmartine]
mikeycgto has quit [Remote host closed the connection]
pdtpatrick has quit [Quit: pdtpatrick]
urlwolf has joined #ruby
amalvagomes_ has joined #ruby
hamfz_ has quit [Ping timeout: 252 seconds]
sqlbyme has quit [Ping timeout: 244 seconds]
daniel_hinojosa has quit [Ping timeout: 250 seconds]
arooni-mobile has quit [Ping timeout: 240 seconds]
amalvagomes has quit [Ping timeout: 256 seconds]
amalvagomes_ is now known as amalvagomes
yonggu has quit [Remote host closed the connection]
yonggu has joined #ruby
mxweas has quit [Quit: Leaving...]
sam113101 has quit [Ping timeout: 246 seconds]
d3c has joined #ruby
digitalcakestudi has quit [Read error: Operation timed out]
prtksxna has joined #ruby
vandemar has quit [Read error: Operation timed out]
hadees has quit [Quit: hadees]
pabloh has quit [Quit: Ex-Chat]
beneggett has joined #ruby
noodletraveler has quit [Ping timeout: 245 seconds]
tomzx has quit [Ping timeout: 246 seconds]
vandemar has joined #ruby
hadees has joined #ruby
cezar has joined #ruby
banisterfiend has quit [Ping timeout: 250 seconds]
banisterfiend has joined #ruby
cezar has quit [Client Quit]
eywu has quit [Quit: Leaving.]
looopy has quit [Remote host closed the connection]
twqla has quit [Ping timeout: 252 seconds]
whuffor has quit [Ping timeout: 246 seconds]
fabrice31 has quit [Ping timeout: 246 seconds]
cid404 has quit [Ping timeout: 246 seconds]
bubu\a has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
vectorshelve has joined #ruby
fabrice31 has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
jenrzzz-mac has joined #ruby
nilg` has joined #ruby
cid404 has joined #ruby
Emmanuel_Chanel has joined #ruby
bubu\a has joined #ruby
petercs has quit [Ping timeout: 250 seconds]
banisterfiend has quit [Ping timeout: 265 seconds]
nirakara has joined #ruby
<vectorshelve> hemanth: hai bhai
mxweas has joined #ruby
mucker has joined #ruby
icooba has joined #ruby
wallerdev has quit [Quit: wallerdev]
whuffor has joined #ruby
ned0 has joined #ruby
banisterfiend has joined #ruby
ipoval has quit [Quit: ipoval]
petercs has joined #ruby
test34 has quit [Ping timeout: 244 seconds]
maesbn has joined #ruby
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
yannis has joined #ruby
<ned0> part #ruby
ned0 has left #ruby [#ruby]
<Alantas> part #rails
<Alantas> all #awesome
adeponte has quit [Remote host closed the connection]
Morkel has joined #ruby
niklasb has joined #ruby
test34 has joined #ruby
test34- has quit [Ping timeout: 240 seconds]
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
c0rn has joined #ruby
noodletraveler has joined #ruby
<zizzyx> another noob question, if i"m doing array += object what do i really mean to type
<zizzyx> since that syntax results in a typeerror
sam113101 has joined #ruby
werdnativ has joined #ruby
<bnagy> <<
<zizzyx> ah thanks
sspiff has joined #ruby
mneorr has joined #ruby
emmanuelux has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Quit: Leaving.]
c0rn has quit []
serroba has quit [Quit: This computer has gone to sleep]
c0rn has joined #ruby
tvw has joined #ruby
workmad3 has joined #ruby
apok has joined #ruby
yannis has quit [Quit: yannis]
twqla has joined #ruby
imami|afk is now known as banseljaj
zommi has joined #ruby
berkes has joined #ruby
arquebus has joined #ruby
tfitts has joined #ruby
nickchow has quit [Read error: Connection reset by peer]
nickchow has joined #ruby
shadoi has quit [Remote host closed the connection]
jprovazn_away is now known as jprovazn
L-----D has joined #ruby
JohnBat26 has joined #ruby
tomb_ has quit [Ping timeout: 265 seconds]
ABK has joined #ruby
hoelzro|away is now known as hoelzro
sqlbyme has joined #ruby
<zizzyx> is there an idiomatic way to use "select" to segregate a colletion into two collections?
beneggett has quit [Ping timeout: 260 seconds]
<zizzyx> where membership is based on whether the predicate given was true or false
mucker has quit [Quit: leaving]
<hoelzro> zizzyx: like a partition function?
mucker has joined #ruby
<Alantas> Maybe group_by, but there might be something better. <looks>
<zizzyx> basically i have two selects that use opposite predicates
<zizzyx> and they just assign to diff arrays
<zizzyx> only doing that because i need to each both arrays with a different block
<zizzyx> I suppose i could put the predicate in the block and use an if/else
<nw> maybe #chunk, if i understood you correctly?
beneggett has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
<hoelzro> zizzyx: group_by looks like it'll do it foryou
dnyy has quit [Remote host closed the connection]
tomb_ has joined #ruby
<bnagy> or partition maybe
<Alantas> Just saw 'partition', myself.
<zizzyx> partition seems to be it
<Alantas> lol, wut = memes.partition{ |meme| meme.win? }
<zizzyx> returns 2 arrays
<bnagy> so many solutions!
<zizzyx> well only one that remotely fits the prompt ;)
<bnagy> nah group_by would work
<banisterfiend> bnagy: Naggy. Did you hear i'm unbanned from #ruby-lang so u now get a double dose of my pimping power
<hoelzro> oh, hey, partition
<bnagy> just one more step
<hoelzro> nice.
<zizzyx> why would i want a hash with keys 'true' 'false' lol
niklasb has quit [Read error: No route to host]
<zizzyx> or however that would end up
<bnagy> well GEE mr fusspot, if you're so fussy maybe read the Enumerable docs yourself?
<zizzyx> although i suppose you mean partition is just group_by with the single step of making the hash into an array of two arrays
<zizzyx> which i see
<hoelzro> zizzyx: you could do x.group_by { |y| y.win? }[true, false] =P
<zizzyx> is that last part a subscript lookup
Yappo____ is now known as 36DAA7VC8
<bnagy> banisterfiend: yes, I heard, and I weep for the innocence of our youth
<Alantas> Why let the function do the work when you could do it yourself? ¬_¬
<banisterfiend> bnagy: hehehehehhe, can i recruit u to help me spam #ruby-lang with tonnes of pry related content
36DAA7VC8 is now known as hidek46
<bnagy> sure!
<bnagy> wait, I meant 'get fucked'
<bnagy> :)
<banisterfiend> hehehe
<banisterfiend> bnagy: i'll repay you with longing looks
<bnagy> I need an adult :(
cj3kim has quit [Quit: This computer has gone to sleep]
hidek46 is now known as hidek____
cha1tanya has quit [Quit: Leaving]
<bnagy> damn, this weather sucks :(
hidek____ is now known as hidek46
Schweby has joined #ruby
test34 has quit [Ping timeout: 250 seconds]
Schweby has quit [Client Quit]
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
<sec_> banisterfiend: #ruby-lang is #ruby?
<Tasser> banisterfiend, oh noez
<zizzyx> how does unpacking work compared to python? for example with the partition command
<shevy2> sec_ #ruby-lang is the official channel. #ruby is where more people hang out
adac has joined #ruby
<zizzyx> can i do a, b = array.partitionetcccc
tomb_ has quit [Ping timeout: 244 seconds]
<sec_> shevy2: which for beginer ?
<bnagy> sec_: here
<Alantas> zizzyx: Yeah, you can do that.
<zizzyx> sw8 thanks
<sec_> ok
<Tasser> zizzyx, read the docs? :-)
<Alantas> There's also irb, where you can try stuff out and get immediate results.
jackiechan0 has joined #ruby
dnyy has joined #ruby
<hoelzro> there's also a 3rd party REPL called pry, which is quite handy
arquebus has quit [Remote host closed the connection]
serroba has joined #ruby
CheeToS has quit [Ping timeout: 245 seconds]
neersighted is now known as neersighted|AFK
blacktulip has joined #ruby
<banisterfiend> hoelzro: Alantas refuses to use pry, maybe you can expend some effort and recruit him for the cause
<hoelzro> it formats results more nicely than irb, for one
<hoelzro> and it has syntax highlighting =)
<hoelzro> but I'm guessing I've only scratched the surface
<bnagy> s/nicely/verbosely
<bnagy> s/syn/annoying, unconfigurable syn/
<bnagy> :D
pk1001100011 has joined #ruby
gilead has joined #ruby
<bnagy> banisterfiend: you need to make it use vim colorschemes. That would be awesome ;)
<bnagy> or coderay do
jackiechan0 has quit [Ping timeout: 245 seconds]
<Alantas> Bird in hand. Also, Pry was one of the first things I tried to install when I was trying rbenv / ruby 1.9.3 the other week. Didn't work. (Bunch of crap about redefining constants, then failing for lack of something Ruby has built-in (Readline).)
<Alantas> Well, it installed, but didn't run, it just did that. ^
<bnagy> hrm, worked out of box with rbenv for me on 1.9.3
<bnagy> probably your system is h0sed
<Hanmac> Alantas: do you build your ruby1.9.3 itself? and is it build against readline?
test34- has joined #ruby
<Alantas> I don't remember the command I used, but it was something that did build the ruby executable.
<Alantas> *Looks it up* Probably rbenv install 1.9.3-whatever
jimeh has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
hadees has quit [Ping timeout: 244 seconds]
<Hanmac> maybe you miss some -dev packages you need ...
EvanR_ has joined #ruby
hadees has joined #ruby
test34 has quit [Ping timeout: 240 seconds]
test34- has quit [Ping timeout: 244 seconds]
flak has joined #ruby
D4T has quit [Read error: Connection reset by peer]
tonini has quit [Read error: Connection reset by peer]
zastav has joined #ruby
rippa has quit [Read error: Connection reset by peer]
TheNumb has quit [Read error: Connection reset by peer]
ronniy has joined #ruby
flak is now known as Guest51511
TheNumb_ has joined #ruby
TheNumb_ has quit [Client Quit]
EvanR has quit [Ping timeout: 252 seconds]
jjp has quit [Ping timeout: 252 seconds]
TheNumb has joined #ruby
test34 has joined #ruby
jjp has joined #ruby
jackiechan0 has joined #ruby
<zizzyx> how do i do a select on a range that i'm using as a function arg
pzol has left #ruby ["Sayonara!"]
<zizzyx> for example, i want to generate random arrays of hashes like the one i made into a tree
<Alantas> "A select"?
<zizzyx> the select method that works on hashes and arrays and etc, can it be used on ranges as well?
<Alantas> Oh. Yes.
<zizzyx> or can i generate a range with a predicate, i.e. generate a list of all possible parents for this new node
nirakara has quit [Ping timeout: 256 seconds]
<Alantas> It works on all Enumerable types, which includes Array, Hash and Range, among others.
<zizzyx> which is just every id but the id of the current node
<zizzyx> ok this snippet is broken, can you find out what part of the syntax i don't get :(
<zizzyx> sec
<zizzyx> i think i just need to bracket the range with something
<zizzyx> parens or bracket i'm not sure which
<DefV> you need to add brackets around your range
<Hanmac> zizzyx you need this: (0..id_pool)
<zizzyx> ok ty
<DefV> because now select is called on id_pool
<zizzyx> the next snag is that select is returning an array instead of a range, and rand doesn't take an array argument heh
amalvagomes has quit [Quit: amalvagomes]
<zizzyx> maybe i'm not properly conceptualizing what i want
<zizzyx> take the pool of all possible node ids, remove the current node's id, then pick one at random
test34 has quit [Ping timeout: 244 seconds]
<zizzyx> basically i'm trying to generate pathological cases for the printing thing i've been working on
<zizzyx> hoping to show the bosses that i'm thinking
test34 has joined #ruby
<Alantas> prng.rand(possible - [current])
<zizzyx> you mean like ((a_range) - an_integer)
<zizzyx> does that work?
<Alantas> Not as such, but you could do: ((a_range).to_a - [an_integer])
<zizzyx> array.sample is what i want i think
<zizzyx> don't even need to make a random object
<zizzyx> just select on the range for !this.id, then sample that array
niklasb has joined #ruby
<Alantas> "sample" it? You mean iterate over it?
<zizzyx> Alantas: i'm not certain but i don't think rand accepts an array argument
<zizzyx> when i use verbs i mean the instance method
<zizzyx> ary.sample
<Alantas> Easy enough. And you could just do "next if current == node" or whatever, so you don't have to try to remove it first.
<Alantas> Oh. It's a 1.9.3 thing so I didn't see it in the docs I was looking at.
<zizzyx> ah oops
<Alantas> Anyhow, sure, that looks like a way to get a random element from it.
<banisterfiend> bnagy: btw if u dont like the way it formats results you can easily revert to the old style, we bundle a few inspects
<banisterfiend> bnagy: Pry.config.print = proc(&:inspect)
<banisterfiend> bnagy: there's also: Pry.config.print = Pry::SIMPLE_PRINT
<banisterfiend> and a few other ones
schovi has joined #ruby
<banisterfiend> you can also change to awesome_print if u prefer that
dEPy has joined #ruby
adac has quit [Read error: Connection timed out]
bluOxigen has joined #ruby
adac has joined #ruby
c0rn has quit []
BiHi has joined #ruby
wilmoore has quit [Read error: Connection reset by peer]
jackiechan0 has quit [Quit: Sto andando via]
nickchow has quit [Read error: Connection reset by peer]
nickchow has joined #ruby
petercs has quit [Ping timeout: 244 seconds]
Ammar01 has joined #ruby
perryh is now known as perryh_away
Solnse has joined #ruby
serroba has quit [Quit: This computer has gone to sleep]
davidw has joined #ruby
davidw is now known as Guest3491
niklasb has quit [Read error: Operation timed out]
senny has joined #ruby
xnm has quit [Read error: Connection reset by peer]
khakimov has quit [Quit: Computer has gone to sleep.]
Criztian has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
<bnagy> banisterfiend: ah, cool.
lopin has joined #ruby
celm has joined #ruby
ciopte7 has quit [Quit: ciopte7]
jackiechan0 has joined #ruby
<bnagy> anyone happen to know what happens if two threads are using trap "INT" ? Do they each get a chance to run their blocks?
ryanf has quit [Quit: leaving]
<hoelzro> bnagy: I'm not sure how Ruby does it, but unless it does something "interesting", it "depends on the OS"
jimeh has quit [Quit: bye]
<hoelzro> if you're on Linux, I believe you get one signal handler per process (unless you use a special pthread function), and the thread the handler is invoked on is non-determinstic
<hoelzro> but, I think that you can set a sigmask on inidividual threads, so you can assert that a signal gets sent to a particular thread
djdb has joined #ruby
petercs has joined #ruby
<bnagy> hm ok
fixl has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
<bnagy> I'll stick with one
<hoelzro> that sums it up nicely
dnyy has quit [Remote host closed the connection]
flippingbits has joined #ruby
<banisterfiend> bnagy: check out all the config options https://github.com/pry/pry/wiki/Customization-and-configuration#wiki-Config_print
<banisterfiend> bnagy: (i focussed on the print one, but check out the others too)
ctwiz has joined #ruby
Vainoharhainen has joined #ruby
AlbireoX`Laptop has quit [Remote host closed the connection]
banseljaj is now known as imami|afk
dekroning has joined #ruby
ephemerian has joined #ruby
Schweby has joined #ruby
charliesome has joined #ruby
mdw has joined #ruby
seivan has quit [Read error: Connection reset by peer]
jgrevich has quit [Quit: jgrevich]
seivan has joined #ruby
francisfish has joined #ruby
jackiechan0 has joined #ruby
xnm has joined #ruby
jimeh has joined #ruby
ctwiz has quit [Quit: ctwiz]
workmad3 has joined #ruby
dr_bob has joined #ruby
Schweby has quit []
francisfish has quit [Ping timeout: 260 seconds]
<zizzyx> is there any better way to pick a random member of a range than (range).to_a.sample --- without creating a Random object
lolmaus has joined #ruby
<zizzyx> bnagy i think you will be happy with me btw
francisfish has joined #ruby
<charliesome> zizzyx: rand 1..10 in >= 1.9.3: http://19pad.charlie.bz/1515
roolo has joined #ruby
<zizzyx> it meets the requirements of the prompt and also generates random data in the form given in the prompt
<zizzyx> ruby owns btw
<zizzyx> refactoring my code in vim was so easy because all the methods are sensible verbs
<zizzyx> ty charliesome
Yarou has quit [Ping timeout: 245 seconds]
<kalleth> surely its ty matz
jenglish has joined #ruby
DrShoggoth has quit [Quit: Leaving]
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
apeiros_ has joined #ruby
<banisterfiend> zizzyx: Yeah
<banisterfiend> zizzyx: Random.new.rand(1..10)
<banisterfiend> zizzyx: or ran(1..10) in 1.9.3 as charliesome says
<banisterfiend> rand
<banisterfiend> apeiros_: im unbanned in #ruby-lang
apok has quit [Quit: apok]
<banisterfiend> exciting, right!
<apeiros_> you were banned?
<banisterfiend> apeiros_: hell yeah
<banisterfiend> for about 1 year
<apeiros_> lol
<charliesome> banisterfiend: what did you do? :p
<apeiros_> what did you do? piss of zenspider?
<banisterfiend> apeiros_: nah, a nsfw (porn link) to the channel, drbrain banned me
<banisterfiend> i was drunk
<apeiros_> g
<charliesome> aha
<apeiros_> you're lucky we're not in a muslim channel! you'd have been electrocuted via your keyboard right away!!!
<banisterfiend> hehe
<banisterfiend> apeiros_: #ruby seems a lot more tolerant
zastav has quit [Remote host closed the connection]
<banisterfiend> im pretty sure i spam this channel with NSFW content
<banisterfiend> luckily there's not as many active ops ;)
KazW has joined #ruby
<apeiros_> as long as you mark them and as long as it isn't excessive…
<zizzyx> haha watching porn is great, sharing your favorite porns...
<banisterfiend> apeiros_: let me practice
<banisterfiend> apeiros_: NSFW: http://www.youtube.com/watch?v=cXyEitADwHo
<apeiros_> nsfw on youtube? wow…
<apeiros_> well, sadly I'm @ work, so no clicky for me :)
<banisterfiend> apeiros_: kind of
<banisterfiend> zizzyx: maybe you can tell the channel what u think of that link
<KazW> Is there a Rails-like framework for desktop GUI applications?
<banisterfiend> KazW: what i normally do is write the GUI client in objective C
<banisterfiend> KazW: and have a ruby server
<banisterfiend> KazW: ruby is pretty shit at GUI afaict, shit looks ugly
<banisterfiend> and macruby doesnt appear stable yet
<KazW> Hmm
tatsuya_o has joined #ruby
L-----D has quit [Quit: Leaving]
<KazW> Maybe I'll just do a Rails app and have a remote interface as a "bonus"
<KazW> Thanks for the info :)
<banisterfiend> KazW: look at shoes
<Alantas> Objective C... looks cleaner than Ruby... at anything.
* Alantas is still trying to parse that.
<workmad3> Alantas: O.o
<banisterfiend> Alantas: objc is OK, but i would prefer Ruby, just i dont trust macruby yet
<KazW> banisterfiend: Nifty, that should do the trick, thanks
<workmad3> oh, GUIs... yeah, GUI code tends to look like a heap of spaghetti with shitballs in almost any language
<banisterfiend> workmad3: nah cocoa is actually really really nice at gui apps
simao has joined #ruby
<workmad3> KazW: look at green_shoes in particular :)
<KazW> Random side note, if anyone is into space stuff, Dragon is going to be leaving ISS in a few minutes.... http://www.ustream.tv/nasahdtv
<banisterfiend> workmad3: is green shows MVC?
<workmad3> banisterfiend: no, it's a gemified shoes
x0F has quit [Disconnected by services]
<banisterfiend> workmad3: so i guess shoes isn't MVC? :)
x0F_ has joined #ruby
<banisterfiend> weird, MVC really suits GUI apps
<Alantas> I hand-wrote a nontrivial Ruby/Gtk program. It's wordy but not terribly difficult.
x0F_ is now known as x0F
Hanmac has quit [Ping timeout: 252 seconds]
simao has quit [Read error: Operation timed out]
<Alantas> Especially with blocks for event handlers.
atmosx has quit [Ping timeout: 256 seconds]
<banisterfiend> Alantas: Yeah, ruby is the shit
brzz has joined #ruby
yannis has joined #ruby
simao_ has quit [Ping timeout: 245 seconds]
<banisterfiend> Alantas: but objc is extremely ruby-ish too, in fact they both have a smalltalk root
choffstein has joined #ruby
<brzz> Hi how oculd I recompile local changed gems?
Guest3491 has quit [Ping timeout: 244 seconds]
Hanmac has joined #ruby
<banisterfiend> objc feels like ruby in many ways
<workmad3> banisterfiend: it doesn't force MVC
choffstein has quit [Remote host closed the connection]
<banisterfiend> brzz: C gems?
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
atmosx has joined #ruby
<banisterfiend> brzz: if they're not C you dont need to recompile anything
<brzz> banisterfiend: I think so.: eventmachine-1.0.0.beta.4.1-x86-mingw32
<banisterfiend> brzz: ok
<workmad3> banisterfiend: there are several ways that make sense for GUIs, depending on the style of GUI :)
bier has quit [Ping timeout: 240 seconds]
<banisterfiend> brzz: well, u could try cd-ing into that folder, and re-running extconf.rb and then make
<brzz> banisterfiend: Ok, I'll give it a try...
simao has joined #ruby
bier has joined #ruby
<banisterfiend> brzz: you'lll likelly need to copy the generated .so (.bundle) into the right folder, likely lib/
looopy has joined #ruby
Helius has joined #ruby
<banisterfiend> as rubygems usually manages that
<banisterfiend> so you'll need to do it yourself
red-panda has joined #ruby
<banisterfiend> check the gemspec for more info about that
<brzz> banisterfiend: seems there is no extconf.rb in the folder
<brzz> I think this might be because it's the platform build?!
<banisterfiend> brzz: ah, so it came with a precompiled binary?
<banisterfiend> are you on windows?
<brzz> banisterfiend: sadly: yes
<banisterfiend> brzz: then you're probably fucked.
<banisterfiend> to put it kindly
<brzz> :-/
jackiechan0 has quit [Ping timeout: 245 seconds]
<banisterfiend> brzz: well, if you install the proper dependencies and so on, you could probalby build it on windows
<banisterfiend> and u had the devkit
<banisterfiend> etc
<banisterfiend> but it might be fiddly and boring
<Alantas> It says -x86-mingw32, so look into mingw.
<brzz> So when I get it right on installing eventmaschine - the sources are pulled form git and build...
<brzz> I simply want to manipulate the checkout sources before the build
<banisterfiend> brzz: follow their build process for windows
yoyoma has joined #ruby
<banisterfiend> it'll probalby be in the rakefile
<banisterfiend> very likely they're using rake-compiler
<banisterfiend> in which case they'll be cross compiling for windows on *nix
<yoyoma> hi all. is there a builtin method in ruby to remove directory contents recursively ? I have a folder /dede/xxx/temp that contains files and directories, how can I delete all of those ?
Solnse has quit [Read error: No route to host]
<Alantas> yoyoma: I'd just do `rm -r /dede/xxx/temp`
TheHunter_1039 has quit [Quit: TheHunter_1039]
nilg` has quit [Remote host closed the connection]
<Alantas> Or on Windows, probably deltree or something instead of rm.
<banisterfiend> yoyoma: FileUtils.rm_rf
<brzz> banisterfiend: So when a gem is "installed" is rake invoked or a ruby script is executed?
looopy has quit [Remote host closed the connection]
xnm has quit [Ping timeout: 246 seconds]
nickchow has quit [Quit: Linkinus - http://linkinus.com]
<yoyoma> Alantas: i hate using system commands to achieve things like that..
<yoyoma> brzz: i'll try rm_rf
<brzz> yoyoma: on what?
jbw has quit [Ping timeout: 252 seconds]
<yoyoma> brzz: windowz
<brzz> yoyoma, it's not my decision....
interopc1p has quit [Ping timeout: 244 seconds]
adambeynon has joined #ruby
<yoyoma> brzz: what do you mean ? I'm going to use rm_rf as you suggested, it's cross plat right ?
jackiechan0 has joined #ruby
<Alantas> yoyoma: banisterfiend (not brzz) is the one who suggested FileUtils.
<brzz> yoyoma, wrong hightlight my friend...
<Alantas> Dunno if it's cross-platform, given all the method names named after characteristically-Unix things like "ln -f".
<Alantas> But, they could be cross-platform implementations of those things.
<Alantas> So, try it and see.
<yoyoma> ohhhh sorry, I meant banisterfiend. I will give his suggestion a try
pygospa has quit [Read error: Operation timed out]
pygospa has joined #ruby
trend has quit [Quit: trend]
iocor has joined #ruby
nirakara has joined #ruby
b1rkh0ff has joined #ruby
<yoyoma> banisterfiend: works good, thanks a lot
<banisterfiend> yoyoma: np
fabrice31 has quit [Ping timeout: 245 seconds]
<shevy2> yoyoma I usually write a wrapper method, and then use FileUtils inside that
jbw has joined #ruby
<shevy2> def remove(i)
shevy2 is now known as shevy
<brzz> Is it possible to copy a gem from one installation to another?
<shevy> makes it easier to rescue exceptions too
<shevy> brzz all .gem files are stored in cache/ subdirectory too
<banisterfiend> brzz: i thnk rvm has commnads for that
<shevy> so you only have to copy that dir, or copy all the .gem in that dir, and install via "gem install bla.gem", or in ruby something like ... "fetch all .gem files, then invoke gem install on each"
<shevy> brzz, by default the cache dir is /usr/lib/ruby/gems/1.8/cache/ for any installation from source into prefix /usr. some distributions like debian are funny and use /var/* something instead. (1.8 would be 1.9.1 for latest ruby)
<yoyoma> shevy2: why write a wrapper method ?
<brzz> Strange I got some error on executing gem install: ERROR: While executing gem ... (Errno::ENOENT)
jackiechan0 has quit [Ping timeout: 245 seconds]
fabrice31 has joined #ruby
<bnagy> sorry...was coding
<bnagy> brzz: for windows gems, if you have devkit installed gem install eventmachine --platform=ruby
<bnagy> and it will build it
jackiechan0 has joined #ruby
<bnagy> instead of using a broken binary gem
<shevy> yoyoma as written before, you can rescue exceptions nicely. and you have one bottle neck method, where you know you will pass through everything, whenever you remove anything
<shevy> brzz that error does not say much
<shevy> :)
lsone has quit [Ping timeout: 260 seconds]
<shevy> yoyoma usually I will then use it like .... remove '/foo/*' or remove '/temp/test.txt'
<banisterfiend> yoyoma: you name yourself at the chinese musician?
Shamgar has quit [Ping timeout: 245 seconds]
jackiechan0 has quit [Quit: Sto andando via]
<yoyoma> banisterfiend: yes, i love this name
Shamgar has joined #ruby
<banisterfiend> yoyoma: reminds me too much of 'yoyo'
<banisterfiend> yoyoma: so it sounds silly to me
<bnagy> BrokenCog: yep, that looks like an error
<bnagy> BrokenCog: sry bad hilite
lsone has joined #ruby
<bnagy> brzz - that looks like an error :)
<bnagy> do other ext gems build? rdiscount?
TheFuzzball has quit [Quit: Leaving...]
akem has quit [Ping timeout: 252 seconds]
tayy has joined #ruby
<brzz> bnagy: yes it's build succesful
<brzz> bnagy: yes it's build succesful
<brzz> The stati64 error seems to be fixed in --pre
<brzz> but there is a problem with the FD_SETSIZE
atmosx has quit [Ping timeout: 240 seconds]
<brzz> So I would like to build the eventmaschine again with modifed project.h
berserkr has joined #ruby
<bnagy> I think you can modify it and then do gem build or something
<bnagy> but I haven't done this stuff for years
choffstein has joined #ruby
<brzz> me never :D
atmosx has joined #ruby
Guest3491 has joined #ruby
celm has quit [Remote host closed the connection]
dross_ has joined #ruby
jenrzzz-mac has joined #ruby
arturaz has quit [Read error: Connection reset by peer]
<shevy> lazy guys
dross has quit [Ping timeout: 250 seconds]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
mucker has quit [Quit: leaving]
tayy has quit [Remote host closed the connection]
<banisterfiend> shevy: are you really a native german speaker?
<shevy> banisterfiend dunno, I have an accent. people in germany dont understand me unless I speak in noble high german
<Hanmac> because noone understand Bavarian :P
<banisterfiend> shevy: i'll pay you 5 euro if you speak to me only in noble high german for the rest of the night
<shevy> Hanmac :D
<shevy> Hanmac, yeah, I get stumped sometimes... but I had to laugh when I heard "Arschwurz"
<shevy> banisterfiend, you need to go to Bavaria. the people there use the word "Arschwurz" which can be translated as ... ass-root...
<shevy> banisterfiend pffft 5 euro that's worth nothing man
<Hanmac> my accent is Saxon ... its the opposite of Japanese, we have too many 'R' in the language :P
choffstein has quit [Remote host closed the connection]
<shevy> hehe
<banisterfiend> shevy: is he one of the dangerous germans liable to start ww3
<shevy> a shame banister will never hear the intricate differences in those dialects
seivan has quit [Remote host closed the connection]
<shevy> banisterfiend dont think so. ww3 will be started by NATO, not germans
atmosx has quit [Ping timeout: 244 seconds]
Beoran__ has quit [Read error: Operation timed out]
etehtsea has joined #ruby
atmosx has joined #ruby
djdb has quit [Remote host closed the connection]
krz has quit [Quit: krz]
niklasb has joined #ruby
<shevy> Hanmac! new swig release!
niklasb has quit [Read error: Connection reset by peer]
niklasb_ has joined #ruby
<shevy> \o/
<Hanmac> yeah, new software to hate ;P
<banisterfiend> shevy: what's your fave chocolate
niklasb__ has joined #ruby
<shevy> banisterfiend it depends. most chocolate is actually awful
niklasb_ has quit [Ping timeout: 244 seconds]
<banisterfiend> shevy: do u like black forest flavor
<shevy> banisterfiend, typically the best chocolate can be find in these mice http://www.chocolatesandpatisserie.com/images/chocolates/Milk-and-White-chocolate-mi.jpg
<atmosx> aloha people
<hoelzro> atmosx: howdy
<shevy> atmosx!!!
<shevy> you are back!
<atmosx> shevy: :-) yess
<atmosx> I'm having a hard time with my exam session but since I passed organic chemistry
<shevy> Hanmac, swig is for lazy people :)))
<banisterfiend> shevy: you spend your days and nights eating chocolate mice?
<shevy> cool
<shevy> atmosx, what is a grignard reaction
<atmosx> I can finnish my ruby f2bread script to read fail2ban logs like a human being
<shevy> banisterfiend, nope, it is unfortunately extremely expensive
Beoran__ has joined #ruby
<atmosx> shevy: a reaction that has the Grignard Reagent in it
brzz has quit [Quit: Page closed]
<shevy> atmosx hehe
<banisterfiend> atmosx: shevy is also a chemistry major
<atmosx> usually you have alkyl or ... wait you interested or just testing me?
<atmosx> aaaaah
<atmosx> omg
<atmosx> shevy: :-P didn't knew
<banisterfiend> atmosx: you two should babble away about chemistry together
<shevy> atmosx was just a quick test :P
<atmosx> shevy: I'm just killing my self with organic chem in order to get my degree asap and go back home, as a pharmacist :-P shevy, WHERE WERE YOU WHEN I NEEDED YOU!
<atmosx> haha
<shevy> organic chemistry is nice
<shevy> I hate inorganic chemistry though
<atmosx> shevy: I'm not good really, at my professor - he is a mac addict - I can say "I'm good with computers". I do my assingments in LaTeX and they don't even know that exists. But if shevy was my professor I wouldn't feel so smart :-P
<banisterfiend> atmosx: erggg one of those people wearing a white coat who sell viagra and weightloss pills to the middle aged and hopeless
<shevy> and analytical chemistry is in between... semi-boring. sometimes ok...
<atmosx> banisterfiend: exactly!
<shevy> your professor uses mac?
<shevy> ours here are exclusively on ... windows
<shevy> and linux pfffft none has ever heard of that
<atmosx> banisterfiend: isn't that a great sight? Depends on the view really, it's always from being in a the middle of 4th floor, on a small plastic desk killing your eyes writing Visual C# or Java ;-)
<atmosx> shevy: no, my statistics teacher knows what Linux is but I'm not sure if he can use it... although he performed many statistics in Gnumeric.. Gnumeric has some ready2use functions
<banisterfiend> atmosx: i dont think many people on #ruby are writing too much c# or java :)
<shevy> cool, never heard of anyone using gnumeric so far :)))
<shevy> including me
<shevy> most apps are crap
<shevy> and the office suites are usually a collection of crap
<atmosx> shevy: what is your default OS? mac/win/linux?
jenrzzz-mac has quit [Quit: jenrzzz-mac]
<shevy> atmosx linux
<shevy> I have win 7 on a laptop
<shevy> but I liked win xp more :(
<shevy> to me it seems as if windows is just reshuffling old concepts around
liluo has quit [Remote host closed the connection]
<atmosx> I can't really use windows
<atmosx> I feel like being in a hostile env, without gnu-utils, bash etc
<shevy> well
<shevy> you can work around some shortcomings
<dekroning> I would like to test drive a piece of code that uses TCP and UDP socket for communication, anyone that could tell me how to go about this? Do i mock the messages send to the TCPSocket class ?
<shevy> i.e. MSYS than bash
<shevy> the aliases work, many shell functions work too.
<shevy> ruby works on windows also, somewhat
niklasb__ has quit [Read error: Connection reset by peer]
<shevy> atmosx, I wanna have it so that I can work on either windows or linux or anywhere else, and be productive. especially in regards to ruby
<shevy> so an idea would be to use some kind of docking platform, for ruby, on all OSes
<atmosx> shevy: yes I see, do you use ruby1.9 on linux?
<shevy> atmosx still 1.8.7 most of the time :) but 1.9.3 works here, I have it in a directory, when I wanna test something I can change to use it quickly
<shevy> the warnings annoy me though
<shevy> one .rb file has about 100 "duplicate when clause" entries
<atmosx> ah, becaues on my gentoo home server, I failed installing ruby1.9 system-wide twice, it seems to be a total mess 1.9 on major linux distros
snickersnack has joined #ruby
<atmosx> I'm using it with rvm now
<atmosx> s/with/through
<shevy> but 1.9.3 does not tell me which ones are exactly duplicated... I am too lazy to fix that, until it tells me precisely which ones are duplicated
<shevy> yeah no idea, I compile ruby from source. dont use rvm
<shevy> 1.8.7 does not compile here anymore though :(
<shevy> and I dont think upstream ruby wants to do any changes to 1.8.7 anymore
<shevy> so its kinda dead...
Guest3491 has quit [Quit: Leaving]
Progster has joined #ruby
Guest3491 has joined #ruby
Guest3491 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
snickersnack has quit [Client Quit]
rasbonics has joined #ruby
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
davidcelis has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
<atmosx> shevy: yeah, I never use 1.8.x anymore
flippingbits has quit [Quit: flippingbits]
cousine has joined #ruby
nirakara has quit [Ping timeout: 260 seconds]
<shevy> atmosx :(
<shevy> banisterfiend, you have a fixation ;)
flippingbits has joined #ruby
indian has quit [Ping timeout: 265 seconds]
JohnBat26 has quit [Remote host closed the connection]
berkes has quit [Ping timeout: 265 seconds]
urlwolf has quit [Ping timeout: 246 seconds]
cha1tanya has joined #ruby
noodletraveler has quit [Quit: leaving]
<shevy> http://blog.rein.pk/2012/05/building-api-where-one-doesnt-exist.html <-- the rick roll guy is writing a blog!
zommi_ has joined #ruby
zommi has quit [Ping timeout: 245 seconds]
sepp2k has quit [Remote host closed the connection]
<pk1001100011> There is .pk domain. o.o
tchebb has quit [Quit: Leaving.]
A124 has joined #ruby
<shevy> is that for you
<shevy> you could blog about ruby
<apeiros_> it's the PoKemon domain
A124 has left #ruby [#ruby]
JohnBat26 has joined #ruby
<pk1001100011> :(
JohnBat26 has quit [Client Quit]
berkes has joined #ruby
maesbn_ has joined #ruby
nirakara has joined #ruby
JohnBat26 has joined #ruby
adam__ has joined #ruby
maesbn has quit [Ping timeout: 252 seconds]
<adam__> help- got this error http://jsfiddle.net/hLakq/ - when trying to run this https://github.com/antirez/lamernews
maesbn has joined #ruby
maesbn_ has quit [Ping timeout: 246 seconds]
yoyoma has quit []
etehtsea has quit [Read error: Connection reset by peer]
atmosx has quit [Ping timeout: 244 seconds]
freeayu__ has quit [Ping timeout: 256 seconds]
atmosx has joined #ruby
nanderoo has joined #ruby
hxmws has joined #ruby
`brendan has joined #ruby
<adam__> any help
<hxmws> Hi all, quick question. I'm trying to get my head around test/unit and assert in particular... does anyone know how I capture the assert and perform another action
nilg` has joined #ruby
Progster has quit [Ping timeout: 244 seconds]
cousine has quit [Remote host closed the connection]
<`brendan> morning
freeayu__ has joined #ruby
test34 has quit [Ping timeout: 250 seconds]
test34 has joined #ruby
vitor-br has quit [Ping timeout: 246 seconds]
urlwolf has joined #ruby
carloslopes has joined #ruby
freeayu__ has quit [Ping timeout: 245 seconds]
<shevy> adam__, I dont think many here know https://github.com/antirez/lamernews best thing you could do is file an issue
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<adam__> shevy: ok thanks
geekbri has joined #ruby
jcromartie has joined #ruby
mucker has joined #ruby
freeayu__ has joined #ruby
dv310p3r has quit [Ping timeout: 246 seconds]
<workmad3> hxmws: what's your justification?
<workmad3> hxmws: it sounds like you're wanting to write a test that basically does 'do this, assert something, do something else, assert something else' and, if the first assert fails, still attempt to do the second stage
<hxmws> workmad3, selenium-webdriver, Im trying to peform an action as a test element fails
simao has quit [Quit: Lost terminal]
Morkel has quit [Quit: Morkel]
simao has joined #ruby
<workmad3> hxmws: so is this a cleanup step that you want to do regardless of if the test passes or fails?
<hxmws> workmad3, Ideally i'd only like to alert as the test fails
<workmad3> hxmws: alert?
<workmad3> hxmws: is the test/unit runner's feedback not good enough?
<hxmws> it is, but i'd like to send an email on failure
dv_ has quit [Remote host closed the connection]
headius has joined #ruby
zommi_ has quit [Ping timeout: 245 seconds]
d3vic3 has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
<hxmws> the assertion doesnt give me a chance to perform any other action
<hxmws> or am I not getting assertions?
zommi has joined #ruby
<hoelzro> hxmws: you should probably use a harness or CI system to do this for you
d3vic3 has joined #ruby
<hoelzro> put tests in your test files
<hoelzro> let other tools worry about other things
<hxmws> hoelzro, problem is that I'm trying to build a monitoring tool
allanm has joined #ruby
<hxmws> to run selenium tests and alert on failure
adambeynon has quit [Read error: Operation timed out]
nfk has joined #ruby
<zizzyx> if i'm expecting a call to ary.select to only return a single result, is there another method besides each i can use to perform a block with it
yannis has quit [Quit: yannis]
<zizzyx> right now i have array.select { predicate }.each { do_stuff }
<ccooke> zizzyx: what's bad about that?
adam__ has quit [Quit: Page closed]
<ccooke> there are lots of methods that take blocks, so it would be good to know what's bad about each in order to answer
<bnagy> zizzyx: ary.find
<zizzyx> thanks :)
<zizzyx> i'll look it up
<bnagy> memorize Enumerable ;)
<zizzyx> good idea
<ccooke> bnagy: ... how does that answer the question, though?
ramblex has joined #ruby
<ccooke> That is equivalent to: array.select { predicate }.first
<zizzyx> the real question was about the second part but his answer still helps
<ccooke> (more efficient, certainly, but equivalent in result)
<zizzyx> so once i have the result of find, do i still do each { block }
<zizzyx> well each is for enumerables
<zizzyx> so i'd guess not
<ccooke> zizzyx: no, because the return from find will be the first object that matches
<zizzyx> oh i just need to reorder the expression
<ccooke> but you could just do: found = array.find { predicate }; do stuff to found
tk___ has joined #ruby
<bnagy> ccooke: hm? He asked how to run a block if he expected select to return only one value - the answer is use find {|o| ... instead
<ccooke> zizzyx: note that find has a parameter to replace nil if nothing is found. I find that very useful :-)
<ccooke> bnagy: no, he was asking about using the result *in* a block
nirakara has quit [Quit: This computer has gone to sleep]
<ccooke> also, there is no specification of gender here so far, so "he" may be assuming wrongly ;-)
<DefV> "it" is more correct
<bnagy> well you just do stuff with the find result
<ccooke> DefV: I usually use "they".
<bnagy> there's no point using a block for one object
<bnagy> sorry thought that was implied
freeayu__ has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
<bnagy> people's nicks are a good substitute for gender, 'it' is a little creepy, no? :)
petercs has quit [Quit: Leaving.]
igaiga has joined #ruby
<zizzyx> here's before and after: http://pastie.org/4001286
<workmad3> hxmws: I'd suggest you use a continuous integration server (something like travis-ci or jenkins) and set the build up to email on a build failure rather than pushing emails into the test run itself
rubynoob has joined #ruby
jcromartie has quit [Quit: jcromartie]
<hoelzro> workmad3: I already suggested that =)
<bnagy> zizzyx: they both look broken?
<rubynoob> Hey, quick question from a ruby noob. What does => mean in ruby syntax (outside of a hash)
<workmad3> hoelzro: yeah, I missed that part of the convo :)
<bnagy> zizzyx: unless you know something about 'test' that I don't
<hoelzro> rubynoob: I believe it creates a hash implicitly
<shevy> rubynoob good question... for me it kinda means to point at something
<workmad3> hxmws: it also sounds a bit like you're building your own CI server... I'd suggest not trying to do that *inside* testunit
<rubynoob> like, calling a method?
<shevy> begin; 'require 'never_exist'; rescue LoadError => error; pp error; end
<shevy> rubynoob nah
<zizzyx> bnagy the code works, what looks wrong about test
<rubynoob> doest it create or modify the thing on the left or the right side?
Gavilan has left #ruby [#ruby]
<zizzyx> the second is broken
<zizzyx> it assigns instead of ==, typo
yoyoma has joined #ruby
<shevy> rubynoob in the context of rescue, it assigns and makes a new variable called error
<workmad3> rubynoob: in a method call, e.g. something like 'my_method :foo => "bar" ' then the => is simply part of an implicit hash
<workmad3> rubynoob: in a rescue clause, it's a way of specifying the variable you want the exception object to be in (as shevy just said)
<bnagy> zizzyx: oic, it's the block var :S nevermind (but that's a really bad block var)
<workmad3> afaik, that's the only two places where => is valid syntax
igaiga has quit [Remote host closed the connection]
freeayu__ has joined #ruby
<zizzyx> what is an idiomatic universal var for test values
<rubynoob> workmad3: Im looking at a puppet conf file, and its got a line that just says " ensure => running "
<zizzyx> i was kinda brainfarting there
<workmad3> rubynoob: is that a resource file?
krusty_ar has joined #ruby
<shevy> rubynoob can you pastie the context
<bnagy> I would use 'node', which implies using something else as your method arg
<workmad3> rubynoob: because puppet resources aren't ruby
<rubynoob> they're not?!
<bnagy> zizzyx: but normally you'd have an add_child method for this kind of thing
<yoyoma> hi all, writing some script that does some rest api in json. I read contents of a file, dump it as json and post it to the server. once in a while i get exception "Uncaught exception: "\xC5" from ISO-8859-8 to UTF-8" on line "issuestr = JSON.dump(issue)". what should I do ? convert first to utf8 ?
<shevy> ensure would not work like that anyway
<shevy> in ruby
<bnagy> called on the node you're adding the child to
<workmad3> rubynoob: the framework is written in ruby, new resource types are written in ruby, but the puppet resource config is a custom DSL that puppet parses
<shevy> workmad3 knows the most exotic things :)
<rubynoob> its a puppet class file. maybe thats why it doesnt make any sense to me.
<rubynoob> This is the page that confused me.... http://bitfieldconsulting.com/puppet-tutorial
<bnagy> yoyoma: json is bitchy about binary data
<workmad3> shevy: well, I was setting up configuration management @ work, and I looked at puppet and chef... went with chef because I didn't want to learn the puppet DSL :)
<zizzyx> the way the data was ordered made it weird i dunno, i'm not familiar with doing lookups on a tree
<shevy> class ntp {}
<zizzyx> so i just made a flatten method and looked nodes up that way
<shevy> rubynoob, that does not even look like usual ruby code at all
<shevy> class Foo {} also would not even work in ruby
<rubynoob> ffs no wonder i'm confused..
jrajav has quit [Quit: jrajav]
<rubynoob> ok, thanks for your help all
<workmad3> rubynoob: yeah... it's annoying that the DSL is *almost* like ruby
rubynoob has quit [Quit: Page closed]
<shevy> yeah that's a problem when DSLs become like real languages
<shevy> is there a ruby DSL that is turing complete already?
itnomad has joined #ruby
<shevy> and then!
<shevy> implement ruby in this DSL
<yoyoma> bnagy: what should I do to "sanetize" it to json compatible ?
nlc has joined #ruby
<shevy> am I confused or does PHP make using forms easier than ruby .cgi?
<workmad3> shevy: well, if you have a DSL embedded in ruby then turing-completeness comes from the fact you can do normal ruby code inside it
<workmad3> shevy: when you have an external DSL, well it can be implemented in any language, you just need a parser :)
lorandi has joined #ruby
<workmad3> but yes, it's very easy to accidentally create a turing-complete DSL
<workmad3> however, I'd probably argue that if you could create ruby inside a DSL that isn't a DSL for creating compilers then you no longer have a DSL :)
nirakara has joined #ruby
<workmad3> s/compilers/interpreters
bluOxigen has quit [Ping timeout: 252 seconds]
cousine has joined #ruby
<Hanmac> some ruby interpreters can turn rubycode to bytecode :P
<workmad3> Hanmac: most do now, I believe :)
<shevy> hmm
<shevy> but why cant I then just ... use an .exe on any system
<workmad3> shevy: you can easily do that... but the exe would contain the ruby VM and probably the entire standard library plus all your gems (potentially compiled to appropriate bytecode and compressed though)
gmci has quit [Ping timeout: 256 seconds]
quesada has joined #ruby
urlwolf has quit [Ping timeout: 245 seconds]
<workmad3> what I've not seen an interpreter do is let the bytecode compilation be done separately and get saved (so nothing equivalent to javac)
gmci has joined #ruby
<workmad3> or even the equivalent of python, with .pyc files being generated with cached bytecode compilation
nilg` has quit [Remote host closed the connection]
<workmad3> and I really should use runtime rather than interpreter :)
<bnagy> yoyoma: sry, got disc'ed. You can try to force_encoding 'utf-8' maybe? Or use some other serialisation that's json safe :(
<bnagy> yoyoma: I switched to msgpack for this reason - that and the fact that JSON is crazy-ass dog slow
wangr has joined #ruby
fmcgeough has joined #ruby
prtksxna has quit [Remote host closed the connection]
cha1tanya has quit [Ping timeout: 240 seconds]
<yoyoma> bnagy: slowness is not issue for this script. i'll try force_encoding("UTF-8") thank you
realniko has joined #ruby
headius has quit [Ping timeout: 245 seconds]
krusty_ar has quit [Read error: Connection reset by peer]
krusty_ar has joined #ruby
<yoyoma> bnagy: after force_encodinging the script, when trying to dump it as json now I get "JSON::GeneratorError: only generation of JSON objects or arrays allowed" :(
FND has joined #ruby
<yoyoma> bnagy: force_encoding the string
igaiga has joined #ruby
<bnagy> yoyoma: hm. Dunno, sry. Maybe make up a minimal faulting case and pastie it
<bnagy> I have to go and play supermario now :>
<FND> is there a 1.8 equivalent for `"%{foo}" % { :foo => "bar" }`
<yoyoma> bnagy: have fun :) thanks
vjt has quit [Ping timeout: 272 seconds]
vjt has joined #ruby
<Hanmac> FND: no update to 1.9.3
<FND> Hanmac: I wish I could, desperately so
<Hanmac> let me guess ... its the supid rails?
<FND> yes (I'm not a fan myselF)
gilead has quit [Read error: No route to host]
seoaqua has joined #ruby
gilead has joined #ruby
cha1tanya has joined #ruby
<Hanmac> FND get an new ruby version, get a new rails version, and then update your project ... 1.8 will die in the next time
iamjarvo has joined #ruby
<FND> Hanmac: I've been trying to convince my colleagues multiple times, but in this particular project it's not gonna happen
<FND> IIRC, last time I tried I failed when it came to Oracle - go figure
jcromartie has joined #ruby
indian has joined #ruby
arturaz has joined #ruby
Morkel has joined #ruby
Morkel has quit [Client Quit]
<Hanmac> then your colleagues must live with that,that they software in ~2years are not work anymore
<FND> Hanmac: that's why I hate RVM; it will drag out the existence of legacy versions
<shevy> Oracle will devour everything in its way
Morkel has joined #ruby
vectorshelve has quit [Quit: Page closed]
<shevy> TTilus, textile is nice so far
bgupta has quit [Quit: bgupta]
tchebb has joined #ruby
tatsuya__ has joined #ruby
atmosx has quit [Ping timeout: 246 seconds]
atmosx has joined #ruby
stucorbishley has joined #ruby
hynkle has joined #ruby
tatsuya_o has quit [Ping timeout: 244 seconds]
shaman42 has quit [Ping timeout: 260 seconds]
itnomad has quit [Remote host closed the connection]
serroba has joined #ruby
yannis has joined #ruby
dv310p3r has joined #ruby
<shevy> argh
<shevy> with IRC you use QUIT to disconnect
keirlav87 has joined #ruby
<shevy> how to just disconnect from all channels instead?
snearch has joined #ruby
<workmad3> shevy: /part
<FND> shevy: /partall?
<shevy> oh
<shevy> lemme try that!
<FND> (my client doesn't actually have /partall, but others do IIRC)
bgupta has joined #ruby
pzol has joined #ruby
keirlav87 has left #ruby [#ruby]
xaxisx has joined #ruby
<shevy> hmm
<shevy> passing PART tells me that it wants more arguments
<shevy> :pratchett.freenode.net 421 shevy_test PARTALL :Unknown command
<shevy> I suppose PART is a legit command, PARTALL is not, at least not for freenode
shaman42 has joined #ruby
chson has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving.]
bluOxigen has joined #ruby
headius has joined #ruby
lorandi has quit [Quit: Leaving]
celm has joined #ruby
philcrissman has joined #ruby
headius has quit [Read error: Connection reset by peer]
ElitestFX has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
headius has joined #ruby
cdempsey has joined #ruby
headius has quit [Client Quit]
rmascarenhas has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
zemanel has joined #ruby
ananthakumaran has joined #ruby
tomzx has joined #ruby
digitalcakestudi has joined #ruby
tomb_ has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
bglusman has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
d3vic3 has quit [Ping timeout: 248 seconds]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
mengu has joined #ruby
etank has quit [Ping timeout: 246 seconds]
d3vic3 has joined #ruby
joast has joined #ruby
yoyoma has quit []
wvms has quit [Ping timeout: 244 seconds]
CannedCorn has joined #ruby
nfk has quit [Ping timeout: 248 seconds]
kenperkins has quit [Quit: Computer has gone to sleep.]
nfk has joined #ruby
chrisja has joined #ruby
Guest51511 has quit [Quit: derp herp]
thecreators has joined #ruby
runeb has joined #ruby
d3c has quit [Quit: Sleep]
amalvagomes has joined #ruby
jrist-out is now known as jrist
ananthakumaran has joined #ruby
tatsuya_o has joined #ruby
hxmws has quit [Quit: hxmws]
Axsuul has quit [Ping timeout: 246 seconds]
twock has quit [Quit: Lost terminal]
wvms has joined #ruby
tatsuya__ has quit [Ping timeout: 246 seconds]
twock has joined #ruby
looopy has joined #ruby
Jackneill has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
petercs has joined #ruby
fermion has joined #ruby
internet_user has joined #ruby
nirakara has quit [Quit: http://gplus.to/nikhil]
nirakara has joined #ruby
choffstein has joined #ruby
tomzx has quit [Ping timeout: 245 seconds]
etank has joined #ruby
d3vic3 has quit [Ping timeout: 256 seconds]
heftig has quit [Quit: leaving]
d3vic3 has joined #ruby
Progster has joined #ruby
serroba has quit [Quit: This computer has gone to sleep]
saltnvinegar has joined #ruby
igaiga has quit [Remote host closed the connection]
realniko has quit [Quit: Page closed]
uris has joined #ruby
akem has quit [Ping timeout: 246 seconds]
tomb_ has quit [Ping timeout: 246 seconds]
mtfk has joined #ruby
awarner has joined #ruby
<mtfk> I try to extend some class using alias_method_chain, but the problem is that this method is created dynamic by class_eval in thsi class
<mtfk> so when I try to run it there is inf loop becaue this method does not exist yet
<mtfk> how to force to first create dynamic method and then extend the class ?
<workmad3> mtfk: you can't alias dynamic methods
<mtfk> =]
<workmad3> mtfk: they aren't really methods ;)
C0deMaver1ck has joined #ruby
<mtfk> good to know, so there is no possiblity to achieve something like that ?
saltnvinegar has quit [Quit: saltnvinegar]
<workmad3> mtfk: not with an alias method chain, no
<workmad3> mtfk: however, you could always alias method_missing to intercept the calls and handle it ;)
chson has joined #ruby
iamjarvo has joined #ruby
<graspee> hey by the way i was trying to find something the other day and couldn't: with ruby's reflection is it possible to find the name of a variable? Like say I do chip=47, then I would want something like chip.name -> "chip" ?
mucker has quit [Quit: leaving]
<hoelzro> graspee: variables aren't objects
<hoelzro> also, why would you want or need to do that?
<graspee> i didn't say they were
<graspee> i wanted to write a generic variable printing out thing for debug purposes
<hoelzro> graspee: local_variables?
<shevy> graspee I dont think variables know their own names
<shevy> they are like the dumbest things ruby has
<graspee> local variable and instance variables would be nice
<shevy> it would also be a method you attach to all variables graspee
<shevy> x = Cat.new
<shevy> x.name
<hoelzro> graspee: there's a function called local_variables, iirc
<shevy> would that be the name of the cat, or the name of the variable
ananthakumaran has quit [Quit: Leaving.]
rasbonics has quit [Quit: rasbonics]
<graspee> the name of the variable
rasbonics has joined #ruby
dEPy has quit [Quit: Leaving]
<shevy> but ALL variables would have that
<graspee> otherwise it's the classname which you can actually get i know that much
djdb has joined #ruby
<shevy> I dont think "otherwise" can work, it would have to be either, or, but not both
saschagehlich has joined #ruby
joshman_ has joined #ruby
<graspee> the classname is gettable by just x.class.name
joast has quit [Quit: Leaving.]
<shevy> right but that is because you ask your object about the class it has
<graspee> i don't see why what i wouldn't couldn't be implemented, but if it isn't then fair enough
<graspee> what i want*
internet_user has quit [Remote host closed the connection]
<shevy> I dont know how you could get the name of the variable
<graspee> i don't know what you mean by that
Guest42960 has joined #ruby
<shevy> tim = Person.new('tim')
<shevy> tim.name # "tim"
<shevy> john = Person.new('tim')
<shevy> john.name #
<shevy> !
<graspee> what's the problem?
Guest42960 has left #ruby [#ruby]
<shevy> john would be tim
<graspee> but john.name would be "john"
<graspee> and tim.name would be "time"
<graspee> i mean tim
<graspee> i'm starting to see what you mean, but couldn't it be a special method which bypassed normal ways of working?
Squarepy has joined #ruby
<thedonvaughn> shevy: why do you need to know the instance name?
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<shevy> thedonvaughn I dont need to know the instance name
<workmad3> shevy: what should .name return if I did 'tim = Person.new('tim'); john = tim; john.name'?
kevinbond has joined #ruby
<thedonvaughn> oh i mean graspee
baroquebobcat has joined #ruby
<shevy> why is everyone asking me :(
<workmad3> shevy: fun? :)
<shevy> :P
<shevy> but it's a good question
wallerdev has joined #ruby
CheeToS has joined #ruby
<graspee> name would be a special method that knew not to interrogate the object but to look in the internals
<shevy> workmad3, I think graspee would want the new name in this case
<graspee> what i want is easy to describe
<workmad3> graspee: I'm just not sure how it's useful ;)
<graspee> at the moment
<graspee> i have a lot of lines like this in my debug:
<shevy> ### SPAM START
<graspee> print "x #{x} y #{y} @xpos #{@xpos}"
<shevy> ### SPAM END
cousine has quit [Remote host closed the connection]
<graspee> and i thuoght i'd toss off a quick debug method instead
<matled> graspee: try this: Hash[local_variables.map { |var| [var, eval(var.to_s, binding)] }]
<graspee> so i could do debugprint x,y,@xpos,@ypos
<shevy> aaaaaah eval attack!!!
<hoelzro> graspee: how about debugprint :x, :y?
<hoelzro> or something
<workmad3> graspee: right... and that method would have an 'args' param and when you printed out the name, you'd get args_1, args_2...
<matled> shevy: can I get the value of a local variable without eval? :)
<graspee> how does that help, hoelzro
cousine has joined #ruby
<shevy> matled, hmmm not sure... I think you can get instance variables via get_instance* something... but local variables? hmmmmm
<hoelzro> graspee: if you can access a caller's locals somehow, look up the locals under the given symbols and dump them
<shevy> let's ask workmad3
<shevy> workmad3, can we get local variables without eval?
FND has left #ruby [#ruby]
<graspee> you can iterate through the instance variables of an object and get their names it seems yes
internet_user has joined #ruby
<graspee> but that's not the same as being able to pass a variable and get its name printed out and its value
<graspee> and local variables i would want too
<hoelzro> graspee: debug print would print both the name and the value
<graspee> you mean debugprint is a real fn?
<hoelzro> you just have to deal with the fact that you can't just pass a variable
<hoelzro> no
<graspee> ok you're saying i would pass :y instead of y?
<hoelzro> yes
<graspee> hmm
<workmad3> graspee: you could pass in the binding and probably interrogate it for variables
<thedonvaughn> eval(Kernel::local_variables[0].to_s) works for me
<thedonvaughn> randomly picking the first variable :)
theRoUS has joined #ruby
mikeycgto has joined #ruby
<workmad3> graspee: something like debugprint(:variables => [:x, :y], :binding => binding) would (I think) give you enough to do it :)
<graspee> that's almost as much typing as before though
<graspee> i just wanted to not have to type the #{} stuff really
<thedonvaughn> graspee: uhm
<graspee> and this just gives me colons and square brackets in exchange
tomb_ has joined #ruby
<thedonvaughn> why does that matter?
<thedonvaughn> you don't want to use some tokens ? :)
<graspee> i was just trying to save keystrokes
snearch has quit [Quit: Verlassend]
<graspee> i can already do what i want to do which is print out the values of a few variables
<graspee> i just wanted to do it more concisely
theRoUS has quit [Client Quit]
theRoUS has joined #ruby
<shevy> whoa
<shevy> hey wait
<graspee> i can probably do it with eval though
<graspee> i could send a string like "x y xpos ypos"
<shevy> !
<graspee> then it could take the string, split on tokens, eval tehm and put the values in
<shevy> evals everywhere
<shevy> THEY ARE OUT OF CONTROL
<graspee> it's debug stuff
<graspee> it doesn't have to win awards for ze speed
<graspee> they will get commented out when the code works
elux has joined #ruby
<shevy> when I work in a larger ruby project, I usually keep one central debug variable that toggles the debug state
<shevy> usually, it will be @debug, and either set to true or false
lorandi has joined #ruby
<shevy> so I can just toggle it
<graspee> if only ruby had a preprocessor
tcopp has joined #ruby
<workmad3> graspee: eval 'puts "' + binding.send(:local_variables).reject{|v| v == :_}.map{|v| v.to_s + ' = #{' + v.to_s + '}'}.join(",") + '"' <-- that prints out all local variables :)
<shevy> evaaaaaal!
<shevy> today is eval day on #ruby
freeayu__ has quit [Quit: 离开]
<graspee> thanks, but i don't want to print them all out
<Hanmac> eval is not debug stuff, eval should be avoid where ever is possible ... and if its not possible you wrote shit code
<workmad3> graspee: you just need to adjust the .reject
<shevy> if you dont like eval, you haven't used it enough
yannis has quit [Ping timeout: 260 seconds]
<graspee> hanmac what you are saying is unnecessarily hostile and wrong
<shevy> the future belongs to evaling XML
<shevy> with embedded ruby code (but split up into seveal parts of the XML file(s)
BiHi has quit [Ping timeout: 256 seconds]
<Hanmac> graspee: give me code where you think eval could not be avoid
hoelzro is now known as hoelzro|away
<graspee> no
<graspee> i don't have to prove anything to you
<graspee> and you already set a bad tone
<graspee> so i don't want to talk to you further, thank you
chomp has joined #ruby
<shevy> shake hands and eval
<shevy> or eval, then shake hands
<shevy> or eval, then FIGHT!!!
<shevy> told you. eval always leads to violence...
xaq has joined #ruby
becom33 has quit [Ping timeout: 245 seconds]
<Hanmac> or eval ("rm -rf /"), then ...
becom33 has joined #ruby
<shevy> yeah
<graspee> yeah cos i always run pry as root <rolleyes>
<shevy> though I never did that so far from ruby
<shevy> I use only very few evals though
maesbn has quit [Remote host closed the connection]
<shevy> self.instance_variable_set(i_var.to_sym, eval(second_var))
<shevy> philcrissman without context?
<workmad3> graspee: also, pry isn't a bash shell...
<graspee> that's not even what eval does so it's a pretty silly thing to say
<graspee> yeah
C0deMaver1ck has quit [Quit: Leaving...]
<philcrissman> just watching ;-)
o_proxeneta has joined #ruby
<shevy> philcrissman, I am scared to click on random links :( banisterfiend spoiled me
amalvagomes has quit [Quit: amalvagomes]
C0deMaver1ck has joined #ruby
<philcrissman> shevy: ah, sorry. My irc client does fancy things like show images inline. Just a gif.
* philcrissman is a bad irc citizen
maesbn has joined #ruby
<shevy> hmmm I need a testie to click on that first
* shevy looks at graspee hopefully ...
<graspee> sorry not this time
<philcrissman> lol.
<shevy> damn... I am out of testies ...
cdempsey_ has joined #ruby
cdempsey_ has quit [Remote host closed the connection]
<mtfk> workmad3: do You know why exactly alias chain method does not work with dynamic methods ? because for me it works sometimes and sometimes is inf loop
tchebb has quit [Ping timeout: 246 seconds]
<workmad3> mtfk: are you in rails by any chance?
<mtfk> yep :)
<philcrissman> shevy: haha, literally, just a gif. Doesn't even make sense anymore, ignore it.
cdempsey has quit [Ping timeout: 244 seconds]
<shevy> workmad3 is better than sherlock holmes
BiHi has joined #ruby
<shevy> he can smell the bytes
<workmad3> mtfk: probably because most of the dynamic methods in rails are generated as actual methods after the first call, so if you method chain them it might work at times
<workmad3> mtfk: but if it's your own dynamic method, or you're not careful, things go boom...
<mtfk> workmad3: it's my own dynamic method
o_proxeneta has quit [Ping timeout: 244 seconds]
<mtfk> ok so I will need change flow a little bit to make it work without method chain
tchebb has joined #ruby
<workmad3> mtfk: I'd try to cut back on the metaprogramming tbh
amalvagomes has joined #ruby
<workmad3> mtfk: I'd highly recommend a strict maximum of only one metaprogramming technique in play at any time (and that only when nothing else works)
ananthakumaran has joined #ruby
<shevy> <workmad3> mtfk: I'd try to cut back on the metaprogramming tbh <--- \o/
<workmad3> mtfk: and I'd step very carefully with metaprogramming around any rails models too, as there is a lot of stuff in play there
<shevy> \ø/
<shevy> wearing even a hat now while cheering
<workmad3> shevy: that's a hat? it looks more like your head has been replaced with saturn on a slant :P
<mtfk> workmad3: I will remember that thanks a lot for advice I will need to change some part of code :) but it will safe some time in the future I think :)
<shevy> workmad3 its one of those hats you see guys wear while hunting an elephant
kenperkins has joined #ruby
<workmad3> mtfk: will it? or will it be a mass of confusion that takes you hours to untangle next time you look at it? for the sake of not writing a couple of extra lines of explicit code? ;)
adambeynon has joined #ruby
jcromartie has quit [Remote host closed the connection]
jcromartie has joined #ruby
emmanuelux has joined #ruby
Ankhers has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
twqla has quit [Ping timeout: 244 seconds]
berkes has quit [Quit: Ex-Chat]
blacktulip has quit [Remote host closed the connection]
CannedCorn has quit [Quit: Computer has gone to sleep.]
<JonnieCache> unnecessary metaprogramming ftw
<JonnieCache> as long as nobodys paying you for it of course
<banisterfiend> ah weird, for a long time i thought workmad3 and JonnieCache were the same person
<banisterfiend> both british right?
jrist is now known as jrist-brb
<JonnieCache> hahahaha
<JonnieCache> yeah
<JonnieCache> its not like the nick is similar though!
<banisterfiend> JonnieCache: exactly the same personality however
<banisterfiend> :P
jchauncey has joined #ruby
<workmad3> same personality? are you crazy?
<banisterfiend> both respectful and patient englishmen
<workmad3> banisterfiend: hahah
d3vic3 has quit [Ping timeout: 260 seconds]
d3vic3 has joined #ruby
ABK has quit [Ping timeout: 245 seconds]
heftig has joined #ruby
mattonrails has joined #ruby
marwan_ has joined #ruby
<marwan_> help: weird problem http://jsfiddle.net/hLakq/
<graspee> def debugprint s s.split.each do |f| print f + ": " + (eval f).to_s + " " end print "\n"
<graspee> end
<graspee> it works well
<workmad3> Marwan_: looks like you have issues with talking to redis... I suggest you ask in #redis, or check their documentation, to see if your server is running correctly
o_proxeneta has joined #ruby
ElitestFX has quit [Quit: Page closed]
o_proxeneta has quit [Remote host closed the connection]
<shevy> banisterfiend has some idealized imagination
<marwan_> ok, thanks very much
<shevy> like that the german language is funny in any way
<graspee> unglaublisch is a pretty funny word
<workmad3> yeah, me respectful?
<workmad3> maybe sarcastically...
<shevy> or that the british are polite and kind people
<JonnieCache> hes from the north man
<graspee> oops unglaublich
<shevy> well, with a heavy accent, unglaublisch could be ok. or for Hanmac :D
<workmad3> shevy: I guess it can be perceived and politeness and kindness if you can't detect sarcasm
ElitestFX has joined #ruby
<workmad3> *perceived as
sts has left #ruby [#ruby]
<shevy> workmad3 I always have to watch "a fish called wanda", all the scenes with Kevin Kline :D
marwan_ has quit [Quit: Page closed]
ghanima has joined #ruby
Armand has joined #ruby
Armand is now known as Guest86404
KazW_ has joined #ruby
<workmad3> shevy: it's been years since I saw that :)
Some-body_ has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
ddv has quit [Ping timeout: 245 seconds]
maesbn has quit [Ping timeout: 248 seconds]
<shevy> Otto: You know your problem? You don't like winners.
<shevy> Archie: Winners?
<shevy> Otto: Yeah. Winners.
punkrawkR has quit [Ping timeout: 244 seconds]
<shevy> Archie: Winners, like North Vietnam?
<shevy> Otto: Shut up. We didn't lose Vietnam. It was a tie!
ddv has joined #ruby
<shevy> Archie: I'm tellin' ya baby, they kicked your little ass there. Boy, they whooped yer hide REAL GOOD.
d3vic3 has quit [Ping timeout: 252 seconds]
KazW has quit [Ping timeout: 245 seconds]
KazW_ is now known as KazW
Apocalypse has quit [Ping timeout: 248 seconds]
DarthGandalf has quit [Ping timeout: 248 seconds]
maesbn has joined #ruby
Azure has quit [Ping timeout: 245 seconds]
d3vic3 has joined #ruby
maletor has joined #ruby
punkrawkR has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
v0n has joined #ruby
knightblader has joined #ruby
jimeh2 has joined #ruby
ElitestFX has quit [Ping timeout: 245 seconds]
jimeh has quit [Read error: Connection reset by peer]
ukwiz has left #ruby ["Leaving"]
Morkel has quit [Quit: Morkel]
shevy_test has joined #ruby
Ammar_iD has joined #ruby
tomb_ has quit [Ping timeout: 244 seconds]
mdw has quit [Read error: Connection reset by peer]
shevy_test has quit [Remote host closed the connection]
mdw has joined #ruby
JStoker has quit [Ping timeout: 244 seconds]
nuba has quit [Ping timeout: 252 seconds]
Ammar01 has quit [Ping timeout: 256 seconds]
tomb_ has joined #ruby
the_hack has joined #ruby
elliottcable has quit [Remote host closed the connection]
elliottcable has joined #ruby
SpitfireWP has quit [Read error: Connection reset by peer]
nuba has joined #ruby
mlue has quit [Ping timeout: 252 seconds]
rippa has joined #ruby
cpruitt has joined #ruby
relix has quit [Max SendQ exceeded]
mlue has joined #ruby
dekz has quit [Ping timeout: 252 seconds]
mlue has quit [Changing host]
mlue has joined #ruby
mdw has quit [Read error: Connection reset by peer]
jrist-brb has quit [Quit: o no u din't]
relix has joined #ruby
<shevy> anyone has an idea
<shevy> how to split up a .pdf file?
<shevy> I'll then add that to a ruby script
<ccooke> shevy: parse and then split up the parts?
tomb_ has quit [Client Quit]
<shevy> ccooke hmm yeah, if there is no other way... right now I am googling
<shevy> getting links to windows shareware programs :\
<ccooke> what's the need you're trying to fill?
carlyle has joined #ruby
albemuth has joined #ruby
tomb_ has joined #ruby
<shevy> ccooke I have a big pdf file and two pdf pages partially have some data, in a table format
test34- has joined #ruby
<ccooke> right?
<shevy> now I want to get only those two pages
dekz has joined #ruby
<shevy> dunno what I do after that, possibly want to display it on a webpage already, or extract the table somehow
fr0gprince_ has quit [Ping timeout: 252 seconds]
<shevy> ohhhhh
<shevy> poppler pdfseparate :)
<shevy> that should work
<ccooke> heh
JStoker has joined #ruby
blast_hardcheese has quit [Read error: Operation timed out]
test34 has quit [Ping timeout: 240 seconds]
jrajav has joined #ruby
Aristata has quit [Quit: Leaving.]
wvms has left #ruby [#ruby]
mdw has joined #ruby
jeebster has joined #ruby
apeiros_ has quit [Remote host closed the connection]
zz_chrismcg has quit [Ping timeout: 260 seconds]
Rizzle has quit [Ping timeout: 248 seconds]
Jck_true has quit [Read error: Connection reset by peer]
wangr has quit [Quit: No Ping reply in 180 seconds.]
wangr has joined #ruby
zomgbie has joined #ruby
SpitfireWP_ has joined #ruby
Squarepy has quit [Ping timeout: 260 seconds]
zz_chrismcg has joined #ruby
Limb_ has joined #ruby
macmartine has joined #ruby
lorandi has quit [Ping timeout: 265 seconds]
Squarepy has joined #ruby
mdw has quit [Ping timeout: 260 seconds]
CannedCorn has joined #ruby
Richmond has joined #ruby
Limb has quit [Ping timeout: 245 seconds]
Jck_true has joined #ruby
maesbn has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
maesbn has joined #ruby
jrist has joined #ruby
dominikh has quit [Ping timeout: 260 seconds]
mdw has joined #ruby
affix has quit [Ping timeout: 260 seconds]
dominikh has joined #ruby
lkba has joined #ruby
mdw_ has joined #ruby
davidcelis has quit [Quit: K-Lined]
maesbn has quit [Ping timeout: 240 seconds]
bbttxu has quit [Quit: bbttxu]
sspiff has quit [Remote host closed the connection]
mdw has quit [Ping timeout: 248 seconds]
mdw_ has quit [Read error: Connection reset by peer]
mdw has joined #ruby
affix has joined #ruby
otters has quit [Ping timeout: 252 seconds]
otters has joined #ruby
dr_bob has quit []
cousine has quit [Remote host closed the connection]
zomgbie has quit [Ping timeout: 256 seconds]
rmascarenhas has quit [Quit: leaving]
jprovazn is now known as jprovazn_away
ronniy has quit [Remote host closed the connection]
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
CheeToS has quit [Ping timeout: 244 seconds]
d3vic3 has quit [Ping timeout: 252 seconds]
MasterIdler has joined #ruby
test34- has quit [Ping timeout: 240 seconds]
<shevy> haskell guys are strange people
indian has quit [Ping timeout: 248 seconds]
<shevy> but they also seem to like haskell
<shevy> 905 people on haskell vs. 676 here hmmm
ipoval has joined #ruby
d3vic3 has joined #ruby
the_hack has quit [Remote host closed the connection]
blast_hardcheese has joined #ruby
maesbn has joined #ruby
skryking has joined #ruby
c0rn has joined #ruby
khakimov has joined #ruby
nricciar has quit [Read error: Operation timed out]
ipoval has quit [Client Quit]
nricciar has joined #ruby
<shevy> a guy just suggested "Connect to port 6697 using SSL."
<shevy> is this possible via ruby? for IRC connections.... hmmm
JohnBat26 has quit [Ping timeout: 245 seconds]
becom33 has quit [Quit: Leaving]
RubyPanther has quit [Ping timeout: 240 seconds]
carinishead has joined #ruby
<Sigma00> yes, definitely possible
* Sigma00 looks at his bot
ronniy has joined #ruby
albemuth has quit [Quit: Leaving...]
<shevy> ok good
<carinishead> quick question… see http://pastie.org/4002370 -- want to catch a special exception Mechanize::ResponseCodeError, check to see if it was a 404 (NetHTTP error), and if not, go ahead and pass it to the generic error delegation
albemuth has joined #ruby
affix has quit [Excess Flood]
senny has quit [Remote host closed the connection]
jprovazn_away has quit [Quit: Leaving]
<Sigma00> so... check it, then raise it if not
gilead has quit [Quit: Leaving]
stucorbishley has quit [Quit: stucorbishley]
<Sigma00> carinishead: rescue Mechanize::ResponseErrorCode => e
<carinishead> oops
<carinishead> yeah
<Sigma00> then: raise e unless e.response_code==404
affix has joined #ruby
tk___ has quit [Quit: ばいばい]
jrist is now known as jrist-afk
<carinishead> thats what i have
<carinishead> ahh
<carinishead> didn't copy/paste, and just rewrote haphazardly
<carinishead> nice
<carinishead> awesome
<carinishead> thanks
<shevy> ack
<Sigma00> ruby's pretty sweet, just got around to actually start learning it this weekend
carloslopes has quit [Ping timeout: 244 seconds]
<carinishead> i've been using it for years, but sometimes i have brain farts
<carinishead> haha
savage- has quit [Remote host closed the connection]
<Sigma00> happens to everyone :P
friskd has joined #ruby
carinishead has left #ruby [#ruby]
<Sigma00> I'm writing a bot as a learning exercise. So far I have a pretty robust unit conversion and math module. LOVE ruby's math handling <_<
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
d3vic3 has quit [Ping timeout: 260 seconds]
d3vic3 has joined #ruby
vaicine has joined #ruby
mattonrails has quit [Remote host closed the connection]
san00b has joined #ruby
thone_ has joined #ruby
Rubinista has quit [Ping timeout: 245 seconds]
piotr_ has joined #ruby
thecreators has quit [Remote host closed the connection]
Guest48957 is now known as fred
maletor has quit [Quit: Computer has gone to sleep.]
fred has quit [Changing host]
fred has joined #ruby
schovi has quit [Remote host closed the connection]
zomgbie has joined #ruby
thone has quit [Ping timeout: 250 seconds]
schovi has joined #ruby
ken_barber has joined #ruby
daniel_hinojosa has joined #ruby
dEPy has joined #ruby
RubyPanther has joined #ruby
heftig has quit [Quit: leaving]
tcopp has left #ruby [#ruby]
davidcelis has joined #ruby
rushed has joined #ruby
nu7hatch has joined #ruby
Araxia_ has joined #ruby
tcopp has joined #ruby
cpruitt has quit [Quit: cpruitt]
celm has quit [Quit: Leaving]
ananthakumaran1 has joined #ruby
palmfrond has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Ping timeout: 244 seconds]
cpruitt has joined #ruby
mikepack has joined #ruby
Rubinista has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
Helius has quit [Remote host closed the connection]
zeromodulus has quit [Remote host closed the connection]
<Rubinista> Does anyone know why I can't encode the ascii-8bit string "\xD1\x8E" into UTF-8? Everything (unicode character lists, etc) shows the character as being valid, and a natively UTF-8 Ruby prints that string as the proper unicode character.
hynkle has quit [Quit: hynkle]
brianpWins has joined #ruby
joast has joined #ruby
joast has quit [Client Quit]
tvw has quit [Remote host closed the connection]
friskd has quit [Quit: friskd]
JeanMertz has quit [Quit: JeanMertz]
<Hanmac> Rubinista: "\xD1\x8E".force_encoding("UTF-8") #> "ю"
nu7hatch has left #ruby [#ruby]
ephemerian has quit [Quit: Leaving.]
jenglish has quit [Remote host closed the connection]
<Rubinista> Hanmac: Yeah, when I force encode it, it works. But when I try .encode('UTF-8') it refuses.
<Hanmac> i think because it was not valid at the monent, thats why you need the FORCE :P
<Sigma00> I see that. ISO-8859-1 -> UTF-8 shows me "Ñ\u008E" unless I force it
eywu has joined #ruby
<Sigma00> us-ascii just dies :P
joast has joined #ruby
consti has joined #ruby
consti has quit [Changing host]
consti has joined #ruby
TheHunter_1039 has joined #ruby
carloslopes has joined #ruby
rakm_ is now known as rakm
luxurymode has joined #ruby
Azure|dc has joined #ruby
Azure|dc has quit [Changing host]
Azure|dc has joined #ruby
savage- has joined #ruby
schovi has quit [Remote host closed the connection]
Azure|dc is now known as Azure
Azure has quit [Client Quit]
voodoofish430 has joined #ruby
Azure has joined #ruby
zomgbie has quit [Read error: Connection reset by peer]
arooni-mobile has joined #ruby
<Rubinista> Hanmac: Sigma00: That's not a "bad" to do? I was under the impression that could cause problems because you can end up with invalid UTF-8...
* Sigma00 shrugs
<Sigma00> I'm a newbie
<Rubinista> heh
<Hanmac> where did your string comes from? is your string in a rb file?
runeb has quit [Quit: runeb]
QKO has quit [Ping timeout: 245 seconds]
icooba has quit [Quit: icooba]
tchebb has quit [Read error: Connection reset by peer]
icooba has joined #ruby
tchebb has joined #ruby
<Rubinista> Hanmac: A non-ruby file that's not under my control (I can't add an #encoding header) via HTTP.
zodiak has joined #ruby
QKO has joined #ruby
schovi has joined #ruby
bier has quit [Read error: Operation timed out]
thecreators has joined #ruby
jrist-afk is now known as jrist
nirakara has quit [Quit: This computer has gone to sleep]
EvanR_ is now known as EvanR
EvanR has quit [Changing host]
EvanR has joined #ruby
artOfWar has joined #ruby
billiamii has joined #ruby
neersighted|AFK is now known as neersighted
fayimora has quit [Quit: Be back in a gifii]
gabrtv- has quit [Ping timeout: 246 seconds]
gabrtv has joined #ruby
strnx has quit [Excess Flood]
lorandi has joined #ruby
bricker88 has joined #ruby
adeponte has joined #ruby
palmfrond has joined #ruby
<workmad3> Rubinista: so you're reading it in with a file IO operation?
<workmad3> Rubinista: or a net/http operation maybe? :)
bier has joined #ruby
strnx has joined #ruby
ghanima has quit [Quit: Leaving.]
indian has joined #ruby
indian has joined #ruby
indian has quit [Changing host]
consti has quit [Quit: Computer has gone to sleep.]
davidw has quit [Ping timeout: 251 seconds]
nowthatsamatt has joined #ruby
nowthatsamatt has left #ruby [#ruby]
thoolihan has joined #ruby
JohnBat26 has joined #ruby
hynkle has joined #ruby
consti has joined #ruby
bigoldrock has joined #ruby
jgrevich has joined #ruby
Urth|Away is now known as Urthwhyte
consti has quit [Client Quit]
beneggett has joined #ruby
choffstein has quit [Remote host closed the connection]
carloslopes has quit [Quit: Leaving]
<Rubinista> workmad3: Yeah, Net::HTTP...
mvangala has quit [Remote host closed the connection]
carloslopes has joined #ruby
apok has joined #ruby
kenichi has joined #ruby
dv310p3r has quit [Ping timeout: 246 seconds]
mvangala has joined #ruby
dv310p3r has joined #ruby
<burgestrand> Rubinista: force_encoding just sets the internal encoding, while encode actually tries to convert the characters from the character set ruby originally thought the string was in, to the target character set. If the strings contains characters that are invalid in the old character set, that won’t really work.
mvangala has quit [Remote host closed the connection]
BiHi has quit [Quit: Computer has gone to sleep]
<burgestrand> Rubinista: so if your string is actually UTF-8, it should be alright to force it. You could always try to set the encoding on the place you’re reading it from (for example, if using open-uri you could pass :encoding => "UTF-8" I believe)
Ammar_iD has quit [Quit: Leaving]
<Sigma00> awesome explanation
mvangala has joined #ruby
mvangala has quit [Remote host closed the connection]
chrisleework has joined #ruby
quesada has quit [Ping timeout: 246 seconds]
froy has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
d3c has joined #ruby
mvangala has joined #ruby
<Rubinista> burgestrand: Thanks for the :encoding => tip. What I had been doing was force_encoding and checking for valid_encoding, then using encode from scratch if that worked.
TheFuzzball has joined #ruby
Criztian has quit [Remote host closed the connection]
mdw has quit [Remote host closed the connection]
seivan has joined #ruby
robdodson has joined #ruby
<burgestrand> Rubinista: unfortunately, if you try to string.force_encoding("UTF-8").encode("UTF-8") that won’t work, since .encode is a no-op if the target encoding is the current encoding. I don’t know of any good way of cleaning up a ruby string without changing it’s encoding.
robdodson has left #ruby [#ruby]
mvangala has quit [Remote host closed the connection]
<burgestrand> It’s funny, because you can .encode from some random encoding to any target encoding and specify that invalid characters should be ignored (or replaced by some specified character), but you can’t take a string in a known encoding and replace all invalid characters.
cdempsey has joined #ruby
robdodson has joined #ruby
maletor has joined #ruby
<Rubinista> burgestrand: I had str.encode('utf-8') if str.dup.force_encoding('utf-8').valid_encoding?
voodoofish430 has quit [Ping timeout: 248 seconds]
voodoofish430 has joined #ruby
hadees has quit [Quit: hadees]
mdw has joined #ruby
mattonrails has joined #ruby
flak has joined #ruby
<burgestrand> Rubinista: that will crash if the string itself is not in a valid encoding. Say if Ruby thinks it is ISO-8859-1, while it is in fact UTF-8 and contains multibyte characters that are invalid in ISO-8859-1.
twqla has joined #ruby
C0deMaver1ck is now known as C0de|Dead
flak is now known as Guest15135
<burgestrand> Rubinista: you most likely want str.force_encoding('UTF-8') if str.dup.force_encoding('UTF-8').valid_encoding?
Some-body_ is now known as DarthGandalf
DarthGandalf has quit [Changing host]
DarthGandalf has joined #ruby
mvangala has joined #ruby
<burgestrand> But even then I’ve had cases of invalid UTF-8 returning true on valid_encoding?, while other ruby methods crashed on it.
blacktulip has joined #ruby
rippa has quit [Ping timeout: 256 seconds]
imami|afk is now known as banseljaj
<burgestrand> Your best option by far is knowing what encoding the string is in. All other options are likely to cause errors, crash or just give you weird characters when using the string.
mdw has quit [Remote host closed the connection]
<Rubinista> burgestrand: Now I'm doing str.encode('UTF-8') ; rescue SomeEncodingError ; str.force_encoding('UTF-8')
<burgestrand> Rubinista: I suppose that’s a little better :p
<burgestrand> But when it comes to encodings you either know your encoding or you’ll inevitably cry.
rmascarenhas has joined #ruby
<Rubinista> Yeah, I don't quite want to just set :encoding => 'UTF-8' on the HTTP connection because some of the files are executables and thus not any encoding except that they're ASCII-8BIT compatible.
C0de|Dead is now known as C0deMaver1ck
moosya has quit [Quit: moosya]
<Rubinista> And yes, tears have been shed.
<burgestrand> :)
Guest15135 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby
<burgestrand> ASCII-8BIT essentially means no encoding. Array of bytes. Like ruby 1.8!
itnomad has joined #ruby
yonggu_ has joined #ruby
robacarp has joined #ruby
<burgestrand> (and is the correct encoding for any kind of so-called binary data, like images, movies, executables, hippos)
maletor has quit [Quit: Computer has gone to sleep.]
stockholm has quit [Remote host closed the connection]
stockholm has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
red-panda has quit [Ping timeout: 252 seconds]
tewecske has quit [Ping timeout: 252 seconds]
adamkittelson has joined #ruby
williamcotton has joined #ruby
<eam> what's the right way to do %x{} without invoking a shell?
zeromodulus has joined #ruby
hadees has joined #ruby
yonggu has quit [Ping timeout: 245 seconds]
snearch has joined #ruby
<shevy> eam not sure this is possible
<eam> I'd imagine it should have a way to do this, ala Kernel.system [], *
<robacarp> eam: what is your goal?
<eam> robacarp: avoid a shell
<robacarp> eam: do you want to write a program that draws an elephant or ?
<eam> robacarp: it's best practices
<theRoUS> when using OptionParser, how can i pass a context in to a switch handler?
<eam> Sigma00: hm, odd that it's not available via backtick syntax
zeromodulus has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
CannedCorn has quit [Quit: Computer has gone to sleep.]
CannedCorn has joined #ruby
mdw has joined #ruby
<Sigma00> dunno, I like that syntax
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
moosya has joined #ruby
Squarepy has quit [Quit: Leaving]
<shevy> heeh
itnomad has quit [Quit: Leaving]
<shevy> man
<shevy> robacarp, I want a program that draws an elephant
<eam> Sigma00: it's a bit awkward for quick shellout/capture
matt1s has joined #ruby
<shevy> popen is so verbose it makes java look elegant
wallerdev has joined #ruby
<banisterfiend> eam: so why do u want to prevent %x{} from running a shell?
<shevy> whoa.... IO.popen(%wsed -e s|^|<foo>| -e s&$&;zot;&", "r+") {|f|
<robacarp> shevy: if you write a program that draws an elephant and you write it in syntax that looks like an elephant, I will give you $5.
noganex has quit [Ping timeout: 252 seconds]
<shevy> robacarp: hehe
<eam> banisterfiend: the same reason one would want to use bind parameters in a sql call
<robacarp> eam: I still have NO idea what you are trying to accomplish, but have you looked at using a PTY?
<banisterfiend> eam: can you explain a bit further please
<eam> banisterfiend: because otherwise you're reduced to quoting arguments, which runs the risk of being imperfect depending on the input data
noganex has joined #ruby
cha1tanya has quit [Quit: Leaving]
<eam> banisterfiend: you're familiar with bind parameters in sql and the related best practices? The same thing applies to executing programs
<banisterfiend> eam: so why not just ignore %x{} altogether? or are you trying to create some kind of sandbox
<eam> banisterfiend: I'm just writing some assorted junk, and was wondering if I needed to write my own version of backticks or if ruby had a way to do this
cj3kim has joined #ruby
<eam> and it appears I'll just write my own thing
d3vic3 has quit [Ping timeout: 250 seconds]
petercs has quit [Quit: Leaving.]
<shevy> you could fit 9 rubies into that
<robacarp> shevy: you haskell?
d3vic3 has joined #ruby
Urthwhyte is now known as Urth|Away
<shevy> robacarp dunno... I am a bit bored...
<shevy> perhaps I will find a "Aha!" moment
tomb_ has joined #ruby
lorandi has quit [Quit: Leaving]
lorandi has joined #ruby
<eam> hm, if I want to define a new %a{} letter, for example %X{}, how would I do that?
<eam> I don't want to redefine `() directly
tomb_ has quit [Client Quit]
sepp2k has joined #ruby
<banisterfiend> eam: you cant
<robacarp> eam: you're about to shave a yak that needs no shaving.
<eam> that's a shame
<eam> robacarp: honestly if you don't understand why bypassing a shell is important ...
<robacarp> go on
mattonrails has quit [Remote host closed the connection]
nfluxx has joined #ruby
<eam> robacarp: then I'm not sure why you think you're qualified to weigh in?
chmac has joined #ruby
mdw has quit [Remote host closed the connection]
lorandi has quit [Client Quit]
ramblex_ has joined #ruby
ramblex_ has quit [Client Quit]
<chmac> In erb <%= proccessorcount * 4 => is output twice the (presumably string) value of processorcount instead of the result of the calculation 2 * 2 = 4. Any idea what the correct syntax is?
lorandi has joined #ruby
Asher has quit [Ping timeout: 252 seconds]
joast has quit [Quit: Leaving.]
ramblex has quit [Ping timeout: 240 seconds]
sepp2k has quit [Ping timeout: 246 seconds]
<Sigma00> turn it into a float?
<shevy> turn it into a bear!
<robacarp> chmac: you probably want .to_i or .to_f
<Sigma00> no wait, you said processor count
<Sigma00> int
mikeg has joined #ruby
test34 has quit [Quit: left]
<chmac> Ok, so probably processorcount.to_i, I'll try that, thanks a lot
<chmac> Bingo, works, thanks a lot
geekbri has quit [Remote host closed the connection]
chico_chicote has joined #ruby
<chico_chicote> anyone here has experience using the docsplit gem?
<chico_chicote> i'm getting a 'could not load document' everytime i try to use it
roolo has quit [Ping timeout: 245 seconds]
tomb_ has joined #ruby
kirun has joined #ruby
zommi has quit [Remote host closed the connection]
matt1s has quit [Quit: Bye!]
alexim has joined #ruby
<eam> banisterfiend: hm yeah, rather than hack this into parse.y it seems easier to provide a standalone module
<ged> eam: output = IO.open('|-') or exec( *cmd )
<eam> bummer that % is so unapproachable
recursive has joined #ruby
<eam> ged: yeah I can write my own backtick() easily
<eam> I was just hoping for a bit more sexy syntax
pk1001100011 has quit [Remote host closed the connection]
<recursive> im deploying a ruby app and have no need, to my knowledge, to use rvm as it is a one app server, anyhow, im on freebsd and the port is named ruby19, which ruby doesnt exist but ruby19 does. so, if i am to use gems, is there a way to let gem know that it should be using the ruby19 binary?
<chiel> anyone here using jekyll? i tried poking the #jekyll channel, but it's rather silent in there
Liothen has joined #ruby
test34 has joined #ruby
<shevy> recursive can you upload what "gem env" outputs
<ged> Hmmm... I guess it only works with Kernel.open now.
test34 has quit [Client Quit]
akem has quit [Read error: Connection timed out]
<shevy> recursive in general though, gem makes use of rbconfig, and rbconfig is set at compile-time, so it is hard to change it afterwards
akem has joined #ruby
<shevy> also, do you have an alias "ruby" -> "ruby19"?
alienvenom has quit [Ping timeout: 250 seconds]
<shevy> recursive waaaaake uuuuuuup
<shevy> :(
<shevy> are freebsd users always so slow :P
banseljaj is now known as imami|afk
pu22l3r has joined #ruby
artOfWar_ has joined #ruby
GhettoCode has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
<davidcelis> shevy: yes
gabrtv has quit [Ping timeout: 252 seconds]
<Sigma00> a symlink would be more robust than an alias
<davidcelis> agreed, just symlink it
<shevy> he'll do so ...
<shevy> ... in 5 years from now on!
alienvenom has joined #ruby
Eldariof59-ru has joined #ruby
<Sigma00> he's recursively reading our messages
icooba has quit [Quit: icooba]
<Sigma00> should crash as soon as he runs out of stack
tatsuya_o has quit [Ping timeout: 252 seconds]
heftig has joined #ruby
* Sigma00 sits and waits
<davidcelis> any minute now http://i.imgur.com/tyViD.gif
gabrtv has joined #ruby
kevinbond has quit [Quit: kevinbond]
indian has quit [Quit: Leaving]
SpitfireWP_ is now known as SpitfireWP
ctwiz has joined #ruby
fserb has quit [Quit: Gone]
voodoofish430 has left #ruby [#ruby]
yannis has joined #ruby
d3c has quit [Quit: Quit]
rramsden has joined #ruby
wallerdev has quit [Quit: wallerdev]
walbert has joined #ruby
Poapfel has joined #ruby
twock has quit [Quit: Lost terminal]
zomgbie has joined #ruby
eggie5 has joined #ruby
robdodson has quit [Quit: robdodson]
rushed has quit [Quit: rushed]
<recursive> shevy: sorry, was in a motorcycle wreck, cant get aronud well and needed to eat
<recursive> shevy: im installing gem now
ThatDudeGuy_ has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ramblex has joined #ruby
<shevy> hmm
<shevy> that is actually non standard
<shevy> ruby comes bundled with gem in the 1.9.x series
<recursive> hrm
<shevy> who knows what else they split out
<recursive> let me see what binaries the ports installed
<shevy> debian does that too
<shevy> anyway, once you have gem installed, can you upload what "gem env" says
zeromodulus has joined #ruby
rushed has joined #ruby
alltechtalk has joined #ruby
<alltechtalk> hi guys
<recursive> sure thing
allanm has quit [Ping timeout: 252 seconds]
<alltechtalk> I am trying to recruited some computer savvy peoples to my new site. The site is ~2 months old, with 257 users, 5120 posts in 547 threads. Would anyone care to join?
ananthakumaran1 has quit [Quit: Leaving.]
snearch has quit [Quit: Verlassend]
ghanima has joined #ruby
Solnse has joined #ruby
elux has quit [Quit: Leaving...]
voodoofish430 has joined #ruby
<graspee> what's it about
fr0gprince_ has joined #ruby
amscotti has joined #ruby
fserb has joined #ruby
amscotti has quit [Remote host closed the connection]
<eggie5> i have a code library that i'd like to package up into a gem - what's an easy way to do this?
allanm has joined #ruby
elux has joined #ruby
Asher has joined #ruby
<recursive> shevy: well it looks like the gem binary was not installed, so ill see how to install it using ports then
<alltechtalk> my site is all about technology
<alltechtalk> we talk about coding
<alltechtalk> to somple troubleshooting
<alltechtalk> simple*
yonggu_ has left #ruby [#ruby]
<graspee> does it have advertising on it
<alltechtalk> no
<alltechtalk> 0
<alltechtalk> i hate ads
<graspee> i see
<shevy> is it about ruby
<alltechtalk> it is about technology in general
<alltechtalk> and we have a coding section
<alltechtalk> i can make a ruby area for you guys
<Hanmac> what kind of tech? mecha's? XD
<rippa> techas
<davidcelis> TODO: program a pilotable mecha in Ruby
<rippa> I want mechs from Battletech
<alltechtalk> want the link to check it out for yourself?
<rippa> madcat
<shevy> rubycat
<shevy> ruby TITAN
<graspee> ruby weapon from final fantasy 7
<davidcelis> xenogears
<alltechtalk> so anyone wants to give us a try, we are an active community that is fun to be around
bbttxu has joined #ruby
<Hanmac> mechas from evangelion? :P
<alltechtalk> i am willing to make a ruby section for you guys
<davidcelis> Hanmac: no way dude, that shit is alive
<rippa> in evangelion they are not so much mechs
<alltechtalk> and we have a shoutbox for you guys to chat with others
<rippa> as cyborgs
<alltechtalk> an arcade to have fun
<graspee> it just seems odd to me that you would come here to try to recruit people
<alltechtalk> i want tech people
<alltechtalk> i want to increase our programming section
<graspee> the thing is
<shevy> alltechtalk, graspee is epic
<alltechtalk> i figure where better than a place like this
<shevy> he even is on bash.org
<graspee> you are telling us you have a shoutbox
mdw has joined #ruby
<graspee> that we can use to talk to people
<Hanmac> rippa: do you know moja from Farscape?
<graspee> but here we are on irc talking to people with arguably a better chat system
<rippa> Hanmac: no
<graspee> and the people we are talking to are discussing ruby
<alltechtalk> well we have a chatbox that brings the site and irc inro 1
<graspee> you are asking us to move to an arguably worse chat system where we don't know anyone
<alltechtalk> and we have an awesome point system
<graspee> and they aren't discussing ruby
<alltechtalk> i am asking for help
<alltechtalk> i want to bring all type of coders to my site
<alltechtalk> all i ask is that you give us a shot
<shevy> but coders from language A often dont like coders from language B
<jrajav> Damn, why am I wasting my time making useful, neat apps
<jrajav> I
<jrajav> could be earning points
<jrajav> on some random site
heda has joined #ruby
<graspee> it just sounds like are harvesting souls or something
<shevy> hahaha
<davidcelis> jrajav: reddit
<billiamii> jrajav, why bother earning them when you can buy them directly?
elux has quit [Quit: Bye!]
<alltechtalk> true, but we have other things. I already have a stron iOS userbase who can talk hacks... and i have a master list of hacks typed up... now i want to expand to other OS and other lanf
<heda> hi all, have a quick question that maybe i'm missing the obvious on. why can't i overload the shovel operator to take two params such that def <<(x, y) and i could then call a << b,c ?
<alltechtalk> lang
<jrajav> TBH stackoverflow and co. have kind of deprecated most other programming communities
<jrajav> For me at least
<graspee> hacks in which sense
<davidcelis> heda: what error do you get?
dipnlik_ has joined #ruby
<heda> davidcelis: syntax error expending keyword_end
dipnlik_ has quit [Client Quit]
<heda> s/expending/expecting
jhowarth_ has joined #ruby
seivan has left #ruby [#ruby]
jhowarth_ is now known as jhowarth
<alltechtalk> what about a community where you guys can have fun and talk about technology in general... no strict mods, arcade section, shoutbox, support line, tutorial driven blog
<davidcelis> heda: I couldn't do it either. Damn.
<alltechtalk> a place where we listen to our users
crankycoder has quit [Remote host closed the connection]
DRCALKIN has joined #ruby
<heda> davidcelis: i even tried it with a <<(b,c)
<davidcelis> heda: Same
<graspee> alltechtalk: you sound so desperate to get us there that i'm scared off. i had the same problem when i tried to pick up girls when i was 17
<heda> davidcelis: i'm sure theres a good reason but i can't think of it just now
<billiamii> graspee, did you have a shoutbox at the time?
<jrajav> It sounds like some creepy real-life "hacker" RPG
<jrajav> Like 4chan for people who wish they were programmers instead of furries
<heda> davidcelis: weirdly a.<<(b,c) seems to work fine
<alltechtalk> weHow about I give you guys a the link and you guys can choose to give us a short or not... http://alltechtalk.net/forum
<davidcelis> heda: Interesting. It does.
andrew__ has joined #ruby
<davidcelis> heda: My only guess is becuase << is also an operator
<davidcelis> when you override it, you probably have to call it like a method
binaryplease has joined #ruby
kvirani has joined #ruby
alltechtalk has quit [Ping timeout: 245 seconds]
dankest has joined #ruby
<heda> davidcelis: i'm overloading the operator though, i should just be able to call it straight
<davidcelis> you're overloading the method
<davidcelis> << is special
<heda> davidcelis: it's a method just like any other http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-3C-3C
cbuxton has quit [Quit: Leaving.]
<heda> davidcelis: the only operators you can't overload are the logical && and ||, etc
cbuxton has joined #ruby
cj3kim has quit [Quit: Leaving]
<davidcelis> heda: i'm not saying it makes sense, bro; it's just my guess. << combined with certain keywords (e.g. class) changes its meaning
<davidcelis> Ruby likely has a strange way of parsing <<
<davidcelis> i mean, it clearly does; calling it as a method directly on the array works. using it more as an operator fails. there is a parsing disparity
<heda> davidcelis: if you create an overload accepting only 1 param it seems to work fine
ananthakumaran has joined #ruby
<davidcelis> sure; the operator is initially expected to receive one param
<davidcelis> in all cases
dv_ has joined #ruby
geekbri has joined #ruby
ananthakumaran has quit [Client Quit]
<jrajav> Are you defining the overload like (arg1, arg2) or like (*args)?
<davidcelis> jrajav: I tried the overload with *args
<davidcelis> jrajav: `ary.<< 1, 2, 3`
ChampS666 has joined #ruby
<davidcelis> that works; without the dot does not
straind has quit [Ping timeout: 256 seconds]
dv_ has quit [Client Quit]
<heda> davidcelis: guess i'll have to just pass it an array instead
o_proxeneta has joined #ruby
dv_ has joined #ruby
zodiak has quit [Remote host closed the connection]
ph^ has joined #ruby
cmarques has joined #ruby
dv_ has quit [Read error: Connection reset by peer]
Khyron320 has joined #ruby
ezra_ is now known as ezra
<Khyron320> is any1 here familiar with simple-graphite?
ezra has quit [Changing host]
ezra has joined #ruby
pawdro has joined #ruby
pawdro has quit [Client Quit]
pk1001100011 has joined #ruby
zinjacoder has joined #ruby
andrew__ has quit []
andrewhl has joined #ruby
DRCALKIN has quit [Quit: Leaving]
artOfWar_ has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
ctwiz has quit [Quit: ctwiz]
rramsden has quit [Quit: Lost terminal]
pdtpatrick has joined #ruby
helas has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
joast has joined #ruby
cbuxton has quit [Quit: Leaving.]
o_proxeneta has quit [Remote host closed the connection]
Occult has joined #ruby
zx has joined #ruby
tomb_ has quit [Ping timeout: 246 seconds]
dv310p3r has quit [Ping timeout: 246 seconds]
azm has quit [Ping timeout: 244 seconds]
tomb_ has joined #ruby
crankycoder has joined #ruby
<dEPy> any1 know rails? I need to figure out how to include my decoupled domain model in rails and plug active record in without domain knowing about it
<robacarp> dEPy: try #rubyonrails
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<dEPy> people there dont seem to respond to my idea :)
zx has quit [Ping timeout: 240 seconds]
<dEPy> either they hate it because it's not the "rails" way or noone knows how OR noone is online ... O_ô
tvw has joined #ruby
<dEPy> oh , i was on #rails :S
<robacarp> yea, #rails is mostly dead
<graspee> q
<graspee> oops
ph^ has quit [Remote host closed the connection]
arooni-mobile has quit [Quit: Leaving]
<Hanmac> it will be funny when debian drop the ruby1.8 support and all the old rails apps does not work anymore :P
cbuxton has joined #ruby
<dEPy> well, noone takes me seriously :)
<carloslopes> Hanmac: Hanmac and his hate of rails :)
mneorr has joined #ruby
<carloslopes> but it i agree hahaha it will be funny :P
<robacarp> dEPy: okay, so what is a decoupled domain model? do you mean your ICANN domain?
<carloslopes> but i agree*
<robacarp> feel free to link me an article while I try and understand so I can sort out if I can answer your question or not... :-)
<dEPy> robacarp I want my domain model to ne independent of the frameworks and databases
zx has joined #ruby
<dEPy> I have something like DDD in mind actually...
gvz has joined #ruby
artOfWar has joined #ruby
<graspee> diablo double d
<graspee> like diablo crossed with dead or alive
<robacarp> dEPy: as in Domain Driven Design?
<dEPy> yes
<shevy> ??????
wilmoore has joined #ruby
<robacarp> I see. I don't think you can decouple the domain from the rest of the application...but I'm still not quite sure what you're after.
<dEPy> for example, i have users and tasks
<dEPy> I can without doubt model the domain by implementing business rules in plain ruby
dv310p3r has joined #ruby
azm has quit [Ping timeout: 245 seconds]
<dEPy> for example: tasks have 3 states, task can be started only of not started already, user can start a task is it has no task active, ...
jimmy__ has joined #ruby
<dEPy> this has nothing to do with frameworks or databases
artOfWar_ has joined #ruby
<dEPy> then, when I have those working I want to include them in rails
<robacarp> Yea, I see what you're after. I'm not sure any facility exists to provide this level of rule abstraction...I don't *know* but I haven't seen it anywhere.
<dEPy> I strongly believe that domain object should not know anything about the persistence or delivery mechanism (web)
lopin has quit [Ping timeout: 244 seconds]
<robacarp> yea.
francisfish has quit [Remote host closed the connection]
artOfWar has quit [Read error: Connection reset by peer]
<dEPy> I have seen few example for this in rails but most if not all ( i don't remember) use data mapper pattern instead of active record
cdempsey has quit [Quit: Quitting!]
<robacarp> If you're really after dividing out the domain controls you could probably just write an intermediary layer to sit between your models and your controllers, I suppose.
<robacarp> personally, I put all the domain logic into my models.
<dEPy> I was thinking about that yes
zx has quit [Ping timeout: 252 seconds]
<robacarp> I mostly follow the fat-model pattern.
<dEPy> yes, most of the people do
<robacarp> I really don't think you'll have an easy time making an additional layer to run your domain logic though...
<dEPy> I don't know... I hope it won't be too hard
jimmy__ has quit [Read error: Connection reset by peer]
bambanx has joined #ruby
<bambanx> hi
<graspee> hi
<robacarp> is there a specific reason you're after this specific division?
<dEPy> my other good reason for this that I can test domain seperately, so I don't have to start up rails everytime I run domain tests
<bambanx> guys i have a big program only in my head , anyone can recommend me a good tool for programming? maybe some visual stuff for diagram ...
<robacarp> dEPy: for that specific concern you might look into a persistence layer for your test suite, like spork
<robacarp> bambanx: I hear ruby is a good tool for programming...
<dEPy> i heard of spork yes, haven't had time to test it
<dEPy> bambanx paper and pencil :)
<dEPy> best tools
<bambanx> i dont have papel here and pencil
mucker has joined #ruby
akem has quit [Read error: Connection reset by peer]
<graspee> vim
<Industrial> Gliffy UML ?
<graspee> someone made me learn uml once
Tricks has joined #ruby
<graspee> i drowned them in a lake
<bambanx> graspee, what u mean?
<bambanx> uml suck?
Eldariof59-ru has quit []
schovi has quit [Remote host closed the connection]
<Industrial> bambanx: if you don't know UML, a tool for UML drawing is of no use to you.
<graspee> i wouldn't pass such an objective judgement. let's just say it's not for me
<robacarp> I've never gained anything from UML.
<Industrial> try doing some refactors from the UML into the code, not first in the code, then the UML :P
<bambanx> ok i get any softwarre for draw and there i write my lines
<Industrial> look at it and decide you can improve here or there, read The Gang Of Four, etc :)
<bambanx> guys anyone is usin here ruby with some non blocking server?
RudyValencia- is now known as RudyValencia
<Tricks> In Ruby is there a way to get a substring from a certain point of a string to the end of it? string[5..END] <-- how would you do that? I know I could get the length of the string and do it that way, but I'm wondering if there is a more conside method.
<Industrial> I've been looking at that, trying to decide if I like Celluloid or to go with plain EventMachine and fibers
Rubinista has quit [Ping timeout: 245 seconds]
<Tricks> concise*
<Industrial> Tricks: does [5..-1] work?
<Tricks> Yes it does
<bambanx> Industrial can i convo u for talk some about offtopic things?
<Tricks> Thank you.
<bambanx> i mean not ruby wthings
<Industrial> bambanx: sure /q me
<banisterfiend> anyone here know of 'jenkins' ?
pip has joined #ruby
graspee has quit [Quit: leaving]
imami|afk is now known as banseljaj
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<pip> Since when have we got so many folks here?
ronniy has quit [Remote host closed the connection]
bbttxu has quit [Quit: bbttxu]
Tricks has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
<banisterfiend> pip: since we could hear the womb opening and the dark run over the ghost and the dropped son behind the wall thin as a wren's bone?
helas has quit [Ping timeout: 245 seconds]
Jackneill has quit [Read error: Connection reset by peer]
<pip> banisterfiend, I have never seen a human's English this good except it's a bot
<pip> Seriously, I wish someday Ruby or some Dynamic language will take over this world
dnyy has joined #ruby
<bigoldrock> does anyone know how to insert a mysql result object?
<bigoldrock> meant, please help me ... ;)
<bperry> I am persisting a hash via activerecord, and previously the hash was stored in plaintext (key and value)
<bperry> however, something has changed and the key is now being persisted in base64 encoding
<bperry> | :body: !ruby/hash:ActiveSupport::HashWithIndifferentAccess+
<bperry> | !binary "QXNzZXRfVGFnXw==": fdsa +
<bperry> has anyone seen behaviour lik ethis?
<bperry> nothing has changed in regards to the way we are persisting the hash
<bperry> but it is now storing the key base64 encoded rather than in plain text
jimeh2 has quit [Quit: bye]
<bperry> the value is obviously still plaintext
nanderoo has quit [Quit: Leaving.]
walbert has quit []
schovi has joined #ruby
ctwiz has joined #ruby
blischalk has joined #ruby
Sliker has joined #ruby
<robacarp> bperry: what are you putting in the hash?
<bperry> "Asset_Tag_" => "fdsa"
<bperry> if you decode the key, you get Asset_Tag_
saschagehlich has quit [Quit: saschagehlich]
<bperry> but it is being persisted into a base64 encoded form and I have no idea where it is doing this
<bperry> it is very bizarre
<Sigma00> have you updated /40
<Sigma00> whoops
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bperry> the weird thing is that it is just the keys of the hash
<bperry> not the values
ThatDudeGuy_ has quit [Quit: ThatDudeGuy_]
bbttxu has joined #ruby
xaq has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 245 seconds]
mdw has quit [Remote host closed the connection]
davidw has joined #ruby
joch_n has joined #ruby
davidw is now known as Guest9411
ssmoot has joined #ruby
joch_n has quit [Client Quit]
<ssmoot> Does anyone know how to reset MiniTest::Spec so that I could use Watchr to load() the spec file on change and reexecute the specs?
JohnBat26 has quit [Ping timeout: 246 seconds]
joch_n has joined #ruby
lorandi has quit [Quit: Leaving]
Koshian_____ has quit [Read error: Connection reset by peer]
<ssmoot> I've tried MiniTest::Spec::reset, but it seems to be holding onto old it() { } blocks because even though the line-numbers in the file might change, the report for a failing spec doesn't reflect it and if a spec fails I can't get it to pass without restarting the process.
maesbn has quit [Remote host closed the connection]
fr0gprince_ has quit [Ping timeout: 260 seconds]
Boohbah has joined #ruby
<ssmoot> I've tried MiniTest::Spec::reset, MiniTest::Spec.instance_variable_get(:@children).clear and MiniTest::Spec::nuke_test_methods! but none of those seem to clear the failing specs.
fr0gprince_ has joined #ruby
ph^ has joined #ruby
jenrzzz-mac has joined #ruby
cableray has joined #ruby
compara20 has joined #ruby
<CannedCorn> hey guys
azm has quit [Ping timeout: 245 seconds]
<carloslopes> ssmoot: i have some scripts for reexecute rspec specs with watchr, and i did them using system calls through ruby `` or system()
DRCALKIN has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<carloslopes> ssmoot: i don't know if this is the best choice, but works here :)
<ssmoot> carloslopes: Yeah, I can get the same to work easily enough: https://github.com/sam/harbor-ftp/blob/master/test/watch.rb But I'm trying to work around that since I'm using JRuby and want to avoid the startup time.
fmcgeough has quit [Quit: fmcgeough]
stephenjudkins has quit [Quit: stephenjudkins]
joch_n has quit [Quit: Linkinus - http://linkinus.com]
fr0gprince_ has quit [Ping timeout: 240 seconds]
<carloslopes> ssmoot: hmm i understand :/
<ssmoot> carloslopes: It feels like I'm close: https://github.com/sam/harbor-ftp/blob/continuous-testing/test/watch.rb But MiniTest is still hanging onto old tests (and class references used in those tests) somewhere. The class references are a problem since even if I remove_const and reload the original source file, the spec is hanging onto the old version of the class. So I can't make that test pass.
sayem has joined #ruby
<ssmoot> On the plus side I can add new tests. And running tests is instantaneous this way. If only I could figure out how to clean up the old specs. :(
artOfWar_ has quit [Ping timeout: 240 seconds]
banseljaj is now known as vanseljaj
jenrzzz-mac has quit [Quit: jenrzzz-mac]
ph^ has quit [Remote host closed the connection]
xaq has joined #ruby
Guest9411 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
yoklov has joined #ruby
<carloslopes> ssmoot: hmm yes.. i think that those dynamic changes are causing the problem
artOfWar has joined #ruby
ThatDudeGuy_ has joined #ruby
<carloslopes> ssmoot: my case here is much more simple.. i only set the watchers rules and inside each i call result = `rspec spec/controllers/ --format progress`
<carloslopes> ssmoot: and with the result variable, i check if it fails or not
khakimov has quit [Quit: Computer has gone to sleep.]
<ssmoot> carloslopes: Yeah. I've done that, but then I have to wait a good 10s or so for the new JRuby process to start before the test actually runs. :/
v0n has quit [Remote host closed the connection]
daed has quit [Ping timeout: 240 seconds]
<carloslopes> ssmoot: :(
v0n has joined #ruby
stephenjudkins has joined #ruby
<Sou|cutter> not sure what ties that to rspec
<Sou|cutter> haven't looked real closely
<Sou|cutter> kinda sounds to me like a spork for jruby *shrug*
cantonic has quit [Quit: cantonic]
Criztian has joined #ruby
yannis has quit [Quit: Bye!]
mnaser has quit [Quit: Computer has gone to sleep.]
<digitalcakestudi> is there a var I cant get the iteration in a while loop ? or do I have to make my own?
cbuxton has quit [Ping timeout: 246 seconds]
<carloslopes> Sou|cutter: yes.. something like spork could be useful for you ssmoot
cbuxton has joined #ruby
<shevy> digitalcakestudi if you need a var, you must keep track of it
<ssmoot> Sou|cutter: Right, I've seen that. Haven't looked too closely though since I assumed it wouldn't help me a whole lot with MiniTest. As far as I can figure out MiniTest is the issue right now. I've got files reloading. I can add new assertions and they work fine. Methods with failing assertions appear to be cached somewhere though. :(
<shevy> digitalcakestudi however you can do the same with counter = 0; loop { counter += 1}, or perhaps better, try something like 5.times {|i|} or 0.upto(1000).each
compara20 has quit [Quit: Ex-Chat]
rorrego_ has joined #ruby
atmosx has quit [Ping timeout: 245 seconds]
<Sou|cutter> ssmoot: very interesting problem
<ssmoot> carloslopes: Sou|cutter: Spork doesn't appear to support MiniTest, and appears (from the description on spork.rubyforge.org) to require fork(), so it wouldn't help me on JRuby.
* Sou|cutter shakes his fist at minitest
sayem has quit [Remote host closed the connection]
atmosx has joined #ruby
<ssmoot> I'm really trying to stick with MiniTest. Other than this, I generally like it, it's simple, and because it's part of the stdlib now, I'm pretty confident it's not going to have breaking changes that will break all my specs and they'll continue to work a few years from now.
<Sou|cutter> ssmoot: I dunno, there have been plenty of breaking changes to the standard lib.. TBH I don't put a lot of faith/trust in it
<Sou|cutter> but that's going off on a tangent
<Sou|cutter> no reason not to trust minitest at this point
ericcoleman has joined #ruby
bambanx_ has joined #ruby
darthdeus has joined #ruby
<ssmoot> Sou|cutter: It may not be the case anymore, but after about the third major breaking change in RSpec method names a couple years ago I swore it off for life. ;)
yoklov has quit [Quit: bye!]
<Sou|cutter> ssmoot: easier to stick to specific versions of a non-standard lib, though
<ssmoot> Sou|cutter: Sure. But I don't want to be behind. Anyways, I guess I have some more spelunking to do... :/
<CannedCorn> can you not use connect_nonblock in windows?
bambanx has quit [Ping timeout: 260 seconds]
<ssmoot> Sou|cutter: I'm using the minitest gem anyways since it added Object#stub. :)
aantix has joined #ruby
yxhuvud has quit [Ping timeout: 256 seconds]
<Sou|cutter> ssmoot: if you get to the bottom of it, I'd be interested to hear. Just added your blog to my reader
vanseljaj is now known as banseljaj
<Mon_Ouie> You can use the gem distributed version of minitest if you need a specific version
aantix has quit [Read error: Connection reset by peer]
aantix has joined #ruby
<ssmoot> Sou|cutter: Will do. If I can get this to work I think it'll be part of my standard gem boilerplate. Loving JRuby, but waiting 10s for a single spec to run is not fun.
kylemcgill has joined #ruby
* Sou|cutter nods
fr0gprince_ has joined #ruby
\\_null has joined #ruby
benatwork has quit [Ping timeout: 245 seconds]
ryanlabouve has joined #ruby
dnyy has quit [Remote host closed the connection]
cj3kim has joined #ruby
pawdro has joined #ruby
alegacyreborn has joined #ruby
mucker has quit [Quit: leaving]
<pawdro> hi, is there any ESB supporting ruby webservices?
<pawdro> i.e. found apache synapse but i've seen no tutorial for ruby webservices
fr0gprince_mac has quit [Quit: Leaving...]
saschagehlich has joined #ruby
jenrzzz-mac has joined #ruby
<shevy> guys
<shevy> I am going back in time ...
<shevy> gcc version 3.4.6
hadees_ has joined #ruby
<CannedCorn> so in windows i keep getting "invalid argument - connect(2)"
<CannedCorn> when i try to call connect nonblock
cmarques has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
dEPy has quit []
<cableray> Is there a jruby alternative for win32-dir?
xaq has quit [Remote host closed the connection]
hadees has quit [Ping timeout: 256 seconds]
hadees_ is now known as hadees
kevinbond has joined #ruby
Axsuul has joined #ruby
libertyprime has quit [Quit: Lost terminal]
libertyprime has joined #ruby
mengu has quit [Quit: Konversation terminated!]
jeebster has quit [Quit: Leaving.]
ringotwo has joined #ruby
ringotwo has quit [Remote host closed the connection]
libertyprime has quit [Client Quit]
ddv has quit [Ping timeout: 272 seconds]
libertyprime has joined #ruby
Norrin_ has joined #ruby
saschagehlich has quit [Read error: Connection reset by peer]
saschagehlich has joined #ruby
<CannedCorn> any thoughts gents?
<shevy> no idea
<shevy> dont use windows that much
<carloslopes> shevy: +1
<shevy> I keep on trying to convince people that we need RubyOS but folks here don't like it :(
dnyy has joined #ruby
carloslopes has quit [Quit: Leaving]
Norrin has quit [Ping timeout: 265 seconds]
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ddv has joined #ruby
krz has joined #ruby
internet_user has quit [Remote host closed the connection]
<Muz> shevy: well, it'd be slow, have broken unicode support and not do proper threading. ;)
<Muz> Got to admit that there's a level of irony in a language invented by a Japanese native speaker not having proper unicode support until relatively recently.
chico_chicote has quit [Quit: Page closed]
fserb has quit [Quit: ttyl]
<Hanmac> i like languages with eastereggs inside :P
Ankhers has quit [Remote host closed the connection]
blischalk has quit [Quit: blischalk]
gmci has joined #ruby
jgrevich_ has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
Aaton_off is now known as Aaton
jgrevich has joined #ruby
vaelen has quit [Quit: Leaving]
Synthead has quit [Read error: Connection reset by peer]
<alegacyreborn> RubyOS?
geekbri has quit [Remote host closed the connection]
kylewiest has joined #ruby
<alegacyreborn> sounds interesting...
tcopp has left #ruby [#ruby]
itnomad has joined #ruby
ericcoleman has quit [Remote host closed the connection]
jgrevich_ has quit [Ping timeout: 245 seconds]
<kylewiest> hello, having a problem rescuing an exception. Can anyone spot something I'm missing here: https://gist.github.com/2845726
Synthead has joined #ruby
fserb has joined #ruby
<davidcelis> out of curiosity, what if you rescue ECONNREFUSED
<davidcelis> nevermind, that shouldn't be it
<davidcelis> what's your DummyStore initializer look like?
<kylewiest> empty
<kylewiest> i tried rescuing other exceptions, and even just Exception, but it still raises
fserb has quit [Client Quit]
<davidcelis> that's strange
S2kx has quit [Ping timeout: 240 seconds]
<davidcelis> and it's line 13 of store.rb
<davidcelis> that the error is citing?
<kylewiest> The DummyStore just implements all of the methods and returns empty strings, arrays, etc. so that the whole app doesn't fail if Redis is down
S1kx has joined #ruby
hynkle has quit [Quit: hynkle]
<kylewiest> Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (ECONNREFUSED)
Norrin_ has quit [Read error: Operation timed out]
S1kx has quit [Changing host]
S1kx has joined #ruby
<davidcelis> full trace?
<kylewiest> I was thinking it was the ||= for @connection, but I tried moving the whole connection to a separate method and keep getting the same thing
<kylewiest> i just updated the gist with the full trace
<ssmoot> Sou|cutter: Figured it out: https://github.com/sam/harbor-ftp/blob/master/test/watch.rb Changed MiniTest::Unit.new.run to MiniTest::Unit.new._run so it would execute the tests directly instead of using a cached instance of Unit at MiniTest::Unit::runner (which appears intended to be used only in conjunction with minitest/autorun).
<davidcelis> kylewiest: no idea, sorry :(
<kylewiest> davidcelis: no prob, thanks for looking at it for me
iamjarvo has quit [Quit: Leaving.]
Sliker has quit [Quit: Leaving]
ringotwo has joined #ruby
Norrin_ has joined #ruby
itnomad has quit [Quit: Leaving]
benatwork has joined #ruby
emet has joined #ruby
alegacyreborn has quit [Quit: Leaving]
jeebster has joined #ruby
<digitalcakestudi> how to do this ternary ? :dateclass = today == date ? "day today" : "day"
xaxisx has quit [Quit: xaxisx]
ciopte7 has joined #ruby
<ssmoot> digitalcakestudi: mydate = (today == date ? "day today" : "day")
<digitalcakestudi> thanks
rmascarenhas has quit [Quit: leaving]
ryanlabouve has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Ping timeout: 252 seconds]
Vainoharhainen has joined #ruby
knightblader has quit [Quit: User disconnected]
berserkr has quit [Read error: Connection reset by peer]
pip has left #ruby ["Leaving"]
fserb has joined #ruby
DasEi has joined #ruby
GhettoCode has quit [Ping timeout: 244 seconds]
iToast has joined #ruby
nowthatsamatt has joined #ruby
<iToast> DasEi: :D
<nowthatsamatt> what gem do you recommend to use for a master/slave mysql environment
benyarb has quit [Ping timeout: 240 seconds]
<nowthatsamatt> octopus isn't really working for us - could be my own stupidity.
<iToast> Im not sure what I'd do with ruby other then a bit of a *privacy* invading project ;P
workmad3 has joined #ruby
mdw has joined #ruby
<iToast> Ok, I know this is a bit stupid of a question
<iToast> What can I do with ruby on a server enviroment.
mnaser has joined #ruby
<Sou|cutter> ssmoot: whoa good find!
* Sou|cutter gives ssmoot a high five
fserb has quit [Quit: ttyl]
<iToast> Ok
<iToast> Turns out it wasent ruby i was after but perl :P
<iToast> But I do love how arrays work in ruby...
<DasEi> iToast: as told, that will turn offtopic here, as I'm on/in LPIC studys and support mainly, there are less specialized channels for nice chitchat
<iToast> pl;p;
<iToast> lol
akem has joined #ruby
benyarb has joined #ruby
<CannedCorn> when ruby says invalid argument - connect(2) does that mean that connect(2) isn't supported or that an invalid arguemnt was passed to it
<CannedCorn> ?
gvz has quit [Quit: Leaving]
akem has quit [Max SendQ exceeded]
<ssmoot> CannedCorn: Have you tried JRuby? MRI has traditionally pretty bad support for sockets on Windows IME.
kirun has quit [Quit: Client exiting]
<CannedCorn> ssmoot i need to support mri
ada2358 has joined #ruby
yoklov has joined #ruby
robdodson has joined #ruby
yoklov_ has joined #ruby
yoklov_ has quit [Remote host closed the connection]
igaiga has joined #ruby
<CannedCorn> ugh, sometimes it works
<CannedCorn> sometimes it doesn't
<CannedCorn> wtf ruby
<CannedCorn> connect_nonblock sometimes works just fine, then others it says invalid arguement - connect(2)
krzkrzkrz has joined #ruby
b1rkh0ff has quit [Ping timeout: 252 seconds]
theRoUS has quit [Ping timeout: 260 seconds]
jrist is now known as jrist-afk
rushed has quit [Quit: rushed]
wangr has quit [Ping timeout: 245 seconds]
adac has quit [Read error: No route to host]
krz has quit [Ping timeout: 244 seconds]
krzkrzkrz is now known as krz
adac has joined #ruby
chson has quit [Remote host closed the connection]
ciopte7 has quit [Read error: Connection reset by peer]
ecigman is now known as nigman
francisfish has joined #ruby
fserb has joined #ruby
berserkr has joined #ruby
bbttxu has quit [Quit: bbttxu]
joshman_ has quit [Read error: Operation timed out]
mdw_ has joined #ruby
igaiga_ has joined #ruby
atmosx has quit [Ping timeout: 252 seconds]
francisfish has quit [Remote host closed the connection]
cj3kim has quit [Quit: This computer has gone to sleep]
mdw has quit [Ping timeout: 260 seconds]
atmosx has joined #ruby
igaiga has quit [Ping timeout: 244 seconds]
<cableray> Is there a way to tell the host os (windows specifically) to open a file (as if the user had double clicked it) using jruby? the win32-utils provide this functionality for win ruby.
larissa has joined #ruby
wvms has joined #ruby
b1rkh0ff has joined #ruby
larissa has quit [Client Quit]
wallerdev has joined #ruby
larissa has joined #ruby
Richmond has quit [Quit: Leaving]
Solnse has quit [Read error: Connection reset by peer]
kvirani has quit [Remote host closed the connection]
xaxisx has joined #ruby
xaxisx has quit [Client Quit]
carinishead has joined #ruby
robdodson has left #ruby [#ruby]
iamjarvo has joined #ruby
<carinishead> i have an array of id's sorted in a special manner, say, a=[3,2,9,5], and i have an array of objects corresponding to those ids, but not sorted in that manner… how do i sort the objects in array b so that they correspond to the ordering of the first array, a : i.e., b=[obj3,obj2,obj9,obj5]?
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<carinishead> assuming they start out like b = [obj2, obj3, obj5, obj9]
chomp has quit [Ping timeout: 246 seconds]
bambanx__ has joined #ruby
iocor has joined #ruby
Occult has quit [Quit: Leaving]
<Mon_Ouie> sort_by.with_index { |obj, i| a[i] }
Occult has joined #ruby
<carinishead> awesome
Occult has quit [Remote host closed the connection]
larissa has quit [Quit: gone]
Occult_ has joined #ruby
larissa has joined #ruby
gerryster has joined #ruby
larissa has quit [Client Quit]
larissa has joined #ruby
DRCALKIN has quit [Quit: Leaving]
bambanx_ has quit [Ping timeout: 260 seconds]
<carinishead> in the with index, where does my array a come into play?
Occult_ has quit [Client Quit]
Occult_ has joined #ruby
igaiga_ has quit [Remote host closed the connection]
Occult_ is now known as Occult
igaiga has joined #ruby
IPGlider has joined #ruby
<Mon_Ouie> Nowhere? with_index just yields the index as well as the object
<carinishead> hmm
YokoZar has joined #ruby
carinishead has left #ruby [#ruby]
banghouse is now known as banghouseAFK
dv310p3r has quit [Ping timeout: 246 seconds]
chomp has joined #ruby
<YokoZar> Can someone point me to documentation about the differences from 1.9.3-p0 and 1.9.3-p194? I'm an Ubuntu developer and trying to decide whether it's relevant as a -security update, a -updates (stable release update), or a -backports update
<robacarp> Finished tests in 0.001015s, 985.2217 tests/s, 19704.4335 assertions/s.
<robacarp> lol.
Rubinista has joined #ruby
lledet has joined #ruby
Raduwen has joined #ruby
hadees has quit [Quit: hadees]
<davidcelis> robacarp: minitest?
dekroning has quit [Ping timeout: 244 seconds]
davidw has quit [Ping timeout: 245 seconds]
Raduwen has quit [Quit: Leaving...]
otters has quit [Ping timeout: 245 seconds]
mdw_ has quit [Read error: Connection reset by peer]
mdw has joined #ruby
Raduwen has joined #ruby
amalvagomes has quit [Quit: amalvagomes]
QKO has quit [Read error: Operation timed out]
darthdeus has quit [Quit: Linkinus - http://linkinus.com]
<robacarp> yep
<robacarp> only 20 assertions and it extrapolates all the way out to 20k
<robacarp> cute, I guess...
mdw has quit [Ping timeout: 246 seconds]
<davidcelis> i hope you have required minitest/pride
nowthatsamatt has quit [Quit: nowthatsamatt]
QKO has joined #ruby
blacktulip has quit [Remote host closed the connection]
Norrin_ has quit [Read error: Connection reset by peer]
stephenjudkins has quit [Quit: stephenjudkins]
Norrin has joined #ruby
<robacarp> eh?
otters has joined #ruby
<robacarp> lol
cj3kim has joined #ruby
pawdro has quit [Quit: Leaving]
snickersnack has joined #ruby
carlyle has quit [Remote host closed the connection]
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
snickersnack has quit [Client Quit]
tayy has joined #ruby
piotr_ has quit [Remote host closed the connection]
gerryster has quit [Remote host closed the connection]
rorrego_ has quit [Quit: Ex-Chat]
bglusman has quit [Ping timeout: 256 seconds]
ChampS666 has quit [Ping timeout: 260 seconds]
jeebster has left #ruby [#ruby]
MasterIdler has quit [Ping timeout: 245 seconds]
bricker88 has quit [Quit: Leaving.]
voodoofish430 has quit [Quit: Leaving.]
barnex has joined #ruby
Foxandxss has joined #ruby
sepp2k has quit [Remote host closed the connection]
banghouseAFK is now known as banghouse
<barnex> Hello. I'm looking for some library simmilar to capistrano - I want to easily make recipes that copy something over scp (possibly with a host acting as a gateway) and execute commands there. Oh, and I want task dependancies too.
<barnex> But I don't want rails and I don't want to deploy from vcs.
<barnex> Is there something like that?
<robacarp> barnex: you might try puppet, but its not ruby based
zeromodulus has quit [Remote host closed the connection]
<robacarp> also I think there is one called chef
zeromodulus has joined #ruby
kylewiest has left #ruby [#ruby]
<workmad3> barnex, capistrano can be used for things other than rails
<workmad3> barnex, and it doesn't need to deploy from vcs
<robacarp> yea, it can, but its a major pain.
pk1001100011 has quit [Quit: Bredząc trzy po trzy oznajmiłeś, że Ty; Dasz im Władcę Snów; Nie pojęli Twych słów; Więc zginęły miliony – ich słowa brzmiały dziwnie; Ten sam Bóg nosił inne imię (…)]
darkf has joined #ruby
<barnex> I looked at puppet and it seemed like it has different use-case. The homepage speaks about declarative configuration of many hosts, and I'm looking for something procedural.
cantonic has joined #ruby
looopy has quit [Remote host closed the connection]
<barnex> Tweaking a file ten thousand times and pushing it to the test machine :-)
<robacarp> barnex: I'm pretty sure puppet can do pretty much any repetitive task you set out to tell it
<robacarp> that said, you can always just write a ruby script to do the job.
zeromodulus has quit [Ping timeout: 244 seconds]
<workmad3> yeah, I'd suggest just a simple script from the sounds of things
ringotwo has quit [Read error: Connection reset by peer]
Urth|Away is now known as Urthwhyte
jchauncey_ has joined #ruby
ringotwo has joined #ruby
<workmad3> puppet is really aimed at configuration managment and provisioning of several machines... it would be a fair bit of setup and overhead otherwise
<barnex> Yeah, I could probably do it with bash one-liners. But that's fun opportunity to learn some dev-ops stuff.
Vainoharhainen has quit [Quit: Leaving...]
ken_barber has quit [Remote host closed the connection]
jchauncey has quit [Ping timeout: 244 seconds]
jchauncey_ is now known as jchauncey
looopy has joined #ruby
zeromodulus has joined #ruby
igaiga has quit [Remote host closed the connection]
iToast has left #ruby [#ruby]
albemuth has quit [Quit: Computer has gone to sleep.]
syamajala has joined #ruby
Chryson has joined #ruby
akem has joined #ruby
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
jcromartie has quit [Quit: jcromartie]
niklasb has quit [Ping timeout: 245 seconds]
stewart_ has joined #ruby
billiamii has quit []
chson has joined #ruby
albemuth has joined #ruby
hadees has joined #ruby
apeiros_ has joined #ruby
Bish has quit [Read error: Connection reset by peer]
friskd has joined #ruby
stephenjudkins has joined #ruby
krzkrzkrz has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
nfk has quit [Quit: yawn]
fserb has quit [Quit: ttyl]
krz has quit [Ping timeout: 246 seconds]
krzkrzkrz is now known as krz
<workmad3> barnex, well, you've already said this isn't going through a vcs...
albemuth has quit [Quit: Computer has gone to sleep.]
<recursive> what is the current sqlite gem? is it sqlite or sqlite-ruby?
cantonic has quit [Quit: cantonic]
<deryldoucette> neither. sqlite3
chrisja has left #ruby [#ruby]
syamajala has quit [Remote host closed the connection]
slyv has joined #ruby
Synthead has quit [Remote host closed the connection]
peterhil has quit [Ping timeout: 272 seconds]
eph3meral has joined #ruby
kvirani has joined #ruby
Xajin has joined #ruby
<slyv> Hey, i've been playing around with ruby, and have run into a problem that I can't quite figure out. I have a code like this: http://pastebin.com/SAxQQnWm (Using nokogiri), and when I run that, it displays all of the names, and then displays all of the pops, rather than displaying the first name, then the first pop, then the second name and pop, etc...
chmac has quit [Ping timeout: 265 seconds]
<apeiros_> slyv: that's because name will contain an array of all names
<apeiros_> so if you puts it, it'll puts all values that are in the array - and all of them are names.
<Xajin> whats the correct way to run a system command and add in some variables, like system("ls" + path) or somethin
saschagehlich has quit [Quit: saschagehlich]
peterhil has joined #ruby
CannedCorn has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<ssmoot> Xajin: That's basically it. Though interpolation can look prettier: system("ls #{path || '/tmp'}")
<deryldoucette> %x[ls #{yourvar}]
<apeiros_> Xajin: system("ls", path)
<slyv> @apeiros_: Ah, I see. So, how would I go about fixing that?
<deryldoucette> then you don't need the ticks etc.
<apeiros_> Xajin: that will not go through a subshell and eliminate the dangers of unescaped arguments
hasrb has joined #ruby
<apeiros_> Xajin: consider: path = gets.chomp; system("ls #{path}") - now I enter ".; rm -rf /"
<deryldoucette> or like apeiros_ showed :) (I use %x[] rather than system() but thats just me)
<Xajin> Thanks All Great Info always more than one way to do something. I had this script working at one point then made the mistake of editing it without finishing and comming back to it I am all screwed up. ha ha
<apeiros_> well, you use %x[] if you want the stdout of the process in a variable
<apeiros_> system will directly print
baroquebobcat has quit [Quit: baroquebobcat]
chimkan has joined #ruby
<apeiros_> and only return true/false depending on the exit status
<apeiros_> (note that %x[] will still print to stderr directly)
banseljaj is now known as imami|afk
<Xajin> apeiros_ so %x["ls" + path] ?
jcromartie has joined #ruby
fserb has joined #ruby
<apeiros_> Xajin: without a space after ls, that'll go bad ;-)
<apeiros_> Xajin: just remember that the exploit I showed you will work for this too
<apeiros_> path = ".; rm -rf /" will erase your disk
Rizzle has joined #ruby
<apeiros_> (might be it'd need "&&" instead of ";")
<deryldoucette> so many different ways of doing things, each with their own rules and gotchas. hehe
<apeiros_> shelling out safely is a difficult thing.
<deryldoucette> apeiros_: shouldn't. just means with && that the first HAS to succeed
<apeiros_> deryldoucette: I just wasn't sure whether it'd execute multiple statements
<deryldoucette> the ; means regardless, execute the next command
<apeiros_> with &&, it's a single one
<deryldoucette> ahh
<Xajin> these will be ruby scripts ran from command line or cron, should be fine
<deryldoucette> err? it is?
<deryldoucette> must be a ruby thing cause it doesn't mean that in the shell itself
ramblex has quit [Quit: ramblex]
consti has joined #ruby
<apeiros_> as far as I understood shell syntax, a statement is terminated by either ; or a newline…
<deryldoucette> the && in shell syntax means only execute the 2nd command if the first one succeeded
Criztian has quit [Remote host closed the connection]
<apeiros_> yes. similar to ruby
<deryldoucette> the ; means execute the 2nd regardless of the status of the first
<deryldoucette> which is why when i chain, i *always* use && because well if i'm running a 2nd command the 1st damned well better have worked hehe
<deryldoucette> using ; has led to more than a few debugging sessions in shell scripts i'd rather never have to repeat lol
kenichi has quit [Remote host closed the connection]
xkx has quit [Ping timeout: 252 seconds]
uris has quit [Quit: leaving]
flippingbits has quit [Ping timeout: 256 seconds]
xkx has joined #ruby
<deryldoucette> well, now that i've run that line of interest into the ground its time to go watch some tv <grin>
<slyv> Hmm, playing around a bit more. I still can't figure out how to stop that from happening, and also I'm noticing that when the each finishes all of the elements, it repeats from the beginning, do I need to add a break to the end for .each loops?
<apeiros_> slyv: ah, sorry, almost forgot you
<apeiros_> slyv: you have the same number of names as the other things?
<slyv> lol, that's fine.
chimkan has quit [Quit: chimkan]
<apeiros_> if so: puts names.zip(that_other_thing).flatten(1)
<slyv> Yeah
<slyv> Same number of names as pops.
<apeiros_> slyv: also use p instead of puts if you want to see, what you really have
<apeiros_> ah, pops was that other thing
nowthatsamatt has joined #ruby
<Xajin> Ok trying a simple command to retrieve the ls output from a remote machine, but i get funky error sh: ssh -i key.pem root@: command not found" code is %x["ssh -i key.pem root@" + ipaddress + " " + command]
<deryldoucette> %x["ssh -i key.pem root@#{ipaddress} #{command}"] shojld do it
<Xajin> Oh ok
andrewhl has quit [Remote host closed the connection]
<deryldoucette> again realizing what apeiros_ has said about potential exploitation
<apeiros_> deryldoucette: um, no
<deryldoucette> especially since you're running a root command
<apeiros_> [] is already the quote
<apeiros_> adding a " inside of it makes it a single argument ;-)
<deryldoucette> ahh crap, you're right
<deryldoucette> my bad
<apeiros_> Xajin: you want %x[ssh -i key.pem root@#{ipaddress} #{command}]
<Xajin> Thanks guys
<apeiros_> Xajin: also re "this will just be in XY where it is all totally save and fancy pantsy unicorns with rainbows!" - forget it. stuff always ends up being used elsewhere.
<apeiros_> good security practice is a habit. better get into it asap.
<slyv> apeiros: zip?
<apeiros_> slyv: yes. see Array#zip docs
<deryldoucette> apeiros_++ :-)
<apeiros_> imagine a zipper on your trousers - one value from the left, one value from the right, left again, right again and so on
<robacarp> apeiros_: thaht is the first time I've ever heard a good plain english description for zip.
<robacarp> well done.
tomb_ has joined #ruby
<apeiros_> robacarp: thanks :)
<slyv> Haha thanks, but I am getting an undefined method error when I try that.
<apeiros_> slyv: paste the code + the full exception
<apeiros_> exception preferably below the code
bambanx__ has quit [Ping timeout: 260 seconds]
C0deMaver1ck has quit [Remote host closed the connection]
bambanx__ has joined #ruby
dankest has quit [Ping timeout: 252 seconds]
<apeiros_> slyv: I think you've changed the code, no?
<apeiros_> didn't you have `reg.xpath("//NAME")` instead of `reg.xpath("//NAME").text`?
ciopte7 has joined #ruby
<slyv> Yeah, I was testing some things. Let me try again removing those.
<apeiros_> you might still get a no method error
krzkrzkrz has joined #ruby
<apeiros_> since xpath probably returns something else than an array, so it depends on how well what it returns implements Enumerable (hopefully it just includes Enumerable…)
jchauncey has quit [Quit: jchauncey]
<slyv> I removed them, no no method error, but it didn't change anything from what was happening originally.
niku4i has joined #ruby
yannis has joined #ruby
<slyv> And, eventually in my code, I will need .text.
rasbonics has quit [Quit: rasbonics]
<slyv> But with or without, all the names come first, then pops.
Neurotic has joined #ruby
krz has quit [Ping timeout: 244 seconds]
krzkrzkrz is now known as krz
<apeiros_> slyv: remove line 9
<apeiros_> and replace `p name.zip(name).flatten(1)` with `puts p name.zip(pop).flatten(1)`
<apeiros_> (line 8)
kenperkins has quit [Ping timeout: 244 seconds]
<Xajin> apeiros_ Thank you so much, my A.D.D just would let me get past the issue of it not working. Not that I have it working, I would like to learn more of how to secure it, could you point me to some referance material link or something? Heres the output "http://screencast.com/t/Q4KrcpNRF". Now I have a way of definig an server list, running a command on each and seeing its output, in the working
<Xajin> example I did a df -h to see the disk usage of all servers in my server list
bambanx__ has quit [Read error: Connection reset by peer]
bambanx__ has joined #ruby
<slyv> Ah, that worked! But, now if I want to work with names and pops in my code later in that .each loop, how would I do so? (Not just puts).
cantonic has joined #ruby
<apeiros_> slyv: that zip+flatten will return an array of the form [name1, pop1, name2, pop2, …]
<slyv> And also just get .text, rather than the whole thing.
<apeiros_> you can .each over that just easily
<apeiros_> if you want a name and a pop on a single iteration, just drop the .flatten(1)
<apeiros_> then you get an array [[name1, pop1], [name2, pop2], …]
pavao has joined #ruby
<apeiros_> which you can do: ary.each do |single_name, single_pop| (also, name your variables properly, should be names & pops, not name & pop. they're collections…)
marwan_ has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
pavao has quit [Client Quit]
<apeiros_> aw man, almost 0200 - getting to sleep. @Xajin, look at open3, it allows for separate passing of arguments too, which avoids that exploit
<slyv> Alright
chrisleework has quit [Quit: Leaving]
<slyv> Thanks!
<marwan_> hi, help: i am trying to run this project https://github.com/antirez/lamernews, it works well but got this http://jsfiddle.net/PprSP/ after submiting the first news
<apeiros_> yw
apeiros_ has quit [Remote host closed the connection]
<Xajin> apeiros_ Thanks !
fserb has quit [Quit: ttyl]
consti has quit [Quit: Computer has gone to sleep.]
binaryplease has quit [Ping timeout: 252 seconds]
lledet has quit [Quit: lledet]
niku4i has quit [Remote host closed the connection]
kylemcgill has quit [Ping timeout: 252 seconds]
binaryplease has joined #ruby
tommyvyo has quit [Ping timeout: 246 seconds]
DasEi has quit [Remote host closed the connection]
hasrb has quit [Remote host closed the connection]
PaciFisT has joined #ruby
<digitalcakestudi> is a range an array?
artOfWar has quit [Remote host closed the connection]
<digitalcakestudi> or can I convert a range into a array?
artOfWar has joined #ruby
mengu has joined #ruby
<marwan_> digitalcakestudi: irb> (1..4).to_a => [1, 2, 3, 4]
<marwan_> hi, help: i am trying to run this project https://github.com/antirez/lamernews, it works well but got this http://jsfiddle.net/PprSP/ after submiting the first news
ZifreCL has quit [Read error: Connection reset by peer]
adeponte has quit [Remote host closed the connection]
marwan_ has quit [Quit: Page closed]