apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
IvoTenk has joined #ruby
mikepack has quit [Remote host closed the connection]
jackdanger has left #ruby [#ruby]
babykosh has quit [Quit: babykosh]
bel3atar has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
babykosh has joined #ruby
blazes816 has quit [Quit: blazes816]
synthetix has joined #ruby
babykosh has quit [Quit: babykosh]
xnm has joined #ruby
rew_ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
ChampS666 has quit [Ping timeout: 248 seconds]
<dankest> What does double bang do? ex: !!variable
jackbrownhf has quit [Quit: Sto andando via]
vasile has joined #ruby
rew has quit [Ping timeout: 248 seconds]
<seanstickle> dankest: double negative
babykosh has joined #ruby
<seanstickle> !!true => true
danneu has quit [Quit: WeeChat 0.3.8]
<seanstickle> Which is convenient for things like nil. !!nil => false
<seanstickle> It booleanizes non booleans
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
clj_newb has quit [Ping timeout: 252 seconds]
<babykosh> #empty_spaces_on_board = 7
<babykosh> empty_spaces_on_board.each do |empty_space_symbol|
<babykosh> # create a hash
<babykosh> new_board_hash = {index_mark => move_as_somebody(board, player, empty_space_symbol).grid} #value
<babykosh> p new_board_hash
<babykosh> end
<babykosh> I have this....
statarb3 has quit [Quit: Leaving]
<dankest> seanstickle: Cool, thanks
<seanstickle> dankest: bittest
<babykosh> each time this loop happens I want to place the result into "something" I can thin call
phelps has quit [Ping timeout: 240 seconds]
Edward_ has joined #ruby
<babykosh> on
jenrzzz has joined #ruby
Shamgar has quit [Ping timeout: 252 seconds]
Shamgar has joined #ruby
fir_ed has quit [Ping timeout: 244 seconds]
mengu has joined #ruby
chrishunt has joined #ruby
jaygen has joined #ruby
apeiros_ has quit [Remote host closed the connection]
danneu has joined #ruby
chrishunt has quit [Ping timeout: 244 seconds]
jimeh has quit [Quit: Computer has gone to sleep.]
nomenkun has quit [Remote host closed the connection]
crazed has quit [Ping timeout: 250 seconds]
phelps has joined #ruby
phelps has quit [Client Quit]
babykosh has quit [Quit: babykosh]
nomenkun has joined #ruby
phelps has joined #ruby
crazed has joined #ruby
banisterfiend has quit [Ping timeout: 265 seconds]
osvico has joined #ruby
hotovson_ has joined #ruby
banisterfiend has joined #ruby
synthetix has quit [Ping timeout: 240 seconds]
thone has joined #ruby
thone_ has quit [Ping timeout: 252 seconds]
cableray has quit [Quit: cableray]
jeffreybaird has joined #ruby
h4mz1d has quit [Ping timeout: 252 seconds]
tomku has joined #ruby
dankest is now known as dankest|away
cascalheira has quit [Quit: Leaving...]
gyre007 has quit [Remote host closed the connection]
igro has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Ping timeout: 240 seconds]
synthetix has joined #ruby
timonv has joined #ruby
gabrielrotbart has joined #ruby
c0rn has quit []
nomenkun has quit [Ping timeout: 255 seconds]
<tsp> shevy: edbrowse is ed with PCRE and a browser, quite useful. One of those apps I can't live without
timonv has quit [Ping timeout: 276 seconds]
digitalcakestudi has quit [Quit: Leaving.]
drlaj has joined #ruby
tommyvyo_ has joined #ruby
lolcathost has quit [Quit: leaving]
hotovson_ has quit [Remote host closed the connection]
lolcathost has joined #ruby
iamjarvo has quit [Quit: Leaving.]
pu22l3r_ has joined #ruby
moshee has quit [Ping timeout: 255 seconds]
Virunga has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
cyong has quit [Quit: Leaving.]
Virunga has quit [Remote host closed the connection]
drlaj has quit [Ping timeout: 260 seconds]
hotovson has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
yshh has joined #ruby
banisterfiend has joined #ruby
ejholmes has joined #ruby
<shevy> interesting, never heard of that
hotovson has quit [Ping timeout: 240 seconds]
adac has quit [Quit: Leaving]
ipalaus has quit [Quit: :-)]
mike-- has joined #ruby
joeycarmello has joined #ruby
raycarr has quit [Quit: raycarr]
jwang has quit [Quit: Leaving]
miso1337 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
tommyvyo_ has joined #ruby
joeycarmello has quit [Ping timeout: 244 seconds]
tommyvyo_ has quit [Client Quit]
seanstickle has quit [Quit: seanstickle]
synthetix has quit [Ping timeout: 264 seconds]
chrishunt has joined #ruby
ephemerian has quit [Quit: Leaving.]
Naeblis has left #ruby ["Leaving"]
raycarr has joined #ruby
Tref has joined #ruby
Gooder has joined #ruby
chrishunt has quit [Ping timeout: 244 seconds]
banister_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
beachandbytes has quit [Ping timeout: 248 seconds]
cyong has joined #ruby
tommyvyo_ has joined #ruby
raycarr has quit [Client Quit]
dukedave has quit [Quit: Leaving.]
ejholmes has quit [Quit: ejholmes]
beachandbytes has joined #ruby
digitalcakestudi has joined #ruby
agarie has joined #ruby
Tref has quit [Quit: Tref]
EyesIsMine has quit [Ping timeout: 264 seconds]
danneu has quit [Ping timeout: 250 seconds]
reppard has joined #ruby
synthetix has joined #ruby
rew_ has quit [Quit: leaving]
EyesIsMine has joined #ruby
Guest84831 has quit [Quit: Computer has gone to sleep.]
moos3 has quit [Quit: Computer has gone to sleep.]
Briney has joined #ruby
cyong has quit [Ping timeout: 264 seconds]
slainer68 has quit [Remote host closed the connection]
digitalcakestudi has quit [Quit: Leaving.]
jwang has joined #ruby
banister_ has quit [Ping timeout: 244 seconds]
banisterfiend has joined #ruby
voodoofish has quit [Ping timeout: 240 seconds]
Goles has joined #ruby
hsbt is now known as hsbt_away
freakazoid0223 has joined #ruby
Briney has quit [Quit: Briney]
ejholmes has joined #ruby
IvoTenk has quit [Ping timeout: 240 seconds]
GoGoGarrett has quit [Remote host closed the connection]
cyong has joined #ruby
mike-- has quit [Ping timeout: 265 seconds]
huoxito has joined #ruby
ejholmes has quit [Client Quit]
gyre007 has joined #ruby
havenn has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
voodoofish has joined #ruby
gyre007 has quit [Ping timeout: 252 seconds]
ipalaus has joined #ruby
nonotza has joined #ruby
vasile has quit [Ping timeout: 265 seconds]
Goles has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
ejholmes has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
Goles has joined #ruby
dankest|away is now known as dankest
Goles has quit [Max SendQ exceeded]
krisfremen has quit [Remote host closed the connection]
Goles has joined #ruby
tps_ has joined #ruby
Daman has quit [Quit: u]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
vasile has joined #ruby
leonardorb has quit [Remote host closed the connection]
krisfremen has joined #ruby
krisfremen has joined #ruby
leonardorb has joined #ruby
danneu has joined #ruby
slainer68 has joined #ruby
Shamgar has quit [Ping timeout: 264 seconds]
EyesIsMine has quit [Ping timeout: 248 seconds]
pu22l3r_ has quit [Ping timeout: 252 seconds]
pu22l3r_ has joined #ruby
iamjarvo has joined #ruby
mahmoudimus has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
tommyvyo has joined #ruby
bye_bye has joined #ruby
havenn has quit [Remote host closed the connection]
aaronmacy has quit [Read error: Connection reset by peer]
aaronmacy has joined #ruby
nonotza has quit [Quit: nonotza]
tommyvyo has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
slainer68 has quit [Ping timeout: 264 seconds]
rakl has quit [Ping timeout: 252 seconds]
Gooder has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
rakl has joined #ruby
cj3kim has joined #ruby
bradhe has joined #ruby
krz has joined #ruby
definiv has joined #ruby
mengu has quit [Remote host closed the connection]
kil0byte_ has joined #ruby
kil0byte_ has quit [Remote host closed the connection]
pencilcheck has joined #ruby
kil0byte has quit [Ping timeout: 255 seconds]
freeayu_ has joined #ruby
mercwithamouth has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
noric has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
vasile has quit [Read error: Operation timed out]
banisterfiend has quit [Ping timeout: 252 seconds]
<noric> What's an ideal directory / file structure for nested modules? Let's say I'm in a subdirectory of lib. I want a new nested module foo. mkdir ./foo/ will contain all the files inside module Foo. ./foo.rb contains requires for module Foo, so a consumer must only require 'foo.rb' to receive ./foo/*.
Hanmac1 has joined #ruby
<ryanf> that sounds typical, yeah
<noric> A nested class, Foo::Bar will go in ./foo/bar.rb, ./foo.rb will require 'bar'.
<ryanf> * 'foo/bar'
<noric> My question is, where do I put methods defined on the module: module Foo; def self.bar; end;
<ryanf> but yeah, that sounds about right. and rails autoloading will assume that structure, so you don't need the require statements
<ryanf> probably foo.rb
<noric> One convention seems to be ./foo/base.rb. I despise base after having too many base.rb<4> in emacs.
<noric> So Module Foo; def self.bar; end; would go in ./foo.rb ?
<ryanf> surely foo/base.rb would be a class called Foo::Base?
cj3kim has quit [Quit: This computer has gone to sleep]
<noric> hopefully :P
<ryanf> yeah, I'd put it in foo.rb. or if it gets too sprawling, try to refactor it to not need so much stuff in there
<noric> So, one counterpoint to including Foo::bar in foo.rb, a bunch of foo functionality is living in foo's parent directory.
<noric> If you think of foo/* as being the contents of module foo, well you're violating that when you put a bunch of functions in foo.rb
<ryanf> s/in foo's parent directory/in foo's container module/
<ryanf> it seems pretty equivalent to me
Hanmac has quit [Ping timeout: 264 seconds]
<ryanf> if that's how you're structuring things and that makes you uncomfortable, it probably makes more sense to change the structure than mess with the arrangement of files
<noric> So you want, ./foo.rb # requires the Foo module, ./foo/bar.rb # class Foo::Bar, ./foo/foo.rb # Module Foo; def self.classMethodOmg; end;
<ryanf> I think it's generally worth keeping to the convention of the directory structure reflecting the classes/modules that are in them
<noric> Well, in a ruby module/class hierarchy, there's stuff attached to the module and to classes
<ryanf> so foo/foo.rb should be Foo::Foo
<noric> Classes are understood to be foo/bar.rb
<noric> right
<ryanf> if it's not Foo::Foo, you're misleading someone who is trying to find the class methods
<ryanf> mo
<ryanf> *imo
<noric> so ./foo.rb contains the host of business logic, Foo::bar1 .. Foo::barN?
<noric> I see the pattern, but then you're left with a bunch of the module outside the module directory.
<noric> It seems cleaner to have only the requires outside the module directory.
<noric> Sinatra uses sinatra/base.rb to mean "a general container" and not Sinatra::Base
gabrielrotbart has joined #ruby
postmodern has joined #ruby
<noric> But other projects do it differently
<noric> I'm just surprised there's no clear convention
<ryanf> I think there is a clear convention, and you just don't like it :)
<ryanf> of course different projects will vary, because it's a free country
freeayu has joined #ruby
<ryanf> (metaphorically speaking)
<ryanf> but I definitely think the common assumption is that the constant hierarchy matches the file hierarchy
love_color_text has joined #ruby
<noric> Hehe, thanks. I will go with Foo::method inside foo.rb (outside the "module directory")
freeayu_ has quit [Read error: Connection reset by peer]
<noric> I like that better than screwing with Foo::method inside foo/?.rb
banisterfiend has joined #ruby
tps_ has quit [Quit: tps_]
elkclone has quit [Quit: It's never too late to unplug and run.]
Michael__ has joined #ruby
<mercwithamouth> how would one go about referencing a method with a symbol?
<havenn> mercwithamouth: send(:puts, 'hi')
shiin has quit [Quit: Computer has gone to sleep.]
<waxjar> or __send__ if you're not sure send might be used for something else
pu22l3r_ has quit [Ping timeout: 265 seconds]
freakazoid0223 has quit [Quit: Leaving]
reppard has quit [Ping timeout: 265 seconds]
<mercwithamouth> havenn: ahh i see
<mercwithamouth> is that how rails handles it...when you call methods as arguments to before_filter, etc?
<ryanf> pretty much
<ryanf> there are a couple of other ways you can do it too
<ryanf> like method(:foo) will return a Method object which you can then call with .call
<ryanf> or you could use eval
<ryanf> but send is the usual way
<mercwithamouth> ryanf: o_O; you sure? http://cl.ly/image/3s05460J0o1V
entrenador has joined #ruby
pu22l3r_ has joined #ruby
hsbt_away has quit [Ping timeout: 252 seconds]
<ryanf> ... you spelled it differently
fyolnish has joined #ruby
<havenn> mercwithamouth: method(:puts).call('hi')
mike-- has joined #ruby
Daman has joined #ruby
Daman has quit [Excess Flood]
<mercwithamouth> ahh!
<mercwithamouth> oops i mispelled the method as well =P
<mercwithamouth> nice...i'm just picking one thing and writing/learning as much about it as i can a day...that's why i'm asking all of these questions =P
ShareTextingCEO has joined #ruby
<havenn> method(:puts)['hi'] or .('hi') or .call('hi') are all valid btw.
<havenn> (All are just sugar for #call)
ShareTextingCEO has quit [Killed (idoru (Spam is off topic on freenode.))]
<mercwithamouth> hrmm so for method(:puts)['hi'] ...the ['hi'] portion...would i say you're passing puts an array..that particular string?
<havenn> I <3 ->!
babykosh has joined #ruby
mneorr has joined #ruby
<havenn> mercwithamouth: Doesn't mean Array in that sense. An alternate syntax to .call when following a proc or lambda.
entrenador has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
vasile has joined #ruby
ejholmes has quit [Quit: ejholmes]
Michael__ has quit [Remote host closed the connection]
<havenn> mercwithamouth: say = ->(letter){ putc letter }; say['hi']
babykosh has quit [Client Quit]
Michael__ has joined #ruby
<havenn> mercwithamouth: err, s/putc/puts (changed my mind midway >.>)
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
<havenn> mercwithamouth: Here, to make it more incomprehensible... :P: say = ->(letter){ putc letter }; say[?x]
tommyvyo has quit [Quit: Computer has gone to sleep.]
Michael__ has quit [Read error: Connection reset by peer]
hsbt_away has joined #ruby
mpereira has quit [Ping timeout: 264 seconds]
jojosiao1 has joined #ruby
Michael__ has joined #ruby
mjolk has joined #ruby
<mercwithamouth> havenn: ll
cj3kim has joined #ruby
<mercwithamouth> i gotcha
<mercwithamouth> i like -> i play with scala too! now that's more like it!
<havenn> mercwithamouth: Stabby lambdas ftw!
banisterfiend has quit [Ping timeout: 260 seconds]
definiv has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
gridaphobe has joined #ruby
jrajav has joined #ruby
ejholmes has joined #ruby
Michael__ has quit [Remote host closed the connection]
rohit has joined #ruby
Michael__ has joined #ruby
<mercwithamouth> lol
techhelp has joined #ruby
cyong has quit [Quit: Leaving.]
xpen has joined #ruby
bradhe has quit [Remote host closed the connection]
pac1 has quit [Quit: I got it one line of code at a time]
moshee has quit [Remote host closed the connection]
moshee has joined #ruby
pencilcheck has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
bradhe has joined #ruby
daniel_hinojosa has quit [Read error: Connection reset by peer]
jrajav has quit [Quit: I tend to be neutral about apples]
daniel_hinojosa has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
Tref has joined #ruby
freakazoid0223 has joined #ruby
Zolrath has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
nazty has joined #ruby
adeponte has joined #ruby
leonardorb has quit [Remote host closed the connection]
rtd_ has joined #ruby
Michael__ has quit [Remote host closed the connection]
Apathetic has joined #ruby
Michael__ has joined #ruby
Goles has quit [Ping timeout: 264 seconds]
xpen_ has joined #ruby
xpen has quit [Ping timeout: 255 seconds]
cyong has joined #ruby
browndawg has joined #ruby
Goles has joined #ruby
pencilcheck has joined #ruby
gridaphobe has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
daniel_- has quit [Ping timeout: 240 seconds]
xpen has joined #ruby
rohit has quit [Ping timeout: 240 seconds]
niklasb has quit [Ping timeout: 244 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
xpen_ has quit [Ping timeout: 240 seconds]
jeffreybaird has joined #ruby
gridaphobe has joined #ruby
elico has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
dnunez24 has joined #ruby
gridaphobe has quit [Client Quit]
dankest is now known as dankest|away
Tref has quit [Quit: Tref]
emmanuelux has quit [Quit: emmanuelux]
tjbiddle has joined #ruby
dnunez24 has quit [Client Quit]
ttt_ has joined #ruby
<mike--> i've been going through the well-grounded rubyist and found something i don't get about ruby
Hanmac1 is now known as Hanmac
<mike--> if i write
<mike--> lol = "lol"; yes = "yes"; lol = yes; yes = "blah" - i end up with lol = "yes" and yes = "blah"
<mike--> that's as expected
<mike--> but if i do
<mike--> a = b
<mike--> and use String#replace on b
ttt has quit [Ping timeout: 245 seconds]
<mike--> a also gets changed
tommyvyo has joined #ruby
<mike--> i understand that's because b is being passed by reference, and a and b are referring to the same object
<mike--> but why doesn't assigning b = "23" exhibit the same behavior then?
prettymuchbryce has quit [Quit: prettymuchbryce]
<mike--> and how do i know which methods in the standard library have objects passed by reference instead of by value?
<mike--> should i just expect that behavior for any method?
rohit has joined #ruby
<havenn> mike--: a is only pointing at b, when b changed a does as well
<havenn> I said that poorly...
Apathetic has quit [Quit: Leaving]
Edward_ has quit [Ping timeout: 240 seconds]
jean has quit [Ping timeout: 252 seconds]
<mike--> that makes sense to me, i think
jeffreybaird has quit [Quit: jeffreybaird]
rohit has quit [Client Quit]
<havenn> mike--: As you have it, lol points at 'lol' then you reassign it to point at what yes is pointing at which is 'yes'.
<mike--> a = b means a is now pointing to the same object as b
jean has joined #ruby
<mike--> they now have the same object_id
<havenn> mike--: Yes.
<mike--> but then
rohit has joined #ruby
<mike--> if i use assignment instead of a method
<mike--> like let's say b = "yeah"; a = b; (both are now "yeah")
xpen has quit [Read error: Connection timed out]
<mike--> then b = "WORD, YO!"
<havenn> mike--: Yes, a and b are only references, only "yeah" exists.
<mike--> end result: a = "yeah" and b = "WORD, YO!"
<foucist> mike--: b gets pointed at a new object "word "
<foucist> the string is the object, b or a is merely a pointer
<mike--> ohh
<mike--> interesting
xpen has joined #ruby
<foucist> b = "foo" ; b = "blah" isn't editing the "foo" to change it into "blah"
<foucist> in fact "foo" still exists in memory till it gets collected
<havenn> ^
hemanth has quit [Read error: Connection reset by peer]
<mike--> i notice when i'm in irb and i look at the object_ids for some integers
<mike--> they have strangely low object_ids
<mike--> irb(main):403:0> 4.object_id
<mike--> 9
<mike--> i guess i'm just trying to work out a mental model of how ruby is handling all these random objects also
<mike--> why are the object_ids of integers so predictable
<mike--> and is it creating random object_ids for strings, or are those object_ids as predictable as the integers
radic has joined #ruby
rakl has quit [Ping timeout: 264 seconds]
mahmoudimus has joined #ruby
dankest|away is now known as dankest
<rking> mike--: Look at rb_obj_id in ruby's gc.c
<havenn> mike--: Object IDs depend on implementation. E.g., nil on MRI = 4, RBX = 26, MRuby = 1, etc.
rakl has joined #ruby
<havenn> mike--: Good talk on Ruby internals: http://mtnwestrubyconf2008.confreaks.com/11farley.html
browndawg has left #ruby [#ruby]
DanBoy has quit [Remote host closed the connection]
<mike--> very cool - thanks, rking and havenn and foucist
Bosox20051 has joined #ruby
DanBoy has joined #ruby
radic_ has quit [Ping timeout: 264 seconds]
<havenn> mike--: Good obscure Ruby trivia... why in Ruby 2.0.0 is?: nil.object_id #=> 8
jean has quit [Ping timeout: 255 seconds]
jean has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
Goles has quit [Ping timeout: 248 seconds]
synthetix has quit [Ping timeout: 240 seconds]
hsbt_away is now known as hsbt
huoxito has quit [Quit: Leaving]
Jasko has quit [Read error: Connection reset by peer]
<ryanf> whoa
yaymukund has quit [Ping timeout: 256 seconds]
Jasko has joined #ruby
jean has quit [Ping timeout: 256 seconds]
<rking> havenn: Is it really? I'm seeing nil 00000000000000000000000000000100
<ryanf> that is 8 in binary
<ryanf> wait, no it's not
mikepack has joined #ruby
<ryanf> it's 4, which is what it's supposed to be
<ryanf> havenn: explain yourself
<rking> havenn: IMMEDIATELY.
jean has joined #ruby
Goles has joined #ruby
gridaphobe has joined #ruby
<ryanf> he is right
<ryanf> on ruby 2 I get 8 for nil
<rking> Weird.
<ryanf> 2 is 2.0, 4 is nothing, and 6 is -2.0
<ryanf> wtf
<ryanf> packing floats into every other even number or something?
crocket has joined #ruby
<crocket> ruby is a winner.
<crocket> So is python.
<havenn> crocket: Crush the snake.
nerd has joined #ruby
<ryanf> haha it's hilarious how high you have to make the id before getting a float that isn't between 2 and 3
bradhe has quit [Remote host closed the connection]
<ryanf> why does it start at 2 instead of 0 though?
pu22l3r_ has quit [Ping timeout: 255 seconds]
<ryanf> wow, they made this whole thing a lot less aesthetically pleasing
nerd has quit [Client Quit]
<ryanf> false is 0, nil is 8, and true is 20
Munto has quit [Quit: Let's make things Frugal!]
gridaphobe has quit [Remote host closed the connection]
banisterfiend has joined #ruby
gridaphobe has joined #ruby
tps_ has joined #ruby
yacks has joined #ruby
pu22l3r_ has joined #ruby
pu22l3r_ has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
zaki has quit [Read error: Operation timed out]
nerd has joined #ruby
rohit has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Ping timeout: 244 seconds]
nomenkun has joined #ruby
banisterfiend has joined #ruby
joofsh has quit [Quit: Leaving]
sepp2k has joined #ruby
bradhe has joined #ruby
Guest73164 has joined #ruby
Vert has quit [Read error: Connection reset by peer]
nomenkun has quit [Ping timeout: 240 seconds]
tps_ has quit [Quit: tps_]
epwhorl has joined #ruby
havenn has quit [Remote host closed the connection]
prettymuchbryce has joined #ruby
prettymuchbryce has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
tps_ has joined #ruby
xpen has quit [Ping timeout: 252 seconds]
segv- has joined #ruby
gridaphobe has quit [Remote host closed the connection]
gridaphobe has joined #ruby
xpen has joined #ruby
ryanf_ has joined #ruby
browndawg has joined #ruby
Takehiro has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
rohit has joined #ruby
Guest73164 has quit [Quit: Guest73164]
leonardorb has joined #ruby
zaki has joined #ruby
aaronmacy has quit [Quit: Leaving.]
andrew__ has joined #ruby
andrew__ is now known as andrewhl
leonardorb has quit [Ping timeout: 240 seconds]
aaronmacy has joined #ruby
CaptainJet has quit []
pencilcheck has quit [Read error: Connection reset by peer]
ejholmes has quit [Quit: ejholmes]
pencilcheck has joined #ruby
jsilver has joined #ruby
ejholmes has joined #ruby
cableray has joined #ruby
beachandbytes has quit [Ping timeout: 255 seconds]
hsbt is now known as hsbt_away
Emmanuel_Chanel has joined #ruby
ryanf_ has quit [Quit: broken pipes |||]
Vert has joined #ruby
cableray has quit [Ping timeout: 240 seconds]
adeponte has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
ryanf_ has joined #ruby
nerd has quit [Quit: WeeChat 0.3.9.2]
gridaphobe has quit [Remote host closed the connection]
yaymukund has joined #ruby
cableray has joined #ruby
Goles has quit [Ping timeout: 252 seconds]
mike--_ has joined #ruby
Goles has joined #ruby
marcuspat has joined #ruby
mike-- has quit [Ping timeout: 265 seconds]
tjbiddle has quit [Quit: tjbiddle]
gridaphobe has joined #ruby
gridaphobe has quit [Remote host closed the connection]
mike--_ has quit [Ping timeout: 240 seconds]
dnyy has joined #ruby
ciopte7 has quit [Quit: ciopte7]
Jasko has quit [Read error: Connection reset by peer]
mike-- has joined #ruby
Jasko has joined #ruby
xnm has quit [Read error: Connection reset by peer]
philomory has joined #ruby
c0rn has joined #ruby
ryanf_ has quit [Quit: broken pipes |||]
pen has joined #ruby
pencilcheck has quit [Read error: Connection reset by peer]
pencilcheck has joined #ruby
BoomCow has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
gridaphobe has joined #ruby
pen has quit [Ping timeout: 240 seconds]
pnbeast has quit [Quit: leaving]
gmci_ has quit [Quit: Computer has gone to sleep.]
mjolk has quit [Quit: returning some videotapes]
jean has quit [Ping timeout: 255 seconds]
jean has joined #ruby
ciopte7 has joined #ruby
ananthakumaran has joined #ruby
phelps has quit [Ping timeout: 255 seconds]
rohit has quit [Quit: Leaving]
philomory has quit [Quit: philomory]
Gooder has joined #ruby
c0rn has quit []
jenrzzz has joined #ruby
phelps has joined #ruby
dnyy has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
bigmac_ has quit [Quit: Leaving]
h4mz1d has joined #ruby
epwhorl has quit [Ping timeout: 276 seconds]
xnm has joined #ruby
Zense has quit []
mahmoudimus has quit [Quit: Computer has gone to sleep.]
phelps has quit [Ping timeout: 276 seconds]
ner0x has quit [Quit: Leaving]
adeponte has joined #ruby
mahmoudimus has joined #ruby
FredLe has joined #ruby
phelps has joined #ruby
jaygen has quit [Remote host closed the connection]
Solnse has joined #ruby
RudyValencia has quit [Quit: Hacked by Chinese]
bradhe has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
jlwestsr has quit [Quit: Ex-Chat]
RudyValencia has joined #ruby
Averna1 has left #ruby [#ruby]
dukedave has joined #ruby
RudyValencia has quit [Client Quit]
RudyValencia has joined #ruby
vasile has quit [Read error: Operation timed out]
cantonic_ has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
slainer68 has joined #ruby
Yarou has quit [Ping timeout: 252 seconds]
Gooder has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
jenrzzz has quit [Ping timeout: 276 seconds]
bradhe has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 250 seconds]
cantonic_ is now known as cantonic
BoomCow has quit [Quit: This computer has gone to sleep]
dankest is now known as dankest|away
a_a_g has joined #ruby
skcin7 has joined #ruby
burgestrand has joined #ruby
jackdanger has joined #ruby
slainer68 has quit [Ping timeout: 240 seconds]
Valkyrie^ is now known as Azure
devdazed has quit [Ping timeout: 256 seconds]
c0rn has joined #ruby
dankest|away is now known as dankest
devdazed has joined #ruby
pencilcheck has quit [Read error: Connection reset by peer]
pen has joined #ruby
bradhe has joined #ruby
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
pen has quit [Read error: Connection reset by peer]
Jasko has quit [Read error: Connection reset by peer]
pencilcheck has joined #ruby
Jasko has joined #ruby
aaronmacy has quit [Quit: Leaving.]
djdb has joined #ruby
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
yacks has quit [Read error: Operation timed out]
h4mz1d has quit [Ping timeout: 240 seconds]
Goles has quit [Quit: Out.]
generalissimo has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
banisterfiend has joined #ruby
BoomCow has joined #ruby
jojosiao1 has quit [Remote host closed the connection]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
tagrudev has joined #ruby
bradhe has quit [Remote host closed the connection]
cyong has quit [Quit: Leaving.]
amaya_the has joined #ruby
adeponte has quit [Remote host closed the connection]
dankest is now known as dankest|away
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
rippa has joined #ruby
jean has quit [Ping timeout: 264 seconds]
jean has joined #ruby
andrewhl has quit [Remote host closed the connection]
statarb3 has joined #ruby
statarb3 has joined #ruby
darthdeus has joined #ruby
jean has quit [Ping timeout: 240 seconds]
quest88 has quit [Quit: quest88]
jean has joined #ruby
dankest|away is now known as dankest
ciopte7 has quit [Quit: ciopte7]
charlies_ has joined #ruby
charlies_ is now known as charliesome
hemanth_ has joined #ruby
amaya_the_ has joined #ruby
amaya_the has quit [Ping timeout: 255 seconds]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
mercwithamouth has quit [Ping timeout: 252 seconds]
w|t has quit [Ping timeout: 246 seconds]
kiyoura has quit [Quit: Leaving]
hoelzro|away is now known as hoelzro
lolmaus has joined #ruby
pencilcheck has quit [Read error: Connection reset by peer]
pen has joined #ruby
g_bleezy has quit [Remote host closed the connection]
aganov has joined #ruby
amaya_the_ has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
amaya_the has joined #ruby
<amaya_the> amaya_the_ #ruby-lang Cannot change nickname while banned on channel
matrixise has joined #ruby
<amaya_the> So , I was banned?
swarley has quit [Quit: ZNC - http://znc.in]
mike-- has quit [Ping timeout: 264 seconds]
<burgestrand> amaya_the: we all were for a little while.
* hemanth_ is looking for vectorshevles
answer_42 has joined #ruby
<amaya_the> I see. It is software problem.
nomenkun has joined #ruby
beachandbytes has joined #ruby
<burgestrand> Aren’t they all nowadays.
BoomCow has quit [Quit: This computer has gone to sleep]
yacks has joined #ruby
hadees has quit [Quit: hadees]
w|t has joined #ruby
nemesit has joined #ruby
<amaya_the> yeah
Bosox20051 has quit [Quit: Leaving]
kryl99_ has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
swarley-freenode has joined #ruby
mafolz has joined #ruby
hadees has joined #ruby
rakl has quit [Quit: sleeping]
zommi has joined #ruby
wallerdev has quit [Quit: wallerdev]
Axsuul has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
browndawg has quit [Quit: Leaving.]
Gooder has joined #ruby
kryl99_ has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
jean has quit [Ping timeout: 252 seconds]
Slivka has joined #ruby
jean has joined #ruby
eldariof has joined #ruby
ikaros has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
phelps has quit [Ping timeout: 255 seconds]
timonv has joined #ruby
arturaz has joined #ruby
osvico has quit [Ping timeout: 264 seconds]
beachandbytes has quit [Ping timeout: 250 seconds]
BoomCow has joined #ruby
phelps has joined #ruby
mike-- has joined #ruby
bigkevmcd has joined #ruby
danneu has joined #ruby
h4mz1d has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
phelps has quit [Ping timeout: 276 seconds]
mike-- has quit [Ping timeout: 265 seconds]
nickbuff has joined #ruby
nickbuff has quit [Client Quit]
dr_bob has joined #ruby
ToTo has joined #ruby
phelps has joined #ruby
undecim has joined #ruby
bradhe has joined #ruby
nomenkun has joined #ruby
jaygen has joined #ruby
<undecim> I think perhaps the guide I'm reading is out of date. Why do I get 'NoMethodError: undefined method `type' for /cat/:Regexp' when I enter '/cat/.type' into irb?
jonathan_ has joined #ruby
rellin has quit [Ping timeout: 260 seconds]
jonathan_ has quit [Client Quit]
mike-- has joined #ruby
<undecim> (actually, I know it's out of date. It's written for 1.6, and I'm using 1.9)
beilabs_ has joined #ruby
<hoelzro> undecim: I'm guessing that .type was once a method on Regexp object (or perhaps all objects), but it no longer is
<undecim> It's supposed to return the type of class. e.g. "Regexp" in this case
<undecim> How would I do this in 1.9?
<hoelzro> it's now '.class'
<undecim> ty
<hoelzro> but that returns the class object
<hoelzro> so hopefully that's what you're expecting =)
<undecim> so .class.to_s if I want to do string-worthy stuff to it, right?
bradhe has quit [Ping timeout: 240 seconds]
mneorr has quit [Remote host closed the connection]
elsifaka has joined #ruby
<hoelzro> undecim: well, why would you want to do string stuff on it?
<undecim> Just theoretically. I'm just learning Ruby
<hoelzro> (and I would use .class.name)
beachandbytes has joined #ruby
phelps has quit [Ping timeout: 255 seconds]
tonini has joined #ruby
danneu has quit [Ping timeout: 255 seconds]
u89 has joined #ruby
nomenkun has quit [Ping timeout: 255 seconds]
hotovson has joined #ruby
sspiff has joined #ruby
banisterfiend has quit [Ping timeout: 252 seconds]
Gooder` has joined #ruby
Gooder has quit [Read error: Connection reset by peer]
Nisstyre-laptop has quit [Ping timeout: 264 seconds]
phelps has joined #ruby
amaya_the has quit [Ping timeout: 250 seconds]
amaya_the has joined #ruby
amaya_the has quit [Client Quit]
kil0byte has joined #ruby
sepp2k has quit [Quit: Leaving.]
Xeago has joined #ruby
answer_42 has quit [Ping timeout: 252 seconds]
marknyc has quit []
u89 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
banisterfiend has joined #ruby
phelps has quit [Ping timeout: 252 seconds]
blaxter has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
jackdanger has quit [Quit: Leaving.]
jprovazn has joined #ruby
Gooder` has quit [Remote host closed the connection]
phelps has joined #ruby
alup has joined #ruby
pcarrier has quit []
jean has quit [Ping timeout: 264 seconds]
generalissimo has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
dawkirst_ has joined #ruby
bigmac has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 252 seconds]
locriani_ is now known as locriani
ipalaus has quit [Read error: Operation timed out]
jean has joined #ruby
arturaz has quit [Remote host closed the connection]
devdazed has quit [Ping timeout: 276 seconds]
mike-- has quit [Ping timeout: 252 seconds]
devdazed has joined #ruby
zigomir has joined #ruby
phelps has quit [Ping timeout: 276 seconds]
phelps has joined #ruby
Morkel has joined #ruby
jean has quit [Ping timeout: 244 seconds]
phelps has quit [Max SendQ exceeded]
jean has joined #ruby
phelps has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
miso1337 has quit [Quit: afk]
rippa has quit [Ping timeout: 240 seconds]
madhatter has joined #ruby
Elhu has joined #ruby
<love_color_text> hey guys. having a very strange occurrence where two identical hashes are being deemed as not equal to each other in my rspecs on 1.9.3p327 and not in 1.9.3p194
<love_color_text> they should in fact be equal, and appear to be when i print the contents out... this is the only failing test out of about 300 tests, can't figure out why, did something change?
ipalaus has joined #ruby
<hoelzro> love_color_text: could you paste some code?
<love_color_text> k i will
gridaphobe has quit [Ping timeout: 252 seconds]
phelps has quit [Ping timeout: 244 seconds]
adeponte has joined #ruby
Daman has joined #ruby
Daman has quit [Changing host]
Daman has joined #ruby
Daman has quit [Excess Flood]
Daman has joined #ruby
Daman has quit [Changing host]
Daman has joined #ruby
Daman has quit [Excess Flood]
iamjarvo has quit [Quit: Leaving.]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby
bradhe has joined #ruby
phelps has joined #ruby
<love_color_text> hoelzro: spec is at the very bottom https://gist.github.com/24daf18f3d75024e2947 thanks for looking
ToTo has quit [Ping timeout: 264 seconds]
<love_color_text> oops erred a bit, ill fix
<love_color_text> nvm it is correct.
<love_color_text> but yeah very strange.
kdridi has joined #ruby
<kdridi> hi
banisterfiend has quit [Ping timeout: 265 seconds]
phelps has quit [Ping timeout: 264 seconds]
igro has joined #ruby
c0rn has quit []
<kdridi> i'm trying to fetch a page, with open-uri, the encoding is well detected but i can't access the response headers and with other tools ('net/http' or 'rest_client') i can access the headers but the encoding isn't detected… what should i do ?
Juul has joined #ruby
tps_ has quit [Quit: tps_]
banisterfiend has joined #ruby
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
phelps has joined #ruby
kapowaz_ is now known as kapowaz
drlaj has joined #ruby
blacktulip has joined #ruby
dmiller_ has quit [Remote host closed the connection]
beachandbytes has quit []
BoomCow has quit [Ping timeout: 265 seconds]
tris has quit [Excess Flood]
u89 has joined #ruby
phelps has quit [Ping timeout: 255 seconds]
dmiller has joined #ruby
vlad_sta_ has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
jimeh has joined #ruby
Vert has quit [Remote host closed the connection]
sie has joined #ruby
vlad_sta_ has joined #ruby
<sie> Why can't ruby parse symbols with question marks without quotes?
<love_color_text> sie :foo? works as expected for me on 1.9.3
tris has joined #ruby
freeayu has quit [Ping timeout: 255 seconds]
phelps has joined #ruby
tps_ has joined #ruby
<sie> Oh, it's old ruby's fault. :/
adeponte has quit [Remote host closed the connection]
BiHi has joined #ruby
<sie> Hmmmmm
jean has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
arturaz has joined #ruby
drlaj has quit [Remote host closed the connection]
kil0byte_ has joined #ruby
jean has joined #ruby
mahmoudimus has joined #ruby
nomenkun has joined #ruby
dmiller has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
phelps has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
Xeago has joined #ruby
phelps has joined #ruby
ChampS666 has joined #ruby
nomenkun_ has joined #ruby
segv- has quit [Quit: segv-]
kil0byte has quit [Ping timeout: 264 seconds]
tps_ has quit [Ping timeout: 260 seconds]
pcarrier has joined #ruby
rohit_ has joined #ruby
adambeynon has joined #ruby
vlad_sta_ has quit [Ping timeout: 264 seconds]
clocKwize has joined #ruby
nomenkun has quit [Ping timeout: 255 seconds]
freeayu has joined #ruby
elaptics`away is now known as elaptics
<sie> Ah, it was variable names, that couldn't handle the ?. >_<
pcarrier has quit [Ping timeout: 252 seconds]
BoomCow has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
g_bleezy has joined #ruby
pcarrier has joined #ruby
LouisGB has joined #ruby
eka has joined #ruby
aaronmacy has joined #ruby
igro has quit [Quit: Computer has gone to sleep.]
dantesun has quit [Ping timeout: 260 seconds]
aaronmacy has quit [Client Quit]
dantesun has joined #ruby
nickbuff has joined #ruby
bradhe has quit [Remote host closed the connection]
phelps has quit [Ping timeout: 255 seconds]
g_bleezy has quit [Ping timeout: 252 seconds]
igro has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
daniel_hinojosa has quit [Quit: Leaving.]
dankest is now known as dankest|away
L1 has quit [Quit: Quitter]
Vainoharhainen has joined #ruby
kil0byte_ has quit [Ping timeout: 255 seconds]
jean has quit [Read error: Connection reset by peer]
aaronmacy has joined #ruby
ipalaus has quit [Ping timeout: 252 seconds]
jean has joined #ruby
nemesit has quit [Ping timeout: 260 seconds]
kil0byte has joined #ruby
ephemerian has joined #ruby
Iszak has joined #ruby
Iszak has quit [Max SendQ exceeded]
Iszak has joined #ruby
morf has joined #ruby
ssspiff has joined #ruby
BoomCow has quit [Ping timeout: 252 seconds]
artm has joined #ruby
sspiff has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
phelps has joined #ruby
bairui has quit [Ping timeout: 255 seconds]
bairui has joined #ruby
ChampS666 has quit [Ping timeout: 252 seconds]
beiter has joined #ruby
apeiros_ has joined #ruby
nkts has quit []
BuGo has joined #ruby
<BuGo> http://pastebin.com/nEF6QnF8 << is this a ruby bug?
banisterfiend has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
<apeiros_> BuGo: no
<BuGo> can you explain?
nomenkun has joined #ruby
<apeiros_> you're pushing data to the same array over and over
<BuGo> yes and that array must be in a hash
<ccooke> apeiros_: I think the prospective bug is that the hash appears empty
lkba has quit [Ping timeout: 264 seconds]
<apeiros_> that array is the *default value* of the hash
<apeiros_> pushing to the default value doesn't add the value to the hash
<ccooke> BuGo: look at hash['b']
<ccooke> it'll have the same value as your hash['a']
<BuGo> yea i see it
<BuGo> sweet
nomenkun has quit [Read error: Connection reset by peer]
<apeiros_> what you want is Hash.new { |hash, key| hash[key] = [] }
<apeiros_> this a) creates a new array for each key, and b) actually adds it to the hash
fyolnish has quit [Remote host closed the connection]
<apeiros_> h[key] << obj # you *read* the value at "key" from the hash, and you push obj to *the returned value* (not to the hash)
<apeiros_> it's equivalent to: x = h[key]; x << obj
[Neurotic] has quit [Remote host closed the connection]
nomenkun has joined #ruby
<apeiros_> there's no h[key] = somenewvalue there, so no new key is added
<BuGo> but it would make sense that it would clone default value ecah time
mafolz has quit [Ping timeout: 264 seconds]
<apeiros_> BuGo: no it would not
hsbt_away is now known as hsbt
<BuGo> why not?
<BuGo> now it makes no logical sense at all
<sie> ^ nevemrind, accidentally triggered old bind
<ccooke> BuGo: did you tell it to clone the value?
<apeiros_> BuGo: because not everybody shares your use case.
<love_color_text> guys, this is really weird: https://gist.github.com/4249617
<apeiros_> BuGo: and your use case is covered by Hash.new with a block
<BuGo> oh... OKay
<ccooke> BuGo: the block that apeiros_ gave you does, but setting the default to a value does not.
<apeiros_> BuGo: also, how deep would you like your default value to be cloned?
<BuGo> i see
mafolz has joined #ruby
dankest|away has quit [Quit: Leaving...]
<BuGo> apeiros_: thank you!
<apeiros_> only the first level? then comes Bugo2 and says "but it doesn't make sense!!!1! I want it all levels down!"
phelps has quit [Ping timeout: 265 seconds]
<BuGo> i didnt thought about that
banisterfiend has quit [Ping timeout: 252 seconds]
<ccooke> BuGo: it's a tricky issue
<ccooke> BuGo: but Ruby does the best and most reliably predicatble thing it can
<apeiros_> BuGo: also, cloning the default value still wouldn't solve your issue of no key being added to the hash
Takehiro has quit [Remote host closed the connection]
phelps has joined #ruby
<apeiros_> accessing a key doesn't tell the hash to create that key (and that's *good*, I don't want my hash to suddenly contain a thousand keys just because I accessed inexistent keys)
rdark has joined #ruby
<DefV> me/5
vlad_starkov has quit [Ping timeout: 265 seconds]
berserkr has joined #ruby
vlad_sta_ has joined #ruby
alee has quit [Ping timeout: 276 seconds]
nemesit has joined #ruby
Slivka has quit [Remote host closed the connection]
timonv has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
phelps has quit [Ping timeout: 276 seconds]
cableray has quit [Quit: cableray]
sn0wb1rd has joined #ruby
ipalaus has joined #ruby
phelps has joined #ruby
richardjapenga has joined #ruby
<BuGo> apeiros_: thank you once again! hash = Hash.new {|h,n| h[n] = [] }
<BuGo> this is what i wanted
rohit_ has quit [Ping timeout: 255 seconds]
banisterfiend has joined #ruby
gyre007 has joined #ruby
<apeiros_> BuGo: another reason to not clone the default value: not all objects can be cloned.
nomenkun has quit [Read error: Connection reset by peer]
<BuGo> true
<BuGo> it all makes sense when you explained it
u- has joined #ruby
babonk has quit [Quit: babonk]
nomenkun has joined #ruby
mafolz has quit [Ping timeout: 264 seconds]
<sie> If I remember my code, then I almost always think it is crappy and I must've done something in an incorrect fashion, is it the same for any of you guys?
kil0byte_ has joined #ruby
maesbn has joined #ruby
<apeiros_> sie: it's a common feeling amongst coders
JonnieCache has joined #ruby
phelps has quit [Ping timeout: 250 seconds]
dr_bob has quit [Read error: Connection reset by peer]
kil0byte has quit [Ping timeout: 256 seconds]
dr_bob has joined #ruby
cascalheira has joined #ruby
rouss has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
statarb3 has quit [Quit: Leaving]
rouss is now known as Guest62415
mafolz has joined #ruby
nomenkun has joined #ruby
<burgestrand> sie: if you didn’t think that you wouldn’t be better at your craft than you were when you wrote it. It’s a good thing.
phelps has joined #ruby
cdt has joined #ruby
elico has joined #ruby
Juul has quit [Ping timeout: 276 seconds]
darthdeus has quit [Quit: Leaving...]
workmad3 has joined #ruby
phelps has quit [Ping timeout: 255 seconds]
Proshot has joined #ruby
EyesIsMine has joined #ruby
Proshot is now known as statarb3
statarb3 has quit [Changing host]
statarb3 has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
banisterfiend has quit [Ping timeout: 248 seconds]
phelps has joined #ruby
alee has joined #ruby
artm has quit [Quit: artm]
hoelzro is now known as hoelzro|away
Takehiro has joined #ruby
eph3meral has joined #ruby
artm has joined #ruby
sepp2k has joined #ruby
thisirs has joined #ruby
love_col_ has joined #ruby
nomenkun_ has joined #ruby
locriani_ has joined #ruby
BiHi_ has joined #ruby
Xeago_ has joined #ruby
Xeago_ is now known as xeago_
xeago_ is now known as Xeago_
artm_ has joined #ruby
juarlex_ has joined #ruby
KarlHung1s has joined #ruby
banjara1 has joined #ruby
hibariya_ has joined #ruby
Xeago has quit [Killed (sendak.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
nemesit has quit [Quit: Leaving...]
nkts has joined #ruby
withnale has quit [Excess Flood]
undert has joined #ruby
withnale has joined #ruby
bradhe has joined #ruby
schwap has joined #ruby
new299 has joined #ruby
pdtpatri1k has joined #ruby
pcboy__ has joined #ruby
Nigel_ has joined #ruby
Seventoe1 has joined #ruby
qubit_ has joined #ruby
stigmux has joined #ruby
jhunter_ has joined #ruby
taec has joined #ruby
SJrX has joined #ruby
charlies_ has joined #ruby
taec is now known as Guest84141
ipalaus_ has joined #ruby
brianpWins_ has joined #ruby
xpen has quit [Remote host closed the connection]
diegok has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
vertog has joined #ruby
JoeHazzers_ has joined #ruby
fearoffish_ has joined #ruby
vertog is now known as verto
Some-body_ has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
verto is now known as Guest29986
artm has quit [*.net *.split]
ipalaus has quit [*.net *.split]
clocKwize has quit [*.net *.split]
Shrink has quit [*.net *.split]
BiHi has quit [*.net *.split]
nomenkun has quit [*.net *.split]
charliesome has quit [*.net *.split]
love_color_text has quit [*.net *.split]
bluehavana has quit [*.net *.split]
dukedave has quit [*.net *.split]
JohnBat26 has quit [*.net *.split]
postmodern has quit [*.net *.split]
gbchaosmaster has quit [*.net *.split]
locriani has quit [*.net *.split]
banjara has quit [*.net *.split]
juarlex has quit [*.net *.split]
undert_ has quit [*.net *.split]
brianpWins has quit [*.net *.split]
jhunter has quit [*.net *.split]
pdtpatrick has quit [*.net *.split]
KarlHungus has quit [*.net *.split]
qubit has quit [*.net *.split]
yewton has quit [*.net *.split]
dpn` has quit [*.net *.split]
SJr has quit [*.net *.split]
schwap_ has quit [*.net *.split]
hibariya has quit [*.net *.split]
cespare has quit [*.net *.split]
Gadgetoid has quit [*.net *.split]
stigmux_ has quit [*.net *.split]
JoeHazzers has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
verto|off has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
Seventoes has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
fearoffish has quit [*.net *.split]
taec_ has quit [*.net *.split]
G has quit [*.net *.split]
new299_ has quit [*.net *.split]
pcboy_ has quit [*.net *.split]
Jelco_ has quit [*.net *.split]
artm_ is now known as artm
brianpWins_ is now known as brianpWins
charlies_ is now known as charliesome
fearoffish_ is now known as fearoffish
Some-body_ is now known as DarthGandalf
roflmaus has joined #ruby
lolmaus has quit [Write error: Connection reset by peer]
yewton has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
gbchaosmaster has joined #ruby
Gadgetoid has joined #ruby
Jelco_ has joined #ruby
nomenkun has joined #ruby
TheMoonMaster_ has joined #ruby
lkba has joined #ruby
cascalheira has quit [Ping timeout: 240 seconds]
igro has quit [Quit: Computer has gone to sleep.]
kil0byte has joined #ruby
clocKwize has joined #ruby
icole has joined #ruby
JohnBat26 has joined #ruby
Shrink has joined #ruby
postmodern has joined #ruby
dukedave has joined #ruby
kil0byte_ has quit [Ping timeout: 240 seconds]
igro has joined #ruby
cespare has joined #ruby
yacks has joined #ruby
shiin has joined #ruby
icole has quit [Remote host closed the connection]
dpn` has joined #ruby
Mission-Critical has joined #ruby
Averna1 has joined #ruby
fyolnish has joined #ruby
elico has quit [Remote host closed the connection]
love_col_ is now known as keyvan
Virunga has joined #ruby
chussenot has joined #ruby
habstinat has quit [Ping timeout: 264 seconds]
habstinat has joined #ruby
fyolnish has quit [Ping timeout: 256 seconds]
arabi has joined #ruby
Nigel_ is now known as G
<arabi> i want to use Shoes GUI with my project
<arabi> how can I add it?
<arabi> i am using ruby 1.9.1
<arabi> ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
<arabi> can anyone help
jean has quit [Ping timeout: 256 seconds]
Mission-Critical is now known as MissionCritical
fyolnish has joined #ruby
beiter has quit [Quit: beiter]
alee has quit [Ping timeout: 276 seconds]
kdridi has quit [Quit: This computer has gone to sleep]
jean has joined #ruby
tps_ has joined #ruby
leonardorb has joined #ruby
matrixise has quit [Read error: Operation timed out]
<eka> arabi: https://github.com/shoes/shoes there you can follow instructions on how to install depending on your platform
<arabi> i want to use it as a gem eka
answer_42 has joined #ruby
hoelzro|away is now known as hoelzro
jlwestsr has joined #ruby
diomeo has joined #ruby
<diomeo> hey all!!
<diomeo> can anyone give feedbacks or feature/fix requests about http://bitfungus.org ?
tps__ has joined #ruby
<diomeo> we would like to make that helpful to developers/designers like us, as much as possible
<arabi> i have tried this https://rubygems.org/gems/green_shoes eka
<arabi> it is more active
<arabi> but i am getting an error
<arabi> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- shoes (LoadError)
<arabi> from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
<arabi> from shoes.rb:1:in `<main>'
<arabi> eka
krz has quit [Quit: krz]
<eka> arabi: 1st.. use pastebin...
<arabi> ok
<eka> arabi: now... where you get that error??
<arabi> when I run the ruby program
<eka> arabi: and why you using ruby 1.9.1?
<arabi> eka sorry I am using 1.9.3
<eka> arabi: what program are you trying to run?
<arabi> i have trying to run the sample program given there
<eka> arabi: dont know nothing about shoes or green_shoes...
Spaceghost|cloud has quit []
ctevie_ has quit []
<arabi> i think the problem with the location of gem file
nickbuff has quit [Quit: Leaving...]
<eka> arabi: why don't you use https://github.com/shoes/shoes ?
nickbuff has joined #ruby
alee has joined #ruby
kil0byte_ has joined #ruby
<arabi> because it is a standalone project right
<arabi> ?
moeSeth_ has quit []
haxrbyte has joined #ruby
jlwestsr has quit [Quit: Ex-Chat]
<eka> arabi: don't understand what you mean...
<eka> arabi: try shoes.. the non green one
pkondzior_ has quit []
tps_ has quit [*.net *.split]
Averna1 has quit [*.net *.split]
tps__ is now known as tps_
vlad_starkov has joined #ruby
<eka> arabi: and... there is a channel for it... #shoes try and join there...
pkondzior_ has joined #ruby
kil0byte has quit [Ping timeout: 265 seconds]
<Xeago> timesheets, I HATE YOU!
<Xeago> anyone else want to vent?
arabi has quit [Ping timeout: 256 seconds]
bye_bye has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
banisterfiend has joined #ruby
kablaam`` has joined #ruby
Averna1 has joined #ruby
percival_ has quit []
percival_ has joined #ruby
kablaam` has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
<shevy> Xeago ok
<shevy> XML, you evil thing!!!
drlaj has joined #ruby
kapowaz has quit []
kapowaz has joined #ruby
dkannan has quit []
<sie> eka, He should've used pastebin since it's not >3 lines. 3 !> 3
chussenot has quit [Quit: chussenot]
dkannan has joined #ruby
Takehiro has quit [Remote host closed the connection]
<eka> sie: I thought it was >= 3
Solnse has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
ipalaus_ has quit [Quit: :-)]
<sie> eka, I meant shouldn't've*, and yes, the topic says >3 indeed. :]
<eka> sie: I stand corrected :)
alvaro_o has quit [Ping timeout: 252 seconds]
larissa has joined #ruby
nemesit has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
arturaz has quit [Remote host closed the connection]
tps_ has quit [Quit: tps_]
Zai00 has joined #ruby
aaronmacy has quit [Quit: Leaving.]
JoeHazzers_ is now known as JoeHazzers
arturaz has joined #ruby
topek has quit [Quit: Leaving.]
aaronmacy has joined #ruby
kil0byte has joined #ruby
ipalaus has joined #ruby
topek has joined #ruby
arturaz has quit [Ping timeout: 240 seconds]
arturaz has joined #ruby
mikecmpbll has joined #ruby
eka has quit [Remote host closed the connection]
jean has quit [Ping timeout: 264 seconds]
kil0byte_ has quit [Ping timeout: 276 seconds]
kablaam`` has quit [Remote host closed the connection]
Edward_ has joined #ruby
jean has joined #ruby
kablaam`` has joined #ruby
RudyValencia has quit [Read error: Connection reset by peer]
RudyValencia has joined #ruby
pencilcheck has joined #ruby
pen has quit [Read error: No route to host]
nerd has joined #ruby
kirun has joined #ruby
topek has quit [Client Quit]
Michael__ has quit [Read error: Connection reset by peer]
Michael__ has joined #ruby
kil0byte_ has joined #ruby
chussenot has joined #ruby
diomeo has left #ruby [#ruby]
topek has joined #ruby
ExxKA has joined #ruby
kil0byte has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Remote host closed the connection]
<jsilver> hey IRC, gc2 is better than u
grzywacz has joined #ruby
topek has quit [Client Quit]
yacks has quit [Ping timeout: 255 seconds]
igro has quit [Ping timeout: 256 seconds]
elsifaka has quit [Ping timeout: 244 seconds]
Takehiro has joined #ruby
RudyValencia has quit [Read error: Connection reset by peer]
RudyValencia has joined #ruby
igro has joined #ruby
topek has joined #ruby
rakl has joined #ruby
Michael__ has quit [Remote host closed the connection]
topek has quit [Client Quit]
slainer68 has quit [Ping timeout: 240 seconds]
kablaam`` has quit [Remote host closed the connection]
topek has joined #ruby
Slivka has joined #ruby
banisterfiend has joined #ruby
DanBoy has quit [Remote host closed the connection]
Phaba has quit [Quit: Ex-Chat]
jean has quit [Ping timeout: 240 seconds]
icole has joined #ruby
topek has quit [Client Quit]
igro has quit [Quit: Computer has gone to sleep.]
Edward_ has quit [Ping timeout: 252 seconds]
topek has joined #ruby
epwhorl has joined #ruby
nfisher has joined #ruby
elsifaka has joined #ruby
icole has quit [Ping timeout: 248 seconds]
nickbuff has quit [Quit: Leaving...]
arquebus has joined #ruby
nickbuff has joined #ruby
Guest62415 has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
topek has quit [Client Quit]
emergion has joined #ruby
topek has joined #ruby
epwhorl has quit [Ping timeout: 255 seconds]
jackbrownhf has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
<sie> Could function(&proc {..}.method(:call)) in any circumstances differ from function(proc {..}) ?
timonv has quit [Remote host closed the connection]
<apeiros_> it differs in all circumstances
<apeiros_> also, it's methods, not functions
<apeiros_> foo(&proc { … }) is equivalent to foo { … }
jhunter_ has quit [Read error: Operation timed out]
<sie> I don't think the method vs function debate is too related to this problem.
<sie> And exactly why is that?
<apeiros_> it isn't. And I didn't say it was. (it's not a debate either).
<apeiros_> why's what?
nari has quit [Ping timeout: 264 seconds]
<sie> This: 14:06:56 apeiros_ ‖ foo(&proc { … }) is equivalent to foo { … }
<sie> Ah, nvm.
<sie> It looked like (, but was {
<apeiros_> "why" - um, because the language is designed that way?
slainer68 has joined #ruby
yacks has joined #ruby
drlaj has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
samphippen has joined #ruby
heftig has quit [Quit: leaving]
gbchaosmaster has quit [Ping timeout: 255 seconds]
apeiros_ has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
Divinite has joined #ruby
timonv has joined #ruby
Divinite has quit [Client Quit]
jenrzzz has quit [Ping timeout: 264 seconds]
slainer68 has quit [Ping timeout: 259 seconds]
banisterfiend has quit [Disconnected by services]
arquebus has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
answer_42 has quit [Ping timeout: 240 seconds]
jhunter has joined #ruby
bluehavana has joined #ruby
Gooder has joined #ruby
k610 has joined #ruby
arquebus has joined #ruby
kil0byte has joined #ruby
noric has quit [Ping timeout: 257 seconds]
Takehiro has joined #ruby
noric has joined #ruby
nickbuff has quit [Quit: Leaving...]
kil0byte_ has quit [Ping timeout: 265 seconds]
s1n4 has joined #ruby
timonv has quit [Ping timeout: 255 seconds]
slainer68 has joined #ruby
cascalheira has joined #ruby
arquebus has quit [Remote host closed the connection]
undecim has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
undecim has joined #ruby
shtirlic has joined #ruby
drlaj has joined #ruby
carloslopes has joined #ruby
timonv has joined #ruby
spaceinvader has left #ruby [#ruby]
Slivka has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
tvw has joined #ruby
haxrbyte_ has joined #ruby
lemonsparrow has joined #ruby
<lemonsparrow> is there a better way to write this method -> https://gist.github.com/4250353
moos3 has joined #ruby
rovalent has joined #ruby
igro has joined #ruby
chussenot has quit [Quit: chussenot]
kil0byte_ has joined #ruby
wataken44 has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
Takehiro has quit [Remote host closed the connection]
kil0byte has quit [Ping timeout: 244 seconds]
browndawg has joined #ruby
vasile has joined #ruby
cucdd has joined #ruby
Takehiro has joined #ruby
yacks has quit [Ping timeout: 252 seconds]
ananthakumaran has quit [Quit: Leaving.]
samphippen has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Quit: Leaving.]
Goles has joined #ruby
<shevy> no such gist
chussenot has joined #ruby
lemonsparrow has quit [Quit: Page closed]
xkx_ has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
TheNumb has quit [Ping timeout: 264 seconds]
browndawg has quit [Read error: Connection reset by peer]
TheNumb has joined #ruby
ndrei has joined #ruby
geekbri has joined #ruby
ndrei has quit [Client Quit]
browndawg has joined #ruby
alee has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
<shevy> no such nick
<shevy> :>
drlaj has quit [Read error: Connection reset by peer]
heftig has joined #ruby
robbyoconnor has quit [Ping timeout: 256 seconds]
cezar has joined #ruby
xkx has joined #ruby
Takehiro has quit [Remote host closed the connection]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
rovalent has quit [Quit: Linkinus - http://linkinus.com]
rovalent has joined #ruby
synthetix has joined #ruby
Takehiro has joined #ruby
Spaceboy has quit [Ping timeout: 276 seconds]
phelps has quit [Ping timeout: 276 seconds]
alee has joined #ruby
kirun_ has joined #ruby
companion has quit [Ping timeout: 240 seconds]
BuGo has left #ruby [#ruby]
moos3 has quit [Quit: Computer has gone to sleep.]
cucdd has quit [Quit: Leaving]
iamjarvo has joined #ruby
Goles has quit [Quit: Out.]
Goles has joined #ruby
phelps has joined #ruby
companion has joined #ruby
answer_42 has joined #ruby
kirun has quit [Ping timeout: 256 seconds]
vasile has quit [Ping timeout: 252 seconds]
Spaceboy has joined #ruby
kil0byte has joined #ruby
earthquake has quit [Quit: earthquake]
Spaceboy has quit [Remote host closed the connection]
earthquake has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
wermel has joined #ruby
phelps has quit [Ping timeout: 244 seconds]
cousine has joined #ruby
blaxter has quit [Quit: foo]
kil0byte_ has quit [Ping timeout: 255 seconds]
phelps has joined #ruby
eka has joined #ruby
phelps has quit [Max SendQ exceeded]
matrixise has joined #ruby
phelps has joined #ruby
synthetix has quit [Ping timeout: 240 seconds]
noric has quit [Ping timeout: 240 seconds]
eka has quit [Ping timeout: 264 seconds]
devdazed has quit [Ping timeout: 255 seconds]
devdazed has joined #ruby
nickbuff has joined #ruby
krawchyk has joined #ruby
ananthakumaran has joined #ruby
mercwithamouth has joined #ruby
pavilionXP has joined #ruby
phelps has quit [Ping timeout: 264 seconds]
fbernier has joined #ruby
mark_locklear has joined #ruby
mikecmpbll has joined #ruby
jlwestsr has joined #ruby
ffranz has joined #ruby
phelps has joined #ruby
nfisher has quit [Ping timeout: 265 seconds]
kil0byte_ has joined #ruby
jeffreybaird has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
banisterfiend has quit [Ping timeout: 252 seconds]
drlaj has joined #ruby
samphippen has joined #ruby
joofsh has joined #ruby
Guest73164 has joined #ruby
devdazed has quit [Ping timeout: 265 seconds]
eka has joined #ruby
drlaj has quit [Ping timeout: 241 seconds]
flip_digits has joined #ruby
kil0byte has joined #ruby
Banistergalaxy has joined #ruby
devdazed has joined #ruby
invisime has joined #ruby
Gooder` has joined #ruby
phelps has quit [Ping timeout: 276 seconds]
Takehiro has quit [Remote host closed the connection]
Gooder has quit [Ping timeout: 255 seconds]
nfisher has joined #ruby
kil0byte_ has quit [Ping timeout: 264 seconds]
niklasb has joined #ruby
Vendethiel has joined #ruby
<Vendethiel> Hi, I wanted to know if subdestructuring exists en Ruby
<Vendethiel> Hi, I wanted to know if subdestructuring exists in Ruby
<hoelzro> Vendethiel: could you provide an example?
<Vendethiel> like @position[:x, :y, :z] = @option[:position]
phelps has joined #ruby
segv- has joined #ruby
[1]SoonerBourne has joined #ruby
<hoelzro> ah
<hoelzro> well, why don't you try it out and see what happens!
<Vendethiel> fails
samphippen has quit [Quit: Computer has gone to sleep.]
SoonerBourne has quit [Ping timeout: 255 seconds]
[1]SoonerBourne is now known as SoonerBourne
Takehiro has joined #ruby
jrist-afk is now known as jrist
Takehiro has quit [Read error: Connection reset by peer]
<heftig> Vendethiel: @position[:x], @position[:y], @position[:z] = @option[:position]
<Vendethiel> heftig: thanks. no other shortcut ?
<heftig> @position[:x, :y, :z] = @option[:position] is technically valid as well, but it would need support in @position's []= method
<Vendethiel> yeah
<heftig> (which hash or array do not provide)
<sie> a, b, c = whatever; foo[:x] = {:a=>a,:b=>b,:c=>c)
<hoelzro> heftig: that wouldn't automatically expand the RHS though, would it? you would need a trailing comma, right?
<hoelzro> @position[:x, :y, :z], = @option[:position]
<Vendethiel> doesn't expand the RHS
<sie> RHS?
<hoelzro> right hand side
<heftig> hoelzro: no, that wouldn't work
samphippen has joined #ruby
<hoelzro> why is that?
<heftig> the RHS must not be expanded
lkba has quit [Ping timeout: 264 seconds]
<hoelzro> I see
<heftig> otherwise the other elements get lost
<hoelzro> oh, I see what you mean
<hoelzro> got it =)
undecim has quit [Read error: Connection reset by peer]
undecim has joined #ruby
banisterfiend has joined #ruby
ttt_ has quit [Remote host closed the connection]
tommyvyo has joined #ruby
Spaceboy has joined #ruby
kpshek has joined #ruby
Spaceboy has quit [Remote host closed the connection]
<heftig> and it can't be added without breaking compat because array[2, 4] = 4, 5 already substitutes a slice, not two elements
krawchyk_ has joined #ruby
samphippen has quit [Client Quit]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
GoGoGarrett has joined #ruby
yshh has quit [Remote host closed the connection]
Takehiro_ has joined #ruby
krawchyk has quit [Ping timeout: 264 seconds]
JDubs_ has joined #ruby
<Vendethiel> class H < Hash; def []=(*keys, vals); keys.each_with_index do |v, i|; super(v, vals[i])
<Vendethiel> something like that :).
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
moos3 has joined #ruby
kpshek has quit []
<JDubs_> Hey guys: having trouble with this code http://pastie.org/5506640 When I input a word that starts with a vowel, it seems to work fine, if I start with a word that starts with a consonant it doesn't work
<JDubs_> Any input is welcome :)
undecim has quit [Read error: Connection reset by peer]
undecim has joined #ruby
Takehiro_ has quit [Ping timeout: 264 seconds]
<JDubs_> Anyone? :(
jackbrownhf has quit [Client Quit]
carlyle has joined #ruby
gmci has joined #ruby
keyvan has quit [Remote host closed the connection]
Takehiro has joined #ruby
gmci is now known as Guest32568
Takehiro has quit [Read error: No buffer space available]
blaxter has joined #ruby
keyvan has joined #ruby
<JDubs_> Vendethiel: can you help?
<heftig> JDubs_: what's that supposed to do?
<JDubs_> it will take in a string, words that start with a vowel will simply append 'ay' to the end of the word
<heftig> pig latin?
<JDubs_> if it starts with a consonant, it will break of the break of consonants and move to the end and then append 'ay'
<JDubs_> yeah
rovalent has quit [Quit: Linkinus - http://linkinus.com]
<JDubs_> break off the group*
KarlHung1s is now known as KarlHungus
jharris has joined #ruby
drlaj has joined #ruby
aquaranto has joined #ruby
jackbrownhf has joined #ruby
jrajav has joined #ruby
<JDubs_> heftig: any idea?
<heftig> hang on
<JDubs_> ok
swex has joined #ruby
sailias has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
<heftig> JDubs_ what's supposed to happen when it starts with a vowel?
haxrbyte has joined #ruby
<JDubs_> just move the vowel to the end and add 'ay'
Goles has quit [Quit: Out.]
<JDubs_> ooops
<JDubs_> i mean just add 'ay'
chussenot has quit [Quit: chussenot]
<JDubs_> so apple => appleay
sailias has quit [Read error: Connection reset by peer]
kil0byte_ has joined #ruby
Takehiro has joined #ruby
slainer68 has quit [Read error: Connection timed out]
swex_ has quit [Ping timeout: 255 seconds]
yshh has joined #ruby
kpshek has joined #ruby
slainer68 has joined #ruby
<heftig> JDubs_: "The one who says it cannot be done should never interrupt the one who is doing it.".gsub(/([\w&&[^aeiou]]+)(\w*)/, "\\2\\1ay")
<heftig> this works, except for the capitalization
<heftig> ah whoops, doesn't
<JDubs_> ouch
kil0byte has quit [Ping timeout: 255 seconds]
<JDubs_> I'd rather not use an implementation I don't understand lol
<JDubs_> That regex is waaaaay too complex for me
<JDubs_> lol
d2dchat has joined #ruby
<banisterfiend> JDubs_: for every 'lol' you say you lose 500 neurons
chussenot has joined #ruby
nickbuff has quit [Quit: Leaving...]
<banisterfiend> pretty soon u'll be in a stupor just drooling onto your shirt
osvico has joined #ruby
wallerdev has joined #ruby
pencilcheck has quit [Remote host closed the connection]
samphippen has joined #ruby
<JDubs_> :(
sailias has joined #ruby
drlaj has quit [Remote host closed the connection]
<JDubs_> hmmm I solved the problem
synthetix has joined #ruby
<JDubs_> heftig, can you take a gander at my code and see if there are any improvement points?
<JDubs_> besides a complicated regex that is
<JDubs_> def translate(string)
<JDubs_> array = string.split(' ')
<JDubs_> newarray = []
<JDubs_> counter = 1
<JDubs_> word.length.times do |charindex|
<JDubs_> array.each do |word|
<JDubs_> if !word[charindex].match(/a|e|i|o|u/) || ( word[charindex-1] === 'q' && word[charindex] === 'u' )
<JDubs_> next
<JDubs_> else
<JDubs_> if charindex == 0
<JDubs_> newarray << word + 'ay'
<JDubs_> break
<JDubs_> else
<JDubs_> newarray << word[charindex..-1] + word[0...charindex] + 'ay'
mpereira has joined #ruby
<JDubs_> break
<JDubs_> end
<JDubs_> I didn't mean to do that :/
<burgestrand> Always hilarious.
<JDubs_> meant to paste the url... sorry
Takehiro has quit [Ping timeout: 252 seconds]
jackbrownhf has quit [Remote host closed the connection]
<banisterfiend> haha
<JDubs_> burgestrand: sorry lol
<banisterfiend> burgestrand: sup burg ? :)
adac has joined #ruby
Jb__ has left #ruby [#ruby]
<JDubs_> crap i said it again !!!
<burgestrand> JDubs_: ;)
haxrbyte has quit [Ping timeout: 240 seconds]
<JDubs_> must...stop...saying...lol
<burgestrand> JDubs_: if you were in #python you’d be banned for life now
reppard has joined #ruby
<JDubs_> burgestrand: really? for an accident? :(
<adac> Hi guys! How can I get back here the status code "201" from this object? https://gist.github.com/4250868
Goles has joined #ruby
<burgestrand> JDubs_: no, for your lols, I’m not kidding :p
<burgestrand> banisterfiend: \o.
<JDubs_> burgestrand: wow, that's crazy!
nomenkun has quit [Read error: Connection reset by peer]
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
<burgestrand> banisterfiend: taking a short work break for water refill :)
Goles has quit [Max SendQ exceeded]
<heftig> JDubs_: "The one who says it cannot be done should never interrupt the one who is doing it.".gsub(/([\w&&[^aeiouAEIOU]]+)(\w*)|(\w+)/, "\\2\\1\\3ay")
<heftig> does this match what you expect?
<burgestrand> JDubs_: #python can be a bit uppity about acronyms
nomenkun has joined #ruby
<burgestrand> that is also hilarious, and worthy of a lol.
Goles has joined #ruby
<banisterfiend> burgestrand: cool, hey do you work out at the gym?
Goles has quit [Max SendQ exceeded]
<burgestrand> banisterfiend: naw, I jump around and scream: http://gbg-taido.se/
<JonnieCache> christ it must be a brilliant idling in there. jesus.
<JDubs_> heftig: I think it would, but I don't personally feel comfortable using a solution I don't understand. I figured out another solution though
Goles has joined #ruby
<JDubs_> banisterfiend: bro, do you even lift?
<heftig> JDubs_: it's not as complicated as it seems. that class matches any word character that's not a vowel (intersection of \w and [^aeiouAEIOU])
Goles has quit [Max SendQ exceeded]
nickbuff has joined #ruby
<burgestrand> Bahah.
<burgestrand> or, um, lol.
<banisterfiend> JDubs_: naw, i just work the elliptical like those middle aged women
Gooder` has quit [Ping timeout: 250 seconds]
Goles has joined #ruby
<heftig> so with the alternation, it either matches a word beginning with consonants (left side) or any other word (right side)
<heftig> in the substitution, the first two groups are then swapped
kpshek has quit []
Banistergalaxy has quit [Ping timeout: 265 seconds]
jprovazn has quit [Quit: Leaving]
Goles has quit [Max SendQ exceeded]
leonardorb has quit [Read error: Connection reset by peer]
<JDubs_> heftig: mind telling me your opinion of the solution I came up with? It seems to work fine, and it's easier to understand
<JDubs_> heftig: http://pastie.org/5506721
leonardorb has joined #ruby
alanp has quit [Ping timeout: 240 seconds]
haxrbyte has joined #ruby
alanp has joined #ruby
<heftig> eh, i'm usually opposed to stepping through a string character-wise, that leaves a bad aftertaste
<heftig> this is ruby, not C :p
Banistergalaxy has joined #ruby
clocKwize has quit [Quit: Leaving]
nomenkun has quit [Read error: Connection reset by peer]
workmad3 is now known as {target}
{target} is now known as workmad3
nomenkun has joined #ruby
<JDubs_> heftig: Yeah...but regexes are scary lol
<JDubs_> ug
<JDubs_> i said it again
* JDubs_ slaps self
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
phelps has quit [Ping timeout: 252 seconds]
<heftig> .gsub(/([Qq]u)(\w*)|([\w&&[^aeiouAEIOU]]+)(\w*)|(\w+)/, "\\2\\1\\4\\3\\5ay")
<heftig> JDubs_: adds the "qu" handling :p
<JonnieCache> JDubs_: print this out and stick it on your wall http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/pdf/
radic has quit [Read error: Operation timed out]
vasile has joined #ruby
<JonnieCache> you quickly get used to regular expressions. though they can be a bastard, the syntax makes them look much scarier than they really are
_nitti has joined #ruby
<heftig> .gsub(/(qu)(\w*)|([\w&&[^aeiouAEIOU]]+)(\w*)|(\w+)/i, "\\2\\1\\4\\3\\5ay") <-- handles any capitalization
miso1337 has joined #ruby
_nitti_ has joined #ruby
<JDubs_> heftig: does it also move the consonants in the fron to the bag? eg: bromo == omobray?
<heftig> just try it
<nkts> Hi, what you use to document sinatra project ? eg. what methods and params are available? Thanks.
Goles has joined #ruby
<JonnieCache> this site is really good too: http://rick.measham.id.au/paste/explain.pl
<JonnieCache> it explains regular expressions for you
Goles has quit [Max SendQ exceeded]
<burgestrand> nkts: you are documenting an HTTP API?
<nkts> I have tried rdoc-sinatra, but it's not picking up all post '/foo', etc.
<JonnieCache> very good for learning. JDubs_ put that regex into that site and things will be mucj clearer
<nkts> burgestrand, yes
phelps has joined #ruby
<heftig> JDubs_: of course it does. that's what's making it complex
<heftig> if I just wanted to add "ay" to every word, I could just do .gsub(/\w+/, "\\&ay")
<JonnieCache> heftig: according to that explainer site there is a mistake in your regex. maybe its because its using a different regex engine...
<burgestrand> nkts: I forked the GitHub API docs to document an HTTP API, it’s nicer than any of the other solutions I tried (markdown, rolling my own, etc).
adamnbowen has joined #ruby
<heftig> JonnieCache: it's not Perl
radic has joined #ruby
<burgestrand> nkts: http://burgestrand.github.com/hue-api/ <- what I used it for
pen has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
chanced has joined #ruby
mike-- has joined #ruby
_nitti has quit [Ping timeout: 250 seconds]
niklasb has quit [Ping timeout: 264 seconds]
reppard has quit [Ping timeout: 252 seconds]
<nkts> burgestrand, thanks, will have a look. One problem my code is private and I can't upload it
<heftig> "Question: Is it better to abide by the rules until they're changed or
<heftig> whoops
<burgestrand> nkts: the documentation will be free from your code, and the github api compiles statically which frees you from the necessity of publishing it.
<burgestrand> nkts: you can put the compiled documentation (which becomes just HTML/CSS) anywhere.
<heftig> JonnieCache: http://rubular.com/r/UWJE8ls2rt
<heftig> JDubs_: ^
jobicoppola has joined #ruby
ltsstar has joined #ruby
Goles has joined #ruby
Takehiro has joined #ruby
sandman has joined #ruby
Goles has quit [Max SendQ exceeded]
<sandman> Hello, does the '# encoding: UTF-8' trick also work on ruby when running on a Windows system?
<banisterfiend> burgestrand: you checked out better_errors yet btw?
jobicoppola has quit [Client Quit]
<JDubs_> heftig: thanks :)
<burgestrand> banisterfiend: haven’t used it, but I’ve seen it :)
SoonerBourne has quit [Read error: Connection reset by peer]
chussenot_ has joined #ruby
SoonerBourne has joined #ruby
samphippen has quit [Ping timeout: 240 seconds]
_nitti_ has quit [Remote host closed the connection]
tjbiddle has joined #ruby
pu22l3r_ has joined #ruby
_nitti has joined #ruby
sebastianb has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
chussenot has quit [Ping timeout: 255 seconds]
chussenot_ is now known as chussenot
samphippen has joined #ruby
himsin has joined #ruby
FiveAcres has quit [Ping timeout: 242 seconds]
bigmcq77 has quit [Ping timeout: 240 seconds]
drlaj has joined #ruby
philcrissman has joined #ruby
bbttxu has joined #ruby
FiveAcres has joined #ruby
drlaj has quit [Read error: Connection reset by peer]
drlaj has joined #ruby
stopbit has joined #ruby
nemesit has quit [Quit: Leaving...]
philcrissman has quit [Remote host closed the connection]
bradhe has joined #ruby
elico has joined #ruby
bigmcq77 has joined #ruby
_alejandro has quit [Remote host closed the connection]
epwhorl has joined #ruby
zul_ has joined #ruby
zul_ has left #ruby [#ruby]
Virunga has quit [Read error: Connection timed out]
withnale has quit [Excess Flood]
bwlang has joined #ruby
withnale has joined #ruby
bradhe has quit [Remote host closed the connection]
Virunga has joined #ruby
generalissimo has joined #ruby
Averna1 has quit [Quit: Leaving.]
cakehero has joined #ruby
tjbiddle_ has joined #ruby
mike-- has quit [Ping timeout: 252 seconds]
krawchyk_ has quit [Remote host closed the connection]
yuruk has joined #ruby
tjbiddle has quit [Ping timeout: 252 seconds]
bpfh has quit [Ping timeout: 259 seconds]
tjbiddle_ is now known as tjbiddle
heftig has quit [Quit: leaving]
bpfh has joined #ruby
ttt has joined #ruby
joshman_ has joined #ruby
yacks has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
havenn has joined #ruby
thisirs has quit [Read error: Connection reset by peer]
nilg has quit [Read error: Connection reset by peer]
zommi has quit [Quit: Leaving.]
wmoxam has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
nickbuff has quit [Quit: Leaving...]
flip_digits has quit [Ping timeout: 240 seconds]
ner0x has joined #ruby
tcurdt has joined #ruby
marcuspat has quit [Quit: marcuspat]
philcrissman has joined #ruby
DaZ has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
nilg has joined #ruby
krawchyk has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<JDubs_> it's verwy qwiet
<JDubs_> shhh
<JDubs_> we're huntin wabbits
berserkr has quit [Quit: Leaving.]
DaZ has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<yuruk> JDubs_: yeah bwe carefweul
banisterfiend has quit [Remote host closed the connection]
<sandman> Does # encoding: UTF-8 also work when ruby is running on Windows?
cousine has quit [Remote host closed the connection]
elico has quit [Quit: Elico]
nazty has quit [Quit: Leaving]
_alejandro has joined #ruby
carloslopes has quit [Remote host closed the connection]
tagrudev has quit [Quit: !!]
yuruk has left #ruby ["Leaving..."]
swarley-freenode has quit [Ping timeout: 246 seconds]
miso1337 has quit [Quit: afk]
skaczor has joined #ruby
hackerdude has quit [Remote host closed the connection]
banisterfiend has joined #ruby
nickbuff has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
SCommette has joined #ruby
samphippen has joined #ruby
_nitti has quit [Remote host closed the connection]
krisfremen has quit [Read error: Connection reset by peer]
krislappy has joined #ruby
<shevy> sandman I think so
_alejandro has quit [Remote host closed the connection]
freeayu has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 264 seconds]
eldariof has quit [Ping timeout: 248 seconds]
Slivka has joined #ruby
kil0byte_ has quit [Remote host closed the connection]
monkegji_ has joined #ruby
TitaniumStudioUs has joined #ruby
io_syl has joined #ruby
Banistergalaxy has quit [Quit: Bye]
Banistergalaxy has joined #ruby
_nitti has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
mpfundstein has joined #ruby
entrenador has joined #ruby
<sandman> shevy, thx will try some more possibilities.
beiter has joined #ruby
<workmad3> sandman: it's important to note that the encoding comment will instruct the ruby interpreter to read the source as UTF-8, it doesn't actually make the text UTF-8 encoded
darkstar| has joined #ruby
SoonerBourne has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Organize your IRC]
<sandman> workmad3: I am trying to import some csv files into a database, some of those files use non standard characters and then I get the "SyntaxError: encoding_1.rb:1: invalid multibyte char (US-ASCII)" error.
SoonerBourne has joined #ruby
<workmad3> sandman: source encoding is also not the same as the character encoding for reading in files
monkegji_ has quit [Ping timeout: 240 seconds]
darkstar| has left #ruby [#ruby]
<banisterfiend> csmrfx: hey carl
<workmad3> sandman: you need to be setting what the encoding of the file input streams is
<workmad3> woo, ruby encoding links :D
* csmrfx throws a little encoding blog link spaghetti meatball on the chan wall
gbchaosmaster has joined #ruby
<sandman> csmrfx: Thx, will read them
<workmad3> mmm, spaghetti and meatballs
samphippen has joined #ruby
dantesun has quit [Ping timeout: 259 seconds]
cconstantine has quit [Ping timeout: 264 seconds]
<sandman> workmad3, Ok, I will try to figger out what encoding the input files are. Thx.
pcarrier has quit []
dantesun has joined #ruby
monkegji_ has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
flip_digits has joined #ruby
artm has quit [Quit: artm]
Virunga has quit [Remote host closed the connection]
gdoko has joined #ruby
gdoko has left #ruby ["Leaving"]
_nitti has quit [Remote host closed the connection]
techhelp has joined #ruby
Goopyo has joined #ruby
zigomir has quit [Quit: zigomir]
<Goopyo> hey does anyone mind code reviewing a ruby rest client I wrote? It's pretty short but its the first an only ruby script I've written so it needs to be looked at
<Goopyo> I'd like to share it privately though since I haven't launched yet
thatguycraig has joined #ruby
<sie> Who cares whether you've launched or not.
<sie> Just send it to everyone.
<sie> Hopefully someone will look at it.
<sie> This audience is small enough.
rellin has joined #ruby
mpereira has quit [Ping timeout: 259 seconds]
DanBoy has joined #ruby
Goopyo has quit [Quit: Goopyo]
haxrbyte has quit [Read error: Connection reset by peer]
Goopyo has joined #ruby
<Goopyo> sorry disconnected
<Goopyo> still interested if anyone can help me out
generalissimo has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
pavilionXP has quit [Read error: Connection reset by peer]
moshef has joined #ruby
atal421 has joined #ruby
<moshef> hi guys, I'm just upgrading to ruby 1.9.3 and I see that __method__ returns something else, is there a way to get the old functionality back? there is another method for that?
lord4163 has joined #ruby
adac has quit [Remote host closed the connection]
<lord4163> Hi
<foucist> Goopyo: i'll take a look but i can't promise good feedback
leonardorb has quit [Ping timeout: 240 seconds]
<lord4163> If I execute script/plugin install git://github.com/dougal/daemon_generator.git nothing happends
niklasb has quit [Ping timeout: 248 seconds]
Roa has quit [Ping timeout: 256 seconds]
pu22l3r_ has quit [Remote host closed the connection]
leonardorb has joined #ruby
<Goopyo> foucist: cool ill pm you
a_a_g has joined #ruby
Jasko2 has joined #ruby
mildfate has quit [Quit: Leaving.]
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
bradhe has joined #ruby
<sie> Goopyo, me too
<Goopyo> thanks ill send it to both of you
<Goopyo> one sec pasting
arturaz has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
supergiantrobot has quit [Quit: supergiantrobot]
<Xeago> lord4163: I don't know what you are doing but script/plugin looks like rails 2
<lord4163> I want to make a daemon
<Xeago> are you using rails 2?
<JonnieCache> a big fuck you going out to the person who wrote mysqldump and decided to give it a totally different CLI syntax from the mysql bin
<JonnieCache> sorry just had to get that out there
bradhe has joined #ruby
niklasb has joined #ruby
Jasko has quit [Ping timeout: 256 seconds]
<JonnieCache> i almost just lost a load of client data
<Xeago> Oh JonnieCache, I know how you feel right now :)
tps_ has joined #ruby
_nitti has joined #ruby
rippa has joined #ruby
<Xeago> ouch, that must've given some adrenaline :\
ikaros has quit [Quit: Ex-Chat]
babykosh has joined #ruby
mikecmpbll has joined #ruby
<JonnieCache> `mysql -d foo` means "use the database foo" whereas `mysqldump -d foo` means "dump the database foo SKIPPING ALL THE DATA" as -d is short for --no-data
<JonnieCache> FUUUUCK YOU!
carloslopes has joined #ruby
mneorr has joined #ruby
havenn has quit [Read error: Connection reset by peer]
<JonnieCache> fortunately i had another dump
<sandman> probably written by another team....
havenn has joined #ruby
<foucist> JonnieCache: protip, don't use -d at all (you don't need it for mysql)
<JonnieCache> thanks, will do that in future
<foucist> mysql -h blah -u blah -ppassword foo
Coolhand has quit [Read error: Operation timed out]
havenn has quit [Read error: No route to host]
<JonnieCache> foucist: i kinda need to because i was piping sql into it from cat
<JonnieCache> and i dont think that sql necessariy had `USE foo` or whatever at the top
<foucist> mysql -h blah -u blah -ppassword foo < dump.sql always worked fine for me
<JonnieCache> fucking mysql
<Xeago> JonnieCache: postgresql in compat mode works good for us here
<JonnieCache> all the new projects are 100% postgres
<workmad3> what? people generate mysql dumps without using phpmyadmin?!!!
mpereira has joined #ruby
<JonnieCache> phpmyadmin == fail;
* workmad3 hides
<JonnieCache> although its probably less fail than what i just did
chanced has quit [Remote host closed the connection]
Coolhand has joined #ruby
<workmad3> JonnieCache: :D
Coolhand_ has joined #ruby
<JonnieCache> tbh ive seen too many servers rooted through phpmyadmin to ever want to get near it
<Xeago> anyone experience with tdu?
gbchaosmaster has quit [Ping timeout: 248 seconds]
pcarrier has joined #ruby
igro has quit [Quit: Computer has gone to sleep.]
mafolz has quit [Quit: mafolz]
igro has joined #ruby
pu22l3r_ has joined #ruby
willob has joined #ruby
banisterfiend has quit [Remote host closed the connection]
Coolhand_ has quit [Remote host closed the connection]
_alejandro has joined #ruby
Coolhand has quit [Remote host closed the connection]
schaary has joined #ruby
chussenot has quit [Remote host closed the connection]
Coolhand has joined #ruby
chussenot has joined #ruby
havenn has joined #ruby
generalissimo has joined #ruby
Banistergalaxy has quit [Read error: Connection reset by peer]
kirun_ has quit [Ping timeout: 248 seconds]
pcarrier has quit [Ping timeout: 252 seconds]
xclite has joined #ruby
berserkr has joined #ruby
heftig has joined #ruby
ckrailo has joined #ruby
<JDubs_> okay, i did /in/ for a regex, but how do I make it only match the word "in" without matching things like "inside"?
pcarrier has joined #ruby
<hoelzro> JDubs_: /in\b/ should do it
maesbn has quit [Remote host closed the connection]
tatum_O_o has joined #ruby
<JDubs_> what does the \b mean?
<JonnieCache> word boundry
<hoelzro> "boundary" would be my guess
<JDubs_> okay and how do i add that to a large regex, eg /a|b|c|d/ ?
<JonnieCache> you didnt print out that pdf i linked did you? ;)
<JDubs_> JonnieCache: I saved it to go through later :)
<JonnieCache> the point is you print it out so when you have question like "what does \b do" you can look at it
_nitti has quit [Remote host closed the connection]
<JonnieCache> for me i find looking at things on paper forces your brain to pay special attention and its easier to rmember stuff
bairui has quit [Ping timeout: 255 seconds]
gbchaosmaster has joined #ruby
fire has joined #ruby
thatguycraig has left #ruby [#ruby]
thatguycraig has joined #ruby
aganov has quit [Quit: aganov]
cakehero has quit [Quit: Leaving...]
nerd has quit [Ping timeout: 252 seconds]
richardjapenga has quit [Quit: Leaving]
<shevy> JDubs_ put that cheat sheet next to your monitor
cakehero has joined #ruby
<shevy> | in a regex means or
punkrawkR^Home has joined #ruby
mneorr has quit [Ping timeout: 244 seconds]
quest88 has joined #ruby
<shevy> /a|b|c|d\b/ hmmmm
<shevy> seems to be d, followed by word boundary
davidcelis has quit [Quit: K-Lined.]
<shevy> you can test it online at http://rubular.com/
<shevy> oh
<shevy> rubular does not explain \b
<shevy> :\
<shevy> :/
<shevy> no wait, it does...
<JDubs_> shevy: i dont have a printer available bro, gotta get someone to print it for me
<shevy> \b Any word boundary
cakehero is now known as dkullmann
<shevy> JDubs_ hehe I have to walk to the office in order to print too
thatguycraig has quit [Client Quit]
<shevy> that's one area where linux kinda sucks... printer support. my old canon printer had no open source driver support for printing
thatguycraig has joined #ruby
nickbuff has quit [Quit: Linkinus - http://linkinus.com]
<JDubs_> okay /the\b/ is matching a The that starts a sentence...How do I make it not catch the first word of the sentence?
tjbiddle_ has joined #ruby
ddd has quit [Quit: Leaving.]
k610 has quit [Ping timeout: 264 seconds]
<heftig> JDubs_: a sentence is defined as?
tjbiddle__ has joined #ruby
<heftig> is it always the start of the string? or are there multiple sentences in the string?
tjbiddle has quit [Read error: Connection reset by peer]
sandman has quit [Quit: Page closed]
Joost has joined #ruby
ddd has joined #ruby
tjbiddle__ is now known as tjbiddle
<Joost> I just installed TaskJuggler (http://rubygems.org/gems/taskjuggler) but I dunno how to start it -I'm quite new to rubygems
Vendethiel has left #ruby [#ruby]
<heftig> brb
<Joost> I used 'gem install task juggler', but how do I start the tool?
heftig has quit [Quit: leaving]
<csmrfx> probably require that gem in your app
<JDubs_> shevy: yeah i can't use the netheftig: start of a string
ddd has quit [Client Quit]
<JDubs_> oops
<JDubs_> lol
<JDubs_> heftig: start of a string
<csmrfx> Joost: you really should google ruby gems tutorial?
<Joost> I guess
ddd has joined #ruby
<csmrfx> Joost: also google ruby require
<csmrfx> ;)
tjbiddle_ has quit [Ping timeout: 240 seconds]
thatguycraig has left #ruby [#ruby]
<Joost> I'm just trying to start a tool I supposedly installed
hoelzro is now known as hoelzro|away
thatguycraig has joined #ruby
rcvalle has joined #ruby
cableray has joined #ruby
<JDubs_> Looking for a critique of my implementation for a book class please: http://pastie.org/5507165
<JDubs_> want to improve my coding formatting and methodology
<JDubs_> :)
madhadron has joined #ruby
<madhadron> Does anyone know the equivalent of setUpClass and tearDownClass from Python in Ruby's test/unit library?
<madhadron> (Or where in the documentation I should be looking to find it...)
tatum_O_o has quit [Remote host closed the connection]
heftig has joined #ruby
moshef has quit [Quit: moshef]
alvaro_o has joined #ruby
nateberkopec has joined #ruby
<foucist> JDubs_: that's quite the word.match, if you think it's gonna get more complicated, you might want to stick the regexp in a separate method/spot
artm has joined #ruby
<csmrfx> JDubs_: imo your style is just fine
BigO has joined #ruby
<csmrfx> JDubs_: I would perhaps attempt to "parametrize" the noncapped words/article-words, but thats already micromanaging since the code is still rather short
_nitti has joined #ruby
<csmrfx> Then again - given a book class I wouldn't format any input until output
<csmrfx> but perhaps you have some reason for that
banisterfiend has joined #ruby
Takehiro has joined #ruby
_alejandro has quit [Remote host closed the connection]
cousine has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
Hanmac has quit [Quit: Leaving.]
pkeni has joined #ruby
Hanmac has joined #ruby
rakl has quit [Quit: sleeping]
vd0 has joined #ruby
pavilionXP has joined #ruby
<JDubs_> csmrfx: what do you mean parametrize?
Nimsical has joined #ruby
<csmrfx> Meaning the values tested are presented in separate place from where the logic for their use is presented in your code (-files)
<csmrfx> for example, you might have the variable non_capitalizable_words with array of those words
<csmrfx> declare that in library_config.rb even!
nemesit has joined #ruby
<JDubs_> i see
<JDubs_> and then maybe do an include? to see if the word im checking is in the array?
<JDubs_> or match or whatever
<JDubs_> lol
<csmrfx> Just for convinience when you have a real app with multiple files and hundreds or thousands of lines of logic code
<csmrfx> then you only need to open the config, instead of browsing through all the logic
<JDubs_> awesome
<csmrfx> but I dont think your example is that complex
samphippen has quit [Quit: Computer has gone to sleep.]
dash_ has quit [Ping timeout: 252 seconds]
statarb3 has quit [Ping timeout: 240 seconds]
<JDubs_> any idea why this code won't work: "%2d:%2d:%2d" % hours, minutes, seconds
<csmrfx> Ruby has pretty crazy facilities for parametrizing all kinds of aspects of regexii
statarb3 has joined #ruby
<csmrfx> ah well gotta get back to work
leonard__ has joined #ruby
kpshek has joined #ruby
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
Banistergalaxy has joined #ruby
leonardorb has quit [Ping timeout: 264 seconds]
jeffreybaird has quit [Ping timeout: 255 seconds]
Mahar has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
<Mahar> Hi all..
<JDubs_> Mahar: hi o/
dash_ has joined #ruby
<Mahar> Yap...
thatguycraig has quit [Quit: Leaving.]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
u89 has quit [Remote host closed the connection]
<Mahar> first time joing to IRC...
morf has quit [Quit: eof]
<Mahar> i am novice to Ruby..
<Mahar> just start learning..
nazty has joined #ruby
jeffreybaird has joined #ruby
thatguycraig has joined #ruby
<JonnieCache> congratulations :0
<JonnieCache> :)
<Joost> What's the default gempath when it's not /usr/local/rubygems ?
<Joost> I'm trying to find where my gems are installed,so I can use them :p
<JonnieCache> Joost: `gem env` will answer all your problems
bbttxu has quit [Ping timeout: 252 seconds]
<Joost> awesome
<Joost> thanks
Mahar has left #ruby [#ruby]
dnyy has joined #ruby
samphippen has joined #ruby
mpfundstein has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
Xeago has quit [Read error: Operation timed out]
quest88 has quit [Quit: quest88]
flyinprogramer has joined #ruby
Takehiro has quit [Remote host closed the connection]
FredLe has quit [Quit: Leaving.]
davidcelis has joined #ruby
roflmaus has quit []
ejholmes has quit [Quit: ejholmes]
drlaj has quit [Remote host closed the connection]
darthdeus has joined #ruby
SoonerBourne has quit [Read error: Connection reset by peer]
olrrai has joined #ruby
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
<flyinprogramer> so.. i'm clearly an idiot… but lets say i have a an object Dog, and he has a name, and an id; i'm trying to do JSON.genereate on an array of dogs; so naturally i thought it to be wise to do append a to_h method to dog, defined as {name: @name, id: @id} -- but when i do JSON.generate on the array, i the name an id are double escaped -- how do i make it stop doing this ?
SoonerBourne has joined #ruby
berserkr has quit [Ping timeout: 264 seconds]
Takehiro has joined #ruby
drlaj has joined #ruby
<flyinprogramer> or what's the best way to json-ify an array of dogs ?
Joost has quit [Quit: Joost]
skoodge has joined #ruby
mneorr has joined #ruby
darthdeu has joined #ruby
scruple has joined #ruby
schaary has quit [Quit: Leaving.]
gbchaosmaster has quit [Ping timeout: 265 seconds]
darthdeus has quit [Ping timeout: 259 seconds]
blazes816 has joined #ruby
cableray has quit [Ping timeout: 255 seconds]
icole has joined #ruby
timonv has quit [Remote host closed the connection]
lolcathost has quit [Remote host closed the connection]
maletor has joined #ruby
Mon_Ouie has joined #ruby
lolcathost has joined #ruby
<csmrfx> flyinprogramer: use module JSON?
<flyinprogramer> i am...
<csmrfx> dump
igro has quit [Quit: Computer has gone to sleep.]
<csmrfx> or, just use a string for one off
skoodge has left #ruby [#ruby]
<flyinprogramer> csmrfx: ok - hold on
bbttxu has joined #ruby
lolcathost has quit [Client Quit]
lolcathost has joined #ruby
lolcathost has quit [Client Quit]
haxrbyte has joined #ruby
niklasb has joined #ruby
haxrbyte_ has joined #ruby
baroquebobcat has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
* csmrfx holds on franticly
mmitchell has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
TitaniumStudioUs has quit [Quit: This computer has gone to sleep]
chussenot_ has joined #ruby
eldariof has joined #ruby
friskd has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
haxrbyte has quit [Ping timeout: 260 seconds]
<lord4163> Hi I get these errors
<lord4163> I'm trying to make a daemon
<GeekOnCoffee> lord4163: so fix it
Bidness has joined #ruby
<lord4163> you got the solution for me?
<GeekOnCoffee> it doesn't matter what you're doing, the fix for that error is the same
chussenot has quit [Ping timeout: 240 seconds]
chussenot_ is now known as chussenot
Shamgar has joined #ruby
kdridi has joined #ruby
epwhorl has quit [Ping timeout: 255 seconds]
BoomCow has joined #ruby
hotovson has quit [Remote host closed the connection]
BoomCow has quit [Client Quit]
berserkr has joined #ruby
<lord4163> I don't understand it because I have the permissions on all on each file
<GeekOnCoffee> is the code running as you?
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<eka> lord4163: seems that the process has no access to the file though
leonardorb has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<flyinprogramer> csmrfx: http://pastebin.com/ktgis6G8
<lord4163> yeah
atal421 has quit [Quit: atal421]
<flyinprogramer> $ ./dog_to_json.rb
<flyinprogramer> {:name=>"test", :id=>"123"}
<lord4163> I got the permissions on a+rwx on each file
<flyinprogramer> #<Dog:0x007fa8790dcae0>
<flyinprogramer> #<Dog:0x007fa8790dca68>
hola123 has joined #ruby
hola123 is now known as arkiver
Vert has joined #ruby
mahmoudimus has joined #ruby
leonard__ has quit [Ping timeout: 240 seconds]
<flyinprogramer> csmrfx: so obviously it's not doing what i claimed… but how would i get that do display json something like: {"dogs": [{name: test, id: 123},{name:test, id: 123}]} //ignore my missing double quotes
cousine has quit [Remote host closed the connection]
bakis has quit [Ping timeout: 240 seconds]
drlaj has quit [Remote host closed the connection]
jenrzzz has joined #ruby
Adget has joined #ruby
bakis has joined #ruby
bakis is now known as Guest10137
babonk has joined #ruby
babonk has quit [Changing host]
babonk has joined #ruby
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
dkullmann is now known as cakehero
Slivka has quit [Read error: Connection reset by peer]
Virunga has joined #ruby
<csmrfx> flyinprogramer: ok, so you have ruby Dog -class instances
<csmrfx> flyinprogramer: are you aware of what JSON really is?
olrrai has quit [Quit: Saliendo]
reppard has joined #ruby
dr_bob has left #ruby [#ruby]
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
<flyinprogramer> csmrfx: i'm going to play stupid and say nope
drlaj has joined #ruby
nat2610 has joined #ruby
huoxito has joined #ruby
<flyinprogramer> csmrfx: just in i missed something, not to be a jerk
Fretta has joined #ruby
<flyinprogramer> **in case
alanp has quit [Ping timeout: 240 seconds]
alanp_ has joined #ruby
nazty has quit [Quit: Leaving]
Joost has joined #ruby
<rcvalle> Hi, is it possible to get an reference to the current binding and, thus, change its contents. For example, for each call to Kernel#binding I receive a different binding object, passing it to a method that modifies its contents, such as creating a variable doesn't really change the current binding and I can't reference the newly created variable after calling this method in the current binding
swarley-freenode has joined #ruby
punkrawkR^Home has quit [Ping timeout: 248 seconds]
punkrawkR^Home has joined #ruby
<rcvalle> Is there a way to get a reference to the current binding and change its contents?
remi has joined #ruby
remi has quit [Changing host]
remi has joined #ruby
rakl has joined #ruby
fire has quit [Quit: WeeChat 0.3.9.2]
TheMoonMaster_ is now known as TheMoonMaster
Elhu has quit [Quit: Computer has gone to sleep.]
<csmrfx> flyinprogramer: what I am trying to point to, or ask about, is do you realize how JSON treats ruby classes?
<flyinprogramer> nope
<csmrfx> flyinprogramer: and the trivial answer to your q is, put the dog objs as a value in a has with the key "dogs"
<csmrfx> flyinprogramer: since you dont know how a custom ruby class gets converted into JSON, that is your next mission
rhys has joined #ruby
<csmrfx> until you know you can not be successful with JSON
Guest10137 is now known as bakis
bakis has quit [Changing host]
bakis has joined #ruby
<csmrfx> well, Ruby<->JSON exchange, anyway
artm has quit [Ping timeout: 241 seconds]
mikekelly has quit [Ping timeout: 264 seconds]
<flyinprogramer> csmrfx: i've found: http://flori.github.com/json/ <--- is there better?
SoonerBourne has quit [Ping timeout: 240 seconds]
<csmrfx> JSON is blindingly dumb
<eka> flyinprogramer:
<csmrfx> you just need to grok
<eka> >> JSON.dump({dogs: %w[dog1 dog2 dog3]})
<eka> => "{\"dogs\":[\"dog1\",\"dog2\",\"dog3\"]}"
<eval-in> eka: Output: "/tmp/execpad-875bdde27554/source-875bdde27554:1:in `<main>': uninitialized constant JSON (NameError)\n" (http://eval.in/4388)
SoonerBourne has joined #ruby
<csmrfx> (not quite as dumb as marshalling but anyway)
<csmrfx> >> require 'json'
<eval-in> csmrfx: Output: "" (http://eval.in/4389)
adeponte has joined #ruby
nips has joined #ruby
kil0byte has joined #ruby
<csmrfx> >> require 'json'; JSON.dump({"who let the dogs out": ["wof", "wuf", "wuf"]}
mikekelly has joined #ruby
<eval-in> csmrfx: Output: "/tmp/execpad-8582330aeb4e/source-8582330aeb4e:1: syntax error, unexpected ':', expecting tASSOC\n...N.dump({\"who let the dogs out\": [\"wof\", \"wuf\", \"wuf\"]}\n... ^\n/tmp/execpa ..." (http://eval.in/4390)
<csmrfx> lol
<workmad3> csmrfx: do you mean 'dumb' as in 'you're dumb if you use it' or 'dumb' as in 'json serialization is pretty simplistic'? :)
<csmrfx> latter
Joost has quit [Quit: This conversation can serve no purpose anymore. Goodbye.]
<workmad3> >> require 'json'; JSON.dump({"who let the dogs out" => ["wof", "wuf", "wuf"]}
<eval-in> workmad3: Output: "/tmp/execpad-fe8597bfaff8/source-fe8597bfaff8:1: syntax error, unexpected $end, expecting ')'\n... out\" => [\"wof\", \"wuf\", \"wuf\"]}\n... ^\n" (http://eval.in/4391)
<workmad3> >> require 'json'; JSON.dump({"who let the dogs out" => ["wof", "wuf", "wuf"]})
<eval-in> workmad3: Output: "" (http://eval.in/4392)
<workmad3> got to use hashrockets for stringy keys
<workmad3> >> require 'json'; puts JSON.dump({"who let the dogs out" => ["wof", "wuf", "wuf"]})
<eval-in> workmad3: Output: "{\"who let the dogs out\":[\"wof\",\"wuf\",\"wuf\"]}\n" (http://eval.in/4393)
<csmrfx> Nevr evr! use irb before irc exampul
<csmrfx> 8)
rellin has quit [Ping timeout: 255 seconds]
<csmrfx> thanks workmad3
nfisher has quit [Quit: Good night]
ryanlecompte has joined #ruby
h4mz1d has joined #ruby
artm has joined #ruby
davidcelis has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
realniko_ has quit [Ping timeout: 255 seconds]
_nitti has quit [Remote host closed the connection]
pewter_tao has joined #ruby
pewter_tao has left #ruby [#ruby]
pewter_tao has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
Proshot has joined #ruby
sn0wb1rd has joined #ruby
atal421 has joined #ruby
iaj has quit [Ping timeout: 256 seconds]
havenn has quit [Remote host closed the connection]
joeycarmello has joined #ruby
k610 has joined #ruby
joeycarmello has quit [Remote host closed the connection]
swarley-freenode has quit [Ping timeout: 245 seconds]
clj_newb has joined #ruby
cezar has quit [Ping timeout: 260 seconds]
TitaniumStudioUs has joined #ruby
statarb3 has quit [Ping timeout: 265 seconds]
joeycarmello has joined #ruby
Proshot is now known as statarb3
babonk has quit [Quit: babonk]
statarb3 has quit [Changing host]
statarb3 has joined #ruby
icole has quit [Remote host closed the connection]
ExxKA has joined #ruby
reppard has quit [Ping timeout: 265 seconds]
friskd_ has joined #ruby
banjara1 has quit [Quit: Leaving.]
Vainoharhainen has quit [Quit: Leaving...]
friskd has quit [Ping timeout: 255 seconds]
friskd_ is now known as friskd
h4mz1d has quit [Ping timeout: 240 seconds]
ephemerian has quit [Quit: Leaving.]
headius has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
nwertman has joined #ruby
<csmrfx> hey headius
<headius> hello there
<csmrfx> anything new on the jruby front during last 10 months or so?
<headius> heh :)
<headius> yeah, a few things
iaj has joined #ruby
<csmrfx> kewl kewl
leonardorb has quit [Read error: Connection reset by peer]
leonardo_ has joined #ruby
<csmrfx> must have been jan since I last got to jreubeyns around
<shevy> jsex is new!
haxrbyte_ has quit [Ping timeout: 240 seconds]
nkts has quit [Quit: Leaving]
arkiver has quit [Ping timeout: 252 seconds]
<babykosh> simple question here…how to say…"select keys as k"…..hash.select{|k,v|}.keys….??
leonardo_ has quit [Client Quit]
BiHi_ has quit [Quit: Computer has gone to sleep]
<banisterfiend> babykosh: ?
<banisterfiend> babykosh: hash.keys ?
<csmrfx> babykosh: sorry I dont grok
mildfate has joined #ruby
slainer68 has quit [Remote host closed the connection]
vd0 has quit [Remote host closed the connection]
<eka> csmrfx: define grok
<pewter_tao> hey guys, I want to run ruby -c filename recursively through directories... It obviously has issues on non-ruby files. What's a good way to do this?
Solnse has joined #ruby
<babykosh> ah…trying to extract keys from hash…so I can do 'for each key….do'
<csmrfx> understand, capische, cognize, get
tvw has quit [Remote host closed the connection]
<banisterfiend> babykosh: hash.each_key
<csmrfx> babykosh: you could just use the enumerator
fike1 has joined #ruby
<babykosh> banisterfiend: thank you
<csmrfx> pewter_tao: use bash to filter out all non rb's?
<babykosh> ah got it…stayed up too late last night…brain slow now
Bidness has quit [Remote host closed the connection]
dangerousdave has joined #ruby
<csmrfx> workmad3 eka I just talk jive with some old dudes who used to say grok
<csmrfx> always thought it was same as "get it"
<eka> csmrfx: how old are you?
<pewter_tao> csmrfx: just by filename, or for the first line of the file...? (which would be #!/usr/bin/ruby)
<csmrfx> eka: middle ages
sepp2k has quit [Remote host closed the connection]
krislappy is now known as krisfremen
<eka> lol
havenn has joined #ruby
<workmad3> csmrfx: that's how it tends to be used :)
<csmrfx> pewter_tao: I mean something like using find ('find /tgtdir/ -type f -name *.rb -exec ruby -flags {} \;
<csmrfx> ' or just plain old 'ruby -flags tgdir/**.rb')
<workmad3> csmrfx: you should read 'Stranger in a strange land' though... that's where it came from and it'll help you grok why grok is so much more than simply 'getting it' :)
artm has quit [Quit: artm]
banjara has joined #ruby
drlaj has quit [Ping timeout: 240 seconds]
<csmrfx> workmad3: hey, didn't know that
<pewter_tao> csmrfx: ok, yeah I'll run ruby -c on all files in subdirs, and give outputs
lrz has joined #ruby
chussenot has quit [Quit: chussenot]
<csmrfx> hehe I wonder what ruby tgtdir/**.rb >> sumfile.txt would do
<pewter_tao> csmrfx: just looking for the most robust way
<csmrfx> ** dies if there are more than 64k files I think
daniel_hinojosa has joined #ruby
<csmrfx> in bash.
<csmrfx> Or maybe it was 48k or 32k files.
<pewter_tao> csmrfx: yeah, this ruby script will check syntax of all ruby & bash files
<csmrfx> So, most robust in bash would be using find, definately.
<JDubs_> Hey guys, how do I search a hash and pull out key value pairs that match a string?
<csmrfx> Then again, if you are certain theres only going to be few hundred or less, **.rb is just fine
vivien_ has joined #ruby
<JDubs_> using a prefix only
<JDubs_> btw
rakuN has joined #ruby
<csmrfx> JDubs_: peek into ri Hash.each_pair
Aiur has joined #ruby
<pewter_tao> csmrfx: why two astrisks before file extension?
vivien_ has quit [Remote host closed the connection]
<csmrfx> two asterisks goes all the way
<pewter_tao> hmmm, I hope all ruby files will have the extension
vivien_ has joined #ruby
<csmrfx> single asterisk only looks at this directory
<pewter_tao> all way down from current dir
<pewter_tao> cool :
<pewter_tao> )
k610 has quit [Ping timeout: 252 seconds]
<csmrfx> Ok, time to go home
<csmrfx> 8)
<JDubs_> @csmrfx is the best way just to do a hash.each and then use an include? to see if the string is a part of the current key?
tjbiddle has quit [Ping timeout: 240 seconds]
<csmrfx> Depends, if you want to check key, value, both, use a block perhaps, or what
daniel_hinojosa has quit [Read error: No route to host]
hackerdude has joined #ruby
dash_ has quit [Ping timeout: 252 seconds]
daniel_hinojosa has joined #ruby
<JDubs_> csmrfx i just want to check the key: for instance I could search "Pre" and it would pull keys that said "Prehistoric" "Prefixes" etc
bapa has quit [Read error: Connection reset by peer]
<JDubs_> would i just hash.each and then k.include?(/pre\b/)?
<csmrfx> JDubs_: perhaps you want ri Hash.select - gives you both and returns a nice collection
<JDubs_> ooo
mrsolo has joined #ruby
<csmrfx> anyway, I'm off to the bus stop
<csmrfx> ta!
freakazoid0223 has quit [Quit: Leaving]
bapa has joined #ruby
arturaz has joined #ruby
cdt has quit [Ping timeout: 240 seconds]
itchyouch has joined #ruby
mascool has joined #ruby
ryanf has quit [Quit: leaving]
a_a_g has quit [Quit: Leaving.]
jackbrownhf has quit [Quit: Sto andando via]
whowantstolivef1 has joined #ruby
whowantstolivef1 has quit [Read error: Connection reset by peer]
whowantstolivef1 has joined #ruby
froy has joined #ruby
Slivka has joined #ruby
dash_ has joined #ruby
Slivka has quit [Max SendQ exceeded]
_nitti_ has joined #ruby
Slivka has joined #ruby
Diger_s has joined #ruby
bradleyprice has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
tjbiddle has joined #ruby
mildfate has quit [Quit: Leaving.]
<pewter_tao> to syntax check bash with ruby would you just call "bash -n filename" from ruby?
<pewter_tao> or can ruby do it natively?
workmad3 has quit [Ping timeout: 264 seconds]
Coolhand has quit [Remote host closed the connection]
darthdeu has quit [Read error: Connection reset by peer]
darthdeus has joined #ruby
ejholmes has joined #ruby
Aiur has quit [Quit: Computer has gone to sleep.]
darthdeus has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
blaxter has quit [Quit: foo]
arietis has joined #ruby
rakl has quit [Read error: Connection reset by peer]
sarmiena_ has joined #ruby
philcrissman has quit [Remote host closed the connection]
<sarmiena_> I'm retrieving an email from Gmail & trying to extract the body. I noticed that it has been encoded using Quoted-Printable… so I am using String#unpack
<sarmiena_> the problem is that unpack is returning nothing but a couple of dashes "--"
lrz has left #ruby [#ruby]
<Mon_Ouie> pewter_tao: I would shell out to do that. Writing a shell parser in ruby would be a lot of work.
bairui has joined #ruby
Aiur has joined #ruby
_nitti_ has quit [Ping timeout: 264 seconds]
headius has quit [Quit: headius]
<pewter_tao> Mon_Ouie: because 'bash -n' can do it
elsifaka has quit [Quit: Veloma e!]
philomory has joined #ruby
clj_newb has quit [Ping timeout: 250 seconds]
<pewter_tao> So I'll basically be running bash -n and ruby -c on every file...
gridaphobe has joined #ruby
babonk has joined #ruby
babonk has quit [Changing host]
babonk has joined #ruby
stkowski has joined #ruby
whowantstolivef1 has quit [Read error: No buffer space available]
EyesIsMine has quit [Remote host closed the connection]
icole has joined #ruby
whowantstolivef1 has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
rakl has joined #ruby
reppard has joined #ruby
Takehiro has quit [Remote host closed the connection]
babonk has left #ruby [#ruby]
vlad_starkov has joined #ruby
shiin has quit [Quit: Computer has gone to sleep.]
techhelp has quit [Quit: This computer has gone to sleep]
haxrbyte has joined #ruby
tcurdt has quit [Quit: Computer has gone to sleep.]
Russell^^ has joined #ruby
Andr0_ has joined #ruby
emmanuelux has joined #ruby
browndawg has quit [Quit: Leaving.]
bapa has quit [Remote host closed the connection]
bricker has joined #ruby
Zolrath has quit []
noric has joined #ruby
L1 has joined #ruby
L1 has quit [Changing host]
L1 has joined #ruby
bapa has joined #ruby
headius has joined #ruby
nga4 has joined #ruby
c0rn has joined #ruby
reppard has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby
darthdeus has joined #ruby
dash_ has quit [Ping timeout: 250 seconds]
yaymukund has quit [Ping timeout: 240 seconds]
swarley-freenode has joined #ruby
jekotia has joined #ruby
maletor has quit [Ping timeout: 240 seconds]
Shadow_S has joined #ruby
elux has joined #ruby
fred909 has joined #ruby
maletor has joined #ruby
codecaster has joined #ruby
pu22l3r_ has joined #ruby
Roa has quit [Ping timeout: 264 seconds]
pettsson has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
atal421 has quit [Read error: Connection reset by peer]
atal421_ has joined #ruby
art_man1 has joined #ruby
DaZ has quit [Ping timeout: 240 seconds]
<JDubs_> Needs some help! Code: http://pastie.org/5507686 test file: http://pastie.org/5507688
<JDubs_> error: Failure/Error: @d.printable.should == %Q{[apple] "fruit"\n[fish] "aquatic animal"\n[zebra] "African land animal with stripes"}
<JDubs_> NoMethodError:
<JDubs_> undefined method `split' for ["apple", "fish", "zebra"]:Array
jharris has quit [Quit: WeeChat 0.3.8]
GoGoGarrett has joined #ruby
elico has joined #ruby
dash_ has joined #ruby
squidBits has joined #ruby
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
<madhadron> JDubs_: The string you're trying to split has already been split.
lord4163 has left #ruby [#ruby]
davidcelis has quit [Quit: K-Lined.]
<JDubs_> But I only run split once...I don't understand
<JDubs_> and i have check to make sure it's a string that is being split
<madhadron> *shrugs* I would grab your debugger and step through to there. I suspect you've got an Array already.
<madhadron> Of course, make sure it's the same split and not some miscall of a library method.
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
cakehero has quit [Quit: Leaving...]
<JDubs_> I dont know how to do either of those things
<JDubs_> :(
ewokchewy has joined #ruby
<JDubs_> How do I see if it's a miscall?
<madhadron> Okay, you run ruby -d script.rb
squidBits has quit [Read error: Connection reset by peer]
<madhadron> And start stepping through, printing the value of variables as you go
chimkan_ has joined #ruby
squidBits has joined #ruby
<madhadron> You can also just stick a puts of the class in the statement
Appineer has joined #ruby
<madhadron> So before the split, add "puts "#{entry.class}"
pu22l3r_ has quit [Ping timeout: 260 seconds]
pu22l3r__ has joined #ruby
<pewter_tao> hey guys I'm trying to run syntax checks on lots of ruby files using ruby -c, but it outputs errors if it is run on non-ruby files. How can I check for '#!/usr/bin/ruby' at the beginning of every file.
* csmrfx rides the ruby red bua
<csmrfx> *bus
postmodern has joined #ruby
<madhadron> pewter_tao, You could always use ls *.rb, or grep -L
<madhadron> grep -L prints only the filename of the matched file
Zai00 has quit [Quit: Zai00]
<csmrfx> naw
<csmrfx> better use find
bbttxu has quit [Quit: bbttxu]
<madhadron> csmrfx, Yes, true. Better to use find.
<madhadron> If you're writing a script, definitely use find. If, like me, you can't remember all its arguments, just hack a pipe together.
<csmrfx> I already pasted a fd
<csmrfx> *find
rezzack has joined #ruby
carloslopes has quit [Remote host closed the connection]
* csmrfx last projex hav 100s of k's of files so only find works
philcrissman has joined #ruby
undecim has quit [Remote host closed the connection]
<madhadron> csmrfx: Gak.
mercwithamouth has quit [Ping timeout: 252 seconds]
<csmrfx> pewter_tao: test with ruby if first line is that?
<madhadron> csmrfx: Does your ls or grep seriously have a size limit?
<pewter_tao> madhadron: not all of the ruby files have .rb, I think - so I'm checking for both .rb and the #! line
<csmrfx> madhadron: yes
<pewter_tao> to qualify it as a ruby file before I run ruby -c on it
tjbiddle_ has joined #ruby
<csmrfx> madhadron: bash * is limited by inode size of your fs
<pewter_tao> csmrfx: yeah I realized I want to check for the #! at the beginning of the file AND .rb as an extension to qualify it as a ruby file.
<madhadron> csmrfx: Ah, right.
<csmrfx> 32k/48k/64k files, give it more and it dies
<pewter_tao> I only need a few thousand
grzywacz has quit [Ping timeout: 264 seconds]
pcarrier has quit []
<csmrfx> pewter_tao: well, whatabout python and bash files with crynchbanf
* madhadron being newly arrived from other languages is slightly appalled at such numbers of source files.
<csmrfx> madhadron: not source, data
carloslopes has joined #ruby
<madhadron> csmrfx: Ah, okay. That kind of thing happens, unfortunately.
daniel_hinojosa has quit [Ping timeout: 265 seconds]
jrist is now known as jrist-afk
friskd has quit [Quit: friskd]
<pewter_tao> csmrfx: crynchbang?
<csmrfx> crunchbang == #!
pkeni has quit [Remote host closed the connection]
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
<madhadron> csmrfx: Usually it means that priority #1 should be better data curation.
flip_digits has quit [Read error: Connection reset by peer]
rezzack has quit [Quit: Leaving.]
<pewter_tao> csmrfx: yeah what are you sayin to do?
<pewter_tao> just check for that? I need to check for the whole line to distinguish between bash, ruby, etc files
<csmrfx> And I misinformed you, the * file limit per directory is not inode related, but the underlying readdir() function related
<csmrfx> pewter_tao: well test for /\!\#.*ruby\$/
<madhadron> csmrfx: Oof, that looks like an ugly position to have been in.
<csmrfx> pewter_tao: thats pseudocode regex, untested
g_bleezy has joined #ruby
alex__c2022 has joined #ruby
daniel_hinojosa has joined #ruby
<madhadron> Anyway, off to work...
madhadron has quit [Quit: Leaving.]
_nitti has joined #ruby
<pewter_tao> csmrfx: ok, so I'd want to do that on every file resursively.
rezzack has joined #ruby
<csmrfx> >> "#!/usr/weird/path/to/bin/ruby".match(/\#\!.*ruby$/)
<eval-in> csmrfx: Output: "" (http://eval.in/4394)
codecaster has quit [Quit: Leaving.]
<csmrfx> >> puts "#!/usr/weird/path/to/bin/ruby".match(/\#\!.*ruby$/)
<eval-in> csmrfx: Output: "#!/usr/weird/path/to/bin/ruby\n" (http://eval.in/4395)
<csmrfx> >> puts "#!/usr/weird/path/to/bin/ruby-red-slippers-hat".match(/\#\!.*ruby$/)
<eval-in> csmrfx: Output: "\n" (http://eval.in/4396)
<csmrfx> "\n"?
<csmrfx> invisible nil
bel3atar has joined #ruby
Nykolla has joined #ruby
<csmrfx> pewter_tao: what if the coder was like me and dont use crunchbang
yaymukund has joined #ruby
<pewter_tao> yeah, I'm doing the union
<pewter_tao> so it must either be .rb or have #!
<csmrfx> just "#encoding: utf-8"
g_bleezy has quit [Ping timeout: 264 seconds]
<csmrfx> I'd go for checking with a parser to be certain
<pewter_tao> csmrfx: your above expression does it for everything in the dir
rdark has quit [Quit: leaving]
<pewter_tao> right
gbchaosmaster has joined #ruby
<csmrfx> pewter_tao: which expression
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<pewter_tao> "#!/usr/weird/path/to/bin/ruby".match(/\#\!.*ruby$/)
wermel has quit [Remote host closed the connection]
kirun has joined #ruby
nips has quit []
<csmrfx> yep that matches lines with anything + #! + anything + ending in "ruby"
<csmrfx> so you want to add beginning of line to that
entrenador has quit [Quit: Lost terminal]
clj_newb has joined #ruby
<pewter_tao> check with a parser? I don't exactly know what that means... file doesn't say an ascii file is a ruby script unless it has #!*ruby...
silverslab has joined #ruby
mildfate has joined #ruby
<csmrfx> run file thru ruby and see if errors
<csmrfx> not sure if possible
art_man1 has quit [Quit: art_man1]
<pewter_tao> csmrfx: indeed, so I just have to get the first line of every file into that regex
<pewter_tao> not sure if what possible
art_man1 has joined #ruby
Appineer has quit [Remote host closed the connection]
art_man1 has quit [Client Quit]
<csmrfx> perhaps ruby -c file is closest
art_man1 has joined #ruby
* csmrfx actually read some of 'man ruby'!
yaymukund has quit [Quit: leaving]
techhelp has joined #ruby
yaymukund has joined #ruby
davidcelis has joined #ruby
hadees has quit [Quit: hadees]
<pewter_tao> csmrfx: I have... why?
ipalaus has quit [Ping timeout: 265 seconds]
* csmrfx was talking about himself, in past form
fumbe has quit [Ping timeout: 246 seconds]
jharris1 has joined #ruby
Vainoharhainen has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<csmrfx> I dont think I've read ruby man before!!!
alexim has joined #ruby
bel3atar has quit [Quit: Leaving]
kpshek has quit []
ananthakumaran has quit [Quit: Leaving.]
<csmrfx> whoa, jrubu is in 1.7.1
<csmrfx> lol my installed versions are 1.1 and rvm's 1.5.3
pewter_tao has quit [Ping timeout: 264 seconds]
jaygen has quit [Read error: Connection reset by peer]
madhadron has joined #ruby
jaygen has joined #ruby
arturaz has quit [Remote host closed the connection]
TitaniumStudioUs has quit [Quit: This computer has gone to sleep]
busybox42 has quit [Ping timeout: 264 seconds]
TitaniumStudioUs has joined #ruby
<JDubs_> okay guys i still need help with my code :( i can't seem to get the tests to pass :/
mercwithamouth has joined #ruby
<csmrfx> ahhh, pastie has inconsolata
* csmrfx stops for pastie.org
ToTo has joined #ruby
Solnse has quit [Ping timeout: 265 seconds]
<csmrfx> JDubs_: is that rspec? or what
philomory has quit [Read error: Connection timed out]
<JDubs_> yeah rspec
<csmrfx> ok
haxrbyte_ has joined #ruby
<csmrfx> you want us to 1) install rspec and run these tests or 2) telepathically debug your code?
<JDubs_> I thought everyone used rspec :(
philomory has joined #ruby
<csmrfx> or just tell us what the prob is?
kpshek has joined #ruby
<csmrfx> JDubs_: nothing wrong with rspec
* csmrfx always brews his own
pewter_tao has joined #ruby
Synthead has joined #ruby
haxrbyte has quit [Ping timeout: 259 seconds]
<JDubs_> csmrfx: I'm starting to think it might be my machine :/
<JDubs_> keeps going from a split error to no error
<JDubs_> i dont get it
<csmrfx> pastie error, always
brianpWins has quit [Quit: brianpWins]
noric has quit [Ping timeout: 240 seconds]
vlad_sta_ has quit [Remote host closed the connection]
<JDubs_> Well, i fixed the code, although I still don't know why i was getting the split error :/
<JDubs_> i hate fixing things and not knowing how i fixed it lol
h4mz1d has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
Solnse has joined #ruby
Slivka has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
<JDubs_> anyone else find RPN really really confusing?
ARTWORKS has joined #ruby
<ARTWORKS> www.artworks.lt is waiting for a new artists, and people who like art.
ARTWORKS has left #ruby [#ruby]
vlad_starkov has joined #ruby
clj_newb has quit [Ping timeout: 265 seconds]
u89 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Solnse has quit [Ping timeout: 256 seconds]
ToTo has quit [Quit: Leaving...]
dankest has joined #ruby
<csmrfx> RPN?
cakehero has joined #ruby
reppard has joined #ruby
rippa has quit [Ping timeout: 255 seconds]
obryan has joined #ruby
chussenot has joined #ruby
<JDubs_> csmrfx: reverse polish notation
chussenot has quit [Client Quit]
flyinprogramer has quit [Quit: flyinprogramer]
lolcathost has joined #ruby
lampe2 has joined #ruby
thillux has joined #ruby
<csmrfx> hm, I think I learned it when I was 15
<csmrfx> had a calculator that used rpn
atal421_ has quit [Ping timeout: 276 seconds]
<csmrfx> not that confusing
kdridi has quit [Quit: This computer has gone to sleep]
flyinprogramer has joined #ruby
flyinprogramer has quit [Client Quit]
philomory has quit [Read error: Connection timed out]
d2dchat has quit [Remote host closed the connection]
<csmrfx> lispy is more confusing
jgarvey has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
anthonybrown has joined #ruby
busybox42 has joined #ruby
drlaj has joined #ruby
carloslopes has quit [Remote host closed the connection]
jrajav has joined #ruby
EyesIsMine has joined #ruby
philomory has joined #ruby
atal421 has joined #ruby
fayimora has joined #ruby
Coolhand|laptop has joined #ruby
davidcelis has quit [Quit: K-Lined.]
gbchaosmaster has quit [Ping timeout: 241 seconds]
hoelzro|away is now known as hoelzro
haxrbyte has joined #ruby
<foucist> JDubs_: i figured out RPN on my hp48g in less than 2 days and was calculating a helluva lot faster than everyone with their ti-8xs :P
anthonybrown has quit [Remote host closed the connection]
<foucist> JDubs_: unless you're referring to some stack-based programming language like forth or factor etc
reppard has quit [Ping timeout: 265 seconds]
<foucist> those still stay confusing
jslowe has joined #ruby
pu22l3r__ has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
fayimora has quit [Client Quit]
linkedinyou has joined #ruby
<foucist> having to hold the stack in my head and think about swaps & dups when coding forth, never really got easier
fayimora has joined #ruby
haxrbyte_ has quit [Ping timeout: 264 seconds]
_alejandro has joined #ruby
fayimora has quit [Client Quit]
fayimora has joined #ruby
<JDubs_> foucist: I'm trying to write a RPN calculator using ruby lol
undert has quit [Ping timeout: 252 seconds]
philcrissman has joined #ruby
ryanf has joined #ruby
arturaz has joined #ruby
<csmrfx> haha
<csmrfx> I also had hp
<csmrfx> never was any good in math
<pewter_tao> with get_line_from_file, can I have a regular expression in there to get the first line of every file?
<csmrfx> pewter_tao: is this a loc in your pastie?
kirun has quit [Ping timeout: 252 seconds]
<pewter_tao> a loc?
undert has joined #ruby
<csmrfx> line-of-code?
sj26 has quit [Ping timeout: 246 seconds]
tectonic has quit [Ping timeout: 255 seconds]
<pewter_tao> I dont't have a pastie
epochwolf has quit [Ping timeout: 246 seconds]
<csmrfx> maybe you should
shevy has quit [Read error: Operation timed out]
faulkner has quit [Ping timeout: 245 seconds]
mwilson` has quit [Ping timeout: 248 seconds]
ahuman_ has joined #ruby
faulkner has joined #ruby
fcj has joined #ruby
<pewter_tao> csmrfx: I'm wondering how I'd pipe a search output (like find . -name), to get_line_from_file
tectonic has joined #ruby
ahuman has quit [Read error: Connection reset by peer]
<csmrfx> I am assuming thats some ruby File IO module method
Tarential has quit [Ping timeout: 246 seconds]
Tarential has joined #ruby
fcj has quit [Client Quit]
epwhorl has joined #ruby
c0rn has joined #ruby
<csmrfx> what kind of find do you use?
gridaphobe has quit [Remote host closed the connection]
burlesona has joined #ruby
fcj has joined #ruby
ebouchut has joined #ruby
nazty has joined #ruby
epochwolf has joined #ruby
sj26 has joined #ruby
c0rn has quit [Client Quit]
<pewter_tao> csmrfx: I haven't yet.
babykosh has left #ruby [#ruby]
<csmrfx> well
fayimora has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
twoism has joined #ruby
<csmrfx> find can exec a command and give it the filepath as argument
<csmrfx> I wonder if ri ARGV exists
fayimora has joined #ruby
<csmrfx> ARGF
xcvd`` has joined #ruby
<csmrfx> no, seriously ri ARGF
jlwestsr has quit [Quit: Ex-Chat]
fcj has quit [Client Quit]
dr_bob has joined #ruby
beneggett has joined #ruby
qubit_ is now known as qubit
fayimora has quit [Client Quit]
mgates has joined #ruby
<csmrfx> not that I've ever used ARGF.read personally - but that might be the ticket
ikaros has joined #ruby
jeffsmykil1 has joined #ruby
king313 has joined #ruby
king313 has joined #ruby
king313 has quit [Changing host]
foxtrot101 has joined #ruby
jslowe has quit [Ping timeout: 264 seconds]
pen has quit [Remote host closed the connection]
<jeffsmykil1> I have an issue where I am outputting this date/time Mon Dec 10 09:00:00 -0500 2012 but IE browsers don't like the -0500, is there a way to format the same thing so it says EST instead?
elaptics is now known as elaptics`away
remi has quit [Quit: Lost terminal]
<csmrfx> pewter_tao: what are you writing anyhow?
mgates has left #ruby [#ruby]
<pewter_tao> something that 1) recursively checks if a file has a #!/usr/bin/ruby line OR if it has a .rb extension 2) if so checks its syntax (using ruby -c)
mildfate has quit [Quit: Leaving.]
dreinull has joined #ruby
<csmrfx> so its a some kind of build thing?
<pewter_tao> a test thing
<csmrfx> if you gonna do both you wont need find
sarmiena_ has quit [Quit: sarmiena_]
jackbrownhf has quit [Quit: Sto andando via]
pu22l3r_ has joined #ruby
<csmrfx> just ruby -c **.rb >> "output.txt"
<csmrfx> done!
<pewter_tao> I want both
<pewter_tao> and I want to use a ruby script to do it
<pewter_tao> :)
SoonerBourne has quit [Read error: Connection reset by peer]
sarmiena_ has joined #ruby
burgestrand has joined #ruby
<csmrfx> look man, that problem is already solved
<csmrfx> my output.txt says "Syntax OK"
<csmrfx> lol
<silverslab> I'm having a problem with connection errors to a URL in a ruby script but, the same url works fine in IRB or with curl on the command line.
rakuN has quit [Ping timeout: 240 seconds]
SoonerBourne has joined #ruby
thillux_ has joined #ruby
shevy has joined #ruby
nomenkun has joined #ruby
punkrawkR^Home has quit [Read error: Connection reset by peer]
aaronmacy has quit [Quit: Leaving.]
<csmrfx> pewter_tao: ruby -c **.rb will stop at first file
punkrawkR^Home has joined #ruby
thillux has quit [Ping timeout: 255 seconds]
brianpWins has joined #ruby
jekotia has quit [Read error: Connection reset by peer]
jekotia has joined #ruby
rakuN has joined #ruby
eldariof has quit []
bradhe has quit [Remote host closed the connection]
<csmrfx> so "$ find /tgt/path -type f -name *.rb -exec ruby -c {} >> 'output.txt' \;" would check all files for rubyness.
codezombie has joined #ruby
apok has joined #ruby
iamjarvo has quit [Quit: Leaving.]
wchun has quit [Ping timeout: 264 seconds]
Morkel_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
h4mz1d has quit [Ping timeout: 250 seconds]
Guest73164 has quit [Quit: Guest73164]
_bart has joined #ruby
drlaj has quit [Remote host closed the connection]
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
kdridi has joined #ruby
wchun has joined #ruby
xorigin has joined #ruby
xorigin has left #ruby [#ruby]
rakuN has quit [Ping timeout: 240 seconds]
rakuN has joined #ruby
artm has joined #ruby
whowantstolivef1 has quit [Ping timeout: 264 seconds]
arturaz has quit [Remote host closed the connection]
hippyphysicist has joined #ruby
gbchaosmaster has joined #ruby
xorigin has joined #ruby
d2dchat has joined #ruby
hippyphysicist has quit [Read error: Connection reset by peer]
xorigin has left #ruby [#ruby]
yeban_ is now known as yeban
maletor has joined #ruby
pewter_tao has quit [Ping timeout: 255 seconds]
willob has quit [Quit: Leaving.]
maletor has quit [Max SendQ exceeded]
maletor has joined #ruby
hippyphysicist has joined #ruby
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
hippyphysicist has quit [Client Quit]
u89 has quit [Ping timeout: 250 seconds]
willob has joined #ruby
davidcelis has joined #ruby
DaZ has joined #ruby
arquebus has joined #ruby
s1n4 has quit [Quit: leaving]
kpshek has quit []
Choobie has joined #ruby
altamic has joined #ruby
timonv has joined #ruby
u89 has joined #ruby
jackbrown has joined #ruby
jackbrownhf has quit [Ping timeout: 248 seconds]
cableray has joined #ruby
gyre007 has quit [Remote host closed the connection]
kpshek has joined #ruby
jeffsmykil1 has left #ruby [#ruby]
jimeh has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
workmad3 has joined #ruby
hadees has joined #ruby
jekotia has quit [Read error: Connection reset by peer]
hadees has quit [Remote host closed the connection]
jekotia has joined #ruby
adambeynon has joined #ruby
Shadow_S has quit [Quit: Textual IRC Client: www.textualapp.com]
oatmeal has joined #ruby
vlad_sta_ has joined #ruby
jrist-afk is now known as jrist
vlad_starkov has quit [Ping timeout: 252 seconds]
ltsstar has quit [Quit: ltsstar]
<oatmeal> Is anyone here familiar with upgrading from ruby 1.8.7 to 1.9.3 with regard to Marshalling?
ipalaus has joined #ruby
jackbrown is now known as jackbrownhf
darkc0met has quit [Quit: ZNC - http://znc.in]
jalcine has quit [Quit: Got to /quit!]
KindTwo has quit [Write error: Connection reset by peer]
x82_nicole has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
squidBits has quit [Quit: squidBits]
<foucist> oatmeal: no, but i've heard stuff changes ;)
<oatmeal> Yes sir.
<oatmeal> It's driving me a bit crazy.
<oatmeal> For example in Ruby 1.8.7:
aaronmacy has joined #ruby
<oatmeal> Marshal.dump("hello") # => "\004\b\"\nhello"
<oatmeal> in 1.9.3: Marshal.dump("hello") # => "\x04\bI\"\nhello\x06:\x06ET"
<Spaceghostc2c> Lol.
ipalaus_ has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
hackerdude has quit [Remote host closed the connection]
<Beoran_> Marshal isn't a stable format
<Spaceghostc2c> Sorry, yeah so your marshalled objects will change in output between versions.
alexim has quit [Quit: sleep]
<Beoran_> if you have data in marshal format you'll have to conecrt it in 1.8.3 to something more stable, ike JSON, etc.
<Beoran_> convert
cascalheira has joined #ruby
<oatmeal> Alright, thanks.
sarmiena_ has quit [Quit: sarmiena_]
<Beoran_> arshal is moer a conevience , for say, RPC, but i's not for long term storage
arquebus has quit [Remote host closed the connection]
segv- has quit [Quit: segv-]
dnyy has quit [Remote host closed the connection]
alexim has joined #ruby
bradhe has joined #ruby
<oatmeal> Yea, we were using it to temporarily persist some objects in redis.
ipalaus has quit [Ping timeout: 264 seconds]
<oatmeal> Thank you much.
<ddd> your meat sits around A 3rd Party Alternative
darthdeus has quit [Read error: Connection reset by peer]
darthdeu has joined #ruby
jjbohn has joined #ruby
dnyy has joined #ruby
kpshek has quit []
philomory has quit [Quit: philomory]
staafl has joined #ruby
digitalcakestudi has joined #ruby
altamic has quit [Quit: altamic]
cdt has joined #ruby
tyfighter has joined #ruby
<Beoran_> temporarily persistance is almost a contradiction to me ;)
cdt has quit [Client Quit]
dangerousdave has quit [Ping timeout: 260 seconds]
Spaceboy has joined #ruby
<csmrfx> marshal is good
darkc0met has joined #ruby
<csmrfx> it is relatively fast
jalcine has joined #ruby
atal421 has quit [Ping timeout: 250 seconds]
DaZ has quit [Ping timeout: 260 seconds]
dnyy has quit [Ping timeout: 240 seconds]
<ddd> thik he was more worried about a format less likely to change under him ruby ver to ruby ver than speed (or at least thats how i read the initial issue)
<Spaceghostc2c> Eh.
clj_newb has joined #ruby
<ddd> but i didn't realize (unless the article is speaking falsely) that yaml was that slow.
answer_42 has quit [Read error: Operation timed out]
atal421 has joined #ruby
danneu has joined #ruby
<ddd> then again i've not had to to massive amounts of data serializing either.
fike1 has quit [Quit: Saindo]
u89 has quit [Remote host closed the connection]
kpshek has joined #ruby
mvangala_ has joined #ruby
dawkirst_2 has joined #ruby
dawkirst_ has quit [Ping timeout: 260 seconds]
c0rn has joined #ruby
huoxito has quit [Ping timeout: 240 seconds]
mvangala has quit [Read error: Connection reset by peer]
staafl has quit [Quit: Leaving]
u89 has joined #ruby
kpshek has quit [Client Quit]
_alejandro has quit [Ping timeout: 240 seconds]
h4mz1d has joined #ruby
clj_newb has quit [Ping timeout: 252 seconds]
u89 has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
uebas has joined #ruby
atmosx has joined #ruby
<csmrfx> die spammer!
krawchyk has quit [Remote host closed the connection]
<JDubs_> foucist: I'm trying to write a RPN calculator using ruby lol
<JDubs_> ooops
<eka> wtf
dawkirst_2 has quit [Ping timeout: 264 seconds]
epwhorl has quit [Read error: Connection timed out]
<atmosx> is that top quality porn/
<atmosx> ?
<eka> kick!! ban!!
u89 has joined #ruby
<eka> no op
<eka> :(
Zai00 has joined #ruby
uebas has quit [Killed (idoru (Spam is off topic on freenode.))]
Zai00 has quit [Client Quit]
dawkirst_ has joined #ruby
workmad3 has joined #ruby
codespectator has joined #ruby
philomory has joined #ruby
<hackeron> is there the opposite of File.extname to show the name without the extension? :)
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
haxrbyte has quit [Ping timeout: 240 seconds]
<hackeron> havenn: File.basename("20121210_210321-0.364219114219-2.jpg")
<hackeron> => "20121210_210321-0.364219114219-2.jpg"
<hackeron> extension seems to stay :(
DaZ_ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<hackeron> ah, that seems to do it: File.basename("20121210_210321-0.364219114219-2.jpg", ".*")
dnyy has joined #ruby
<eka> hackeron: nice
hotovson has joined #ruby
darthdeu has quit [Quit: Leaving...]
<hackeron> havenn: thanks :)
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
_axx has quit [Ping timeout: 260 seconds]
mneorr has quit [Remote host closed the connection]
skcin7 has quit [Ping timeout: 252 seconds]
mneorr has joined #ruby
rcvalle has quit [Quit: Leaving]
sarmiena_ has joined #ruby
pewter_tao has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
jackbrownhf has quit [Quit: Sto andando via]
tyfighter has quit [Quit: tyfighter]
DaZ_ is now known as DaZ
KindTwo has joined #ruby
dimka is now known as epta
vivien_ is now known as v0n
clj_newb has joined #ruby
v0n has quit [Quit: Leaving]
nat2610 has quit [Quit: Leaving.]
vd0 has joined #ruby
vd0 has quit [Client Quit]
vd0 has joined #ruby
nwertman has quit [Ping timeout: 250 seconds]
vd0 has quit [Client Quit]
vd0 has joined #ruby
hackerdude has joined #ruby
workmad3 has joined #ruby
bricker_ has joined #ruby
bricker has quit [Read error: Operation timed out]
cascalheira has quit [Quit: Leaving...]
jenrzzz has joined #ruby
foxtrot101 has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
huoxito has joined #ruby
squidBits has joined #ruby
capsule_toy has joined #ruby
nat2610 has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
moshee has quit [Ping timeout: 264 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
mark_locklear has quit [Remote host closed the connection]
Vainoharhainen has quit [Ping timeout: 264 seconds]
Choobie has quit [Quit: End]
Morkel has quit [Quit: Morkel]
elico has quit [Quit: elico]
u89 has quit [Remote host closed the connection]
nwertman has joined #ruby
bitZero__ has quit [Ping timeout: 252 seconds]
foxtrot101 has joined #ruby
epwhorl has joined #ruby
u89 has joined #ruby
u89 has quit [Remote host closed the connection]
cpruitt has joined #ruby
fryguy has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
atmosx has quit [Quit: WeeChat 0.4.0-dev]
lolcathost has quit [Quit: leaving]
bitZero__ has joined #ruby
sailias has quit [Quit: Leaving.]
DaZ has quit [Ping timeout: 248 seconds]
capsule_toy has quit []
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
chimkan_ has quit [Quit: chimkan_]
bigkevmcd has quit [Read error: Operation timed out]
bel3atar has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
king313 has quit [Quit: Saliendo]
_alejandro has joined #ruby
foxtrot101 has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
DaZ has joined #ruby
mmitchell has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
bigkevmcd has joined #ruby
heftig has quit [Quit: leaving]
pothibo has joined #ruby
rakuN has quit [Quit: rakuN]
geekbri has quit [Remote host closed the connection]
sqbell has joined #ruby
adambeynon has quit [Quit: Computer has gone to sleep.]
Neomex has joined #ruby
<JDubs_> what does this error mean: target of repeat operator is not specified: /*|+|-|\// (SyntaxError)
<hoelzro> JDubs_: * is special
<hoelzro> as is +
<eka> JDubs_: that * is the regex repeat operator and needs a target to repeat ... example a* will match 0 or more of a
DaZ has quit [Ping timeout: 264 seconds]
<eka> JDubs_: if you want to match * use \*
<eka> escape it
workmad3 has quit [Read error: Operation timed out]
Neomex has quit [Client Quit]
techie_ has joined #ruby
<JDubs_> i see...
<JDubs_> i really hate regexes :/
<JDubs_> a lot lol
pyr0commie has joined #ruby
<maetthew> JDubs_, you are not alone
berserkr has quit [Read error: Connection reset by peer]
elux has quit [Quit: Bye!]
kpshek has joined #ruby
atal421_ has joined #ruby
Andr0_ has quit [Ping timeout: 252 seconds]
atal421 has quit [Read error: Connection reset by peer]
atal421_ is now known as atal421
dmiller_ has joined #ruby
alx- has joined #ruby
heftig has joined #ruby
DaZ has joined #ruby
bel3atar has left #ruby ["Leaving"]
dmiller has quit [Ping timeout: 248 seconds]
piotr_ has joined #ruby
u89 has joined #ruby
thatguycraig has quit [Quit: Leaving.]
mpd106 has joined #ruby
ddd has quit [Quit: Leaving.]
[Neurotic] has joined #ruby
<JDubs_> maetthew: i get the feeling one could probably study regexes for a living, they are ridiculous lol
d2dchat has quit [Remote host closed the connection]
Goles has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
JarJar has joined #ruby
joffery has quit [Ping timeout: 246 seconds]
ddd has joined #ruby
Synthead has quit [Remote host closed the connection]
mildfate has joined #ruby
tommyvyo has quit [Ping timeout: 244 seconds]
Nisstyre-laptop has joined #ruby
h4mz1d has quit [Ping timeout: 276 seconds]
joshman_ has quit [Ping timeout: 276 seconds]
lolcathost has joined #ruby
joffery has joined #ruby
oatmeal has quit [Quit: Page closed]
atal421 has quit [Quit: atal421]
bradhe has quit [Remote host closed the connection]
nat2610 has quit [Quit: Leaving.]
<JDubs_> yay!!!! I finish my RPN calculator!! W00t w00t
bricker has joined #ruby
* JDubs_ dances!!
* JDubs_ pops open a bottle of bubbly!
<JDubs_> Anyone want a drink?
* JDubs_ pours a glass.
DaZ has quit [Ping timeout: 255 seconds]
dnyy has quit [Remote host closed the connection]
bricker_ has quit [Ping timeout: 244 seconds]
tjbiddle_ has joined #ruby
<JDubs_> You guys are boring
<JDubs_> :(
TitaniumStudioUs has quit [Quit: This computer has gone to sleep]
GoGoGarrett has quit [Remote host closed the connection]
joffery has quit [Ping timeout: 260 seconds]
<foucist> heh
tjbiddle__ has joined #ruby
<foucist> must be a monday
<JDubs_> yep lol
tjbiddle has quit [Ping timeout: 264 seconds]
tjbiddle__ is now known as tjbiddle
nat2610 has joined #ruby
emmanuelux has quit [Ping timeout: 241 seconds]
<foucist> JDubs_: i recommend you tackle regexp head on and learn at least some of it.. it's hugely useful
<foucist> JDubs_: and i use it in my editor all the time for search and replace
<foucist> saves a lot of time
<JDubs_> how do you use it for replace?
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<JDubs_> only replace method i know is gsub
igro has joined #ruby
Solnse has joined #ruby
<pewter_tao> how is this syntax checker intended to be used? http://www.dan-manges.com/blog/ruby-syntax-checker-using-open3
pothibo has quit [Quit: pothibo]
<JDubs_> foucist: ?
tjbiddle_ has quit [Ping timeout: 260 seconds]
<foucist> JDubs_: i mean in an editor though.. i use vim, so it looks like :s/<regexp>/what i want to place with/g
joffery has joined #ruby
<foucist> g for global replace for the entire file (or whatever i selected)
<JDubs_> oh wow that's awesome
pettsson has quit [Remote host closed the connection]
<JDubs_> what is the :s part for
<foucist> JDubs_: you can also do stuff like: sed -i 's/blah/foo/g' * (replace whatever in all the files in the current directory)
<gbchaosmaster> JDubs_: s is the Vim command for regex substitute.
mengu has joined #ruby
<gbchaosmaster> JDubs_: You lead commands in Vim with :.
<foucist> if you're in linux, mac osx/bsd doesn't have the -i command, you have to install gsed on a mac
Jasko has joined #ruby
_nitti has quit [Remote host closed the connection]
pyr0commie has quit [Remote host closed the connection]
<foucist> pewter_tao: he's propbably piping the file or output from something else through that script to check the syntax
<foucist> pewter_tao: like from an editor
<foucist> and get a warning back
Jasko2 has quit [Ping timeout: 260 seconds]
<gbchaosmaster> foucist, JDubs_: Or, if you want that to recurse, find . -type f -exec sed -i 's/foo/bar/g' {} \;
<foucist> pewter_tao: i mean whatever ruby code he wants to check, just pipes it through that script that checks the stdin/stdout or whatever
<foucist> s/checks/reads from
<foucist> gbchaosmaster: yup i do that too
h4mz1d has joined #ruby
<pewter_tao> foucist: I'm trying to do that recursively, basically ruby -c with some extra checks
<pewter_tao> foucist: I'm trying to do it in ruby, though
reppard has joined #ruby
epwhorl has quit [Ping timeout: 260 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
<foucist> pewter_tao: ah, like Dir["**"].each or something ?
<pewter_tao> don't know, new to ruby
<pewter_tao> foucist: But that looks good, ** for recursion, now how do I pass Dir["**"].each into the syntax checker (ruby -c)?
ddd has quit [Ping timeout: 245 seconds]
beilabs_ has quit [Ping timeout: 276 seconds]
phantasm66 has quit [Quit: *sleeeep….]
hamfz_ has joined #ruby
<foucist> oh i see
<foucist> he's basically doing a system call
<foucist> kind of like `ruby -c`
emmanuelux has joined #ruby
DaniG2k has joined #ruby
tommyvyo has joined #ruby
beilabs_ has joined #ruby
<eka> pewter_tao: something like Dir['**/*.rb'].each {|fname| `ruby -c #{fname}`}
<foucist> ^
h4mz1d has quit [Ping timeout: 265 seconds]
DaniG2k has left #ruby [#ruby]
hoelzro is now known as hoelzro|away
carlyle has quit [Remote host closed the connection]
codezombie has quit [Read error: Connection reset by peer]
mike has joined #ruby
mike has quit [Client Quit]
DaZ has joined #ruby
timonv has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
pothibo has joined #ruby
alx- has quit [Quit: alx-]
<pewter_tao> eka: you can write that ("ruby") in a ruby script?
<eka> pewter_tao: it's pure ruby
statarb3 has quit [Ping timeout: 252 seconds]
lolcathost has quit [Ping timeout: 264 seconds]
<reppard> .
Goles has quit [Ping timeout: 252 seconds]
<eka> pewter_tao: whatever is between `...` is a system call
bradhe has joined #ruby
<pewter_tao> ok I need to put a test inbetween those now
<eka> pewter_tao: this is better Dir['**/*.rb'].each {|fname| puts `ruby -c #{fname}` }
<pewter_tao> I'm going to test for the like #!/usr/bin/ruby in everyfile before I run the syntax check
KRF has quit [Ping timeout: 255 seconds]
<eka> pewter_tao: will print the result of the command...
statarb3 has joined #ruby
<pewter_tao> because it will break on non-ruby files
h4mz1d has joined #ruby
bwlang has left #ruby [#ruby]
<eka> pewter_tao: my case is filtering only for .rb
hamfz_ has quit [Read error: Connection reset by peer]
<eka> pewter_tao: see the *.rb in there?
reppard_ has joined #ruby
<pewter_tao> yes, that's great, I'd like to check for the #! line too
<pewter_tao> some files have .rb some have #!
<eka> pewter_tao: most .rb don't have
<eka> pewter_tao: but maybe yours do
<pewter_tao> indeed, so I'm basically testing for either #! line or .rb extension
obryan has quit [Ping timeout: 240 seconds]
<pewter_tao> eka: should I user get_line_from_file to check for the #! line?
<eka> pewter_tao: mmm I think that's too much... but ok
Goles has joined #ruby
<heftig> you could also fork and load instead of executing ruby
reppard has quit [Ping timeout: 244 seconds]
<heftig> ah, syntax checking, not loading
<heftig> never mind
<eka> pewter_tao: open(myfilenamehere).readlines[0] will give you first line
artm has quit [Quit: artm]
<pewter_tao> that does look better than trying to get line from file using the path (which is changing because I'm using Dir[**]
h4mz1d has quit [Read error: Connection reset by peer]
ddd has joined #ruby
lampe2 has quit [Quit: Leaving.]
h4mz1d has joined #ruby
S2kx has joined #ruby
<pewter_tao> eka: I guess I should match that line with regex #!/*/ruby
<eka> pewter_tao: I think this will do Dir['**/*.rb'].select {|fname| /^#!\/.*\/ruby/.match(open(fname).readlines[0])}
squidBits has quit [Quit: squidBits]
S1kx has quit [Ping timeout: 264 seconds]
<eka> pewter_tao: that will collect all .rb files that have the shebang
<pewter_tao> that's the intersect I think
<eka> pewter_tao: maybe Dir['**/*'].select {|fname| /^#!\/.*\/ruby/.match(open(fname).readlines[0])}
<eka> there
<pewter_tao> I'll change it so it's the union, shebang or .rb
havenn has quit [Remote host closed the connection]
<eka> pewter_tao: any file with any extension that has the shebang
<eka> pewter_tao: that will make a list... then you check
madhadron has quit [Quit: Leaving.]
<pewter_tao> I can just put {|fname| puts `ruby -c #{fname}` } ?
<JDubs_> good night all !! o/
<eka> pewter_tao: Dir['**/*'].select {|fname| /^#!\/.*\/ruby/.match(open(fname).readlines[0])}.each {|f| `ruby -c #{f}`}
JDubs_ has quit [Quit: JDubs_]
<eka> pewter_tao: Dir['**/*'].select {|fname| /^#!\/.*\/ruby/.match(open(fname).readlines[0])}.each {|f| puts `ruby -c #{f}`} ### puts added
senj has joined #ruby
k610 has joined #ruby
<eka> pewter_tao: doesn't look very readable in 1 line
<eka> :P
<pewter_tao> one step by step!
SeanTAllen has quit [Quit: Connection closed for inactivity]
<pewter_tao> Thanks for that
<pewter_tao> I see how you added the pieces though
<eka> pewter_tao: careful that the version without .rb will bring you folders also
<eka> pewter_tao: so you will have to check for a file
BigO has quit [Remote host closed the connection]
<pewter_tao> why? it should only give me files that start with #!*ruby
<eka> pewter_tao: the Dir will list anything
Nimsical has quit [Quit: Computer has gone to sleep.]
<pewter_tao> then we match, and then we check, right?
hsbt is now known as hsbt_away
AlbireoX has joined #ruby
jenrzzz has joined #ruby
luckyruby has joined #ruby
nari has joined #ruby
reppard_ has quit [Ping timeout: 265 seconds]
alanp_ has quit [Read error: Connection reset by peer]
jimeh has joined #ruby
atal421 has joined #ruby
<eka> pewter_tao: Dir['**/*'].select {|fname| !File.directory? fname}.select { |f| /^#!\/.*\/ruby/.match(open(f).readlines[0]) }.select{ |f| puts `ruby -c #{f}`}
<eka> there
alanp has joined #ruby
bradleyprice has quit [Remote host closed the connection]
clj_newb has quit [Ping timeout: 260 seconds]
<eka> pewter_tao: see... 1st we check is not a dir... then that has the shebang... and if so we do syntax check
<pewter_tao> hmm
blacktulip has quit [Remote host closed the connection]
<pewter_tao> gonna go test for a while
<pewter_tao> It looks good though
<eka> pewter_tao: still I would recommed just checking the .rb... no need for shebang
Averna1 has joined #ruby
<eka> pewter_tao: or you have rb scripts without extension?
<pewter_tao> I found some scripts that have no rb and do have the shebang
undecim has joined #ruby
<pewter_tao> so I wanted to check for either (union), and then only run ruby -c on those
<eka> pewter_tao: ok so that will only work for shebangs...
ner0x has quit [Quit: Leaving]
<eka> let me see
jrajav has joined #ruby
JarJar has quit [Read error: Connection reset by peer]
<csmrfx> you make a single select
<csmrfx> look guys
JarJar has joined #ruby
Adget has quit [Quit: Adget]
<csmrfx> that tests for either .rb or the crunchbank, and finally does the ruby syntax check, and returns true if ok
Gadgetoid has quit [Read error: Operation timed out]
dreinull has quit [Remote host closed the connection]
<eka> pewter_tao: here
Gadgetoid has joined #ruby
<eka> pewter_tao: Dir['**/*'].select {|fname| !File.directory? fname}.select { |f| /^#!\/.*\/ruby/.match(open(f).readlines[0]) || File.extname(f) == '.rb'}.select{ |f| puts `ruby -c #{f}`}
<eka> pewter_tao: that will check both :)
jenrzzz has quit [Ping timeout: 255 seconds]
includex has joined #ruby
<pewter_tao> oh my
<eka> done... but looks ugly lol
<pewter_tao> eka, don't you think that would be useful natively in ruby -c cli option?
<eka> pewter_tao: no
jharris1 has quit [Quit: WeeChat 0.3.8]
<pewter_tao> Anyway, it turns out to be useful for my situation
<eka> pewter_tao: maybe a tool
L1 has quit [Remote host closed the connection]
stopbit has quit [Quit: Leaving]
greenarrow has quit [Read error: Operation timed out]
<pewter_tao> eka, the way you think is helpful to learning ruby
includex has quit [Client Quit]
<pewter_tao> eka, any recommendations for a one week quickstart?
<pewter_tao> to get me going/flueny
<pewter_tao> t
greenarrow has joined #ruby
<eka> pewter_tao: for ruby? tryruby.org (free) and the pickaxe book http://pragprog.com/book/ruby3/programming-ruby-1-9
willob has quit [Quit: Leaving.]
binaryplease has joined #ruby
xcvd`` has quit [Read error: Connection reset by peer]
binaryplease has quit [Client Quit]
clj_newb has joined #ruby
<pewter_tao> great, I'll do that
nomenkun has quit [Remote host closed the connection]
<silverslab> Is there a Ruby nesting issue with HTTP not working if deeply nested many blocks deep.
bigmcq77 has quit [Quit: Textual IRC Client: www.textualapp.com]
nomenkun has joined #ruby
<eka> silverslab: is there?
<csmrfx> single select with: |fn| rubyfile = ((fn.match(".rb") or popen(fn).readline.match("#!/ruby")) ? true : false); rubyfile && 'ruby -c #{fn}' == 'Syntax OK' ? true : false;
<csmrfx> that is all
<eka> pewter_tao: ^^
Michae___ has joined #ruby
<csmrfx> (returns array of ruby files that pass the syntax test)
<csmrfx> One closing paren too much before the first ? there
KRF has joined #ruby
vlad_sta_ has quit [Read error: Connection reset by peer]
<eka> csmrfx: doesn't work for me... how you ...?
<silverslab> eka: I'm seeing an issue on 1.8.7 where if I do a network request outside of a function call, it works. If I do it inside of one, it doesn't.
<eka> csmrfx: tried it in pry
vlad_starkov has joined #ruby
<silverslab> It's driving me nuts trying to find.
<pewter_tao> csmrfx: yeah didn't work... just starts with "|fn|...|
<csmrfx> perhaps best to take the file opening + first line reading onto it's own line
AlbireoX has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 252 seconds]
<csmrfx> note: you're supposed to put that inside a select block
<eka> csmrfx: did it worked for you?
kpshek has quit []
AlbireoX has joined #ruby
philcrissman has quit [Remote host closed the connection]
<csmrfx> note2: it's just off the top of my head, but should be valid, give and take (, ) or two
pyr0commie has joined #ruby
lolcathost has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
ryanf has joined #ruby
<csmrfx> hm, guess one doesn't need the first ternary at all
jrajav has quit [Quit: I tend to be neutral about apples]
<eka> csmrfx: doesnt work though
<csmrfx> lets try a little irbing
ffranz has quit [Quit: Leaving]
havenn has joined #ruby
<csmrfx> Dir["*"].select{ |fn| fn.match(".rb");}
<csmrfx> => ["suxslt-ruby_xslt_dsl.rb", "wallpaper-switcher.rb~", "tmp.rb", "wallpaper-switcher.rb", "logic.rb"]
jgarvey has quit [Quit: Leaving]
binaryplease has joined #ruby
clj_newb has quit [Ping timeout: 265 seconds]
g_bleezy has joined #ruby
adamnbowen has quit [Quit: Textual IRC Client: www.textualapp.com]
AlbireoX has quit [Ping timeout: 260 seconds]
thinkclay has joined #ruby
dmiller_ has quit [Remote host closed the connection]
Solnse has quit [Ping timeout: 252 seconds]
g_bleezy has quit [Read error: Operation timed out]
lolcathost has quit [Ping timeout: 250 seconds]
Axsuul has joined #ruby
jobicoppola has joined #ruby
<csmrfx> the shortest file-first-line-opener I came up with just now:
<csmrfx> has_bang = File.open('logic.rb') {|f| f.readline.match("#init").length > 0 }
<csmrfx> (also tests for match)
devdazed has quit [Ping timeout: 260 seconds]
arya_ has joined #ruby
punkrawkR^Home has quit [Read error: Connection reset by peer]
shtirlic has quit [Read error: Connection reset by peer]
piotr_ has quit [Ping timeout: 264 seconds]
generalissimo has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
generalissimo has joined #ruby
fumduq has joined #ruby
devdazed has joined #ruby
<heftig> csmrfx: if it doesn't match, that's gonna blow up
<pewter_tao> csmrfx: that thing end up working that prints out the files in an array?
<heftig> missing method "length" on nil
<csmrfx> true
<csmrfx> might as well test if its an MatchData
arya_ has quit [Client Quit]
<csmrfx> or test if it's not a nil
<csmrfx> what have you
<heftig> just do !!f.readline[/#init/]
<heftig> or omit !! if you don't care about boolean-ness
<csmrfx> weyyy
mpd106 has quit [Remote host closed the connection]
<csmrfx> is there a shorthand for is_bool_var = is_bool_var or other_bool
<heftig> what
beiter has quit [Quit: beiter]
DanBoy is now known as Danboy___
<wildcard0> csmrfx: is_bool_var ||= other_bool ?
AndChat209684 has joined #ruby
DanBoy has joined #ruby
<heftig> don't confuse "or" and "||"
<heftig> what wildcard0 said is probably what you want
buscapepe has joined #ruby
<wildcard0> ya or has a lower order of precedence, right?
<wildcard0> i think i got bit by that at some point
dmiller has joined #ruby
Edward_ has joined #ruby
<Eiam> wouldn't either work in that case?
emanu has joined #ruby
naner has joined #ruby
AndChat209684 has left #ruby [#ruby]
lolcathost has joined #ruby
<csmrfx> Dir["*"].select{ |fn| is_ruby_bool = File.open(fn) {|f| !!f.readline/#!regex-here/; }; is_ruby_bool ||= fn[/.rb/]; is_ruby_bool && ruby -c #{fn}' == "Syntax OK" }
<csmrfx> or something like that
<Eiam> oh I don't even want to try and parse that
<csmrfx> * may need to be ** for descent into subdirs
carlyle has joined #ruby
joeycarmello has quit [Remote host closed the connection]
<csmrfx> and, backticks are incorrect around ruby -c #{fn}
miso1337 has joined #ruby
<wildcard0> is the ** operator *(*foo) ?
CaptainJet has joined #ruby
<wildcard0> or is this one i dont know?
<wildcard0> oh duh
<wildcard0> nevermind, it was "**"
<wildcard0> i was thinking splat
<csmrfx> thats for bash glob
SCommette has quit [Quit: SCommette]
Danboy___ has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 264 seconds]
<undecim> "gem install therubyracer" fails with "context.cc: In static member function ‘static VALUE rr::Context::SetData(VALUE, VALUE)’:"
joffery has quit [Ping timeout: 245 seconds]
<undecim> What's going on here?
<wildcard0> all kinds of shenanigans
jjang has joined #ruby
_alejandro has quit [Remote host closed the connection]
joffery has joined #ruby
nateberkopec has quit [Quit: Leaving...]
joeycarmello has joined #ruby
jjbohn has quit [Quit: Leaving...]
generalissimo has quit [Remote host closed the connection]
volty has joined #ruby
havenn_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Michae___ has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
naner has left #ruby [#ruby]
vlad_starkov has joined #ruby
<pewter_tao> eka: got a smart way to make it say which
adeponte has quit [Remote host closed the connection]
<pewter_tao> "syntax ok" is for which file
havenn_ has quit [Remote host closed the connection]
techhelp has quit [Quit: This computer has gone to sleep]
joffery has quit [Read error: Operation timed out]
havenn_ has joined #ruby
havenn has quit [Ping timeout: 265 seconds]
zeen has quit [Ping timeout: 244 seconds]
joffery has joined #ruby
reppard has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
vasile has quit [Ping timeout: 250 seconds]
k610 has quit [Ping timeout: 264 seconds]
nemesit has quit [Quit: Leaving...]
Michael__ has joined #ruby
xclite has quit [Remote host closed the connection]
Michael__ has quit [Remote host closed the connection]
ikaros has quit [Quit: Ex-Chat]
hotovson has quit [Remote host closed the connection]
Russell^^ has quit [Quit: Russell^^]
execute has joined #ruby
burlesona has quit [Read error: Connection reset by peer]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
Michael__ has joined #ruby
dmiller has quit [Remote host closed the connection]
dankest is now known as dankest|away
buscapepe has quit [Ping timeout: 265 seconds]
dnyy has joined #ruby
hotovson has joined #ruby
execute_ has joined #ruby
execute_ is now known as _exe
_exe is now known as _axx
buscapepe has joined #ruby
scooter has quit [Remote host closed the connection]
buscapepe has quit [Remote host closed the connection]
buscapepe has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
mrsolo has quit [Quit: Leaving]
rellin has joined #ruby
epwhorl has joined #ruby