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
<binaryplease> got it sorry
<deryl> binaryplease: one suggestion before you go one step further. read through and do http://railstutorial.org/book
<deryl> trust me when i say you will be VERY glad you did
<binaryplease> okay
<binaryplease> i will
snip_it has joined #ruby
<deryl> (and also work through rubykoans.com
<deryl> don't do anything else in that app until you complete those 2 sites. trust me, it WILL be time WELL invested
Karmaon has joined #ruby
<deryl> your level of confusion will become a LOT LOT less :-)
<binaryplease> :D
<binaryplease> i hope so. sounds good :D
<deryl> i would even suggest that you do the rails book last. do the ruby koans first
<deryl> the code you'll see in the rails book will make a LOT more sense
darren_ has joined #ruby
<deryl> and do it all, no matter how bored, frustrated, or confused you get.. slog through it.
vitor-br has joined #ruby
levity_island has joined #ruby
jfelchner has joined #ruby
<binaryplease> deryl: cool thanks man this kind of tutorials is exactly what i was looking for
<rodayo> If I define a struct like so: Person = Struct.new(:name, :age) when I create a new instance with " = Person.new(...)" is there a short hand for manually assigning each parameter in the instatiation. So that you don't need to list them in order?
<banisterfiend> rodayo: you can pass in a hash i think
<banisterfiend> Person.new(:name => "john", :age => 12)
<rodayo> So instead of a = Person.new("Dave", 12) I can do a = Person.new(anem => "Dave", age => 12)
<deryl> binaryplease: np. like i said, work through them frfom beginning to end before oyu do anything else. you'll thank yourself for the time invested later
paradisaeidae has joined #ruby
chrxn_ has joined #ruby
<banisterfiend> rodayo: you need the :, so :name
<rodayo> banisterfriend, when i do that the first parameter ends up being the hash table with the name and age and second one ends up nil
<banisterfiend> rodayo: yeah you're right
<rodayo> a.name = {:name=>"Dave", :age=>12}
<rodayo> yeah
scwh has joined #ruby
zakwilson has joined #ruby
<banisterfiend> rodayo: doesnt seem like it's possible then afaict
<rodayo> banisterfriend, yeah i think my only option is: "a = Person.new; a[:name]=... etc...
<rodayo> makes the code more readable so i'll go with it
yoklov has joined #ruby
davidpk has joined #ruby
fr0gprince_ has joined #ruby
tomzx has joined #ruby
looopy_ has joined #ruby
sohocoke has joined #ruby
vitor-br has joined #ruby
yannis has joined #ruby
eka has joined #ruby
mikepack has joined #ruby
Peaker has quit ["Leaving"]
akem has joined #ruby
akem has joined #ruby
bglusman has joined #ruby
SuperNewb1 has joined #ruby
mikeric has joined #ruby
nu7hatch has quit [#ruby]
chrxn_ has joined #ruby
Johnny35279 has joined #ruby
Lyon has joined #ruby
<Johnny35279> Real quick unimportant question. Anyone use SublimeText? And if you do, how well does codeintel work for you if you use it?
<wargasm2> anyone familiar with watir web driver?
sohocoke has joined #ruby
<wargasm2> how do you clear cookies if you've started a water ie_process?
Targen has joined #ruby
LyonJT has joined #ruby
banisterfiend has joined #ruby
banister_ has joined #ruby
Karmaon has joined #ruby
yannis has joined #ruby
robert_ has joined #ruby
JonnieCache has joined #ruby
savage- has joined #ruby
FACEFOX-DOT-COM has joined #ruby
vitor-br has joined #ruby
indeterminate has joined #ruby
kevinbond has joined #ruby
Karmaon has joined #ruby
QaDeS has joined #ruby
waigani has joined #ruby
indeterminate has joined #ruby
noric has joined #ruby
josefig has joined #ruby
maletor has joined #ruby
mdhopkins has joined #ruby
akem has joined #ruby
Chryson has joined #ruby
indeterminate has joined #ruby
scwh has joined #ruby
Watcher7 has joined #ruby
sei has joined #ruby
mikepack has joined #ruby
looopy has joined #ruby
indeterminate has joined #ruby
Manhose_ has joined #ruby
Manhose__ has joined #ruby
sei has joined #ruby
robert_ has joined #ruby
Karmaon has joined #ruby
Manhose has joined #ruby
rdesfo has joined #ruby
mikepack has joined #ruby
indeterminate has joined #ruby
sroy2_ has joined #ruby
JonnieCache has joined #ruby
noob has joined #ruby
indeterminate has joined #ruby
radic_ has joined #ruby
hadees has joined #ruby
MrGando has joined #ruby
waxjar has joined #ruby
zwevans has joined #ruby
Nicolas_Leonida2 has joined #ruby
Watcher7 has joined #ruby
<Nicolas_Leonida2> what IDE do you guys use for ruby?
[eko] has joined #ruby
JonnieCache has joined #ruby
Karmaon has joined #ruby
<banister_> Nicolas_Leonida2: emacs
<Nicolas_Leonida2> is there a way to debug ruby like xdebug for php and .net?
<Nicolas_Leonida2> look into what every variable has?
<banister_> Nicolas_Leonida2: ruby programs never have bugs so we dont need to do that
<Nicolas_Leonida2> banister_: do you think I'm crazy for being a php guy and I should switch to Ruby ASAP?
igaiga has joined #ruby
waxjar has joined #ruby
<JonnieCache> do you feel crazy
<banister_> Nicolas_Leonida2: no, php people are inherently brain damaged through overexposure to bad code, we're only looking for ex-c and ex-smalltalk programmers at this stage, no more openings left for ex-php programmers sorry.
<Nicolas_Leonida2> when you say you don't need to debug, you are kidding right? like if you mistype a variable name, what will happen?
<banister_> Nicolas_Leonida2: ruby just figures out what to do itself based on sophisticated heuristics and machine learning algorithms
<banister_> Nicolas_Leonida2: it can guess with 99.99% accuracy the code you meant to type, and execute that instead
Manhose_ has joined #ruby
<Nicolas_Leonida2> banister_: I can't believe that, I remember when I was 12, I was thinking programming languages should be smart enough to know that
<Nicolas_Leonida2> is that really what ruby does?
tommyvyo has joined #ruby
<banister_> Nicolas_Leonida2: Yeah
<Nicolas_Leonida2> no way!
<Nicolas_Leonida2> does Ruby do automatic backend, CRUD?
<banister_> Nicolas_Leonida2: a ruby program is basically just a bunch of high level declarations of what you want your program to do, ruby then figures out the best way to do it
headius has joined #ruby
<Nicolas_Leonida2> banister_: that's nice, but doesn't really answer my question, let
<Nicolas_Leonida2> lets say I wanna make a blog, will ruby generate the backend quickly for me?
michaelmartinez has joined #ruby
<banister_> Nicolas_Leonida2: no, the back-end to a ruby program has to be hand coded in C
peterhil` has joined #ruby
<Nicolas_Leonida2> banister_: this is an important moment in my developer life I'm about to convert, does ruby do scaffolding?
<banister_> Nicolas_Leonida2: because ruby itself doesnt do a lot, really
<banister_> Nicolas_Leonida2: b4 you decide to switch from php to 'ruby' i suggest you google what ruby actually is
kvirani has joined #ruby
yannis has joined #ruby
<iamjarvo> why does calling stack mean calling the array? because the array is the only thing in the method hence it gets evaluated ?
<JonnieCache> the stack method returns the contents of the @stack variable
MissionCritical has joined #ruby
<JonnieCache> if @stack is empty it puts an empty array in it first
darren has joined #ruby
<JonnieCache> look up how the ||= operator works
<JonnieCache> and the concept of memoization
voodoofish430 has joined #ruby
jfelchner has joined #ruby
<iamjarvo> JonnieCache: im familiar with ||= my confusion is how come i call stack.push and that can access the @stack array
<iamjarvo> how does the method stack have a .push
Tomasso has joined #ruby
y3di has joined #ruby
<y3di> how do you create a jsn object in ruby
<y3di> json*
<rking> Any advice on where to find the steps to add a co-maintainer to a gem?
<iamjarvo> JonnieCache: did i make sense?
<banister_> rking: gem install gemcutter
<banister_> rking: gem owner -a their@email.com
<rking> y3di: You have several options. And, you have several options of how to find that out. Try Googling "ruby json" and see if you don't have an answer in under a minute, then if not let me know.
<banister_> i thik u put the gem name after their address
baroquebobcat has joined #ruby
<rking> banister_: Aha, excellent. Thank you.
<iamjarvo> banister_: is idea on my question
<banister_> Nicolas_Leonida2: no, ruby does not
jmfcool has joined #ruby
<Nicolas_Leonida2> banister_: why not? django does, php cake, symphony etc...
<banister_> iamjarvo: i dont know what you mean
iamjarvo has joined #ruby
khakimov has joined #ruby
<td123> ruby is an apple, django is an orange
<iamjarvo> my fellow ruby friends can you clear up why stack.push works here https://gist.github.com/28119187eec67d552308
<iamjarvo> banister_: https://gist.github.com/28119187eec67d552308 i am trying to figure out why the stack method gets .push
<iamjarvo> basically why the method stack gets array methods to it
<iamjarvo> is it because the only think in the method is being evaluated to an array?
<banister_> iamjarvo: no idea sorry
<JonnieCache> yeah youre basically right iamjarvo
brianpWins has joined #ruby
<JonnieCache> with stack.push youre calling push on the return value of the stack method
<JonnieCache> which is an array
<iamjarvo> so its sort of method chaining
<iamjarvo> evaluate stack and then tack push on it
<rking> y3di: Did you get it?
<JonnieCache> iamjarvo: yeah its a pretty standard thing to do in any language...
Saif has joined #ruby
<iamjarvo> JonnieCache: still learning :)
Saif has quit [#ruby]
medik has joined #ruby
<JonnieCache> generally, when you run a.b it has to evaluate a to something
<JonnieCache> a might be a local variable or a method call
<rking> banister_: Did you see the coolline report re: readline?
<JonnieCache> but it follows the trail of a until it gets an objectt
<JonnieCache> then calls b on it
<JonnieCache> in other languages you might have a different notation for calling methods, variables and so on. in ruby everything often looks interchangable
<iamjarvo> JonnieCache: true and once you call a method it has to return something before it can move on. didnt think of that
<iamjarvo> should put on my thinking cap
andrewhl has joined #ruby
<banister_> rking: Yeah, basically vi keybindings are for dorks, real men use emacs
<JonnieCache> for me it helps to think of the interpreter physically following a trail through the code until it finds something, then turning back and retracing its steps, like hansel and grettel
<JonnieCache> but everyones minds works differently so that might just confuse you
<banister_> rking: ;)
<rking> banister_: I did not know that. =\
rdesfo has quit [#ruby]
<banister_> rking: ok, coolline is a total reimplementation of a readline system
<iamjarvo> haha JonnieCache cool thanks
<banister_> rking: so everything needs to be redone from scratch
<banister_> rking: i guess we just haven't got around to doing vi keybindings, but since the project maintainer is an emacs guy he just hasn't got around to it yet, and it's likely he never will
c0rn has joined #ruby
<JonnieCache> lol its late here and I just typed `fate` into my shell instead of `date`
<banister_> rking: but if you (or some other vi guys) really want vi keybindings supported im sure he'd accept pull requests
<JonnieCache> kind of disappointed zsh didnt have any deep truths to offer me
<rking> banister_: Wow.. haha.. I didn't realize it was that intense of an implementation. I figured it simply re-eval'd the syntax highlighting for every change.
<banister_> rking: no, it's a total rewrite ;)
jmfcool has joined #ruby
jimeh has joined #ruby
akem has joined #ruby
mikepack has joined #ruby
josefig has quit ["Textual app"]
SuperrMann has joined #ruby
hr4dish has joined #ruby
chrxn_ has joined #ruby
liluo has joined #ruby
jankly_ has joined #ruby
thismax has joined #ruby
jetblack has joined #ruby
peterhil has joined #ruby
mikepack has joined #ruby
thismax has quit [#ruby]
thismax has joined #ruby
CheeToS has joined #ruby
noodletraveler has joined #ruby
davidcelis has joined #ruby
Brainix has joined #ruby
andyl has joined #ruby
FLeiXiuS has joined #ruby
FLeiXiuS has joined #ruby
hemanth has joined #ruby
S2kx has joined #ruby
heftig has joined #ruby
Mohan has joined #ruby
Mohan has joined #ruby
abstrusenick has joined #ruby
c0rn_ has joined #ruby
rramsden has joined #ruby
abra has joined #ruby
srnty_ has joined #ruby
ananthakumaran has joined #ruby
lateau has joined #ruby
ckrailo has joined #ruby
shanthoosh has joined #ruby
bglusman has joined #ruby
Targen has joined #ruby
jellow has joined #ruby
srnty has joined #ruby
<jellow> anyone know is there is an equivalent to C's setuid(0) in ruby ?
LiquidInsect has joined #ruby
<btaitelb> jellow: not that I'd recommend it, but you could set the ruby interpreter itself as setuid(0)
<btaitelb> but that would be a horrible thing to do
<btaitelb> you can't setuid scripts, as I found out the hard way in stripe's capture the flag
<btaitelb> which is also a good thing, imo
akem has joined #ruby
shanthoosh has joined #ruby
<Asher> jellow - what are you trying to achieve?
<Asher> you probably want something like popen3 and sudo
havenn has joined #ruby
<jellow> I have a backup script that I want to run as root , setuid is disbaled in shell
<Asher> is there a reason sudo is no good?
Mon_Ouie has joined #ruby
altious has joined #ruby
<jellow> do not have sudo it's on an embedded system
<Asher> well you can use popen3 to create a new shell and switch to root to execute your script
tk____ has joined #ruby
<btaitelb> if you can switch to root, why not switch to root before executing the script directly (or executing the wrapper ruby script if it's making the call)?
<jellow> btaitelb: I do not want to give root to any of the users but they need to root in order to run the script
mikepack has joined #ruby
<jellow> I'm going to use sudo the other solutions are horrible even for me. Sorry to waste your time
<Asher> sudo was built for this purpose
SeySayux has joined #ruby
<btaitelb> yeah, and who doesn't love setting up a build dev for an embedded environment?
<btaitelb> hopefully it's a common env and you can just find downloads :)
<jellow> btaitelb: Have to cross compile everything with my ISP's dodgy tool chain :(
MasterIdler has joined #ruby
<Asher> jellow - what sort of environment are you working with here?
Karmaon has joined #ruby
mikeric has joined #ruby
looopy has joined #ruby
<jellow> Asher: hmm 8mb of flash and a little-endian processor and a funny kernel
<Asher> ISP hosts on cell phones?;)
ananthakumaran has joined #ruby
tonini has joined #ruby
jarred has joined #ruby
<jellow> Asher: more like calculators
<JonnieCache> the real question is, can you run quake on it yet?
akem has joined #ruby
twinturbo has joined #ruby
<jellow> JonnieCache: who need quake when you have emacs to play with !
<JonnieCache> surely quake has been ported to elisp by now
* JonnieCache checks
<JonnieCache> apparently its doom that you can run on calculators
<JonnieCache> not quale
<JonnieCache> BO-RING
hukl has joined #ruby
RubyRedGirl has joined #ruby
Quadlex has quit [#ruby]
crodas has joined #ruby
greenarrow has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
davidpk has joined #ruby
dankest has joined #ruby
akem has joined #ruby
<banister_> .time sf
waigani_ has joined #ruby
Nicolas_Leonida2 has joined #ruby
<noob> quake is the best game of all time, it better have been ported to everything
<JonnieCache> it runs in js/html5/webgl
<JonnieCache> quake2 does as well
<noob> ti-89 or bust
<JonnieCache> well that guy wrote an ARM emulator for AVR
<banister_> JonnieCache: got a link to that?
<JonnieCache> banister_: http://dmitry.co/index.php?p=./04.Thoughts/07.%20Linux%20on%208bit
<JonnieCache> insane hack
<noob> shit
<banister_> JonnieCache: no i mean on the web :P
shanthoosh has joined #ruby
<noob> thx for the lnk jonnie
<noob> thats pretty baller
<JonnieCache> heres browser quake2
<JonnieCache> they took a prexisting java port and pushed it through GWT
<JonnieCache> pretty mad
<JonnieCache> but not as cool as linux-on-avr. that guy did SDRAM refreshing by hand
<noob> the linux thing is f'ing amazing
<noob> the q2 thing is cool
<noob> but i guess its just like... underwhelming a bit
<noob> when you can play quakelive in a browser window it's just not as impressive to see q2 like that
<noob> i get the no plugins thing etc
<noob> but still
<noob> onlive and shit is also pretty impressive
<JonnieCache> when i first ran q3a on my android phone at full speed that was pretty cool
<noob> yea
<noob> i wish id didnt suck now
<JonnieCache> what android?
<noob> god damn carmack is busier making rockets
<noob> than games
<noob> who the hell needs space colonization without good multiplayer fps? sheesh carmack
<noob> not android, the company
<noob> that made quake
<noob> lol
<banister_> JonnieCache: what do you think about websockets
<JonnieCache> is he? what is he pumping money into the xplane or something?
<noob> nah
<noob> armadillo aerospace
<noob> they have a pretty cool tech for 2nd stage ignition
<noob> i think they are going to get acquired by spaceX or one of the bigger firms soon enough
<JonnieCache> banister_: theyre pretty cool. havent used them in anger.
<noob> i saw carmack in dallas a few weeks ago
<JonnieCache> once you get past the handshake theyre just sockets as i understand it
<noob> the guy is barely aware of what the hell is going on at his own company now
<JonnieCache> banister_: why do you ask
<banister_> JonnieCache: qrs
<banister_> JonnieCache: what's their use case?
nari has joined #ruby
<JonnieCache> firstly as a more efficient way of doing comet
<JonnieCache> instead of long-polling
<JonnieCache> secondly to push a continuous stream of live data in either direction.
<JonnieCache> somebody did a thing where you can see the position of everyone elses cursor who is also looking at the page
heftig has joined #ruby
<JonnieCache> you could do live stock prices or whatever
<JonnieCache> or imagine a google wave/etherpad style thing
robert_ has joined #ruby
GoBin has joined #ruby
y3di has quit [#ruby]
h4mz1d has joined #ruby
replore has joined #ruby
invsblduck has joined #ruby
rippa has joined #ruby
schovi has joined #ruby
luckyruby has joined #ruby
chrxn_ has joined #ruby
<shevy> hmm when I have file foo1.rb and foo2.rb and these both define just one method
shanthoosh has joined #ruby
<shevy> but without living under a specific module... is it possible to load them as part of a module Foo ?
<shevy> like foo1.rb has content "def test; puts 'this is a test'; end" and it should be tied to module Foo at runtime
echiu has joined #ruby
<heftig> read+eval, I guess.
<heftig> and a method_added hook if you need one.
rohit has joined #ruby
nilg` has joined #ruby
<JonnieCache> shevy: dont do read+eval
<JonnieCache> that will lead to pain and miseyr
<JonnieCache> GODDAMN YOU SSL!
<JonnieCache> imagine how different the world would be if berners-lee had put publickey crypto and a hardened session layer into http from the start
djdb has joined #ruby
workmad3 has joined #ruby
kuzushi has joined #ruby
minijupe has joined #ruby
arturaz has joined #ruby
ryanf has joined #ruby
wookiehangover has joined #ruby
KL-7 has joined #ruby
Asher has joined #ruby
waigani_ has joined #ruby
Jackneill has joined #ruby
x0F_ has joined #ruby
girasquid has joined #ruby
ph^ has joined #ruby
<girasquid> If I have a list like ['foo', 'bar', 'foo', 'baz'], what's the best way to convert that to unique entries + their counts? (for example, {:foo => 2, :bar => 1, :baz => 1})
echiu has quit [#ruby]
jmfcool has joined #ruby
cezar has joined #ruby
sebcioz has joined #ruby
vectorshelve has joined #ruby
invsblduck has joined #ruby
MrGando_ has joined #ruby
<rippa> girasquid: Hash[['foo', 'bar', 'foo', 'baz'].group_by {|s| s}.map {|k, v| [k, v.size]}]
<banister_> rippa: hehe
<vectorshelve> rippa: hai :)
<rippa> hi
<girasquid> oh, awesome - thanks!
<vectorshelve> rippa: banister_ girasquid wanna show you something cool -> http://rubymonk.com/
<banister_> girasquid: ['foo', 'bar', 'foo', 'baz'].each_with_object({}) { |v, o| o[v] ||= 0; o[v] += 1 }
senny has joined #ruby
<vectorshelve> banister_: that will give -> undefined method `each_with_object' for ["foo", "bar", "foo", "baz"]:Array
<banister_> vectorshelve: noo
<banister_> b
<hemanth> each_with_object works fine
<btaitelb> lst.inject({}){ |counts, obj| count = counts[obj]; counts[obj] = count ? count + 1 : 1; counts }
<banister_> vectorshelve: get on ruby 1.9 ;)
<hemanth> Is there a way to check the Gem Version in Ruby at Runtime?
<hemanth> Gem::Specification is not helping
<hemanth> > Gem.loaded_specs.keys.sort
<hemanth> => []
<banister_> hemanth: Gem::VERSION
<vectorshelve> hemanth: puts Gem.loaded_specs["activesupport"].version
<hemanth> vectorshelve, ya show that, it works well on GNU/Linux but not on window$ with 1.9.3
<hemanth> vectorshelve, for the matter of fact, system("gem list") itself bombs!
dross has joined #ruby
dross has joined #ruby
<vectorshelve> hemanth: I dont suggest you working with ruby on windows..:) It has a hell lot of deprecation issues right from gem versions to commands
<rippa> vectorshelve: there's an error
<rippa> >Let us begin this journey by creating an empty array. It's easier than you think.
<vectorshelve> hemanth: I guess you are building rspec using ruby for testing
<rippa> it's not easier, it's exactly as easy as I thought
davidpk has joined #ruby
<vectorshelve> rippa: what are you talking abt ? :)
<vectorshelve> rippa: so what is the error ?
c0rn has joined #ruby
<rippa> there should be a disclaimer
<hemanth> vectorshelve, i too hate window$, but for bread i need to do some of it
<rippa> "creating an empty array may likely be easier than you think"
<vectorshelve> rippa: english grammer ?
<vectorshelve> hemanth: I understand...
<rippa> what is grammer, i do not speaking it
<vectorshelve> hemanth: mera interview hai bangalore ek company ke saath.. they build rubymonk.com
KL-7 has joined #ruby
<vectorshelve> rippa: :D
<vectorshelve> rippa: whats wrong with "Let us begin this journey by creating an empty array. It's easier than you think. " ? :)
<hemanth> vectorshelve, I came across that site today! They are doing good.
<hemanth> vectorshelve, but choti company heyna?
zschallz has joined #ruby
<rippa> vectorshelve: nothing
<rippa> I was joking
<vectorshelve> hemanth: dude they are cool... I spoke with the CEO... he told me they have no plans of going more than 30 employees no matter how much they grow.. they pay like 6.6lpa take home for freshers
<vectorshelve> rippa: then you said there is a mistake :)
<vectorshelve> hemanth: they are doing some good open soure stuff too
gianlucadv has joined #ruby
<hemanth> vectorshelve, killer, refer me after you get in ;)
akem has joined #ruby
<vectorshelve> hemanth: haan lekin yaar growth bahut hai.. more than 350% last year
<hemanth> vectorshelve, uber kool, where are they located?
<vectorshelve> hemanth: they are ex thought work employees.. har saal 15% permanent cost of living hike.. arey aur 6.6 take home hai poora so ctc will be like 7.3 something.. thats good na for freshers..
<hemanth> vectorshelve, very good indeed!
<vectorshelve> hemanth: tu pehle mujhe dell mein refer kar :) they are now looking for RoR
<hemanth> vectorshelve, dell mey abhi poora c++ aur testing may opening hey yar
<vectorshelve> hemanth: developers.. I have a coding round first this weekend.. if I clear it they will fly me down to Bangalore for the next 3 rounds
<hemanth> vectorshelve, RoR may?
maesbn has joined #ruby
<vectorshelve> hemanth: kasam se bol raha hoon I always wanted to work on C++ all product based companies work on C++
<vectorshelve> hemanth: ruby on rails mainly
<hemanth> vectorshelve, Who said anything about salary cuts? We pay, and pay well. Not as well as, say, Google, but definitely above the industry average.
<hemanth> hemanth, ruby monks says so
<hemanth> vectorshelve, ^
<hemanth> vectorshelve, hope that CEO is not in this room :D
<hemanth> Indiranagar Stage 1
<vectorshelve> hemanth: they are a good team yaar.. they are doing great open source stuff.. too which is simply superb.. and they do everything using best practices.. bahut kuch seekhne ko milega.. company is growing abi se ghus jaaonga toh aage jaake bahut growth hogi yaar
<vectorshelve> hemanth: yes... yaar :)
r126l has joined #ruby
<vectorshelve> hemanth: woh sab maine pad liya bosss.. bus agar meri selection hogi toh varna :(
bigkevmcd has joined #ruby
<vectorshelve> hemanth: aur bata tera kya chal raha hai ? hum logo ko is baar hike mili hai 4% kaminey kahi ke.. saal bar ki mehnat ka yeh anjaam :( Idiots
<hemanth> vectorshelve, oh bad, dekhna hey mayra number kithna hoga iss sal; brb
<hemanth> vectorshelve, varna you will have another opening don worry
Morkel has joined #ruby
ryanf has joined #ruby
<vectorshelve> hemanth: gaya ?
sei has joined #ruby
tewecske has joined #ruby
ananthakumaran has joined #ruby
Akuma has joined #ruby
<hemanth> vectorshelve, back
<vectorshelve> hemanth: arey tumhe toh already achcha mil raha hai yaar hum logo ko socho... I am getting 1/3 of you I guess :(
<vectorshelve> hemanth: aur wahi nahi tum DELL ke saath ho aur main :( TCS
<vectorshelve> :'( :'( :D
<dross> o.0 what language is that?
<vectorshelve> shevy: Hai dear :)
<hemanth> dross, on of the oldest ;)
<dross> Speak English Motherfucker :3 Or Japanese
<JonnieCache> is it urdu or hindi perchance?
<hemanth> dross, 性交か
<hemanth> JonnieCache, Hindi :)
davidw has joined #ruby
<JonnieCache> it looks a bit like swedish when you render it into ascii
<JonnieCache> i was confused for a minute
<hemanth> JonnieCache, heh heh
<JonnieCache> its the double aas
<epitron> finnish likes the double a's too
<dross> crap xD I don't even have my input languages installed on this machine
<hemanth> vectorshelve, don over think!
GoBin has joined #ruby
<vectorshelve> hemanth: yaar tu zynga mein apply kar
<vectorshelve> hemanth: this is underthinking ;)
<hemanth> vectorshelve, lol zynga to gaya...abhi may idarich settle honeka
CheeToS has joined #ruby
boena has joined #ruby
<vectorshelve> hemanth: achcha... toh mera bhi waha lagwaade bhai... apni HR ko pataale aur mera waha banaade naukri :D
<hemanth> vectorshelve, better PM or else dross will kill us :D
<dross> speaking in a foreign language is okay, but it's recommended you speak the common language of the channel, else the conversation appears rude.
r126l has joined #ruby
freeayu has joined #ruby
<hemanth> dross, roger that
QaDeS has joined #ruby
mohits has joined #ruby
Ammar01 has joined #ruby
blast_hardcheese has joined #ruby
RubyRedGirl_ has joined #ruby
mucker has joined #ruby
alex__c2022 has joined #ruby
nari has joined #ruby
<Tasser> JonnieCache, strange client you have
Manhose has joined #ruby
CrazyGangster has joined #ruby
<JonnieCache> Tasser: eh?
LMolr has joined #ruby
<JonnieCache> irc client you mean
sn0lan has joined #ruby
nemesit has joined #ruby
<Tasser> yep
<JonnieCache> irssi its a text mode client
<JonnieCache> its pretty common i think
<Tasser> strange that it can't handle unicode
<Tasser> or utf8 that is
<JonnieCache> what gives you that impression?
<JonnieCache> seems fine to me
<JonnieCache> ♥ ♥ ♥ ♥ ♥
<Tasser> hmmm
<JonnieCache> oh was it my reference to "rendering into ascii" earlier?
<JonnieCache> that wasnt meant literally :)
mengu has joined #ruby
mengu has joined #ruby
<JonnieCache> i probably shouldve said "the latinate script" but ascii is easier to type
mengu_ has joined #ruby
mengu_ has joined #ruby
zschallz has joined #ruby
zschallz has joined #ruby
fabrice31 has joined #ruby
heftig has joined #ruby
shanthoosh_ has joined #ruby
jenglish has joined #ruby
nipra has joined #ruby
ukwiz has joined #ruby
<CrazyGangster> hello ppl, any1 know what is asked here http://tinypaste.com/253822f4, i dont get it :/
mikeric has joined #ruby
<vandemar> CrazyGangster: you write a regex to see if a url contains a correct 3 to 5 character protocol prefix
KL-7 has joined #ruby
<sebcioz> CrazyGangster: thay want you to make a function that check if string starts with correct url protocol
schovi has joined #ruby
<heftig> actually that's way to restrictive for the protocol name
<heftig> The scheme name consist of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-"). Although schemes are case-insensitive, the canonical form is lowercase and documents that specify schemes must do so with lowercase letters. It is followed by a colon (":").
<vandemar> yep and no good app would care if there's a protocol prefix. urls can also be relative paths, or relative to the protocol
NivenHuH has joined #ruby
<vandemar> //foo.bar.com/path is supposed to be treated as if it has the same protocol as the resource the link is contained in.
<CrazyGangster> ok but what its the meaning of #produces true/false? should i print true or false?
<heftig> no, return
<heftig> look at the examples
nilg` has joined #ruby
<heftig> the method returns a boolean, which is then output by the "puts"
jimeh has joined #ruby
<CrazyGangster> so i need to make a function that returns true/false and next i can print of whatever, right?
kevinfagan has joined #ruby
<vandemar> CrazyGangster: you need to look for a basic ruby tutorial, but in irb: def retval(val) val end; retval("cat"); retval(5)
<vandemar> that is not a solution, but it should show you how implicit return values work
Shahor has joined #ruby
<JonnieCache> if you need to validate urls the ruby URI class has facilities to do that
Vert has joined #ruby
eka has joined #ruby
<CrazyGangster> k
<heftig> also, the method will need to be defined on String.
nilg` has joined #ruby
shruggar has joined #ruby
ephemerian has joined #ruby
ephemerian1 has joined #ruby
nipra has joined #ruby
charnel has joined #ruby
nemesit has joined #ruby
<charnel> how can I use a string as method name like User.added_last_{variable}
<charnel> I want to have a value there fetched from a form
<JonnieCache> well you use the send method
<JonnieCache> but BE VERY CAREFUL PASSING FORM VALUES INTO THAT
<JonnieCache> ie dont do it
<JonnieCache> because that will cause a gaping security hole
<JonnieCache> if you forcably concatenate it with "added_last_" like that you will have some protection
<JonnieCache> but i still wouldnt do it
roolo has joined #ruby
<vandemar> that happens a lot on stupid custom cms designs. taking elements from the path and trying to directly call methods with those names
<JonnieCache> if you must do it, have some whitelist
ananthakumaran has joined #ruby
<charnel> JonnieCache: Thank you very much that really been helpfull
minijupe has joined #ruby
fearoffish has joined #ruby
* TTilus has seen one pretty bad, single action that allowed reading and writing on all databases on the particular server
<tchebb> will send reject tainted strings if $SAFE is 1>
stefanp has joined #ruby
stefanp has joined #ruby
<tchebb> *?
workmad3 has joined #ruby
<TTilus> tchebb: have you tried? its not that hard
<tchebb> TTilus: I'm doing that now
petercs has joined #ruby
<tchebb> No, it won't.
tatsuya_o has joined #ruby
<tchebb> It probably should, though
apeiros_ has joined #ruby
sebcioz has quit [#ruby]
sebcioz has joined #ruby
DuoSRX has joined #ruby
pp01bit has joined #ruby
<TTilus> i dont think it should
<TTilus> imo it is the same kind of thing than passing a properly quoted parameter to sql query
<tchebb> But that's exactly what $SAFE is supposed to protect against
<TTilus> you know it executes your query and it fails or not and thats all
<TTilus> you know #send calls a method and thats all
<tchebb> If a string is tainted, it should be assumed to contain an exploit
<TTilus> no matter what string you give #send, you cant make it do something else than call a method
<tchebb> But a user supplied string should in nearly all cases not be passed directly to send
<tchebb> File.open won't accept tainted strings for the filename
<tchebb> I don't see how send is any different
<TTilus> hmm, you have a point there
<apeiros_> String tainting is (sadly) widely not well understood…
<TTilus> if File.open won't accept, then it would only be logical for #send not to accept either
<tchebb> TTilus: Exactly, that's my point.
<tchebb> Opening a bad file does nothing bad in and of itself, but it's what you do with that file that can be harmful, just like what you do with the return value of whatever method you're calling with send.
<TTilus> whats happening there https://gist.github.com/448884#L84
<TTilus> why is Process.setsid called on the process which is supposed to be creating the daemon
<TTilus> theres somehting i dont understand now
<banister_> .
<banister_> TTilus: i want kisses
GoBin has joined #ruby
<TTilus> banister_: :-*
<banister_> thx
<TTilus> banister_: prefer ass or face?
<banister_> 3 inches from the top right corner of the left lung
<tchebb> in what direction?
<TTilus> that'll be nipple i guess :(
Natch| has joined #ruby
Morkel has joined #ruby
bier|tp has joined #ruby
bier has joined #ruby
foofoobar has joined #ruby
<foofoobar> Hi
S1kx has joined #ruby
<foofoobar> foo = [ [1, 123], [2, 24], [1, 23453] ]; I want a .uniq on this array, but only based in the first first element on the lists inside
<foofoobar> so one of the [1, ..] should be removed
Gekz has joined #ruby
Gekz has joined #ruby
<foofoobar> how can I do this?
<apeiros_> not strictly ruby related - but anybody know a good tool
francisfish has joined #ruby
<apeiros_> whoops
<TTilus> banister_: i kissed you allready, do i now get my support in form of explanation of Process.setsid?
<apeiros_> enter-misfire…
<apeiros_> not strictly ruby related - but anybody know a good hosted tool for online surveys?
Mchl has joined #ruby
<tchebb> apeiros_: That's not at all ruby related
<tchebb> Unledd the histed tool is written with ruby
<tchebb> *hosted
<shevy> hmm
<tchebb> *Unless
<shevy> php!
* tchebb can't type today
<apeiros_> see! so it *might* be ruby related :) but yeeees, you're right, it's barely ruby related…
<shevy> TTilus ewww you kiss banister??
<tchebb> I think Google Docs can do surveys
<TTilus> foofoobar: Hash[foo].to_a
<banister_> shevy: he wants my disease
mengu has joined #ruby
mengu has joined #ruby
<foofoobar> TTilus: what does this exactly do?
<TTilus> shevy: i know the hope is faint...
<TTilus> foofoobar: turns list of pairs into hash and back to array again
berserkr has joined #ruby
<foofoobar> TTilus: so what is the benefit of doing this?
<apeiros_> tchebb: via google docs -> form?
<TTilus> foofoobar: hash keys are unique in the way you describe you want your pairs to be
<sebcioz> foofoobar: IMO much bettery and cleaner way: foo.uniq { |a| a.first }
<tchebb> apeiros_: yeah
<foofoobar> great, thanks
<tchebb> sebcioz: Won't that remove the entire subarray instead of just the first element?
Mchl has joined #ruby
chussenot has joined #ruby
<sebcioz> tchebb: yeah, but i think it is what foofoobar wanted
<foofoobar> yes, thank you
<foofoobar> maybe I described it a bit complicated
<tchebb> Oh, I see now
<tchebb> tYeah, that's the best way
nipra has joined #ruby
<apeiros_> tchebb: thanks for the input
darthdeus has joined #ruby
cantonic has joined #ruby
<TTilus> i guess nobody is willing to explain me Process.setsid :(
<heftig> TTilus: hm?
<TTilus> 12:00 < TTilus> whats happening there https://gist.github.com/448884#L84
<shevy> never heard of setsis
<TTilus> 12:01 < TTilus> why is Process.setsid called on the process which is supposed to be creating the daemon
<heftig> it's daemonizing, setsid is a part of that
<TTilus> i know it is daemonizing,
<heftig> see SysV Daemons, here: http://0pointer.de/public/systemd-man/daemon.html
Nicke\ has joined #ruby
<heftig> setsid is step 6.
<TTilus> now explain me why setsid is called in the parent in the gist
Nowaker has joined #ruby
virunga has joined #ruby
iMe has joined #ruby
<heftig> TTilus: that indeed makes no sense
Mchl has joined #ruby
<foofoobar> How to convert a list of strings to a list of regexes?
<heftig> map with Regexp.new
<apeiros_> or /#{string}/
<tchebb> Is spawnp like execl where the spawning process gets its address space overwritten?
<tchebb> Because that would make sense
<heftig> still makes no sense to call setsid in the parent after forking
<tchebb> If spawn overwrites the address space, there is no parent anymore
<heftig> no, spawn type calls include forks
<tchebb> But then setsid would never get called at all
<tchebb> so there would be no point
<tchebb> hmm
<heftig> setsid before forking would make more sense
<foofoobar> SOmeone working with anemone here and can tell me how to use http basic auth with it? I' can't find it in the docs
Manhose_ has joined #ruby
polysics has joined #ruby
sohocoke has joined #ruby
trivol has joined #ruby
KL-7 has joined #ruby
kidoz has joined #ruby
iocor has joined #ruby
araujo has joined #ruby
ronniy has joined #ruby
Squarepy has joined #ruby
Squarepy has joined #ruby
justinmcp has joined #ruby
araujo has joined #ruby
<hemanth> Trying to override Sting#include? to accept RE also, is it a bad way ?
<shevy> hemanth yeah
<shevy> though if it is Sting and not String then it may be ok ;)
<hemanth> shevy, def contains_text(input)....if input.class == rExp then =~ or else include? better?
nipra has joined #ruby
Neil_ has joined #ruby
<shevy> not really :D
<shevy> what is rExp? a custom class from you?
<shevy> I'd use input.is_a? rExpt
<Tasser> [1] pry(main)> "foo" === "foo"
<Tasser> => true
<Tasser> [2] pry(main)> /fo/ === "foo"
<Tasser> => true
<shevy> if you have this project as standalone then you can modify String
Divinite has joined #ruby
<Tasser> hemanth, it's not on string, but it should do the work
replore_ has joined #ruby
<hemanth> shevy, Regexp i meant
mucker has joined #ruby
<hemanth> Tasser, kool, will test
fayimora has joined #ruby
<hemanth> [1] pry(main)> "hemanth is testing" === "hemanth"
<hemanth> => false
<hemanth> [2] pry(main)> "hemanth is testing" =~ /hemanth/
<hemanth> => 0
<hemanth> [3] pry(main)> "hemanth is testing"["hemanth"]
<hemanth> => "hemanth"
<hemanth> [4] pry(main)> "hemanth is testing"[/hemanth/]
<hemanth> => "hemanth"
<hemanth> holy goodness!
h4y4shi has joined #ruby
<hemanth> Tasser, shevy ^
CannedCorn has joined #ruby
<shevy> what
<hemanth> saw that?
<banister_> hemanth: why are you so excited? :)
<shevy> hemanth I see that but I dont know what about it
<shevy> it's typical ruby code after all
<shevy> "hemanth is testing"[/(hemanth)/]
Divinite has joined #ruby
<shevy> $1 # => "hemanth"
<hemanth> > "hemanth".include?(/hem/) will say TypeError: can't convert Regexp into String
<hemanth> but one can do "hemanth"[/hem/] that's kool enuf
fr0gprince_mac has joined #ruby
<shevy> no idea why include? does not like regex
<hemanth> ^_^
<foofoobar> how to split foo/ba/foobar/asd/bing.html to foo/ba/foobar/asd/ and bing.html (split from right into two pieces) ?
<shevy> File.basename and File.dirname should do
Divinite has joined #ruby
<shevy> x = "foo/ba/foobar/asd/bing.html"; File.basename x # => "bing.html"
<foofoobar> shevy: it's an url, does it work for this too ?
<shevy> File.dirname x # => "foo/ba/foobar/asd"
<shevy> it works if you have a String
<foofoobar> k
<shevy> if url is not a string and some other class, just get a string back from it
<foofoobar> shevy: but then I have to cut the starting "http://" because of the two slashes
<Tasser> hemanth, just enjoy the goodness of ruby...
<shevy> foofoobar yeah
<shevy> foofoobar but you did not say that your string contained that
josephwilk has joined #ruby
<shevy> you said "how to split foo/ba/foobar/asd/bing.html"
<foofoobar> shevy: oh yes, sorry
<shevy> you can split on '/' too if you want to
<shevy> x = "foo/ba/foobar/asd/bing.html".split('/')
<shevy> # => ["foo", "ba", "foobar", "asd", "bing.html"]
<foofoobar> split '/', drop the last element and join?
<shevy> well yeah, that's basically what .basename and .dirname does too. you can probably omit the first element as well if it contains that http thing
<shevy> x = "http://foo/ba/foobar/asd/bing.html".split('/')
<shevy> # => ["http:", "", "foo", "ba", "foobar", "asd", "bing.html"]
<foofoobar> shevy: is there something like [0:-1] in ruby?
<shevy> last_element = x.pop # => "bing.html
<banister_> foofoobar: [0..-1]
<shevy> yeah foofoobar
<shevy> x # => ["http:", "", "foo", "ba", "foobar", "asd"]
<shevy> x[1..-1].join '/' # => "/foo/ba/foobar/asd"
<shevy> not sure if you need the first '/' there :P
<hemanth> Tasser, :)
<foofoobar> x = "http://google.com/foo/bar/foo.html".split("/")[2..-2].join("/")
<foofoobar> this works
ddv has joined #ruby
seed419 has joined #ruby
cu39 has joined #ruby
snearch has joined #ruby
SPYGAME has joined #ruby
Nss has joined #ruby
nipra has joined #ruby
iocor has joined #ruby
skaczor has joined #ruby
<shevy> :D
ananthakumaran has joined #ruby
niklasb has joined #ruby
davidcelis has joined #ruby
<JonnieCache> WICKED. I've battled through fire drills and broken coffee machines but the edge cases are finally banished
A46e67a0b has joined #ruby
<JonnieCache> lunchtime
<JonnieCache> beckons
Divinite has joined #ruby
<shevy> hmm fire drills
<shevy> I wanna do a skyscraper raid during a fire drill
dhruvasagar has joined #ruby
<JonnieCache> wtf is a skyscraper raid
<JonnieCache> i dont want to know
ananthakumaran1 has joined #ruby
<shevy> JonnieCache man, when I watch Hong Kong flicks, the old action movies of the 1980s I wanna jump back in time and just kick around with those dudes
<JonnieCache> i need to watch more kung fu movies. sample goldmine
<JonnieCache> its all about 70s tamil cinema
<JonnieCache> like bollywood but more crazy and budget
<JonnieCache> the period of the 70s when bollywood discovered funk music produced some pretty amazing shit
<JonnieCache> anyway lunchtime
replore_ has joined #ruby
KL-7 has joined #ruby
withnale has quit [#ruby]
<CrazyGangster> hi ppl, i dont know what im doing wrong here http://ideone.com/ifIBX
schovi has joined #ruby
kvirani has joined #ruby
rahim has joined #ruby
iocor has joined #ruby
<shevy> CrazyGangster you defined a method
<shevy> but the method is not on class String
<shevy> so how would this work?
<shevy> puts "http://www.wi.pb.edu.pl".url_protocol?
<shevy> keep in mind "foo" is a string object, and what comes after . is the method you call
<shevy> prepend:
<shevy> class String
<shevy> before
<shevy> def url_protocol?
<shevy> it probably still wont work, but you'll get another error msg ;)
<CrazyGangster> k i will try...
dv310p3r has joined #ruby
bawer has joined #ruby
abra has joined #ruby
trivol_ has joined #ruby
<boena> I'm having problems installing Sphinx on my server. I keep getting error eventhough I have added the host to Mysql: Host 'xyz' is not allowed to connect to this MySQL server. Any ideas?
petercs has joined #ruby
Divinite has joined #ruby
Divinite_ has joined #ruby
heftig has joined #ruby
igaiga has joined #ruby
abra has joined #ruby
MissionCritical has joined #ruby
nemesit has joined #ruby
`brendan has joined #ruby
nanderoo has joined #ruby
kpshek has joined #ruby
vitor-br has joined #ruby
tommyvyo has joined #ruby
maksbotan has joined #ruby
freeayu has joined #ruby
ananthakumaran has joined #ruby
bawer has joined #ruby
twinturbo has joined #ruby
daniel_hinojosa has joined #ruby
geekbri has joined #ruby
gianlucadv has joined #ruby
maksbotan has quit ["http://quassel-irc.org - Chat comfortably. Anywhere."]
oddraisin has joined #ruby
<krz> does ruby have an inet_aton function?
wangr has joined #ruby
looopy has joined #ruby
strife25 has joined #ruby
Nathandim has joined #ruby
<LMolr> krz: check out IPAddr , but i've never used it before
sbanwart has joined #ruby
JonSchuff has joined #ruby
cha1tanya has joined #ruby
tomzx has joined #ruby
shanthoosh has joined #ruby
bananastalktome has joined #ruby
freeayu_ has joined #ruby
shanthoosh_ has joined #ruby
dustybrains has joined #ruby
Synthead has joined #ruby
v0n has joined #ruby
bglusman has joined #ruby
danielpcox has joined #ruby
|RicharD| has joined #ruby
<|RicharD|> hello
<bananastalktome> hello |RicharD|
iamjarvo has joined #ruby
dhruvasagar has joined #ruby
Notimik has joined #ruby
mdhopkins has joined #ruby
kjellski has joined #ruby
sharivind has joined #ruby
kjellski has joined #ruby
<sharivind> any single girls there
<banister_> sharivind: Tasser is a single girl
Synthead has joined #ruby
heftig has joined #ruby
ananthakumaran has joined #ruby
akem has joined #ruby
linoj has joined #ruby
<Tasser> banister_, muahaha
<Tasser> the only bouncing thing on my body are my balls :-P
krusty_ar has joined #ruby
<kalleth> tbh
<kalleth> you have to reach a certain level of desperation to be asking that question in #ruby
sharivind has quit [#ruby]
fmcgeough has joined #ruby
<CrazyGangster> XD
waxjar has joined #ruby
<apeiros_> bigtuna users here? I'm looking for the canonical way to get bigtuna to build upon push (git)
<apeiros_> I have something, but I have a hard time to believe that I'm expected to come up with that myself, i.e., that bigtuna doesn't provide something pre-done…
shevy has joined #ruby
netrealm has joined #ruby
td123 has joined #ruby
jgarvey has joined #ruby
<charnel> how can I say one week ago with Time.now ?
<apeiros_> charnel: Time.now-7*24*3600
<apeiros_> see Time#-
<charnel> apeiros_: Which method would you use is there a better looking way ?
ananthakumaran1 has joined #ruby
billdami has joined #ruby
<apeiros_> is that one or two questions?
v0n has joined #ruby
ceej has joined #ruby
lorandi has joined #ruby
<charnel> 2 I guess. Was looking for a better solution for like Time.week_go(1)
<apeiros_> no, not in plain ruby.
pu22l3r has joined #ruby
<apeiros_> better looking way: use a constant instead of magic numbers.
jeebster has joined #ruby
<apeiros_> or implement the method you mentioned above. easy enough.
<apeiros_> I wouldn't make it Time::weeks_ago, but Time#weeks_ago
looopy has joined #ruby
ceej_ has joined #ruby
iocor has joined #ruby
<charnel> apeiros_: thank you very much
gianlucadv has joined #ruby
uris has joined #ruby
tommyvyo has joined #ruby
Morkel has joined #ruby
mdhopkins has joined #ruby
shanthoosh_ has joined #ruby
maesbn has joined #ruby
zemanel has joined #ruby
vitor-br has joined #ruby
andrewhl has joined #ruby
phantasm66 has joined #ruby
kevinbond has joined #ruby
simonwh has joined #ruby
looopy has joined #ruby
Targen has joined #ruby
internet_user has joined #ruby
havenn has joined #ruby
LBRapid has joined #ruby
abra has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
strife25 has joined #ruby
benatwork has joined #ruby
simonwh has joined #ruby
bbttxu has joined #ruby
ben_alman has joined #ruby
kuzushi has joined #ruby
foobar_ has joined #ruby
<foobar_> Hi. I just installed rails and did a "rails new blog". Now I got a segmentation fault :/
chson has joined #ruby
krusty_ar has joined #ruby
josefig has joined #ruby
josefig has joined #ruby
alx- has joined #ruby
h4mz1d has joined #ruby
simonwh_ has joined #ruby
looopy has joined #ruby
thone_ has joined #ruby
baroquebobcat has joined #ruby
dv310p3r has joined #ruby
snip_it has joined #ruby
<shevy> foobar_ yeah typical for rails. but the rails guys are on #rubyonrails
<shevy> we hate em here :)
<foobar_> oh, okay
<foobar_> why do you hate them?
noob has joined #ruby
robert_ has joined #ruby
<deryl> actually its not typical for rails, you're letting your 'hatred' speak crap. its more than likely a bad compile of your ruby which shevy doen't want to acknowledge happens, because we all know ruby is so much better than rails.
<deryl> foobar_: its not that we hate rails, its that rails is how most people come to ruby, and most don't take the time to learn *ruby* which is what rails runs on and is written in.
jbw has joined #ruby
<shevy> deryl you are putting words in my mouth --> "shevy doen't want to acknowledge happens"
<deryl> shevy: yep,m like you putting out FUD that rails typically segfaults ect ect.
<shevy> deryl so you are the typical rails propaganda runner then?
<Mon_Ouie> Programming politics > IRL politics
<deryl> shevy: so you are the typical ruby propaganda runner then?
<shevy> deryl ruby is awesome
simonwh has joined #ruby
<zacstewart> lol
<deryl> and rails is actually pretty damned decent. you're spreading bullshit so I'm calling you on it, regardless.
John_P has joined #ruby
<shevy> deryl I am glad you love rails though. one fanboi more for it :)
<shevy> yeah, you even do so by ... putting words into the mouth of others
<deryl> actually i rarely do anything in rails. so again, talk out your ass some more
<shevy> go figure having a great discussion culture you are "displaying" here
niku4i has joined #ruby
<shevy> wait - so you are touting rails, put words into other people's mouth, but you don't actually USE rails yet alone love it???
<deryl> shevy: oh you mean like you pushing bullshit to uninformed users?
<deryl> shevy: oh so you push bullshit at others and expec JUST because its a ruby channel that someone isn't going to call you on it?
<shevy> hey deryl, if you can put any funny words into other people's mouth, why can't I?
<deryl> think again
<shevy> no really, fair rules hmm?
<deryl> shevy: think you need to check your ordering. you pushed the FUD first.
<shevy> "deryl: I love rails"
<shevy> ^^^ see? you love rails
cantonic has joined #ruby
<foobar_> maybe my ruby is segfaulting because of rails.. but the segfault should not happened so its more a ruby bug, right?
<deryl> go ahead shevy I'm dying for you to state absolutely that its rails, couldn't POSSIBLY be ruby right? go on, you know you want to
<shevy> deryl said it's ruby's fault foobar_
ddisqq has joined #ruby
<shevy> deryl: you wrote FUD here -> "shevy doen't want to acknowledge happens"
<deryl> no, what I said was that you said segfaulting it a typical behaviour of Rails, whiuch is utter horseshit
<shevy> you put words into other people's mouth man
<zacstewart> add more semicolons
td123 has joined #ruby
<zacstewart> It needs moar
<deryl> shevy: "yeah typical for rails" <- FUD (you spoke first)
<deryl> so, moving on
<shevy> "deryl: I love rails, it's the best"
<shevy> yeah please move on
simonwh has joined #ruby
<deryl> foobar_: all drama aside, the channel here is for ruby itself, stuff you write in straight ruby (or POL/PLain Old Ruby as it's referred to). For Rails related stuff, hit the #rubyonrails channel. it has its own related channel.
<foobar_> all right, ty
<deryl> np
iocor has joined #ruby
iocor has joined #ruby
nonotza has joined #ruby
aszurom has joined #ruby
<aszurom> what should the ruby shabang on OSX be?
zakwilson has joined #ruby
<aszurom> #!/usr/bin/ruby ?
<dkr> try it? ;) or run "which ruby" in a term
<aszurom> yeah, I just wanted to sanity check that was the correct way to write it
<aszurom> that's the path for sure
<shevy> aszurom if the ruby binary is there then it would work
SegFaultAX has joined #ruby
<aszurom> first steps and all
<dkr> that is indeed the correct shabang syntax
<shevy> shabang? :D
<dkr> I'm just using his terminology. :)
hr4dish has joined #ruby
<deryl> another way is #!/usr/bin/env ruby and it will use the first ruby it finds.
<shevy> hehe already wondered
<aszurom> well, what else do you call the #! line?
<shevy> shebang
<deryl> aszurom: its known as a shebang line. (she not sha)
<kalleth> deryl: i've found sometimes when using cronjobs f.e. that using that can cause problems
<aszurom> oh, I got it confused with that asian guy on Idol
<shevy> "also called a sha-bang" haha cool :D
<kalleth> or maybe i'm thinking of something else
<deryl> kalleth: yeah occasionally it can depending on the path contents
brngardner has joined #ruby
<aszurom> oh, originally it was a Ricky Martin song
Eldariof-ru has joined #ruby
Karmaon has joined #ruby
DrShoggoth has joined #ruby
zakwilson_ has joined #ruby
<shevy> Livin' La Vida Loca!
chomp has joined #ruby
axl_ has joined #ruby
SQLStud has joined #ruby
Seoman has joined #ruby
vipaca has joined #ruby
vipaca has joined #ruby
ckrailo has joined #ruby
mikepack has joined #ruby
nonotza_ has joined #ruby
strife25 has joined #ruby
khakimov has joined #ruby
jbomo has joined #ruby
CheeToS has joined #ruby
allanm has joined #ruby
DMClark_ has joined #ruby
strife25 has joined #ruby
saltnvinegar has joined #ruby
tonini has joined #ruby
ben_alman has joined #ruby
Jooka has joined #ruby
Targen_ has joined #ruby
albemuth has joined #ruby
akem has joined #ruby
luckyruby has joined #ruby
yoklov has joined #ruby
dat1guy69 has joined #ruby
schovi has joined #ruby
dat1guy69 has joined #ruby
dat1guy69 has joined #ruby
dat1guy69 has quit [#ruby]
LiquidInsect has joined #ruby
apeiros_ has joined #ruby
fbernier has joined #ruby
bondar has joined #ruby
crankycoder has joined #ruby
robert_ has joined #ruby
kpshek has joined #ruby
carlyle has joined #ruby
pmade has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
axl_ has joined #ruby
lkba has joined #ruby
akem has joined #ruby
manojhans has joined #ruby
flaggy has joined #ruby
davidpardy has joined #ruby
<flaggy> hello. In Python, 'a b c'.rsplit(None, 1) gives me ['a b', 'c']. I want to do the same thing in ruby. There's no rsplit in ruby, is it called something else?
strife25 has joined #ruby
troulouliou_dev has joined #ruby
Ferdev has joined #ruby
<apeiros_> flaggy: no, I don't think it exists
<troulouliou_dev> Hi we have a ruby postbuild event script in visual studio that is called for several things. Since we have migrated from SVN to GIT , i would like to know if there is any piece of code around that wrap git funnctions in ruby , like get lat commit, check if there is uncommited things .....
CannedCorn has joined #ruby
<apeiros_> troulouliou_dev: see libgit2, grit and there are a couple of others
<flaggy> yeah, rpartition is not what I need, though, I really needed rsplit. The best solution I found there was: reverse.split('.', 2).map(&:reverse).reverse but I thought it was a bit ugly. I thought there could be a better way.
havenn has joined #ruby
Dreamer3 has joined #ruby
nacengineer has joined #ruby
akem has joined #ruby
uris has joined #ruby
macmartine has joined #ruby
vitor-br has joined #ruby
philcrissman has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
akem has joined #ruby
manojhans has joined #ruby
bambanx has joined #ruby
<bambanx> hi
ank has joined #ruby
thismax has joined #ruby
adamkittelson has joined #ruby
jgrevich has joined #ruby
waigani_ has joined #ruby
dn2k has joined #ruby
Seoman has joined #ruby
zakwilson has joined #ruby
BiHi has joined #ruby
nlc has joined #ruby
QaDeS has joined #ruby
akem has joined #ruby
headius has joined #ruby
bondir has joined #ruby
voodoofish430 has joined #ruby
<bambanx> guys i am trying to grab the mouse position , this is my code : http://pastebin.com/GXGJf5rb how i can grab this on a label on shoes or any gui is possible? thanks
kish_ has joined #ruby
<bambanx> pls
ryan0x2 has joined #ruby
havenn has joined #ruby
rami has joined #ruby
uris has joined #ruby
tonini has joined #ruby
maesbn has joined #ruby
baroquebobcat has joined #ruby
jkingkong has joined #ruby
lucasefe has joined #ruby
girasquid has joined #ruby
brianpWins has joined #ruby
minijupe has joined #ruby
davidpk has joined #ruby
eywu has joined #ruby
michaelmartinez has joined #ruby
cbuxton has joined #ruby
Eiam has joined #ruby
maksbotan has joined #ruby
<maksbotan> ok, hi guys
<maksbotan> can anyone help me with ruby mkmf?
<maksbotan> i'm building project with it and it fails to use my LDFLAGS from env
<maksbotan> where is the point?
oooPaul has joined #ruby
kenperkins has joined #ruby
Araxia_ has joined #ruby
cwang has joined #ruby
ph^ has joined #ruby
rasbonics has joined #ruby
maletor has joined #ruby
josefig has quit ["Leaving"]
ReachingFarr has joined #ruby
savage- has joined #ruby
n8ji has joined #ruby
<Mon_Ouie> Do you do something like $LDFLAGS = … in your extconf.rb?
<maksbotan> nope
tatsuya_o has joined #ruby
<maksbotan> Mon_Ouie: i found out that passing --with-ldflags to extconf.rb works fine
apok has joined #ruby
Shoobdidoo has joined #ruby
maletor has joined #ruby
jimeh has joined #ruby
EzeQL has joined #ruby
sohocoke has joined #ruby
ananthakumaran has joined #ruby
SegFaultAX|work has joined #ruby
Poapfel has joined #ruby
ryannielson has joined #ruby
davidpardy has joined #ruby
altious has joined #ruby
apok has joined #ruby
strife25 has joined #ruby
fr0gprince_ has joined #ruby
greenarrow has joined #ruby
sroy2 has joined #ruby
mpereira has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
mrsolo has joined #ruby
iocor has joined #ruby
etehtsea has joined #ruby
brngardner has joined #ruby
airhorns has joined #ruby
joaoh82 has joined #ruby
MrGando has joined #ruby
carlyle has joined #ruby
mikeric has joined #ruby
mengu has joined #ruby
<Beakr> Are include statements in a class available to pure do blocks inside of the same class? E.g. https://gist.github.com/2560203
c0rn has joined #ruby
SQLStud has joined #ruby
Morkel has joined #ruby
voodoofish430 has joined #ruby
hadees has joined #ruby
<oooPaul> Beakr: Should be. By doing the include, you're amended the class/module itself.
ReachingFarr has joined #ruby
echiu has joined #ruby
fayimora has joined #ruby
<Beakr> oooPaul: In that case, maybe my own Socks source code is wrong...
<Beakr> oooPaul: Thanks.
<oooPaul> Beakr: In your example, remember, you're only including the Templates part of Socks...
scwh has joined #ruby
stkowski has joined #ruby
<echiu> is there a standard way of persisting a ruby hash?
<FLeiXiuS> echiu, key value stores
<FLeiXiuS> ;-)
<FLeiXiuS> Or yaml..
RORgasm has joined #ruby
<echiu> I like yaml, but does this work for large hashes?
<FLeiXiuS> Sure - that's what file handlers are for.
fermion has joined #ruby
mikeric has joined #ruby
pyreal has joined #ruby
<shevy> echiu how large
<shevy> 10 terabytes?
<shevy> but yeah, a really huge yaml file can become quite slow if ruby has to store it all in memory
<shevy> I noticed that when I auto-generated some yaml files of around 10 MB in size
TheIronWolf has joined #ruby
brianpWins has joined #ruby
havenn has joined #ruby
<echiu> thanks shevy
<echiu> probably under 10MB
IrishGringo has joined #ruby
stephenjudkins has joined #ruby
wangr_ has joined #ruby
yoklov has joined #ruby
ziggles has joined #ruby
hukl_ has joined #ruby
yannis has joined #ruby
robert_ has joined #ruby
<shevy> for small things yaml is really fantastic
ElitestFX has joined #ruby
troulouliou_dev has quit [#ruby]
<shevy> for using it like a database it's not so great. I once registered all files on my machine, with absolute path, in one yaml file
<shevy> it goes slow, slow slow especially if you read from it, modify it (add new things), save it
maletor has joined #ruby
invsblduck has joined #ruby
wallerdev has joined #ruby
alanp has joined #ruby
maletor has joined #ruby
Telenull has joined #ruby
ananthakumaran has joined #ruby
bawer has joined #ruby
Eldariof59-ru has joined #ruby
davidpk has joined #ruby
philcrissman has joined #ruby
hydrozen has joined #ruby
chrxn_ has joined #ruby
KL-7 has joined #ruby
jondot__ has joined #ruby
rramsden has joined #ruby
kil0byte has joined #ruby
shruggar has joined #ruby
advorak has joined #ruby
zastaph has joined #ruby
kirun has joined #ruby
Squarepy has joined #ruby
Squarepy has joined #ruby
kpshek has joined #ruby
lumsea has joined #ruby
S1kx has joined #ruby
altious has joined #ruby
Dr4g has joined #ruby
demian`_ has joined #ruby
dv310p3r has joined #ruby
Vert has joined #ruby
noob has joined #ruby
girasquid has quit [#ruby]
jarred has joined #ruby
Russell^^ has joined #ruby
setient has joined #ruby
wmoxam has joined #ruby
hukl has joined #ruby
Manhose has joined #ruby
`brendan has joined #ruby
ceej has joined #ruby
shadoi has joined #ruby
rippa has joined #ruby
michaelmartinez has joined #ruby
darren has joined #ruby
iocor has joined #ruby
n8ji has joined #ruby
davidpardy has joined #ruby
philcrissman has joined #ruby
Bosma has joined #ruby
pting has joined #ruby
davidpardy has quit [#ruby]
bluenemo has joined #ruby
bluenemo has joined #ruby
mur_ has joined #ruby
<mur_> nice
nobitanobi has joined #ruby
kpshek has joined #ruby
<nobitanobi> morning
francisfish has joined #ruby
alex__c2022 has joined #ruby
sohocoke has joined #ruby
waxjar has joined #ruby
philcrissman has joined #ruby
philcrissman_ has joined #ruby
iocor has joined #ruby
RORgasm has joined #ruby
strife25 has joined #ruby
uris has joined #ruby
uris has joined #ruby
Zolrath has joined #ruby
ceej has joined #ruby
philcrissman has joined #ruby
maksbotan has quit ["http://quassel-irc.org - Chat comfortably. Anywhere."]
philcrissman_ has joined #ruby
nlc has joined #ruby
<nobitanobi> What is the appropriate way of sharing instance variables between modules? Say I have a module which declares @my_var = 'my var' ; And I have another module that wants to access that value. What's the correct way of doing so?
ReachingFarr has joined #ruby
wallerdev has joined #ruby
<nobitanobi> Given that the second module is a submodule of the first..
Mohan has joined #ruby
<shevybear> nobitanobi bad idea
<shevybear> it boils down to you wanting to use modules like a class or?
replore_ has joined #ruby
<shevybear> if you need to use @foo variables you really should use classes
<nobitanobi> shevybear: let me show you the code. sorry.
<shevybear> modules in ruby are quite like crippled classes
<shevybear> hmm you could perhaps mix it into a class
<nobitanobi> shevybear: look: https://gist.github.com/2561839
<nobitanobi> I declare classes in the module.
philcrissman has joined #ruby
<shevybear> I just tested
<shevybear> it seems as if you can't declare an instance variable in a module and then use that, in a class
databyte has joined #ruby
<Mon_Ouie> @ivar reads an instance variable from self
<shevybear> gah or perhaps you can...
<Mon_Ouie> If you want to get the ivar of another object, you just need to call a method on that object
<nobitanobi> aham..
<shevybear> nobitanobi, https://gist.github.com/2561887
kenichi has joined #ruby
<nobitanobi> oh. Then it seems that by including, you have access to the instance variable...
<Mon_Ouie> Because it is the same object that you call those methods on
nilg has joined #ruby
justinmcp has joined #ruby
<Mon_Ouie> You don't even call methods from your Base class in your example (nor do you create an instance of it)
carloslopes has joined #ruby
waxjar has joined #ruby
zakwilson has joined #ruby
Azure|netbook has joined #ruby
crankycoder has joined #ruby
philcrissman has joined #ruby
Azure|netbook has joined #ruby
SQLStud has joined #ruby
akem_ has joined #ruby
havenn has joined #ruby
maletor has joined #ruby
ebobby has joined #ruby
jimeh has joined #ruby
<linoj> hi i'm overriding to_date like this, but i'd also like it to support the default ruby strings. When i call super rescue Date.strptime… super never calls the original to_date
<linoj> class String
<linoj> def to_date
<linoj> Date.strptime(self, "%m/%d/%Y")
<linoj> end
<linoj> end
<linoj> suggestion?
CrazyGangster has quit [#ruby]
<shadoi> linoj: you're not subclassing so you're not going to hit the superclasses method by calling super.
<nobitanobi> Thanks Mon_Ouie
<linoj> shadoi: could you suggest a way that'd work?
corsi has joined #ruby
Watcher7 has joined #ruby
<linoj> i want it to work on any String
<corsi> Hello all, I'm with a problem on fedora 16 (64bits) I've just installed the rubyvis (0.5.1) with GEM and when I try to rum the web site example I have a error : `gem_original_require'. Does any one know ?
<linoj> i tried putting it in a module e.g. class String; module AmericanDate; def to_date… , but maybe my syntax is wrong
<shadoi> linoj: call the method directly instead of using super.
maletor has joined #ruby
<linoj> i tried calling self.to_date but that went into an infinite recursion
<shadoi> linoj: alias_method
<shadoi> you're basically changing the implementation
<shadoi> so you need a way to refer to the old one
waxjar has joined #ruby
TWIXMIX has quit [#ruby]
<shevybear> aliasing to matusalems!
<shevybear> keep the old in the basement
<shadoi> corsi: you'll need to put a more complete error on gist.github.com or something
<shadoi> corsi: likely you're missing a system RPM to support rubyvis.
apok_ has joined #ruby
freeayu has joined #ruby
ghanima has joined #ruby
ben225 has joined #ruby
mdhopkins has joined #ruby
kpshek has joined #ruby
maxok has joined #ruby
<maxok> Hi, what does ||= mean in ruby?
ben225 has joined #ruby
<lkba> it correspond x=x ¦¦ y
<td123> maxok: if var has a false value or it doesn't exist, then set it to the right expression
<carloslopes> maxok: lkba: noo, ||= it's different than x = x || y
<lkba> realy?
<carloslopes> lkba: yes
<maxok> td123: thanks, now it makes sense to me
<lkba> carloslopes: why?
<carloslopes> lkba: with x = x || y , you always have a assignment
<oooPaul> x ||= y is exactly the same as x = (x || y)
<carloslopes> with x ||= y, no
<oooPaul> Yes.
<apeiros_> you can consider it as x = x || y, but technically it expands to x || x = y
<lkba> it is my mistake
<oooPaul> apeiros_: Really?
<apeiros_> there are some cases where it makes a difference. note that (afaik) only ||= and &&= have that expansion
<carloslopes> apeiros is right
<lkba> but it is olny parenthesis
<oooPaul> Holy crap, sorry carlos.
<apeiros_> all other `a <op>= b` expand to `a = a <op> b`, like a += b --> a = a + b
<apeiros_> as for the corner cases: consider foo= methods
<carloslopes> oooPaul: hahaha np
<lkba> hmm I forgot about operator prioruty
<apeiros_> obj.foo ||= bar --> with obj.foo = obj.foo || bar, you will always invoke the method foo=
<oooPaul> Damn, I thought I had that one cold. ;)
<apeiros_> with but with obj.foo || obj.foo = bar, you only invoke foo= if obj.foo is nil/false
<carloslopes> with ||= you have the assignment only if x (in that case) was nil
* oooPaul wants to test this now. :)
vipaca has joined #ruby
vipaca has joined #ruby
yoklov has joined #ruby
fr0gprince_mac has joined #ruby
<oooPaul> Bah, I can't be bothered to test it. I'm too tired. :P
kjellski has joined #ruby
s0ber has joined #ruby
<shadoi> apeiros_: what's this gem you're making with Enumerable#grep and === ?
<lkba> carloslopes: maybe I don't mistake
<apeiros_> shadoi: turned out that I only needed the first match, so I'll replace that part.
<apeiros_> shadoi: github.com/apeiros/directory_template
<shadoi> cool, I'll check it out
<apeiros_> directory templates. create dir-structures from templates.
<carloslopes> lkba: so, if you want to check if a variable have an value before assign one to it, use ||=, or if you want to check which of two values are nil before assign to the variable, use x = y || z
<virunga> In windows 7, the interpreter, irb and pry both, after defined the missing_method method shuts down. Does that happen to you either?
<lkba> becouse x = false; x = x ¦¦ true; p x => true
<virunga> the interpreter shuts down
iocor has joined #ruby
zakwilson has joined #ruby
<virunga> i press any key and the interpreter goes :)
<carloslopes> lkba: for this case, it's better you use ||= (x = false; x ||= true)
<lkba> I known
<lkba> it consicel
<carloslopes> lkba: yeap
<apeiros_> lkba: btw., you know that ¦ is not |, right?
<apeiros_> shadoi: I'll release it as a gem tomorrow. no matter how far I get. andrevows had a nice idea that I hope to implement tomorrow too: templates from urls
<lkba> I have to use ¦ due to I use smartphone with android
A124 has joined #ruby
A124 has quit [#ruby]
bawer has joined #ruby
burns180 has joined #ruby
<havenn> lkba: Does alt+\ not give you a pipe?
<shadoi> apeiros_: yes! I've actually written code to do that multiple times. Mirror a url structure on disk.
iamjarvo has joined #ruby
<lkba> havenn: I dont try it
<havenn> lkba: 1/2 or shift-alt or alt (oh android...) plus the backslash *should* give you a pipe I think.
sebcioz has joined #ruby
wilmoore has joined #ruby
<lkba> havenn: I have smartphone without keyboard
dwon has joined #ruby
<lkba> I dont see alt key
<lkba> I just can use software keyboard
bluenemo has joined #ruby
brngardner has joined #ruby
waigani has joined #ruby
fr0gprince_ has joined #ruby
codezombie has joined #ruby
<codezombie> question, using net/ssh to connect to a remote machine, and I'm getting an exception that says "non-absolute home"
<codezombie> what could be the cause of this? I can login to the remote server just fine, but when trying this from my rails app, it fails
philcrissman has joined #ruby
alex__c2022_ has joined #ruby
chrxn_ has joined #ruby
sohocoke has joined #ruby
pmros has joined #ruby
<pmros> hi!
saltnvinegar has quit [#ruby]
brianosborne has joined #ruby
bglusman has joined #ruby
<zschallz> OMG HI.
nu7hatch has joined #ruby
nu7hatch has quit [#ruby]
vipaca has joined #ruby
vipaca has joined #ruby
burns180 has quit ["Konversation terminated!"]
macmartine has joined #ruby
burns180 has joined #ruby
davidtspf has joined #ruby
pmros_ has joined #ruby
<pmros_> hi again
davidtspf05 has joined #ruby
<davidtspf05> I'm trying to do something really simply, but I'm such a noob. All I want to do is POST a very long http request using irb, or something similar. Any suggestions?
Guest40949 has joined #ruby
<davidtspf05> (Did that question come through?)
<pmros_> restclient gem, maybe
stephenjudkins has joined #ruby
<pmros_> hi, stephenjudkins
<davidtspf05> Hmm, not sure if my IRC is working -- can anyone hear me?
<canton7> davidtspf05, it did
<davidtspf05> Ah, thanks!
apok has joined #ruby
<pmros_> davidtspf05, have you tried resclient gem?
<pmros_> it's easy
xtempx has joined #ruby
<davidtspf05> pmros_ I haven't
<davidtspf05> pmros_ Just installed it
<pmros_> ok, davidtspf05, I hope you find it useful
<davidtspf05> Didn't quite work.
<pmros_> just another suggestion, <davidtspf05>, ripl (as irb replacement)
<davidtspf05> And got this: "OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: sslv3 alert unexpected message"
<canton7> pmros_, this is the first time I've seen someone recommend something other than pry
<pmros_> you need a certificate
<pmros_> I guess
<pmros_> I'm developing a GUI REPL
<pmros_> a irb-like but grphical
waigani has joined #ruby
n1x has joined #ruby
prometheus has joined #ruby
<pmros_> it's called troshka
<banister_> pmros_: wht features does it have?
<banister_> ah yeah
<banister_> :)
<pmros_> it's at alpha stage
<pmros_> but it works
<davidtspf05> pmros_ any idea how to fix the problem?
zoolotto has joined #ruby
<zoolotto> birds with lights like bikes
<pmros_> what do you think about troshka, banister_?
banisterfiend has joined #ruby
<pmros_> davidtspf05, I'm not a SSL guru
<pmros_> <davidtspf05>: I've tried POST logon but without SSL
<pmros_> just using cookies, no https
<banisterfiend> pmros_: there is also a guy writing a pry-based GUI repl
<banisterfiend> in Q
<banisterfiend> QT
<banisterfiend> looks very cool so far
ben225 has joined #ruby
<pmros_> really?
<pmros_> some link?
<banisterfiend> pmros_: so it does all the powerful pry stuff but in GUI, so it's very powerful too
<banisterfiend> pmros_: he hasn't released it yet, even on github, but he sahres screenshots occasionally
workmad3 has joined #ruby
<banisterfiend> pmros_: it's by the guy who wrote coolline and ray
<pmros_> thanks
<pmros_> it seems he is a arch fan too
Divinite has joined #ruby
<pmros_> :)
<banisterfiend> pmros_: why do u say that
<pmros_> banisterfiend, his avatar
<shevybear> because he likes arch!
<shevybear> and french wine
<pmros_> hehe
<shevybear> I'd never have realized this icon is arch
<shevybear> looks more like a twisted illuminati icon
<shevybear> or a colourful wigwam
<pmros_> it's arch logo
<shevybear> lol that logo! https://github.com/takuma104
<banisterfiend> pmros_: some of pry's features really suit GUI environment, like show-method and show-doc
krz has joined #ruby
<pmros> mmm it looks interesting
n8ji has joined #ruby
shadoi has joined #ruby
MrGando has joined #ruby
piotr_ has joined #ruby
<pmros_> <banisterfiend>: GUI object representation can be powerful
<pmros_> banisterfiend: troshka can show an array or hash like a tree
<Squarepy> banisterfriend, must say I was looking for an enhanced interactive prompt for ruby, thanks for pry, I have come from using Ipython
altiouz has joined #ruby
<pmros_> you can collapse
<pmros_> or expand it
<pmros_> you can't do that in a TUI
<pmros_> a terminal
PragCypher has joined #ruby
<banisterfiend> pmros_: yeah
davidpk has joined #ruby
stephenjudkins has joined #ruby
<banisterfiend> pmros_: but terminal is so convenient
<pmros_> banisterfiend: I'll develop new GUI object views soon
<banisterfiend> pmros_: the gui has ot be much much much better than the tui before people would use it
<pmros_> like local variables
<banisterfiend> pmros_: what do u mean?
<banisterfiend> local variables?
<pmros_> troshka will show you local variables
<pmros_> local_variables
<pmros_> with values
<banisterfiend> where?
havenn has joined #ruby
<pmros_> just another tab
<pmros_> a methods view
<pmros_> i like awesome gem
<banisterfiend> sounds cool
wroathe has joined #ruby
<pmros_> it's just add another view
<pmros_> another tab
<wroathe> Say I have a url with a standard format like 'http://my.com/folder/1234.jpg" what would be the fastest way loop through these urls and test for 404 or 200?
<banisterfiend> pmros_: troshka is always set in main?
altiouz has joined #ruby
kpshek has joined #ruby
<wroathe> if I know that the filename of that jpg will always be between 1-2000
* apeiros_ wants a merge of troshka & pry
<pmros_> banisterfiend: in main?
<banisterfiend> apeiros_: Mon_Ouie is working on a pry repl
<banisterfiend> gui*
<canton7> wroathe, Net::HTTP#head with a little loop?
<banisterfiend> pmros_: TOPLEVEL_BINDING
<canton7> maybe use a thread pool, or eventmachine, to stick em in parallel
<shevybear> stick 'em in, plug 'em out
<wroathe> Would that be faster do you think than `curl -I url'
<pmros_> banisterfiend: troshka uses TOPLEVEL_BINDING
robdodson has joined #ruby
<banisterfiend> pmros_: not so powerful :P
<canton7> wroathe, probably not *that* much difference, as the latency is going to be the network, not the tooll
<pmros_> banisterfiend: I understand
<banisterfiend> pmros_: but it sounds like a cool project, goodluck!
sako has joined #ruby
gen0cide_ has joined #ruby
<pmros_> banisterfiend: I focus in object views for now
<sako> hey guys i am using FileUtils gem, but it looks like FIleUtils.chmod_R will never work with a normal user?
<sako> root has to run the script? is there some way around this i can't see
<pmros_> banisterfiend: thanks
<banisterfiend> bbl
chrxn_ has joined #ruby
jchauncey has joined #ruby
<pmros_> see you!
<tchebb> sako: chmod should work as a normal user if that user owns the files.
<sako> tchebb: ah
<sako> that was my problem! thanks
banisterfiend has joined #ruby
headius has joined #ruby
twinturbo has joined #ruby
francisfish has joined #ruby
looopy has joined #ruby
pygmael has joined #ruby
davidw has joined #ruby
Divinite_ has joined #ruby
strife25 has joined #ruby
<robdodson> does it seem like a bad practice to make a date a key in a hash. something like this: dates[Date.today] = {foo: 'bar'}
Watcher7_ has joined #ruby
<carloslopes> robdodson: i think it's not, but, this way is better don't you think: dates[:today]
<tchebb> robdodson: It really depends on what you're using it for. It's a perfectly fine application if you need to look stuff up by date.
ken_barber has joined #ruby
<robdodson> carloslopes: well in my use case i'm going to be putting several dates into one object.
<carloslopes> robdodson: so, like tchebb said, it's a fine application if you need
<robdodson> ok
<robdodson> thanks
ersoy has joined #ruby
perryh_away has joined #ruby
<perryh_away> is there some gem that allows me to input short strings and have it generate a word cloud visualization?
invsblduck has joined #ruby
<any-key> perryh_away: take a look at the botton of thi: http://www.wordle.net/advanced
<perryh_away> nice!
<any-key> so basically the gem you want is Net/HTTP :P
ersoy has quit ["Leaving"]
chson has joined #ruby
Divinite has joined #ruby
davidpardy_ has joined #ruby
MarcMorata has joined #ruby
<MarcMorata> looking for a help or a hint: I'm trying to get some information from the dhcp lease information on windows
<MarcMorata> I found it's stored on the register
<MarcMorata> on a binary register
<MarcMorata> when I read it, I'm not able to work with this data as string
<any-key> what do you get?
<any-key> how are you reading it?
<MarcMorata> using win32::Registry
<any-key> ah not familiar with it
<MarcMorata> reg.read_bin('DhcpInterfaceOptions')
<MarcMorata> I think the information is in hex
<MarcMorata> if anyone knows a better place to get the lease information on windows, I'll love that
<tchebb> Well, I wouldn't expect a method called read_bin to return a tring
<any-key> can you check and see what class that returns?
<any-key> reg.read_bin('DhcpInterfaceOptions').class
<MarcMorata> string
<any-key> so what's the issue?
<MarcMorata> If I print this string, I get just a lof of weird symbols
<any-key> yes
<any-key> it's binary data
<MarcMorata> not the string I'm looking for
<tchebb> It probably contains binary data
<MarcMorata> yes
<MarcMorata> I'm trying to decode it
<any-key> what do you want to have it display?
<any-key> integers?
<tchebb> although I don't know why that would be stored in a string
<MarcMorata> string
<any-key> it is a string
<MarcMorata> I know there are a string url
<any-key> just not ascii
<MarcMorata> I want ascii
<MarcMorata> hehehe
<any-key> you should have ascii then
* any-key parts
<MarcMorata> on linux is so easy =S
<MarcMorata> /var/lib/dhcp/dhcp.lease
<MarcMorata> and that's all
<tchebb> MarcMorata: What lease information do you want?
<MarcMorata> I'm setting a specific vendor option
<MarcMorata> to set a url
<tchebb> A vendor-specific option of what?
<MarcMorata> dhcp
havenn has joined #ruby
Divinite has joined #ruby
<tchebb> MarcMorata: So you want to get a new lease with this option set?
<MarcMorata> tchebb, on the dhcp server for the lease of the specified machine, I set this parameter: supersede vendor-encapsulated-options = "URL"
<MarcMorata> now I'm trying to read this information on the machine
<tchebb> MarcMorata: I see
<MarcMorata> the URL
<Spaceghostc2c> Isn't a symbol to proc slower than a map?
mfridh has joined #ruby
<workmad3> I thought it was quicker... symbol to proc doesn't create a closure and is done with native code, iirc
<workmad3> but I don't know for certain
al3xnull has joined #ruby
abra has joined #ruby
<Veejay> I'm doing that feels silly
<Veejay> t = Time.new; [:year, :month, :day, :hour, :min, :sec].map { |msg| t.send msg }
<Veejay> There's gotta be a better way to do that (better is subjective, I know, but you know what I mean)
<Veejay> Something like a pluck on a single object that plucks multiple attributes at once and produces an array
gregorg has joined #ruby
gregorg has joined #ruby
<ged> Veejay: [2] pry(main)> Time.new.to_a.values_at( 5, 4, 3, 0, 1, 2 )
<ged> => [2012, 4, 30, 11, 40, 15]
<Veejay> to_a?
<Veejay> I tried that
* ged shrugs.
iosctr has joined #ruby
prometheus has joined #ruby
<Veejay> Damn
<ged> I'm using 1.9.3. You?
<Veejay> Works for Time but not for Date and DateTime
<Veejay> I got got
kil0byte has joined #ruby
PragCypher has joined #ruby
bbttxu has joined #ruby
dankest has joined #ruby
Targen has joined #ruby
MrGando has joined #ruby
mfridh has joined #ruby
<Veejay> ged: Yeah, same here, 1.9.3
<Veejay> Thanks for the reply
Haydos has joined #ruby
davidpardy has joined #ruby
davidpardy_ has quit [#ruby]
davidpardy has joined #ruby
mfridh has joined #ruby
bbttxu_ has joined #ruby
kalleth_ has joined #ruby
sohocoke has joined #ruby
jdsanders has joined #ruby
twinturbo has joined #ruby
<jdsanders> Is it possible to have two TCPSocket objects with the different object_ids, but which are actually the same connection?
wroathe has joined #ruby
maroym has joined #ruby
maroym has quit [#ruby]
manizzle has joined #ruby
lunchdump has joined #ruby
RORgasm has joined #ruby
chson has joined #ruby
mikepack has joined #ruby
freeayu has joined #ruby
<MarcMorata> tchebb, any-key using unpack("A*") I'm able to see the URL more or less
havenn has joined #ruby
mmokrysz has joined #ruby
mmokrysz has quit [#ruby]
nari has joined #ruby
lumsea has joined #ruby
mikeycgto has joined #ruby
mikeycgto has joined #ruby
al3xnull_ has joined #ruby
pu22l3r has joined #ruby
havenn has joined #ruby
khakimov has joined #ruby
brianpWins has joined #ruby
prometheus has joined #ruby
Xylo1 has joined #ruby
gregorg has joined #ruby
gregorg has joined #ruby
zakwilson has joined #ruby
al3xnull has joined #ruby
lumsea_ has joined #ruby
pu22l3r has joined #ruby
alanp has joined #ruby
cespare has joined #ruby
headius has joined #ruby
ooldirty has joined #ruby
<ooldirty> hey guys, this will probably sound dumb, but does system() fork?
<ooldirty> I'm trying to system("exec $EDITOR tempfile") and then subsequently using that file's contents for post data in a rest-open-uri request, but i think the script is calling rest-open-uri with null data.
<Spaceghostc2c> Why not just use actual fork2()?
wmoxam has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has joined #ruby
<ooldirty> i don't want it to fork, i want it to wait until i'm done typing my message before trying to posting my message :p
cpruitt has joined #ruby
<ooldirty> lol, sorry. I'm really a native english speaker, it's just been a very long and hectic day at the shop.
<Spaceghostc2c> I suggest you not exec then.
jameshyde has joined #ruby
alanp has joined #ruby
invsblduck has joined #ruby
chson has joined #ruby
<ooldirty> Would you care to elaborate? How would you do it?
<Spaceghostc2c> There's a really good book on unix with ruby. http://workingwithunixprocesses.com/
<ooldirty> I see.
<ooldirty> thanks
ooldirty has quit ["Ex-Chat"]
stb5003 has joined #ruby
`brendan has joined #ruby
carlyle has joined #ruby
igaiga has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
|RicharD| has quit ["Sto andando via"]
tomzx has joined #ruby
chrxn_ has joined #ruby
Zolrath has joined #ruby
lucasefe has joined #ruby
zakwilson_ has joined #ruby
mrterribletech has joined #ruby
kidoz has joined #ruby
<mrterribletech> Anyone make games wiht ruby?
<Spaceghostc2c> I make non-games.
<Spaceghostc2c> Games you don't play, but you derive joy out of them by notplaying them.
<mrterribletech> lol
jdsanders has quit [#ruby]
mrterribletech has quit [#ruby]
benaph has joined #ruby
ceej has joined #ruby
saltnvinegar has joined #ruby
carlyle has joined #ruby
<nobitanobi> Given I have a word like "Los angeles". How can I capitalize the "A". Basically, I want to capitalize the first letter of all the words.
mikeric has joined #ruby
<Haydos> theres a method for that
* Spaceghostc2c loves documentation
cantonic has joined #ruby
cjlicata has joined #ruby
<Veejay> nobitanobi: Titleize
<nobitanobi> I was doing: split(” “).each{|word| word.capitalize!}.join(” “)
<nobitanobi> but oh, there is a method. let's see
<Veejay> Which is I guess what Haydos' link is about
noob has joined #ruby
<Veejay> That's some pretty fancy quotes you got there
TheIronWolf has joined #ruby
<Haydos> i like the quotes
<Veejay> I don't
<Veejay> They remind me of some Microsoft Office fancy quotes
<Spaceghostc2c> Might want to never use those.
<Veejay> That would always fuck up everything
<Spaceghostc2c> EVER
<Haydos> i like that they're backwards
<Veejay> And spite you
strife25 has joined #ruby
<Veejay> I call them bitch quotes
<nobitanobi> sorry for the quotes. paste screw them up.
<Veejay> No worries man, I just strangled a bunny, I'm good now
adac has joined #ruby
alanp has joined #ruby
<adac> for esacping an URL, how to tell CGI::escape also to ecnode the "." (dot)?