apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
<btully> just spent $100 on the railstutorial, and can't even get ruby working
panpainter has quit [Quit: panpainter]
<btully> maybe it's my mac?
<jlogsdon> Plas: i just saw this, http://ruby.bastardsbook.com/ its still a WIP, but it might be a good resource
ConstantineXVI has joined #ruby
<offby1> So ... classes are open, which means I could do "def Hash.get(key) ... interesting code ... end". But what if someone other code that I don't know about has already defined a method in Hash named 'get'?
<offby1> s/someone/some/
<otters> then you clobber their code
Nicke\ has quit [Read error: Connection reset by peer]
<offby1> ugh
<offby1> is this not a problem in practice?
<delinquentme> umm when I create and store an instance of a class
<otters> well, most people don't define methods on core classes
<delinquentme> that object is an instance .. but is it more correct to refer to it as an element ... once its created?
<delinquentme> created = saved *
<offby1> otters: when is it reasonable to do that, though? Or isn't it ever?
<otters> it isn't really
<offby1> hmm
<otters> except in personal code
nej has quit [Quit: Leaving...]
<digitalcakestudi> whats a better alternative to redmine if I want a ruby build project management app?
vitoravelino`afk is now known as vitoravelino
btully has left #ruby [#ruby]
<digitalcakestudi> built*
<jlogsdon> offby1: yeah, steer clear of monkey-patching core classes unless you *have* to
carloshpf has quit [Ping timeout: 265 seconds]
chimkan has quit [Quit: chimkan]
<jlogsdon> It's generally better to extend the base class and make your changes there
amalvagomes has quit [Quit: amalvagomes]
ephemerian has quit [Quit: Leaving.]
<offby1> jlogsdon: I was wondering if I could get a literal like {:one=>1} to turn into a class with my extra methods. Is there a way to tell the reader that hash literals should create objects of type MyNiftyHash, instead of Hash?
<jlogsdon> nope
<offby1> pfui
<jlogsdon> In that case it could be reasonable to monkey-patch in Hash#to_my_nifty_hash
<offby1> yeah
ZachBeta has joined #ruby
<jlogsdon> https://github.com/jlogsdon/purple_hash i do that here (optionally)
<offby1> purple hash! All round my brain.
<jlogsdon> you require core_ext/hash/purple_hash.rb and it adds the method
<jlogsdon> hehe
<jlogsdon> i was strugling for a name, all the good ones are taken. I wanted autoconf :(
<offby1> "autovivify" is what I'd call it, since that's the perl term for that behavior
<jlogsdon> Oh?
<jlogsdon> i might do that
<offby1> yep
<jlogsdon> hot
<offby1> once you do you'll probably stumble on the five other similar classes :)
<jlogsdon> probably, ha!
<jlogsdon> i didn't know there was a name fot that
<jlogsdon> even a wiki page!
<offby1> (I don't _know_ that there are five, but I wouldn't be surprised; it's a handy perl feature and I bet you're not the first Rubyer to want it)
Plas has quit []
thecreators has quit [Ping timeout: 256 seconds]
nari has quit [Ping timeout: 244 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
<offby1> so in other news ... is there something that "validates" a data structure against a "schema", roughly the way a DTD can validate XML? Specifically, I've written a frighteningly-complex "config file" for a human to create, in order to control a program, and I worry that it'll be easy for the user to make little errors in that file, which my code will only "notice" when it's too late to report the error conveniently.
dnyy has quit [Remote host closed the connection]
christianrojas has quit [Quit: Leaving...]
<jlogsdon> Well, doing autovivify in ruby is dead simple (Hash.new { |h,k| self[k] = Hash.new(&h.default_proc) })
<offby1> If the config file were XML, I could write a DTD and validate it that way (although I'm not certain that XML will let me do _all_ the validation I want), but ... I kinda hate XML, and I doubt my customer would be thrilled to have to write it by hand
<jlogsdon> but purple_hash is more for configs, lets you lock and does key normalization
<jlogsdon> mmm not that I'm aware of.
zeromodulus has quit [Remote host closed the connection]
<offby1> bumm-air
dv310p3r has joined #ruby
<offby1> (that's French for "bummer" btw)
<jlogsdon> heh
<jlogsdon> what'd I'd do ise just have a config class with defaults, if the default can't realistically be set (like a password or wahtever) make it a proc that raises a warning when called
ZachBeta has quit [Ping timeout: 265 seconds]
<jlogsdon> so like with PurpleHash you'd do config = PurpleHash.new(password: lambda { warn "You must specifiy a password" }); config.merge({}); config[:password] # => warn is done
<jlogsdon> or something along those lines
<jlogsdon> but that could probably get unwieldy quickly for complex configs
heisenmink has quit [Ping timeout: 248 seconds]
ZachBeta has joined #ruby
dankest has quit [Quit: Linkinus - http://linkinus.com]
elake has joined #ruby
jamesaxl has joined #ruby
stephenjudkins has joined #ruby
davidpk has joined #ruby
josefig has quit [Ping timeout: 252 seconds]
Targen has quit [Ping timeout: 252 seconds]
etank has quit [Ping timeout: 272 seconds]
fukushima has quit [Quit: Leaving...]
showy has quit [Ping timeout: 255 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
<BrokenCog> hello... anyone running an AMD FX-8150 by chance? And even better, mounted on an ASUS Crosshair V ??? Does it work ? further than BIOS?
liluo has quit [Remote host closed the connection]
elliomax has joined #ruby
thecreators has joined #ruby
<elliomax> does anyone know how to fix a multiple gsub! on a variable returning nil?
<offby1> elliomax: not offhand. But if you can paste your code, and if it's pretty simple, I might be able to tell what's happening
thecreators has quit [Ping timeout: 240 seconds]
<elliomax> offby1: if I have a situation like this \
L-----D has joined #ruby
<elliomax> offby1: if I have a situation like this x.gsub!(/foo/,"") \n x.gsub!(/bill/,""), x is now nil for some reason ruby 1.8.7
<offby1> lemme see what I see
<offby1> does it matter what x starts out as?
<elliomax> nope
<offby1> worked for me on 1.8.7: https://gist.github.com/2715201
<offby1> that displayed "whatever"
<elliomax> let me try here
<krz> {'a' => 2, 'b' => 4, 'c' => 8} how do i sum up the values?
cs[tc] has quit [Ping timeout: 255 seconds]
carloshpf has joined #ruby
kenperkins has quit [Ping timeout: 240 seconds]
<elliomax> Hmm on irb I get no issues but when I have concurrent gsub! in my application I get nil errors
kah_ has joined #ruby
<krz> anyone?
<elliomax> like two back to back
kah_ has quit [Client Quit]
luckyruby has quit [Remote host closed the connection]
<offby1> krz: {'a' => 2, 'b' => 4, 'c' => 8}.values.inject (0) {|acc,elt| acc + elt}
<elliomax> {'a' => 2, 'b' => 4, 'c' => 8}.inject(0){|sum,e| sum += e.value }
<offby1> there might be a cleaner way, but I'm a ruby newby ...
<elliomax> beat me!
<offby1> barely
<elliomax> photo finish
<offby1> I don't think you want += there, but it might not hurt
<offby1> didn't know you could omit the "values" ...
<elliomax> hell i winged it
<offby1> man "inject" is a weird name for that operation. I'm used to it being called "reduce".
<elliomax> {'a' => 2, 'b' => 4, 'c' => 8}.values.compact:+
<elliomax> I think that will work also
<elliomax> the multi gsub! issue is so annoying
<elliomax> it shows up every once an awhile
zeromodulus has joined #ruby
cjs226 has joined #ruby
StoSun has quit []
<offby1> it's _random_?! That's ... horrible
_blackbird has joined #ruby
<_blackbird> Good evening all...
looopy has joined #ruby
fbernier has joined #ruby
toddw has quit [Remote host closed the connection]
<_blackbird> I have a qick question about the Ruby Koans
jchauncey has joined #ruby
kojul has joined #ruby
jchauncey has quit [Client Quit]
<_blackbird> In the AboutNil section there is a quick "Think About It" section looking at which is better. obj.nil? or obj == nil.
<offby1> {'a' => 2, 'b' => 4, 'c' => 8}.values.reduce(:+) works too
ten00 has joined #ruby
<offby1> _blackbird: lemme see if I wrote any notes on that one
<offby1> I don't think so ...
kojul has quit [Client Quit]
ten00 has left #ruby [#ruby]
iocor has quit [Quit: Computer has gone to sleep.]
<offby1> I don't know what the right answer is, or if there even is one. But I'd use obj.nil? for this reason: if I type ``obj == nil'', and accidentally omit one of the ``='', then I'm in a world of hurt
kenichi has quit [Remote host closed the connection]
kojul has joined #ruby
<offby1> ... which is located north of Ruisseau du Merde, and I hear there's a paddle shortage
kylemcgi_ has joined #ruby
<_blackbird> I think its more than that… since obj == nil is doing a full comparison of the two objects [since nil is an object]. If obj is an object of something other than nil, it will return false. Where if the object is empty, obj.nil? would return true.
<_blackbird> Or am I way off?
<offby1> dunno -- I didn't understand you :)
maletor has quit [Quit: Computer has gone to sleep.]
<elliomax> wait isnt === full compare?
<_blackbird> that I don't know
<elliomax> pretty sure it is
* offby1 thinks in terms of eq?, equal?, and eqv?. Guess which language he's most used to
L-----D has quit [Quit: Leaving]
kylemcgill has quit [Ping timeout: 252 seconds]
Solnse has joined #ruby
<offby1> time's up
liluo has joined #ruby
Jamoka has quit [Read error: Connection reset by peer]
<_blackbird> Ah I got it
<_blackbird> ==, equal? and sql? test if the objects are of the same object type
`damien has joined #ruby
<_blackbird> only the object nil responds to nil?
sohocoke has quit [Quit: sohocoke]
fbernier has quit [Ping timeout: 272 seconds]
yugui_zzz is now known as yugui
adamkitt_ has joined #ruby
mikepack has quit [Remote host closed the connection]
adamkittelson has quit [Ping timeout: 260 seconds]
<offby1> I would hope so.
dukio has joined #ruby
<dukio> is there any reason basic things like .ord and .to_a don't work in the tryruby.org repl?
Hanmac has quit [Ping timeout: 240 seconds]
<offby1> couldn't tell ya
berserkr has quit [Quit: Leaving.]
<heftig> claims to be 1.9.2 but doesn't accept '{ foo: 3 }'
<banisterfiend> dukio: what error do u get
<heftig> JRUBY_VERSION is 1.6.3
<heftig> NoMethodError for "a".ord
<dukio> yes, that
<heftig> i think they just need to update their JRuby
closedbook has joined #ruby
<elliomax> is roo fully working in 1.9.3?
sepp2k1 has quit [Read error: Connection reset by peer]
<heftig> undefined method `method' for main:Object
<heftig> this is one crippled Ruby
<offby1> I assume the intent is to get beginners to experiment with the basics.
CheeToS has joined #ruby
fbernier has joined #ruby
<closedbook> I have a long string that I'd like to access later on in the program. normally I'd assign a variable to it and be done with it, but this string has some variables I need to interpolate in the middle. Is creating a method and passing the variables I want to interpolate the right approach?
<banisterfiend> elliomax: wtf is roo
eka has quit [Remote host closed the connection]
delinquentme_ has joined #ruby
<offby1> closedbook: interesting question. Dunno. I'll play with that
<banisterfiend> closedbook: maybe a proc
<banisterfiend> closedbook: proc { |x, y| "hello #{x} baby how are you, #{y} ?" }
niklasb has joined #ruby
<banisterfiend> then just: my_proc.call("sandy", "pig")
bgupta has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
<closedbook> for example: def my_string(foo, bar, baz) ; " a really #{foo, baz} long string #{ bar } " ; end
ConstantineXVI has quit [Remote host closed the connection]
<banisterfiend> yeah, in second thoughts, a method is probably a better approch
cads has joined #ruby
<closedbook> oh ok, I'll take a look at procs
<banisterfiend> nah just use a metho
<banisterfiend> method
* offby1 looks askance at banisterfiend
<offby1> you're stalking me. I always knew you would
ymasory has joined #ruby
<banisterfiend> offby1: hehe i've been a regular on #ruby for about 4 years ;)
<offby1> I must confess I am a bit uneasy about this "everything is a method" deal
<banisterfiend> offby1: long before ruby was even a winkle in your cynical asian eyes
<offby1> If I do ``require 'pp' ; pp "Hi there"'', assuming that pp is indeed a method -- what object is it a method of?
<closedbook> banisterfiend: thanks, it just felt weird using a method for each long string
<offby1> .oO("asian"?)
<banisterfiend> closedbook: well, you could use procs if u want, then you'd have to store each proc in an ivar
delinquentme has quit [Ping timeout: 272 seconds]
uris has joined #ruby
<offby1> eww, he said "u"
kenperkins has joined #ruby
<closedbook> banisterfiend: sorry, ivar?
voodoofish430 has quit [Quit: Leaving.]
<banisterfiend> offby1: ima about to bet yo candy ass
bgupta has quit [Read error: Connection refused]
jayrulez has joined #ruby
Solnse has quit [Read error: No route to host]
Hanmac has joined #ruby
davidcelis has quit [Quit: K-Lined]
RegEchse has quit [Quit: <3 WeeChat (v0.3.8-dev)]
bgupta_ has joined #ruby
cjs226 has quit []
<banisterfiend> closedbook: instance variable
<banisterfiend> offby1: everything is not a method, where did u hear that? ;)
<closedbook> banisterfiend: duh, thanks :-)
daed is now known as daedablo
<banisterfiend> offby1: oh 'pp' is a method on Kernel
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
bgupta_ is now known as bgupta
<banisterfiend> offby1: let me give u a link
<banisterfiend> that may explain some stuff
Sgeo has quit [Read error: Connection reset by peer]
<offby1> tx
<offby1> "what is this thing called ruby"
sbanwart has quit [Ping timeout: 252 seconds]
`damien has quit [Quit: `damien]
sohocoke has joined #ruby
CheeToS has quit [Ping timeout: 244 seconds]
<offby1> banisterfiend: that was more or less mind-blowing.
<offby1> Over in #racket, they have a saying: "The top-level is hopeless".
<banisterfiend> hehe
jamesaxl has quit [Quit: Leaving]
bgupta has quit [Remote host closed the connection]
<_blackbird> Ive got a silly question about arrays.
<banisterfiend> offby1: top-level in ruby is pretty useful, and pretty interesting
dbgster has joined #ruby
ConstantineXVI has joined #ruby
<_blackbird> with an array like array = [:peanut, :butter, :and, :jelly] , why is array[4,0] == [] and array[5,0] == nil
<fowl> that's [index, length]
bgupta has joined #ruby
zeromodu_ has joined #ruby
<_blackbird> but as 4 is already outside of the index why does array[4,0] return [] but array[5,0] return nil
<banisterfiend> _blackbird: this question literally gets asked 10 times a month
zeromodu_ is now known as zeromodulus_
<_blackbird> haha, damn koans! ;)
L-----D has joined #ruby
<banisterfiend> _blackbird: haha, ok that's a fair explanation :)
<_blackbird> banisterfiend: sorry to not rftm
<_blackbird> banisterfiend: wow… rtfm
minijupe has quit [Quit: minijupe]
Sgeo has joined #ruby
<banisterfiend> _blackbird: no problem, i had no idea it was a ruby koan, so that makes sense
cads has quit [Ping timeout: 272 seconds]
Solnse has joined #ruby
zeromodulus has quit [Ping timeout: 252 seconds]
eywu has quit [Quit: Leaving.]
vitoravelino is now known as vitoravelino`afk
emmanuel__ has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
oskarth has quit [Read error: Connection reset by peer]
<offby1> never occurred to me to ask, but I confess: I too find that bizarre
uris has quit [Quit: leaving]
LBRapid has joined #ruby
strnx has quit [Excess Flood]
snip_it has joined #ruby
mattp_ has quit [Read error: Connection reset by peer]
mattp_ has joined #ruby
snip_it has quit [Client Quit]
c0rn has quit [Quit: Computer has gone to sleep.]
strnx has joined #ruby
joukokar has quit [Ping timeout: 250 seconds]
<banisterfiend> good poitn about C, hehe ;)
<banisterfiend> "C doesn't have strings", strnage but true :)
khakimov has joined #ruby
sohocoke has quit [Quit: sohocoke]
elliomax has quit [Quit: Leaving]
ZachBeta has quit [Quit: Computer has gone to sleep.]
stephenjudkins has quit [Quit: stephenjudkins]
Soul_Est has joined #ruby
closedbook has left #ruby [#ruby]
Icehawk78 has quit [Ping timeout: 248 seconds]
davidcelis has joined #ruby
Targen has joined #ruby
stephenjudkins has joined #ruby
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby
savage- has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
fbernier has quit [Remote host closed the connection]
nej has joined #ruby
kevinbond has quit [Quit: kevinbond]
Icehawk78 has joined #ruby
kylemcgi_ has quit [Remote host closed the connection]
kylemcgill has joined #ruby
ctp_ has quit [Quit: Leaving...]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
cs[tc] has joined #ruby
cs[tc] has quit [Client Quit]
Icehawk78 has quit [Ping timeout: 252 seconds]
TorpedoSkyline has quit [Quit: Leaving]
mpereira_ has quit [Ping timeout: 244 seconds]
ryanf has quit [Ping timeout: 252 seconds]
mpereira_ has joined #ruby
Icehawk78 has joined #ruby
bambanx has joined #ruby
<bambanx> guys how i can uninstall a gem?
toddw has joined #ruby
<toddw> anyone here have experience with wukong?
stephenjudkins has quit [Quit: stephenjudkins]
<bambanx> how i can uninstall a gem guys pls
krusty_ar has quit [Ping timeout: 255 seconds]
ZachBeta has joined #ruby
raul782 has joined #ruby
HashNuke has joined #ruby
Zolrath has quit [Quit: Computer has gone to sleep.]
<LBRapid> bambanx: gem uninstall
Araxia_ has quit [Quit: Araxia_]
<LBRapid> gem uninstall GEMNAME
Icehawk78 has quit [Ping timeout: 252 seconds]
bambanx_ has joined #ruby
pygmael has quit [Quit: pygmael]
<offby1> gemima surrender
Icehawk78 has joined #ruby
bambanx_ has quit [Client Quit]
bambanx has quit [Ping timeout: 255 seconds]
zeromodulus_ has quit [Remote host closed the connection]
EzeQL has quit [Ping timeout: 265 seconds]
EzeQL has joined #ruby
savage- has joined #ruby
`brendan has joined #ruby
philcrissman has joined #ruby
brianpWins has joined #ruby
ConstantineXVI has quit [Remote host closed the connection]
bambanx has joined #ruby
<bambanx> guys anyone can help me with this loop pls http://pastebin.com/PtnUGFfa
dukio has quit [Quit: Page closed]
sebastorama has joined #ruby
x0F has quit [Quit: Leaving]
x0F has joined #ruby
nisstyre has quit [Ping timeout: 246 seconds]
nisstyre has joined #ruby
mikepack has joined #ruby
<bnagy> until sum==
<bambanx> dont work bnagy just jump my while i dunno why :/
<bambanx> bnagy, is weird can be a bug?
<bnagy> in what?
<bambanx> in the loop
<bambanx> dont work with while and until sum == dont work too
<bambanx> :/
<bambanx> and its just jump my loop
<bambanx> sum = 0
<bambanx> until sum == 642969993 dont work
<bnagy> why do you think it 'jumps your loop'?
graspee has quit [Quit: no time like the present]
<bambanx> becouse jump to the next line of code
<banisterfiend> hehe
<bnagy> wouldn't that also be consistent with entering the loop and hitting the termination condition?
ZachBeta has quit [Read error: Connection reset by peer]
<bambanx> i dont understand u bnagy but thanks any way
<banisterfiend> bambanx: you're a very polite boy
ZachBeta has joined #ruby
<bambanx> banisterfiend, i am not a boy my dear friend, and my english is not very good too
<banisterfiend> bambanx: you're a very polite girl, then :)
<bnagy> bambanx: put 'p sum' before and after the AutoItX call inside the loop
IrishGringo has joined #ruby
<bambanx> ok
philips has quit [Excess Flood]
Targen has quit [Ping timeout: 255 seconds]
mvangala has quit [Read error: Connection reset by peer]
philips has joined #ruby
mvangala has joined #ruby
<bnagy> also, there should be an international tribunal where we could prosecute code that that for war crimes
<bnagy> *like that
sgronblom has quit [Quit: leaving]
bluenemo_ has joined #ruby
toddw has quit [Remote host closed the connection]
Watcher7_ has joined #ruby
Watcher7 has quit [Ping timeout: 250 seconds]
macmartine has quit [Quit: macmartine]
bluenemo has quit [Ping timeout: 272 seconds]
Watcher7_ has quit [Client Quit]
ymasory has quit [Quit: Ex-Chat]
kylemcgi_ has joined #ruby
Solnse has quit []
kylemcgill has quit [Read error: Operation timed out]
savage- has quit [Remote host closed the connection]
savage- has joined #ruby
elliomax has joined #ruby
kevinbond has joined #ruby
<bnagy> wow.. I just read those posts on array / string ends
<bnagy> I feel tainted
jimeh2 has joined #ruby
<offby1> it made sense to me.
<offby1> Also: bacon ends.
* offby1 nods gravely
kil0byte has quit []
spowers has left #ruby [#ruby]
ipoval has joined #ruby
emmanuel__ has joined #ruby
dbgster has quit [Quit: dbgster]
jimeh has quit [Ping timeout: 250 seconds]
vertroa has quit [Quit: Leaving]
<bnagy> "And a tip for you; never mention PoLS again to persuade me. It's no use. If you have real trouble besides misunderstanding, let me know." -- matz
<bnagy> epic
vinian has joined #ruby
yugui is now known as yugui_zzz
tommyvyo has joined #ruby
fukushima has joined #ruby
eko has quit [Quit: This computer has gone to sleep]
eko has joined #ruby
eko has quit [Changing host]
eko has joined #ruby
eko has quit [Remote host closed the connection]
vitor-br has quit [Quit: Saindo]
eko has joined #ruby
eko has quit [Changing host]
eko has joined #ruby
eko has quit [Client Quit]
azm has joined #ruby
azm has quit [Read error: Connection reset by peer]
yugui_zzz is now known as yugui
eko has joined #ruby
eko has joined #ruby
eko has quit [Changing host]
locks_ has joined #ruby
vertroa has joined #ruby
locks_ has quit [Remote host closed the connection]
delinquentme_ has quit [Quit: Leaving]
gosshedd has joined #ruby
mikepack has quit [Remote host closed the connection]
mvangala has quit [Remote host closed the connection]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
luxurymode has joined #ruby
ananthakumaran has joined #ruby
v0n has quit [Remote host closed the connection]
albemuth has quit [Quit: Computer has gone to sleep.]
minijupe has joined #ruby
kylemcgi_ has quit [Remote host closed the connection]
kylemcgill has joined #ruby
bluenemo__ has joined #ruby
yugui is now known as yugui_zzz
bluenemo__ has quit [Changing host]
bluenemo__ has joined #ruby
trend has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
yugui_zzz is now known as yugui
iamjarvo has quit [Quit: Leaving.]
bluenemo_ has quit [Ping timeout: 272 seconds]
fukushima has quit [Quit: Leaving...]
yugui is now known as yugui_zzz
newbold_cloud has quit [Quit: Connection closed for inactivity]
QKO_ has quit [Read error: Connection reset by peer]
QKO has joined #ruby
c0rn has joined #ruby
philcrissman has quit [Remote host closed the connection]
emmanuel__ has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
L-----D has quit [Quit: Leaving]
fukushima has joined #ruby
h4mz1d has quit [Ping timeout: 260 seconds]
jlogsdon has quit [Remote host closed the connection]
bluenemo__ has quit [Remote host closed the connection]
deobald__ has joined #ruby
<shevy> yeah it started with a misunderstanding due to the pickaxe
<shevy> the PoLS should be called PoLMS instead, what surprises matz the least, not a general least surprise
<midrange> are there any signifricant differences between these two definitions: http://pastebin.com/S0KxjgJp
yosinof has quit [Quit: Leaving]
daedablo is now known as daed
minijupe has quit [Quit: minijupe]
zeromodulus has joined #ruby
pjn_oz has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
<bnagy> shevy: exactly. I mean anything surprises a retard.
kevinbond has quit [Quit: kevinbond]
elliomax has quit [Quit: Leaving]
<bnagy> midrange: yes?
<midrange> err
<bnagy> trying them out on Object probably isn't the best way to highlight the differences though
<midrange> theres a typo
<midrange> one should be http://pastebin.com/vr7yRwjg
<bnagy> midrange: usually we do better with questions that actually contain the question you want to ask instead of cryptic trivia though
<bnagy> ahhh
<midrange> that's the question i wanted to ask
<midrange> i'm trying to get a handle on the reflectivity of ruby
yugui_zzz is now known as yugui
<bnagy> ok, well someone else will check my work, but no I don't think there's any significant difference between those two (but again I dunno if putting them on Object is the best idea
<midrange> yeah
banisterfiend has quit [Remote host closed the connection]
bananas has joined #ruby
Telg has quit [Ping timeout: 272 seconds]
baroquebobcat has joined #ruby
cyb3r3li0g has quit [Quit: Leaving]
<bnagy> you should probably try it out in irb on a dummy class though
daniel_b has joined #ruby
yxhuvud has joined #ruby
digitalcakestudi has quit [Ping timeout: 256 seconds]
Telg has joined #ruby
nipra has joined #ruby
vertroa has quit [Read error: Connection reset by peer]
<bambanx> bnagy,
vertroa has joined #ruby
rushed has joined #ruby
luxurymode has quit [Quit: Computer has gone to sleep.]
<bambanx> guys what i do wrong in the chekcer method here pls: http://pastebin.com/Y9x27uHG
cordoval has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
<yxhuvud> for a starter, you are not coding in english :(
<bambanx> :(
<bambanx> skip the name of variables
<bambanx> pls
<bambanx> is the checker method i have problems
rippa has joined #ruby
<yxhuvud> @y1 = y2 doesn't look right.
<yxhuvud> so I definitely should not skip the names of the variables :)
manizzle has joined #ruby
<bambanx> hehehehe
<bambanx> nice
<bambanx> yxhuvud, WORKS !!!!
cordoval has left #ruby [#ruby]
<bambanx> thanks men yxhuvud
<bambanx> yxhuvud, you are a real hero for me
AndChat| has joined #ruby
gosshedd has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 244 seconds]
avirahmed has joined #ruby
nej has quit [Remote host closed the connection]
nej has joined #ruby
tomzx has quit [Ping timeout: 260 seconds]
<bambanx> yxhuvud, which edittor you use for ruby?
daniel_b has quit [Quit: daniel_b]
mikeycgto has quit [Remote host closed the connection]
altious has joined #ruby
pu22l3r has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
Solnse has joined #ruby
TandemAdam has quit [Read error: Connection reset by peer]
jernejz has joined #ruby
raul782 has quit [Remote host closed the connection]
AndChat| has quit [Ping timeout: 244 seconds]
* zeromodulus is available for contract/part-time/full-time development work. send PM if interested.
<Solnse> open(my_filename, "r") and open(my_filename).read the same thing?
bananas has left #ruby [#ruby]
* zeromodulus hopes that's allowed here.
<zeromodulus> Solnse: probably.
<Solnse> probably? lol
nej has quit [Ping timeout: 244 seconds]
<zeromodulus> goal-wise, sure. but one gives you the contents, one gives you a handle.
<Solnse> handle?
<zeromodulus> an open file object, from which you can then call .read
<zeromodulus> or other methods it provides.
<Solnse> so .read is a verb? and the "r" is just an adjective, a state?
<zeromodulus> uhh...
* zeromodulus shrugs
<Solnse> .read actually read the files.... the "r" opens the file in read state, but doesn't actually read it?
avirahmed has left #ruby [#ruby]
<zeromodulus> ah, yeah, I think so
<zeromodulus> in those words, more or less
Kamijou_Touma has joined #ruby
<bnagy> Solnse: no they're not even a little bit the same
<Solnse> bnagy: please explain
<bnagy> you already pretty much explained it :)
<Solnse> o, ok.
baroquebobcat has quit [Quit: baroquebobcat]
<Solnse> thaniks
<bnagy> File.read 'foo' will give you the contents of foo as a string, File.open 'foo', 'r' will give you a readonly handle to the file
<zeromodulus> open(<file>, "r") opens it with the intent of reading it, but doesn't actually read it
kenperkins has quit [Quit: Computer has gone to sleep.]
<bnagy> File.open( 'foo', 'rb' ) {|io| io.read} will read the contents and close the handle automatically
pdtpatr1ck has joined #ruby
CheeToS has joined #ruby
<bnagy> I added the 'b' flag because you basically should always have it
<bnagy> otherwise if anyone ever runs your code on windows stuff will break mysteriously and people will go mad
* zeromodulus begins round 1 of endless night of coding.
<Solnse> that could be bonus too
<Solnse> so the b flag auto-closes after it is read?
<bnagy> no b flag is 'binary'
<Solnse> works with 'wb' too?
<bnagy> the block form after the open call {|io| io.read} is what does the auto close
<bnagy> 99% of the time you want to use the block pattern for File.open
bobajett has joined #ruby
<Solnse> and put the logic in the block, for what you are doing with it... assigning variables, etc.
<Solnse> ?
banisterfiend has joined #ruby
<zeromodulus> if you need to
<bnagy> yeah, although bear in mind that any variables you create inside the block won't be available once the block is done
<Solnse> ahh, yes, ok. I understand.
baroquebobcat has joined #ruby
<bobajett> folks why does (1..10).reduce(:+) work but not on an array [1..10].reduce(+) ?
<bnagy> because [1..10] is not what you think it is?
<bnagy> [1..10].size => 1
<bobajett> oh because [1..10] is an array with one element, which is a Range. ah!
<zeromodulus> [1..10] is a single element array with a single range in it?
<zeromodulus> hehe
<bnagy> [*1..10].inject(:+) => 55
Ontolog has quit [Remote host closed the connection]
<bnagy> as an aside, Gauss is awesomeZ
<bobajett> whoa! bnagy what is that * doing there? doing an implicit *(1..10)?
kenperkins has joined #ruby
<zeromodulus> magnetic flux density?
<bnagy> Yeah! Gave that bitch a splat operator. Bitches love splats.
<bobajett> lol, I did not know that. I'll have to google this love affair between splats and bitches.
<bnagy> ... actually I advise against that particular google search :|
<zeromodulus> hahaha
<bobajett> heh, i am at work and that search is definitely going to return some NSFW results
ryanf has joined #ruby
banisterfiend has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
* bnagy lols hard at google images for 'bitches love Gauss'
<bobajett> yeah so much for Google's Knowledge Graph
deobald__ has quit [Ping timeout: 260 seconds]
<bobajett> or actually I bet Google just formed some links in its knowledge graph that never existed before
<bobajett> Bitches <-> Gauss
<bnagy> results are broadly divided into a) maths, graphs b) things about guns c) spanking porn
<bnagy> ...back in 4 minutes
kylemcgill has quit [Remote host closed the connection]
banisterfiend has joined #ruby
prometheus has quit [Ping timeout: 265 seconds]
ABK has joined #ruby
bobajett has quit [Remote host closed the connection]
zebe42 has quit [Ping timeout: 240 seconds]
nej has joined #ruby
jernejz has quit [Read error: Connection reset by peer]
peterhil` has quit [Ping timeout: 252 seconds]
snip_it has joined #ruby
peterhil` has joined #ruby
c0rn has quit []
mnaser has quit [Ping timeout: 255 seconds]
jayrulez has quit [Read error: Operation timed out]
c0rn has joined #ruby
nfluxx has quit [Ping timeout: 244 seconds]
ananthakumaran has joined #ruby
cha1tanya has quit [Read error: Connection reset by peer]
yoklov has quit [Quit: bye!]
martianixor has joined #ruby
martianixor has left #ruby [#ruby]
mikepack has joined #ruby
mdw has joined #ruby
shevy has quit [Ping timeout: 245 seconds]
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
snip_it has quit [Quit: snip_it]
mdw has quit [Remote host closed the connection]
snip_it has joined #ruby
snip_it has quit [Client Quit]
zebe42 has joined #ruby
kylemcgill has joined #ruby
looopy has quit [Remote host closed the connection]
nipra has quit [Ping timeout: 260 seconds]
dhaskew has quit [Quit: dhaskew]
looopy has joined #ruby
zeromodulus has quit [Ping timeout: 244 seconds]
shevy has joined #ruby
pdtpatrick has joined #ruby
h4mz1d has joined #ruby
mdw has joined #ruby
pdtpatr1ck has quit [Quit: pdtpatr1ck]
looopy has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
bambanx_ has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
sparrovv has joined #ruby
bambanx has quit [Ping timeout: 255 seconds]
ryanf_ has joined #ruby
nlc has quit [Quit: Leaving]
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
nipra has joined #ruby
banisterfiend has joined #ruby
dnyy has joined #ruby
sparrovv has quit [Read error: Operation timed out]
scb has joined #ruby
Karmaon has quit [Ping timeout: 276 seconds]
mdw has quit [Ping timeout: 272 seconds]
Carson_ has joined #ruby
mxweas_ has joined #ruby
EzeQL has quit [Ping timeout: 260 seconds]
EzeQL has joined #ruby
mykeus has quit [Ping timeout: 255 seconds]
mykeus has joined #ruby
mykeus is now known as Guest84680
natson has joined #ruby
kojul has quit [Quit: leaving]
djdb has joined #ruby
banisterfiend has quit [Remote host closed the connection]
jayrulez has joined #ruby
natson has left #ruby [#ruby]
rlankfo_ has joined #ruby
jadon has quit [Ping timeout: 272 seconds]
bambanx_ has quit [Quit: Saliendo]
rlankfo has quit [Ping timeout: 252 seconds]
Guest32640 has joined #ruby
Guest32640 is now known as eddie_
banisterfiend has joined #ruby
<eddie_> Can anyone help me with Blank Class
<eddie_> ?
<eddie_> rippa: You there?
<rippa> yep
<eddie_> if you arent busy
Guest81769 has joined #ruby
stewart_ has quit [Quit: Leaving.]
brianpWins has joined #ruby
<rippa> eddie_: try Hash or OpenStruct
<eddie_> ok
<eddie_> thanks
altious has quit [Ping timeout: 265 seconds]
<bnagy> eddie_: you can also inherit BasicObject and use method_missing
<bnagy> if you want a genuinely blank class
TheFuzzball has joined #ruby
<bnagy> (on 1.9)
<eddie_> bnagy: Thanks
<eddie_> i was thinking about missing
<bnagy> openstruct is generally a better idea for your use case
RoUS has quit [Ping timeout: 260 seconds]
ymasory has joined #ruby
<bnagy> only time I've used the BasicObject trick is when I want an object to proxy method calls to an external module
xaq has joined #ruby
<bnagy> which is a weird thing to do and probably kills kittens
shruggar has joined #ruby
Guest81769 has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
xaq has quit [Remote host closed the connection]
TheFuzzball has quit [Quit: Leaving...]
mucker has joined #ruby
<eddie_> Thanks rippa bnagy
xaq has joined #ruby
greyEAX has quit [Remote host closed the connection]
sei has joined #ruby
td123 has quit [Ping timeout: 272 seconds]
<shevy> poor kittens
sparrovv has joined #ruby
<eddie_> kills kittens ?
<shevy> yup
<shevy> that's what bnagy does for a living
<shevy> slaying the kittens in nepal
<shevy> :(
ddv has joined #ruby
indeterminate has quit [Ping timeout: 260 seconds]
<eddie_> is it your joke
<eddie_> or
<shevy> bnagy can tell you
indeterminate has joined #ruby
<eddie_> referring to some coding stuff ?
<eddie_> by kittens
<eddie_> :D
mxweas_ has quit [Quit: Computer has gone to sleep.]
nipra has quit [Ping timeout: 252 seconds]
vectorshelve has joined #ruby
stephenjudkins has joined #ruby
manizzle has quit [Ping timeout: 260 seconds]
sei has quit [Ping timeout: 244 seconds]
<bnagy> morning shevy
univers has quit []
abra has quit [Ping timeout: 276 seconds]
abra has joined #ruby
mikepack has quit [Remote host closed the connection]
b1rkh0ff has joined #ruby
fukushima has quit [Quit: Leaving...]
nipra has joined #ruby
fukushima has joined #ruby
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
timonv has joined #ruby
Zolrath has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
shruggar has quit [Ping timeout: 244 seconds]
mdw has joined #ruby
adamkitt_ has quit [Remote host closed the connection]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
fukushima has quit [Quit: Leaving...]
khakimov has quit [Quit: Computer has gone to sleep.]
eka has joined #ruby
ph^ has joined #ruby
zommi has joined #ruby
mdw has quit [Remote host closed the connection]
nej has quit [Read error: Connection reset by peer]
jernejz has joined #ruby
dangerousdave has joined #ruby
cj3kim has joined #ruby
jprovazn_away is now known as jprovazn
robbyoconnor has joined #ruby
dekroning has joined #ruby
DarthGandalf has quit [Ping timeout: 260 seconds]
nipra has quit [Ping timeout: 256 seconds]
r4um has joined #ruby
nilg` has joined #ruby
petercs has joined #ruby
zz_chrismcg is now known as chrismcg
fukushima has joined #ruby
L-----D has joined #ruby
devjustforfun has joined #ruby
<devjustforfun> hi
dekronin1 has joined #ruby
<dekronin1> hello
<devjustforfun> ruby is nice language
dekroning has quit [Quit: leaving]
methoddk has quit [Ping timeout: 244 seconds]
dekronin1 is now known as dekroning
methoddk has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
xaq_ has joined #ruby
devjustforfun has quit [Quit: Leaving]
timonv has quit [Remote host closed the connection]
ipoval has quit [Quit: ipoval]
xaq has quit [Ping timeout: 244 seconds]
S2kx is now known as S1kx
S1kx has quit [Changing host]
S1kx has joined #ruby
petercs has quit [Remote host closed the connection]
ph^_ has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
SPYGAME has joined #ruby
nipra has joined #ruby
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
petercs has joined #ruby
mneorr has joined #ruby
Eldariof-ru has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
greyEAX has joined #ruby
strnx has quit [Ping timeout: 245 seconds]
ph^_ has quit [Remote host closed the connection]
Rickmasta has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 240 seconds]
Carson_ has quit [Quit: Page closed]
Guest63712 has quit [Ping timeout: 244 seconds]
jgrevich has quit [Quit: jgrevich]
JohnBat26 has quit [Remote host closed the connection]
xaq_ has quit [Remote host closed the connection]
EddieS has joined #ruby
bier_ has quit [Ping timeout: 245 seconds]
EddieS is now known as Guest65890
tomb_ has joined #ruby
manizzle has joined #ruby
altious has joined #ruby
kuranai|off is now known as kuranai
mdw has joined #ruby
zommi has quit [Remote host closed the connection]
ukwiz has joined #ruby
mdw has quit [Remote host closed the connection]
mucker has quit [Quit: Lost terminal]
mneorr has quit [Remote host closed the connection]
trend has quit [Disconnected by services]
ds_shadof has joined #ruby
robotmay has joined #ruby
bier_ has joined #ruby
carloshpf has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
<ds_shadof> help me to install gem http://pastebin.com/HGsUEn0P
ben- has joined #ruby
mdw has joined #ruby
fixl has joined #ruby
scb has quit [Ping timeout: 245 seconds]
ryanf_ has quit [Quit: leaving]
aef has quit [Remote host closed the connection]
aef has joined #ruby
ryanf has quit [Quit: leaving]
abra has quit [Remote host closed the connection]
abra has joined #ruby
bobdobbs` has joined #ruby
aces1up has joined #ruby
bobdobbs has quit [Read error: Connection reset by peer]
<aces1up> how can i escape a double quote in a string with gsub so : my "neat string" == my \"neat string\" ???
<Mon_Ouie> gsub('"', '\\\\"')
HashNuke has quit [Quit: HashNuke]
<aces1up> Mon_Ouie thanks
clockwize has joined #ruby
CheeToS has quit [Ping timeout: 248 seconds]
wargasm1 has quit [Read error: Connection reset by peer]
ben- has quit [Quit: Linkinus is updating...]
ben- has joined #ruby
gabrtv has quit [Ping timeout: 272 seconds]
<Veejay> Mon_Ouie: I've always wondered, how come we have to say "\\\\"? How come there's not a constant ESCAPED_BACKSLASH or something to provide some abstraction?
ephemerian has joined #ruby
roolo has joined #ruby
d3vic3 has quit [Read error: Connection reset by peer]
<Veejay> As in you don't even have to think, you can't be bothered with the details, you just want a \ in your string
rakm has quit [Quit: Computer has gone to sleep.]
mucker has joined #ruby
mucker has quit [Read error: Connection reset by peer]
Soul_Est has quit [Quit: WeeChat 0.3.7]
ds_shadof has left #ruby ["Leaving"]
<bnagy> backslashes are fuuunny
<bnagy> although I'd rather type \\ than #{ESCAPED_BACKSLASH}
cj3kim has quit [Quit: This computer has gone to sleep]
mucker has joined #ruby
mucker has quit [Read error: Connection reset by peer]
elliot98 has quit [Changing host]
elliot98 has joined #ruby
Helius has joined #ruby
<Mon_Ouie> Veejay: I don't think that's a great idea
mneorr has joined #ruby
maesbn has joined #ruby
<Mon_Ouie> I'd prefer having another method to replace substrings that wouldn't care about backslashes in the format string
skogis has joined #ruby
Helius has left #ruby [#ruby]
mucker has joined #ruby
mucker has quit [Read error: Connection reset by peer]
piotr_ has joined #ruby
d3vic3 has joined #ruby
gabrtv has joined #ruby
tatsuya_o has joined #ruby
Guest81769 has joined #ruby
Drakx_ has quit [Ping timeout: 260 seconds]
Drakx has joined #ruby
Drakx has quit [Changing host]
Drakx has joined #ruby
mucker has joined #ruby
mucker has quit [Read error: Connection reset by peer]
QKO has quit [Ping timeout: 260 seconds]
QKO has joined #ruby
crazed has quit [Ping timeout: 245 seconds]
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby
etehtsea has joined #ruby
mucker has joined #ruby
cantonic has quit [Read error: Connection reset by peer]
mucker has quit [Read error: Connection reset by peer]
blacktulip has joined #ruby
mucker has joined #ruby
aces1up has quit []
liluo_ has joined #ruby
shruggar has joined #ruby
liluo has quit [Read error: Connection reset by peer]
probst has joined #ruby
gabrtv has quit [Ping timeout: 272 seconds]
probst has quit [Client Quit]
gabrtv has joined #ruby
Guest81769 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
<arturaz> Mon_Ouie, gsub('"', %{\\})
<arturaz> jruby-head-n16 :004 > %{foo"bar}.gsub('"', %{\\})
<arturaz> => "foo\\bar"
<arturaz> Veejay, same for you :)
stephenjudkins has joined #ruby
thecreators has joined #ruby
beneggett has joined #ruby
beneggett has quit [Client Quit]
DarthGandalf has joined #ruby
<Mon_Ouie> Actually, seems to work with '…' too
<Mon_Ouie> I'm pretty sure it used not to, though
sandGorgon has joined #ruby
beneggett has joined #ruby
manizzle has quit [Ping timeout: 252 seconds]
<banisterfiend> Mon_Ouie: how do you feel about the socialist president of france?
stephenjudkins has quit [Quit: stephenjudkins]
jackiechan0 has joined #ruby
<shevy> anyone here knows avisynth?
<bnagy> I only know absinthe
EzeQL has quit [Ping timeout: 260 seconds]
<jackiechan0> absinthe :) bnagy
<kalleth> bnagy: wish i didnt know absinthe tbh ;(
<kalleth> she's a harsh mistress
<shevy> avisynth is a tiny "scripting" language for audio/media files. i.e. when you have an .avi file, you can apply several filters, all in text, then load this "script" in a program like virtualdub, to create the new .avi file
<shevy> I wanna do this in ruby
<bnagy> kalleth: Just like any woman, you need to treat her with respect. Then put sugar in her and set her on fire.
<kalleth> :|
<shevy> hmm
<kalleth> brogrammer high5!
<shevy> why the sugar
<bnagy> absinthe is pretty bitter
<shevy> oh
<kalleth> that just makes it better
<kalleth> vodka is fine too
tatsuya_o has quit [Remote host closed the connection]
<shevy> vodka kills me
<bnagy> normally you put a cube on a special spoon, soak the cube, then burn it, then stir
<bnagy> except it's All Wrong according to purists
<bnagy> alcohol nerds get really irate about this kind of stuff :)
tatsuya_o has joined #ruby
ipoval has joined #ruby
ctp has joined #ruby
sandGorgon has quit [Ping timeout: 260 seconds]
mucker has quit [Read error: Connection reset by peer]
mucker has joined #ruby
mucker has quit [Read error: Connection reset by peer]
netogallo has joined #ruby
[edu] has joined #ruby
<forestbird> is the there a better way than the [0] there in the middle? open("/proc/#{pid}/io").grep(/^read_bytes/)[0][/(\d+)/].to_i
<shevy> hmm
<shevy> forestbird well, you could use .first
<shevy> forestbird but you need to fetch the first element of that array, yes? so you kinda need to access it
<yxhuvud> well, you could use a more suited method than grep.
<shevy> :)
<forestbird> yxhuvud: for example?
<kalleth> bnagy: i'm no purist, someone puts booze infront of me in a pub, i drink it
[edu] has quit [Client Quit]
<kalleth> bnagy: also, unlike (it seems) most programmers, I can't stand lager/bitter/ale :(
[edu] has joined #ruby
<yxhuvud> forestbird: just a regular match.
Solnse has quit [Read error: No route to host]
<rippa> I like pure absinthe
<rippa> without water and shit
<shevy> kalleth I like italian red wine, a very few beer sorts (but most beers are bad), tequila... and chocolate liqueor... damn I can't write liquor...
<bnagy> grep seems pretty well suited to me?
<yxhuvud> but anyhow, why are you using two regexen instead of one? /^read_bytes.*(\d+) should match just as well
<shevy> oh and ice wine
<kalleth> i'm a bit partial to wine, but only with a meal
<kalleth> i can't really drink it on its own
<bnagy> I mean finding array elements matching a regexp...isn't that kind of what it's meant for?
<kalleth> whisky, vodka, and sugary womans drinks are my forte
mucker has joined #ruby
<yxhuvud> bnagy: point is that he only use the first one.
<forestbird> yxhuvud: i think i tried that but it didn't work... let me see
<banisterfiend> yxhuvud: what does your nickname mean
dv310p3r has quit [Ping timeout: 272 seconds]
<yxhuvud> banisterfiend: uh, it is a play of words on a sentence people use when someone is saying something that doesn't relate to the question at hand
<bnagy> ohhh... yeah you can't get it out of grep but you can use $1
<banisterfiend> yxhuvud: in swedish? cos in english (to me) it just looks like a random jumble of characteres
dv310p3r has joined #ruby
<bnagy> yxhuvud: nice one
altious has quit [Read error: Operation timed out]
<yxhuvud> banisterfiend: yes, in swedish.
<bnagy> but need .*?(\d+)
<yxhuvud> bnagy: uh. .* has ? built in.
<bnagy> ["read_bytes: 124"].grep /^read_bytes.*(\d+)/; $1 => 4
<yxhuvud> banisterfiend: it is very convenient to have a nickname english people cannot pronounce, except when someone takes me for a spambot with autogenerated name
francisfish has joined #ruby
<bnagy> (ie I don't think you're right)
<Mon_Ouie> yxhuvud: .*? means non-greedy
<yxhuvud> ah, good point. .* might be too greedy.
zastaph has joined #ruby
<bnagy> but anyway, it's a nice solution - I don't usually approve of $1, but it's cool here
d3c has joined #ruby
<yxhuvud> \D* works as well I suppose.
mucker has quit [Read error: Operation timed out]
dknight has joined #ruby
<dknight> how do I specify realm in basic_auth?
<yxhuvud> dknight: depends. what is your scenario?
<Veejay> banisterfiend: I feel honored that you'd rather ask some Belgian dude rather than me
<Veejay> It feels great
<Veejay> THANKS
<banisterfiend> Veejay: Mon_Ouie is primarily a french speaker
<Veejay> Also, if the Belgian knew ANYTHING about government, they'd have one :D
<banisterfiend> Veejay: so his heart is closer to france than belgium
<Veejay> I was kidding obviously
<banisterfiend> im sure he keeps a very close eye on french politics
<banisterfiend> Mon_Ouie: right?
<banisterfiend> :D
polysics has joined #ruby
<dknight> yxhuvud: I have to make a POST call
<banisterfiend> Veejay: hehe, you're french?
<Mon_Ouie> Does knowing who's their current president is count as "a very close [ear]"?
<dknight> yxhuvud: that requires me to use basic_auth to login
mucker has joined #ruby
<bnagy> Veejay: and yet Belgium is in good shape and France is broke.. wonder who's laughing about governments now :D
<Veejay> Good shape
<Veejay> ha
<bnagy> well compared to France everyone is on good shape
<bnagy> cept Greece
<Veejay> No one's in "good shape" man
<bnagy> Australia is! Woooo!
<Veejay> Belgium is like 12 people (13 including Mon_Ouie) give me a break
<bnagy> ozzie ozzie ozzie! oi oi oi!
<banisterfiend> Mon_Ouie: no
<banisterfiend> bnagy: did u see possum
<banisterfiend> bnagy: the hot australian chick
<bnagy> banisterfiend: yeah there were loads last time I went camping
L-----D has quit [Quit: Leaving]
<kalleth> wait, hot australian chick?
<kalleth> i'm interested now
<yxhuvud> dknight: then I don't know.
<banisterfiend> kalleth: ok one sec, i'll find it 4 u
<Veejay> banisterfiend: Yes I am, my family has been French since at least 1100
<dknight> yxhuvud: tell me the way you know
<Veejay> Rotten to the core :D
tvw has joined #ruby
<yxhuvud> dknight: well, I know how to set it up on the server side, under certain preconditions.
<bnagy> banisterfiend: it may surprise you to learn that I don't get much exposure to australian media here in kathmandu
<Veejay> bnagy: What do you mean compared to France everyone is in good shape? What about Italy, Spain, Portugal, Ireland? The deficit in England is ridiculous as well. Everyone's hurting really :/
<dknight> yxhuvud: nah, I need to set it on client side. actually when you set it on server side, how does your client communicate with it?
<yxhuvud> well, certain parts of northern europe are doing fine.
<banisterfiend> kalleth: bnagy: NSFW: http://i.imgur.com/6shKH.jpg
<banisterfiend> ^ meet possum
<banisterfiend> the hot aussie girl
<yxhuvud> dknight: my client then is a browser.
<kalleth> yep, ok, you bastard
<kalleth> ¬_¬
<kalleth> proclicked at work, btw
<banisterfiend> kalleth: i think bnagy will attest that she is pretty hot as far as aussie girls go
<banisterfiend> :P
<dknight> yxhuvud: okay
<kalleth> banisterfiend: looked for about 0.5s
<kalleth> closed tab quickly
<kalleth> ;p
<banisterfiend> good move
<shevy> hah
<shevy> kalleth I learned to never click on anything banister shows the hard way
<kalleth> at least he tagged it nws
<kalleth> i termed it worth it to click on it at work
iocor has joined #ruby
dknight has quit [Quit: leaving]
mucker has quit [Ping timeout: 252 seconds]
c0rn has quit []
shruggar has quit [Ping timeout: 252 seconds]
shruggar has joined #ruby
dv310p3r has quit [Ping timeout: 245 seconds]
mucker has joined #ruby
cantonic has joined #ruby
dv310p3r has joined #ruby
jbw has quit [Ping timeout: 272 seconds]
dv310p3r has quit [Max SendQ exceeded]
dv310p3r has joined #ruby
<banisterfiend> this is the most ridiculous kickstarter i've read about yet: http://www.kickstarter.com/projects/2050241756/winruby-commercial-and-open-source-support-for-rub?ref=history
<banisterfiend> the 'deliverables' are nothing to speak of
mxweas_ has joined #ruby
piotr__ has joined #ruby
yugui is now known as yugui_zzz
piotr_ has quit [Ping timeout: 272 seconds]
<bnagy> I would like an msvc build, and also a 64 bit build
<banisterfiend> bnagy: why do u want an msvc build out of interest
<bnagy> and I would also like a lot of the win32 gems ported to ffi
<bnagy> mainly for compatability with new / 64 bit winders
<bnagy> and because it's a pretty good compiler :(
<banisterfiend> it would be a pain to maintain an msvc build, not $50K worth of pain, but a pain as MRI is now using c99 afaict
dv310p3r has quit [Max SendQ exceeded]
<Veejay> banisterfiend: This type of project is exactly how I realize that deep down I'm a douche. I simply don't want Ruby to ever succeed on Windows. In fact, I would very much everyone to develop on UNIX systems, just lik me.
yonggu has quit [Ping timeout: 255 seconds]
<Veejay> +like for
<bnagy> Veejay: I don't think it's as deep down as you think
<ben-> Veejay: \o/
<bnagy> :D
<Veejay> :D
yonggu has joined #ruby
<bnagy> I have to work with windows, ok? I don't do it because I like it, or because I like windows
<bnagy> but to break windows software I need to write windows software
mxweas_ has quit [Quit: Leaving...]
<Veejay> bnagy: So people force you to use Windows, right?
<Veejay> At work or something?
<bnagy> I don't USE it, eww
<bnagy> I just have stuff that nees to run on windows bots
rorider has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
<ben-> find a new job ;)
manizzle has joined #ruby
flype has joined #ruby
<bnagy> no way, this is the best job ever
<Veejay> But really of course I wish Ruby would run fine and consistently anywhere, there are tons of people developing on Winows after all
<bnagy> breaking windows software is very satisfying
jbw has joined #ruby
schovi has joined #ruby
thecreators has quit [Remote host closed the connection]
kylemcgill has quit [Remote host closed the connection]
ixx is now known as ixx_
ixx_ is now known as _ixx
_ixx is now known as taylorcc
taylorcc is now known as ixx
ixx is now known as xxi
xxi is now known as ixx
dv310p3r has joined #ruby
sohocoke has joined #ruby
zii has joined #ruby
rorider has quit [Quit: Leaving]
<zii> I see github ruby styleguide disallow using "and" and "or" boolean functions, but why? I think they're often much more readable than && ||.
<bnagy> styleguides are self indulgent wank
<banisterfiend> zii: because they have different precedence rules so they're note a direct replacement for && and ||
<bnagy> but using && and || is a safer habit
<banisterfiend> and as such could confuse some pigs
<banisterfiend> not*
etehtsea has quit [Ping timeout: 252 seconds]
elliot98 has quit [Quit: Konversation terminated!]
<bnagy> having said that, I like little snippets like do_a_thing and return true or whatever :P
dekroning has quit [Ping timeout: 244 seconds]
<banisterfiend> bnagy: Yeah, that's the recommended use case for them
<banisterfiend> as flow control thingies rather than boolean operators for an 'if'
<banisterfiend> lose_virginity_before_25 or die
r4um has quit [Quit: leaving]
Foxandxss has joined #ruby
<bnagy> well for most people I guess that would be and :)
<zii> That's what I used them for. :] Cool. In what way are their precedence rules different from && ||.
<Veejay> I really like and and or. In their written form
<zii> ?*
<banisterfiend> zii: let me find u a blog post
<Veejay> I probably abuse them because of that irrational passion
<bnagy> zii: google will tell you. && will do the right thing almost always
<bnagy> and can trick you sometimes with weak precedence
<zii> Veejay, Exactly.
rushed has quit [Quit: rushed]
<bnagy> you would have to be a little twisted to construct logic that would only work with and and not &&
<banisterfiend> zii: that blog post explains all
<banisterfiend> <bot> OK, registered.
manizzle has quit [Remote host closed the connection]
<banisterfiend> thx
<banisterfiend> <bot> np
araujo has quit [Read error: Connection reset by peer]
sohocoke has quit [Quit: sohocoke]
manizzle has joined #ruby
<zii> Hmm, the example that didn't work for him works fine for me.
b1rkh0ff has quit [Ping timeout: 244 seconds]
d3c has quit [Read error: Connection reset by peer]
<zii> Oh, I got it, nvm.
<bnagy> which? foo = 42 && foo / 2 ??
<bnagy> that would be...weird
<zii> Everything works fine.
<Veejay> Except that piece of code, right?
<zii> No. ;-D all = awesome
<Veejay> Cause you make it sound like it does
<Veejay> OK
<ben-> narf, sigh ruby-mapnik c extension :f
* banisterfiend bans zii from #ruby for being incoherent
<ben-> any c++ nerds here? ;P
<banisterfiend> ben-: try #C++
<zii> Matz made ruby, because he hated c++.
<zii> (might not be entirely true)
<banisterfiend> hehe
<ben-> :D
<ben-> just wanted to play with the ruby-mapnik gem but the c extension wont compile :F
polysics has quit [Remote host closed the connection]
HashNuke has joined #ruby
polysics has joined #ruby
virunga has joined #ruby
greyEAX has quit [Remote host closed the connection]
ddv has quit [Quit: *poof*]
polysics has quit [Ping timeout: 272 seconds]
greyEAX has joined #ruby
b1rkh0ff has joined #ruby
araujo has joined #ruby
elliot98 has joined #ruby
mucker has quit [Quit: leaving]
d3c has joined #ruby
vinian has quit [Quit: Ex-Chat]
<banisterfiend> ben-: so why didnt u say c programmers
<banisterfiend> ben-: or is it written in c++ ?
<ben-> banisterfiend: it is written in c++
<banisterfiend> oh ok
<bnagy> apt-get install g++? ;)
<bnagy> is it switched on?
fermion_ has joined #ruby
<Hanmac> ben- whats your error message?
dr_bob has joined #ruby
keanehsia has quit [Quit: Leaving...]
nari has joined #ruby
<Hanmac> hm it seems that your mapnik gem and your mapnik version does not fit together
heisenmink has joined #ruby
<vectorshelve> Hanmac: shevy bnagy hai :)
liluo_ has quit [Remote host closed the connection]
<ben-> Hanmac: looks like, yes, but the weird thing is they mention Mapnik 2.x as dependency and i use Mapnik 2.0.1 :(
<ben-> i already wrote in #mapnik but didnt get an answer yet
nari_ has joined #ruby
manizzle has quit [Read error: Operation timed out]
sohocoke has joined #ruby
<kalleth> bored.
<kalleth> 5 tickets closed, 10 commits made, before lunch, 8 hours closed off in the bugtracker
<kalleth> and i'm _bored_
joukokar has joined #ruby
<arturaz> kalleth, learn scala
<kalleth> yesh, like this company will let me spend time actually learning/improving my knowledge rather than "IMPLEMENT THIS AS FAST AS YOU CAN"
<kalleth> *cries*
<kalleth> but, if i do that, I MIGHT BECOME MARKETABLE
nari has quit [Ping timeout: 248 seconds]
ronniy has joined #ruby
<bnagy> and people tell _me_ to get a new job ;)
randym is now known as randym_zzz
randym_zzz is now known as randym
<kalleth> i live in bumfuck nowhereville where there's very few rails jobs
<kalleth> i'm looking, dont get me wrong :p
d3vic3 has quit [Ping timeout: 260 seconds]
<kalleth> (also known as the midlands)
<bnagy> your bumfuck nowherevill is nothing compared to mine, dude :)
d3vic3 has joined #ruby
maesbn has quit [Remote host closed the connection]
fermion has quit [Quit: P]
fermion_ is now known as fermion
manizzle has joined #ruby
<bnagy> I think parallel is my new favourite gem
<bnagy> again
Criztian has joined #ruby
berserkr has joined #ruby
wvms has quit [Ping timeout: 272 seconds]
d3c has quit [Read error: Connection reset by peer]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
shruggar has quit [Quit: Leaving.]
manizzle has quit [Ping timeout: 248 seconds]
davidcelis has quit [Read error: Connection reset by peer]
krz has quit [Quit: krz]
matti has joined #ruby
<dagobah> I'm looking to write an IRC bot that sits on a channel and I can send event-driven messages for it to forward onto the channel. All the gems I've used disconnect after sending a message, is there a way round this?
heisenmink has quit [Quit: Lämnar]
<bnagy> I don't think anyone has ever written an IRC bot in Ruby before
shruggar has joined #ruby
gilead has joined #ruby
davidcelis has joined #ruby
ymasory has quit [Ping timeout: 245 seconds]
evangelion has joined #ruby
<evangelion> hello
<evangelion> is there a decent library that permit to create custom IP/ARP packets with ruby?
foofoobar has joined #ruby
piotr__ has quit [Ping timeout: 272 seconds]
<bnagy> not afaik
<bnagy> I use a binary struct parser / generator and a raw socket
<bnagy> if you're on unix you might be able to get one of the libdnet bindings working though
<banisterfiend> bnagy: what exactly is a binary struct parser generator
<bnagy> but I tend to hate them
<bnagy> banisterfiend: it's a thing that parses and / or generates binary structures
<banisterfiend> bnagy: can u link to sth
<banisterfiend> rubyforge? :(
manizzle has joined #ruby
<bnagy> I don't fuckn know dude, it's not my project :)
<banisterfiend> oh it's a nice page
<banisterfiend> i take that back
<evangelion> bnagy: sounds uncomfortable, anyway thank you
<bnagy> it's good looking code
clockwize has quit [Quit: clockwize]
<bnagy> evangelion: well creating custom arp packets from scratch is not a common task
shruggar1 has joined #ruby
d3c has joined #ruby
<evangelion> bnagy: ack
<bnagy> with a decent lib to handle the creation and a raw socket you can get something a hell of a lot cleaner than scapy etc though
<bnagy> god how I hate scapy :(
wvms has joined #ruby
iocor has quit [Ping timeout: 265 seconds]
shruggar2 has joined #ruby
shruggar1 has quit [Read error: No route to host]
<evangelion> i've never heard about it before
<bnagy> ...
<bnagy> so why do you want to do this, anyways?
<evangelion> anyway i gave a try to libnet4r wich is pure shit
<bnagy> (scapy is an old and very famous python lib for this kind of stuff)
<evangelion> i would like to generate unsollicited arp request to check if $MACADDRESS is reachable
<bnagy> yeah the libnet bindings always made me vomit blood
shruggar has quit [Ping timeout: 244 seconds]
nari_ has quit [Ping timeout: 265 seconds]
<bnagy> really old code, but it has a working connection abstraction, including for raw sockets, and a working binary parser / constructor
<bnagy> if you want cut and paste fodder
iocor has joined #ruby
<evangelion> thank you
kzar has joined #ruby
<bnagy> I should really take those repos down, they're ancient and embarassing :S
d3vic3 has quit [Ping timeout: 256 seconds]
maesbn has joined #ruby
<shevy> which one :)))
<shevy> "One day there might even be some documentation here." yay!
d3vic3 has joined #ruby
ymasory has joined #ruby
<shevy> well ok I must admit
<shevy> without a README I dont even know what this is
<bnagy> :)
<evangelion> haha
<shevy> I'd have to read the IRC backlog here but I am kinda lazy
<shevy> so I just feed new lines to my client until everything scrolls away!
<kzar> I'm trying to use Win32API with a c++ dll, the documentation for the dll talks about the objects avaliable and their methods but the documentation I've found for Win32Api just talks about specifying a dll, function and parameters. So how can I create a C++ object and call some of it's methods using Win32API?
<bnagy> kzar: you mean a COM object, or what?
<kzar> bnagy: Honestly I'm not sure
<bnagy> if it's not just a plain old DLL where you can wrap exported functions it's probably COM
<kzar> bnagy: OK, how would I tell?
<bnagy> in which case, if it registers with the ole server, you might be able to use win32ole
<bnagy> (like Word, Excel etc all do)
n1x has joined #ruby
<bnagy> otherwise it gets tricky and horrible
<bnagy> do you have a link to the dll doc? Or does it mention COM anywhere?
<kzar> bnagy: No, unfortunately we're under NDA for this
<bnagy> ok well if it's talking about 'objects' and 'methods' it makes me think COM, sadly
shruggar2 has quit [Read error: No route to host]
<kzar> bnagy: ok balls
<kzar> bnagy: So when you said it potentially gets ugly, is there a way?
<bnagy> code may kill your cat etc
<bnagy> you need to wrap the object still, there is code in that gem for doing it for dbgeng.dll. You need the headers for your target to write the wrapper.
<kzar> ok
<bnagy> but find out if they register with the OLE sever first
<bnagy> cause then it's trivial
<bnagy> with win32ole
<kzar> bnagy: How would I know?
<bnagy> try and connect to it, I guess. :) Check out the win32ole gem examples
ikaros has joined #ruby
nanderoo has joined #ruby
<bnagy> but if it's some hacked up COM DLL from dickheads incorporated it might be...tricky
<kzar> bnagy: also, it's possible I can get my hands on a .so that's been compiled for Linux
<kzar> bnagy: supposing it's not registered with OLE would that be easier to use?
<bnagy> uh
<bnagy> I have never tried to ffi a .so on windows :P
<bnagy> but yeah, probably :)
MasterLambaster has joined #ruby
flype has quit [Quit: Computer has gone to sleep.]
shruggar has joined #ruby
<kzar> bnagy: Just grabbing an ole viewer app that apparently lists what's registered so we'll soon find out
tomzx has joined #ruby
A124 has joined #ruby
A124 has left #ruby [#ruby]
amalvagomes has joined #ruby
StoSun has joined #ruby
ymasory has quit [Quit: Ex-Chat]
geers has joined #ruby
nari has joined #ruby
maesbn has quit [Remote host closed the connection]
lxsameer has joined #ruby
shruggar has quit [Max SendQ exceeded]
bigkevmcd has quit [Ping timeout: 272 seconds]
etehtsea has joined #ruby
dekroning has joined #ruby
d3c has quit [Quit: Quit]
geekbri has joined #ruby
bigkevmcd has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
nu7hatch has joined #ruby
geers has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
ddv has joined #ruby
PapaSierra has joined #ruby
<PapaSierra> morning, i'm new to Ruby. I'm trying to install redmine 2.0. When I run bundle list it tells me: The following gems are missing * tilt (1.3.3) * mime-types (1.18) * mail (2.4.4) what do I do about this?
Zolrath has quit [Quit: Computer has gone to sleep.]
<banisterfiend> PapaSierra: what is redmine
<MasterLambaster> make bundle install
jcromartie has joined #ruby
andantino has joined #ruby
<kzar> bnagy: What do you make of FFI? Could that be better for what I want?
tomzx has quit [Ping timeout: 244 seconds]
<bnagy> if win32api won't work then ffi won't work
<bnagy> afaik
<kzar> bnagy: So it doesn't let you use com objects or whatever?
<bnagy> only if you do what I did (the thing I pasted before)
andantino has quit [Quit: Leaving]
chrismcg is now known as zz_chrismcg
<kzar> ok thanks
<bnagy> you can do the same thing with win32api, kind of, it's just not as clean
<Hanmac> FFI is not allways better then an native gem
dbgster has joined #ruby
dv310p3r has quit [Ping timeout: 272 seconds]
<bnagy> and there are issues with methods with very long prototypes
jayrulez has quit [Ping timeout: 245 seconds]
nari_ has joined #ruby
d3vic3 has quit [Ping timeout: 244 seconds]
savr has joined #ruby
<savr> hi
<savr> I got an idea for smart CDN
nari has quit [Ping timeout: 265 seconds]
d3vic3 has joined #ruby
<savr> basically assets can be stored on multiple networks
<savr> assets-n1, assets-n2, etc
dbgster has quit [Client Quit]
<savr> the user is given an equal amount of data to load from each network
<savr> it is time via javascript
<banisterfiend> savr: keep the idea to yourself and sell it for scrill
<bnagy> not that this isn't fascinating, but it sounds like they might like it more on #rubyonrails
amalvagomes has quit [Quit: amalvagomes]
<savr> and that is use to optimise which networks are used
<banisterfiend> bnagy: be naggy
<savr> bnagy, thanks... I was in #rails and it looked dead.
<banisterfiend> savr: it's more of a spiritual death
<banisterfiend> rails programmers have no souls
<bnagy> rails is the death of the soul, man
<bnagy> ha! snap
krusty_ar has joined #ruby
<rking> ♡ Rails.
<rking> Just sayin'.
<banisterfiend> "haiii! i prgrm railz for last 4 years, but hvnt lrn ruby yet. Can u tell me how to do loop?"
nari__ has joined #ruby
<bnagy> lol
d3vic3 has quit [Ping timeout: 240 seconds]
* rking has no snappye comebakk. Only that Rails does a good job of some kinds of tasks.
<bnagy> selling DIMMs?
bigkevmcd has quit [Ping timeout: 240 seconds]
scb has joined #ruby
<rking> I see what you did, there.
d3vic3 has joined #ruby
MasterLambaster has quit [Read error: Connection reset by peer]
<bnagy> do they still recommend that you restart the server every so often to clear memory leaks?
MasterLambaster has joined #ruby
<bnagy> that be some might fine serftwarrr engyneerin, yes SIR
scb has quit [Read error: Connection reset by peer]
nari_ has quit [Ping timeout: 245 seconds]
mengu has joined #ruby
bobdobbs` has quit [Ping timeout: 256 seconds]
sepp2k has joined #ruby
fayimora_ has joined #ruby
d3c has joined #ruby
fayimora has quit [Ping timeout: 272 seconds]
fayimora_ is now known as fayimora
pjn_oz has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 272 seconds]
geers has joined #ruby
vitor-br has joined #ruby
vitor-br has quit [Read error: Connection reset by peer]
nipra has quit [Ping timeout: 256 seconds]
Kabaka has quit [Ping timeout: 276 seconds]
christianrojas has joined #ruby
IrishGringo has joined #ruby
yugui_zzz is now known as yugui
webguynow has joined #ruby
matti has quit [Quit: 8-X]
yugui is now known as yugui_zzz
schaerli has joined #ruby
yugui_zzz is now known as yugui
wangr has joined #ruby
fr0gprince_ma has joined #ruby
ratnikov has quit [Ping timeout: 272 seconds]
mneorr has quit [Remote host closed the connection]
fbernier has joined #ruby
jackiechan0 has quit [Read error: Connection reset by peer]
indian has quit [Ping timeout: 250 seconds]
tommyvyo has joined #ruby
Jackneill has joined #ruby
dnyy has quit [Ping timeout: 260 seconds]
indian has joined #ruby
dnyy has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
hynkle has joined #ruby
ghanima has quit [Ping timeout: 240 seconds]
n1x has quit [Ping timeout: 240 seconds]
<lxsameer> hi, when i try to run thin to serv redmine i get this error http://dpaste.com/749310/ what should i do ?
afallows has joined #ruby
remmy444 has joined #ruby
savr_ has joined #ruby
dhaskew has joined #ruby
<bnagy> something something bundler something try #rubyonrails?
savr has quit [Read error: Connection reset by peer]
savr_ is now known as savr
iamjarvo has joined #ruby
savr has quit [Changing host]
savr has joined #ruby
bigkevmcd has joined #ruby
afallows_ has joined #ruby
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
afallows has quit [Ping timeout: 272 seconds]
schaerli has quit [Remote host closed the connection]
kzar has quit [Ping timeout: 244 seconds]
artm has joined #ruby
schaerli has joined #ruby
mvangala has joined #ruby
v0n has joined #ruby
mstratman has joined #ruby
flype has joined #ruby
digitalcakestudi has joined #ruby
vectorshelve has quit [Quit: Page closed]
kaspernj has joined #ruby
raul782 has joined #ruby
naquad has quit [Excess Flood]
petercs has quit [Ping timeout: 265 seconds]
lambdan has joined #ruby
LBRapid has quit [Quit: Computer has gone to sleep.]
naquad has joined #ruby
lambdan has left #ruby ["hahahaha nope"]
lxsameer has quit [Ping timeout: 244 seconds]
elliot98 has quit [Remote host closed the connection]
jackiechan0 has joined #ruby
elliot98 has joined #ruby
ananthakumaran1 has joined #ruby
savr_ has joined #ruby
savr has quit [Ping timeout: 256 seconds]
jrbing has joined #ruby
savr_ is now known as savr
savr has quit [Changing host]
savr has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
jackiechan0 has quit [Read error: Connection reset by peer]
mvangala has quit [Remote host closed the connection]
jackiechan0 has joined #ruby
lxsameer has joined #ruby
jackiechan0 has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
ratnikov has joined #ruby
carloslopes has joined #ruby
fmcgeough has joined #ruby
foofooba1 has joined #ruby
bbttxu has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
davidw has quit [Ping timeout: 248 seconds]
geers has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
foofoobar has quit [Ping timeout: 265 seconds]
bobdobbs has joined #ruby
rh1n0 has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
savr has quit [Ping timeout: 256 seconds]
fmcgeough has joined #ruby
kickroot has joined #ruby
pu22l3r has joined #ruby
dv310p3r has joined #ruby
savr has joined #ruby
savr has quit [Changing host]
savr has joined #ruby
<Travis-42> In Ruby 1.9.3, ruby-debug still seems to have big problems. Is it becoming more common just to use things like pry_debug?
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
td123 has joined #ruby
rippa has quit [Quit: derp herp]
yugui is now known as yugui_zzz
savr has quit [Ping timeout: 256 seconds]
jrbing has quit [Quit: jrbing]
kaspernj has quit [Ping timeout: 272 seconds]
dustybrains has joined #ruby
eddie_ has quit [Quit: Ex-Chat]
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
jaystay has joined #ruby
philcrissman has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
savr has joined #ruby
dhaskew has joined #ruby
<savr> my internet has been playing up. move the discussion above to http://news.ycombinator.com/item?id=3986717 comments? votes?
cordoval has joined #ruby
theRoUS has quit [Ping timeout: 265 seconds]
cordoval has left #ruby [#ruby]
roolo has quit [Quit: Linkinus - http://linkinus.com]
rbanffy has joined #ruby
dhaskew has quit [Client Quit]
roolo has joined #ruby
LBRapid has joined #ruby
HashNuke has quit [Quit: HashNuke]
gmci has quit [Read error: Connection reset by peer]
gmci has joined #ruby
elliot98 has quit [Remote host closed the connection]
ananthakumaran1 has quit [Quit: Leaving.]
pu22l3r has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby
foofooba1 is now known as foofoobar
elliot98 has joined #ruby
kpshek has joined #ruby
jaystay has quit [Quit: jaystay]
dustybrains has quit [Quit: leaving]
maesbn has joined #ruby
IrishGringo has joined #ruby
DuoSRX has quit [Read error: Connection reset by peer]
DuoSRX_ has joined #ruby
jaystay has joined #ruby
<lxsameer> how can i force bundle to don't install a gem ?
terra-and-luna has joined #ruby
wiwiwiwiwiwiwiwi has joined #ruby
<wiwiwiwiwiwiwiwi> hi
yugui_zzz is now known as yugui
<carloslopes> lxsameer: group it in a group and do bundle install --without group_name
<carloslopes> lxsameer: or, comment it in your bundle file :)
<lxsameer> carloslopes: let me try
zastaph has quit []
snearch has joined #ruby
<wiwiwiwiwiwiwiwi> im a ruby noob
<lxsameer> carloslopes: i'm new to ruby. what is the bundle file names ? or how can i create a group ?
<wiwiwiwiwiwiwiwi> i am new in ruby
snearch has quit [Read error: Connection reset by peer]
snearch has joined #ruby
sahli has joined #ruby
jackiechan0 has joined #ruby
<carloslopes> lxsameer: the file that you set up your dependencies is called Gemfile (without extension!) .. and to create a group in it, look here at the documentation, is very simple http://gembundler.com/
mrwalker has joined #ruby
dustybrains has joined #ruby
<lxsameer> carloslopes: thanks man
<carloslopes> lxsameer: yw
<fowl> wiwiwiwiwiwiwiwi, cool keep checking your mailbox, your trucker hat with new airflow design should arrive soon
kpshek has quit []
d3c has quit [Ping timeout: 240 seconds]
jrist-afk is now known as jrist
PaciFisT has joined #ruby
jackiechan0 has quit [Read error: Connection reset by peer]
<shevy> lol
maesbn has quit [Remote host closed the connection]
<shevy> wiwiwiwiwiwiwiwi why do u say thar
<shevy> that
stroem has quit [Read error: Connection reset by peer]
jackiechan0 has joined #ruby
d3c has joined #ruby
uris has joined #ruby
ddv has quit [Quit: *poof*]
<savr> noob alert
<savr> must leave channel
raul782 has quit [Read error: Operation timed out]
krusty_ar has quit [Read error: Connection reset by peer]
buhhhh has quit [Read error: Connection reset by peer]
savr has left #ruby ["Ex-Chat"]
yugui is now known as yugui_zzz
ananthakumaran has joined #ruby
tsd_usa has joined #ruby
Helius has joined #ruby
krusty_ar has joined #ruby
<tsd_usa> Is it clear that when ruby will actually support "real" multi-threading?
Resure has joined #ruby
<banisterfiend> tsd_usa: jruby
<tsd_usa> besides that?
<tsd_usa> Because I see that 1.9 only uses GIL, it seems that in the coming version, cruby will support multi-threading, is it true??
ackz has joined #ruby
ananthakumaran has quit [Client Quit]
ghanima has joined #ruby
internet_user has joined #ruby
raul782 has joined #ruby
<lxsameer> what is this error about ? http://dpaste.com/749336/
SPYGAME has quit [Quit: Leaving]
<Mon_Ouie> Using a constant that doesn't exist
<Mon_Ouie> Probably because you're using a gem that's out of date and doesn't work with newer Rake versions
liluo has joined #ruby
<lxsameer> Mon_Ouie: hmmm do you familiar with redmine ?
luxurymode has joined #ruby
bglusman has joined #ruby
tatsuya_o has joined #ruby
artm has quit [Ping timeout: 248 seconds]
C0deMave_ has joined #ruby
kpshek has joined #ruby
bglusman has quit [Read error: Connection reset by peer]
bglusman has joined #ruby
headius has joined #ruby
C0deMave_ is now known as C0deMaver1ck
C0deMaver1ck has quit [Changing host]
C0deMaver1ck has joined #ruby
afallows_ is now known as afallows
thone has joined #ruby
thone_ has quit [Read error: Operation timed out]
chson has joined #ruby
adambeynon has joined #ruby
jackiechan0 has quit [Read error: Connection reset by peer]
schaerli has quit [Ping timeout: 260 seconds]
elux has joined #ruby
C0deMave_ has joined #ruby
C0deMaver1ck is now known as Guest62456
C0deMave_ is now known as C0deMaver1ck
C0deMaver1ck has quit [Changing host]
C0deMaver1ck has joined #ruby
albemuth has joined #ruby
nari__ has quit [Ping timeout: 272 seconds]
schaerli has joined #ruby
blacktulip has quit [Remote host closed the connection]
jaystay has quit [Quit: jaystay]
Guest62456 has quit [Ping timeout: 260 seconds]
theRoUS has joined #ruby
josefig has joined #ruby
jackiechan0 has joined #ruby
heftig has quit [Quit: leaving]
jackiechan0 has left #ruby [#ruby]
emmanuel__ has joined #ruby
aquaranto_ has joined #ruby
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
jrist is now known as jrist-demo
aquaranto_ has quit [Client Quit]
schaerli has quit [Ping timeout: 265 seconds]
emmanuel__ has quit [Read error: Connection reset by peer]
aquaranto has joined #ruby
jackiechan0 has joined #ruby
amalvagomes has joined #ruby
CheeToS has joined #ruby
araujo has quit [Read error: Operation timed out]
macer1 has joined #ruby
pawdro has joined #ruby
mneorr has joined #ruby
kpshek has quit []
weasels has joined #ruby
coupontrade has joined #ruby
tvw has quit [Ping timeout: 245 seconds]
otters has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
<coupontrade> test
coupontrade has left #ruby [#ruby]
<tsd_usa> will ruby 2.0 be supporting real multithreading by removing GIL??
<Hanmac> The Purple 8 Ball says: Not likely
<tsd_usa> so sad
<ccooke> Well. Official ruby 2.0, probably not. But there are implementations right now with no GIL
ananthakumaran has quit [Client Quit]
kpshek has joined #ruby
<td123> anyways, 2.0 is coming out next year right?
jaystay has joined #ruby
jackiechan0 has quit [Read error: Connection reset by peer]
joe__K has joined #ruby
<joe__K> can rake print out its task dependency tree?
iamjarvo1 has joined #ruby
<Hanmac> the roadmap says (24.02.2013) for 2.0, but it maybe not clear
h4mz1d has joined #ruby
iamjarvo has quit [Ping timeout: 252 seconds]
jlcaicedo has joined #ruby
zz_chrismcg is now known as chrismcg
schaerli has joined #ruby
fr0gprince_ma has quit [Quit: Bye!]
fr0gprince_mac has joined #ruby
oooPaul has joined #ruby
pen_isident has joined #ruby
ryannielson has joined #ruby
prometheus has joined #ruby
ryannielson is now known as twixmix
keanehsiao has joined #ruby
zacstewart has left #ruby [#ruby]
MasterLambaster has quit [Quit: MasterLambaster]
Yarou_ has joined #ruby
ananthakumaran has joined #ruby
gosshedd has joined #ruby
headius has quit [Quit: headius]
jackiechan0 has joined #ruby
Yarou has quit [Ping timeout: 256 seconds]
rippa has joined #ruby
jlcaicedo has quit [Quit: jlcaicedo]
yosinof has joined #ruby
jackiechan0 has quit [Client Quit]
headius has joined #ruby
savant has joined #ruby
bluOxigen has joined #ruby
<savant> hi all, I'm running the following command and having an error
<savant> bundle exec unicorn master -c unicorn.cnf -E production -D
<savant> /usr/local/lib/ruby/gems/1.8/gems/unicorn-4.1.1/lib/unicorn/configurator.rb:604:in `parse_rackup_file': rackup file (master) not readable (ArgumentError)
rasbonics has joined #ruby
<savant> any ideas as to what could be the issue?
maesbn has joined #ruby
Hanmac has quit [Ping timeout: 244 seconds]
jayrulez has joined #ruby
savage- has quit [Remote host closed the connection]
jackbrownhf has joined #ruby
jackbrownhf is now known as jackiechan0
Alantas has quit [Quit: The sum of the universe is zero.]
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jackiechan0 is now known as jackbrownhf
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
jackbrownhf is now known as jackiechan0
PapaSierra has left #ruby [#ruby]
tvw has joined #ruby
<carloslopes> savant: maybe there are something wrong with your config.ru file
clockwize has joined #ruby
<savant> looks like I did not need to specify "master"
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
d3c has quit [Read error: Connection reset by peer]
<carloslopes> savant: yes.. i don't know what arguments are expected by unicorn but maybe it is considering that the master in the command is your rackup file
<savant> ya
<savant> bundle exec unicorn -c unicorn.cnf -E production -D
<savant> werked
<savant> idk anything about ruby
sahli has quit [Quit: Leaving...]
macer1 has quit [Ping timeout: 272 seconds]
<savant> im happy its rubular now
Vert has joined #ruby
Morkel has joined #ruby
whowantstolivefo has left #ruby [#ruby]
Progster has joined #ruby
<carloslopes> savant: sweet :)
Hanmac has joined #ruby
<savant> i write in the best language evar
<savant> php
<savant> idk why they even made ruby
<Hanmac> oh NO he said the P-Wort
<savant> what?
<savant> perl?
nipra has joined #ruby
<savant> perl is cool too
jprovazn has quit [Quit: Leaving]
<savant> have you guys never used phing to deploy
<savant> its like magic
<savant> i bet there are no good deploy tools for ruby
<savant> do you all still ftp stuff to your dreamhost accounts?
<carloslopes> savant: i never used phing.. but, did you see capistrano?
<savant> you mean that place with the birds in california?
<carloslopes> savant: it's awesome :)
<carloslopes> savant: hahaha no, the gem
<savant> plus ruby doesnt scale
<savant> there are no good sites using ruby
<carloslopes> savant: LOL
HashNuke has joined #ruby
d3c has joined #ruby
<shevy> lol wtf
<shevy> birds in california?
<savant> we use GNU savannah for our code repository
<savant> whats a github
<benwoody> swallows i think he means
<rippa> he swallows?
<shevy> savant what advantage does perl have over ruby?
<savant> regex in the language
<savant> its available everywhere
<shevy> huh
<shevy> and you can not use regexes in ruby?
<savant> and the language is so modular
<savant> no you cant
<carloslopes> savant: ??
<shevy> then what does =~ do?
<savant> idk what does it do
<savant> ?
<carloslopes> savant: try this //.class in your IRB
<shevy> or [/foo/]
<savant> whats an irb?
<savant> https://www.google.com/search?aq=f&sugexp=chrome,mod=1&sourceid=chrome&ie=UTF-8&q=irb
<savant> ?
<shevy> matz used perl for a long time before he wrote ruby
<savant> who is matz?
<carloslopes> savant: interactive ruby terminal
<shevy> it's funny you think he is incompetent
<rippa> Yukihiro Matzumoto
mikepack has joined #ruby
<carloslopes> savant: the creator of ruby :)
<savant> oh thats like "python" or "php -a"
<ekaleido> i smell troll
<savant> lololol
<shevy> yeah
<shevy> he insulted matz
xorspark has joined #ruby
<Synthead> is there a way I can define two hash elements with the same value without repeating the values? kind like hash = { :this, :that => 'in :this and :that' }
<shevy> noone will believe you now
<savant> at least some of you thought it was funny lol
<shevy> Synthead, that wont work
<carloslopes> shevy: +1
<Synthead> shevy: I know, that's why I'm asking
HashNuke has quit [Client Quit]
tsou has quit [Quit: leaving]
<shevy> I dont think you can do so on a hash directly
<Hanmac> banister is an example that shows that trolls can create good things too
<rking> savant: Yes, irb / python / php -a are all REPLs — Read, Eval, Print Loops.
wmoxam has joined #ruby
<shevy> banister is not really a troll
wmoxam has quit [Changing host]
wmoxam has joined #ruby
<shevy> he is a pervert that can code who sometimes trolls a little
<savant> can't you do "hash = { :var => :foo}; hash[:bar] = hash[:var]" ?
ckrailo has joined #ruby
<savant> rking: I was kidding, i'm well aware of ruby ;)
<shevy> aha
<shevy> we now know that savant knows ruby
<rking> savant: Oh, my bad. =)
<savant> lol
petercs has joined #ruby
<savant> I wrote a package indexer for a php framework based on jekyll the other day
<savant> it was pretty lulzy
<shevy> ewww
<shevy> how can you stand php's syntax?
<savant> i actually like php
<Synthead> shevy: suppose I could use a hash itself as a hash index
<savant> it gets the job done. it was also my first lang
<shevy> php can be useful, see mediawiki
<savant> although ruby is pretty good for DSLs
zastaph has joined #ruby
<shevy> but I find the syntax terrible
pu22l3r has joined #ruby
<savant> I'm a great fan of Chef and capistrano
digitalcakestudi has quit [Ping timeout: 244 seconds]
<shevy> Synthead hmmm
<Synthead> shevy: or an array, rather: hash = { [ :this, :that ] => 'both' }
<savant> one thing that annoys me is making a dsl similar to chef isn't well documented anywhere
<savant> but thats not a language issue, more of a documentation issue
asdfqwer has joined #ruby
<shevy> Synthead you kinda want an alias?
<shevy> hash[main_key]
<shevy> hash[alias1]
<shevy> hash[alias2]
<shevy> the latter pointing to main_key ?
<Synthead> shevy: well, I'm defining how something in a view is going to look by stating an array. suppose I should just make a case clause and put it in a helper
<shevy> anyway, Synthead you could channel it through a method and in that method keep track of aliases, in a new, smaller hash perhaps
ABK has quit [Ping timeout: 248 seconds]
jchauncey has joined #ruby
<shevy> I really dont think you can use an alias in a hash, to point to another entry of that very hash directly
<td123> anyone know what ruby libs try to provide what the python library 'requests' provides?
davidcelis has quit [Quit: K-Lined]
beneggett has joined #ruby
<td123> (really nice http api)
<shevy> what is requests doing?
Asher has quit [Ping timeout: 244 seconds]
<savant> rest-client is pretty okay
Helius has left #ruby [#ruby]
yonggu_ has joined #ruby
<Progster> anyone ever used a parser combinator for Ruby?
Asher has joined #ruby
<td123> shevy: does something like rest-client
robacarp_ is now known as robacarp
<savant> the other thing I've used is http
<td123> savant: ty, I'll check them out
<savant> i just wrote my own wrappers around Net::HTTP that mimic how php works
brianpWins has quit [Quit: brianpWins]
joe__K has quit [Quit: Page closed]
zebe42 has quit [Read error: Connection reset by peer]
<shevy> hehe
yonggu has quit [Ping timeout: 272 seconds]
gmci has quit [Ping timeout: 245 seconds]
d3vic3 has quit [Ping timeout: 250 seconds]
<foofoobar> I'm using garb to fetch some google analytics data in RoR. I don't know why, but it seems like some data is kept in memory so additional calling of garb functions produce an google api error (different, strange errors..)
dnyy has quit [Remote host closed the connection]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
<foofoobar> Because Garb is using some class vars I would like to "reset" or to clean everything which was done
d3vic3 has joined #ruby
<foofoobar> so the next call to Garb::Session will always be the same
<foofoobar> How can I reset the class vars or complete reload all?
kenperkins has quit [Quit: Computer has gone to sleep.]
gmci has joined #ruby
snip_it has joined #ruby
<Travis-42> Is there a replacement for the deprecated URI.encode that solves the problems of the original function -- that escapes individual URI components?
Targen has joined #ruby
MasterLambaster has joined #ruby
jackbrownhf has joined #ruby
jackbrownhf is now known as msgserve
msgserve is now known as jackbrown0
<td123> I'll go with rest-client, I really like it :)
jackbrown0 is now known as jackiechan01
bpgoldsb has quit [Ping timeout: 272 seconds]
jackiechan0 has quit [Ping timeout: 245 seconds]
jackiechan01 is now known as jackiechan0
gyre007 has joined #ruby
test34- has joined #ruby
lkba has joined #ruby
jackiechan0 has quit [Client Quit]
<foofoobar> is there a way to define a "scope" so all stuff defined inside is forgotten after the scope closes?
jackiechan0 has joined #ruby
Asher1 has joined #ruby
d3vic3 has quit [Read error: Operation timed out]
digitalcakestudi has joined #ruby
schovi has quit [Remote host closed the connection]
jrist-demo is now known as jrist
sethetter has joined #ruby
<apeiros_> fork do …stuff… end # non-portable and somewhat difficult to use
<apeiros_> @ foofoobar
<Mon_Ouie> Not in the language itself. There's a kind of hack that allows to do this in 1.9 though
Asher has quit [Ping timeout: 245 seconds]
bpgoldsb has joined #ruby
<sethetter> Is there a way to specify a list separator for {{ post.categories }} in jekyll?
<Mon_Ouie> apeiros_: I assumed he wanted a let-like construct
remmy444 has quit [Quit: Leaving]
carloshpf has joined #ruby
<apeiros_> Mon_Ouie: I assume so too
<lectrick> https://gist.github.com/2719607 So these were some interesting benchmark results for some typical Ruby string operations...
jchauncey_ has joined #ruby
d3vic3 has joined #ruby
<apeiros_> lectrick: missing one using the o-flag
wvms has quit [Quit: wvms]
jchauncey_ has quit [Read error: Connection reset by peer]
SilverMonkey has joined #ruby
jchauncey_ has joined #ruby
jchauncey has quit [Read error: Connection reset by peer]
jchauncey_ is now known as jchauncey
<apeiros_> also I hate it when people write literal integers with >4 digits without using _ as thousands separator…
<savant> sethetter: what do you mean by that
<savant> <3 jekyll
<savant> im a jekyll master
bpgoldsb has quit [Remote host closed the connection]
bpgoldsb has joined #ruby
eykosioux has joined #ruby
<lectrick> apeiros_: the o flag? on a regex literal you mean?
SilverMonkey has quit [Client Quit]
<apeiros_> lectrick: yessir
<lectrick> apeiros_: pardon my ignorance, what does that do? :)
eykosioux has quit [Client Quit]
<apeiros_> compile the regex only once. see ri Regexp ;-)
<lectrick> OH.
eykosioux has joined #ruby
<lectrick> interesting.
eykosioux has quit [Client Quit]
<sethetter> savant: I'm using {{ post.categories }} to list categories on each of my blog posts, but it's rendering them with no space or anything in between the words. Is there a way to specify a separator like ", "?
<Mon_Ouie> I'd like a 1eN integer literal for that kind of stuff (I usually use the 1e6.to_i)
<savant> cant you iterate over them?
eykosioux has joined #ruby
<apeiros_> Mon_Ouie: I use bench
<apeiros_> and bench invokes to_i :-)
<sethetter> savant: I could, wasn't sure if there was a shorter way similar to specifying date formats for post.date
emmanuelux has joined #ruby
<rippa> I'd like e-notation for literals too
<savant> no there isnt
<savant> just gotta iterate
<rippa> preferably using capital E
<apeiros_> so: mbench 1e3, 10, a: -> { code_a }, a: -> { code_b }, a: -> { code_c }
<savant> you can probably create a filter for it though
<apeiros_> whoops, should be a, b, c - of course…
jackiechan0 has quit [Quit: Sto andando via]
headius has quit [Quit: headius]
<rking> BTW for people that don't know about it, there's a pry plugin, pry-pretty-numeric, that causes long number output to have _'s.
<apeiros_> rking: !
<apeiros_> thanks
<rking> =D
<apeiros_> will get back at you wrt that
<apeiros_> but yeah, sure
<apeiros_> just override Fixnum/Bignum#inspect
<sethetter> savant: Thanks I'll give that a shot
emmanuelux has quit [Read error: Connection reset by peer]
d3vic3 has quit [Quit: leaving]
kuranai is now known as kuranai|off
akem has quit [Ping timeout: 244 seconds]
<rking> apeiros_: Yep, exactly what the plugin does is define Numeric#pretty_inspect with some gsub's.
yonggu_ has quit [Remote host closed the connection]
jeebster has joined #ruby
<apeiros_> rking: some? should only need one :)
imami|afk is now known as banseljaj
yonggu has joined #ruby
<rking> apeiros_: Integer part & fractional part.
<lectrick> apeiros_: Is it true that strings over 15 characters long are handled differently internally by Ruby? (perhaps they end up in the heap?)
<apeiros_> on integers?
<apeiros_> ah, you said it defines it on Numeric
<apeiros_> lectrick: in 1.9? yes
<lectrick> apeiros_: I added the O option to my gist.
asdfqwer has quit [Read error: No route to host]
<apeiros_> at least afaik. I never checked the source to verify it.
<apeiros_> was the limit 15?
<apeiros_> I thought it was higher…
welterde has quit [Ping timeout: 264 seconds]
<lectrick> It seems to be around there. Not sure exactly where.
sethetter has quit [Quit: Lost terminal]
<apeiros_> there was an article on ruby-flow by somebody who investigated it
<apeiros_> I think it was 23 or something
clockwize has quit [Quit: clockwize]
mengu_ has joined #ruby
<dr_bob> If in doubt it must be 42.
jimeh2 has quit [Ping timeout: 265 seconds]
emmanuelux has joined #ruby
d3vic3 has joined #ruby
<rking> Hrm, I'm not quite seeing it in string.c
youdonotexist has joined #ruby
<rking> I am seeing that the minimum buffer size is 128, though.
<lectrick> apeiros_: https://github.com/ruby/ruby/blob/trunk/string.c : #define RUBY_MAX_CHAR_LEN 16
<rking> lectrick: Look further down, the only place that is used in the whole codebase is inside an #if 0
mengu has quit [Read error: Connection reset by peer]
Nahra has joined #ruby
<lectrick> rking: dirty code :)
ubercore has joined #ruby
<rking> Yep. =)
<lectrick> rking: anyway there seems to be a nonlinear jump in execution time for strings bigger than around that number
codefarmer has joined #ruby
codefarmer has left #ruby [#ruby]
<rking> lectrick: Interesting. Might simply be a CPU cache thing, but if there's code that causes that I'd like to know what.
dekroning has quit [Ping timeout: 252 seconds]
davidcelis has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
<lectrick> rking: cpu cache would be an interesting source of the delay too. thanks
codefarmer has joined #ruby
sallyz has joined #ruby
bpgoldsb has quit [Ping timeout: 272 seconds]
novodinia has joined #ruby
<rking> Hehe.
<lectrick> jinx
<apeiros_> lectrick: look for RSTRING_EMBED_LEN_MAX
<codefarmer> hi
<shevy> this article makes me sad
<shevy> "Not all strings are created equal"
<shevy> :(
<shevy> I demand fair rights, equality for all my string brothers and sisters
becom33 has joined #ruby
bpgoldsb has joined #ruby
<apeiros_> shevy: life is cruel.
<shevy> Liberté, égalité, stringité
<rking> Haha
<shevy> nice blog article though
<rking> Very nice.
looopy has joined #ruby
<zaargy> i have a gem that conflicts with another gem from another package.
ephemerian has quit [Quit: Leaving.]
<shevy> cool... we have ... "Heap Strings" "Shared Strings" and "Embedded Strings"
<zaargy> how do i make the first gem use an older version of the second gem.
<becom33> guys what are the simple scripiting frameworks you guys know of ? which I can use for a simple app ?
<zaargy> hmm. maybe id idn't explain that v. well. :S
<shevy> becom33 a framework for what purpose precisely
welterde has joined #ruby
<zii> https://github.com/styleguide/ruby <-- in the Regular Expressions section, does ?<> syntax actually define local variables?
<becom33> umm nervermind nervermind
<apeiros_> zii: only under very strict conditions
<apeiros_> iirc, it must be a literal regex, on the lhs of an =~ call, and it must not contain any interpolation sequences.
<zii> Oh, I was doing it the other way around.
dekroning has joined #ruby
<rking> zii: Also it's (?<>…), not simply ?<>…
<apeiros_> true
<lectrick> shevy/rking: It's almost like I didn't want to know about that implementation detail, because now it might affect my lovely interpreted code :O
cpruitt has joined #ruby
<rking> lectrick: Meh. It's a good speed hack. Remember PO=ROE.
<shevy> lectrick well the thing in ruby is, I care little about +0,00005% speed improvements
<lectrick> rking: post optimization = ?
niklasb has joined #ruby
<lectrick> shevy: Yeah, true. But if you have some code that is only dealing with strings it might be interesting to keep in mind.
BeLucid has quit [Read error: Connection reset by peer]
<shevy> it would be really awkward to use a language like ruby, and then spend time going into speeding up things
<rking> lectrick: Premature Optimization is the Root of all Evil.
<lectrick> ahaha.
evangelion has quit [Quit: Leaving]
<lectrick> rking: It's ok if it's covered by tests, right? Right? :)
BeLucid has joined #ruby
<rking> As they say: 1. Make it work (passes all tests), 2. Make it right (is refactored), 3. Make it fast (using profiling + benchmarking)
mockillo has quit [Ping timeout: 252 seconds]
mockillo has joined #ruby
srnty has quit [Ping timeout: 260 seconds]
<shevy> rking, but what if it still sucks after doing all that?
visof has quit [Ping timeout: 272 seconds]
dekroning has quit [Quit: leaving]
DrShoggoth has joined #ruby
MasterLambaster has quit [Quit: MasterLambaster]
<rking> shevy: Then uhh... apply the uh... Law of Demeter.
<Mon_Ouie> If it sucks after you did all that, you didn't do all that
bpgoldsb has quit [Remote host closed the connection]
robotmay has quit [Remote host closed the connection]
crescendo has quit [Read error: Connection reset by peer]
yosinof has quit [Remote host closed the connection]
sallyz has quit [Ping timeout: 245 seconds]
savage- has joined #ruby
bpgoldsb has joined #ruby
EzeQL has joined #ruby
fr0gprince_ has quit [Ping timeout: 244 seconds]
d3c has quit [Read error: Connection reset by peer]
nipra has quit [Ping timeout: 252 seconds]
afallows has quit [Ping timeout: 240 seconds]
yosinof has joined #ruby
kenichi has joined #ruby
tsou has joined #ruby
cha1tanya has quit [Ping timeout: 260 seconds]
MasterLambaster has joined #ruby
MasterLambaster has quit [Read error: Connection reset by peer]
MasterLambaster has joined #ruby
raul782_ has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
MasterLambaster has quit [Client Quit]
fr0gprince_ has joined #ruby
elliot98 has quit [Quit: Konversation terminated!]
bpgoldsb has quit [Ping timeout: 248 seconds]
huamm has joined #ruby
bpgoldsb_ has joined #ruby
a_a_g has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
a_a_g has quit [Client Quit]
davidcelis has quit [Ping timeout: 248 seconds]
manxingxing_ has joined #ruby
mpereira has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
scriptmonkey has joined #ruby
ybit2 has joined #ruby
raul782 has quit [Ping timeout: 260 seconds]
Eldariof-ru has quit [Ping timeout: 245 seconds]
Araxia_ has joined #ruby
a_a_g has joined #ruby
cbuxton has joined #ruby
rakm has joined #ruby
fayimora has quit [Quit: Busy…..zzzzz]
liluo has quit [Remote host closed the connection]
MasterIdler has joined #ruby
scriptmonkey has quit [Quit: Page closed]
huamm has quit [Ping timeout: 245 seconds]
foofoobar has quit [Quit: bb]
scriptmonkey_ has joined #ruby
etehtsea has quit []
bluOxigen has quit [Ping timeout: 255 seconds]
<scriptmonkey_> I am new and have a couple dumb questions, so I will apologize in advance.
iocor has quit [Quit: Computer has gone to sleep.]
<savant> you better be sorry
<savant> ;)
<scriptmonkey_> I have my new cool object. lets call it Host. (for server information)
keithcelt has joined #ruby
<savant> cool
<scriptmonkey_> what is the best way to to have may Hosts ? do I new a new myhosts = Hash.new ?
<savant> that seems legit
<savant> if you need them named
<savant> if you just have a collection, use an array
kenperkins has joined #ruby
<scriptmonkey_> then for each hash entry do myhosts["kirk"] = Host.new
<becom33> http://pastie.org/3926205 I have few question . first of all why am I getting a name error at line 4 ?
<savant> yeah that works
<becom33> sorry line 8
<becom33> test.rb:8: uninitialized constant Ist (NameError)
<ccooke> scriptmonkey_: how do you need to access them? By name? Use a hash. Sequentially? an array. By something more complex? Maybe some class methods on the Host class, with underlying storage as Array or Hash as needed.
<carloslopes> scriptmonkey_: use symbols for keys (if you could), it's better :)
cha1tanya has joined #ruby
malkomalko has joined #ruby
<apeiros_> becom33: because Ist isn't defined at that point
ubercore has quit [Ping timeout: 252 seconds]
<becom33> aww it should be on top
manxingxing_ has left #ruby [#ruby]
<apeiros_> also note that initializing a global in a class serves no purpose. it's the same as doing it outside the class.
<savant> why are symbols better?
<apeiros_> (line 5)
<savant> I was always confused by that when writing chef config stuff
<apeiros_> becom33: line 13 you probably have another name error (commands)
<scriptmonkey_> so, then my follow up question. can I have a method on my Hosts object that can operate on the entire hash? or do I have to interate through the hash?
<carloslopes> savant: every time you put 'string' in your program, it create a new object, if you write any times a symbol, it is only one object (the same)
<savant> ah
<savant> interesting
<carloslopes> savant: so, for some cases it's better to use symbols
<savant> scriptmonkey_: hosts.each {|host| do_something(host) }
vmatiyko has joined #ruby
bpgoldsb_ has quit [Ping timeout: 248 seconds]
<carloslopes> savant: and hash keys are one of this cases :) (of course it depends of your context too)
<savant> scriptmonkey_: @hosts.each {|host| do_something(host) }
<savant> or whatever
<savant> carloshpf: cool, good to know
bpgoldsb has joined #ruby
CannedCorn has joined #ruby
<apeiros_> scriptmonkey_: you may want to have an additional class "Hosts" then, which contains the hash of hosts
suppp has joined #ruby
<apeiros_> and on which you define all those methods that should affect all hosts in that Hosts instance
<CannedCorn> guys what is the best way to check if a string is compatible with utf-8 encoding?
<CannedCorn> if Encoding.compatible?(str.encoding, "".encode('utf-8'))
<Sou|cutter> yeah. Don't be afraid to create classes - Hashes aren't the end-all
codefarmer has quit [Read error: Connection reset by peer]
yonggu_ has joined #ruby
CheeToS has quit [Ping timeout: 245 seconds]
LBRapid has quit [Ping timeout: 244 seconds]
gilead has quit [Quit: Leaving]
fayimora has joined #ruby
ubercore has joined #ruby
maesbn has quit [Remote host closed the connection]
<Sou|cutter> CannedCorn: try that out, I guess. Looking through the API I'm not seeing anything more obvious
<Sou|cutter> CannedCorn: maybe str.force_encoding('UTF-8').valid_encoding? (not sure if that tries to do any conversion at all...)
yonggu has quit [Ping timeout: 272 seconds]
[edu] has quit [Quit: [edu]]
<scriptmonkey_> if I created a new class to host the individual records, I wold I inherit the new class from Hash?
<becom33> shevy, I really need your help on this
<savant> no you dont need to
dr_bob has quit [Read error: Connection reset by peer]
<carloslopes> hmm enconding stuffs always make me confused :(
<savant> you can have an embedded attribute
looopy has quit [Remote host closed the connection]
iocor has joined #ruby
univers has joined #ruby
<Sou|cutter> CannedCorn: side-note, seems like a wtf that String has a bunch of 'is' methods. isutf() etc
<Sou|cutter> err isutf8()
LBRapid has joined #ruby
<becom33> well this script is written normally to get commands out from another class , the methods are used as commands
timonv has quit [Remote host closed the connection]
afallows has joined #ruby
<becom33> now there is this new two modules comes alone and it also has methods as command . how can I use those commands in the prompt
looopy has joined #ruby
<Sou|cutter> CannedCorn: another option is to use exception handling. begin str.encode('UTF-8') rescue...
maletor has joined #ruby
ackz has quit [Remote host closed the connection]
test34- has quit [Ping timeout: 260 seconds]
<becom33> now there is this new two modules comes alone and it also has methods as command . how can I use those commands in the prompt http://pastie.org/3926270 ..can anyone help ?
test34 has joined #ruby
ackz has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
nlc has joined #ruby
dr_bob has joined #ruby
<Hanmac> Sou|cutter where did you see an isutf8() method?? it is not in ruby
beneggett has joined #ruby
<becom33> anyone
<becom33> ?
<Mon_Ouie> .force_encoding("utf-8").valid_encoding?
[edu] has joined #ruby
<Mon_Ouie> rescuing encode isn't going to work
yosinof has quit [Read error: Connection reset by peer]
* Sou|cutter scratches his head
cordoval has joined #ruby
<Sou|cutter> Mon_Ouie: why won't rescuing encode going to work?
<Mon_Ouie> Because encode will convert the string
cordoval has left #ruby [#ruby]
kpshek has quit []
<becom33> anyone for me ?
<Sou|cutter> Mon_Ouie: no it won't
<Mon_Ouie> You can have a valid ISO-whatever string, which is not valid UTF-8
<Sou|cutter> I mean yes, it will
<Mon_Ouie> And encode will not raise an exception in that case
<Sou|cutter> but it's not encode!
stkowski has joined #ruby
<Sou|cutter> Mon_Ouie: it won't?
<Mon_Ouie> Why would it?
mong has joined #ruby
MasterLambaster has joined #ruby
<Mon_Ouie> It can convert ISO to UTF-8 just fine, that's what it's supposed to do
<Sou|cutter> Mon_Ouie: I guess I am confused about what CannedCorn means by compatible, then
<Sou|cutter> to me compatible means convertable
<Sou|cutter> if it doesn't mean convertible, then yes, the force_encoding('UTF-8').valid_encoding? seems like a slam dunk
kpshek has joined #ruby
khakimov has joined #ruby
<Mon_Ouie> Compatible means that it is a valid byte sequence in UTF-8
<Mon_Ouie> "test\xE9" isn't valid UTF-8, but that_string.encode("UTF-8") won't raise any exception
<Sou|cutter> Mon_Ouie: I accept that as an interpretation, yes.
<CannedCorn> well if you have ASCII that should be considered utf-8 compatible
<CannedCorn> for example
<Mon_Ouie> Yes
<Hanmac> Sou|cutter: http://www.ruby-doc.org/core-1.9.3/String.html << has no "isutf8" so your doc page is broken
<Sou|cutter> yep
panpainter has joined #ruby
<Sou|cutter> Hanmac: yeah, I noticed. That's weird
<Mon_Ouie> Those methods come from lib/kconv.rb
<Mon_Ouie> ext/nkf/lib/kconv.rb
schovi has joined #ruby
<Mon_Ouie> And that's implemented as I said, btw :p
<Mon_Ouie> str.dup.force_encoding(UTF8).valid_encoding?
<Mon_Ouie> (just with dup to avoid changing the encoding of the initial string)
<Sou|cutter> Mon_Ouie: if you read upwards, that was what I suggested before the rescue thing
schaerli_ has joined #ruby
<Sou|cutter> I just wasn't sure if CannedCorn was using a strict definition of compatible, or a looser one
<CannedCorn> i want to raise an error if the string is not valid utf8?
<CannedCorn> hrm
schaerli has quit [Read error: Operation timed out]
abra has quit [Ping timeout: 276 seconds]
ghanima has quit [Ping timeout: 244 seconds]
<Mon_Ouie> Sou|cutter: I'm not sure what you mean… upwards is where I found the reference to that method.
cha1tanya has quit [Quit: Leaving]
<becom33> now there is this new two modules comes alone and it also has methods as command . how can I use those commands in the prompt http://pastie.org/3926270 ..can anyone help ?
<becom33> now there is this new two modules comes alone and it also has methods as command . how can I use those commands in the prompt
<Sou|cutter> Mon_Ouie: ok... I'm confused, I think we're on the same page
abra has joined #ruby
<CannedCorn> duping the string is expensive though
<Mon_Ouie> No it's not
<Mon_Ouie> Ruby uses copy-on-write
nowthatsamatt has joined #ruby
nowthatsamatt has left #ruby [#ruby]
carloslopes has quit [Ping timeout: 245 seconds]
<becom33> oh come on no one ?
<robacarp> becom33: I can't even understand what you're asking.
ixti has joined #ruby
<becom33> robacarp, did you see my script ?
<becom33> I'll explain one by one. please open the script and tell me
shruggar has joined #ruby
<CannedCorn> why does this complain that str is frozen str.force_encoding('binary')
tsd_usa has quit [Quit: tsd_usa]
<CannedCorn> when str.frozen? is false
<becom33> robacarp, did you ?
Rickmasta has joined #ruby
davidcelis has joined #ruby
<Mon_Ouie> Can you show an example? It is more likely for str to actually be frozen than for Ruby to be wrong
<becom33> robacarp, ? :(
<robacarp> becom33: chill man, I'm trying to read what your pastie says...
<becom33> robacarp,
<becom33> go wid me
<becom33> robacarp, read from bottom to top . might easire that way
<becom33> anyway robacarp the class Prompt is using commands on CmdLst class . the "methods" are used as "commands" . ok ?
<becom33> robacarp, did u get that ?
cordoval has joined #ruby
philcrissman has quit [Remote host closed the connection]
cordoval has left #ruby [#ruby]
chrismcg is now known as zz_chrismcg
sameerynho has joined #ruby
<eam> how do I figure out my architecture from within ruby? i386 vs x86_64
wvdschel has joined #ruby
burgestrand has joined #ruby
lxsameer has quit [Ping timeout: 250 seconds]
<a_a_g> RUBY_PATFORM
francisfish has quit [Remote host closed the connection]
iocor has quit [Quit: Computer has gone to sleep.]
<eam> a_a_g: oh great, thanks
<Hanmac> eam RUBY_PLATFORM but is mostly not your architecture, its the architecture of ruby with is sometimes not the same
<eam> Hanmac: yeah, that's what I'm looking for -- I need it because syscall() numbers change depending on whether ruby is build 32/64bit on linux
burgestrand has quit [Remote host closed the connection]
<CannedCorn> Mon_Ouie str.dup.force_encoding(UTF8).valid_encoding? doesn't do anything
<eam> I don't suppose there's a handy import module for those, btw, similar to syscall.ph in perl?
TheFuzzball has joined #ruby
<becom33> umm robacarp
<becom33> ??
<CannedCorn> force_encoding.valid_encoding doesn't actually check the bytes
ubercore has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
burgestrand has joined #ruby
<Hanmac> eam, you mean calling bash commands?
<eam> Hanmac: no, I'm implementing an IO.poll()
<Mon_Ouie> CannedCorn: What do you mean? It returns true if the string is valid in some encoding, false otherwise
<eam> (or, trying to)
timonv has joined #ruby
<Mon_Ouie> "test\xE9".dup.force_encoding("utf-8").valid_encoding? #=> false
strnx has joined #ruby
<eam> I'm hitting the compile-time 1024 fd limit in IO.select, and I can't find any notification modules for ruby that do libevent, poll, etc
christianrojas has quit [Quit: Leaving...]
<Hanmac> eam about architecture, i have an 64 bit system, but i can run 32 bit programs and i have 32 bit libraries, so you may be fool'd with your platform check
yosinof has joined #ruby
<eam> Hanmac: yeah, I think RUBY_PLATFORM should be giving me the architecture of the ruby interpreter, which is what I want
<eam> an x86_64 kernel uses a separate syscall dispatch table depending on the architecture of the process
<eam> eg poll = 168 for a 32bit ruby and 7 for a 64bit ruby
<Hanmac> eam ... ruby has a syscall function :P
c0rn has joined #ruby
hasrb has joined #ruby
jaystay has quit [Quit: jaystay]
banjara has joined #ruby
banjara has quit [Changing host]
banjara has joined #ruby
srnty has joined #ruby
<becom33> i guess robacarp is AFK :/
kpshek has quit []
<becom33> can anyone else help me ?
<becom33> now there is this new two modules comes alone and it also has methods as command . how can I use those commands in the prompt
<becom33> now there is this new two modules comes alone and it also has methods as command . how can I use those commands in the prompt http://pastie.org/3926270 ..can anyone help ?
shruggar has quit [Quit: Leaving.]
<Hanmac> eam: ri has an interesting waring about syscall: "syscall is essentially unsafe and unportable. Feel free to shoot your foot." :P
<eam> Hanmac: yeah, but it expects the raw syscall number, which varies depending on the architecture
<eam> perl has a nice syscall.ph which handles this for you, mapping the syscall name to the particular dispatch number
<eam> Hanmac: and it's way unsafe :)
alienvenom has quit [Ping timeout: 240 seconds]
sparrovv has quit [Ping timeout: 244 seconds]
<eam> I don't know that I'd call poll unportable though, any reasonable unix supports it
<CannedCorn> Mon_Ouie the problem is I've got a string "\xC3\xB6".force_encoding("ISO-8859-1")
<CannedCorn> and when i try the check you suggest, id passes
<eam> 1.9 uses poll internally on linux, but I'm stuck with 1.8 for now
<becom33> no one for me ?
<Hanmac> "stuck with 1.8" ... i feel sorry for you ... or should i say: "HaHa"
<eam> Hanmac: gotta support RHEL system interpreter -- I don't use it for apps though
<eam> :(
stkowski has quit [Quit: stkowski]
ryannielson has joined #ruby
ryannielson has quit [Client Quit]
jaystay has joined #ruby
<eam> looks like even in 1.9 though, ruby doesn't have access to any current-gen notification systems
ryannielson has joined #ruby
mcwise has joined #ruby
davidcelis has quit [Quit: K-Lined]
<eam> there's eventmachine, but that's useless if you're after notification and not a all-or-nothing event driven processing model
stephenjudkins has joined #ruby
looopy has quit [Remote host closed the connection]
<Mon_Ouie> CannedCorn: You mean you're checking if it's valid ISO-8859-1? If so, it works because it *is*
<Mon_Ouie> And it's ö in UTF-8 so it's valid there too
wvdschel has quit [Read error: Connection reset by peer]
twixmix has quit [Ping timeout: 244 seconds]
<CannedCorn> ISO-8859-1 isn't valid utf-8 though
adamkittelson has joined #ruby
jaystay has quit [Client Quit]
<Mon_Ouie> No, but that particular sequence you have is — it just doesn't mean the same thing in both encodings
<becom33> no one for me ?
<becom33> now there is this new two modules comes alone and it also has methods as command . how can I use those commands in the prompt http://pastie.org/3926270 ..can anyone help ?
uris_ has joined #ruby
uris has quit [Read error: Connection reset by peer]
banseljaj is now known as imami|afk
uris_ has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
uris has joined #ruby
looopy has joined #ruby
bluOxigen has joined #ruby
theRoUS has quit [Read error: Connection reset by peer]
b1rkh0ff has quit [Ping timeout: 272 seconds]
eykosioux has quit [Quit: eykosioux]
<becom33> http://pastie.org/3926270 in this paste . i've made a class called "Prompt" which passes the commands to the class "CmdList" in CmdList class the methods are used as commands . now the problem is I have two modules "FirstModule","SecondModule" in that also we have methods . I want use those methos as commands . how can I do that ? the folder structure is mentioned in the script . please help
snearch has quit [Quit: Verlassend]
kpshek has joined #ruby
cordoval has joined #ruby
cordoval has left #ruby [#ruby]
wvdschel has joined #ruby
wvdschel has quit [Changing host]
wvdschel has joined #ruby
StevenR12 has left #ruby [#ruby]
a_a_g has quit [Ping timeout: 256 seconds]
alienvenom has joined #ruby
inteq has joined #ruby
jackiechan0 has joined #ruby
jackiechan0 has left #ruby [#ruby]
raul782_ has quit [Remote host closed the connection]
ubercore has joined #ruby
luxurymode has quit [Ping timeout: 244 seconds]
gokul has joined #ruby
brianpWins has joined #ruby
MasterLambaster has quit [Quit: MasterLambaster]
kenichi has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
carloslopes has joined #ruby
ubercore has quit [Client Quit]
jaystay has joined #ruby
a_a_g has joined #ruby
walbert has joined #ruby
novodinia has quit [Quit: leaving]
axl_ has joined #ruby
<Progster> Ubuntu 12.04 - I just installed rvm, and now all of a sudden I'm not in the sudoers file anymore... Can't run su or su -, says authentication failure. WTF?
andev has joined #ruby
phantasm66 has joined #ruby
<lectrick> I am trying to follow http://guides.rubyonrails.org/rails_on_rack.html and this line throws an exception on undefined "middleware" method: ActionController::Dispatcher.middleware = ActionController::MiddlewareStack.new do |m|
<lectrick> crap wrong channel sorry
<Hanmac> haha xD Progster what happendif you remove rvm?
youdonotexist_ has joined #ruby
youdonotexist_ has quit [Client Quit]
kpshek has quit []
b1rkh0ff has joined #ruby
gyre007 has quit [Quit: Ex-Chat]
ubercore has joined #ruby
kpshek has joined #ruby
voodoofish430 has joined #ruby
felipec has joined #ruby
khakimov has joined #ruby
andantino has joined #ruby
andantino has quit [Changing host]
andantino has joined #ruby
<felipec> is there a way to do `command`.each_line that iterates on each one as they come instead of waiting for the whole output?
jlogsdon has joined #ruby
kenichi has joined #ruby
jayrulez has quit [Ping timeout: 245 seconds]
crankyco_ has quit [Remote host closed the connection]
<Progster> I didn't try removing it yet
<Mon_Ouie> felipec: Use IO.popen
<Mon_Ouie> That way you can use IO#each_line which does what you want
crankycoder has joined #ruby
<felipec> Mon_Ouie: all right, I thought something like that might be needed =/
youdonotexist_ has joined #ruby
<Mon_Ouie> Why "=/"? It's not hard, just a few more lines
jayrulez has joined #ruby
nfluxx has joined #ruby
youdonotexist has quit [Ping timeout: 244 seconds]
youdonotexist_ is now known as youdonotexist
<Progster> why I'm so confused right now
Ripp__ has joined #ruby
SphericalCow has joined #ruby
jchauncey has quit [Quit: jchauncey]
stkowski has joined #ruby
shruggar has joined #ruby
h4mz1d has quit [Ping timeout: 272 seconds]
jameshyde has joined #ruby
scb has joined #ruby
otters has joined #ruby
weasels has quit [Read error: Connection reset by peer]
schaerli_ has quit [Remote host closed the connection]
mong has left #ruby [#ruby]
jgarvey has joined #ruby
pdtpatrick has joined #ruby
adambeynon has quit [Quit: adambeynon]
timonv has quit [Remote host closed the connection]
niku4i has joined #ruby
moosya_ has quit [Quit: moosya_]
shruggar has quit [Ping timeout: 240 seconds]
<shevy> becom33, looks quite complicated
<CannedCorn> is there a C function to get a string encoding?
<CannedCorn> i've got to do the same thing in c now
ddv has joined #ruby
k4mirox has joined #ruby
CannedCorn has quit [Remote host closed the connection]
carloslopes has quit [Ping timeout: 272 seconds]
Targen has quit [Ping timeout: 255 seconds]
CannedCorn has joined #ruby
CannedCorn has quit [Client Quit]
imami|afk is now known as banseljaj
wilmoore has joined #ruby
<becom33> yes plz help
lindenle has joined #ruby
<becom33> shevy,
moosya has joined #ruby
gokul has quit [Quit: Leaving]
CannedCorn has joined #ruby
<lindenle> I am using %x{diff -U 1000 <(echo #{ostring}) <(echo #{nstring})} and getting unexpected ")" do I need to escape something?
zeromodulus has joined #ruby
<becom33> shevy, did u look at the sciript
<shevy> becom33 yeah but it seems messy
mdw has quit [Remote host closed the connection]
<shevy> in my opinion, complexity is the real root of all evil that is in software
theRoUS has joined #ruby
<becom33> shevy, would it be fullfull if I explianed one by one . its not that complication . maby the way I explained its complicated
<apeiros_> lindenle: the error might be in an earlier line
<becom33> please I really need a help
<yxhuvud> shevy: yes. The problem is that it is also the source of all functionality.
<apeiros_> the part you pasted looks fine
<lindenle> apeiros_: it goes away when I comment out this line
<shevy> yxhuvud nah, that's like saying simple code would be useless
<shevy> becom33 sure, explain, but start with this ... what is this code trying to solve?
<yxhuvud> shevy: get enough simple code and it will be complex.
d3c has joined #ruby
<becom33> shevy, its somthing I'm trying to write
<becom33> shevy, hold on ok
<lindenle> apeiros_: when I print the line (puts) and then paste it back into terminal it works
<shevy> btw are you sure you want to use modules becom33 ?
<becom33> shevy, yes . thats the problem I'm having
d3c has quit [Read error: Connection reset by peer]
<shevy> becom33 also, why do you subclass but dont call super ?
<shevy> next thing - you use cmd
<becom33> shevy, I dont underand
ukwiz has quit [Quit: Leaving]
<shevy> becom33, man
felipec has quit [Remote host closed the connection]
<shevy> do you know super
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 250 seconds]
<shevy> btw, does the while loop work?
<shevy> while cmd = Readline.readline($prompt+">", true)
<lindenle> what is %x called anyway, I want to look it up
<shevy> because without trying to understand it, it feels very strange
khakimov has quit [Quit: Computer has gone to sleep.]
<becom33> shevy, yes the while loop works . the script works . only problem Im having getting modules inside of this
<becom33> well yea the super class in CmdLst
<becom33> is *
d3c has joined #ruby
headius has joined #ruby
<shevy> ok
<shevy> where do you use include NameOfModule?
<shevy> in other words
Criztian has joined #ruby
<shevy> where do you tell ruby what modules to use?
<shevy> also I would change things like "def mod(ino=nil)" to "def mod(ino = nil)" I find that easier to read
<becom33> shevy, at the moment I havnt coz I need to fix the logic 1st
* yxhuvud prefer def mod ino=nil
<becom33> shevy, the problem Im having do you see the my dir sturcture in the bottom ?
macer1 has joined #ruby
macer1 has quit [Changing host]
macer1 has joined #ruby
carloslopes has joined #ruby
cj3kim has joined #ruby
<becom33> see in the module dir I have two more dir's with module names . like that there would be more modules . everytime I create a module I want it automaticlly to be used in the script
<Hanmac> becom33 you did to tell ruby to require the files and include the modules ... ruby is not rails, it doesnt do anything on its own
flip_digits has joined #ruby
<becom33> Manman in this script I havnt . coz its in the same script I havnt . the other thing I havnt thought how to use the modules so
tatsuya_o has quit [Remote host closed the connection]
<becom33> i know rail is a framework
<becom33> shevy, so what you think ?
headius has quit [Quit: headius]
<shevy> becom33 I have no idea what I think
<shevy> I want to know where you include your module
<becom33> shevy, I havnt yet
sallyz has joined #ruby
<becom33> I want to use the module but I dont know how can I do that . i know require 'module' and include Module . its not what Im asking
<shevy> if you want to load all your modules into a class at runtime, load them all then do extend
blacktulip has joined #ruby
<shevy> *use .extend
<becom33> I want to load all my modules like in the bottom sturcture
<becom33> shevy, whats extend is used for ?
<shevy> and where is the problem, give the path to it to require
<becom33> shevy, the problem is . think them as actuall modules of a framework ?
<becom33> like when you write a module you don't go and do require module and in the core framework script right ?
wargasm has joined #ruby
S2kx has joined #ruby
<shevy> becom33, here for .extend http://pastie.org/3926705
<shevy> I really have no idea what you are talking about becom33 . think of all your files being a part of one huge .rb file
schovi_ has joined #ruby
withnale_ has joined #ruby
<shevy> you simply have to pass the name of the modules to your object, if you cant include it in its class
aef_ has joined #ruby
<becom33> shevy, Those are sepere files . :/ I Have mentioned the stucture of the files in the bottom of the script
Kwpolska_ has joined #ruby
<shevy> what is the problem
<shevy> require 'this/is/the/path/you/use/bla.rb'
sohocoke_ has joined #ruby
<becom33> shevy, no no I know that
<becom33> ok ok
jadon has joined #ruby
<shevy> require 'this/is/really/a/simple/concept/why/does/it/not/work/for/you/foo.rb'
<becom33> think I need to write a framework
adamkitt_ has joined #ruby
adamkittelson has quit [*.net *.split]
schovi has quit [*.net *.split]
gosshedd has quit [*.net *.split]
krusty_ar has quit [*.net *.split]
tommyvyo has quit [*.net *.split]
sohocoke has quit [*.net *.split]
aef has quit [*.net *.split]
skogis has quit [*.net *.split]
nopper has quit [*.net *.split]
withnale has quit [*.net *.split]
Kwpolska has quit [*.net *.split]
Ammar01 has quit [*.net *.split]
dv_ has quit [*.net *.split]
busybox42 has quit [*.net *.split]
S1kx has quit [*.net *.split]
mfridh has quit [*.net *.split]
Shamgar has quit [*.net *.split]
lindenle_ has quit [*.net *.split]
patronus has quit [*.net *.split]
xoebus has quit [*.net *.split]
brian- has quit [*.net *.split]
ged has quit [*.net *.split]
musl has quit [*.net *.split]
withnale_ is now known as withnale
sohocoke_ is now known as sohocoke
<becom33> a very basic simple one
<becom33> what the hell ? all those were bots ?
c0rn has quit [Ping timeout: 248 seconds]
schovi_ has quit [Remote host closed the connection]
mfridh has joined #ruby
krusty_ar has joined #ruby
Ammar01 has joined #ruby
Shamgar has joined #ruby
patronus has joined #ruby
xoebus has joined #ruby
lindenle_ has joined #ruby
brian- has joined #ruby
ged has joined #ruby
musl has joined #ruby
dv_ has joined #ruby
kvirani has joined #ruby
busybox42 has joined #ruby
<Mon_Ouie> Net split has nothing to do with bots
tommyvyo has joined #ruby
krusty_ar has quit [Quit: I'm not here. This isn't happening]
musl has quit [Max SendQ exceeded]
skogis has joined #ruby
josefig has quit [Ping timeout: 272 seconds]
krusty_ar has joined #ruby
<shevy> becom33 you could make a project too
sebastorama has joined #ruby
alanp has quit [Remote host closed the connection]
<becom33> shevy, think I have to write a very basic framework .and I need a add plugins . and those modules are plugins
<becom33> umm ?
gosshedd has joined #ruby
c0rn has joined #ruby
<shevy> becom33 the code I showed you does not work for you?
Eldariof-ru has joined #ruby
<shevy> collect all your fancy modules into an array, then do array.each {|a| bar.extend a}
<Hanmac> a framework i knew it!! :P
<Mon_Ouie> A framework is just a fancy name for a library that forces certain ways of structuring code on you
musl has joined #ruby
alanp has joined #ruby
<becom33> shevy, just think of those Prompt, CmdLst, CmdLst are core classes . and the FirstModule , SecondModule as plugins . the methods in those modules/plugins . should be able to use commands in the core prompt
ryannielson has quit [Quit: ryannielson]
fukushima has quit [Quit: Leaving...]
clockwize has joined #ruby
<Icehawk78> Hopefully a simple question - does anyone know how to add a filter using the sequel gem to select rows where a column is null?
niku4i has quit [Remote host closed the connection]
clockwize has quit [Client Quit]
Soul_Est has joined #ruby
<Icehawk78> All of my attempts so far have either removed the expression from the sql's where clause, or appended (1 == 0)
nopper has joined #ruby
<becom33> ??
<becom33> shevy,
jaystay has quit [Quit: jaystay]
<becom33> please shevy can you do a example thing in the the script I gave you ? please will be a big help to undertand
clockwize has joined #ruby
<clockwize> hey guys
c0rn_ has joined #ruby
keanehsiao has quit [Quit: Leaving...]
eywu has joined #ruby
<clockwize> how can i start a process, getting back its PID, then kill it later?
<shevy> becom33 the problem is, I have no idea what you want or need really. I take it that you want to (a) load some modules (b) extend one of your classes with all these modules
<shevy> but unless I have missed something, I told you already and showed you already how to do that, via .extend
walbert has quit []
<becom33> shevy, forget about my script for a second
jaystay has joined #ruby
ben- has quit [Ping timeout: 245 seconds]
<Synthead> if I have string = 'this' and array = [ 'this', 'that' ], how can I check if string exists as an element in array?
scb_ has joined #ruby
ericalexander has joined #ruby
luxurymode has joined #ruby
scb has quit [Ping timeout: 252 seconds]
<Hanmac> synthead: array.include?(string)
<becom33> thing of a basic framework . where you can add plguins . and methods inside plugin script works as commands
<Synthead> Hanmac: thanks :D
<savant> becom33: like rake?
<shevy> becom33 what do you mean with "commands"
<becom33> savant, hmm I donno I havnt use rake
ben- has joined #ruby
mahmoudimus has joined #ruby
<becom33> my commands are methods inside the class or the module
<savant> what does your framework do
<savant> is it a web framework?
jgrevich has joined #ruby
<becom33> savage-, no scripting framework
stroem has joined #ruby
<shevy> I feel this is all hopeless
<becom33> I just need a very simple very basic framework be done . I have almost . im just stuck in this last part of modules
<becom33> shevy, why
<savant> a scripting framework for what
<savant> what are you scripting
17SAA51V4 has joined #ruby
<becom33> savant, umm a security framework
<savant> a security framework?
<savant> like what
<becom33> like metasploit
TheIronWolf has joined #ruby
<savant> so it is a webapp?
<savant> or a command line tool
<Synthead> Hanmac: can I do something like this? match = [ /\Athis/, /\Athat/ ]; a = 'this stuff'; a.match ... (not sure) ?
<becom33> a command like tool
<savant> okay so why not just use rake?
<becom33> rake :/ I dnno about it
<savant> rake is a tool for creating command line utilities in ruby
<shevy> hmm how do I find out if my class has a method "foo" or not
<savant> its like make
<becom33> shevy, send does that
<shevy> no no I want to find out before using .send
Vert has quit [Read error: Connection reset by peer]
<savant> becom33: this is what I do to include arbitrary rake tasks in my rakefile https://github.com/josegonzalez/cimino/blob/master/Rakefile#L25
<becom33> shevy, i have it in my main script I removed it on the paste coz it could be complicated
<Hanmac> synthead: match.any? {|reg| a.match(reg)}
<becom33> savant, will you gime me permission to PM? I'll tell you exactly what I have in mind . you might be able to tell me if Im doing right or wrong
<savant> k
a_a_g has quit [Quit: Leaving.]
<savant> $65 USD an hour
<savant> minimum 3 hours
<becom33> O_O
<savant> you can pay me via paypal
<becom33> i dont have money :(
<savant> or venmo
<savant> oh thats sad
<savant> then you can do it in public
<savant> like a normal person
<becom33> :( ok
<shevy> :D
<savant> i'll tell you if you're doing it wrong for free
<Synthead> Hanmac: excellent, thank you!
<savant> dont worry im the 9th best developer in NYC
<savant> so i know what im talking about
<shevy> when you get stuck, try to see if you can solve the problem differently
<shevy> becom33, btw why do these have to be new modules?
<shevy> cant you simply extend the class?
mneorr has joined #ruby
timonv has joined #ruby
<becom33> shevy, umm extend what class ?
<savant> becom33: wats your idea
<savant> if you dont tell me, you're doing it wrong
<becom33> savant,
<becom33> jeez its very long explnation the whole idea :/
<savant> and you want to pm it to me?
<becom33> I dont have money
<savant> so then public irc it is!
<shevy> becom33 your parent class
<becom33> shevy, you mean CmdList
<shevy> becom33, why do you want to use modules actually?
<savant> i think you're doing it wrong
<becom33> shevy, actual meaning of the module
<savant> you should base your tool on rake
<shevy> ewww rake stinks
malkomalko has quit [Remote host closed the connection]
<savant> your mother stinks
<savant> something something nazis
<savant> there, argument over
<shevy> nothing worse than your mother savant
<savant> my mother is a saint
<shevy> in hell perhaps
<savant> probs
MasterLambaster has joined #ruby
<becom33> savant, ok I dont wanna explain . what If I PM you just a screen short of my work I've done so far ? you dont read . it will only take a minit look at
<savant> what if you just post it publicly
<savant> I PROMISE i wont steal your idea
<savant> scouts honor
<becom33> fine ..
<becom33> Im not worried about anyone stealin my idea . its going to be a open source script
banseljaj is now known as imami|afk
deobald__ has joined #ruby
<savant> so then post it
ryannielson has joined #ruby
<shevy> dont show it to savant becom33
<shevy> he will steal it
<savant> lolol
fukushima has joined #ruby
<savant> yes i need another repository on github
<shevy> it's not the quantity man
<shevy> it's the quality
<shevy> you showed this before but that is not you
<becom33> come on guys . Im not a programmer . i'm working my ass off googling everything about ruby . chatting with you people so I can put something out where other people might get use of do somthing worth . jeez help . I just need a help
<savant> that is totally me
<savant> becom33: post your things!
<shevy> becom33 ok let's do something else
<shevy> becom33 let's assume that whatever you plan to do, in your current way (which I still have not understood), is not possible that way
<savant> ^me
<shevy> then you need to come up with a new approach
<shevy> savant, I am too scared to click on that :(
<shevy> banisterfiend spoiled me for life
<savant> dude
<savant> its just a screenshot of my worksite
<savant> there
<shevy> no I am too scared
<savant> scroll to "Jose Diaz-Gonzalez"
<shevy> becom33, click on it first
<savant> wtf
<savant> trolllllll
<shevy> you apparently have never been a victim of banisterfiend's loneliness at night yet
<savant> nope
<shevy> I tell you, it scares the good things outta you quickly and leaves you whimpering on the ground
azm has quit [Ping timeout: 272 seconds]
[edu] has quit [Quit: [edu]]
<becom33> its paste
<becom33> shevy, savant
<savant> so you want an interactive command line tool, is that it?
DoLphE has joined #ruby
jbw has quit [Remote host closed the connection]
<becom33> savant, i dont know whats interactive . but I think you have a idea what I want
<savant> like you type
<savant> "fm"
<savant> and it brings up some questions you can answer
jbw has joined #ruby
<savant> and you can choose to quit or whatever whenever you need to
<becom33> fm is not a command
DoLphE has left #ruby [#ruby]
<savant> fm >
<savant> I assumed fm was the name of your tool
kuranai|off is now known as kuranai
macmartine has joined #ruby
<savant> how would I run your tool
moshee has quit [Ping timeout: 260 seconds]
uris has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
jaystay_ has joined #ruby
<becom33> savant, wait . you need see a screenshort
jaystay has quit [Read error: Connection reset by peer]
<savant> i saw it
<savant> i guess fm is the name of your user, or your machine
jaystay_ has quit [Client Quit]
<savant> i think you want to use rake
<savant> so you would have rake tasks
<savant> rake show
<savant> rake scan
francisfish has joined #ruby
schovi has joined #ruby
<savant> rake show exploits
<savant> etc.
<becom33> savant, no
<becom33> fm is not the name of my user
musl has quit [*.net *.split]
skogis has quit [*.net *.split]
mfridh has quit [*.net *.split]
Ammar01 has quit [*.net *.split]
Shamgar has quit [*.net *.split]
lindenle_ has quit [*.net *.split]
patronus has quit [*.net *.split]
xoebus has quit [*.net *.split]
brian- has quit [*.net *.split]
ged has quit [*.net *.split]
<savant> k
<becom33> did you look my 1st scrpt I posted
<becom33> >
snip_it is now known as 16SAA7V46
<savant> yes
snip_it has joined #ruby
musl has joined #ruby
Ammar01 has joined #ruby
mfridh has joined #ruby
skogis has joined #ruby
lindenle_ has joined #ruby
Shamgar has joined #ruby
patronus has joined #ruby
xoebus has joined #ruby
brian- has joined #ruby
ged has joined #ruby
<savant> it had
<savant> fm >
<savant> in the beginning
<savant> anyways that is not important
test34 has quit [Ping timeout: 260 seconds]
<becom33> savant, http://pastie.org/3926270 save it and run it
roolo has quit [Quit: Linkinus - http://linkinus.com]
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
16SAA7V46 has quit [Ping timeout: 240 seconds]
<becom33> savant, and type "name savant" and see then "age 21"
kirun has joined #ruby
shruggar has joined #ruby
wiwiwiwiwiwiwiwi has quit [Quit: WeeChat 0.3.7]
makerbreaker has joined #ruby
<savant> i dont want to
<becom33> savant, fm is readline
<makerbreaker> hi, i have a ruby script, that copies a usb drive to the HD using dd what is the "right way" to do it
<becom33> shevy, you here ?
<makerbreaker> ` dd ` runs out of memory, so does exec, system outputs to the console, but doesnt seem to write
davidpk has joined #ruby
Targen has joined #ruby
<becom33> shevy, ?
ronniy has quit [Remote host closed the connection]
<makkura> makerbreaker: I did something similar .. it moved files, not copied. I used FileUtils.mv .. i'm betting there's a copy command
<makerbreaker> i need to do a direct write though
Guedes has quit [Ping timeout: 244 seconds]
Heuristic has joined #ruby
<makerbreaker> so the boot sector etc, gets written
Guedes has joined #ruby
mneorr_ has joined #ruby
albemuth has quit [Quit: Leaving...]
<becom33> savant, ?
<makerbreaker> basically its dd if=/USBDRIVE of=/HARDDRIVE but nothing seems to do the trick
<becom33> you here ?
<savant> hi
<makkura> ahh.. executing the command externally like you've been trying is the best bet i know of.. Have you tried popen / popen3 (etc)?
<becom33> look at image tell please if you still thinks fm is username my OS
<makkura> that'll open the command as another thread
kpshek has quit []
<makerbreaker> makkura, ill give it a try thanks
<becom33> savant, did you ?
mneorr has quit [Ping timeout: 252 seconds]
<makkura> makerbreaker: that's all i've got for advice for that.. hopefully it helps :) I used it in my minecraft wrapper and it worked out pretty well
<makerbreaker> im just wondering how it handles memory
<makerbreaker> the limitation is that I think it may be reading 16G inot memory, then writing it?
<makkura> makerbreaker: mm well popen opens the given command in it's own thread, just like it would do so if you were running it on it's own
<makerbreaker> ah k
deobald__ has quit [Ping timeout: 260 seconds]
<savant> becom33: idk what fm is. doesn't matter though, its not pertinent to your issue. I just assumed you wanted an interactive cli tool
<makkura> makerbreaker: it just gives you the process id and the stdin / out .. popen3 gives you stderr as well
pika_pika has joined #ruby
<savant> if you want to build that tool that you have in the screenshot, i would just use rake
visof has quit [Ping timeout: 272 seconds]
<savant> you should me some module code that is not related to your screenshot
<savant> so i have no idea what you are trying to do
<savant> please do not show unrelated stuff
<becom33> fine savant wait
<savant> or if you are trying to show "generic" code, don't. thats like showing Foo and Bar classes
francisfish has quit [Remote host closed the connection]
ananthakumaran1 has quit [Quit: Leaving.]
albemuth has joined #ruby
<becom33> http://pastie.org/3926908 savant this is related to the code I showed you
carloshpf has quit [Ping timeout: 252 seconds]
<becom33> what do you get from that ?
<savant> okay so whats the problem with your code
<savant> i get that you're just checking the first word, trying to load some code, and then executing it
<becom33> savant, so the name and age are methods in CmdList class
Bonkers has quit [Quit: Leaving]
theRoUS has quit [Ping timeout: 260 seconds]
jchauncey has joined #ruby
<becom33> the first word is a method . second is the argvment passing to that methosd
<becom33> method *
test34 has joined #ruby
<savant> okay so whats the problem
albemuth has quit [Client Quit]
nlc has quit [Ping timeout: 272 seconds]
<becom33> so my problem is do you see the "FirstModule" and "SecondModule" ? i want those modules methods to be used as commands like ive done before
berserkr has quit [Quit: Leaving.]
ben- has quit [Ping timeout: 244 seconds]
17SAA51V4 has quit [Quit: 17SAA51V4]
<becom33> in the bottom of the script I have mentioned hows my folder stucture is going
kpshek has joined #ruby
<savant> okay so whats the problem again
<pika_pika> hi, it might be a noob question but i need to evaluate a bunch of expressions like: foo+(bar*baz/2) that are saved as strings in an array. Second array has objects that have attributes: name and value, where name is set to foo, bar, etc. and value is the value to be used in the expression. what would be the fastest way to acomplish that in ruby?
ben- has joined #ruby
<becom33> savant, thats the problem . how can I do it ? and the thing is "FirstModule" and "SecondModule" are just examples . there could be more 10-20 modules
<savant> first off
<savant> module folders should be like
<savant> first_module
<savant> not
<savant> firstmodule
<becom33> ok
<savant> then you can just Dir.glob() all your module folders
<savant> and require the files in each dir
<savant> once you name the folders properly
<savant> you can infer what the names of the modules are
<savant> and therefore you can use that to inspect the classes in the module
<becom33> ok
<savant> you also dont want to use modules
<savant> you should have a top-level module
<savant> CustomModule
<savant> i dont care what you call it
<savant> call it BananaHammock
<makkura> becom33: If you're trying to dynamically call in only the modules you need (as you use them) you'll need to have the module identified in the command and require them. It looks like that's what you're going for with the 'mod' function to me.
<savant> then you dont have "modules", you have "plugins"
<savant> and you have
<savant> plugins/first_plugin/something.rb
Heuristic has left #ruby [#ruby]
uris has joined #ruby
nlc has joined #ruby
<savant> module BananaHammock; Class MyClass; end; end
<savant> you would inspect the methods on that class
kpshek has quit []
rapind has joined #ruby
<savant> the reason for the BananaHammock module is so you dont shit all over modules in the public namespace
etehtsea has joined #ruby
Solnse has joined #ruby
rapind has left #ruby [#ruby]
banjara has quit [Quit: Leaving.]
cordoval has joined #ruby
<becom33> hmm
n1x has joined #ruby
cbuxton has quit [Read error: Connection reset by peer]
cbuxton has joined #ruby
theRoUS has joined #ruby
LBRapid has quit [Ping timeout: 244 seconds]
toddw has joined #ruby
cordoval has left #ruby [#ruby]
jayrulez has quit [Quit: Leaving]
univers has quit [Remote host closed the connection]
LBRapid has joined #ruby
univers has joined #ruby
looopy has quit [Remote host closed the connection]
artm has joined #ruby
nlc has quit [Quit: Leaving]
univers has quit [Ping timeout: 245 seconds]
mengu_ has quit [Quit: Konversation terminated!]
td123 has quit [Read error: Connection reset by peer]
eka has quit [Read error: Operation timed out]
scb has joined #ruby
vmatiyko has quit [Read error: Connection reset by peer]
scb_ has quit [Ping timeout: 272 seconds]
znake has joined #ruby
christianrojas has joined #ruby
d3c has quit [Read error: Connection reset by peer]
youdonotexist has quit [Quit: youdonotexist]
zeromodu_ has joined #ruby
andantino has quit [Quit: Leaving]
d3c has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
vmatiyko has joined #ruby
vmatiyko has quit [Read error: Connection reset by peer]
zeromodulus has quit [Ping timeout: 244 seconds]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
hydrozen has joined #ruby
Eldariof59-ru has joined #ruby
francisfish has joined #ruby
cbuxton has quit [Ping timeout: 248 seconds]
vmatiyko has joined #ruby
josefig has joined #ruby
Eldariof-ru has quit [Read error: Operation timed out]
ben- has quit [Quit: Linkinus - http://linkinus.com]
geers has joined #ruby
mneorr_ has quit [Remote host closed the connection]
cbuxton has joined #ruby
thecreators has joined #ruby
<shevy> lol
<shevy> BananaHammock?
mdw has joined #ruby
Solnse has quit []
<savant> yes
<becom33> shevy, still lost like a duck in a desert
eka has joined #ruby
chimkan_ has joined #ruby
<shevy> becom33 that is because you are not thinking about the problem, you already decided that you have one solution and only one and that it must conform through a specific bottleneck
<becom33> :/
maxok has joined #ruby
<becom33> wait I thought of doing somthing . wait lemme show you the paste
<shevy> will you still have no "include" in that?
<shevy> that will load the files
<becom33> yes from that how can include the ModuleName ?
<becom33> thats issue Im having now
<shevy> however I am not sure if you can reload modules, into your class, at runtime
<shevy> via .extend
<shevy> try self.extend
<shevy> but actually
<becom33> shevy, yes ?
<shevy> why are these separate modules? cant they just be part of your parent class?
maxok has quit [Client Quit]
zeromodu_ is now known as zeromodulus
geers has quit [Remote host closed the connection]
jrist is now known as jrist-afk
<becom33> well even a another use should have the capability of writing a module
<becom33> for a example
Targen has quit [Ping timeout: 245 seconds]
<becom33> apple is a exploit . knife is a module . so Im using knife module to to cut the apple . also if some one else want they can write a chopper module and use the chopper module to chop the apple
<becom33> shevy, do you think i should have used rake ?
<becom33> would it be more easy ?
<shevy> I never recommended rake
cordoval has joined #ruby
<becom33> ok what would you recommend then ? you've seen what is my requirement ?
cordoval has left #ruby [#ruby]
sparrovv has joined #ruby
<shevy> I dont understand why the data must be stored within modules
<becom33> shevy, have you heard about sql injection ?
<shevy> yeah
<becom33> I cant think of a exmaple to explain this so Im shooting with the real thing
<shevy> but you can parse all incoming data in your class anyway
<becom33> ok my module is sql_injector in portals like wordpress , joomla they have vulnerbilites like sql injection . so Im gonna use sql_injection module to sql inject the vulerbility
<becom33> like sql injector . there are modules like file inclusion , cross site scripting
davidpk has quit [Ping timeout: 244 seconds]
yxhuvud has quit [Ping timeout: 245 seconds]
Targen has joined #ruby
nlc has joined #ruby
<rking> becom33: Wait, you're trying to exploit stuff?
<becom33> hay rking
Eldariof59-ru has quit []
<becom33> yep
<rking> Not cool. >=(
azm has joined #ruby
<becom33> its pentest tool . not used for evil
Jackneill has quit [Ping timeout: 272 seconds]
<rking> Ahh.
<becom33> it's going to be a open source app
<benwoody> like metasploit?
<becom33> if you could help . I would really helpfull :/
<becom33> benwoody, yep
Kartagis has quit [Ping timeout: 245 seconds]
<becom33> benwoody, how'd you know about metasploit ?
<benwoody> i use the internet
<becom33> benwoody, aghh ok
vmatiyko has quit [Read error: Connection reset by peer]
davidpk has joined #ruby
deryldoucette has joined #ruby
<benwoody> so i'm coming in on this in the middle it seems, but it looks like you're wanting to treat modules like these small, individual plugins
<becom33> rking, could you help ? with your knowledge it will be easy to code somthing like this . just do the core . I'll code the rest :/
ryannielson has quit [Quit: ryannielson]
<becom33> benwoody, yes
<rking> becom33: Do you have a specific question?
vmatiyko has joined #ruby
<becom33> rking, well yea
<shevy> it's one problem to find out what he needs
<becom33> not a easy one
<shevy> rking, I think he wants to load modules into a class
<shevy> and reload too at a later time
vmatiyko has quit [Read error: Connection reset by peer]
<benwoody> becom33: what are you going to be 'pluging in' these modules to?
<becom33> benwoody, since you know about metasploit , could you explian this fellas like I want to make somthing like a payload in metasploit
C0deMaver1ck is now known as showman94
<benwoody> yeah, i'm getting there. you're heads in the right place i think, but you're going about it wrong
<shevy> hehehe
showman94 is now known as Showman94
<benwoody> first off, savant was right in the path he was taking you
vmatiyko has joined #ruby
<becom33> maby Im explaining this wrong
<savant> of course im right
Showman94 is now known as C0deMaver1ck
<savant> its in my fucking name
<savant> savant
<savant> jeez
<benwoody> ;)
xaq has joined #ruby
<savant> guys we've been over this
suppp has quit [Quit: suppp]
* rking can't help but fill in the blank, _____-savant.
znake has quit [Read error: Connection reset by peer]
<savant> smart-savant
<rking> Oh.
znake has joined #ruby
vmatiyko has left #ruby [#ruby]
mickn has joined #ruby
<shevy> savante?
<pradeepto> If I want to run a command that needs sudo (ipfw) from a ruby script, would using `s work? Because right now, I see something like this -> sh: sudo ipfw pipe 1 config bw 1024kbps: command not found
<becom33> ok im just gona ask you guys . would any of you would like to help me code this ? only thing I can do is give you a credit on the coding . Im not earning from this :/ i need the core coded
<shevy> the martial arts? or was that savate
<becom33> I have alomost everything coded
<pradeepto> What is it that I am doing wrong?
<Hanmac> arent savants people with nearly unhuman skills?
<becom33> shevy, ? would you >
<becom33> >
<becom33> ?
<rking> pradeepto: Let me see your line.
Squarepy has joined #ruby
tatsuya_o has joined #ruby
<becom33> umm ? sheve ?
<becom33> shevy, *
<Hanmac> pradeepto i think the best way is to run the ruby program with sudo .... "sudo ruby yourProgram.rb"
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<pradeepto> rking: CREATEPIPECMD = "sudo ipfw pipe 1 config bw 1024kbps"
<pradeepto> rking: `#{CREATEPIPECMD}`
Kartagis has joined #ruby
<pradeepto> Hanmac: the ruby program is a sinatra app, that spawns of a thread which does the above ^
mdw_ has joined #ruby
<becom33> I guess no one :/
<rking> pradeepto: Hrm. Works for me.
clockwize has quit [Quit: clockwize]
maxok has joined #ruby
mdw has quit [Ping timeout: 248 seconds]
nanderoo has left #ruby [#ruby]
test34 has quit [Ping timeout: 260 seconds]
test34 has joined #ruby
<pradeepto> rking: Running ... sudo ipfw pipe 1 config bw 1024kbps
<pradeepto> sh: sudo ipfw pipe 1 config bw 1024kbps: command not found
<pradeepto> i get that ^
sei has joined #ruby
<rking> pradeepto: I wonder where that "Running ... " is coming from.
<pradeepto> btw, on a os x lion, if that is relevant
<rking> Hrm, maybe.
<becom33> shevy, ok how much would you want to code this ?
<pradeepto> rking, that is a debug line that I didn't type here before.
<rking> Ahh.
<rking> pradeepto: Can you upload your whole script?
<becom33> shevy, ?
<becom33> rking, how much do you think it would cost to code this ?
<pradeepto> rking, yes, pastebin-ing it right now.
<rking> becom33: I don't know the spec of what you're trying to do, exactly.
<savant> i can code it for you for 65 an hour
indeterminate has quit [Read error: Operation timed out]
Guedes is now known as Guedes_out
<becom33> savant, how much ?
rdegraci has joined #ruby
<becom33> please guys be reasonalble :/ its going to be a open source project and Im just 19 dont have much money
<savant> i love open source
<savant> didnt i already say that
<savant> im being reasonable!
<savant> i dont know any ruby, so I have to charge more
<savant> just put your code on github
<savant> open sores all the things
<savant> then maybe i will follow and fix your code
<savant> im actually a gitbot
<shevy> becom33 you already write ruby code
<savant> i fix code on github
<shevy> your code works too
minijupe has joined #ruby
<becom33> shevy, yes I know but some stuff doesn't work :/ and I want this to be working . don't have much money . thats why I asked you if you can join to code the core .
BeLucid has quit [Read error: Connection reset by peer]
zii has quit [Read error: Connection reset by peer]
<shevy> rking, what does becom33 want, can you tell me?
cbuxton has quit [Ping timeout: 245 seconds]
zii has joined #ruby
francisfish has quit [Remote host closed the connection]
zii has quit [Changing host]
zii has joined #ruby
cbuxton has joined #ruby
<rking> shevy: Some kind of wordpress/joomla/etc penetration testing framework.
rippa has quit [Ping timeout: 244 seconds]
<pradeepto> rking: http://pastebin.com/gGN7AWWK
<benwoody> becom33: i think you should learn the inheritance hierarchy and how to pass blocks. you'll be creating classes (or modules) for each "exploit" that you'll want to pass to main
jrist-afk is now known as jrist
BeLucid has joined #ruby
youdonotexist has joined #ruby
<becom33> shevy, PM ?
raul782 has joined #ruby
Ripp__ has quit [Remote host closed the connection]
banjara has joined #ruby
sallyz has quit [Ping timeout: 272 seconds]
<rking> pradeepto: (Looking.)
d3c has quit [Read error: Connection reset by peer]
<pradeepto> thanks
youdonotexist has quit [Remote host closed the connection]
<rking> pradeepto: Try it with system `"#{CREATEPIPECMD}"`
<rking> Urr
<rking> system CREATEPIPECMD
<rking> You're not capturing the output so ``s are needless.
<shevy> becom33 no PM, I dont understand what you want, you tried to explain it so many times, I still dont understand it
<shevy> rking, aha
<shevy> and what is the hard part about it?
<becom33> shevy, not explain what I want
maxok has quit [Quit: Linkinus - http://linkinus.com]
francisfish has joined #ruby
stephenjudkins has joined #ruby
<becom33> shevy, there is nothing hard about it . only thing Im stuck with the logic
stephenjudkins has quit [Client Quit]
Nahra has quit [Quit: leaving]
<pradeepto> rking: I had tried, that seems to block or some such, the app freezes, when I do a CTRL+C, some ruby process goes berserk and eats up all of cpu.
<rking> Hehe
scb_ has joined #ruby
<rking> pradeepto: FWIW I've replicated the problem.
<pradeepto> rking: from the debug statements it seems that, sinatra's main thread doesn't start or some such, at least I don't see any webrick start up lines.
<pradeepto> oh
<rking> (Had to pare it down a bunch and also use dos2unix on it)
scb has quit [Ping timeout: 272 seconds]
<rking> pradeepto: Oh.
cmarques has joined #ruby
<rking> Hehe, I didn't notice. Your code you uploaded is different from: 15:58 <pradeepto> rking: `#{CREATEPIPECMD}`
<rking> That one is right. `"#{…}"` is wrong.
<rking> (No double quotes needed.)
<rking> pradeepto: Do me a favor and change line 41 to: system CREATEPIPECMD
<rking> (Then line 43 to system ATTACHPIPECMD)
noganex has quit [Ping timeout: 248 seconds]
lindenle has quit [Ping timeout: 265 seconds]
<becom33> btw this doesnt work :/ https://gist.github.com/195aa93f40b647a9c87e
<pradeepto> rking: system CREATEPIPECMD that is what I tried, that is when it went into a blocking state like i described.
<rking> pradeepto: OK, well, that seems really odd. Anyway, take out the double quotes from lines 41 and 43 and you should be OK.
<pradeepto> yes, doing that
noganex has joined #ruby
robotmay has joined #ruby
<becom33> rking, if your kwl could you join me and help me with core ?
vmatiyko has joined #ruby
scriptmonkey_ has quit [Ping timeout: 245 seconds]
zx has joined #ruby
mickn has quit [Quit: Leaving]
Targen has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
azm has quit [Ping timeout: 244 seconds]
alienvenom has quit [Read error: Operation timed out]
headius has joined #ruby
alienvenom has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
schovi has quit [Remote host closed the connection]
<pradeepto> rking, that worked for you? That blocks the application the same manner I described above.
indian has quit [Read error: Operation timed out]
dhodgkin is now known as demon_foreskin
jlogsdon has quit [Remote host closed the connection]
zx has quit [Ping timeout: 244 seconds]
ddv has quit [Quit: *poof*]
cordoval has joined #ruby
zx has joined #ruby
Resure has quit [Remote host closed the connection]
krz has joined #ruby
Solnse has joined #ruby
Kabaka has joined #ruby
jimmy__ has joined #ruby
indian has joined #ruby
cordoval has quit [Remote host closed the connection]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
petercs has quit [Read error: Operation timed out]
ddv has joined #ruby
cordoval has joined #ruby
<shevy> becom33 how should this even work
<shevy> becom33 you never pass the name of the module to extend
<becom33> shevy, y ?
Morkel has quit [Quit: Morkel]
<shevy> you simply load a module but that's it
<shevy> you dont include it into anywhere
<becom33> yes thats the problem how can I pass the name of the module
<shevy> it remains its own entity
azm has quit [Ping timeout: 255 seconds]
<shevy> becom33 you must find out the name of the module
<becom33> shevy, btw how much would you take to dev this ?
adambeynon has joined #ruby
<becom33> shevy, seriously I need some one
<shevy> you must solve this becom33
<becom33> to help with codes
ddv has quit [Client Quit]
<shevy> it is your karma now
adambeynon has quit [Client Quit]
<shevy> btw, why don't you do dry-tests?
<shevy> like create a few .rb files
makerbreaker has quit [Ping timeout: 248 seconds]
<shevy> and test your code against those files
zx has quit [Ping timeout: 265 seconds]
<shevy> and then, when it works, you build larger
davidpk has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
<jeebster> any suggestions of gems that breakdown json hierarchy?
<jeebster> make them more readable and easier to manipulate that is…instead of iterating through multiple levels
<becom33> shevy, wait first of all im not sure if Im going this write . im jst doing what I told to do
<becom33> shevy, is this correct if Im using module files as plugins
maesbn has joined #ruby
<shevy> becom33, http://pastie.org/3927283
jcromartie has quit [Remote host closed the connection]
<shevy> you can also omit the self.
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<becom33> shevy, the name is a problem
dbe has joined #ruby
<becom33> how can I know the module name ?
<shevy> becom33, this is the same as http://pastie.org/3927291 btw
<shevy> use a convention becom33
<shevy> that is what rails is doing
<shevy> foo_bar.rb
<shevy> FooBar
<shevy> you see that convention?
luckyruby has joined #ruby
<shevy> other solutions could be you read the .rb file and use the first name you find
<shevy> man there are soooo many solutions!
<shevy> you just dont wanna think :(
<becom33> shevy, i am thinking
davidpk has joined #ruby
jimmy__ has quit [Ping timeout: 260 seconds]
<becom33> shevy, seriously don't wanna join with me ? I know I suck . but i know this isnt a big work for you ?
dnyy has joined #ruby
webusnix has joined #ruby
AtoxHybrid has joined #ruby
a_a_g has joined #ruby
<becom33> shevy, im not asking you to do my part . I want the core done . so then I'll be able to do the rest of the coding like writing modules
ubercore has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> becom33 this for sure sounds like a lot of work
<AtoxHybrid> Hello, I have a multithreaded app writing a Hash to a yaml file every so often, so obviously I wrapped Thread.exclusive around that
<AtoxHybrid> magically though, it seems to break Thread.exclusive causing two thread to save to the same file twice
<becom33> shevy, not really I've done almost everything only few stuff I missed like making a plugin , searching trought a array
<becom33> thouse stuff
vmatiyko has left #ruby [#ruby]
<AtoxHybrid> how is it possible that Thread.exclusive is broken?
fmcgeough has quit [Quit: fmcgeough]
<AtoxHybrid> I'm on 1.9.1 ubuntu 12.04 btw
bluOxigen has quit [Ping timeout: 245 seconds]
<UNIXgod> AtoxHybrid: can you upgrade ruby and see if the problem persists
wvdschel_ has joined #ruby
zx has joined #ruby
zx has quit [Read error: Connection reset by peer]
wvdschel has quit [Ping timeout: 272 seconds]
<deryldoucette> 1.9.1 is a known buggy version. current is 1.9.3-p194. (not saying that *is* the issue in your case, just that thats a known buggy ver)
<AtoxHybrid> correction, i'm actually on 1.9.3.0-1ubuntu1
mvangala has quit [Remote host closed the connection]
<AtoxHybrid> the package is wrongly named 1.9.1, blame ubuntu for that
<deryldoucette> might want to gist.github.com the relevant code and the error message you get (and any trace) to give folks something to work with
sameerynho has quit [Quit: Leaving]
azm has quit [Ping timeout: 252 seconds]
cordoval has quit [Remote host closed the connection]
gosshedd has quit [Read error: Operation timed out]
cordoval has joined #ruby
<savant> oh ubutni
cordoval has left #ruby [#ruby]
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
maesbn has quit [Remote host closed the connection]
<AtoxHybrid> error is /usr/lib/ruby/1.9.1/psych/visitors/emitter.rb:24:in `scalar': expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS (RuntimeError)
<AtoxHybrid> does not occur if I disable threading
cmarques has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
hydrozen has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jernejz has quit [Read error: Connection reset by peer]
nej has joined #ruby
<becom33> shevy, ?
pawdro has quit [Remote host closed the connection]
<AtoxHybrid> also, if I insert a puts inside the exclusive and after it, the inside is outputted twice
mstratman has quit [Quit: mstratman]
<AtoxHybrid> well actually, in my code []= and [] are also globally locked, problem still occurs
<AtoxHybrid> but this is a simpler snippet
mnaser has quit [Ping timeout: 260 seconds]
jlogsdon has joined #ruby
mcwise has quit [Quit: I quit]
kil0byte has joined #ruby
iocor has joined #ruby
<AtoxHybrid> apparrently psych causes it, is psych multithreaded?
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
<shevy> becom33 you sound as if you have a deadline ;)
<shevy> you need to relax and let the ruby philosophy enter your mind
<shevy> and then, you make baby steps becom33
davidw has joined #ruby
<Hanmac> put an ruby book under your pillow and let it flow into your brain
<benwoody> becom33: is this your first ruby project?
SQLStud has joined #ruby
davidw is now known as Guest38008
<becom33> shevy, not a deadline . but I do wanna finish this soon coz next month im starting my work . then I wont be havin free time to do this stuff
internet_user has quit [Remote host closed the connection]
<becom33> benwoody, actually this is the reason I came to ruby :/
<savant> im a ruby
<becom33> savant, your expensive ruby
<savant> no im cheap
yosinof has quit [Quit: Leaving]
jgrevich has quit [Quit: jgrevich]
jayrulez has joined #ruby
<becom33> $65 for a 1 hr ? I make like $150 for a month
erratic has joined #ruby
<shevy> savant but you are coding from hell :(
<benwoody> holy shit
<benwoody> do you live in a 3rd world country?
<savant> yes
<savant> the answer is yes
<becom33> benwoody, actually yea
<savant> say the USA
<erratic> hey guys whats the @ do in ruby and how do I do a continue in a loop in erb
<benwoody> oh, well there's that
<shevy> erratic this is an instance variable
<shevy> erratic, class Foo; @bla = "some value"; end
kuranai is now known as kuranai|off
<erratic> oh so its like this-> operator
<shevy> I dunno about erb, a loop in ruby can be done via loop {} erratic loop { puts 'hi'; break if rand(5) == 0}
macmartine has quit [Quit: macmartine]
carloshpf has joined #ruby
whye has quit [Ping timeout: 260 seconds]
<shevy> erratic, not sure. @foo variables are always available in the class
<erratic> I see
TandemAdam has joined #ruby
<erratic> thank you!
<shevy> dunno how you use this->
<shevy> it's php right?
<erratic> yeah the only thing left is how to do a continue in a loop
<erratic> yeah
<shevy> well, other things you could try ... an early "return". or a "next if x > y" in your loop
<shevy> but it is a bit rare to see loops usually. you iterate over your array/hash directly like array.each
ubercore has joined #ruby
<shevy> you could use while loops too
yosinof has joined #ruby
inteq has quit [Read error: Connection reset by peer]
<erratic> next if sounds about right
inteq has joined #ruby
<erratic> googling
mdw has joined #ruby
<shevy> i = 0; while i < 5 do; puts i; i += 1; end
mdw_ has quit [Read error: Connection reset by peer]
geekbri has quit [Remote host closed the connection]
Vert has joined #ruby
SegFault1X|work has joined #ruby
francisfish has quit [Remote host closed the connection]
SegFault1X|work has quit [Client Quit]
znake has quit [Quit: znake]
<AtoxHybrid> so why are mutexes not actually exclusive
<erratic> just guessing here
<erratic> next if ipaddr.empty?
scb has joined #ruby
<erratic> thats another thing I learn this morning
<erratic> but I forgot to read about
yoklov has joined #ruby
scb_ has quit [Ping timeout: 252 seconds]
<erratic> the ? on the end... that also works as a ternary operator
SegFaultAX|work2 has joined #ruby
<erratic> strange to me
<shevy> erratic well
<shevy> the ternary operator I find ugly
<shevy> the "?" however at method names, ruby allows you to have such method names
<shevy> def will_erratic_like_ruby?
MasterLambaster has quit [Quit: MasterLambaster]
<erratic> thats cool :D
<shevy> return 'Yes!!!'
<shevy> end
<shevy> will_erratic_like_ruby?
<erratic> so far I like it alot
<erratic> Ive been working with it on and off for about a month or two
<erratic> chef cookbooks
<shevy> btw that was a too long method name
<shevy> ruby code usually tends to be rather terse and short
tds has joined #ruby
<shevy> "foo".include? 'o' # => true
<apeiros_> AtoxHybrid: errr, what? what makes you think they weren't?
<shevy> and not ... "foo".does_it_include? 'o' # => true
<shevy> hehe
<AtoxHybrid> somehow Thread.exclusive breaks the exclusiveness for no reason
fr0gprince_mac has quit [Quit: Leaving...]
<AtoxHybrid> and Thread.exclusive uses a global mutex
<apeiros_> AtoxHybrid: you should *probably* read the docs of methods that you use
sepp2k1 has joined #ruby
<AtoxHybrid> apeiros_: how so?
<apeiros_> ri Thread::exclusive
<apeiros_> in your command line. assuming your docs are installed.
<apeiros_> else: rdoc.info and ruby-doc.org
<AtoxHybrid> yes, what about it?
mdw has quit [Remote host closed the connection]
yosinof has quit [Quit: Leaving]
<apeiros_> hm, did they change it? last time I read it, it clearly stated that this method is only supposed to be used by people who implement concurrency-primitives…
yosinof has joined #ruby
<apeiros_> you should not use Thread.exclusive yourself
yosinof has quit [Read error: Connection reset by peer]
sepp2k has quit [Ping timeout: 272 seconds]
<apeiros_> yes, I have it open since I wanted to quote it… seems they removed that comment.
<AtoxHybrid> anyways, using $mutex.synchronize causes the same problem
n1x has quit [Quit: "OverStaturation! G'Nite!"]
<AtoxHybrid> it starts running other threads before it finishes
<AtoxHybrid> causing changes to the hash while generating the yaml, which borks the yaml generator
jchauncey has quit [Quit: jchauncey]
<apeiros_> ah, I think you misunderstand how mutexes are supposed to be used
<apeiros_> if two threads try to use the same mutex' #synchronize method, one will be blocked until the other finished it
<AtoxHybrid> yes, so the write can finish before the other one starts writing
<apeiros_> besides of that, a mutex does not prohibit other threads to run
Constant_ has joined #ruby
<AtoxHybrid> in my case, multiple threads enter the synchronize block at the same time
<AtoxHybrid> which should be impossible
<apeiros_> code or it didn't happen…
pdtpatrick has quit [Quit: pdtpatrick]
pdtpatrick has joined #ruby
<AtoxHybrid> https://gist.github.com/2721503 - thats a snippet of my class
<apeiros_> reproducable?
<AtoxHybrid> basically what happens is two threads save at the same time
<AtoxHybrid> yes, many times
<apeiros_> no. not a reproducable piece of code
<AtoxHybrid> okay, let me write that
<apeiros_> AtoxHybrid: make a small example which can be used to reproduce your problem
davidboy is now known as GNOME
fbernier has quit [Ping timeout: 272 seconds]
GNOME is now known as davidboy
minijupe has quit [Quit: minijupe]
yosinof has joined #ruby
sparrovv has quit [Ping timeout: 260 seconds]
sparrovv has joined #ruby
iamjarvo has joined #ruby
minijupe has joined #ruby
iamjarvo1 has quit [Read error: Connection reset by peer]
Zolrath has joined #ruby
dbe has quit [Remote host closed the connection]
ph^ has joined #ruby
nej has quit [Remote host closed the connection]
minijupe has quit [Client Quit]
nej has joined #ruby
altious has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
LBRapid has quit [Quit: Farewell...]
dustybrains has quit [Quit: leaving]
ph^_ has joined #ruby
ConstantineXVI has quit [Remote host closed the connection]
Constant_ has quit []
ConstantineXVI has joined #ruby
ctp has quit [Quit: Leaving...]
Guest38008 has quit [Ping timeout: 248 seconds]
ph^ has quit [Ping timeout: 245 seconds]
<AtoxHybrid> apeiros_: I can't seem to write a simple test case for this
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
luxurymode has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
iamjarvo has quit [Ping timeout: 245 seconds]
dhaskew has joined #ruby
<burgestrand> Isn’t Thread.exclusive a no-op in 1.9?
<burgestrand> I have a vague memory of that
baroquebobcat has joined #ruby
ubercore has quit [Quit: Computer has gone to sleep.]
<AtoxHybrid> Well, I can explain this, using the following code Thread.exclusive { print "Saving... "; save(); puts "Done..." }
krusty_ar has quit [Read error: Connection reset by peer]
<AtoxHybrid> I get: Saving... Done....\nSaving... Saving... <ERROR>
<AtoxHybrid> which looks impossible to me
hynkle has quit [Quit: hynkle]
rdegraci has quit [Quit: rdegraci]
<AtoxHybrid> wait, what about errors inside the threads?
krusty_ar has joined #ruby
wvms has joined #ruby
artm has quit [Quit: artm]
<burgestrand> AtoxHybrid: if an error is raised inside a thread, by default Ruby swallows the error and the thread dies
<AtoxHybrid> but would that unlock the mutex?
<burgestrand> AtoxHybrid: Thread.abort_on_exception = true to change default behaviour to a more sane variant
<burgestrand> AtoxHybrid: yes
v0n has quit [Ping timeout: 248 seconds]
<AtoxHybrid> I just remembered that weird behaviour, gheh, lets test again
heftig has joined #ruby
<burgestrand> (to my earlier statement, turns out Thread.exclusive { block } is just using a global mutex, I was thinking of Thread.critical)
scb_ has joined #ruby
felipec has joined #ruby
scb has quit [Ping timeout: 272 seconds]
<AtoxHybrid> now I found the error, there are some UTF8 characters messing up the yaml parser
<AtoxHybrid> causing the thread to die, mutex to unlock, and over and over again, until the last thread dies
wmoxam has quit [Quit: leaving]
<burgestrand> Thread.abort_on_exception = true should always be on. :(
ericalexander has quit [Quit: Ex-Chat]
tommyvyo has joined #ruby
raul782 has quit [Remote host closed the connection]
ph^_ has quit [Remote host closed the connection]
ph^ has joined #ruby
Soul_Est has quit [Quit: WeeChat 0.3.7]
kvirani has quit [Read error: Connection reset by peer]
kvirani has joined #ruby
SQLStud is now known as UrAznMaster
jgarvey has quit [Quit: Leaving]
carloslopes has quit [Quit: Leaving]
theRoUS has quit [Ping timeout: 260 seconds]
ph^ has quit [Ping timeout: 245 seconds]
ConstantineXVI has quit [Remote host closed the connection]
skogis has quit [Ping timeout: 255 seconds]
sebastorama has quit [Quit: Computer has gone to sleep.]
h4mz1d has joined #ruby
v0n has joined #ruby
kvirani has quit [Remote host closed the connection]
skogis has joined #ruby
<becom33> shevy, you there ?
SegFault1X|work2 has joined #ruby
nobitanobi has joined #ruby
<nobitanobi> Is there any difference between @object.method? and @object.method.nil?
<apeiros_> yes
<apeiros_> @object.method? calls the method named method? on @object, @object.method.nil? calls the method named method, then calls .nil? on its result
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
ConstantineXVI has joined #ruby
<nobitanobi> apeiros_: thank you.
chson has quit [Remote host closed the connection]
heftig_ has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 265 seconds]
phantasm66 has quit [Quit: *sleeeeep*]
<nobitanobi> apeiros_: I am working in Rails, and in order to check if a particular object has a particular attribute, I usually do @object.attribute.nil?
<becom33> apeiros_, hay
<apeiros_> nobitanobi: in that case, you should have been more specific
<apeiros_> you mean you use ActiveRecord, yes?
<nobitanobi> yes.
heftig has quit [Ping timeout: 255 seconds]
mengu has joined #ruby
luke3321 has joined #ruby
MasterIdler has quit [Ping timeout: 244 seconds]
A124 has joined #ruby
A124 has left #ruby [#ruby]
<apeiros_> nobitanobi: then it depends on whether you overwrite methods or not
ixti has quit [Quit: So Long, and Thanks for All the Fish!]
<apeiros_> the default implementation of attr? is afaik indeed attr.nil?
davidcelis has quit [Quit: K-Lined]
<nobitanobi> oh, I see
<apeiros_> but check in #rubyonrails, as that's a rails question, not a ruby question.
blacktulip has quit [Remote host closed the connection]
davidcelis has joined #ruby
<nobitanobi> ok, thanks.
ThatDudeGuy_ has quit [Quit: ThatDudeGuy_]
macer1 has quit [Ping timeout: 272 seconds]
elux has quit [Quit: Leaving...]
dbe has joined #ruby
CannedCorn has quit [Quit: Computer has gone to sleep.]
heftig_ has quit [Client Quit]
heftig has joined #ruby
CannedCorn has joined #ruby
<felipec> why is pipe.each("\0") not working? the command is certainly generating \0
rasbonics has quit [Quit: rasbonics]
UrAznMaster has quit [Quit: Leaving]
Soul_Est has joined #ruby
<a_a_g> what is 'pipe'?
bbttxu has quit [Quit: bbttxu]
beneggett has quit [Read error: Connection timed out]
<felipec> a_a_g: IO.popen
sebastorama has joined #ruby
hormigas has joined #ruby
<apeiros_> felipec: works fine here.
<apeiros_> maybe you want to define "not working"
lambdan has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
dv310p3r has quit [Ping timeout: 245 seconds]
<apeiros_> i,o=IO.pipe; o.write("hello\0world\0funny\0"); i.each("\0") do |x| p x end # --> prints "hello\u0000", "world\u0000", "funny\u0000" - as expected
murrdoc has joined #ruby
fayimora has quit [Ping timeout: 272 seconds]
<heftig> IO.popen("find /tmp -print0").each("\0") { |x| p x } works fine here
<murrdoc> is this an appropiate place to ask questions bout gitorious
<murrdoc> if not its cool … point me where the river is :)
<lambdan> can someone help me remove a specific line of a file?
<felipec> apeiros_: heftig: yeah, it seems to work with simple examples... but not with git log -z =/
<apeiros_> felipec: chances that each is working incorrectly vs. chances that you messed up - I estimate it to be around 99:1
sallyz has joined #ruby
murrdoc has left #ruby [#ruby]
<heftig> works fine here
DuoSRX_ has quit [Remote host closed the connection]
<apeiros_> based on that is how I'd search for why your code as a whole breaks.
beneggett has joined #ruby
jlogsdon has quit [Remote host closed the connection]
hormigas has left #ruby [#ruby]
scb has joined #ruby
scb_ has quit [Ping timeout: 244 seconds]
<felipec> apeiros_: want to bet?
<apeiros_> heftig: given that `heftig: works fine here`, sure…
<apeiros_> gah
<apeiros_> felipec: given that `heftig: works fine here`, sure…
carloshpf has quit [Quit: Saindo]
<apeiros_> felipec: anyway "why X no work?" is a useless question.
cordoval has joined #ruby
<apeiros_> "it doesn't work because you did something wrong" - an equally useless but appropriate answer to the question.
<lambdan> so can someone help a newbie (me) remove a specific line from a .txt?
<apeiros_> lambdan: sure. where do you have problems with that?
<lambdan> lets say i have a text file with X lines
<lambdan> and i wanan remove line 50
<lambdan> how
<apeiros_> lambdan: read it into an array, remove index 49 of the array, write the result back to the file
<lambdan> sorry im really bad at this stuff
<lambdan> i also have another question, which should be simpler
<apeiros_> lambdan: look at File::readlines, Array#delete_at
cordoval has left #ruby [#ruby]
<lambdan> thx ill take a look
<lambdan> and now for the second qustion:
looopy has joined #ruby
altiouz has joined #ruby
<lambdan> lets say i have an line on the variable "lol", i then wanna check through the entire text file to see if "lol" is already in it
<lambdan> to prevent duplicates
<lambdan> so like
altious has quit [Read error: Connection reset by peer]
<lambdan> lol = "hey im a human"
<lambdan> then its gonna check if that "hey im a human" is in the file already
<felipec> apeiros_: there: http://pastie.org/3927727, admit you were wrong
looopy has quit [Remote host closed the connection]
jonatha__ has joined #ruby
PaciFisT has quit [Quit: Leaving.]
DrShoggoth has quit [Quit: Leaving]
robdodson has joined #ruby
a_a_g has quit [Quit: Leaving.]
jonathanwallace has quit [Ping timeout: 248 seconds]
<apeiros_> felipec: impossible. you provide an irreproducable piece of code and demand something?
<apeiros_> make it reproducable, then we talk.
<Squarepy> lambdan, so did you try anything yet?
<felipec> apeiros_: it is reproducible, you are chickening out... typical
<lambdan> no idk where to start
jayrulez_ has joined #ruby
<felipec> apeiros_: use any git repository
jayrulez_ has quit [Remote host closed the connection]
<jeebster> how can I iterate through the values preceding a fixnum? For instance, if a variable is equal to four, how can I loop through four times?
<apeiros_> felipec: so? in don't have the input data you have. you don't say how to use it. you don't say how it shows failure.
<felipec> apeiros_: *any* git repository
<felipec> you don't have any git repository? do you want me to show you how to clone a git repository?
<apeiros_> I have one. read my list of points you're missing. not having a git repo isn't on it.
<apeiros_> but mind you, my git repo != your git repo. but since you claimed it'd show how it doesn't work on any git repo…
dbe has quit [Remote host closed the connection]
<apeiros_> lambdan: you'd probably start at reading the file
<Squarepy> lambdan, well get a start on ruby then
<lambdan> can i pm one of you so i can give some backstory
<lambdan> will make alot more sense
<apeiros_> lambdan: note that we don't write code for you
<felipec> apeiros_: so, have you run the script with *your* git repository as the first argument?
<apeiros_> we help you with questions. most of us won't give solutions.
<lambdan> hmph
wangr has quit [Ping timeout: 252 seconds]
<becom33> apeiros_, https://gist.github.com/2721968 why am I getting a name error ?
<Squarepy> lambdan, this smells like #homework :)
<apeiros_> felipec: you still have to state how it shows failure
<lambdan> nah its for my irc bot
fayimora has joined #ruby
<felipec> apeiros_: you should get two numbers, they should be equal, if they are not equal, the first command is doing something wrong
<apeiros_> and you claim it is because of each("\0")?
bglusman has quit [Remote host closed the connection]
<becom33> apeiros_, bro can you look my script for a second
SphericalCow has quit [Quit: Leaving]
<felipec> apeiros_: you said I did something wrong, if you cannot find something wrong *I* did, then you loose the bet, and you have to admit you were wrong
<Squarepy> becom33, is a CASE thing
<apeiros_> felipec: maybe you should try and see what your first one actually does
<felipec> apeiros_: I have
<becom33> Squarepy, Im sorry I dont understand
iamjarvo has joined #ruby
Gavilan has quit []
<apeiros_> you did? and did you see that your data isn't \0 delimited?
ikaros has quit [Read error: Connection reset by peer]
<Squarepy> becom33, sorry nvm
<apeiros_> felipec: so lets turn this around: admit that you did it wrong!!1!1!11!
<becom33> Squarepy, please dude if you see where am i wrong help me
<apeiros_> </kindergarten>
<benwoody> becom33: what is it failing with? also, where is testmodule
<felipec> apeiros_: show me how I did it wrong, and I'll admit that, if you cannot show me what I did wrong, then you loose
<becom33> benwoody, well the testmodule is in another path . but I've got puts of the bath . so it should load in to the script
<apeiros_> I don't care *what* you did wrong. but obviously your two commands don't generate the same output by git.
araujo has joined #ruby
<apeiros_> also that stupid "admit it" is srsly childish and I'll probably just put you on ignore next time.
<becom33> wow apeiros_ is pissed
<apeiros_> yes
<savant> who is apeiros_?
<felipec> apeiros_: my question was specifically about .each("\0")
<savant> is he any good?
<savant> can I be his ruby apprentice?
Squarepy has quit [Quit: Leaving]
ghr has joined #ruby
<apeiros_> felipec: yes, it was specifically on why it wasn't working
<becom33> savant, can you look at my last script ?
<benwoody> becom33: is TestModule class inside the Mod module?
<savant> no
<apeiros_> 00:00 felipec: why is pipe.each("\0") not working? the command is certainly generating \0
<benwoody> i think you're getting mixed up on what classes and modules are
<felipec> apeiros_: this is what you said: <apeiros_> felipec: chances that each is working incorrectly vs. chances that you messed up - I estimate it to be around 99:1
<becom33> benwoody, yes . actually load did the work I guess
<felipec> apeiros_: *that* is childish
looopy has joined #ruby
araujo has quit [Read error: Connection reset by peer]
<apeiros_> felipec: no. your assertion was that each("\0") was not working correctly
<felipec> apeiros_: and you were wrong, you yourself cannot come up with code that splits the output in the appropriate chunks with .each("\0")
<apeiros_> and all I said was that assertion did not have a high probability of being true
Criztian has quit [Remote host closed the connection]
<Mon_Ouie> It is true though — when something is wrong, always assume your code is wrong before considering a bug in Ruby
<becom33> wait lemme show somthin
<apeiros_> and that you should probably - instead of figuring why each doesn't work, should go and check why your code doesn't work
liluo has joined #ruby
<felipec> apeiros_: no, that's not what you said, you said *I* messed up... see? "chances that each is working incorrectly vs. chances that you messed up - I estimate it to be around 99:1"
<apeiros_> felipec: and I was right
Karmaon has joined #ruby
<felipec> apeiros_: it's not my code, you cannot come with with code that works either
digitalcakestudi has quit [Read error: Operation timed out]
<felipec> apeiros_: and you cannot admit you were wrong, where obviously you weren't
<felipec> you care more about being right than being helpful
<apeiros_> felipec: omg, welcome on my ignore
a_a_g has joined #ruby
<jeebster> man, there sure is a ton of arguing in this channel
<benwoody> becom33: module Mods; class TestModule; end; end; ? or are you extending/delegating it somewhere?
<jeebster> more programmer ego yum yum
h4mz1d has quit [Ping timeout: 250 seconds]
<becom33> ben_alman, Im loading classes in a folder trought a each
<becom33> trough *
<becom33> using load function
<felipec> I think git is acting differently depending if it's being run as a shell 'git foo', or directly ['git', 'foo']
kvirani has joined #ruby
<benwoody> becom33: seriously, go study the inheritance chain
BrokenCog has quit [Quit: leaving]
<felipec> but apeiros_'s assertion that *I* messed up was totally unwarranted and wrong
<apeiros_> becom33: did you get an answer to your NameError question
<becom33> i think I should
luke3321 has quit [Quit: leaving]
<becom33> apeiros_, yes yes . thanks its fine bro . you seems busy
ghr has quit [Quit: ghr]
sparrovv has quit [Ping timeout: 272 seconds]
hasrb has quit [Remote host closed the connection]
amalvagomes has quit [Quit: amalvagomes]
heftig has quit [Ping timeout: 260 seconds]
looopy has quit [Remote host closed the connection]
jayrulez has quit [Ping timeout: 255 seconds]
jimeh2 has joined #ruby
td123 has joined #ruby
pu22l3r has quit [Ping timeout: 248 seconds]
kirun has quit [Quit: Client exiting]
demon_foreskin is now known as dhodgkin
danheberden is now known as d9n
dhodgkin is now known as anusface
toddw has quit [Remote host closed the connection]
iamjarvo has quit [Read error: Connection reset by peer]
anusface is now known as Dr_Acula
araujo has joined #ruby
<apeiros_> oh, interesting
looopy has joined #ruby
<becom33> benwoody, https://gist.github.com/2722100 look at this
looopy has quit [Remote host closed the connection]
<becom33> it works when I do a = TestModule.new() . do that mean it should be inside Mods method right ?
looopy has joined #ruby
redgetan has joined #ruby
tomzx has joined #ruby
jeebster has left #ruby [#ruby]
<becom33> apeiros_, can you look my last paste ?
<becom33> only if your free
<Mon_Ouie> No, because load doesn't care about where it is called frome
<Mon_Ouie> from*
<benwoody> becom33: mods method? Go look up the difference bt modules and methods
<Mon_Ouie> It will store the constants at top-level anyway
<benwoody> And classes
<becom33> sorry Mods Module *
<becom33> benwoody, dude its 4.16 am Im kinda loosing track
<Mon_Ouie> You should just use require and explicitly namespace your classes in the files that define your modules/classes
<becom33> but still if it works inside the Mod Method . why doesnt work when it inherit ?
etehtsea has quit []
trend has joined #ruby
<Mon_Ouie> It uses the top-level TestModule constant
stephenjudkins has joined #ruby
<Mon_Ouie> If you tried to do Mods::TestModule at that point, it would fail too
yosinof has quit [Quit: Leaving]
dross has quit [Read error: Connection reset by peer]
Chryson has joined #ruby
<Veejay> apeiros_: Talking about the NaCal thing?
<apeiros_> Veejay: yes
<Veejay> Yeah I'm (in spirit at least) pretty psyched about it
<Veejay> It gets us closer to a future without Javascript shoehorning
<Veejay> Which is nice
<becom33> Mon_Ouie, what can I do to fix it ?
shruggar has quit [Read error: Connection reset by peer]
shruggar1 has joined #ruby
* apeiros_ wonders whether he should tell felipec where he messed up
k4mirox has quit [Ping timeout: 260 seconds]
savant has quit [Ping timeout: 248 seconds]
<apeiros_> hm, better not. for one, he didn't mess up, and for another, I'd be a total ass about it…
<becom33> apeiros_, ..
<Veejay> OR
altiouz has quit [Ping timeout: 248 seconds]
<Veejay> You could be a gentleman and provide at least a general direction
<Mon_Ouie> becom33: Well, what about what I already suggested?
<apeiros_> oh I already did that. I showed him where to look. it's even in my pastie. that's how I noticed it - wanted to close the window and seen what went wrong…
<becom33> Mon_Ouie, your explantion is kinda complicated .
luckyruby has quit [Remote host closed the connection]
<apeiros_> I didn't see it the first time because I've only looked out for \0 the first time because he was so adamant about each("\0") being at fault and having that ridiculous demand up.
<becom33> did asked to use require insted of load ? Mon_Ouie
<felipec> ppft, what apeiros_ seems to be suggesting is that git is throwing a different output, which I already suggested
<Mon_Ouie> becom33: That, and also explicitly namespacing
Kamijou_Touma is now known as nfk
<becom33> I dont undertand whats explicitly namespacing is
<Mon_Ouie> e.g. module Mods; module Bar; end; end instead of module Bar; end
trend has quit [Quit: trend]
shruggar1 has quit [Ping timeout: 252 seconds]
vitoravelino`afk is now known as vitoravelino
C0deMaver1ck has quit [Remote host closed the connection]
ennui has joined #ruby
<becom33> Mon_Ouie, module inside of a module ?
<becom33> Mon_Ouie, woah woah wait
<becom33> TestModule is a class
<Mon_Ouie> Doesn't make a difference
RudyValencia has joined #ruby
<becom33> where does this Bar modules comes from ?
punkrawkR has quit [Read error: Connection reset by peer]
<Mon_Ouie> Nowhere, it's just an example
b1rkh0ff has quit [Ping timeout: 250 seconds]
<becom33> ok lemme see if this is what your tell me to do
<Mon_Ouie> (and that example is the point where the Bar module gets defined)
<offby1> Emacs users: any simple tricks for getting next-error to properly parse a ruby stack trace?
sallyz has quit [Ping timeout: 252 seconds]
SegFaultAX|work has quit [Remote host closed the connection]
<becom33> I dont I did what you said
tewecske has quit [Quit: Leaving.]
davidpk has joined #ruby
dwon has joined #ruby
jimeh2 has quit [Ping timeout: 265 seconds]
grey_ has joined #ruby
robotmay has quit [Remote host closed the connection]
yoklov has quit [Quit: computer sleeping]
<becom33> Mon_Ouie,
codezombie has joined #ruby
kenperkins has quit [Read error: Connection reset by peer]
kenperkins has joined #ruby
CannedCorn has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jimeh2 has joined #ruby
<becom33> damn im lost
ConstantineXVI has quit [Remote host closed the connection]
BlissOfBeing has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
<becom33> anyone wanna help me out here ? https://gist.github.com/2722201
* becom33 anyone ?
exchgr has joined #ruby
skogis has quit [Ping timeout: 244 seconds]
ennui has quit [Ping timeout: 250 seconds]
peterhil` has quit [Ping timeout: 265 seconds]
jimeh2 has quit [Ping timeout: 245 seconds]
<apeiros_> becom33: you define a class `TestModule`, not `Mods::TestModule`. that you call load within your Mods module doesn't make `TestModule` become `Mods::TestModule`
<apeiros_> in your test_module/index.rb, wrap your class within a `module Mods` and `end`
<apeiros_> that way you define it as Mods::TestModule
greyEAX has quit [Ping timeout: 244 seconds]
snip_it has quit [Quit: snip_it]
<apeiros_> btw., it's somewhat odd to name a class 'xxxModule'
grey_ has quit [Ping timeout: 252 seconds]
<lambdan> okay i made some progress
uris has quit [Quit: leaving]
<lambdan> but i dont know how to get
<lambdan> hi = IO.readlines("test.txt")[2]
<lambdan> the 2 there, to a variable, like #{test}
<apeiros_> #{} is for string interpolation only.
<apeiros_> just plain: test = 2; hi = IO.readlines("test.txt")[test]
scb has quit [Remote host closed the connection]
dross has joined #ruby
Foxandxss has joined #ruby
nfk has quit [Quit: yawn]
<lambdan> hm i get "cant convert string into integeer"
<Veejay> Maybe you should show some code
<apeiros_> lambdan: that sounds like you did `test = "2"` instead of `test = 2`
<apeiros_> "2" is not the same as 2. the former is a string, the latter an integer.
<lambdan> hmm
<Veejay> apeiros_'s psychic abilities have beem steadily declining for the past few years
greyEAX has joined #ruby
<apeiros_> Veejay: only my will to use it
<apeiros_> I could still kill you with a thought! or a tray! yes… death by tray it shall be! :)
<krz> with "http://www.facebook.com" how can i return "facebook"
amalvagomes has joined #ruby
<apeiros_> krz: take a look at URI & URI.parse
<apeiros_> alternatively: String#[] with a fancy pantsy regex
<lambdan> dang idk how to fix it into a integer
<becom33> apeiros_, if I load inside Mods Module does it mean Mods::WhatEverTheClassIs ?
<apeiros_> lambdan: errr, what's so difficult in writing 2 instead of "2" ?
<lambdan> its an variable
<lambdan> it would make so much more sense if i told you backstory
Beoran__ has joined #ruby
<apeiros_> lambdan: a variable gets assigned at one point…
<lambdan> yes
nari__ has joined #ruby
<becom33> apeiros_, what if I require isnted of load ?
<apeiros_> becom33: no. as Mon_Ouie already said, load doesn't care where you are when you call it
<apeiros_> becom33: require doesn't care either
<apeiros_> `load foo; module Something; end` and `module Something; load foo; end` both do the same thing.
<krz> apeiros_: I'm using rails. me don't like the idea of using URI.parse in a view
<apeiros_> (both load a file foo and define a module Something)
<becom33> apeiros_, without adding a another Module to the file index.rb . how can I fix this
<apeiros_> krz: then don't use it in a view
<krz> apeiros_: I'm iterating over an object in my view that returns urls
<apeiros_> krz: then maybe you shouldn't iterate over an object that returns urls
<apeiros_> s/returns/yields/
<apeiros_> but instead iterate over an object that yields what your view needs.
rbanffy has quit [Quit: Ex-Chat]
Beoran_ has quit [Ping timeout: 252 seconds]
amalvagomes has quit [Ping timeout: 255 seconds]
peterhil` has joined #ruby
khakimov has joined #ruby
jrist is now known as jrist-afk
Targen has joined #ruby
<lambdan> o hey i figured it out
<lambdan> .to_i :D
robdodson has quit [Quit: robdodson]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<apeiros_> lambdan: ah, sorry, missed your gist. yes, String#to_i will convert a String to an Integer.
<lambdan> yeah
<lambdan> thanks anyway
<lambdan> :)
<apeiros_> lambdan: also, you probably want to read your fact-files once, store it somewhere and access the stored data instead of reading it again upon every invocation
<lambdan> well the thing is that the file is getting updated very often
brianpWins has quit [Quit: brianpWins]
<apeiros_> ok
<lambdan> since people do .addfact this is a fact
<apeiros_> which is through the bot too?
<lambdan> yes
<apeiros_> so addfact could work on the stored data too and you could then write out from the stored data to update the file…
bluenemo has quit [Quit: leaving]
looopy has quit [Remote host closed the connection]
Solnse has quit []
virunga has quit [Quit: Sto andando via]
dbgster has joined #ruby
AtoxHybrid has quit [Remote host closed the connection]
TheFuzzball has quit [Quit: Leaving...]
looopy has joined #ruby
nari__ has quit [Ping timeout: 252 seconds]
Mohan has quit [Ping timeout: 272 seconds]
Mohan has joined #ruby
mrwalker has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
jayrulez has joined #ruby
weasels has joined #ruby
good_afternoon has joined #ruby
otters has quit [Read error: Connection reset by peer]
snip_it has joined #ruby
snip_it_ has joined #ruby
snip_it has quit [Read error: Connection reset by peer]
davidpk has quit [Quit: Computer has gone to sleep.]
redgetan has quit [Quit: This computer has gone to sleep]
tvw has quit [Read error: Connection reset by peer]
cj3kim has quit [Ping timeout: 276 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
ConstantineXVI has joined #ruby
ConstantineXVI has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby
cpruitt has quit [Quit: cpruitt]
cj3kim has joined #ruby