apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
adjo has joined #ruby
chinychinchin has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
<havenn> atmosx: post '/update/:id' do |id|; id[/\d+\z/] end
chinychinchin has joined #ruby
am3n has joined #ruby
r0bby_ has quit [Excess Flood]
cads has quit [Ping timeout: 245 seconds]
<havenn> atmosx: the string may have digits before the ':' i presume?
<atmosx> havenn: has 1 digit, after the ':'
<atmosx> havenn: that's an even more complicated regex... I'm not sure I wanna use it
<atmosx> might be a double digit in a while anyway, as users keep being added.
r0bby_ has joined #ruby
kobain has quit [Ping timeout: 252 seconds]
kobain_ has joined #ruby
<havenn> atmosx: /\d+\z/ matches any digits that precede the end of the string
adjo_ has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
<havenn> >> '123:456:789'[/\d+\z/]
<eval-in> havenn => "789" (https://eval.in/60121)
<atmosx> havenn: yes works fine
lyanchih has joined #ruby
<atmosx> no my examples are just : + number, i.e. ":34", ":4", etc.
lyanchih has quit [Client Quit]
<atmosx> anyway
<atmosx> ty
<havenn> >> ':34'[/\d+/]
<eval-in> havenn => "34" (https://eval.in/60122)
lyanchih has joined #ruby
<atmosx> hm
chinychinchin has quit [Ping timeout: 260 seconds]
<atmosx> so params['id'].scan(/\d+/)
jlast has joined #ruby
<havenn> atmosx: params['id'][/\d+/]
<atmosx> oh
mmcdaris has quit [Quit: mmcdaris]
<havenn> atmosx: i usually use the block style ^ not parems, but stylistic choice
<atmosx> let me chek that out, that's clearer than my curren one
<havenn> atmosx: still need a #to_i of course
<atmosx> havenn: oh yes
<havenn> atmosx: or #delete(':').to_i
<atmosx> hah can I do that?
<havenn> >> ':34'.delete(':').to_i
<atmosx> didn't knew strings have a delete method
<eval-in> havenn => 34 (https://eval.in/60123)
<atmosx> ruby is incredible
rockets has joined #ruby
<havenn> Indeed. :)
mercwithamouth has quit [Ping timeout: 272 seconds]
<atmosx> hmm no I don't need to to_i
<atmosx> awesome thanks for the hints
<atmosx> hehe
mmcdaris has joined #ruby
<havenn> np
<atmosx> I need my code more dry and add sessions now and its done :-)
<atmosx> but its 1:12 am and have to go get some sleep.
<atmosx> later :D
<havenn> later
havenn is now known as havenwood
felipec has joined #ruby
<felipec> how can I get the value of a C define? SYS_sync
<felipec> I'm looking at Fiddle, DL, and ffi, but it seems you need to know them already
error404 has quit [Quit: leaving]
axl_ has quit [Quit: axl_]
elaptics is now known as elaptics`away
wayne__ has joined #ruby
error404 has joined #ruby
_md has quit [Quit: Leaving...]
<wayne__> Hi all, I've not used RVM on Ubuntu before today and can't work out how I'm meant to run scripts in the terminal there
<havenwood> wayne__: Did you install via apt-get?
<wayne__> with Interactive Ruby on Windows it's ready loaded, is this possible with the terminal / rvm (terminal is running zsh)
<wayne__> havenwood I did yes
<wayne__> restarted a couple times so don't have my logs but pretty sure I did yes
bugsinlights has joined #ruby
VTLob has quit [Quit: VTLob]
<havenwood> wayne__: far as i know, the apt package doesn't really work - gotta install with: \curl -L https://get.rvm.io | bash -s stable
<havenwood> http://rvm.io/
<havenwood> wayne__: There's an #rvm channel too, btw.
<wayne__> oops no I curled I curled!
<havenwood> wayne__: And you set a default Ruby?
<wayne__> 1.9.3
<havenwood> wayne__: Check?: rvm default
<atmosx> wayne__: you're using cron?
<atmosx> to run the scripts?
<wayne__> @atmosx I don't know what cron is sorry
kobain_ is now known as kobain
<wayne__> @havenwood rvm default is coming up "RVM is not a function", I think I just read this might happen
Xeago has joined #ruby
<atmosx> k
<havenwood> atmosx: Ah, you've got the `not a function` problem.
vlad_starkov has joined #ruby
<atmosx> wayne__: did you install any ruby?
<wayne__> 1.9.3 yes
<atmosx> havenwood: I don't have any problems :-P
brennanMKE has joined #ruby
<havenwood> wayne__: rvm get head --auto-dotfiles
<wayne__> thanks @havenwood
<atmosx> yeah and close the terminal once, re open it
<felipec> hmm ausyscall seems to do the trick
iamjarvo_ has joined #ruby
<havenwood> felipec: hmm, i don't know i'm afraid!
d45h has joined #ruby
<wayne__> right, we're back
aryaching has joined #ruby
<wayne__> it's rvm 1.23.13
rockets has quit []
<havenwood> felipec: Might also try #ruby-lang.
mixel has joined #ruby
<havenwood> wayne__: After reloading your shell does the `rvm` command work?
atmosx has quit [Quit: Lost in trance]
<wayne__> yup, told me the version was 1.23.13
<havenwood> wayne__: Okay, good deal.
Xeago has quit [Ping timeout: 248 seconds]
<wayne__> I still don't know how to run a script here though!
rickruby has joined #ruby
<wayne__> it's not an interactive shell I'm guessing?
allaire has quit [Ping timeout: 248 seconds]
<havenwood> wayne__: Does `rvm list` show Rubies?
<felipec> havenwood: I don't think it's possible
<felipec> sadly
<havenwood> felipec: oh dear
ner0x has joined #ruby
heidi has quit [Quit: Leaving.]
<wayne__> no default set but shows the 1.9.3-p448 i installed
thepumpkin has joined #ruby
<havenwood> wayne__: Set a default.
<havenwood> wayne__: My RVM is fuzzy, i'm a chruby user.
<wayne__> do i call the <ruby> 1.9.3 or its full name (ruby-1.9.3-p448)?
<havenwood> i don't know
<wayne__> @havenwood thanks i appreciate it
<havenwood> fuzzy matching in chruby :P
<havenwood> np
justsee has joined #ruby
justsee has joined #ruby
Andrevan has joined #ruby
<wayne__> yeah looks like it's taken the full name, so any idea how I get using it to run my scripts?
d45h has quit [Ping timeout: 272 seconds]
<havenwood> wayne__: Once you've set it as the default, should *just work*.
brennanMKE has quit [Remote host closed the connection]
jberlinsky has joined #ruby
threesome has quit [Ping timeout: 260 seconds]
<wayne__> hmm I tried rvm puts "hello world" ruby puts "hello world" no joy
<havenwood> wayne__: ruby -v
thepumpkin has quit [Ping timeout: 272 seconds]
<havenwood> wayne__: ruby -e "puts 'testing'"
<wayne__> ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]
bklane has joined #ruby
smathieu has joined #ruby
mercwithamouth has joined #ruby
<havenwood> wayne__: From the manpage: -e command Specifies script from command-line while telling Ruby not to search the rest of the arguments for a script file name.
<wayne__> woop de friggin doo
<wayne__> lol thanks a bunch
<havenwood> no prob
heidi has joined #ruby
<wayne__> very nice, but looks like it could be annoying if I wanted to test multi-line code, no?
<havenwood> wayne__: You'd likely want to use a REPL.
<havenwood> wayne__: Ruby ships with `irb` but just grab the gem called Pry and use `pry` instead.
<havenwood> wayne__: http://pryrepl.org/
<wayne__> irb yes I've seen that in Interactive Ruby
<havenwood> wayne__: gem install pry
<wayne__> [for Windows]
<havenwood> wayne__: Type `help` after you: gem install pry; pry
Rocksurf70 has joined #ruby
<havenwood> wayne__: Normally you'd save your multi-line code to a file, then run that file with Ruby.
<havenwood> wayne__: But there are ways to do it from the command line if you really want to.
<wayne__> hm, maybe I'm spoilt but I really like running a few rows out of an online IDE at a time
smathieu has quit [Ping timeout: 272 seconds]
iamjarvo_ has quit [Remote host closed the connection]
<Nowaker> wayne__: ruby (enter) write multiline code (^D)
<wayne__> seeing what the output is etc. and moving on
iamjarvo_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
<havenwood> wayne__: Most popular Ruby text editors have a way of executing multiple arbitrary lines. Also, Pry is quite popular and powerful.
<wayne__> ^D indicating ctrl+D there @Nowaker yes?
<havenwood> wayne__: Really though, don't do that. Just not a good way to do things.
denysonique_ is now known as denysonique
s2013 has joined #ruby
<Nowaker> wayne__: of course
dmiller has quit [Remote host closed the connection]
katselphrime has joined #ruby
<havenwood> wayne__: Running commands with multi-line -e i mean,.
<wayne__> ah apologies, well I just installed Vim so will try and get more serious about it
Rocksurf70 has quit [Remote host closed the connection]
<havenwood> wayne__: You can jump between vim and pry, editing and executing the same code.
fuhgeddaboudit has joined #ruby
<wayne__> nice
m8 has quit [Quit: Sto andando via]
SilverKey has quit [Quit: Sleep now]
<havenwood> wayne__: For example, in Pry `edit method_here` and in vim change it, upon save return to Pry. For sure look at Ruby vim setups.
iamjarvo_ has quit [Ping timeout: 240 seconds]
ageis has quit [Ping timeout: 240 seconds]
<wayne__> cheers will do
sepp2k has quit [Quit: Leaving.]
Briareos1 has joined #ruby
lyanchih has quit [Quit: lyanchih]
notworthy has left #ruby ["Leaving"]
hiall has joined #ruby
<jberlinsky> Does anyone know why these two would be different undter Ruby 2.0? https://gist.github.com/Jberlinsky/af42e7ea864f9e67d0d4
<jberlinsky> Was moving from ::Enumerator.new(self, :materialize_hits, hits) due to deprecation warnings
<jberlinsky> Wound up having to use the nested blocks to avoid errors
werdnativ has joined #ruby
dma_ has quit [Remote host closed the connection]
dma_ has joined #ruby
iamjarvo_ has joined #ruby
DonRichie has quit [Quit: Verlassend]
vlad_starkov has quit [Read error: Connection reset by peer]
peregrine81 has joined #ruby
timonv has joined #ruby
dma_ has quit [Ping timeout: 240 seconds]
dmiller has joined #ruby
lyanchih has joined #ruby
fmcgeough has joined #ruby
rickruby has quit [Remote host closed the connection]
werdnativ has quit [Quit: werdnativ]
predator217 has joined #ruby
ageis has joined #ruby
rickruby has joined #ruby
am3n has joined #ruby
capicue has quit [Read error: Connection reset by peer]
Soda has quit [Read error: Connection reset by peer]
ageis is now known as Guest46584
rickruby has quit [Read error: Connection reset by peer]
mmcdaris has quit [Quit: mmcdaris]
rickruby has joined #ruby
timonv has quit [Ping timeout: 246 seconds]
s2013 has quit [Ping timeout: 245 seconds]
Foredoomed has joined #ruby
hiroyuki has joined #ruby
predator117 has quit [Ping timeout: 272 seconds]
echevemaster has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
lyanchih has quit [Quit: lyanchih]
mmcdaris has joined #ruby
sevenseacat has joined #ruby
marr has quit []
iliketurtles has quit [Quit: zzzzz…..]
Jeticus has quit []
pu22l3r has joined #ruby
zipper_ has joined #ruby
sailias has joined #ruby
havenwood has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
<zipper_> Uh how can I install ruby 1.8.3 or 1.8.6 The following isn't working `ruby-build 1.8.6-p111 /opt/rubies/ruby-1.8.6-p111`
havenwood has joined #ruby
dmiller has joined #ruby
<sevenseacat> ouch
<zipper_> I know 1.8.3 is old and unsupported but I did the koans on it and now ruby 2.0 has just confused the whole thing up.
<shevy> zipper_ I use versioned appdirs for that. in order to recover, I just change one symlink to point at the version of the program I want to use
<sevenseacat> you really should not be using 1.8.3 or 1.8.6 under any circumstance
<zipper_> I did it on ubuntu 12.04 LTS in ruby 1.8.3 but just migrated to arch which is on 2.0 I'm using chruby but can't find 1.8.3 to install it in /opt
<sevenseacat> even 1.8.7 is past EOL
CaptainJet has joined #ruby
<shevy> I have no idea what ruby-build is though, perhaps you can compile 1.8.7 from source: ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.bz2
<zipper_> shevy: the problem is that I can't find ruby 1.8.* anywhere.
Theravadan has joined #ruby
Thanatermesis has joined #ruby
<shevy> perhaps ruby-build sucks :D
mary5030 has joined #ruby
s2013 has joined #ruby
<sevenseacat> my ruby-build goes as far back as 1.8.6-p383
<shevy> I would only use 1.8.7+
havenwood has quit [Ping timeout: 245 seconds]
dmiller has quit [Ping timeout: 246 seconds]
<zipper_> sevenseacat: but you just said that you don't know what ruby build is
Guest94162 has quit [Quit: Leaving]
<sevenseacat> erm
<shevy> hehe
<sevenseacat> (09:10:28) shevy: I have no idea what ruby-build is
<zipper_> shevy: I have to prove that I finished the koans
<sevenseacat> shevy != sevenseacat
shevy is now known as shevycat
<zipper_> or I could restart with ruby 2.0 and hope to finish in like a day or two?
<shevycat> well
<sevenseacat> :P
<shevycat> why not 1.9.x something?
<shevycat> ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.bz2
<sevenseacat> if learning ruby right now i'd just go straight to 2.0
<shevycat> ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.bz2
shevycat is now known as shevy
<sevenseacat> thats the one
<zipper_> shevy: because I'm learning now not for production purposes bro.
<shevy> come on zipper! compile!
<sevenseacat> or just ruby-build 2.0.0-p247
<zipper_> shevy: arch has me on the latest by default
<zipper_> ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
wayne__ has quit [Ping timeout: 250 seconds]
<zipper_> That's what I am running
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
<zipper_> but I also have ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
<zipper_> However all have the same error with those koans
s3itz has joined #ruby
<zipper_> sevenseacat: yeah I found 1.8.6-p383 thanks :D
zipper is now known as Guest37773
SilverKey has joined #ruby
vlad_starkov has joined #ruby
Jetchisel has joined #ruby
eka has joined #ruby
aryaching_ has joined #ruby
heidi has quit [Quit: Leaving.]
zipper_ is now known as zipper
bugsinlights has quit [Ping timeout: 245 seconds]
eka has quit [Client Quit]
aryaching has quit [Ping timeout: 240 seconds]
dma_ has joined #ruby
jerius has quit []
am3n has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
meltingwax has joined #ruby
iamjarvo_ has joined #ruby
burgess has joined #ruby
Fezzler has joined #ruby
kizzx2 has quit [Quit: Leaving.]
meltingwax has left #ruby [#ruby]
felipec has quit [Disconnected by services]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mmcdaris has quit [Quit: mmcdaris]
iamjarvo has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
<zipper> My attempt to install ruby 1.8.6 p383 was had the following error and failed. http://pastebin.com/8dpbRSuB
<sevenseacat> your version of gss is too new
tsykoduk is now known as zz_tsykoduk
<sevenseacat> *gcc
mmcdaris has joined #ruby
<zipper> sevenseacat: my version of what?
jberlinsky has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat> gcc
katselphrime has quit [Quit: WeeChat 0.3.7]
<zipper> gcc? Oh man! I can't fix that now can I?
<sam113101> those goddamn recipes, man
<sam113101> they break all the time!
<bnagy> this will teach me to try and write web shit
zz_tsykoduk is now known as tsykoduk
smathieu has quit [Ping timeout: 245 seconds]
<bnagy> anyone know how to make sinatra STFU, offhand? Apparently setting logging false and disable logging is not a strong enough hint
am3n has quit [Remote host closed the connection]
schickung has joined #ruby
<bnagy> otherwise I'll wander over to #sinatra :/
<sam113101> > /dev/null
<bnagy> yeah but it's still wasting cycles
<sam113101> o_O
<sam113101> I wouldn't worry about that
<bnagy> I'm about to pound the bejeesus out of this app and I need as little non-app code as I can get
<bnagy> doing soe ns scale timing stuff
<zipper> sevenseacat: oh boy I think I'll have to learn ruby 2.0 by default
<sevenseacat> zipper: good :)
<bnagy> I don't care that it's slow, I just care that it's as pure as possible
<zipper> sevenseacat: That is going to cost me.
<sam113101> yes >> app.rb
<zipper> sevenseacat: maybe even the internship I'm looking for.
<bnagy> in fact I am rewriting a Go app in ruby, cause the compiled version is too fast :P
<sam113101> wat
<sevenseacat> uh?
<sevenseacat> its not 100% radically different from earlier versions
ner0x has quit [Quit: Leaving]
<sevenseacat> if your internship is encouraging you to use old insecure past-EOL versions of ruby, i'd question that more
burgess has quit [Quit: ^ddd]
kayloos has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
falood has joined #ruby
lyanchih has joined #ruby
Fezzler has quit [Quit: Leaving]
justsee has quit [Ping timeout: 248 seconds]
lethjakm1 has joined #ruby
samfisher has joined #ruby
burgess has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<samfisher> hello. how do I make ruby to print text on the same lines? something like ncurses
<samfisher> so far I'm using print "\e[2J\e[f" to clear the screen
<zipper> ah progress has been reclaimed by ruby-1.8.7-p370 :D
<bnagy> samfisher: there's ncurses bindings, and I think termbox also has ruby bindings
lethjakman has quit [Ping timeout: 272 seconds]
<bnagy> termbox is very, very stripped down, but has a clean and sane API
dcope has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
nignaztic has quit [Read error: Connection reset by peer]
<dcope> hey all, why would this code not support redirecting? http://pastie.org/private/57dspnfzeyqrjxjx7rm8tq
<dcope> the server is definitely sending back a 301
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby
jonahR has quit [Quit: jonahR]
bugsinlights has joined #ruby
nazty has joined #ruby
Methylated has joined #ruby
DanKnox_away is now known as DanKnox
<poutine> wow, that's really unprofessional to use your pastebin site to beg for money
mmcdaris has quit [Quit: mmcdaris]
mercwithamouth has quit [Ping timeout: 260 seconds]
kil0byte has quit [Ping timeout: 272 seconds]
* Spitfire shrugs
gregorg has quit [Ping timeout: 272 seconds]
ZadYree has quit [Ping timeout: 272 seconds]
jglauche has quit [Ping timeout: 272 seconds]
contradictioned_ has quit [Ping timeout: 272 seconds]
jglauche has joined #ruby
<Spitfire> Didn't know there was a professional code of conduct for the people who run pastebin sites.
gregorg has joined #ruby
|jemc| has joined #ruby
<poutine> You should just feel bad if you're soliciting internet strangers to give you money with a sob story, knowing the reason they use your site has nothing to do with their cause
contradictioned has joined #ruby
<dcope> poutine: meh, he's family member needs money for medical bills and pastie.org has never had ads / charged
<dcope> seems fine to me
ZadYree has joined #ruby
s3itz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fmcgeough has quit [Quit: fmcgeough]
kil0byte has joined #ruby
zipper has quit [Quit: bye bros]
* sevenseacat hides all of the messages
<dcope> anyways, i don't get why this isn't redirecting
rickruby has quit [Remote host closed the connection]
tsykoduk is now known as zz_tsykoduk
jlast has quit [Remote host closed the connection]
Shidash has quit [Quit: Leaving.]
jlast has joined #ruby
RichardBaker has joined #ruby
freerobby has quit [Quit: Leaving.]
Zeeraw has joined #ruby
natevick has joined #ruby
allaire has joined #ruby
Methylated has quit [Quit: Leaving.]
mfridh has quit [Read error: Connection reset by peer]
mmcdaris has joined #ruby
jlast has quit [Ping timeout: 260 seconds]
natevick has quit [Client Quit]
coderhs has quit [Ping timeout: 245 seconds]
<volty> the world is free and should remain free: everybody free to beg in whatever way he feels right // it all depends on the respective needs, on which we know nothing
Guest37773 has quit [Ping timeout: 248 seconds]
<unstable> Is there an addressable gem but for file names/directories?
<volty> attributing «unprofessional» is snobby
<banisterfiend> volty go to sleep
<banisterfiend> it's late where you are ;)
otherj has joined #ruby
<volty> in few minutes, dear :)
zz_tsykoduk is now known as tsykoduk
otherj has quit [Max SendQ exceeded]
justsee has joined #ruby
otherj has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
otherj has quit [Max SendQ exceeded]
Zeeraw has quit [Read error: Connection reset by peer]
otherj has joined #ruby
otherj has quit [Max SendQ exceeded]
psyl0n has quit [Quit: psyl0n]
mercwithamouth has joined #ruby
<volty> before I want to say goodbye to coin souls that spit sentences and judgements -- the understairs intelligence :)
mois3x_ has joined #ruby
<volty> do the opposite: be professional! Open you own pastebin free of beg site!
mois3x_ has left #ruby [#ruby]
<volty> but you won't! you wake up just to spit on others
<volty> misery
volty has quit [Quit: Konversation terminated!]
schickung has quit [Quit: schickung]
kil0byte has quit [Remote host closed the connection]
heidi has joined #ruby
vlad_starkov has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
heftig_ has joined #ruby
rickruby has joined #ruby
nutella has joined #ruby
nutella is now known as Guest64979
am3n has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
Hanmac has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
petey___ has joined #ruby
<dcope> i figured out the problem
tsykoduk is now known as zz_tsykoduk
zz_tsykoduk is now known as tsykoduk
<dcope> why in the ever loving hell is #code on net http response object a string?!
varfoo has joined #ruby
thepumpkin has joined #ruby
pu22l3r has quit [Remote host closed the connection]
am3n has quit [Ping timeout: 256 seconds]
pu22l3r has joined #ruby
petey__ has quit [Read error: Operation timed out]
gyre007 has quit [Remote host closed the connection]
<shiney> i'd guess it's because the error code is a string of numbers, and has no meaning as a numeric value
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shiney> code + 1 really doesn't mean anything
mengu has joined #ruby
sailias has quit [Ping timeout: 245 seconds]
<dcope> shiney: it's not an error code, it's a response code
jaimef has quit [Excess Flood]
<dcope> i guess the 'ruby' way to do this is to compare classes to see if the response is a HTTPRedirection
<shiney> i stand by what i said, even though i used the wrong word
thepumpkin has quit [Ping timeout: 248 seconds]
<shiney> it's just a rationalization though
<shiney> i'm not vouching for the decision
pu22l3r has quit [Ping timeout: 268 seconds]
mmcdaris has quit [Quit: mmcdaris]
smathieu has joined #ruby
mmcdaris has joined #ruby
jlast has joined #ruby
<unstable> How can I read all the elements in an array except the last one?
mengu has quit [Ping timeout: 246 seconds]
<unstable> Array[0..-2].each
<unstable> That works, nevermind.
freerobby has joined #ruby
randomnick_ has quit [Quit: Leaving]
jaimef has joined #ruby
mercwithamouth has quit [Ping timeout: 272 seconds]
smathieu has quit [Ping timeout: 260 seconds]
pu22l3r has joined #ruby
earthquake has quit [Quit: earthquake]
freerobby has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
adjo_ has quit [Ping timeout: 240 seconds]
adjo has quit [Ping timeout: 240 seconds]
Guest64979 has quit [Ping timeout: 245 seconds]
jlast has quit [Ping timeout: 240 seconds]
earthquake has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
petey___ has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 245 seconds]
petey__ has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Hobogrammer has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 240 seconds]
Hobogrammer has joined #ruby
fixl has joined #ruby
brianpWins has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
coca_rails has joined #ruby
tsykoduk is now known as zz_tsykoduk
nisstyre has quit [Quit: Leaving]
edwardly has quit [Read error: Operation timed out]
mixel has quit [Quit: mixel]
<bnagy> dcope: the ruby way is pretty much never to compare classes
<dcope> bnagy: ok so you can either convert response code from a string to an int (which is stupid and just awful) or you can to see if the response falls within a class
<dcope> which has full inheritence of different response types... so, that's what is suppsoed to be done
zz_tsykoduk is now known as tsykoduk
<dcope> *jazz hands*
dcope has left #ruby [#ruby]
Jetchisel has joined #ruby
s3itz has joined #ruby
<samfisher> guys, how can I parse the USD value from here? http://www.bnr.ro/nbrfxrates.xml
coca_rails has quit []
idiocrash has joined #ruby
<samfisher> i'm using nokogiri but i find that it's difficult to get anything other than te <Body>
<bnagy> use nokogiri but better
<samfisher> huh?
<bnagy> which I don't know how to do, btw, I just know from experience that it's your best option for parsing xml
<samfisher> ok
<samfisher> thanks
<bnagy> the docs are a bit thin, from memory :(
<bnagy> stick around, someone else probably knows
Davey has quit [Quit: Computer has gone to sleep.]
johnnyfuchs has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
cfi30 has joined #ruby
<unstable> I'm looking for a program to force me to document/use certain idioms.
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
xk_id has quit [Quit:
am3n has joined #ruby
mary5030 has joined #ruby
earthquake has quit [Quit: earthquake]
vlad_starkov has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
MrPot4to has joined #ruby
mrpot4to_ has joined #ruby
guns has joined #ruby
dma_ has quit [Remote host closed the connection]
bugsinlights has quit [Remote host closed the connection]
dma_ has joined #ruby
sailias has joined #ruby
bugsinlights has joined #ruby
Davey has joined #ruby
ananthakumaran has joined #ruby
lyanchih has quit [Quit: lyanchih]
platypine has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 272 seconds]
bugsinlights has quit [Remote host closed the connection]
dma_ has quit [Ping timeout: 248 seconds]
zzz_taion809 is now known as taion809
cburyta has quit [Remote host closed the connection]
<unstable> Something like this basically, but for ruby.
cburyta has joined #ruby
tsykoduk is now known as zz_tsykoduk
peregrine81 has quit []
taternuts has quit [Ping timeout: 245 seconds]
peregrine81 has joined #ruby
cburyta_ has joined #ruby
peregrine81 has quit [Client Quit]
xk_id has joined #ruby
smathieu has joined #ruby
cburyta has quit [Read error: Connection reset by peer]
zz_tsykoduk is now known as tsykoduk
heidi has quit [Quit: Leaving.]
horseislikeaman has joined #ruby
dma_ has joined #ruby
heidi has joined #ruby
freerobby has joined #ruby
justsee has quit [Ping timeout: 260 seconds]
justsee has joined #ruby
jlast has joined #ruby
dma_ has quit [Ping timeout: 240 seconds]
smathieu has quit [Ping timeout: 272 seconds]
freerobby has quit [Ping timeout: 240 seconds]
radic has joined #ruby
jlast has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
johnnyfuchs has quit [Quit: Leaving.]
radic_ has quit [Ping timeout: 246 seconds]
Methylated has joined #ruby
kobain has quit []
i_s has joined #ruby
pdimitrov has quit [Read error: Operation timed out]
pdimitrov has joined #ruby
pr0ggie has quit [Ping timeout: 245 seconds]
ninegrid has joined #ruby
IceDragon has quit [Quit: Space~~~]
rickruby has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
haukur has joined #ruby
<haukur> How would one write a class to be callabe as such: SomeClass(arg1, arg2)?
<bnagy> in another language
<haukur> bnagy: it's back to Python then, I guess
haukur has quit [Client Quit]
<bnagy> you can make constant methods that _look_ like that
<bnagy> or you can add methods to classes SomeClass.meth
devoldmx has joined #ruby
mary5030 has quit [Remote host closed the connection]
TheShaun has quit [Quit: ZNC - http://znc.in]
OdNairy has joined #ruby
i_s has quit [Ping timeout: 245 seconds]
TheShaun has joined #ruby
axl_ has joined #ruby
<poutine> Most novelty languages leave you with some particular aspect that sticks with you, like, "Oh in TCL everything in a string", "I can't believe how much you can do all that with 8 chracters, and it's slightly more readable than perl", or "Common LISP is a cool concept, but I don't think I'll get much done in it". With Ruby, that thing that sits with me is, "This language is horrible, it reeks of someone going 'hey it can't do
<poutine> this', and someone randomly coming up with a way of making it work, like encodings in comments, specifying quote style with %q/%Q, making dedicated keywords for simple negation. This is just horrible, and you should all feel bad. Both the people creating this ecosystem, and the people who feed off of it, you're all terrible terrible people"
<poutine> OOps the 8 characters thing was about brainf**k
sailias has quit [Quit: Leaving.]
banisterfiend has quit [Quit: Computer has gone to sleep.]
hiyosi has quit [Ping timeout: 245 seconds]
pr0ggie has joined #ruby
yacks has quit [Ping timeout: 240 seconds]
am3n has joined #ruby
axl_ has quit [Ping timeout: 240 seconds]
<bnagy> uh...
<zzak> wi 1
<bnagy> cool story?
ananthakumaran has quit [Quit: Leaving.]
am3n has quit [Ping timeout: 256 seconds]
fboudreau has joined #ruby
fboudreau has left #ruby [#ruby]
<jblack> No doubt he'll explain how ruby is a leftover ww2 german plot.
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
duracrisis has joined #ruby
<poutine> jblack, Do you have anything to do with ruby development?
<poutine> I remember when you owned DALnet's #linux and lost time after time to me in chess about 10 years ago
<jblack> nope. I just use the language.
<poutine> also seem to remember you having some involvement with ubuntu
dmiller has joined #ruby
<jblack> Yeah, I worked there for about a year and a half
vlad_starkov has joined #ruby
hiyosi has joined #ruby
<jblack> I didn't use ruby back then.
sevenseacat has quit [Remote host closed the connection]
sevenseacat has joined #ruby
sorbo_ has quit [Quit: sorbo_]
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
cburyta_ has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cburyta has joined #ruby
samfisher has quit [Read error: Operation timed out]
Monie has joined #ruby
osvico has joined #ruby
ewnd9 has joined #ruby
thepumpkin has joined #ruby
bklane has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 268 seconds]
pu22l3r has joined #ruby
cburyta has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
freerobby has joined #ruby
<shevy> we all did mistakes when we were young
thepumpkin has quit [Ping timeout: 240 seconds]
znode has joined #ruby
petey__ has quit [Ping timeout: 245 seconds]
petey__ has joined #ruby
baroquebobcat has joined #ruby
noop has joined #ruby
timonv has quit [Ping timeout: 246 seconds]
<jblack> =)
baroquebobcat has quit [Client Quit]
ewnd9 has quit [Max SendQ exceeded]
smathieu has joined #ruby
burgess has quit [Quit: ^zzz]
Tearan has quit [Quit: Sleepy Badger....]
godd2 has quit [Ping timeout: 250 seconds]
mary5030 has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
rickruby has joined #ruby
rickruby has quit [Remote host closed the connection]
epta has quit [Ping timeout: 265 seconds]
epta has joined #ruby
rickruby has joined #ruby
tonni_ has joined #ruby
tonni has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Quit: Leaving.]
pdimitrov has quit [Read error: Operation timed out]
DanKnox is now known as DanKnox_away
pdimitrov has joined #ruby
s3itz has quit [Quit: Textual IRC Client: www.textualapp.com]
nutella has joined #ruby
pr0ggie has quit [Ping timeout: 248 seconds]
__main__ has quit [Ping timeout: 245 seconds]
nutella is now known as Guest65648
znode has quit [Remote host closed the connection]
zodiak has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
bklane has joined #ruby
albioner has joined #ruby
pu22l3r has quit [Remote host closed the connection]
duracrisis has quit [Quit: WeeChat 0.4.2]
pu22l3r has joined #ruby
tomzx_mac has quit [Ping timeout: 260 seconds]
__main__ has joined #ruby
cburyta has joined #ruby
TheShaun is now known as TheShaun|AFK
<Methylated> Anyone have experience with perftools.rb / pprof.rb and ruby apps? How do I get pprof to show source/line in callgrind?
Hanmac has quit [Quit: Leaving.]
lyanchih has joined #ruby
pu22l3r has quit [Ping timeout: 268 seconds]
cburyta has quit [Ping timeout: 246 seconds]
pr0ggie has joined #ruby
freerobby has quit [Quit: Leaving.]
am3n has joined #ruby
edwardly has joined #ruby
Tearan has joined #ruby
bklane has quit [Quit: Leaving...]
zigomir has joined #ruby
krz has joined #ruby
edin has quit [Quit: EliteBNC free bnc service - http://elitebnc.org - be a part of the Elite!]
mary5030 has quit [Remote host closed the connection]
thams has quit [Quit: thams]
am3n has quit [Ping timeout: 256 seconds]
achru has joined #ruby
mary5030 has joined #ruby
albioner is now known as albioner-afk
thams has joined #ruby
Tearan has quit [Ping timeout: 272 seconds]
albioner-afk is now known as albioner
xk_id has quit [Quit:
Guest65648 has quit [Ping timeout: 241 seconds]
rellin has quit [Read error: Connection reset by peer]
samfisher has joined #ruby
mary5030 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
DanKnox_away is now known as DanKnox
lupine has quit [Ping timeout: 245 seconds]
stytown has joined #ruby
<stytown> hi everyone
allaire has quit []
<stytown> wondering if anyone has a few minutes to help me out
t_p has joined #ruby
edwardly has quit [Ping timeout: 240 seconds]
CaptainJet has quit []
<bnagy> stytown: google around to fix your certificate verify error
<bnagy> there are a variety of causes and fixes
zeade has quit [Quit: Leaving.]
xjiujiu has joined #ruby
OdNairy has joined #ruby
ananthakumaran has joined #ruby
freerobby has joined #ruby
Briareos1 has quit [Remote host closed the connection]
graydot has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
Tearan has joined #ruby
smathieu has joined #ruby
zodiak has joined #ruby
mengu has joined #ruby
r0bby_ is now known as robbyoconnor
BizarreCake has joined #ruby
freerobby1 has quit [Ping timeout: 246 seconds]
Vivekananda has quit [Quit: Ex-Chat]
smathieu has quit [Ping timeout: 246 seconds]
Methylated has quit [Quit: Leaving.]
sayan has joined #ruby
zarul has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 260 seconds]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
mengu has quit [Ping timeout: 272 seconds]
dhilipsiva has joined #ruby
yhsgw has joined #ruby
marcgg has quit [Ping timeout: 272 seconds]
edin has joined #ruby
nari has joined #ruby
s3itz has joined #ruby
s3itz has quit [Max SendQ exceeded]
marcdel has joined #ruby
dmiller has quit [Remote host closed the connection]
Monie has quit [Ping timeout: 260 seconds]
dmiller has joined #ruby
yacks has joined #ruby
osvico has quit [Ping timeout: 260 seconds]
Targen has quit [Ping timeout: 246 seconds]
dmiller_ has joined #ruby
Alina-malina has quit [Quit: Leaving]
dmiller_ has quit [Client Quit]
dmiller has quit [Read error: Connection reset by peer]
s3itz has joined #ruby
cburyta has joined #ruby
noop has quit [Ping timeout: 240 seconds]
am3n has joined #ruby
edwardly has joined #ruby
cburyta has quit [Ping timeout: 245 seconds]
rickmasta has joined #ruby
cfi30 has quit [Quit: WeeChat 0.4.2]
am3n has quit [Ping timeout: 256 seconds]
Monie has joined #ruby
Lewix has joined #ruby
lewis has joined #ruby
Lewix has joined #ruby
rellin has joined #ruby
timonv has joined #ruby
marcgg has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
edwardly has quit [Ping timeout: 245 seconds]
RichardBaker has quit [Quit: RichardBaker]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bish has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
jkhwan has joined #ruby
Muz has quit [Ping timeout: 245 seconds]
Muz has joined #ruby
Bish has joined #ruby
Alina-malina has joined #ruby
vlad_starkov has joined #ruby
lethjakman has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
chinkung has quit [Read error: Connection reset by peer]
varfoo has joined #ruby
lethjakm1 has quit [Ping timeout: 272 seconds]
yhsgw has left #ruby [#ruby]
OdNairy has quit [Ping timeout: 245 seconds]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
TheShaun|AFK is now known as TheShaun
t_p has quit [Quit: Computer has gone to sleep.]
thepumpkin has joined #ruby
OdNairy has joined #ruby
tsykoduk is now known as zz_tsykoduk
xjiujiu has quit [Ping timeout: 240 seconds]
jkhwan has quit [Ping timeout: 272 seconds]
DonRichie has joined #ruby
thepumpkin has quit [Ping timeout: 272 seconds]
freerobby has joined #ruby
smathieu has joined #ruby
foobArrr has quit [Ping timeout: 245 seconds]
karls0n has quit [Ping timeout: 272 seconds]
foobArrr has joined #ruby
freerobby has quit [Ping timeout: 272 seconds]
petey__ has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 240 seconds]
mengu has joined #ruby
fridim_ has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
BizarreCake has quit [Remote host closed the connection]
azerton has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
newbiehacker has joined #ruby
jkhwan has joined #ruby
azerton has quit [Read error: Connection reset by peer]
nisstyre has joined #ruby
zz_tsykoduk is now known as tsykoduk
am3n has joined #ruby
pranny has joined #ruby
Rocksurf70_ has joined #ruby
pranny has left #ruby [#ruby]
apeiros has quit [Remote host closed the connection]
ayaz has joined #ruby
apeiros has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
Rocksurf70_ has quit [Client Quit]
cburyta has joined #ruby
Rocksurf70 has joined #ruby
monkegjinni has joined #ruby
noop has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
monkegjinni has quit [Remote host closed the connection]
tjad has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
cburyta has quit [Ping timeout: 240 seconds]
h_kon has joined #ruby
lewis has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
pr0ggie has quit [Ping timeout: 240 seconds]
pr0ggie has joined #ruby
lewis has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
|jemc| has quit [Ping timeout: 245 seconds]
foobArrr has quit [Ping timeout: 240 seconds]
pdimitrov has quit [Ping timeout: 272 seconds]
zarul has joined #ruby
MrPot4to has quit [Read error: Connection reset by peer]
pdimitrov has joined #ruby
foobArrr has joined #ruby
MrPot4to has joined #ruby
cina has joined #ruby
Rocksurf70 has quit [Remote host closed the connection]
lewis has quit [Ping timeout: 240 seconds]
kayloos has quit [Remote host closed the connection]
DonRichie has quit [Quit: Verlassend]
blaxter_ has joined #ruby
monkegjinni has joined #ruby
DonRichie has joined #ruby
_md has joined #ruby
Rocksurf70 has joined #ruby
stytown has quit []
Theravadan has quit [Ping timeout: 246 seconds]
wereHamster has quit [Ping timeout: 272 seconds]
WillAmes has quit [Remote host closed the connection]
wereHamster has joined #ruby
Rocksurf70 has quit [Remote host closed the connection]
WillAmes has joined #ruby
chiel has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
chiel has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
holguin has joined #ruby
xjiujiu has joined #ruby
tjad has joined #ruby
wildroman2 has joined #ruby
idiocrash has quit [Remote host closed the connection]
Xeago has joined #ruby
idiocrash has joined #ruby
idiocrash has quit [Remote host closed the connection]
Freeaqingme has left #ruby ["Leaving"]
nstdloop has quit [Remote host closed the connection]
idiocrash has joined #ruby
lsmola has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
junx1989 has joined #ruby
lethjakman has quit [Ping timeout: 245 seconds]
xjiujiu has joined #ruby
zigomir has quit [Ping timeout: 272 seconds]
cina has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
dagobah has joined #ruby
dawkirst has joined #ruby
idiocrash has quit [Ping timeout: 272 seconds]
smathieu has joined #ruby
skaflem has joined #ruby
samfisher has quit [Ping timeout: 245 seconds]
freerobby has quit [Ping timeout: 260 seconds]
aryaching_ has quit [Read error: Connection reset by peer]
Deele has joined #ruby
aryaching has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
edwardly has joined #ruby
leonidlm has joined #ruby
pyrac has joined #ruby
_md has quit [Quit: Leaving...]
bigkevmcd has joined #ruby
jbpros has joined #ruby
diegoviola has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
am3n has joined #ruby
kayloos has joined #ruby
junx1989 has quit [Quit: Leaving]
jmimi has joined #ruby
s2013 has quit [Ping timeout: 245 seconds]
mrfoto has joined #ruby
LarsSmit has joined #ruby
jbpros has quit [Read error: Connection reset by peer]
am3n has quit [Ping timeout: 256 seconds]
psyl0n has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
OdNairy has joined #ruby
obs has joined #ruby
nisstyre has quit [Ping timeout: 240 seconds]
kayloos has quit []
monkegjinni has quit [Remote host closed the connection]
ch0mskiii has joined #ruby
monkegjinni has joined #ruby
chomskiii has quit [Read error: Connection reset by peer]
cburyta has joined #ruby
psyl0n has quit [Quit: psyl0n]
albioner has quit [Quit: Laptop went to sleep. ZZZzzz…]
tvw has joined #ruby
tboerger has joined #ruby
monkegjinni has quit [Ping timeout: 241 seconds]
heftig_ is now known as heftig
cburyta has quit [Ping timeout: 246 seconds]
Theravadan has joined #ruby
jkhwan has quit [Remote host closed the connection]
apeiros has joined #ruby
Al_ has joined #ruby
anderse has joined #ruby
dodosan has joined #ruby
holguin has quit [Remote host closed the connection]
noname001 has joined #ruby
gerety has joined #ruby
zigomir has joined #ruby
aganov has joined #ruby
anderse has quit [Quit: anderse]
relix has joined #ruby
Al_ has quit [Quit: Al_]
dodosan has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
wildroman2 has quit [Remote host closed the connection]
chinychinchin has joined #ruby
gerety has quit [Remote host closed the connection]
Theravadan has quit [Ping timeout: 246 seconds]
Al_ has joined #ruby
pedda has joined #ruby
juan__ has quit [Remote host closed the connection]
samfisher has joined #ruby
samfisher has joined #ruby
samfisher has quit [Changing host]
vlad_starkov has quit [Read error: Connection reset by peer]
ahawkins has joined #ruby
casad has joined #ruby
justsee has quit [Ping timeout: 272 seconds]
azerton has joined #ruby
Al_ has quit [Client Quit]
einarj has joined #ruby
fgh has joined #ruby
blaxter_ is now known as blaxter
marcgg_ has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
azerton has quit [Quit: azerton]
thepumpkin has joined #ruby
goganchic has joined #ruby
marcgg has quit [Ping timeout: 245 seconds]
LMolr has joined #ruby
jhaals has joined #ruby
bassclef has quit [Ping timeout: 245 seconds]
Tearan has quit [Quit: Sleepy Badger....]
vlad_starkov has joined #ruby
justsee has joined #ruby
thepumpkin has quit [Ping timeout: 245 seconds]
jhaals_ has joined #ruby
claymore has joined #ruby
freerobby has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
jhaals has quit [Ping timeout: 240 seconds]
Tearan has joined #ruby
joschi_ is now known as joschi
adjo has joined #ruby
adjo_ has joined #ruby
zz_michael_mbp is now known as michael_mbp
juan_ has joined #ruby
smathieu has joined #ruby
sayan has joined #ruby
freerobby has quit [Ping timeout: 245 seconds]
simoz has joined #ruby
petey__ has joined #ruby
am3n has joined #ruby
smathieu has quit [Ping timeout: 272 seconds]
anderse has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
colonolGron has joined #ruby
pyrac has quit [Quit: pyrac]
coca_rails has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
rickruby has quit [Remote host closed the connection]
zodiak has quit [Ping timeout: 248 seconds]
xjiujiu has joined #ruby
Guest799 is now known as yvemath
coca_rails has left #ruby [#ruby]
coca_rails has joined #ruby
iaj has quit [Ping timeout: 240 seconds]
rickruby has joined #ruby
camilasan has joined #ruby
zodiak has joined #ruby
joonty has quit [Quit: WeeChat 0.4.1]
Methylated has joined #ruby
Methylated has quit [Client Quit]
Xeago has joined #ruby
VTLob has joined #ruby
wildroman2 has joined #ruby
guns has quit [Quit: guns]
aryaching has quit [Ping timeout: 245 seconds]
zodiak has quit [Max SendQ exceeded]
pyrac has joined #ruby
zodiak has joined #ruby
rickruby has quit [Remote host closed the connection]
rickruby has joined #ruby
joonty has joined #ruby
s3itz has quit [Quit: Textual IRC Client: www.textualapp.com]
cburyta has joined #ruby
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has quit [Read error: Connection reset by peer]
drumusician has joined #ruby
mengu has joined #ruby
adambeynon has joined #ruby
wildroman2 has quit [Remote host closed the connection]
akemrir has joined #ruby
Astralum has joined #ruby
petey__ has quit [Remote host closed the connection]
marr has joined #ruby
n4dir has joined #ruby
cburyta has quit [Ping timeout: 245 seconds]
akemrir has quit [Client Quit]
zodiak has quit [Max SendQ exceeded]
zodiak has joined #ruby
<n4dir> I get a (Load Error) for example_actor_class when running git-buildpackage: https://gist.github.com/tornow/7289917
lupine has joined #ruby
<n4dir> I barely know ruby, but think the problem comes from celluloid/rspec.rb I tried to document that in the comments at gist.
coca_rails has quit [Remote host closed the connection]
sergicles has joined #ruby
mr_red has quit [Ping timeout: 240 seconds]
nvrch has joined #ruby
onefine has joined #ruby
mr_red has joined #ruby
iaj has joined #ruby
onefine has quit [Client Quit]
goganchic has quit []
jhaals_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jhaals has joined #ruby
coderhs has joined #ruby
coderhs has quit [Client Quit]
existensil has quit [Remote host closed the connection]
azerton has joined #ruby
Xeago_ has joined #ruby
dzan_ is now known as dzan
ananthakumaran1 has joined #ruby
user258467 has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
workmad3 has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
ananthakumaran has quit [Ping timeout: 272 seconds]
adamholt has quit [Ping timeout: 252 seconds]
Xeago_ has quit [Ping timeout: 245 seconds]
aa47f8 has joined #ruby
platypine has joined #ruby
platypine has joined #ruby
platypine has quit [Changing host]
adamholt has joined #ruby
sevenseacat has quit [Remote host closed the connection]
anderse has quit [Quit: anderse]
raphaelivan has joined #ruby
DanKnox is now known as DanKnox_away
TheShaun is now known as TheShaun|AFK
Methylated has joined #ruby
platypine has quit [Ping timeout: 245 seconds]
Al_ has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
TMM has joined #ruby
TMM has joined #ruby
TMM has quit [Changing host]
tonni_ has quit [Remote host closed the connection]
tonni has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
roflmaus has quit []
einarj has quit [Remote host closed the connection]
joost_like_toast has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
Al_ has left #ruby [#ruby]
azerton has quit [Read error: Connection reset by peer]
am3n has joined #ruby
freerobby has joined #ruby
popl has joined #ruby
popl has joined #ruby
foobArrr has quit [Ping timeout: 245 seconds]
tonni has quit [Ping timeout: 252 seconds]
Tearan has joined #ruby
Tearan has quit [Client Quit]
foobArrr has joined #ruby
einarj has quit [Ping timeout: 272 seconds]
tonni has joined #ruby
smathieu has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
freerobby has quit [Ping timeout: 272 seconds]
elaptics`away is now known as elaptics
diegoviola has quit [Quit: WeeChat 0.4.2]
himsin has joined #ruby
Rocksurf70 has joined #ruby
tobago has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
tobago has quit [Client Quit]
shaunbak_ has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
tobago has joined #ruby
tobago has quit [Changing host]
tobago has joined #ruby
Rocksurf70 has quit [Remote host closed the connection]
psyl0n has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
maroloccio has joined #ruby
tjad_ has joined #ruby
seoNinjaWarrior has quit [Ping timeout: 264 seconds]
<dzan> any idea why this grep gets me in an infinite loop?
<hoelzro> why are you rewinding after opening?
tjad has quit [Ping timeout: 272 seconds]
<hoelzro> and which loop is infinite here?
sergicles has quit [Quit: sergicles]
<apeiros> dzan: also `Regexp.new(Regexp.union(['a','b']), Regexp::IGNORECASE)` won't work the way you want
<dzan> apeiros, yeah it gives me a warning "flags ignored" haven't figured out why yet
<apeiros> because Regexp.new(already_regexp) is pointless
dhruvasagar has joined #ruby
<apeiros> it can't apply the flags on it retroactively
<apeiros> (Regexp.union returns a Regexp)
gasbakid has joined #ruby
<dzan> hoelzro, the script keeps going until I kill it then I get: http://pastebin.com/axqsr4m5
<dzan> apeiros, ok i'll look for some flag adding method :)
<hoelzro> that looks like uncontrolled recrusion to me
<hoelzro> *recursion
<apeiros> ^
<dzan> hoelzro, yeah and it's the grep for some reason I don't see
<hoelzro> dzan: could you paste the full source?
<apeiros> regexen do not call methods dzan
<apeiros> they are not responsible for your recursion
<dzan> hoelzro, I rewind because I had trouble with that before, I used .find twice and the second time without rewind it would start from where the last left off
<hoelzro> right
<hoelzro> but now you're opening the file, and calling rewind on it right away
<hoelzro> which will be a no-op, and a wasted system cal
<hoelzro> *call
<hoelzro> it's not *that* big a deal, but I just thought I'd point it out =)
<dzan> hoelzro, I cut out some stuff in my paste :p
<RubyPanther> that would be a recursive descent engine instead of a regex
<bnagy> plus creating a new regexp evey time, which is wasteful
weeb1e has quit [Read error: Connection reset by peer]
threesome has joined #ruby
<hoelzro> bnagy: ah, good call!
weeb1e has joined #ruby
ItSANg___ has quit [Ping timeout: 265 seconds]
<dzan> apeiros, so I'd best join my array strings into 1 with '|' and then create a new regex?
<bnagy> plus I don't know what list_files does but it's suspicious when it's trivial to do that with builtins
einarj has joined #ruby
<dzan> hoelzro, whole thing: http://paste.debian.net/63871/ and no worries this is not something evil :)
<bnagy> oh and if blah.grep(regex) is probably better as an any? {|e| r.match? e}
<dzan> i'm new to ruby obviously so all tip are welcome!
<bnagy> but minor optimisations are ( possibly ) minor
<dzan> :)
cburyta has joined #ruby
banisterfiend has joined #ruby
<hoelzro> hmm
<hoelzro> well
<hoelzro> process_files calls extract
<hoelzro> which calls process_files
<hoelzro> so you have what seems to be unbounded mutual recursion here
apeiros_ has joined #ruby
<hoelzro> so extract on line 163 is a variable
<hoelzro> extract on line 191
<hoelzro> is a method call
<hoelzro> which is probably causing some confusion
<apeiros_> dzan: I've no telepathic abilities, so I can't tell you what's best. I don't know your code.
* apeiros_ off now anyway - work
TheShaun|AFK is now known as TheShaun
apeiros has quit [Ping timeout: 245 seconds]
anderson has joined #ruby
Azulinho has joined #ruby
Zai00 has joined #ruby
cburyta has quit [Ping timeout: 272 seconds]
mrpot4to_ has quit [Read error: Connection reset by peer]
MrPot4to has quit [Read error: Connection reset by peer]
rickruby has quit [Remote host closed the connection]
ItSANgo has joined #ruby
MrPot4to has joined #ruby
<dzan> hoelzro, i'm processing :)
<dzan> hoelzro, ok I see
<dzan> hoelzro, meant the one on 191 to be a variable, i'll change names :)
MrZYX|off is now known as MrZYX
mrpot4to_ has joined #ruby
Foredoomed has quit [Quit: Going offline, see ya! (www.adiirc.com)]
aryaching has joined #ruby
popl_ has joined #ruby
popl_ has joined #ruby
popl_ has quit [Changing host]
wildroman2 has joined #ruby
pranny1 has joined #ruby
pranny2 has joined #ruby
allsystemsarego has joined #ruby
popl has quit [Ping timeout: 240 seconds]
am3n has joined #ruby
leonidlm has quit [Ping timeout: 272 seconds]
wildroman2 has quit [Ping timeout: 240 seconds]
pranny1 has quit [Ping timeout: 272 seconds]
popl_ is now known as popl
jlebrech has joined #ruby
pranny2 has quit [Quit: Leaving.]
zipper has joined #ruby
monkegjinni has joined #ruby
sunnymolini has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
tonni has joined #ruby
monkegjinni has joined #ruby
am3n has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
ephemerian has joined #ruby
rickruby has joined #ruby
tonni has quit [Ping timeout: 245 seconds]
thepumpkin has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
monkegjinni has joined #ruby
leonidlm has joined #ruby
DouweM has joined #ruby
thepumpkin has quit [Ping timeout: 248 seconds]
niklasb has joined #ruby
am3n has joined #ruby
freerobby has joined #ruby
n4dir has quit [Quit: Leaving.]
tonni has joined #ruby
gasbakid has quit [Ping timeout: 240 seconds]
freerobby has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
sepp2k has joined #ruby
pyrac has quit [Quit: pyrac]
falood has quit []
dangerousdave has joined #ruby
hiall has quit [Quit: hiall]
danialr has joined #ruby
monkegjinni has quit [Remote host closed the connection]
danialr has left #ruby [#ruby]
tziOm has joined #ruby
smathieu has quit [Ping timeout: 248 seconds]
am3n has quit [Remote host closed the connection]
yacks has quit [Quit: Leaving]
ldnunes has joined #ruby
adjo has quit [Ping timeout: 245 seconds]
adjo_ has quit [Ping timeout: 245 seconds]
heftig has quit [Ping timeout: 245 seconds]
simoz has quit [Ping timeout: 272 seconds]
gasbakid has joined #ruby
includex has joined #ruby
Astral_ has joined #ruby
raphaelivan has quit [Quit: Leaving.]
lkba has joined #ruby
Astralum has quit [Ping timeout: 245 seconds]
kennyvb has quit [Quit: ZNC - http://znc.in]
ItSANgo has quit [Ping timeout: 240 seconds]
h_kon has quit [Remote host closed the connection]
fedalto has joined #ruby
Squarepy has joined #ruby
cburyta has joined #ruby
h_kon_ has joined #ruby
Xeago_ has joined #ruby
petey__ has joined #ruby
psyl0n has quit [Quit: psyl0n]
ehaliewicz has quit [Ping timeout: 245 seconds]
drumusician has quit [Ping timeout: 272 seconds]
cburyta has quit [Ping timeout: 245 seconds]
aryaching has quit [Ping timeout: 272 seconds]
LMolr has quit [Ping timeout: 245 seconds]
bassclef has joined #ruby
bassclef is now known as Guest3813
petey__ has quit [Ping timeout: 272 seconds]
leonidlm has quit [Ping timeout: 272 seconds]
tjad has joined #ruby
andrewstewart has quit [Read error: Connection reset by peer]
andrewstewart has joined #ruby
tjad_ has quit [Ping timeout: 272 seconds]
robert_ has quit [Ping timeout: 252 seconds]
Xeago_ has quit [Ping timeout: 272 seconds]
ace_striker has joined #ruby
mrpot4to_ has quit [Remote host closed the connection]
MrPot4to has quit [Read error: Connection reset by peer]
brtdv has joined #ruby
yacks has joined #ruby
ahawkins is now known as ahawkins|swim
pyrac has joined #ruby
coderhs has joined #ruby
camilasan has quit [Remote host closed the connection]
himsin has quit [Quit: himsin]
__main__ has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasa_ has joined #ruby
__main__ has joined #ruby
leonidlm has joined #ruby
D4T has joined #ruby
mengu has joined #ruby
himsin has joined #ruby
avril14th has joined #ruby
graydot has quit [Quit: graydot]
psyl0n has joined #ruby
<zipper> Just learnt about rakefiles and rake in ruby
<clocKwize> cool
KTMBoi88 has quit [Read error: Connection reset by peer]
plotter has joined #ruby
am3n has joined #ruby
<zipper> but I don't think I can understand them in a day :C
gyre007 has joined #ruby
pyrac has quit [Quit: pyrac]
<clocKwize> what do you need to know?
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
khushildep has joined #ruby
brtdv has quit []
am3n has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
mercwithamouth has joined #ruby
h_kon_ has quit [Remote host closed the connection]
heftig has joined #ruby
kisp has joined #ruby
mmcdaris has joined #ruby
freerobby has quit [Ping timeout: 245 seconds]
n4dir has joined #ruby
smathieu has joined #ruby
hiall has joined #ruby
n4dir has left #ruby [#ruby]
Guest65670 has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
sec_ has joined #ruby
himsin has quit [Quit: himsin]
bigkevmcd has quit [Ping timeout: 245 seconds]
khushildep_ has joined #ruby
mmcdaris has quit [Client Quit]
<_br_> Rakefiles? Just a fancy Ruby specific DSL of Makefiles.
kisp has left #ruby [#ruby]
<_br_> Classical case of NIH syndrome.
banisterfiend has joined #ruby
bigkevmcd has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
rickruby has quit [Remote host closed the connection]
khushildep has quit [Ping timeout: 245 seconds]
khushildep_ is now known as khushildep
choobie has joined #ruby
tonni has quit [Remote host closed the connection]
brtdv has joined #ruby
hiroyuki has quit [Ping timeout: 240 seconds]
michael_mbp is now known as zz_michael_mbp
yacks has quit [Quit: Leaving]
sayan has quit [Ping timeout: 246 seconds]
Clooth has joined #ruby
Mekkis has quit [Ping timeout: 245 seconds]
shredding has joined #ruby
rickruby has joined #ruby
RDash has quit [Quit: Poweroff]
fightback has joined #ruby
petey__ has joined #ruby
fightback has quit [Max SendQ exceeded]
<zipper> YOU GUYS!!
<zipper> YOU HAVE TO WATCH SURPRISE KITTY
fightback has joined #ruby
vlad_starkov has joined #ruby
Stygia has joined #ruby
RDash has joined #ruby
cburyta has joined #ruby
lucazi has joined #ruby
cburyta has quit [Remote host closed the connection]
rickmasta has quit [Quit: Leaving...]
Mekkis has joined #ruby
azerton has joined #ruby
Zeeraw has joined #ruby
dv__ has quit [Ping timeout: 272 seconds]
Mekkis has quit [Max SendQ exceeded]
Mekkis has joined #ruby
shredding has quit [Quit: shredding]
Rocksurf70 has joined #ruby
asuka has quit [Ping timeout: 240 seconds]
fightback has quit [Quit: blackbagged]
sayan has joined #ruby
Rocksurf70 has left #ruby [#ruby]
azerton has quit [Read error: Connection reset by peer]
osvico has joined #ruby
shredding has joined #ruby
shredding has quit [Client Quit]
dv_ has joined #ruby
tonni has joined #ruby
Zeeraw has quit [Ping timeout: 240 seconds]
petey__ has quit [Remote host closed the connection]
asuka has joined #ruby
rickruby has quit [Remote host closed the connection]
Astralum has joined #ruby
azerton has joined #ruby
freerobby has joined #ruby
tsykoduk is now known as zz_tsykoduk
Astral_ has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
danshultz has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
am3n has joined #ruby
pipecloud has quit [Read error: Connection reset by peer]
pipework has joined #ruby
Zeeraw has joined #ruby
dyyylan has joined #ruby
am3n has quit [Ping timeout: 256 seconds]
taternuts has joined #ruby
p7r has joined #ruby
noop has quit [Ping timeout: 245 seconds]
Zeeraw has quit [Client Quit]
shaunbak_ has quit [Remote host closed the connection]
Zeeraw has joined #ruby
thepumpkin has joined #ruby
shaunbaker has joined #ruby
Zeeraw has quit [Client Quit]
Zeeraw has joined #ruby
Zeeraw is now known as zeeraw
jkamenik has joined #ruby
mephux has quit [Ping timeout: 245 seconds]
osvico has quit [Ping timeout: 246 seconds]
mephux has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
am3n has joined #ruby
schickung has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
thepumpkin has quit [Ping timeout: 272 seconds]
thyagobr has joined #ruby
larissa has joined #ruby
SilverKey has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mercwithamouth has quit [Ping timeout: 246 seconds]
azerton has quit [Read error: Connection reset by peer]
robert_ has joined #ruby
ravster has joined #ruby
VTLob has quit [Quit: VTLob]
varfoo has quit [Quit: WeeChat 0.4.0]
colonolGron has quit [Quit: Lost terminal]
smathieu has joined #ruby
Clooth has quit [Ping timeout: 272 seconds]
am3n has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
Bry8Star{T2 has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
vlad_starkov has joined #ruby
azerton has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
azerton has quit [Client Quit]
tjad_ has joined #ruby
maveonair has joined #ruby
mercwithamouth has joined #ruby
tjad has quit [Ping timeout: 260 seconds]
heftig has quit [Ping timeout: 248 seconds]
jonathanwallace1 has quit [Ping timeout: 245 seconds]
eka has joined #ruby
pyrac has joined #ruby
fgh has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
gyre007 has quit [Ping timeout: 240 seconds]
madb055 has joined #ruby
nerium has joined #ruby
<nerium> Anyone know how to install ruby-prof under osx 10.9?
cads has joined #ruby
yalue has joined #ruby
psyl0n has quit [Quit: psyl0n]
ace_striker has quit [Ping timeout: 250 seconds]
kaspergrubbe has joined #ruby
mikecmpbll has joined #ruby
tommyblue has quit [Ping timeout: 264 seconds]
h_kon has joined #ruby
newbiehacker has quit [Ping timeout: 245 seconds]
tommyblue has joined #ruby
_maes_ has quit [Read error: Connection reset by peer]
shredding has joined #ruby
hiroyuki has joined #ruby
am3n has joined #ruby
zz_tsykoduk is now known as tsykoduk
VTLob has joined #ruby
ixti has joined #ruby
pothibo has joined #ruby
xk_id has joined #ruby
ArchBeOS has joined #ruby
achru has quit [Remote host closed the connection]
achru has joined #ruby
xk_id has quit [Client Quit]
maveonair has quit [Ping timeout: 272 seconds]
ArchBeOS has quit [Read error: Connection reset by peer]
ArchBeOS has joined #ruby
achru has quit [Ping timeout: 240 seconds]
zipper has quit [Ping timeout: 260 seconds]
samfisher has quit [Ping timeout: 260 seconds]
xk_id has joined #ruby
elux has joined #ruby
am3n has quit [Remote host closed the connection]
t_p has joined #ruby
taternuts has quit [Ping timeout: 246 seconds]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ffranz has joined #ruby
psyl0n has joined #ruby
am3n has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 248 seconds]
zipper has joined #ruby
krawchyk has joined #ruby
psyl0n has quit [Client Quit]
havenwood has joined #ruby
pipework has quit [Disconnected by services]
kaspergrubbe has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
elux has quit [Quit: Leaving...]
tjad_ has quit [Quit: No Ping reply in 180 seconds.]
tsykoduk is now known as zz_tsykoduk
tjad has joined #ruby
shaunbaker has joined #ruby
iaj has quit [Ping timeout: 272 seconds]
am3n has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
derebos has joined #ruby
theRoUS has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
lsmola has quit [Ping timeout: 240 seconds]
heftig has joined #ruby
IceDragon has joined #ruby
stringoO has joined #ruby
iaj has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
mark_locklear has joined #ruby
coderhs has quit [Quit: Leaving]
gyre007 has joined #ruby
smathieu has joined #ruby
maveonair has joined #ruby
zigomir has quit [Quit: zigomir]
Lewix has joined #ruby
lewis has joined #ruby
t_p has quit [Ping timeout: 245 seconds]
ArchBeOS has quit [Quit: ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]]
maycon has joined #ruby
nonamehero has quit [Ping timeout: 245 seconds]
gyre007 has quit [Ping timeout: 272 seconds]
smathieu has quit [Ping timeout: 272 seconds]
polaco_zZz is now known as polaco
iamjarvo has joined #ruby
shadoi has quit [Ping timeout: 245 seconds]
Aryasam has joined #ruby
kaldrenon has joined #ruby
binaryplease has joined #ruby
cody-- has joined #ruby
wallerdev has joined #ruby
iamjarvo has quit [Remote host closed the connection]
ahawkins|swim has quit [Ping timeout: 246 seconds]
shadoi has joined #ruby
iamjarvo has joined #ruby
nerium has quit [Quit: nerium]
platzhirsch1 has joined #ruby
fuhgeddaboudit has quit [Read error: Operation timed out]
jerius has joined #ruby
<platzhirsch1> Any good idea to change the formatting of YAML.dump? I have an array of hashes and if I write it myself I add an extra new line after each hash
gtsiftsis has joined #ruby
allaire has joined #ruby
AndChat| has joined #ruby
nonamehero has joined #ruby
iamjarvo has quit [Ping timeout: 272 seconds]
adjo has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
adjo_ has joined #ruby
shaunbaker has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
shaunbaker has joined #ruby
Aryasam has quit [Ping timeout: 245 seconds]
himsin has joined #ruby
chinychinchin has quit [Read error: Connection reset by peer]
ahawkins|swim has joined #ruby
chinychinchin has joined #ruby
fightback has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
fightback has quit [Max SendQ exceeded]
breakingthings has joined #ruby
randomnick_ has joined #ruby
kaspergrubbe has joined #ruby
Catie has quit [Ping timeout: 272 seconds]
shaunbaker has quit [Ping timeout: 245 seconds]
t_p has joined #ruby
vpretzel has joined #ruby
Catie has joined #ruby
elux has joined #ruby
chinychinchin has quit [Ping timeout: 245 seconds]
nucatus has joined #ruby
dhilipsiva has quit [Remote host closed the connection]
dhilipsiva has joined #ruby
Monie has joined #ruby
kaspergrubbe has quit [Read error: Operation timed out]
rickmasta has joined #ruby
gasbakid_ has joined #ruby
relix has joined #ruby
burlyscudd has joined #ruby
gasbakid has quit [Ping timeout: 240 seconds]
dhilipsiva has quit [Ping timeout: 245 seconds]
h_kon has quit [Remote host closed the connection]
casad has quit [Remote host closed the connection]
tomzx_mac has joined #ruby
burlyscudd has quit [Client Quit]
schickung_ has joined #ruby
rickmasta has quit [Remote host closed the connection]
jibi has joined #ruby
tjad has quit [Ping timeout: 272 seconds]
devoldmx has quit [Ping timeout: 272 seconds]
mlpinit has joined #ruby
MrZYX|off is now known as MrZYX
freerobby has joined #ruby
devoldmx has joined #ruby
schickung has quit [Ping timeout: 245 seconds]
schickung_ is now known as schickung
devoldmx has quit [Read error: Connection reset by peer]
am3n has joined #ruby
sambao21 has joined #ruby
devoldmx has joined #ruby
fveillette has joined #ruby
<fveillette> Hii
<hoelzro> fveillette: hello
<fveillette> I'm working with chef server and i search a class or a method in ruby to check if a windows service running
<fveillette> does anybody here have a clue about that?
lfox has joined #ruby
freerobby has quit [Quit: Leaving.]
<platzhirsch1> How can I substitute a string with a regular expression by itself plus some addition characters to add
chinychinchin has joined #ruby
<tobiasvl> platzhirsch1: String#gsub
khushildep_ has joined #ruby
<apeiros_> #ruby needs a docbot
butterduckcake has joined #ruby
<havenwood> platzhirsch1: just just #sub if it is a single replacement, not repeating
<platzhirsch1> tobiasvl: yes, but I am struggling, for instance "test123".gsub(/\d/, '\1\\n')
<havenwood> s/just just/or just
<apeiros_> \\n is backslash-n
<butterduckcake> http://www.google.com is google's website
<platzhirsch1> where I want the result to be test123\n
<butterduckcake> !seen ape
<butterduckcake> @seen ape
<butterduckcake> !give
* apeiros_ kicks butterduckcake
<apeiros_> stop it
butterduckcake has left #ruby [#ruby]
samfisher has joined #ruby
samfisher has quit [Changing host]
samfisher has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
<apeiros_> platzhirsch1: and \1 is first capture - you don't have a capture
<apeiros_> I guess you wanted \0
<apeiros_> \0 is "full match"
lfox has quit [Client Quit]
<platzhirsch1> apeiros_: oh you are right
<platzhirsch1> great, now it works
phantasm66 has joined #ruby
khushildep has quit [Ping timeout: 260 seconds]
khushildep_ is now known as khushildep
maveonair has quit [Ping timeout: 240 seconds]
xjiujiu has quit [Remote host closed the connection]
<tobiasvl> in that use-case you can just do string + "\n" or "#{string}\n" though :P
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplex_ has joined #ruby
lfox has joined #ruby
jonahR has joined #ruby
<apeiros_> tobiasvl: '\\n' is not "\n", though
jlast has joined #ruby
<tobiasvl> oh right
leonidlm has quit [Ping timeout: 260 seconds]
nutella has joined #ruby
jxf has joined #ruby
nutella is now known as Guest22245
ravster has quit [Quit: Leaving.]
kaspergrubbe has joined #ruby
maveonair has joined #ruby
<platzhirsch1> tobiasvl: that is my full statement: catalog.to_yaml.gsub(/longitude: [-]?\d+[.]\d+\n+/, "\\0\n")
<platzhirsch1> appending after the longitude line an extra new line
MrZYX is now known as MrZYX|off
drag00n has joined #ruby
fuhgeddaboudit has joined #ruby
rickmasta has joined #ruby
thepumpkin has joined #ruby
dbrenaud is now known as dbRenaud
krawchyk_ has joined #ruby
ahawkins|swim has quit [Ping timeout: 272 seconds]
aryaching has joined #ruby
mmitchell has joined #ruby
iamjarvo has joined #ruby
devdazed has joined #ruby
nerium has joined #ruby
krawchyk has quit [Ping timeout: 272 seconds]
bluOxigen has quit [Ping timeout: 245 seconds]
larissa has quit [Quit: Leaving]
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
thepumpkin has quit [Ping timeout: 248 seconds]
SeySayux has quit [Ping timeout: 272 seconds]
freerobby has joined #ruby
mikesplain has joined #ruby
krawchyk_ has quit [Remote host closed the connection]
elux has quit [Quit: Leaving...]
zz_tsykoduk is now known as tsykoduk
lsmola has joined #ruby
xk_id has quit [Quit:
SeySayux has joined #ruby
jlast has quit [Ping timeout: 241 seconds]
leonidlm has joined #ruby
danielshi has joined #ruby
chinychinchin has quit [Ping timeout: 265 seconds]
aspires has joined #ruby
smathieu has joined #ruby
jlast has joined #ruby
Spleeze has quit [Quit: ZNC - http://znc.in]
chinychinchin has joined #ruby
carlyle has joined #ruby
petey__ has joined #ruby
Spleeze has joined #ruby
pyrac has quit [Quit: pyrac]
tjad has joined #ruby
kobain has joined #ruby
tiglog has joined #ruby
am3n has quit []
himsin has quit [Quit: himsin]
smathieu has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
chinychinchin has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
s2013 has joined #ruby
sergicles has joined #ruby
zeeraw has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
tobago has quit [Remote host closed the connection]
chinychinchin has joined #ruby
RORgasm has joined #ruby
devoldmx has joined #ruby
johnnyfuchs has joined #ruby
Xeago has quit [Ping timeout: 272 seconds]
sailias has joined #ruby
vlad_starkov has joined #ruby
krawchyk has joined #ruby
mikesplain has quit [Quit: WeeChat 0.4.2]
lsmola has quit [Ping timeout: 245 seconds]
platzhirsch1 has left #ruby [#ruby]
burlyscudd has joined #ruby
nerium has quit [Quit: nerium]
nerium has joined #ruby
hello_world has joined #ruby
hello_world has quit [Client Quit]
mikesplain has joined #ruby
pu22l3r has joined #ruby
ahawkins|swim has joined #ruby
hello_world_ has joined #ruby
jibi has quit [Quit: .]
blackmesa has joined #ruby
s2013 has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tomzx_mac has quit [Ping timeout: 248 seconds]
Hydhen has joined #ruby
mary5030 has joined #ruby
chinychinchin has quit [Quit: Konversation terminated!]
chinychinchin has joined #ruby
Guest3813 has quit [Ping timeout: 246 seconds]
chandlermelton1 has joined #ruby
chandlermelton1 has left #ruby [#ruby]
rehat has joined #ruby
shaunbak_ has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
flops has joined #ruby
Davey has joined #ruby
nerium has quit [Quit: nerium]
CaptainJet has joined #ruby
MrZYX|off is now known as MrZYX
nerium has joined #ruby
niklasb_ has joined #ruby
hashpuppy has joined #ruby
s2013 has joined #ruby
kevind has joined #ruby
<hashpuppy> does BigDecimal solve the rounding error that occurs with float?
polymar has joined #ruby
bean__ has joined #ruby
chinychinchin has quit [Ping timeout: 272 seconds]
axl_ has joined #ruby
zigomir has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
niklasb has quit [Ping timeout: 246 seconds]
<Mon_Ouie> Those errors won't happen for computations that you perform with them. Keep in mind that you still can't represent sqrt(2) or π exactly with them.
IceyEC has joined #ruby
chuk has joined #ruby
ahawkins|swim is now known as ahawkins
maveonair has quit [Ping timeout: 240 seconds]
maveonair has joined #ruby
interactionjaxsn has joined #ruby
<hashpuppy> thanks
aspires has quit [Quit: Adios]
maletor has joined #ruby
freezey has joined #ruby
xk_id has joined #ruby
LarsSmit has quit [Quit: Leaving.]
jbpros has joined #ruby
pyrac has joined #ruby
NutsEverywhere has joined #ruby
apeiros_ has quit [Remote host closed the connection]
simplex_ has quit [Quit: simplex_]
apeiros has joined #ruby
nerium has quit [Quit: nerium]
derebos has quit [Ping timeout: 245 seconds]
xk_id has quit [Client Quit]
skaflem has quit [Quit: This computer has gone to sleep]
nerium has joined #ruby
jibi has joined #ruby
tagrudev has quit [Read error: Connection reset by peer]
rickmasta has quit [Quit: Leaving...]
apeiros has quit [Ping timeout: 272 seconds]
wildroman has quit [Remote host closed the connection]
epta has quit [Quit: leaving]
wildroman has joined #ruby
gtsiftsis has quit [Quit: Leaving]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
wildroman has quit [Read error: Connection reset by peer]
Advocation has joined #ruby
hello_world_ has quit [Ping timeout: 250 seconds]
rickruby has joined #ruby
lsmola has joined #ruby
wildroman has joined #ruby
<jxf> Given a string of arbitrary, well-formed HTML text, how might I extract all <a> tags which are not inside parentheses?
lmickh has joined #ruby
Xeago has joined #ruby
_md has joined #ruby
_md has quit [Client Quit]
<havenwood> jxf: I'm curious why a tag would ever be in parens?
jonathanwallace1 has joined #ruby
<jxf> havenwood: I think you might be misunderstanding me. Consider, e.g., the fragment "Science (from Latin scientia, meaning "knowledge"[1])" where "knowledge" and "Latin" are a-tagged.
avril14th has quit [Remote host closed the connection]
Squarepy has quit [Ping timeout: 272 seconds]
<havenwood> jxf: ah, gotcha
<danielshi> jxf: are the parentheses also well-formed?
<jxf> danielshi: Yes.
<danielshi> I guess the most correct way is to use a proper HTML parser like nokogiri and check the text nodes
nerium has quit [Quit: nerium]
<jxf> danielshi: Well, one problem I had with Nokogiri is that I can't seem to find a way to get "<a> which are not in parentheses".
jkamenik has quit [Quit: Leaving.]
nerium has joined #ruby
<jxf> danielshi: There are a few naive approaches, like "regex-match each <a>-text and see if it's not in parentheses in the document, and if so accept that link".
jamblack has joined #ruby
<jxf> danielshi: But those fail pretty frequently. For example, if you do that on this sentence (where {}'s are links): "{Science} (from Latin scientia, meaning "knowledge") is a systematic enterprise that builds and organizes {knowledge} in the form of testable explanations and predictions about the {universe}."
maycon_ has joined #ruby
<danielshi> How about using a Nokogiri SAX parser and setting state on whether or not you're in a paren when you encounter text nodes?
aryaching has quit [Ping timeout: 272 seconds]
<jxf> danielshi: Then you'll accept "Science" and "universe" (correct), but reject "knowledge" (incorrect).
polymar has quit [Remote host closed the connection]
maycon has quit [Ping timeout: 272 seconds]
<jxf> danielshi: Yeah, I was hoping that "build your own parser" wasn't step #1 here. :)
Cope has joined #ruby
<danielshi> You should be able to add a few lines to `start_element` to handle text nodes and <a> elements
<Cope> I want to parse an XML document, very simply - just pull out the ontents of an element
<jxf> danielshi: Alrighty. So, something like "read every <p>, set a bit if you reached an open-paren, unset bit if you reached a close-paren, report every <a> when bit is unset"?
<Cope> I would like to use standard library 1.9.3
<Cope> ie not install nokogiri / someothergem
Czupa has joined #ruby
<Cope> is this a hiding to nothing? or is there now someing in core ruby that would be useful (and not too ugly / painful)
derebos has joined #ruby
<danielshi> jxf: yep. When a text node has multiple parens it might get a bit messy though, but it should work.
<jxf> Cope: REXML is part of the standard library.
xk_id has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
atmosx has joined #ruby
ananthakumaran has joined #ruby
<jxf> Cope: d = REXML::Document.new(xml); movies = d.elements.each('Results/Movies/Title').map(&:text); puts movies
<jxf> Cope: ^^ gets all the movies from a made-up document.
<Cope> ah ace
tsykoduk is now known as zz_tsykoduk
<jxf> well, a real document would probably be more like "Results/Movies/Movie/Title", but you get the picture.
Guest22245 has quit [Ping timeout: 245 seconds]
lethjakman has joined #ruby
simplex_ has joined #ruby
<atmosx> Anyone faimilar with http sessions and how do they work with rack-based servers?
Squarepy has joined #ruby
lectrick_ is now known as lectrick
lectrick has quit [Changing host]
lectrick has joined #ruby
nerium has quit [Quit: nerium]
Theravadan has joined #ruby
xk_id has quit [Quit:
rrichardsr3 has joined #ruby
nerium has joined #ruby
mrfoto has quit []
<_br_> atmosx: What do you mean by "how do they work" ?
Hanmac has joined #ruby
rrichardsr3 has quit [Client Quit]
maletor has quit [Ping timeout: 246 seconds]
<Hanmac> shevy what do you think about https://bugs.ruby-lang.org/issues/9076 ?
mudmaster has joined #ruby
<atmosx> _br_: First, why is it considered secure to setup a predefined string as secret?
diegoviola has joined #ruby
danielshi has quit [Quit: danielshi]
rickmasta has joined #ruby
<havenwood> hanmac: i've wished in the past that &:to_s(2) type syntax was possible, i dunno about the '.'
Squarepy has quit [Ping timeout: 245 seconds]
<_br_> atmosx: Well, normally session cookie just contains some unique string to indentify users, what do you mean by "secret" ? see eg. http://guides.rubyonrails.org/security.html
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jbpros has quit [Quit: jbpros]
<shevy> hanmac awful
<Hanmac> havenwood: i make a comment under the ticket to show that &:to_s.(2) might be possible
Methylated has quit [Quit: Leaving.]
<havenwood> hanmac: hmm, interesting
jbpros has joined #ruby
maletor has joined #ruby
<Hanmac> its not chainable yet, but that was a first test
<atmosx> _br_: this string is the same for all users?
i_s has joined #ruby
<_br_> atmosx: No, its something unqiue for each user.
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
<_br_> atmosx: e.g. some hash from time and salt etc.
<atmosx> _br_: okay make sense. Are you familiar with rack?
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
i_s has quit [Read error: Connection reset by peer]
<atmosx> _br_: there's the option ebale :sessions
<atmosx> enable
i_s has joined #ruby
simplex_ has quit [Quit: simplex_]
<_br_> atmosx: sounds like sinatra
<atmosx> which apparently enables sessions mechanism, then there's session_secret, 'some-string-looking-like-hash', this string should change or no? Because in all online code example I've seen it's there.
<atmosx> _br_: I'm using sinatra yes, but these options are Rack based... Rack::Sessions::Cookie, secret: "hash-like-thnig"
<_br_> session secret is probably just a unique salt you can set
burlyscudd has quit [Quit: Leaving.]
tjbarber has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
<_br_> it should be unique yes. its used as a salt for the session id generation
<atmosx> aaah
<atmosx> okay.
<atmosx> I'm beginning to understand now. So this key is used in generation of each sessions unique id
axl_ has quit [Quit: axl_]
<_br_> bingo
<atmosx> awesome
pu22l3r has quit [Remote host closed the connection]
lyanchih has quit [Quit: lyanchih]
tjbarber has left #ruby [#ruby]
pu22l3r has joined #ruby
marr has quit [Ping timeout: 248 seconds]
lsmola has quit [Ping timeout: 245 seconds]
mengu has quit []
maletor has quit [Quit: Computer has gone to sleep.]
derebos has quit [Ping timeout: 272 seconds]
adjo_ has quit [Read error: Connection reset by peer]
adjo has quit [Read error: Connection reset by peer]
Xeago_ has joined #ruby
pu22l3r has quit [Ping timeout: 268 seconds]
aspires has joined #ruby
zipper has quit [Ping timeout: 240 seconds]
cads has quit [Ping timeout: 245 seconds]
<havenwood> hanmac: Then once you've implemented your version, you can reimplement it using itself: proc &:public_send.(self,*args)
<havenwood> :P
vlad_starkov has quit [Remote host closed the connection]
pu22l3r has joined #ruby
<Hanmac> hm i dont think that would work because of recusive … ;P
skaflem has joined #ruby
digital-ghost has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
zipper has joined #ruby
mahlon has joined #ruby
lstefani has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
inad922 has joined #ruby
jbpros has quit [Quit: jbpros]
shawnjgoff has joined #ruby
<inad922> hello
<inad922> Anyone using the RestClient library?
ReachingFarr has joined #ruby
<inad922> When I make a request against an endpoint and the response code is 4xx does it raise an Exception?
pel_daniel has joined #ruby
Cope has left #ruby [#ruby]
vlad_starkov has joined #ruby
<Hanmac> shevy & havenwood : http://www.youtube.com/watch?v=GlDdQYDtJXE
zeeraw has joined #ruby
linoj has joined #ruby
jonathanwallace2 has joined #ruby
linoj has quit [Client Quit]
mudmaste_ has joined #ruby
tiglog has quit [Quit: Leaving]
linoj has joined #ruby
mercwithamouth has quit [Ping timeout: 272 seconds]
jonathanwallace1 has quit [Ping timeout: 248 seconds]
<krz> 'barfoobaz' how do i remove foo?
<krz> anything else besides using gsub?
maveonair has quit [Ping timeout: 272 seconds]
aryaching has joined #ruby
Methylated has joined #ruby
elux has joined #ruby
patteh has quit [Remote host closed the connection]
mahlon has quit [Quit: nine foot long outhouse ladle]
mudmaster has quit [Ping timeout: 240 seconds]
ahawkins has quit [Read error: Operation timed out]
OdNairy has joined #ruby
OdNairy has quit [Read error: Connection reset by peer]
linoj has quit [Client Quit]
<shevy> krz it depends
<Hanmac> krz it is possible with sub ;P or with []=
apeiros has joined #ruby
<shevy> krz you could always assign via []= to ''
linoj has joined #ruby
<shevy> but for this you need to know where your substring starts
<Hanmac> shevy & havenwood & apeiros look at this method i found: http://ruby-doc.org/core-trunk/String.html#method-i-scrub
chrrz has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac> krz: or use slice!
<shevy> >> x = 'barfoobaz'; x[3,3] = ''; x
<eval-in> shevy => "barbaz" (https://eval.in/60216)
<apeiros> hanmac: yeah, it's a nice one. I have one to use before 2.1
chrrz has quit [Client Quit]
<shevy> hehe
<shevy> stupid encoding
patteh has joined #ruby
<shevy> to what version does this apply? is there some version reference on that website?
fijimunkii has joined #ruby
Methylated has quit [Quit: Leaving.]
derebos has joined #ruby
IceyEC has quit [Quit: IceyEC]
VTLob has quit [Read error: Operation timed out]
derebos has quit [Remote host closed the connection]
TheMoonMaster has quit [Excess Flood]
<Hanmac> shevy: do you mean scrub? look at the link name, it says "core-trunk"
<shevy> I dont know what that means
<shevy> is this 2.1
<Hanmac> currently yes
<_br_> Probably no, but does anyone know if its possible to send a message to a skype user via e.g. Ruby without a separate bridge etc. ?
baroquebobcat has joined #ruby
zeropx has joined #ruby
Targen has joined #ruby
TheMoonMaster has joined #ruby
<breakingthings> You'd want to look up if there are any publicly accessible skype apis.
<breakingthings> You could probably set up a simple networksomethingorrather to send some JSON to an API endpoint.
<atmosx> Awesome hehe
<_br_> interesting idea
<havenwood> "Skype has announced it will end its desktop API in December, 2013 - after seven years of availability."
* atmosx build his first web based encrypted/salted login system
shredding has quit [Quit: shredding]
<breakingthings> havenwood: 10/10 great job microsoft
<_br_> Well sorry to say, but skype should die anyway. Its time for WebRTC.
<breakingthings> atmosx: I hope you really mean you used bcrypt
<breakingthings> or similar algorithm
axl_ has joined #ruby
<atmosx> breakingthings: bcrypt yes
<breakingthings> good job then
<breakingthings> you are credit to internet
<breakingthings> much securities
hiroyuki has quit [Remote host closed the connection]
<_br_> well scrypt is nice too
<_br_> and has a memory working factor :)
<breakingthings> Indeed
hiroyuki has joined #ruby
<fveillette> windows chef user here?
BizarreCake has joined #ruby
<atmosx> _br_: what is a memory working factor?
<breakingthings> Which is why I caveat-ed that 'similar algorithm' bit
<_br_> atmosx: Look up the scrypt paper, its well explained there.
<workmad3> atmosx: scales the amount of memory needed to calculate the hash
<atmosx> bcrypt automagically encrypts and salts the password right?
kaspergrubbe has quit [Ping timeout: 246 seconds]
<breakingthings> yes
zeeraw has quit [Quit: Computer has gone to sleep.]
<breakingthings> several times
<breakingthings> Bcrypt/Scrypt etc have work factor
<atmosx> workmad3: hm, using software? how?
psyl0n has joined #ruby
<workmad3> atmosx: the same way the bcrypt working factor scales the CPU load needed to calc the hash
<atmosx> _br_: k
<breakingthings> work factor is basically how many times it repeats the encryption
<workmad3> atmosx: you'd need to read the scrypt paper for how :)
<breakingthings> which makes it take exponentially longer for a legitimate crack to break through the extra layers of that security onion
<_br_> (using FPGA's)
<breakingthings> laymanssecurity.exe
cfi30 has joined #ruby
simplex_ has joined #ruby
VTLob has joined #ruby
<workmad3> there should be more certificate authentication on the interwebs :(
Methylated has joined #ruby
<workmad3> sign up for account == upload your certificate
<_br_> OpenSSL not already enough of that?
CreativeEmbassy has joined #ruby
<_br_> The whole DNS system is broken security wise, lets start there first.
<workmad3> then sign-in == SSL client auth
<_br_> Persona looks nice though.
<workmad3> at the very least, can websites stop using password strength checkers that claim that a 12-character password with no special chars is 'strong' :(
m8 has joined #ruby
<_br_> well, entropy wise it is ^^
<breakingthings> or having >maximums
<Hanmac> shevy: did you see the youtube clip?
simplex_ has quit [Client Quit]
<breakingthings> or having special character restrictions
<workmad3> breakingthings: yeah... that sort of thing just disturbs me
<breakingthings> Literally cannot use special characters for my last bank's password
<breakingthings> I was like
<breakingthings> WHY ARE YOU NOT LETTING ME BE MORE SECURE
<breakingthings> WHY DO YOU WANT ME TO GET HACKED
<workmad3> breakingthings: makes me think they're storing the password and doing shitty SQLi protection
<breakingthings> yeah probably.
<breakingthings> something monumentally concerning like that.
thepumpkin has joined #ruby
flops has quit [Quit: leaving]
<workmad3> 'oh, you're using a password that contains a ", therefore your password is doing SQL injection and can't be used'
simplex_ has joined #ruby
* breakingthings rages
<_br_> hehe
zeeraw has joined #ruby
<Hanmac> workmad3: apropo encyption: http://xkcd.com/1286/
<breakingthings> I couldn't use anything other than alphanumerics
<shevy> hanmac I am scared of strange cartoon voices screaming
leonidlm has quit [Ping timeout: 245 seconds]
<workmad3> hanmac: :D
<atmosx> breakingthings: change bank
<Hanmac> shevy: its a trailer from a sony movie, so there cant be much evil? ;P
<breakingthings> atmosx: I did :)
<atmosx> breakingthings: all banking systems I know, and I have used quite a lot, use two-factor auth
<atmosx> some give token-devices other send sms on your mobile
<atmosx> so having your password alone won't cut it.
<breakingthings> I'm not aware of many that do.
<breakingthings> I was with Chase bank before
<workmad3> breakingthings: my business account has a nice 30 character random password + a separate token :)
<breakingthings> neveragain.png
noname001 has quit [Ping timeout: 272 seconds]
<atmosx> breakingthings: in Greece all of them do it. In Czech Republic at least two of them do it.
<atmosx> breakingthings: either the one or other
<workmad3> breakingthings: and my personal account has a security question and a pin-protected token
IcyDragon has joined #ruby
<breakingthings> atmosx: well you see, I live in the land of the free… and surveillance.
<atmosx> breakingthings: so you can login and send money (say 5.000 USD) with just user/pass in usa bank?
<breakingthings> so you know
<breakingthings> we don't have smart people
simplex_ has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
<breakingthings> atmosx: Usually there is a block on high amounts of dosh being moved
<breakingthings> like, daily limit of $500 or whatever
<_br_> Bitcoins! :D
<workmad3> breakingthings: and I need to generate a separate token (based off half the target account#) if I want to send to a new person
<breakingthings> workmad3: That's some hardcore shit man.
<breakingthings> I will never feel that secure.
IceDragon has quit [Ping timeout: 240 seconds]
lethjakman has quit [Ping timeout: 240 seconds]
<krz> how do you use gsub with a var? i.e. gsub(/foo/, 'bar')
<workmad3> breakingthings: that particular one stopped me doing a stupid once :)
<atmosx> breakingthings: omg, that's very low
<workmad3> breakingthings: where I put in my account number rather than the one I wanted to pay to
<breakingthings> atmosx: But, given that you work with the average shit american bank, and you increase your daily spending limit (most people do, I imagine)
<atmosx> krz: "#{bar}" ?
<workmad3> breakingthings: then generated based off the correct account # and got a 'this security number is wrong'
thepumpkin has quit [Ping timeout: 240 seconds]
codeFiend has quit [Quit: codeFiend]
<breakingthings> atmosx: Then yes, you could do that, without any advance notice to the owner.
<krz> gsub(/"#{foo}"/ 'bar') ?
<krz> atmosx: ^
<krz> with a comma
<atmosx> krz: don't know, try it out :-P
<shevy> krz didn't you want to avoid gsub :P
mahlon has joined #ruby
<krz> no
<krz> tell me
<krz> lol
<breakingthings> atmosx: Although, they'll try to also stop that if it looks like you aren't the owner (eg. in a different location)
<atmosx> krz: I should perform some test, and I'm too bored to do that :-P
<shevy> krz you can use "#{name_of_variable}" inside .gsub just fine
Kabaka has quit [Remote host closed the connection]
dmyers has joined #ruby
_maes_ has joined #ruby
<shevy> wait
<workmad3> breakingthings: what I don't know is how strong the algorithm in the token really is
<shevy> without "" I think
n4dir has joined #ruby
<shevy> >> x = 'def'; "abcdef".gsub(/#{x}/,' hi krz! ')
<eval-in> shevy => "abc hi krz! " (https://eval.in/60217)
<shevy> >> x = 'def'; "abcdef".gsub(/"#{x}"/,' hi krz! ')
<eval-in> shevy => "abcdef" (https://eval.in/60218)
<breakingthings> workmad3: probably still a whole lot stronger than most American banks, so if an American attacks you they'll have no idea what to do.
<shevy> yep, without ""
RichardBaker has joined #ruby
<shevy> americans just ask the NSA for the passwords
<breakingthings> ^
<breakingthings> Hey NSA
<breakingthings> I forgot my password
<breakingthings> can you send it to me pls
<breakingthings> thx
<atmosx> breakingthings: actually. I know what to do. Get the target's phone or token-device
sambao21 has joined #ruby
Kabaka has joined #ruby
<atmosx> breakingthings: the NSA thing will work also :-P
TheShaun is now known as TheShaun|AFK
brianpWins has quit [Quit: brianpWins]
MrZYX is now known as MrZYX|off
<krz> shevy: hm you need ""
fridim_ has joined #ruby
elux has quit [Quit: Leaving...]
Czupa has quit [Ping timeout: 240 seconds]
thams has quit [Quit: thams]
maletor has joined #ruby
coldmethod has joined #ruby
<shevy> why
<krz> bar = 'bar'; 'foobarbaz'.gsub(/"#{bar}"/, '..') dont work
<shevy> yes, you do not need the ""
<Hanmac> krz he means the "" inside the // which should be removed
<krz> but then thats not evaluating bar, the var
<breakingthings> >> bar = 'bar'; 'foobarbaz'.gsub(/#{bar}/, '..')
* coldmethod says hello
<eval-in> breakingthings => "foo..baz" (https://eval.in/60219)
<krz> oh
<krz> kk
<krz> ty
<krz> hug
joshua_Bishop has joined #ruby
<breakingthings> awkward fistbump attempt
joshua_Bishop has left #ruby [#ruby]
<shevy> coldmethod why are you not a hotmethod
<breakingthings> try to cover it up with a brohug
gasbakid__ has joined #ruby
pyrac has quit [Read error: Operation timed out]
s2013 has quit [Ping timeout: 248 seconds]
* shevy hipsterhugs breakingthings
n4dir has left #ruby [#ruby]
<breakingthings> how do you even do that
<breakingthings> have you been hugging since before it was cool
<shevy> with style ^^^
<shevy> I have been hugging before I was even born man
<breakingthings> woah man that's some underground shiz
<coldmethod> shevy: i guess i got addicted to cold sometime in my childhood LOL
<shevy> brrr
<shevy> I hate coldness
<coldmethod> I love it
<shevy> I always imagine me as rich and on tropical islands one day
<shevy> instead I end up poor in cold places :(
smathieu has joined #ruby
notworthy has joined #ruby
diegoviola has quit [Ping timeout: 246 seconds]
gasbakid_ has quit [Ping timeout: 272 seconds]
nutella has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
<hiall> Could I loop through the following hash and get the array object where id == X http://paste2.org/gBtU5vVk I've been attempting with the use of object.select{ |f| f['id'] == X }.first but says first doesn't exist?
nutella is now known as Guest30606
<coldmethod> ironically, i live in a tropics country, yet spend half of the year in extreme hot weather and other half, in the treacherous cold mountains
notworthy has quit [Client Quit]
<coldmethod> what's "the most" resource for learning Ruby?
* coldmethod coming off Python environment
jonathanwallace2 has quit [Ping timeout: 246 seconds]
<shevy> coldmethod this one http://pine.fm/LearnToProgram/ but it is currently down
<Hanmac> coldmethod: its the "force" ah i mean "source"-code of ruby ;D
<shevy> hiall try [] instead of first ?
catphish has joined #ruby
<shevy> but perhaps .select returns no match
tylersmith has quit [Remote host closed the connection]
<shevy> so nil[] would not work nor would nil.first I think
<shevy> [0]
rickruby has quit [Remote host closed the connection]
<Hanmac> coldmethod: if you are from python try to read that first: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/
<coldmethod> thanks shevy, hanmac
<shevy> coldmethod if you know python, ruby should be easy
<hiall> hmmn ok shevy will try thanks
<shevy> most of the things that work in python work in ruby too, sometimes just differently
smathieu has quit [Ping timeout: 240 seconds]
<shevy> like ruby makes use of Enumerators a lot
<coldmethod> seems like it.. the 'ends' and curly braces seem really interesting
<shevy> .each .each_with_object etc..
<shevy> you should have a first look at this module: http://ruby-doc.org/core-2.0.0/Enumerator.html
catphish has left #ruby ["Leaving"]
bluOxigen has joined #ruby
<shevy> dont try to understand it all, I dont know the list myself
<atmosx> coldmethod: http://resrc.io/list/10/list-of-free-programming-books/ search for ruby
<shevy> just look at the names... each_with_index
<shevy> hah :)
<shevy> feed obj ? nil
<shevy> I never saw that one before
<shevy> coldmethod I hate "end" in ruby, I'd wish I could get rid of them
<Hanmac> shevy wrong you use the class, not the module
<Hanmac> coldmethod: http://www.ruby-doc.org/core-2.0/Enumerable.html this is the module he meant
Azulinho has quit [Ping timeout: 245 seconds]
<shevy> look at both
Azulinho has joined #ruby
<shevy> coldmethod I'd wish ruby would have an optional indent mode, on a per file basis, settable in shebang-like lines
<coldmethod> shey i am thinking that 'ends' would be really cool because in python with multiple functions/subfunctions and classes (usually longer than 50 lines), it becomes hard to understand where each one ends, locally
<coldmethod> by locally, i mean, without help of the text editor
<coldmethod> *shevy
CaptainJet has quit []
Czupa has joined #ruby
samfisher has quit [Quit: Lost terminal]
<shevy> in ruby it can become hard too
nism has joined #ruby
<shevy> I have only one class in any given .rb file though
tonni has quit [Remote host closed the connection]
CaptainJet has joined #ruby
<shevy> my gripe with end is that it gives me no real extra information
tonni has joined #ruby
<shevy> def foo
<shevy> puts 'hi from foo'
<shevy> end
<shevy> (newline here)
<shevy> def bar
<shevy> puts 'hi from bar'
<_br_> It solves the dangling else problem doesn't it?
<shevy> end
strk has joined #ruby
<shevy> dunno, most of my if/else are one lines, like
<shevy> if @game_over
<shevy> finish_game
<strk> what's the difference between `def fun` and `def fun!` ?
<shevy> else
burlyscudd has joined #ruby
<shevy> do_whatever_method_here
<shevy> strk you can use ! for all methods as last char
<shevy> strk just as you can use ?
<shevy> unless ! or ? was used before
<shevy> so def foo! works, def foo?! not
<strk> so it's just part of the name ?
gasbakid_ has joined #ruby
<shevy> yeah
* strk hates ruby (sorry)
<_br_> Dangling else is the same for def blah ; end ... its a grammar issue - http://en.wikipedia.org/wiki/Dangling_else
<shevy> there is a convention with !
<coldmethod> seems logical though.. i am (currently) finishing writing a python tool for zfs automation and ends seem quite intriguing to me because python lacks them.. but who knows.. i am just here to test my taste
<shevy> it modifies self
<strk> ah, what's the convension shevy ?
<strk> ! is a mutator, ok
<workmad3> not quite
<shevy> strk it signals to you "this may be dangerous or have some specific side effects"
<workmad3> ^^
<shevy> strk I hate methods with !
<strk> use with care
<shevy> the only times I use them is to save some characters
<shevy> x = x.gsub()
<shevy> vs
<shevy> x.gsub!()
thams has joined #ruby
<shevy> or .strip!
<shevy> strk ruby is cool if you use only the things you like :D
<lectrick> anyone else going to rubyconf miami this year?
zz_tsykoduk is now known as tsykoduk
<coldmethod> atmosx, thanks for the rescr.io link.. that's the most extensive list i have ever seen
Hydhen has quit [Quit: Quitte]
<shevy> miami ... now that would be tropical...
tonni has quit [Ping timeout: 240 seconds]
<Hanmac> strk: be VERY careful wen you use the return value of ! methods, most of them can return nil
<atmosx> coldmethod: yes.
jkhwan has joined #ruby
gasbakid__ has quit [Ping timeout: 245 seconds]
jonahR has quit [Quit: jonahR]
`Chris` has joined #ruby
<shevy> strk hanmac gives you more reasons to hate !
<workmad3> shevy: well, many of them will return original values that have changed :)
<shevy> one day I must build a method that combines everything that should be hated in ruby
<shevy> ! and @@ and -> all in one method
<workmad3> shevy: and nil if nothing changed
ahawkins has joined #ruby
<Hanmac> strk & shevy for what the return is used:
<Hanmac> >> "abc".gsub!("d","e") ? "changed" : "not changed"
<eval-in> Hanmac => "not changed" (https://eval.in/60220)
<Hanmac> >> "abcd".gsub!("d","e") ? "changed" : "not changed"
<eval-in> Hanmac => "changed" (https://eval.in/60221)
brtdv has quit []
<shevy> >> "abcd".gsub!("d","e") ? "we all hate ! methods" : "we all hate ! methods"
<eval-in> shevy => "we all hate ! methods" (https://eval.in/60222)
* shevy agrees with eval-in
jonahR has joined #ruby
jonahR has quit [Client Quit]
rickmasta has quit [Quit: Leaving...]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3> shevy: I don't mind ! methods... but I hate it when there's a ! method an no non-! method
<workmad3> *and
aganov has quit [Remote host closed the connection]
rickruby has joined #ruby
<shevy> hehe
<Hanmac> workmad3: i hate it when some ones does chain !-methods and they dont know what they do ;P
maycon_ is now known as maycon
rickmasta has joined #ruby
<shevy> wow
<shevy> according to TIOBE
<workmad3> hanmac: well that comes under my general 'I hate idiots who think they know what they're doing but don't :)
<shevy> Transact-SQL is more popular than ruby
juarlex has joined #ruby
aryaching has quit []
<workmad3> shevy: yay, a flawed metric puts one language above another for arbitrary reasons based off meaningless data!
<shevy> hehehe
<shevy> man...
<Hanmac> shevy its because it counts lines of code … you need more lines in C and Java for something you have one line in ruby ;P
<shevy> I have not even heard of Transact-SQL
<workmad3> hanmac: it also counts google searches
vlad_starkov has quit [Remote host closed the connection]
<workmad3> hanmac: and you don't need to google for hours to figure shit out in ruby! :(
jxf has quit [Ping timeout: 248 seconds]
zigomir has quit [Quit: zigomir]
<Hanmac> i think thats mostly because of rails, or problems when users try to use 1.9 software on 1.8 ;P
MrZYX|off is now known as MrZYX
<workmad3> :)
maletor has quit [Quit: Computer has gone to sleep.]
brtdv has joined #ruby
<shevy> rails
Czupa has quit [Ping timeout: 248 seconds]
nerium has quit [Quit: nerium]
lfox has quit [Quit: ZZZzzz…]
<Hanmac> rails are so 18** … we need newer stuff … like rubyonplains ? ;P
<DefV> RubyOnJets
<Hanmac> or for oldschool stuff: rubyonboats ?
<shevy> somehow most rails sites seem to have auniform look
<shevy> a uniform
baroquebobcat has quit [Quit: baroquebobcat]
Monie has joined #ruby
<shawnjgoff> Rails on FTL?
Guest30606 has quit [Read error: Operation timed out]
brtdv has quit [Client Quit]
atmosx has quit [Quit: Lost in trance]
Anselm has joined #ruby
aryaching has joined #ruby
ssvo has joined #ruby
<strk> how to check if "a:b" starts with "a" ?
<shevy> .start_with
<shevy> >> "a:b".starts_with? 'a'
<eval-in> shevy => undefined method `starts_with?' for "a:b":String (NoMethodError) ... (https://eval.in/60223)
<shevy> >> "a:b".start_with? 'a'
<eval-in> shevy => true (https://eval.in/60224)
<shevy> well
<shevy> with a ? it is
<shevy> or you use [0,1]
<shevy> >> "a:b"[0,1] == 'a'
<eval-in> shevy => true (https://eval.in/60225)
D4T has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> anyone knows another way?
bigoldrock has joined #ruby
iamjarvo has quit [Remote host closed the connection]
<shevy> hanmac
<shevy> come on man
<shevy> show the way of the pervert ruby
<strk> >> s="a"; "a:b".starts_with? "#{s}:"
<eval-in> strk => undefined method `starts_with?' for "a:b":String (NoMethodError) ... (https://eval.in/60226)
iamjarvo has joined #ruby
<strk> >> s="a"; "a:b".start_with? "#{s}:"
<eval-in> strk => true (https://eval.in/60227)
<Hanmac> >> ?a
<eval-in> Hanmac => "a" (https://eval.in/60228)
<strk> >> s=nil; "a:b".start_with? "#{s}:"
<eval-in> strk => false (https://eval.in/60229)
dagobah has quit [Remote host closed the connection]
CaptainJet has quit [Read error: Connection reset by peer]
<strk> >> s=nil; not "a:b".start_with? "#{s}:"
<eval-in> strk => true (https://eval.in/60230)
<strk> and how do I prematurely end a loop iteration ? next ? continue ?
<Hanmac> >> "a:b".start_with??a
<eval-in> Hanmac => true (https://eval.in/60231)
Monie has quit [Ping timeout: 245 seconds]
randomnick_ has quit [Read error: Connection reset by peer]
* Hanmac doesnt found white-spaces inside the store
pu22l3r has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
<strk> ?? ? really ? are you trying to get me hate ruby even more ? what's ?? now ?
pu22l3r has joined #ruby
<shevy> strk break
<strk> shevy: sorry, I didn't meant breaking, but continuing to next iteration
<shevy> loop { puts 'hi'; break if rand(5) == 0 }
<shevy> hmm
<workmad3> next
<shevy> next I think
CaptainJet has joined #ruby
albioner has joined #ruby
<workmad3> >> 5.times{|i| next if i.even? ; puts i}
<eval-in> workmad3 => 1 ... (https://eval.in/60232)
lucazi has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> strk btw, I think it is very rare that people use the "not" keyword
<strk> next if db && not id.start_with? "#{db}:"
tonni has joined #ruby
tsykoduk is now known as zz_tsykoduk
<shevy> most of the time if and if ! seem to be ideal
nucatus has quit [Remote host closed the connection]
* strk opts for !
<shevy> you must be careful
<Hanmac> strk ?a is syntax sugar for "a"[0]
<workmad3> 'not' has lower precedence
<shevy> strk when you use such a construct, I would use () too
<strk> syntax error, unexpected tIDENTIFIER, expecting '(' (SyntaxError)
<shevy> the ruby parser can not distinguish everything
g0bl1n has joined #ruby
<shevy> yeah
iamjarvo has quit [Ping timeout: 272 seconds]
axsuul has joined #ruby
<shevy> strk try with ()
<workmad3> there is also 'unless' instead of 'if !'
nucatus has joined #ruby
<shevy> or avoid such constructs
kevind_ has joined #ruby
* strk picks unless
<Hanmac> shevy look at that:
<Hanmac> >>?thisIsAVeryLongStringButIDoNotCareAndOnlyPickTheFirstChar
<shevy> strk or build a method that does those checks combined
<eval-in> Hanmac => /tmp/execpad-38e82ac4f56d/source-38e82ac4f56d:2: syntax error, unexpected '?' ... (https://eval.in/60233)
<shevy> the advantage would be you could make clean conditionals
<shevy> exit if game_over()
achru has joined #ruby
<shevy> hmm wait
<Hanmac> 19>>?ab
<eval-in> Hanmac => /tmp/execpad-c3a822a4b184/source-c3a822a4b184:2: syntax error, unexpected '?' ... (https://eval.in/60234)
<shevy> exit if game_over?
<shevy> def game_over?; @game_over; end
amk has joined #ruby
<Hanmac> 18>> ?ab
<eval-in> Hanmac => /tmp/execpad-d6f43d461a4c/source-d6f43d461a4c:2: syntax error, unexpected '?' ... (https://eval.in/60235)
<shevy> hanmac learn ruby :P
<Hanmac> 18>> ?a
<eval-in> Hanmac => 97 (https://eval.in/60236)
<Hanmac> shevy for some reason i had thought that in some version ? only picks the first char ...
yfeldblum has joined #ruby
mtfOO_ has joined #ruby
maletor has joined #ruby
<strk> this seems to work: next if db && ! ( id.start_with? "#{db}:" )
mun has joined #ruby
<mun> hi
<mun> i'm trying to install mongo3 using 'sudo gem install mongo3' but it keeps saying it requires ruby version >= 1.9.2. however, ruby -v already shows ruby 2.0.0p247. am i doing something wrong?
<Hanmac> mun let me guess, ubuntu user?
kevind has quit [Ping timeout: 272 seconds]
kevind_ is now known as kevind
<mun> hanmac, osx actually
<Hanmac> mun check "gem env" and "sudo gem env" and look if there are differences
<workmad3> mun: don't use 'sudo'
sambao21 has quit [Quit: Computer has gone to sleep.]
danman has joined #ruby
<Hanmac> workmad3: depends how he has installed ruby
nucatus has quit [Ping timeout: 240 seconds]
<mun> hanmac, hm mindeed.. it shows 1.8.7
<workmad3> mun: that strips away the environment configs that things like rbenv, rvm and chruby use, and drops you back to the system ruby (1.8.7 on many mac os x installs)
moted has joined #ruby
<mun> workmad3, hmm i've manually removed /usr/bin/ruby :(
<workmad3> mun: how did you install ruby?
vongrippen has joined #ruby
end_guy has joined #ruby
* Hanmac installed ruby on OSX via rvm as sudo
<mun> workmad3, brew install
pragmatism has joined #ruby
includex has quit [Quit: Textual IRC Client: www.textualapp.com]
Czupa has joined #ruby
<mun> *i'm quite new to osx
<strk> >> "s".start_with("s")
<eval-in> strk => undefined method `start_with' for "s":String (NoMethodError) ... (https://eval.in/60237)
<workmad3> mun: ok, so likely /usr/local/bin is being stripped off your PATH
<strk> >> "s".start_with?"s"
<eval-in> strk => true (https://eval.in/60238)
<strk> >> "s".start_with?("s")
<eval-in> strk => true (https://eval.in/60239)
<workmad3> mun: however, you also shouldn't need 'sudo' to install gems, afaik
<mun> workmad3, $ echo $PATH
<strk> >> true && ! "s".start_with?("s")
<eval-in> strk => false (https://eval.in/60240)
<workmad3> mun: and for future reference, don't delete things from /usr/bin :)
<mun> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin:/usr/local/mysql/bin
nutella_ has joined #ruby
whunt has joined #ruby
Monie has joined #ruby
<mun> which ruby gives me /usr/local/bin/ruby
<mun> should i add that into the env somehow?
<workmad3> mun: try your gem install *without* sudo
<mun> workmad3, it complains about having no write permissions
<workmad3> mun: also, 'which gem'
nvrch has quit [Quit: nvrch]
marr has joined #ruby
<mun> workmad3, /usr/bin/gem
<workmad3> mun: there's your problem ;)
sambao21 has joined #ruby
<workmad3> mun: you really want /usr/local/bin in front of /usr/bin in your PATH
<mun> workmad3, right. /usr/local/bin/gem should be the one i want
<mun> workmad3, is there a nice way to do it in osx, rather than doing it in .bash_profile?
<workmad3> mun: .bash_profile and .bashrc are the nice ways of doing it ;)
<workmad3> mun: assuming you're using bash
pyrac has joined #ruby
Tuxist has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<coldmethod> will ruby ever be as big as python?
noop has joined #ruby
<andrewvos> coldmethod: Yup, just type `bundle install` on a rails project
<Hanmac> coldmethod: only if you believe ;P
burlyscudd has quit [Quit: Leaving.]
mansi has joined #ruby
<coldmethod> lol i do
<Hanmac> coldmethod: in general you can do everything in ruby what you can do in python too … (with bindings for sample)
chinychinchin has joined #ruby
<coldmethod> wow didn't really know that..
<coldmethod> i mainly use python for system programming and scripting
brianpWins has joined #ruby
werdnativ has joined #ruby
tonni has quit [Read error: Connection reset by peer]
gasbakid_ has quit [Read error: Operation timed out]
zeade has joined #ruby
gasbakid__ has joined #ruby
Leandro__ has joined #ruby
p7r has quit [Quit: Textual IRC Client: www.textualapp.com]
<mun> workmad3, the installation seems to be going slowly.. but seems to be working
<mun> workmad3, thanks!
<Hanmac> coldmethod: for sample there is a C/C++ lib … and then there is a python binding so you can use it in python … there is no problem to make the same in ruby too so you can use it in ruby
TMM has quit [Quit: Ex-Chat]
<coldmethod> hmm let's see how do my fingers feel the syntax
<_br_> yes... yes.... very good... join the dark side.
<coldmethod> haha
echevemaster has quit [Ping timeout: 240 seconds]
ephemerian has quit [Quit: Leaving.]
joost_like_toast has quit [Ping timeout: 272 seconds]
CaptainJet has quit [Read error: No route to host]
<coldmethod> _br_: that reminds of the button on http://nooooooooooooooo.com/
rickruby has quit [Remote host closed the connection]
* coldmethod laughing
jeffdb has joined #ruby
<_br_> hehe
* Hanmac gets "evil"-points for each "soul" he collects from the python-side of the "source" ;P
CaptainJet has joined #ruby
inad922 has quit [Ping timeout: 260 seconds]
* coldmethod thinking about selling his python soul
`Chris` has quit [Read error: Connection reset by peer]
`Chris` has joined #ruby
newton is now known as Frankfort
Frankfort is now known as newton
ahawkins has quit [Read error: Connection reset by peer]
pipecloud has joined #ruby
einarj has quit [Remote host closed the connection]
ghr has quit [Quit: Computer has gone to sleep.]
DropsOfSerenity has joined #ruby
chrisja has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tonni has joined #ruby
saarinen has joined #ruby
carraroj has joined #ruby
amk has quit [Quit: Page closed]
DouweM has quit [Ping timeout: 246 seconds]
rehat has quit [Remote host closed the connection]
smathieu has joined #ruby
saarinen has quit [Client Quit]
camilasa_ has quit []
d45h has joined #ruby
timonv has quit [Remote host closed the connection]
gregj has joined #ruby
saarinen has joined #ruby
gcds has joined #ruby
cfi30 has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
<gcds> Hello, maybe someone has idea how to make a proxy server which serves a website which was logged before accessing it and hiding all cookies from the user? Like browsing a website without any way to reset/get password from original ?
pu22l3r_ has joined #ruby
diegoviola has joined #ruby
smathieu has quit [Ping timeout: 248 seconds]
<gcds> Like every user has separate session which only html, img and other stuff gets showed except session data
iliketurtles has joined #ruby
dyyylan has quit [Ping timeout: 260 seconds]
<gregj> what's the best way to run rbenv in shell script folks ?
<_br_> Sounds less like a Ruby problem and more like a e.g. Squid/mitmproxy/browser config issue.
<gregj> I need to set 2.0 enviroment, usually I call 'rbenv shell 2.0.-....'
<gregj> but doing that inside bash script, it complains that 'shell' doesn't exist
<gcds> _br_: I am going to do it with ruby so I was asking here :D
|jemc| has joined #ruby
tylersmith has joined #ruby
dr_bob has joined #ruby
brennanMKE has joined #ruby
pu22l3r has quit [Ping timeout: 268 seconds]
tylersmith has quit [Remote host closed the connection]
<gcds> I am thinking about TCPServer & client with storing cookies session and other sensitive stuff
<havenwood> gcds: So you want to create some Rack middleware?
carlyle has quit [Remote host closed the connection]
<gcds> havenwood: maybe I thinking about it :)
<havenwood> oh
carlyle has joined #ruby
<gcds> havenwood: I dont want user see sensitive stuff only browse without any authorizations and other stuff
pu22l3r_ has quit [Ping timeout: 268 seconds]
CaptainJet has quit [Read error: Connection reset by peer]
obs has quit [Quit: ChatZilla 0.9.87 [Iceape 2.7.12/20130119095535]]
x1337807x has joined #ruby
CaptainJet has joined #ruby
noop has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
<gcds> thinking like storing each connection session data on redis and on every request sending to that website :)
yfeldblu_ has joined #ruby
jhaals has joined #ruby
strk has left #ruby [#ruby]
earthquake has joined #ruby
burlyscudd has joined #ruby
icecandy has joined #ruby
rickruby has joined #ruby
x1337807x has quit [Client Quit]
carraroj has quit [Ping timeout: 240 seconds]
heidi has quit [Quit: Leaving.]
baroquebobcat has quit [Quit: baroquebobcat]
carlyle has quit [Ping timeout: 245 seconds]
raphaelivan has joined #ruby
Spami has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
gcds has quit [Read error: Connection reset by peer]
krz has quit [Quit: krz]
lfox has joined #ruby
anderse has joined #ruby
iamjarvo has joined #ruby
psyl0n has quit [Quit: psyl0n]
s2013 has joined #ruby
gcds has joined #ruby
itissid has joined #ruby
chinychinchin has quit [Read error: Connection reset by peer]
chinychinchin has joined #ruby
x1337807x has joined #ruby
gregj has left #ruby [#ruby]
DrShoggoth has joined #ruby
Stygia has quit [Quit: Leaving]
zodiak has quit [Quit: Leaving]
<_br_> what place executes the JS code? Your proxy?
<_br_> Thats sounds a bit like Opera Mini's execution model.
zodiak has joined #ruby
mun has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
shaunbak_ has quit [Remote host closed the connection]
<_br_> .oO(Messes up websites to some extent)
Monie has joined #ruby
shaunbaker has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
icecandy has quit [Quit: Going offline, see ya! (www.adiirc.com)]
diegoviola has quit [Ping timeout: 245 seconds]
leonidlm has joined #ruby
chinychinchin has quit [Read error: Operation timed out]
brtdv has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jxf has joined #ruby
icecandy has joined #ruby
schickung has quit [Quit: schickung]
tonni has quit [Read error: Connection reset by peer]
<gcds> _br_: I only need to hide session data (cookies) and pages which lead to account page :)
shaunbaker has quit [Ping timeout: 245 seconds]
<gcds> the last one is not a problem
pdimitrov has quit [Read error: Operation timed out]
achru has quit [Remote host closed the connection]
pu22l3r has joined #ruby
CaptainJet has quit [Read error: No route to host]
<gcds> but currently I am thinking about storing session in redis and how to expire that session for user or keep it forever or work like browser expire it when it needs?
achru has joined #ruby
rickruby has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
ZenGuy311 has quit [Ping timeout: 245 seconds]
pdimitrov has joined #ruby
<_br_> sessions are invalidated on the server side. You can't control the "session time" really client side. You might be able to manipulate it by having refresh intervals to keep it active. But some sites have a session max-time etc.
Loaft has joined #ruby
pr0ggie has quit [Ping timeout: 245 seconds]
fightback has joined #ruby
fightback has quit [Max SendQ exceeded]
<gcds> _br_: no no i mean storing session which should be stored in browser on server
ZenGuy311 has joined #ruby
OdNairy has joined #ruby
maletor has joined #ruby
heidi has joined #ruby
fightback has joined #ruby
iamjarvo_ has joined #ruby
fightback has quit [Max SendQ exceeded]
hiall has quit [Ping timeout: 245 seconds]
CaptainJet has joined #ruby
mikeg has joined #ruby
fightback has joined #ruby
fightback has quit [Max SendQ exceeded]
<_br_> people will access the server side browser via VNC or something?
nutella_ has quit [Ping timeout: 272 seconds]
achru has quit [Ping timeout: 272 seconds]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
Monie has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Ping timeout: 272 seconds]
<gcds> Client <-> HTTP Proxy (Session Storage) <-> External Website
sepp2k1 has quit [Ping timeout: 240 seconds]
jkhwan has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
s2013 has quit [Ping timeout: 240 seconds]
smathieu has quit [Remote host closed the connection]
chuk has quit [Quit: This computer has gone to sleep]
devoldmx has joined #ruby
JMcAfreak has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
rubyracer has joined #ruby
fightback has joined #ruby
icecandy has quit [Quit: Going offline, see ya! (www.adiirc.com)]
dmyers has quit [Quit: dmyers]
mtfOO_ has quit [Quit: Lost terminal]
Azulinho has quit [Ping timeout: 272 seconds]
sepp2k has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Kabaka has quit [Ping timeout: 240 seconds]
matchaw_ has quit [Ping timeout: 272 seconds]
Monie has joined #ruby
Czupa has quit [Quit: Wychodzi]
petey__ has quit [Remote host closed the connection]
<_br_> Where is JS executed?
jonahR has joined #ruby
<_br_> Client side?
Kabaka has joined #ruby
raphaelivan has quit [Quit: Leaving.]
tonni has joined #ruby
petey__ has joined #ruby
<_br_> Isn't that causing issues if you eval js and have possibly async calls with ip X and proxy session with ip y
ReachingFarr has quit [Ping timeout: 246 seconds]
jonathanwallace2 has joined #ruby
nism has quit [Quit: Page closed]
<Hanmac> hm it would be also possible that the proxy execute the javascript of the website ;P
<_br_> yes. exactly as I asked before, that is current opera minis execution model.
vlad_starkov has joined #ruby
reset has joined #ruby
<gcds> _br_: my server will by middle man so every request client made goes through my server and then to server
<_br_> that makes sense, but splitting the two will probably cause errors.
<_br_> gcds: I see
<gcds> so all ajax request gets relayed :)
iamjarvo_ has quit [Remote host closed the connection]
neonlex has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_br_> well in that case it should be ok
<gcds> :)
zz_tsykoduk is now known as tsykoduk
OdNairy has joined #ruby
iamjarvo has joined #ruby
c0rn has joined #ruby
<gcds> thanks god where is already done solutions like WEBrick::HTTPRequest :D
<Hanmac> it would be also fun when the "proxy" is a http crawler that visit the website and change some facts … (that can be used for good and for bad)
verto has joined #ruby
<_br_> yeah exactly. thats what you use e.g. squid or snort for
fightback has quit [Quit: Bye.]
pr0ggie has joined #ruby
<gcds> hanmac: It kind is replaces all account information to prevent end user of knowing anything about that user :)
petey__ has quit [Ping timeout: 272 seconds]
<shevy> do you guys use a specific gem for colour-related things you do with ruby?
jonahR has quit [Quit: jonahR]
neonlex has quit [Ping timeout: 272 seconds]
nucatus has joined #ruby
icecandy has joined #ruby
rickmasta has quit [Quit: Leaving...]
duggiefresh has joined #ruby
cody-- has quit [Quit: derp]
Zai00 has quit [Quit: Zai00]
jhulten has joined #ruby
ReachingFarr has joined #ruby
rezzack has joined #ruby
carlyle has joined #ruby
cody-- has joined #ruby
<Hanmac> shevy most of my libs has own color classes, with "color-related things"
Zai00 has joined #ruby
TDJACR has quit [Ping timeout: 245 seconds]
Zai00 has quit [Client Quit]
chrisja_ has joined #ruby
wgosling has joined #ruby
<_br_> isn't there a ANSI color gem?
SeySayux has quit [Ping timeout: 240 seconds]
tonni has quit [Ping timeout: 240 seconds]
io_syl has joined #ruby
hashpuppy has quit [Quit: Textual IRC Client: www.textualapp.com]
Eiam has quit [Remote host closed the connection]
chrisja has quit [Ping timeout: 272 seconds]
sriehl has joined #ruby
<wgosling> Hi. I have a script that is dying with an error 'invalid byte sequence in US-ASCII' the line that causes that is checking a string against a regex. Is it possible to force ruby into considering all strings to be UTF-8
SeySayux has joined #ruby
thepumpkin has joined #ruby
ahawkins has joined #ruby
<Hanmac> wgosling: there are two ways, only two 1) use ruby 2.0+ or 2) http://stackoverflow.com/questions/8879237/
iamjarvo has quit [Read error: Connection reset by peer]
<shevy> hanmac can you show one example? with color class you use
petey__ has joined #ruby
mansi has quit [Remote host closed the connection]
iamjarvo has joined #ruby
Eiam has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
tonni has joined #ruby
<Rylee> Hey, are you able to do the double-asterisk exansion of a Hash to keyword arguments like in Python? http://www.technovelty.org/python/on-asterisks-in-python.html
dangerousdave has joined #ruby
<Rylee> In Ruby, that is
mansi has joined #ruby
pyrac has quit [Quit: pyrac]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wgosling> hanmac: I am using Ruby 2.0... trying out the 2) option
<Hanmac> wgosling: hm then it should not happen because UTF-8 is default on 2.0 ...
icecandy has quit [Quit: Going offline, see ya! (www.adiirc.com)]
OdNairy has joined #ruby
kirun has joined #ruby
Xeago_ has quit [Remote host closed the connection]
icecandy has joined #ruby
Eiam has quit [Remote host closed the connection]
<wgosling> hanmac: well it is a ruby 2.0 binary provided by work. Is it possible they could have overridden that default?
tonni has quit [Read error: Connection reset by peer]
thepumpkin has quit [Ping timeout: 246 seconds]
<Hanmac> Rylee: yes exactly like in ruby https://www.ruby-forum.com/topic/4416563#1119372
asobrasil has joined #ruby
<Hanmac> wgosling: hm yes it is possible to overwrite it, but to understand where it was done we need a pastie or gist of your code
mansi has quit [Ping timeout: 240 seconds]
colonolGron has joined #ruby
maycon has quit [Quit: Saindo]
soheil has joined #ruby
notworthy has joined #ruby
reset has quit [Quit: Leaving...]
notworthy has quit [Client Quit]
notworthy has joined #ruby
notworthy has quit [Remote host closed the connection]
wgosling has left #ruby ["Konversation terminated!"]
Eiam has joined #ruby
hp_ has joined #ruby
TDJACR has joined #ruby
Igneous has joined #ruby
baroquebobcat has joined #ruby
pragmatism has quit [Ping timeout: 240 seconds]
devoldmx has quit [Read error: Connection reset by peer]
gcds has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
mikeg has quit [Remote host closed the connection]
hp_ is now known as TMM
gcds has joined #ruby
TMM has quit [Changing host]
TMM has joined #ruby
<Rylee> So, question
<Rylee> Are you able to do something like
<Rylee> 2.0.0p247 :018 > File.methods.each { |x| puts x }
<Rylee> with the unary & operator?
<Rylee> Much like [1, 2, 3, 4, 5,].map(&:to_s)
icecandy has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<Hanmac> Rylee look at the #display method
codeFiend has joined #ruby
<Hanmac> if it does not suits you use &method(:puts)
psyl0n has joined #ruby
<MrZYX> but the common sense so far is that you don't want to shortcut that
araujo has quit [Read error: Connection reset by peer]
msplain has joined #ruby
cfi30 has joined #ruby
araujo has joined #ruby
<Hanmac> pah there is no sense in common sense ;P
<Igneous> Hey guys, I have a stupid question about this code: http://dpaste.com/1441652/ . I guess the block of code above the initialize method definition gets evaluated immediately after the class is instantiated, and _then_ the block inside initialize gets evaluated.
einarj has joined #ruby
btanaka has joined #ruby
colonolGron has quit [Read error: Connection timed out]
d45h has quit [Ping timeout: 272 seconds]
colonolGron has joined #ruby
mikesplain has quit [Ping timeout: 245 seconds]
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
<MrZYX> what do you mean by "the class is instantiated"? when Permon.new is called?
DanKnox_away is now known as DanKnox
gcds has quit [Quit: gcds]
<Igneous> Yes, exactly
<MrZYX> no, it's run when the file gets loaded
<Hanmac> Igneous: first the block above is evaluated when the parser "hits" this lines
<Igneous> oh wow
<Igneous> damn, so there's no way to make that dynamic?
<MrZYX> put it into initialize ;)
<Igneous> could I use super in the initialize method?
<MrZYX> yeah
d45h has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
<Hanmac> MrZYX: it depends, when this are class methods it would not make sense to put them into initialize
TDJACR has quit [Ping timeout: 272 seconds]
<MrZYX> if he wants to make them dynamic per instance, it could
<MrZYX> depending on what part is dynamic and maybe the definition of dynamic :P
<RubyPanther> in the case of class methods you use a mixin and then you can hook into mixin-time
<Hanmac> or use the class methods on the singleton_class
chrisja_ has quit [Quit: leaving]
Monie has quit [Quit: Textual IRC Client: www.textualapp.com]
gcds has joined #ruby
einarj has quit [Ping timeout: 272 seconds]
tsykoduk is now known as zz_tsykoduk
zeeraw has quit [Quit: Computer has gone to sleep.]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
DrShoggoth has quit [Remote host closed the connection]
pyrac has joined #ruby
CreativeEmbassy has joined #ruby
<Igneous> Yeah, the idea is to call Perfmon.new and manage perfmon connections to multiple servers through multiple client objects
<jxf> Is there an Enumerable method that's "#select, but stop after N elements"?
<Igneous> since savon can't really handle multiple endpoints like that
<Hanmac> Igneous: when you want multible servers then @@variables is the veryveryvery wrong idea
<MrZYX> jxf: you could make the enumerator lazy and .take(n) after the select
DrShoggoth has joined #ruby
<jxf> MrZYX: Sorry, I didn't phrase that well. I didn't mean "only try the first N elements". I meant, "keep trying to #select until you have N elements".
<MrZYX> yes
<Hanmac> jxf like that:
<Hanmac> >> (1..100).each.lazy.select(&:even?).take(5).force
<eval-in> Hanmac => [2, 4, 6, 8, 10] (https://eval.in/60267)
danshultz has quit [Remote host closed the connection]
<jxf> The lazy enum knows that it's only going to need to take 5 later, so it stops trying #select after that?
danshultz has joined #ruby
<MrZYX> wow. try counting the elements in the reply of the bot...
zarubin has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
<MrZYX> oh, sorry nvm
<MrZYX> misread that
<jxf> ... I did? There are 5.
<jxf> That is indistinguishable to the results of a non-lazy enum.
danshultz has joined #ruby
<jxf> That's why I asked the question.
khushildep has quit [Quit: khushildep]
Jeticus has joined #ruby
<Hanmac> jxf try the same with a different range:
<Hanmac> >> (1..Float::INFINITY).each.lazy.select(&:even?).take(5).force
<eval-in> Hanmac => [2, 4, 6, 8, 10] (https://eval.in/60268)
<jxf> that is more convincing :)
devoldmx has quit [Read error: Connection reset by peer]
<Hanmac> >> (1..Float::INFINITY).each.select(&:even?).take(5)
<eval-in> Hanmac => (https://eval.in/60269)
bigoldrock has quit [Ping timeout: 272 seconds]
devoldmx has joined #ruby
DrShoggoth has quit [Remote host closed the connection]
carlyle has quit []
gasbakid__ has quit [Read error: Connection reset by peer]
alvaro_o has joined #ruby
* Hanmac is more lazy then the Lazy enumerators
binaryplease has quit [Ping timeout: 240 seconds]
<jxf> >> x = 0; y = 0; (1..100).each.collect { |a| x += 1 }.take(5); (1..100).each.lazy.collect { |a| x += 1 }.take(5).force; [x,y]
<eval-in> jxf => [105, 0] (https://eval.in/60270)
<jxf> oops
CaptainJet has quit [Ping timeout: 272 seconds]
<jxf> >> x = 0; y = 0; (1..100).each.collect { |a| x += 1 }.take(5); (1..100).each.lazy.collect { |a| y += 1 }.take(5).force; [x,y]
<eval-in> jxf => [100, 5] (https://eval.in/60271)
Monie has joined #ruby
<jxf> I think that's pretty demonstrative :)
Jeticus has quit [Client Quit]
<jxf> (theoretically it could be possible that the evaluator is so fast that it reaches Float::INFINITY in the span of a second!)
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
CaptainJet has joined #ruby
<krz> File.dirname "ftp://example.com/file.mp4" <-- how can i omit the protocol part?
hiall has joined #ruby
soulcake has quit [Read error: Connection reset by peer]
<krz> is there a better way? or would i need to parse through the results of dirname?
<MrZYX> you want "example.com/file.mp4" back?
drumusician has joined #ruby
<krz> just example.com/
<krz> without the /
zz_jrhorn424 is now known as jrhorn424
soulcake has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<MrZYX> >> require 'uri'; URI.parse("ftp://example.com/file.mp4").hostname
<eval-in> MrZYX => "example.com" (https://eval.in/60272)
ringtiny has joined #ruby
devoldmx has joined #ruby
colonolGron has quit [Read error: Connection reset by peer]
<krz> so not via File
nutella has joined #ruby
<krz> it would make sense to use URI, since it is that as such
colonolGron has joined #ruby
<MrZYX> ;)
lethjakman has joined #ruby
nutella is now known as Guest45657
El_Dood has joined #ruby
<Hanmac> MrZYX: do you know that URI() is a shortcut for URI.parse ?
jhaals has joined #ruby
<MrZYX> I try to avoid the def SomeClassName methods if I can
vlad_starkov has quit [Remote host closed the connection]
<MrZYX> I think they're ugly and confusing
<krz> consider this instead: URI.parse("https://s3.foo.com/processed/yadda
<krz> /yadda/file.mp4").hostname
ringtiny is now known as help
<krz> i need to return s3.foo.com/processed/yadda/yadda
help is now known as ringtiny
momomomomo has joined #ruby
jrhorn424 is now known as zz_jrhorn424
chuk has joined #ruby
a1ph4g33k has joined #ruby
cadabra has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
<krz> guess i would need to use a combination of path and host
atmosx has joined #ruby
<MrZYX> and dirname, yeah
c0rn has quit [Quit: Computer has gone to sleep.]
<krz> actually just path
DrShoggoth has joined #ruby
leonidlm has quit [Ping timeout: 240 seconds]
jonahR has joined #ruby
Monie has quit [Ping timeout: 272 seconds]
<krz> hm so File.dirname(URI().path) ?
<MrZYX> I fear so
<krz> yipes
<krz> looks a little funny
Guest45657 has quit [Ping timeout: 272 seconds]
<Hanmac> >> require "uri"; uri = URI.parse("https://s3.foo.com/processed/yadda/yadda/file.mp4"); "#{uri.host}#{File.dirname(uri.path)}"
<eval-in> Hanmac => "s3.foo.com/processed/yadda/yadda" (https://eval.in/60273)
Azulinho has joined #ruby
Monie has joined #ruby
kaspergrubbe has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
kobain has quit [Remote host closed the connection]
huttan has joined #ruby
kobain has joined #ruby
interactionjaxsn has joined #ruby
jalcine has quit [Excess Flood]
vlad_starkov has joined #ruby
interact_ has joined #ruby
interactionjaxsn has quit [Read error: Connection reset by peer]
TDJACR has joined #ruby
<a1ph4g33k> greetings, all.
<gcds> Hmm maybe someone knows good lib for parsing http requests ?
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c0rn has joined #ruby
<Hanmac> some day i will make a lib that can parse "anything" .. and then i will call the lib "bob" because "parser" would make sense ;P
<a1ph4g33k> lots of those out there ... why not use Ragel ?
petey__ has quit [Remote host closed the connection]
Guest65670 has quit [Remote host closed the connection]
pyrac has joined #ruby
<Hanmac> a1ph4g33k: what is Ragel and why should i care?
alvaro_o has quit [Quit: Ex-Chat]
<gcds> hmm a1ph4g33k maybe more on that? I know it's parser for everything
<gcds> but http ?
ananthakumaran has quit [Quit: Leaving.]
<a1ph4g33k> Ragel is a library for making state machines, and is used in building parsers.
petey__ has joined #ruby
<a1ph4g33k> It's been used for lots of things, but a large case was the HTTP parser for Mongrel was built using it.
bricker_ has joined #ruby
<Hanmac> a1ph4g33k: hm ok i will look at Ragel … because i may plan something like that for an AI-like system in the game engine of my RPG system
<_br_> mongel2 codebase is quite interesting actually
Azulinho has quit [Ping timeout: 248 seconds]
IceDragon_ has joined #ruby
<_br_> AI system ? Parser ? Uh ?
<_br_> Neural Nets? Markov Models ?
bricker_ is now known as bricker`work
bricker has quit [Disconnected by services]
Mr_Wharfsnort has joined #ruby
alvaro_o has joined #ruby
IcyDragon has quit [Ping timeout: 272 seconds]
petey__ has quit [Ping timeout: 246 seconds]
endash has joined #ruby
<Hanmac> _br_ i planed to make an free ruby RPG maker … similar to the one from Enterbrain … but i thought it would be fun if you can use "finite State Machines" for the Events and the Enemies in the BattleSystem ;P … or would that be overkill? :D
<gcds> hmm i dont get any good luck of parsing http request
zz_jrhorn424 is now known as jrhorn424
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
Monie has quit [Ping timeout: 272 seconds]
simplex_ has joined #ruby
<_br_> hanmac: hehe.. I see your motivation... well happy hacking :)
elaptics is now known as elaptics`away
IcyDragon has joined #ruby
<gcds> could someone describe that for is rack ?
<a1ph4g33k> gcds: the ragel message was for you ...
<gcds> a1ph4g33k: I know but i dont find anything good about it
Monie has joined #ruby
<a1ph4g33k> you don't find anything good ? or you don't find something that does all of the work for you ?
<_br_> hanmac: I'm just curious how to express "good ai" in non fuzzy system such as a parser. That approach was used maybe decades ago and failed for AI purposes. Hence the more statistical, neural inspired directions.
gasbakid has joined #ruby
IceDragon_ has quit [Ping timeout: 272 seconds]
kevinykchan has quit [Quit: Computer has gone to sleep.]
blaxter has quit [Quit: foo]
i_s has quit [Remote host closed the connection]
<gcds> a1ph4g33k: I dont find any good example of code example how to use it
leonidlm has joined #ruby
i_s has joined #ruby
BizarreCake has quit [Quit: Leaving]
i_s has quit [Read error: Connection reset by peer]
nari has quit [Ping timeout: 240 seconds]
i_s_ has joined #ruby
<Hanmac> _br_ i think state based would be more cool then the current event command system of the older makers, but neural system would to much complicated for my customers ;P (maybe later as addional addon)
cody-- has quit [Quit: derp]
pdimitrov has quit [Ping timeout: 245 seconds]
pdimitrov has joined #ruby
pr0ggie has quit [Ping timeout: 272 seconds]
platzhirsch has joined #ruby
<platzhirsch> woop
colonolGron has quit [Read error: Connection reset by peer]
dpatel has joined #ruby
jbpros has joined #ruby
dpatel has quit [Client Quit]
pr0ggie has joined #ruby
fveillette has left #ruby [#ruby]
<gcds> a1ph4g33k: puma uses c version of http parser :/
mansi has joined #ruby
devoldmx has quit [Ping timeout: 245 seconds]
<_br_> hanmac: Hm, well, hope you have some luck with it
JohnBat26 has joined #ruby
devoldmx has joined #ruby
timonv has joined #ruby
bigoldrock has joined #ruby
<a1ph4g33k> gcds, *if* you want to write your own parser ... maybe start with: http://thingsaaronmade.com/blog/a-simple-intro-to-writing-a-lexer-with-ragel.html
<gcds> a1ph4g33k: no no not write own :D
gasbakid has quit [Read error: Connection reset by peer]
<_br_> Ruby and Ragel is fun, but for such things you break out Haskell :)
habanany has joined #ruby
zeeraw has joined #ruby
timonv has quit [Read error: Operation timed out]
leonidlm has quit [Ping timeout: 245 seconds]
<gcds> hmm I am thinking that is better for proxy server
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gcds> ruby or erlang (elixir)
jkhwan_ has joined #ruby
<_br_> erlang is nice for custom protocol creation
mrsolo has joined #ruby
habanany has quit [Client Quit]
<a1ph4g33k> ... you could always head over to ruby-toolbox.com and just go find an existing library ... oh ... like http_parser or ruby_http_parser or http-parser-lite or ffi-http-parser or http_tools ... ( you should really always start at ruby-toolbox ... if you want to see what other people have built )
colonolGron has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
gcds has quit [Read error: Connection reset by peer]
DropsOfSerenity has quit [Quit: Peace.]
zarubin has quit [Ping timeout: 240 seconds]
jkhwan has quit [Ping timeout: 272 seconds]
zeade has quit [Quit: Leaving.]
jkhwan has joined #ruby
kevinykchan has joined #ruby
einarj has quit [Remote host closed the connection]
gcds has joined #ruby
derebos has joined #ruby
nari has joined #ruby
jerius has quit [Ping timeout: 272 seconds]
zipper has quit [Ping timeout: 246 seconds]
Uranio has joined #ruby
bean__ has joined #ruby
jerius has joined #ruby
jkhwan_ has quit [Ping timeout: 272 seconds]
jerius has quit [Client Quit]
jerius has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx3 has joined #ruby
pyrac has quit [Quit: pyrac]
codeFiend has quit [Quit: codeFiend]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robustus has quit [Ping timeout: 264 seconds]
simplex_ has quit [Quit: simplex_]
robustus has joined #ruby
earthquake has quit [Quit: earthquake]
maasha has joined #ruby
petey__ has joined #ruby
pyrac has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
sayan has joined #ruby
kobain_ has joined #ruby
maasha has quit [Client Quit]
kobain has quit [Read error: Connection timed out]
jhulten has quit [Remote host closed the connection]
Es0teric has joined #ruby
jhulten has joined #ruby
zeade has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
pyrac has quit [Ping timeout: 272 seconds]
rickmasta has joined #ruby
devoldmx has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhaals has joined #ruby
g0bl1n has quit [Quit: g0bl1n]
psyl0n has quit [Quit: psyl0n]
alup has quit [Quit: Leaving]
jhulten_ has joined #ruby
Andrevan has quit [Ping timeout: 245 seconds]
jhulten has quit [Read error: Connection reset by peer]
gcds has quit [Read error: Connection reset by peer]
Advocation has quit [Quit: Advocation]
xk_id has joined #ruby
leonidlm has joined #ruby
gcds has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
yacks has joined #ruby
devoldmx has joined #ruby
thams has quit [Quit: thams]
gcds has quit [Read error: Connection reset by peer]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
nari has quit [Ping timeout: 246 seconds]
hiyosi has quit [Ping timeout: 245 seconds]
Vivekananda has joined #ruby
braincrash has joined #ruby
kobain has joined #ruby
gcds has joined #ruby
carraroj has joined #ruby
aryaching_ has joined #ruby
cody-- has joined #ruby
jerius has quit [Ping timeout: 240 seconds]
devoldmx has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 272 seconds]
devoldmx has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
kobain_ has quit [Ping timeout: 256 seconds]
zipper has joined #ruby
jkhwan has quit [Read error: Connection reset by peer]
gcds has quit [Read error: Connection reset by peer]
jerius has joined #ruby
leonidlm has quit [Ping timeout: 245 seconds]
SHyx0rmZ has joined #ruby
gcds has joined #ruby
snkcld has joined #ruby
devoldmx3 has joined #ruby
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<snkcld> if im working on a gem, when i want to test it, do i need to recompile each time, then "gem install" each time, or is there a better approach to testing gems being developed?
krz has quit [Quit: krz]
ldnunes has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 272 seconds]
calmyournerves has quit [Quit: ZNC - http://znc.in]
<yxhuvud> I would suggest to look at other gems to see how they do it
coca_rails has joined #ruby
calmyournerves has joined #ruby
lfox has quit [Quit: ZZZzzz…]
gcds has quit [Read error: Connection reset by peer]
Jetchisel has joined #ruby
drumusician has quit [Read error: Connection reset by peer]
kobain_ has joined #ruby
drumusician has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gcds has joined #ruby
bean__ has joined #ruby
_maes_ has quit [Ping timeout: 272 seconds]
gcds has quit [Read error: Connection reset by peer]
coca_rails has quit [Remote host closed the connection]
Azulinho has joined #ruby
coca_rails has joined #ruby
gcds has joined #ruby
kobain has quit [Ping timeout: 252 seconds]
drumusician has quit [Read error: Connection reset by peer]
Seich has joined #ruby
Igneous has left #ruby [#ruby]
jalcine has joined #ruby
drumusician has joined #ruby
kobain_ has quit [Ping timeout: 252 seconds]
calmyournerves has quit [Quit: ZNC - http://znc.in]
relix has joined #ruby
kobain has joined #ruby
calmyournerves has joined #ruby
gcds has quit [Read error: Connection reset by peer]
mansi has joined #ruby
shaunbaker has joined #ruby
shaunbaker has quit [Remote host closed the connection]
devoldmx3 has quit [Ping timeout: 240 seconds]
<a1ph4g33k> hanmac, I always wanted to build a state machine ... that included event handlers ... right so you would have "sound_event" within idle and "sound_event" within "alert" ... etc.
coca_rails has quit [Ping timeout: 260 seconds]
huttan has quit [Read error: Connection reset by peer]
<a1ph4g33k> ( kinda like the programming language built into SecondLife. )
pyrac has joined #ruby
gcds has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
<shevy> it had a programming language inbuilt?
<gcds> snkcld: go to the dir of installed gem and edit there, it will work out of box without gem install
reset has joined #ruby
<snkcld> "go to" the dir?
<a1ph4g33k> oh yeah ... you could make an income just building & scripting in-game objects to sell to other people.
kaspergrubbe has quit [Remote host closed the connection]
Mr_Wharfsnort has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
<a1ph4g33k> so, folks would build alarm systems for people to install in their SL homes, etc ... pretty cool stuff ... slot machines ... all sorts of interesting stuff.
beepbeep_ has joined #ruby
kaspergrubbe has joined #ruby
<a1ph4g33k> used to be a big fan ... haven't touched it in years though.
<gcds> that is fastest way to receive http request parse it and resend it to another client? (this is proxy server)
robonerd is now known as testr0n
achru has joined #ruby
flops has joined #ruby
Azulinho has quit [Ping timeout: 252 seconds]
beepbeep_ has left #ruby [#ruby]
itissid has quit [Quit: Leaving.]
DrShoggoth has quit [Remote host closed the connection]
pyrac has quit [Ping timeout: 252 seconds]
RichardBaker has joined #ruby
RichardBaker has quit [Client Quit]
coca_rails has joined #ruby
zeeraw has quit [Quit: Computer has gone to sleep.]
simplex_ has joined #ruby
RichardBaker has joined #ruby
itissid has joined #ruby
zarubin has joined #ruby
kaspergrubbe has quit [Ping timeout: 252 seconds]
godd2 has joined #ruby
pyrac has joined #ruby
itissid has quit [Client Quit]
bluOxigen has quit [Ping timeout: 240 seconds]
thepumpkin has joined #ruby
<godd2> Is there a way to find out the name of the method I'm in? https://gist.github.com/anonymous/7308802
d45h has quit [Ping timeout: 272 seconds]
interact_ is now known as interactionjaxsn
rtgg has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
<godd2> a bit more googling has told me the answer is __method__.to_s
Monie has joined #ruby
DouweM has joined #ruby
d45h has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
preller has quit [Ping timeout: 240 seconds]
thepumpkin has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
DrShoggoth has joined #ruby
<a1ph4g33k> godd2, caller ?
brtdv has quit []
fedalto has quit [Quit: Leaving]
<a1ph4g33k> warning: it's a bit slow.
<godd2> caller didn't tell me the method that I was currently inside, just the thing that called THAT method
endash has quit [Quit: endash]
DrShoggoth has quit [Read error: No route to host]
kobain_ has joined #ruby
DrShoggoth has joined #ruby
<a1ph4g33k> >> def curr_method ; caller[0] ; end ; def foo ; curr_method ; end ; foo
<eval-in> a1ph4g33k => "/tmp/execpad-7b36f935ba0b/source-7b36f935ba0b:2:in `foo'" (https://eval.in/60305)
preller has joined #ruby
<a1ph4g33k> godd2, I wrap it in a method so it *is* the caller of a support method
barratt has joined #ruby
<MrZYX> I think the solution he found (__method__) is fine
kobain has quit [Read error: Connection timed out]
aryaching_ has quit [Ping timeout: 265 seconds]
<a1ph4g33k> totally fine, just wanted to explain my answer.
msplain1 has joined #ruby
dmyers has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
nisstyre has joined #ruby
JZTech101 has quit [Ping timeout: 240 seconds]
kaspergrubbe has joined #ruby
nomenkun has joined #ruby
msplain has quit [Ping timeout: 240 seconds]
msplain1 is now known as mikesplain
gcds has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Read error: Operation timed out]
coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby
gcds has joined #ruby
bigoldrock has quit [Ping timeout: 248 seconds]
theRoUS has quit [Ping timeout: 245 seconds]
nonamehero has quit [Ping timeout: 245 seconds]
JZTech101 has joined #ruby
momomomomo has quit [Quit: momomomomo]
earthquake has joined #ruby
huttan has joined #ruby
allaire has quit []
pyrac has quit [Quit: pyrac]
d2dchat has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
coca_rails has quit [Ping timeout: 240 seconds]
skaflem has quit [Quit: Leaving]
<thyagobr> exit
thyagobr has quit [Quit: thyagobr has no reason]
einarj has joined #ruby
kobain_ is now known as kobain
jamblack has quit [Quit: jamblack]
gcds has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Ping timeout: 245 seconds]
gcds has joined #ruby
Seich has quit [Quit: Computer has gone to sleep.]
Seich has joined #ruby
gcds has quit [Read error: Connection reset by peer]
Uranio has quit [Quit: while you reading this, a kitty dies]
carif has quit [Read error: Connection reset by peer]
einarj has quit [Ping timeout: 262 seconds]
iliketurtles has joined #ruby
gcds has joined #ruby
c0rn has quit [Read error: Operation timed out]
Seich has quit [Ping timeout: 246 seconds]
devoldmx has joined #ruby
denysonique has quit [Remote host closed the connection]
pkondzior___ has quit [Remote host closed the connection]
x1337807x has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
hiyosi has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
danshultz has quit [Remote host closed the connection]
Methylated has quit [Quit: Leaving.]
aknewhope has joined #ruby
achru has quit []
c0rn has joined #ruby
danshultz has joined #ruby
burlyscudd has quit [Ping timeout: 272 seconds]
kobain has quit [Remote host closed the connection]
kobain has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
araujo has quit [Read error: Connection reset by peer]
nutella has joined #ruby
cody-- has quit [Quit: derp]
araujo has joined #ruby
atmosx has quit [Quit: Lost in trance]
nutella is now known as Guest72525
anderson has quit [Quit: Leaving]
sambao21 has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
hiyosi has quit [Ping timeout: 240 seconds]
tommyvyo has quit [Remote host closed the connection]
dancinllama has quit [Remote host closed the connection]
davidboy has quit [Remote host closed the connection]
sec_ has quit [Remote host closed the connection]
guilleiguaran_ has quit [Remote host closed the connection]
zero7 has quit [Remote host closed the connection]
kapowaz has quit [Remote host closed the connection]
lectrick has quit [Remote host closed the connection]
mattyohe has quit [Remote host closed the connection]
zpinter has quit [Remote host closed the connection]
xerxas has quit [Remote host closed the connection]
akhkharu has quit [Remote host closed the connection]
rndstr has quit [Remote host closed the connection]
andrewstewart has quit [Remote host closed the connection]
heidar has quit [Remote host closed the connection]
pipecloud has quit [Remote host closed the connection]
rubyguy has quit [Remote host closed the connection]
dnyy has quit [Read error: Connection reset by peer]
im0b has quit [Write error: Broken pipe]
ziyadb has quit [Read error: Connection reset by peer]
bluehavana has quit [Read error: Connection reset by peer]
randym_ has quit [Read error: Connection reset by peer]
Guest85414___ has quit [Write error: Broken pipe]
yalue has quit [Quit: Leaving]
danshultz has quit [Ping timeout: 260 seconds]
kobain has quit [Excess Flood]
Vivekananda has quit [Ping timeout: 272 seconds]
gcds has quit [Read error: Connection reset by peer]
leonidlm has joined #ruby
gcds has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gcds has quit [Read error: Connection reset by peer]
pragmatism has joined #ruby
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
gcds has joined #ruby
mikesplain has quit [Ping timeout: 265 seconds]
jxf has quit [Ping timeout: 245 seconds]
carif has joined #ruby
mikesplain has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
gazoombo has quit [Remote host closed the connection]
priyam_ has quit [Read error: Connection reset by peer]
stevenhaddox has quit [Remote host closed the connection]
shaileshg_ has quit [Read error: Connection reset by peer]
ggherdov has quit [Write error: Connection reset by peer]
xpirator has quit [Read error: Connection reset by peer]
jpinnix has quit [Read error: Connection reset by peer]
niftylettuce has quit [Remote host closed the connection]
gilesw_ has quit [Remote host closed the connection]
cool has quit [Remote host closed the connection]
cam`_ has quit [Write error: Connection reset by peer]
notbrent__ has quit [Remote host closed the connection]
[0x1a]_ has quit [Remote host closed the connection]
mostlybadfly has quit [Remote host closed the connection]
moeSeth has quit [Remote host closed the connection]
krawchyk has quit []
RichardBaker has joined #ruby
mmcdaris has joined #ruby
gcds has quit [Read error: Connection reset by peer]
kobain has joined #ruby
nomenkun has quit [Remote host closed the connection]
gcds has joined #ruby
jamblack has joined #ruby
flowerhack has quit [Remote host closed the connection]
karnowski has quit [Remote host closed the connection]
JoeTheGuest has quit [Remote host closed the connection]
joshwines has quit [Remote host closed the connection]
TheHodge has quit [Remote host closed the connection]
mroth has quit [Remote host closed the connection]
dekz has quit [Remote host closed the connection]
Domon_ has quit [Read error: Connection reset by peer]
Zespre has quit [Read error: Connection reset by peer]
octarine has quit [Remote host closed the connection]
strax has quit [Remote host closed the connection]
dziga has quit [Remote host closed the connection]
[Neurotic] has quit [Remote host closed the connection]
geoffw8_ has quit [Write error: Broken pipe]
ckrailo has quit [Remote host closed the connection]
Naeblis has quit [Remote host closed the connection]
djd has quit [Remote host closed the connection]
blooberr_ has quit [Read error: Connection reset by peer]
albioner has quit [Quit: Laptop went to sleep. ZZZzzz…]
gcds has quit [Read error: Connection reset by peer]
iamjarvo_ has joined #ruby
MiguelGD has joined #ruby
mmcdaris_ has joined #ruby
timonv has joined #ruby
gcds has joined #ruby
iamjarv__ has joined #ruby
thams has joined #ruby
iamjarvo_ has quit [Read error: Connection reset by peer]
iamjarvo has quit [Ping timeout: 245 seconds]
mmcdaris has quit [Ping timeout: 265 seconds]
mmcdaris_ is now known as mmcdaris
Sc0rp10n has joined #ruby
wesside has joined #ruby
timonv has quit [Read error: Operation timed out]
wesside has quit [Client Quit]
Thanatermesis has quit [Ping timeout: 256 seconds]
albioner has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DrShoggoth has quit [Remote host closed the connection]
jamblack has quit [Quit: jamblack]
ehaliewicz has joined #ruby
postmodern has joined #ruby
DrShoggoth has joined #ruby
sepp2k has joined #ruby
|jemc| has quit [Quit: WeeChat 0.4.1]
ylluminate has joined #ruby
banisterfiend has joined #ruby
calmyournerves is now known as luxflux____
momomomomo has joined #ruby
luxflux____ is now known as luxflux_________
lnormous has joined #ruby
luxflux_________ is now known as calmyournerves
iamjarv__ has quit [Remote host closed the connection]
anderson has joined #ruby
<lnormous> Is it possible to modify a collection during an each loop?
iamjarvo has joined #ruby
gcds has quit [Read error: Connection reset by peer]
<Hanmac> lnormous: yes and no, depends on the each and on the objects inside the collection
<apeiros> also it's usually a rather bad idea
<apeiros> no matter of technical feasability
<lnormous> I'm trying to implement the dbscan algorithm
gcds has joined #ruby
<Hanmac> lnormous: first way: collection is untouched but objects are changed, second way: collection is changed but objects are untouched
kevinykchan has joined #ruby
<lnormous> basically I'm wondering if I do group.each do |n| group += m end
ChampS_ has joined #ruby
<lnormous> whether it will keep iterating over the things I've added
jhulten_ has quit [Remote host closed the connection]
<apeiros> not with +=
<Hanmac> >> ["a","b","c“].each(&:upcase!) # array is not changed
<eval-in> Hanmac => /tmp/execpad-7360abdc0c27/source-7360abdc0c27:5: syntax error, unexpected tGVAR, expecting ']' ... (https://eval.in/60308)
<apeiros> Array#+ creates a new array
jhulten has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
carraroj has quit [Quit: Konversation terminated!]
<lnormous> ah, of course
<apeiros> so the array referenced by `group` on which you call .each is unmodified
<Hanmac> >> ["a","b","c"].each(&:upcase!) # array is not changed
<eval-in> Hanmac => ["A", "B", "C"] (https://eval.in/60309)
Tuxist has quit [Read error: Connection reset by peer]
<Hanmac> >> ["a","b","c"].map!(&:upcase) # Array is changed
<eval-in> Hanmac => ["A", "B", "C"] (https://eval.in/60310)
cody-- has joined #ruby
Seich has joined #ruby
pu22l3r_ has joined #ruby
<Hanmac> lnormous: did you see the difference in this two ways yet or do i need to show it?
<lnormous> yup, I understand the difference between each and map!
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
mary5030_ has joined #ruby
mary5030_ has quit [Remote host closed the connection]
<Hanmac> >>a=["a","b","c"];b=a.dup; b << "d"; a.each(&:upcase!); [a,b] # the array is not changed but the objects inside the arrays are
<eval-in> Hanmac => [["A", "B", "C"], ["A", "B", "C", "d"]] (https://eval.in/60312)
nonamehero has joined #ruby
nonamehero has joined #ruby
nonamehero has quit [Changing host]
<Hanmac> >>a=["a","b","c"];b=a.dup; b << "d"; a.map(&:upcase); [a,b] # the array is changed but the objects inside the arrays are not
<eval-in> Hanmac => [["a", "b", "c"], ["a", "b", "c", "d"]] (https://eval.in/60313)
jhulten_ has joined #ruby
mary5030_ has joined #ruby
<Hanmac> >>a=["a","b","c"];b=a.dup; b << "d"; a.map!(&:upcase);   [a,b]
<eval-in> Hanmac => undefined method ` ' for main:Object (NoMethodError) ... (https://eval.in/60314)
ChampS_ has left #ruby [#ruby]
jhulten has quit [Read error: Connection reset by peer]
mary5030 has quit [Ping timeout: 272 seconds]
RichardBaker has quit [Quit: RichardBaker]
fijimunkii has quit [Ping timeout: 245 seconds]
jamblack has joined #ruby
<Hanmac> >>a=["a","b","c"];b=a.dup; b << "d"; a.map!(&:upcase); [a,b]
<eval-in> Hanmac => [["A", "B", "C"], ["a", "b", "c", "d"]] (https://eval.in/60315)
<godd2> Man, I hate when I call the ` ' method
jhulten_ has quit [Read error: Connection reset by peer]
jhulten has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Ping timeout: 268 seconds]
derebos has quit [Ping timeout: 272 seconds]
<godd2> >> 3.send(:" ", 2)
<eval-in> godd2 => undefined method ` ' for 3:Fixnum (NoMethodError) ... (https://eval.in/60316)
pu22l3r_ has quit [Ping timeout: 268 seconds]
banisterfiend has joined #ruby
mark_locklear has quit [Ping timeout: 240 seconds]
<Hanmac> yeah spaces are fun … "object . send :sym , 3" is valid ruby ;D
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
adambeynon has joined #ruby
Monie has joined #ruby
dma_ has joined #ruby
derebos has joined #ruby
Guest76482 has joined #ruby
dma_ has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
dma_ has joined #ruby
pkondzior___ has joined #ruby
fijimunkii has joined #ruby
gcds has quit [Read error: Connection reset by peer]
phantasm66 has quit [Quit: *sleeeep….]
freerobby1 has quit [Quit: Leaving.]
gcds has joined #ruby
freerobby has joined #ruby
preller has quit [Ping timeout: 265 seconds]
elux has joined #ruby
bassclef has joined #ruby
Guest76482 has quit [Remote host closed the connection]
pkondzior___ has quit [Remote host closed the connection]
bassclef is now known as Guest30095
Soda has joined #ruby
snkcld has quit [Ping timeout: 265 seconds]
earthquake has quit [Quit: earthquake]
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
taternuts has joined #ruby
RichardBaker has joined #ruby
taternuts has quit [Client Quit]
einarj has joined #ruby
pkondzior___ has joined #ruby
maletor has quit [Read error: Connection reset by peer]
maletor has joined #ruby
ldnunes has joined #ruby
heidi has quit [Quit: Leaving.]
Azulinho has joined #ruby
gcds has quit [Read error: Connection reset by peer]
vongrippen has quit [Quit: This computer has gone to sleep]
Guest76482 has joined #ruby
<shevy> god
<a1ph4g33k> ;) yes?
osvico has joined #ruby
gcds has joined #ruby
<Hanmac> "god is currently not available, please try again later"
<havenwood> >> Array . new ( 3 ) { [ * 1 .. 4 ] . sample }
<eval-in> havenwood => [4, 3, 3] (https://eval.in/60317)
decoponio has quit [Read error: Connection reset by peer]
<havenwood> makes for a strange look..
<Hanmac> havenwood: like you see, you can flush your ruby scripts with as much as white spaces as you want ;P
<MrZYX> now space all your code out evenly so that char 80 is the last one, but not a space ;D
reset has quit [Quit: Leaving...]
<havenwood> MrZYX: Good idea, full justify. >.>
<Hanmac> XD
decoponio has joined #ruby
<MrZYX> bonus points if the first character in a line isn't a space either
atmosx has joined #ruby
Azulinho has quit [Ping timeout: 264 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Quit: jonahR]
earthquake has joined #ruby
kaldrenon has quit [Remote host closed the connection]
<nhmood> How would I go about including an 'assets' folder in my rubygem
kaldrenon has joined #ruby
<a1ph4g33k> use unicode and the whitespace that isn't categorized as whitespace in your variable, object, & function names ...
randomnick_ has joined #ruby
hiyosi has joined #ruby
kapowaz has joined #ruby
devoldmx3 has joined #ruby
Guest85414___ has joined #ruby
claymore has quit [Quit: Leaving]
dancinllama_ has joined #ruby
jbpros has quit [Quit: jbpros]
heidar has joined #ruby
colonolGron has quit [Ping timeout: 240 seconds]
dnyy has joined #ruby
bluehavana has joined #ruby
guilleiguaran_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood> ^ idiomatic Ruby if i dare say? >.>
drumusician has quit [Ping timeout: 240 seconds]
lectrick has joined #ruby
davidboy has joined #ruby
mary5030 has joined #ruby
xerxas has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
ziyadb has joined #ruby
tommyvyo_ has joined #ruby
pipecloud has joined #ruby
im0b has joined #ruby
mattyohe has joined #ruby
randym_ has joined #ruby
kaldrenon has quit [Ping timeout: 265 seconds]
sec_ has joined #ruby
jamblack has quit [Quit: jamblack]
angusiguess has quit [Ping timeout: 245 seconds]
mary5030_ has quit [Ping timeout: 252 seconds]
hiyosi has quit [Ping timeout: 264 seconds]
CaptainJet has quit []
<havenwood> `&` doesn't like being separated from `:to_s`
<havenwood> hanmac: I stabby lambda'd your `proc` :P, but I like the idea, gunna go read the thread now and see what the feedback was, i'm curious
sambao21 has joined #ruby
<Hanmac> yeah they are childhold-buddies ;P
nerium has joined #ruby
karl___ has joined #ruby
zero7 has joined #ruby
heidi has joined #ruby
hiyosi has joined #ruby
rndstr has joined #ruby
xk_id has quit [Ping timeout: 246 seconds]
danman has quit [Quit: danman]
drag00n has quit [Ping timeout: 245 seconds]
rubyguy has joined #ruby
<karl___> I have two files ("FILE A" and "FILE B") containing lines of IP addresses. I want to check each IP address in FILE B to determine if it exists in FILE A. Is there a more efficient method than just doing nested .each_line loops?
axl_ has left #ruby [#ruby]
pdimitrov has quit [Ping timeout: 245 seconds]
pr0ggie has quit [Ping timeout: 240 seconds]
Liquid-- has joined #ruby
<a1ph4g33k> karl ... do you want the intersection ? or the difference ?
<testr0n> who was i chatting with last night about thin?
<testr0n> and webmachine
pr0ggie has joined #ruby
pdimitrov has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<karl___> a1ph4g33k: the difference; I want to return all lines (IP addresses) that are in FILE B that are not in FILE A
<havenwood> karl___: Are the ip addresses sorted or in a random order?
Stygia has joined #ruby
<apeiros> karl___: set operations
<karl___> havenwood: I can sort them using gnu sort
<apeiros> see Array#- e.g.
Speed has joined #ruby
akhkharu has joined #ruby
Bry8Star{T2_ has joined #ruby
<Hanmac> apeiros what about this? lines = File.readlines(fileA); File.foreach(fileB).select {|addr| !lines.include?(addr) }
<apeiros> sorted/unsorted won't matter for that
<apeiros> hanmac: O(n^2), bad
hiyosi has quit [Ping timeout: 245 seconds]
nonamehero has quit [Ping timeout: 264 seconds]
<apeiros> well, O(n*m)
<a1ph4g33k> I would pull the lines from each ... then do b_lines - a_lines ... then you have the unique elements from b ... no sorting necessary.
<havenwood> apeiros: I just asked because i considered FileUtils.identical?
ecksit has joined #ruby
petey__ has quit [Remote host closed the connection]
<apeiros> Array#- will be O(n+m)
andrewstewart has joined #ruby
jkhwan has joined #ruby
<havenwood> or #compare_stream
<karl___> apeiros: thank you, that looks promising. hanmac and havenwood, thank you as well.
petey__ has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
<apeiros> havenwood: that only covers a corner case, no?
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
<apeiros> s/corner/edge/
Leandro__ has quit [Quit: Saliendo]
<a1ph4g33k> apeiros, we were saying the same thing, correct ?
nateberkopec has joined #ruby
<apeiros> a1ph4g33k: yes
<Hanmac> karl___: i think apeiros says the best way would be File.readlines(fileB) - File.readlines(fileA)
<havenwood> karl___: do you actually want to return the differing ips, or you just wanna know if they're identical or not?
simplex_ has quit [Quit: simplex_]
<ecksit> hey, i currently have ["domains:list", "-s", "my:string"] and i am using given_args.flat_map {|e| e.split(':')} which gives me ["domains", "list", "-s", "my", "string"] however i only want the split to work on the first occurrence of the ':'. how can i achieve this?
zpinter has joined #ruby
<havenwood> hanmac: makes sense to me
<karl___> havenwood: actually want the differing ips to write to a new file
leonidlm has quit [Ping timeout: 240 seconds]
<karl___> a1ph4g33k: looks like i forgot to thank you; thank you too! :)
DrShoggoth has quit [Quit: Leaving]
mikesplain has quit [Quit: WeeChat 0.4.2]
<havenwood> karl___: then ignore my suggestions :)
<apeiros> karl___: depending on how well or badly formatted the files are, you'll have to normalize the files to have each item in the array "look" the same
<apeiros> e.g. not that all items have a newline in them except the last…
<a1ph4g33k> karl___, File.new( filec, 'w' ).write( File.readlines( fileb ) - File.readlines( filea ) ).join( '' ) )
<karl___> apeiros: right, .chomp
allaire has joined #ruby
* Hanmac thinks there should be some kind of "diff" gem ;P
<apeiros> karl___: I wouldn't chomp all lines. too much effort.
chinychinchin has joined #ruby
<apeiros> just ensure the last one has a newline too
<apeiros> 1 vs. N ;-)
TheShaun|AFK is now known as TheShaun
<a1ph4g33k> karl___, File.new( filec, 'w' ).write( ( File.readlines( fileb ) - File.readlines( filea ) ).join( '' ) )
<karl___> ah, good point. things I wouldn't think of
<a1ph4g33k> ^^^ fixes typo
<apeiros> also ensure that you don't have entries which are equivalent but differently written (IPv6 is notorious for that…)
nucatus has quit [Remote host closed the connection]
mikesplain has joined #ruby
<karl___> much appreciated; dealing only with IPv4 here
<Hanmac> a1ph4g33k: NOO … why do you not use the File.write function?
<a1ph4g33k> hanmac, because I hadn't used it before and wasn't aware of it ?
mikesplain has left #ruby [#ruby]
ukd1 has joined #ruby
<apeiros> a1ph4g33k: also you're leaving a dangling file descriptor
<apeiros> either File.write (best option IMO) or open with a block
<a1ph4g33k> I tend to do ... File.open( blah, mode ) do |file| ... end
aknewhope has quit [Quit: Leaving]
<Hanmac> File.write(filec,( File.readlines( fileb ) - File.readlines( filea ) ).join( "\n" ))
petey__ has quit [Ping timeout: 260 seconds]
<a1ph4g33k> I was giving a one line version I was sure wasn't directly useable...
fixl has joined #ruby
<a1ph4g33k> but I appreciate being corrected.
<karl___> :)
mmitchel_ has joined #ruby
<a1ph4g33k> hanmac, I don't think you want the join \n in there ...
<a1ph4g33k> readlines should leave the line endings on ...
<a1ph4g33k> otherwise you are going to get a fluffy file.
asobrasil has left #ruby [#ruby]
<apeiros> File.readlines( fileb ) # <-- only valid if it was ensured that both files end with a newline
leonidlm has joined #ruby
petey__ has joined #ruby
lfox has joined #ruby
<apeiros> otherwise you get e.g. ["a\n", "b"] vs. ["b\n", "a"] which would yield an unexpectedly bad result when diffing :)
<a1ph4g33k> yep ... but that's easy to deal with ... ( since we aren't suggesting a one line version here ) ...
<karl___> I can ensure each file ends with a \n
<karl___> since i'm the one writing them
<apeiros> good. keeps your code simpler.
ecksit has quit [Quit: Page closed]
mmitchell has quit [Ping timeout: 272 seconds]
cody-- has quit [Quit: derp]
mmitchel_ has quit [Ping timeout: 245 seconds]
<havenwood> karl___: You could serialize Arrays of IPs to File rather than delimiting with newlines.
devoldmx3 has quit [Read error: Connection reset by peer]
<Hanmac> then why do we give join a parameter?
devoldmx has joined #ruby
<havenwood> karl___: Marshal, YAML, JSON, MsgPack
duggiefresh has quit [Remote host closed the connection]
<havenwood> karl___: Of for that matter, PStore or YAML::Store
* Hanmac says xml and runs away
<karl___> havenwood: yeah, i already have a whole bunch of scripts written that output using puts to a file
<karl___> havenwood: my datasets are small enough that it doesn't matter
<havenwood> karl___: Should be easy to drop-in replace with proper serialization. That seems nicer to me at least.
<karl___> havenwood: the benefit is that it makes for easy input to a bunch of security scanning tools
<havenwood> karl___: ahh
anderse has quit [Quit: anderse]
t0rc has joined #ruby
xk_id has joined #ruby
Guest72525 has quit [Ping timeout: 252 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leonidlm has quit [Ping timeout: 245 seconds]
allsystemsarego has quit [Quit: Leaving]
reset has joined #ruby
vongrippen has joined #ruby
Hanmac has quit [Quit: Leaving.]
burlyscudd has joined #ruby
coca_rails has joined #ruby
freerobby has quit [Quit: Leaving.]
thepumpkin has joined #ruby
<apeiros> if it's just plain IP addresses, I see nothing which speaks against newline separated text
mixel has joined #ruby
jlast has quit [Remote host closed the connection]
reset has quit [Ping timeout: 246 seconds]
silent_root has joined #ruby
freerobby has joined #ruby
gcds has quit [Read error: Connection reset by peer]
moeSeth has joined #ruby
coca_rails has quit [Ping timeout: 240 seconds]
jpinnix has joined #ruby
thepumpkin has quit [Ping timeout: 240 seconds]
gcds has joined #ruby
b00stfr3ak has quit [Ping timeout: 240 seconds]
niftylettuce has joined #ruby
cool has joined #ruby
stringoO has quit [Quit: stringoO]
volty has joined #ruby
volty has left #ruby [#ruby]
b00stfr3ak has joined #ruby
stringoO has joined #ruby
notbrent__ has joined #ruby
<havenwood> good point, especially if you're creating it yourself, much less weirdness likely
brtdv has joined #ruby
amacgregor_ has joined #ruby
axl_ has joined #ruby
cam`_ has joined #ruby
zpinter has quit [Read error: Connection reset by peer]
stringoO has quit [Read error: No route to host]
rubyguy has quit [Read error: Connection reset by peer]
zpinter has joined #ruby
amacgregor__ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
rubyguy has joined #ruby
gazoombo has joined #ruby
stringoO has joined #ruby
devoldmx has joined #ruby
priyam_ has joined #ruby
vlad_sta_ has joined #ruby
stringoO has quit [Client Quit]
amacgregor has quit [Ping timeout: 245 seconds]
c0rn has joined #ruby
volty has joined #ruby
aa47f8 has quit [Quit: aa47f8]
d45h has quit []
[0x1a]_ has joined #ruby
earthquake has quit [Quit: earthquake]
tvw has quit []
mostlybadfly has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
Liquid-- has quit [Quit: Computer has gone to sleep.]
amacgregor_ has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
axl_ has quit [Client Quit]
soheil has quit [Remote host closed the connection]
jamblack has joined #ruby
momomomomo has quit [Quit: momomomomo]
<a1ph4g33k> karl___, I went with: https://gist.github.com/a1ph4g33k/7310618
mercwithamouth has joined #ruby
flops has quit [Quit: leaving]
Vivekananda has joined #ruby
jerius has quit []
ggherdov has joined #ruby
jamblack has quit [Client Quit]
Thanatermesis has joined #ruby
shaileshg_ has joined #ruby
gilesw_ has joined #ruby
reset has joined #ruby
rockets has joined #ruby
<rockets> I've got an API that returns a hash of information. Past x number of items, the API becomes "paged" with a json endpoint for the next "page" as one of the keys of the hash
<rockets> if I use standard ruby hash merge, assuming all keys are basically unique
<rockets> is that an effective way of combining the pages?
<rockets> or will i end up with weird data
elux has quit [Quit: Bye!]
coca_rails has joined #ruby
rockets is now known as zastern_
letstest has joined #ruby
freerobby has quit [Quit: Leaving.]
breakingthings has quit []
dr0ff has joined #ruby
earthquake has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
bricker has joined #ruby
<karl___> a1ph4g33k: what a timesaver! thank you
nateberkopec has quit [Quit: Leaving...]
leonidlm has joined #ruby
mansi has quit [Remote host closed the connection]
karl___ has left #ruby [#ruby]
atmosx has quit [Quit: Lost in trance]
xpirator has joined #ruby
Monie has joined #ruby
mansi has joined #ruby
cfi30 has left #ruby [#ruby]
wesside has joined #ruby
<MrZYX> zastern_: should be fine if the keys really are unique, if they aren't you'll loose data without noticing
<zastern_> MrZYX: right yeah
<zastern_> MrZYX: I know the data well enough to know they're unique
momomomomo has joined #ruby
<a1ph4g33k> glad to help.
<zastern_> it would be impossible for them to be non-unique, the whole underlying system would fall apart
<a1ph4g33k> could clean the code up a bit ... but it was meant as a quick thought.
zastern has quit [Disconnected by services]
zastern_ is now known as zastern
bricker`work has quit [Ping timeout: 248 seconds]
devoldmx has quit [Read error: Connection reset by peer]
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<zastern> If zendesk ticket numbers were not unique it'd be really hard to use :D
devoldmx has joined #ruby
Seich has quit [Ping timeout: 245 seconds]
zastern_ has joined #ruby
Seich has joined #ruby
Liquid-- has joined #ruby
silent_root has quit [Quit: Lost terminal]
ccolorado has joined #ruby
silent_root has joined #ruby
Stygia has quit [Quit: Leaving]
<ccolorado> How can a string not have the method empyt? ? [ undefined method `empyt?' for "/var/www/sites/myblog.com/wp-includes/version.php\n":String (NoMethodError) ]
<a1ph4g33k> also, you probably need to add a newline in the collect on line 22.
interactionjaxsn has quit [Remote host closed the connection]
freerobby has joined #ruby
interactionjaxsn has joined #ruby
silent_root has quit [Client Quit]
silent_root has joined #ruby
<a1ph4g33k> ccolorado, ... typo ?
<a1ph4g33k> empty? vs empyt?
coca_rails has quit [Remote host closed the connection]
* ccolorado facepalms
silent_root has quit [Client Quit]
Seich has quit [Ping timeout: 245 seconds]
<ccolorado> a1ph4g33k: thanks
Monie has quit [Ping timeout: 264 seconds]
silent_root has joined #ruby
leonidlm has quit [Ping timeout: 240 seconds]
deception has joined #ruby
kirun has quit [Quit: Client exiting]
interactionjaxsn has quit [Ping timeout: 245 seconds]
reset has quit [Quit: Leaving...]
nonamehero has joined #ruby
<zastern> what's the name of the ruby operation that iterates through something and returns each value where thhing is true
jeffdb has quit [Ping timeout: 240 seconds]
lukec has joined #ruby
dflurker has quit [Ping timeout: 272 seconds]
letstest has quit [Ping timeout: 250 seconds]
Monie has joined #ruby
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dflurker has joined #ruby
Seich has joined #ruby
<zastern> i think that's the one
<zastern> thanks
<havenwood> zastern: There are different options depending on whether you're iterating over an Array or an Enum too. Enumerable#select, Enumerable#find_all, Array#select, Array#select! and Array#keep_if.
mansi_ has quit [Remote host closed the connection]
platypine has joined #ruby
platypine has joined #ruby
platypine has quit [Changing host]
sambao21 has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
thams has quit [Quit: thams]
m8 has quit [Quit: Sto andando via]
gcds has quit [Read error: Connection reset by peer]
timonv has joined #ruby
ehc has joined #ruby
bean__ has joined #ruby
dr0ff has quit []
workmad3 has quit [Ping timeout: 245 seconds]
adam_ is now known as adam12
mary5030 has quit [Ping timeout: 252 seconds]
gcds has joined #ruby
hiyosi has joined #ruby
einarj has quit [Remote host closed the connection]
VTLob has quit [Quit: VTLob]
mansi has quit [Ping timeout: 246 seconds]
einarj has joined #ruby
bean__ has quit [Client Quit]
dma_ has quit [Remote host closed the connection]
mansi has joined #ruby
zarubin has quit [Ping timeout: 268 seconds]
zipper has quit [Quit: leaving]
timonv has quit [Ping timeout: 246 seconds]
ukd1 has quit [Quit: Leaving...]
akhkharu has quit [Read error: Connection reset by peer]
Liquid-- has quit [Quit: Computer has gone to sleep.]
akhkharu has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
kitak has joined #ruby
mercwithamouth has joined #ruby
hiyosi has quit [Ping timeout: 245 seconds]
devoldmx has quit [Read error: Connection reset by peer]
jonathanwallace2 has quit [Ping timeout: 248 seconds]
devoldmx has joined #ruby
freerobby has quit [Quit: Leaving.]
einarj has quit [Ping timeout: 260 seconds]
a1ph4g33k has quit [Quit: Leaving]
Seich has quit [Quit: Computer has gone to sleep.]
tkuchiki has joined #ruby
t0rc has quit [Quit: WeeChat 0.4.2]
Seich has joined #ruby
barratt has quit [Quit: Leaving...]
soheil has joined #ruby
dma_ has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
zastern has quit [Remote host closed the connection]
tkuchiki has quit [Read error: Connection reset by peer]
jibi has quit [Quit: .]
hiroyuki_ has joined #ruby
derebos has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
derebos has joined #ruby
parus has quit [Ping timeout: 272 seconds]
jokke has quit [Quit: WeeChat 0.4.2]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
hiall has quit [Quit: hiall]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zastern has joined #ruby
Seich has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
parus has joined #ruby
tkuchiki_ has joined #ruby
hiroyuki has quit [Ping timeout: 240 seconds]
Muz has quit [Ping timeout: 245 seconds]
Seich has joined #ruby
Muz has joined #ruby
frustrum has joined #ruby
gks has joined #ruby
RORgasm has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 246 seconds]
RORgasm has joined #ruby
Bry8Star{T2 has joined #ruby
SHyx0rmZ has quit [Ping timeout: 252 seconds]
<gks> Hi all. So, running into an encoding issue and I have to work within Ruby 1.8.7 and 2.0… is there a way to specify File.open(filename, mode, encoding) in 1.8.7? I'm trying File.open(filename, "r", :encoding => "UTF-8") and it's giving me a "can't convert Hash into Integer" error
wallerdev has quit [Quit: wallerdev]
verto has quit [Ping timeout: 245 seconds]
tonni has joined #ruby
gcds has quit [Read error: Connection reset by peer]
tkuchiki_ has quit [Ping timeout: 268 seconds]
banisterfiend has joined #ruby
randomnick_ has quit [Read error: Connection reset by peer]
Seich has quit [Ping timeout: 260 seconds]
RORgasm has quit [Read error: Operation timed out]
Bry8Star{T2_ has quit [Ping timeout: 240 seconds]
gcds has joined #ruby
petey__ has quit [Ping timeout: 260 seconds]
<bean> gks, in general you're going to want to avoid 1.8.7
gcds has quit [Read error: Connection reset by peer]
<gks> bean: sorry, can't. Default in OS X 10.8 and 10.7
<gks> my scripts must run in default environment (otherwise I have to include Ruby in my tool)
parus has quit [Ping timeout: 264 seconds]
gcds has joined #ruby
parus has joined #ruby
fuhgeddaboudit has quit [Quit: Ex-Chat]
thams has joined #ruby
devoldmx3 has joined #ruby
goleldar has joined #ruby
<gks> believe me, wish i could ignore 1.8.7 but sadly, kinda stuck
jokke has joined #ruby
allaire has quit []
ffranz has quit [Ping timeout: 246 seconds]
carif has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 260 seconds]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
ccolorado has left #ruby [#ruby]
brtdv has quit []
<shevy> good old 1.8 branch
<shevy> gks does File.open even have an :encoding hash?
<shevy> in 1.8.7
<gks> i don't think so… which is very likely the problem :)
<shevy> yep
<shevy> searching for "encod" turns out nothing
silent_root has quit [Ping timeout: 246 seconds]
<gks> I'm going to try Encoding.external_encoding="UTF-8" if RUBY_VERSION != "1.8.7"
dekz has joined #ruby
<shevy> which version has an encoding problem?
<shevy> and what is the encoding problem
<zastern> MrZYX: hmm what about adding arrays of hashes?
<gks> Ruby 2.0. Invalid byte sequence in US-ASCII
<shevy> ok
<zastern> e.g. each page of results is an array, of hashes.
chinychinchin has quit [Read error: Connection reset by peer]
<zastern> and i want to concatenate the arrays but not merge any of the data
coldmethod has quit [Ping timeout: 272 seconds]
chinychinchin has joined #ruby
momomomomo has quit [Quit: momomomomo]
mroth has joined #ruby
<MrZYX> well, just Array#+ them
thams has quit [Ping timeout: 252 seconds]
mansi has quit [Remote host closed the connection]
bigoldrock has joined #ruby
<gks> Yea… the if RUBY_VERSION != "1.8.7" thing isn't working for me either… *sigh*
vlad_starkov has joined #ruby
<gks> i mean, it works, but it doesn't solve the issue
<zastern> ah ok so its safe
Vivekananda has quit [Remote host closed the connection]
mansi has joined #ruby
<zastern> Is there an equivalent of uh
<zastern> .merge!
<zastern> for array1 + array2
<MrZYX> .concat
<zastern> i only ever want the merged one really
<zastern> ah
<zastern> neat1
devoldmx has joined #ruby
<shevy> gks so your problem is an encoding problem only in 2.0
<zastern> excellent
<zastern> Thanks so much!
<gks> shevy: yes
pu22l3r has joined #ruby
<shevy> I can feel with you
<shevy> encoding will haunt future generation of ruby users
<gks> running a regex on the contents of a file … works great in 1.8.7, bombs in 2.0 unless i specify the encoding
<shevy> yep
gr33n7007h has joined #ruby
ckrailo has joined #ruby
<gks> sadly, can't easily do both due to ruby versions
vlad_sta_ has quit [Ping timeout: 252 seconds]
<shevy> I usually set "# Encoding: ASCII-8BIT"
<gks> top of the main ruby file?
<shevy> yeah
silent_root has joined #ruby
<shevy> and work always with BIT
<gks> i have mine set to UTF-8, if i use ASCII-8BIT it should treat everything just like 1.8.7?
<shevy> sorry no idea, I dont use UTF
<shevy> in theory yes
devoldmx3 has quit [Ping timeout: 245 seconds]
<shevy> unfortunately some things behave oddly, like when one uses .readline or loads a yaml file
ReachingFarr has quit [Read error: Operation timed out]
<gks> *sigh* thanks. I'll figure something out i guess, but damn, this is a pretty horrible situation
`Chris` has quit [Remote host closed the connection]
thams has joined #ruby
DrShoggoth has joined #ruby
mansi has quit [Ping timeout: 268 seconds]
`Chris` has joined #ruby
sambao21 has joined #ruby
`Chris` has quit [Remote host closed the connection]
`Chris` has joined #ruby
<shevy> yeah
<shevy> at least you use UTF
chinychinchin has quit [Ping timeout: 260 seconds]
<shevy> so you should profit more than I do :D
<shevy> "Ruby supports per-string character encodings"
<MrZYX> hm, wasn't in 1.8 this weird $KCODE variable to set UTF8?
<shevy> "Encodings are represented by an instance of Encoding."
<shevy> I never had to use $KCODE
<gks> well, this is a diagnostics application. it basically probe's the system (OS X) and locates all of the issues related to our application … so I'm opening all kinds of files and stuff for various things (getting app versions and reading settings plists and such)
Guest46584 is now known as ageis
<shevy> gks I am confused though
gcds has quit [Quit: gcds]
<shevy> gks you said the error happens on 2.x yet the target computer will have 1.8.x and thus, none of those encoding errors, or?
x1337807x has joined #ruby
<shevy> >> Encoding.list.size
<eval-in> shevy => 100 (https://eval.in/60319)
<shevy> we have 100 encodings \o/
<gks> if the target computer has 1.8.7 it works perfectly. I assume because any UTF-8 characters are tossed from the file as it is read
Seich has joined #ruby
<shevy> aha
testr0n has quit [Quit: ...]
pu22l3r has quit [Remote host closed the connection]
<shevy> so the script runs but perhaps it discards things
<shevy> can't you use Iconv ?
<shevy> on 1.8.7
robonerd has joined #ruby
<gks> ++ it throws a ArgumentError on some of the things and poof… suddenly i get no useful data for that section of the tool
carif has joined #ruby
pu22l3r has joined #ruby
tomzx_mac has joined #ruby
robonerd has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
<gks> fortunately this isn't a deal breaker, but it makes our tech support people's jobs difficult… and since Mavericks (10.9) is running Ruby 2, this is becoming a bigger deal every day
<shevy> ArgumentError ? then you must pass in a wrong amount of arguments to a method
sambao21 has quit [Ping timeout: 240 seconds]
<shevy> >> def foo(i); end; foo 5,6
<eval-in> shevy => wrong number of arguments (2 for 1) (ArgumentError) ... (https://eval.in/60320)
earthquake has quit [Quit: earthquake]
<gks> shevy: nope, string =~ regex poof argument error
robbyoconnor has joined #ruby
Seich has quit [Read error: Connection reset by peer]
jokke has quit [Quit: WeeChat 0.4.2]
<bean> regex =~ string
octarine has joined #ruby
Briareos1 has joined #ruby
<gks> holy crap… is that where i'm going wrong? lol
nucatus has joined #ruby
djd has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
jokke has joined #ruby
hiyosi has joined #ruby
<MrZYX> maybe, =~ is a method call on the left hand side object
devoldmx has joined #ruby
<gks> testing now
<MrZYX> (or wasn't it?)
<MrZYX> I don't remember because the parser also has special treating for it
<shevy> >> "abcdef" =~ /d/
<eval-in> shevy => 3 (https://eval.in/60321)
<shevy> alias :? :lambda ? = Math::PI
Methylated has joined #ruby
robonerd has joined #ruby
robonerd has quit [Remote host closed the connection]
<gks> nope, no luck there, same error
strax has joined #ruby
<gks> so, it sounds like it just reverses it in the compiler if you type it wrong or something
pu22l3r has quit [Ping timeout: 268 seconds]
nucatus has quit [Read error: Operation timed out]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
matchaw has joined #ruby
<gks> guess i need to look into compiling Ruby with the application and just including Ruby 2 with all distributions of it so that all users are running Ruby 2.0 for this app… fortunately, that's probably better in the long run, unfortunately it's kind of a pita at the moment