<banisterfiend>
shevy: u know about other things though, criminal activities
gurps has quit [Quit: bye]
<strtok>
that's not compiler output, that's autoconf output, and it just means that header is not present on that system. It's only a failure if the configure script required it
<ipalaus>
that is my gcc: gcc-4.6/wheezy uptodate 4.6.3-11 :-\
<shevy>
ipalaus, I just tested: "gem install em-winrm" worked for me
<shevy>
no error, other than encoding crap
timonv has quit [Ping timeout: 244 seconds]
<shevy>
rubymain.cpp: In function 'VALUE t_stop_proxy(VALUE, VALUE)':
<shevy>
rubymain.cpp:1039:42: warning: format not a string literal and no format arguments [-Wformat-security]
<shevy>
compiling pipe.cpp
<shevy>
compiling page.cpp
<shevy>
I get the same or? but it continues for me
<ipalaus>
which OS?
<shevy>
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
c0rn has joined #ruby
<ipalaus>
ummm :\
<shevy>
some linuxmint thing
<strtok>
that's from -Werror=format-security
Jasko has quit [Read error: Connection reset by peer]
<strtok>
edit the makefile and disable the warning if you can
Jasko has joined #ruby
<strtok>
it means someone passed a format string to a function that wasn't a string literal, and it didn't have any args, which is exploitable
<ipalaus>
strtok where the makefile should be located?
<shevy>
now there's someone who knows C++
<strtok>
ipalaus: search for Wformat or Wall
<strtok>
alternatively you can wrap the offending code in a #pragma that disdables the warning
<strtok>
err disables :P
gurps has joined #ruby
rakl has quit [Ping timeout: 265 seconds]
volte has quit [Read error: Connection reset by peer]
c0rn has quit [Ping timeout: 250 seconds]
jenyabaranov has quit [Remote host closed the connection]
statarb3 has quit [Quit: Leaving]
c0rn has joined #ruby
volte has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
rakl has joined #ruby
guns has joined #ruby
drlaj has quit [Remote host closed the connection]
<shevy>
hmm I use this for strings to test if they are a number or not
<banisterfiend>
shevy: what's up
<shevy>
class String; def is_number?; !! (self.gsub(/\./,'').gsub(/-/,'') =~ /\A\d+\Z/)
whowantstolivef1 has quit [Ping timeout: 255 seconds]
beachandbytes2 is now known as beachandbytes
rakl has quit [Quit: sleeping]
c0rn has quit [Ping timeout: 255 seconds]
c0rn has joined #ruby
ader10 has joined #ruby
maletor has joined #ruby
<whitedawg>
shevy: what about String.to_i?
<ader10>
Is there a way to negate gem: --user-install without commenting it out in my /etc/gemrc?
<waxjar>
that will always return an Integer: "g".to_i # => 0
x82_nicole has joined #ruby
rellin has quit [Ping timeout: 264 seconds]
<ipalaus>
strtok once -Werror=format-security is removed, what I should do?
Xeago has quit [Ping timeout: 255 seconds]
ikaros has quit [Quit: Ex-Chat]
whitedawg has quit [Quit: Leaving.]
mneorr has quit [Remote host closed the connection]
c0rn has quit [Ping timeout: 252 seconds]
<ipalaus>
i did a make install but fuck, I can't get this running :(
Xeago has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
<strtok>
ipalaus: you type make again
c0rn has joined #ruby
Jasko has joined #ruby
thone_ has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
thone has quit [Ping timeout: 264 seconds]
ipalaus has quit [Quit: :-)]
moos3 has joined #ruby
twoism has joined #ruby
lushious has joined #ruby
c0rn has quit [Ping timeout: 244 seconds]
butblack has quit [Quit: butblack]
piotr_ has quit [Ping timeout: 264 seconds]
c0rn has joined #ruby
twoism has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
drlaj has joined #ruby
pyx has joined #ruby
burgestrand has quit [Quit: Leaving.]
prettymuchbryce has joined #ruby
ner0x has quit [Quit: Leaving]
c0rn has quit [Ping timeout: 240 seconds]
c0rn has joined #ruby
clj_newb has quit [Ping timeout: 240 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
kuzushi has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
neiko has quit [Ping timeout: 260 seconds]
Zai00 has joined #ruby
drlaj has quit [Ping timeout: 255 seconds]
freakazoid0223 has joined #ruby
passbe has quit [Quit: WeeChat 0.3.9.2]
ader10 has quit [Read error: Connection reset by peer]
ader10 has joined #ruby
ader10 has quit [Changing host]
ader10 has joined #ruby
generalissimo has quit [Remote host closed the connection]
samphippen has quit [Ping timeout: 250 seconds]
c0rn has quit [Ping timeout: 252 seconds]
Tuxist has joined #ruby
cableray has joined #ruby
Tuxist has quit [Remote host closed the connection]
guns has quit [Ping timeout: 244 seconds]
c0rn has joined #ruby
samphippen has joined #ruby
Soliah has joined #ruby
Iszak has quit []
cableray has quit [Client Quit]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
Phaba has quit [Ping timeout: 240 seconds]
Zai00 has quit [Quit: Zai00]
pyr0commie has quit [Remote host closed the connection]
c0rn has quit [Ping timeout: 244 seconds]
entrenador has quit [Quit: leaving]
kirun has quit [Quit: Client exiting]
c0rn has joined #ruby
maletor has joined #ruby
freeayu has joined #ruby
FernandoBasso has quit [Quit: Leaving.]
lolcathost has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
lolcathost has quit [Client Quit]
x82_nicole has quit [*.net *.split]
ltsstar has quit [*.net *.split]
mercwithamouth has quit [*.net *.split]
pcarrier has quit [*.net *.split]
charliesome has quit [*.net *.split]
phantasm66 has quit [*.net *.split]
iaj has quit [*.net *.split]
tommyvyo has quit [*.net *.split]
yacks has quit [*.net *.split]
alvaro_o has quit [*.net *.split]
tonytonyjan has quit [*.net *.split]
musl has quit [*.net *.split]
bitZero__ has quit [*.net *.split]
kandinski has quit [*.net *.split]
cout has quit [*.net *.split]
AllStruck has quit [*.net *.split]
preller has quit [*.net *.split]
mattp_ has quit [*.net *.split]
voodoofish has quit [*.net *.split]
benwoody has quit [*.net *.split]
yellow5 has quit [*.net *.split]
breadtk has quit [*.net *.split]
Schmidt has quit [*.net *.split]
explody has quit [*.net *.split]
<RubyPanther>
shevy: !!Float(str) rescue false
Soliah has quit [Quit: Soliah]
bitZero__ has joined #ruby
iaj has joined #ruby
breadtk has joined #ruby
cout has joined #ruby
AllStruck has joined #ruby
mercwithamouth has joined #ruby
benwoody has joined #ruby
yacks has joined #ruby
alvaro_o has joined #ruby
hemanth has quit [Read error: No buffer space available]
charliesome has joined #ruby
hemanth has joined #ruby
x82_nicole has joined #ruby
explody has joined #ruby
Schmidt has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
lolcathost has joined #ruby
yellow5 has joined #ruby
mattp_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
prettymuchbryce has quit [Quit: prettymuchbryce]
hemanth has joined #ruby
kandinski has joined #ruby
tonytonyjan has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
heftig has joined #ruby
musl has joined #ruby
neiko has joined #ruby
lolcathost has quit [Client Quit]
lolcathost has joined #ruby
drlaj has joined #ruby
c0rn has quit [Ping timeout: 252 seconds]
pcarrier has joined #ruby
Phaba has joined #ruby
cableray has joined #ruby
samphippen has quit [Ping timeout: 255 seconds]
c0rn has joined #ruby
tommyvyo_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Nisstyre has quit [Read error: Connection reset by peer]
generalissimo has joined #ruby
burgestrand has joined #ruby
c0rn has quit [Client Quit]
samphippen has joined #ruby
g_bleezy has quit [Remote host closed the connection]
danneu has joined #ruby
joofsh has joined #ruby
drlaj has quit [Ping timeout: 244 seconds]
voodoofish has joined #ruby
icole has joined #ruby
cableray has quit [Quit: cableray]
wallerdev has quit [Quit: wallerdev]
Nisstyre has joined #ruby
wallerdev has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
leonardorb has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
baphled has quit [Ping timeout: 264 seconds]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
rakl has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
adac has quit [Ping timeout: 252 seconds]
tsp has joined #ruby
Foxboron has left #ruby [#ruby]
icole has quit [Remote host closed the connection]
g_bleezy has joined #ruby
whitedawg has joined #ruby
whitedawg has quit [Client Quit]
brianpWins has joined #ruby
drlaj has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
<kandinski>
how does bundler "know" which ruby I have activated with rbenv?
<postmodern>
kandinski, because rbenv installs bin stubs for every gem
<postmodern>
kandinski, so when you run bundler, you actually go through rbenv
<kandinski>
I am installing this project https://github.com/runemadsen/Magic-Book-Project in a new vagrant box, in this order: install rbenv, install ruby-install, rbenv-install latest ruby 1.9.3, then gem install bundler, then bundle install in the project directory
pu22l3r_ has joined #ruby
<kandinski>
postmodern: thanks. Does what I'm doing sound about right?
<postmodern>
kandinski, sounds like overkill to use rbenv inside of vagrant
hsbt_away is now known as hsbt
<postmodern>
kandinski, just use ruby-build to install 1.9.3 into /usr/local/
<postmodern>
kandinski, or use the linux distro's ruby 1.9.1 package
<postmodern>
kandinski, assuming your using a ubuntu 12.04 vagrant image?
<kandinski>
well, I am doing it to replicate instructions for installing it outside vagrant, see if my failure outside is due to other factors
LouisGB has quit [Ping timeout: 250 seconds]
<kandinski>
postmodern: but you are right that I could try making it work without rbenv first
<kandinski>
postmodern: sure, will do that. Still, you realise that I want to validate the install instructions as they are? In that case, was what i was doing correct, or was I doing any step out of order?
<postmodern>
kandinski, oh right
Jasko has quit [Read error: Connection reset by peer]
<postmodern>
kandinski, for your question, you'd want to follow the rbenv readme to the letter
Jasko has joined #ruby
<kandinski>
doing that already
drlaj has quit [Ping timeout: 260 seconds]
<kandinski>
I'm even writing a patch for the install instructions (I had to modify them for ubuntu)
<kandinski>
still, I am not sure the rbenv-set ruby version is catching, yesterday the sinatra app was throwing errors that referenced ruby 1.8
<postmodern>
kandinski, could try using RVM or chruby instead?
<kandinski>
yes, I'll change to chruby if the current try doesn't work. Still, even as a ruby newb, I have invested so much in learning rbenv that I want to make it work. If it makes any sense.
aaronmacy has quit [Quit: Leaving.]
neiko has quit [Quit: leaving]
johnmilton has quit [Quit: Leaving]
ipalaus has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
<matti>
;]
aotianlong has joined #ruby
mengu has quit [Remote host closed the connection]
burgestrand has quit [Read error: Connection reset by peer]
burgestrand1 has joined #ruby
Slivka has joined #ruby
Naeblis has quit [Remote host closed the connection]
xyzodiac has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
<kandinski>
oh, there you have it: http://ruby.nopaste.dk/p15900 I am runnin 1.9.3 according to rbenv, but bundler is trying to install in the 1.8 gem tree
<kandinski>
any clue?
mercwithamouth has joined #ruby
JarJar has quit [Quit: This computer has gone to sleep]
Michael__ has joined #ruby
slainer68 has joined #ruby
ewag has joined #ruby
nomenkun has quit [Remote host closed the connection]
pu22l3r_ has joined #ruby
<kandinski>
so, "rbenv shims" shows erb, gem, irb, rake, rdoc, ri, ruby and testrb. But the shims don't seem to be in the path.
drlaj has joined #ruby
ratcheer has joined #ruby
generalissimo has quit [Remote host closed the connection]
aotianlong has quit [Quit: aotianlong]
yaymukund has quit [Ping timeout: 250 seconds]
<postmodern>
kandinski, right, rbenv requires you run `rbenv rehash` after everytime you install a gem
<postmodern>
kandinski, RVM/chruby do not
Xeago has quit [Remote host closed the connection]
ewag has quit [Read error: Connection reset by peer]
drlaj has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
danneu has quit [Quit: WeeChat 0.3.8]
xyzodiac has quit [Quit: Computer has gone to sleep.]
Hanmac has joined #ruby
leonardorb has joined #ruby
emmanuelux has quit [Ping timeout: 240 seconds]
<kandinski>
postmodern: I was running `rbenv rehash` almost superstitiously. Heh, I also just noticed that you are likely the author of chruby. No slight intended, it was added to the Magic Book Project readme after I started learning about rbenv.
leonardorb has quit [Ping timeout: 240 seconds]
freeayu has quit [Remote host closed the connection]
<kandinski>
so bundler needs to be shimmed too
<kandinski>
bit of an egg-and-chicken problem there
Virunga has quit [Remote host closed the connection]
jgoss has joined #ruby
mercwithamouth has quit [Ping timeout: 244 seconds]
CaptainJet has quit []
xyzodiac has joined #ruby
icole has joined #ruby
nomenkun has joined #ruby
danneu has joined #ruby
devdazed has quit [Ping timeout: 250 seconds]
eka has quit [Remote host closed the connection]
igro has joined #ruby
xbayrockx has quit []
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
areil has joined #ruby
devdazed has joined #ruby
icole has quit [Ping timeout: 264 seconds]
emmanuelux has joined #ruby
jgoss has quit [Quit: WeeChat 0.3.9.2]
nomenkun has quit [Ping timeout: 264 seconds]
adeponte has joined #ruby
drlaj has joined #ruby
nerd has quit [Quit: WeeChat 0.3.9.2]
aetcore has joined #ruby
aetcore has quit [Client Quit]
FiveAcres_ has joined #ruby
FiveAcres_ has left #ruby [#ruby]
xyzodiac has quit [Quit: Computer has gone to sleep.]
xyzodiac has joined #ruby
mercwithamouth has joined #ruby
drlaj has quit [Ping timeout: 255 seconds]
gbchaosmaster has joined #ruby
Nisstyre has quit [Quit: Leaving]
ratcheer has left #ruby [#ruby]
mercwithamouth has quit [Ping timeout: 260 seconds]
Nisstyre has joined #ruby
seanstickle has quit [Quit: seanstickle]
greenarrow has quit [Read error: Connection reset by peer]
jrajav has quit [Quit: I tend to be neutral about apples]
ddd has joined #ruby
drlaj has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
ader10 has quit [Quit: _,.-*'`'*-.,_,.-*'`'*-]
gridaphobe has joined #ruby
ader10 has joined #ruby
rakl has quit [Quit: sleeping]
ader10 has quit [Changing host]
ader10 has joined #ruby
drlaj has quit [Ping timeout: 248 seconds]
pointblank has joined #ruby
<postmodern>
kandinski, yep i wrote it :) totally no conflict of interest
<postmodern>
kandinski, another user petitioned it be added to the readme
<postmodern>
kandinski, im more of a fan of using the distro's ruby or installing into /usr/local/
<postmodern>
kandinski, ruby managers/switchers should only be used in development environments where you need to use all the Rubies
pointblank has left #ruby [#ruby]
slainer68 has quit [Remote host closed the connection]
ryanf_ has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
ewag has joined #ruby
kil0byte has quit [Ping timeout: 264 seconds]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
jekotia has joined #ruby
jekotia has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
Ethan is now known as undersc0re97
<kandinski>
postmodern: yes, I understand. Let me explain why I am using rbenv under vagrant. I couldn't get the instructions to work, so I am installing with rbenv under vagrant just to check whether it's the instructions or my previous mangled system that messes something up.
<kandinski>
postmodern: it's also true that I come from python, where people use virtualenvs even to deploy to pristine vms (I know I do)
<kandinski>
though I also understand, correct me if I'm wrong, that a python virtualenv does the job of [RVM|rbenv|chruby]+bundler
kil0byte has joined #ruby
L1 has quit [Remote host closed the connection]
IcyDragon has quit [Quit: Space~~~]
<foucist>
kandinski: rbenv & rvm both do shell type stuff, so some weirdness there, but rbenv relies a bit less on the shell, it was made in response to making it easier to deal with versioning on the production server when passenger or other things wouldn't preserve the shell environment that rvm relies on
pcarrier has quit []
michaelmartinez has joined #ruby
<foucist>
kandinski: how are you setting up rvm in vagrant anyways? are you ssh'd in or are you trying to automate it
jlwestsr has quit [Ping timeout: 246 seconds]
rakl has joined #ruby
adeponte has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 264 seconds]
x82_nicole has joined #ruby
adeponte has joined #ruby
adeponte has quit [Remote host closed the connection]
dmerrick has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
grotr has joined #ruby
drlaj has joined #ruby
<postmodern>
kandinski, chruby is much simpler, just modifies PATH/GEM_HOME/GEM_PATH
<dogweather>
Yes, that'd work ... although I'd then need to manage those directories on different computers, keeping them up-to-date.
<pen>
dogweather: put it on git!
<pen>
dogweather: and upload to github
<pen>
dogweather: open source it so everyone can benefit from it :)
<dogweather>
pen: :-)
khimera has quit [Quit: khimera]
<pen>
dogweather: so eventually you just make a gem and everything is solved
<pen>
:)
Azure is now known as Valkyrie^
nomenkun has quit [Ping timeout: 240 seconds]
<dogweather>
pen: I did just create my first one, https://rubygems.org/gems/naturally, a natural sort implementation. But lots of my code isn't really ready for the world to see.
chococrois has joined #ruby
browndawg has joined #ruby
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
<pen>
dogweather: oh well, when you open source it and more people will come and help you out if it is a great gem you know :)
chord has joined #ruby
chord has left #ruby [#ruby]
<dogweather>
True.
chococrois has quit [Max SendQ exceeded]
<dogweather>
I'll reconsider.
<dogweather>
Now I'm thinking about namespaces.
<pen>
:P
ryanf_ has joined #ruby
<dogweather>
E.g., whether to go Java style and use my TLD, e.g. Org::WebLaws::String
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
chococrois has quit [Read error: Connection reset by peer]
<kandinski>
ok, got it working
<pen>
you decide
<pen>
dogweather: nice, that's cool gem
Michael__ has quit [Remote host closed the connection]
shammancer has joined #ruby
Guest__ has left #ruby [#ruby]
dmiller has joined #ruby
Yarou has quit [Ping timeout: 252 seconds]
Michael__ has joined #ruby
<foucist>
naturally
Jasko has quit [Read error: Connection reset by peer]
adeponte has quit [Remote host closed the connection]
<dogweather>
Thanks!
Jasko has joined #ruby
<dogweather>
I need to add a litte doc in addition to the specs, and a blog post explaining why you'd need it.
<foucist>
the only weird thing was lib/naturally.rb <- all the code lib/naturally/version.rb ? that seemed weird to me
<foucist>
usually the main code is in the deepest folder in libs, at least that's what i observe
<dogweather>
I used 'bundle gem' to create the skeleton...
<dogweather>
Right.
pu22l3r_ has quit [Remote host closed the connection]
<foucist>
probably would have lib/naturally.rb which calls lib/naturally/naturally.rb i think that's how it's typically done
elkclone has quit [Quit: It's never too late to unplug and run.]
lordnaz has quit [Quit: WeeChat 0.3.8]
moshee has quit [Ping timeout: 248 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
kiyoura has quit [Quit: Leaving]
daniel_- has quit [Ping timeout: 252 seconds]
dankest|away is now known as dankest
swex has joined #ruby
raycarr has joined #ruby
jlwestsr has joined #ruby
emergion has joined #ruby
rakl has quit [Quit: sleeping]
eka has joined #ruby
emergion has quit [Client Quit]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
lampe2 has joined #ruby
lordnaz has joined #ruby
nignaztic has quit [Ping timeout: 248 seconds]
KevinSjoberg has joined #ruby
drlaj has joined #ruby
daniel_- has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Ping timeout: 264 seconds]
fyolnish has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
<kandinski>
havenn: are you involved with the Magic Book Project?
drlaj has quit [Ping timeout: 250 seconds]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
Neomex has joined #ruby
dankest is now known as dankest|away
nemesit has joined #ruby
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
moostapha has joined #ruby
<moostapha>
greetings. If anybody's up, I'm not a novice programmer, but I'm looking for any suggestions for an introduction to the ruby language, preferably with a focus on what ruby is good at/for.
blacktulip has joined #ruby
bluesm has joined #ruby
<eka>
moostapha: pickaxe book
io_syl has quit [Quit: Computer has gone to sleep.]
<bluesm>
eka: Mhm. I have one more question. Why ruby, (Why you convert to ruby). In terms of web development why not python + django (or smaller framework) or PHP. Why ruby on rails.
pogo has quit [Read error: Connection reset by peer]
Jasko has quit [Read error: Connection reset by peer]
<bluesm>
eka: I'm not an expert. I do not understand why people often choose ruby or python (with frameworks) over php...
Jasko has joined #ruby
banisterfiend has quit [Ping timeout: 260 seconds]
<bluesm>
eka: What is your application of ruby ? ( When it beats python). I can't understand it...
<eka>
bluesm: I liked the language, and the lib ecosystem... didnt said rails... and got tired of the python (only one way of doing it) way
<eka>
bluesm: my main job still python
gurps has quit [Ping timeout: 276 seconds]
emergion has joined #ruby
i42n has joined #ruby
philomory_ has quit [Read error: Connection reset by peer]
philomory has joined #ruby
<bluesm>
eka: Uh. So key feature - libraries.. . So you don't work in web development ?
adambeynon has joined #ruby
pen has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby
Virunga has joined #ruby
elico has joined #ruby
<eka>
bluesm: main thing is the expressiveness of ruby, the power of proc lambdas and blocks etc... even that is a little slower than python.
<eka>
bluesm: about web dev, I'm trying rails cause it's the buzz, but you also have sinatra and even cuba (flask like microframework)
<eka>
bluesm: I currently work with django and flask projects, big ones... so
shiin has joined #ruby
<eka>
bluesm: and about rails, I liked how it approached MVC and the Convention over Configuration, but still, if I have to go pro, first I would have to test vs sinatra etc..
<Hanmac>
python is to much ";"
<eka>
Hanmac: ;?
<eka>
Hanmac: where? that is javascript ... lol
<Hanmac>
isnt it that python needs ";" as line demitter? (and self in method def)
<eka>
Hanmac: I think you need a little more info ... lol
<eka>
Hanmac: no ;
haxrbyte has joined #ruby
pcarrier has quit []
io_syl has joined #ruby
vlad_starkov has joined #ruby
MrSamuel has joined #ruby
u89 has joined #ruby
drlaj has joined #ruby
MrSamuel has quit [Client Quit]
MrSamuel has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
Morkel has quit [Quit: Morkel]
MrSamuel has quit [Client Quit]
answer_42 has joined #ruby
danneu has quit [Ping timeout: 244 seconds]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
drlaj has quit [Ping timeout: 255 seconds]
s1n4 has joined #ruby
emmanuelux has joined #ruby
slainer68 has joined #ruby
<bluesm>
eka: Ok thank you very very much :)
elico has quit [Quit: elico]
<eka>
bluesm: still python is faster, but you can always scale horizontally :) and ruby is getting faster with each new version...
LouisGB has joined #ruby
<eka>
bluesm: did you like that video?
slainer68 has quit [Ping timeout: 240 seconds]
<Hanmac>
ruby and python feels like twinsisters ... but ruby is more mean :P
<bluesm>
eka: I haven't watched it yet. But I'll watch it. Python is faster because (main implementation) is compiled to virtual machine (if I get it right).
<bluesm>
eka: What do you mean "scale horizontally" ?
hotovson has joined #ruby
<eka>
bluesm: yes,,, ruby is getting that
<eka>
bluesm: horizontally means you add more resourses... like more machines etc... cheap... programmer hours is expensive
clj_newb has joined #ruby
Proshot has joined #ruby
s1n4 has quit [Quit: leaving]
fyolnish has joined #ruby
<bluesm>
eka: So you recommend me, watch this video, then buy courses on codeschool ? Right ?
<eka>
bluesm: watch that video... see what ruby can give you, and then if you are convinced, get at least 1 month on codeschool... I would also recommend first the pickaxe book, is very good and covers a lot
<eka>
bluesm: in 1 month you can do almost all the courses if you are committed to.. you can always cancel the subscription and open it again
<eka>
if needed
* Hanmac
does 3d programming with ruby (and bindings)
<eka>
Hanmac: interesting... 3d for what?
<Hanmac>
3d in gerneral, i bind an 3d engine ... so you could use it for what ever you want ... games, CAD, evil plans ...
<eka>
Hanmac: what do you use it for?
<Hanmac>
i may be use it later for an game engine
adac has joined #ruby
banisterfiend has joined #ruby
gurps has joined #ruby
abstrusenick has joined #ruby
Xeago has joined #ruby
drlaj has joined #ruby
<bluesm>
eka: Ok. Thank you very very much :)
Jasko has quit [Read error: Connection reset by peer]
cj3kim has quit [Quit: This computer has gone to sleep]
Jasko has joined #ruby
browndawg has left #ruby [#ruby]
Proshot is now known as statarb3
statarb3 has quit [Changing host]
statarb3 has joined #ruby
foohey has joined #ruby
icooba has joined #ruby
i42n has quit [Quit: afk.]
wermel has joined #ruby
drlaj has quit [Ping timeout: 244 seconds]
beachandbytes has quit [Ping timeout: 264 seconds]
burgestrand1 has quit [Quit: Leaving.]
Russell^^ has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
elaptics`away is now known as elaptics
matrixise has joined #ruby
icooba has quit [Quit: Computer has gone to sleep.]
burgestrand has joined #ruby
icooba has joined #ruby
slainer68 has joined #ruby
icooba has quit [Max SendQ exceeded]
lkba has quit [Ping timeout: 248 seconds]
drlaj has joined #ruby
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
elaptics is now known as elaptics`away
gurps has quit [Ping timeout: 276 seconds]
icooba has joined #ruby
lkba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
segv- has joined #ruby
icooba has quit [Max SendQ exceeded]
matchaw_ has quit [Ping timeout: 245 seconds]
vjt has quit [Ping timeout: 264 seconds]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
thomasfedb has quit [Ping timeout: 244 seconds]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
thomasfedb has joined #ruby
icooba has joined #ruby
trumpeter2003 has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
icooba has quit [Max SendQ exceeded]
Jasko has joined #ruby
jankly has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
stnly has quit [Ping timeout: 255 seconds]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
stnly has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
lordnaz has quit [Quit: WeeChat 0.3.7]
seanstickle has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
pyx has quit [Quit: WeeChat 0.3.9.2]
JarJar has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
rakunHo has quit [Remote host closed the connection]
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
s1n4 has joined #ruby
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
i42n has joined #ruby
Slivka has joined #ruby
icooba has quit [Max SendQ exceeded]
gurps has joined #ruby
gurps has quit [Excess Flood]
ltsstar has joined #ruby
tenmilestereo has joined #ruby
gurps has joined #ruby
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
<guardian>
what's the meaning of the minus sign before a hash instance?
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
<banisterfiend>
guardian: what do u mean?
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
<Hanmac>
guardian do you mean -> { } ?
<guardian>
no
icooba has joined #ruby
<guardian>
i mean -hist.values.reduce(0.0) do |e, freq|
clj_newb has quit [Ping timeout: 265 seconds]
icooba has quit [Max SendQ exceeded]
<banisterfiend>
guardian: hist.values.reduce() is likely returning a number
<guardian>
and it's negating it
<guardian>
ok
<banisterfiend>
guardian: so it's just negating that number, it's nothing to do wtih a hash itself, it's to do with the return value of reduce()
ebouchut has joined #ruby
<guardian>
sorry for bothering :/
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
<Hanmac>
"reduce" sounds so negative, i prefer "inject"
<banisterfiend>
Hanmac: what's the german word for inject and reduce ?
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
eka has quit [Remote host closed the connection]
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
timonv has joined #ruby
icooba has quit [Max SendQ exceeded]
devdazed has quit [Ping timeout: 252 seconds]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
n1x has quit [Quit: Ex-Chat]
devdazed has joined #ruby
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
artm has quit [Remote host closed the connection]
artm has joined #ruby
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
icooba has joined #ruby
icooba has quit [Max SendQ exceeded]
lemonsparrow has joined #ruby
<lemonsparrow>
is there a way to validate email domains ? I have an array ["gmail.com", "yahoo.com", "yahoo.co.in"] with list of domains.. I need to add a validation for a valid email domain while adding domains to this array .
icooba has joined #ruby
<seanstickle>
Validating emails is a tricky proposition. Really the only way to know for sure is to send an email to the address.
icooba has quit [Max SendQ exceeded]
<ccooke>
even that only validates the address.
<seanstickle>
True.
<ccooke>
Although you could do a dns lookup for an MX
<seanstickle>
Include a link and have the person click it and you have something closer to validation.
<lemonsparrow>
seanstickle: as of now for a given email.. for example a@gmail.com i am checking if gmail.com is a valid domain or not through something like this domains.include?(self.email.sub(/^.*?@/,""))
<ccooke>
but that will introduce a (very small) number of false negatives
<seanstickle>
lemonsparrow: or "a@gmail.com".split("@").last
ananthakumaran1 has joined #ruby
icooba has joined #ruby
<lemonsparrow>
seanstickle: I would like to have something similar to make sure domain has the everything after @ ie. gmail.com yahoo.co.in are valid where as a@gmail is not valid.
icooba was kicked from #ruby by seanstickle [icooba]
Gooder` has joined #ruby
<lemonsparrow>
seanstickle: domains.include? URI.parse(email.split("@").last).host something like this ?
ananthakumaran has quit [Ping timeout: 252 seconds]
<apeiros_>
seanstickle: oh, funny, you were faster than me :)
<seanstickle>
apeiros_: I meant to kick with a message; banned by error.
<apeiros_>
kick won't help, as he'll rejoin automatically, drop out again
vlad_starkov has quit [Read error: Connection reset by peer]
<seanstickle>
Yeah, but I thought it might get his attention. :(
arietis has quit [Quit: Computer has gone to sleep.]
<apeiros_>
he's most likely not on his computer
vlad_starkov has joined #ruby
<apeiros_>
and dang, I f'ed up the arg order of the ban… silly me :)
<seanstickle>
lemonsparrow: that'll work yeah
<lemonsparrow>
seanstickle: what i want is a validation for a format to make sure that what goes in the domain list array is a proper domain
<apeiros_>
lemonsparrow: if you poke me tomorrow, I might bring my MXResolver
<apeiros_>
I wrote one for exactly that purpose. mxresolving is slow so I pool & cache it
abstrusenick has quit [Quit: abstrusenick]
ebouchut has quit [Quit: This computer has gone to sleep]
drlaj has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
timonv has quit [Remote host closed the connection]
samphippen has joined #ruby
kirun has joined #ruby
burgestrand has quit [Quit: Leaving.]
Jasko has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 252 seconds]
rakl has joined #ruby
Jasko has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
ltsstar has quit [Quit: ltsstar]
Slivka has quit [Remote host closed the connection]
Nisstyre has quit [Ping timeout: 256 seconds]
u89 has quit [Remote host closed the connection]
jxriddle has joined #ruby
ikaros has joined #ruby
philomory has quit [Quit: philomory]
hamed_r has joined #ruby
monkegjinni has joined #ruby
drlaj has joined #ruby
s1n4 has left #ruby ["leaving"]
vasile has joined #ruby
Nisstyre has joined #ruby
lampe21 has joined #ruby
lampe2 has quit [Ping timeout: 240 seconds]
JarJar has left #ruby ["Leaving"]
ebouchut has joined #ruby
workmad3 has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
areil_ has quit [Remote host closed the connection]
F1skr has joined #ruby
u89 has joined #ruby
bluesm has quit [Ping timeout: 244 seconds]
arietis has joined #ruby
leonardorb has joined #ruby
i42n has quit [Quit: afk.]
hamed_r has quit [Ping timeout: 240 seconds]
ChampS666 has joined #ruby
Xeago has quit [Remote host closed the connection]
freeayu has quit [Remote host closed the connection]
browndawg has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
definiv has joined #ruby
Morkel has joined #ruby
hsbt_away is now known as hsbt
definiv_ has joined #ruby
cousine has joined #ruby
Michael__ has joined #ruby
igro has joined #ruby
eka has joined #ruby
mercwithamouth has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
definiv_ has quit [Client Quit]
binaryplease has joined #ruby
Jasko has joined #ruby
definiv has quit [Ping timeout: 276 seconds]
whitedawg has joined #ruby
eka has quit [Read error: Connection reset by peer]
Michael__ has quit [Remote host closed the connection]
freeayu has joined #ruby
eka has joined #ruby
pcarrier has joined #ruby
Michael__ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
pcarrier has quit [Client Quit]
clj_newb has joined #ruby
timonv has quit [Remote host closed the connection]
swex_ has joined #ruby
swex has quit [Read error: Operation timed out]
lkba has joined #ruby
ebouchut has joined #ruby
freeayu has quit [Remote host closed the connection]
niklasb has joined #ruby
Gooder`` has joined #ruby
matrixise has quit [Read error: Operation timed out]
Gooder` has quit [Ping timeout: 260 seconds]
Nimsical has joined #ruby
otters has joined #ruby
nomenkun has joined #ruby
BoomCow has quit [Ping timeout: 256 seconds]
Michael__ has quit [Remote host closed the connection]
Phoop has quit [Quit: Phoop]
rovalent has joined #ruby
clj_newb has quit [Ping timeout: 265 seconds]
Virunga has quit [Remote host closed the connection]
vasile has quit [Ping timeout: 252 seconds]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
artm_ has joined #ruby
whitedawg has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 252 seconds]
artm has quit [Ping timeout: 264 seconds]
artm_ is now known as artm
maciek` has joined #ruby
rakl has quit [Quit: sleeping]
xyzodiac has joined #ruby
browndawg has quit [Quit: Leaving.]
<maciek`>
I have a question about the Kernel module. In "Metaprogramming Ruby" author says that "print" is defined in Kernel for programmer to be able to use "print" as it was a Ruby keyword. My question is: why bother defining print in Kernel, when we could just use define function "print"?
tPl0ch has quit [Quit: Verlassend]
Michael__ has joined #ruby
<Mon_Ouie>
maciek`: That way if you redefine print in some class, you can still easily use Kernel.print
tenmilestereo has quit [Read error: Connection reset by peer]
tenmilestereo has joined #ruby
<maciek`>
Now I got this, thank you.
Gooder`` has quit [Ping timeout: 265 seconds]
ddd has quit [Quit: Leaving.]
<maciek`>
I was thinking about different print for every object in method overload way (like C++), but in Ruby there is nothing like this and I guess method dispatch is the way to add more concretizations of print in extensible way.
browndawg has joined #ruby
ddd has joined #ruby
ddd has left #ruby [#ruby]
ddd has joined #ruby
browndawg has quit [Client Quit]
<maciek`>
Just on the next page of the book there is another example, "gem" from RubyGems being defined by opening Kernel module and adding "gem" method to it. In print example the reason to define it there was extensibility. I do not see usefulness of defining other versions of "gem" for other classes. Why is gem defined that way?
* apeiros_
hopes the book didn't forget the `module_function` part
browndawg has joined #ruby
<Mon_Ouie>
maciek`: That's just the convention used when defining globally accessible methods, even if it seems to be unlikely that someone will need both Kernel#gem and their own gem method
<waxjar>
Kernel is available in all objects, you can do gem args instead of Kernel.gem args
<maciek`>
@waxjar: the syntax reason was explained well in the book. But defining global method results in the same syntax and I was wondering why the Kernel approach is used instead.
<apeiros_>
maciek`: if you refer to `def foo; end` vs. `module Kernel; def foo; end; module_function :foo; end`, then the difference would be that you can't do something like Kernel.foo with the former.
Jasko has quit [Read error: Connection reset by peer]
forced_request has quit [Remote host closed the connection]
Jasko has joined #ruby
Goles has joined #ruby
u89 has quit [Remote host closed the connection]
<apeiros_>
as a side benefit, having a container for all pseudo-functions makes it easier to document them.
<maciek`>
@apeiros_: now I understand. And now I understand Mon_Ouie's answer too.
<apeiros_>
it might also be that the concept of `main` was different in early rubies.
postmodern has quit [Quit: Leaving]
monkegjinni has quit [Remote host closed the connection]
hotovson has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
niklasb has quit [Ping timeout: 244 seconds]
miso1337 has quit [Quit: afk]
bel3atar has joined #ruby
bel3atar has left #ruby [#ruby]
workmad3 has joined #ruby
bel3atar has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
definiv has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<_axx>
hey guys, i have a block and i want to pass multiple lines (Strings), but it seems like my block is only working with the last line. https://gist.github.com/ac192c50075cd99f403f
Michael__ has quit [Remote host closed the connection]
icooba has quit [Quit: Computer has gone to sleep.]
<waxjar>
you do argument passing in a block like this: do |here, go, your, arguments| do_something_with(here); end
<waxjar>
then in call, you pass your strings: block.call('string1, 'string2', etc)
kil0byte has quit [Remote host closed the connection]
<workmad3>
_axx: in addition, the evaluation value of a block is the same as a method without an explicit 'return' - it's the same as the last expression in the block
<workmad3>
_axx: or more accurately, the last expression that gets evaluated in the block
<ddd>
Whats the difference, or probably the better question would be why the availability of use, between using .class_exec() and .extend() especially when using them to extend a class or module specifically?
lampe2 has joined #ruby
<_axx>
hm. the problem i have is, i would like to pass commands to an net/ssh connection. i want to pass commands in my block and that call ssh.exec for each of those passed values. maybe blocks aren't the right solution
<_axx>
:S
kil0byte has quit [Ping timeout: 265 seconds]
u89 has joined #ruby
hsbt is now known as hsbt_away
<ddd>
I understand the reason, cause, and effect of using my_obj.extend(MyMod) ; but is that *only* limited to extending using modules?
nomenkun has quit [Remote host closed the connection]
<waxjar>
_axx: maybe an Array with commands, iterate over it and call ssh.exec on each item
kil0byte has joined #ruby
nomenkun has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
<ddd>
except one is shorter. because a predefined a = Klass.new ; Klass.class_exec { def hello() "My New Hello" end } ; a.hello changes even the predefnined. so whats the difference?
Gabri has joined #ruby
elaptics`away is now known as elaptics
<waxjar>
extend defines class methods for a Module and class_exec executes a block of code in the scope of a Class or Module?
<waxjar>
*from a Module
<waxjar>
_axx, why don't you just do ssh.exec(Apt.get); ssh.exec(Apt.update 'mysql') ?
<_axx>
waxjar: that would work, but it isn't so "clean". i want to have a clean "config file"
<_axx>
it's only about design, i could do it like you said ^^
Jasko has quit [Read error: Connection reset by peer]
Yarou has joined #ruby
nemesit|osx has joined #ruby
io_syl has joined #ruby
Jasko has joined #ruby
Morkel has quit [Quit: Morkel]
<waxjar>
well, you can't get the return value of Apt.update in this case unless you store it somewhere
Gabri has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
<waxjar>
Ruby returns the value of the last value in a block (also in methods, etc)
<waxjar>
*the last expression
Mon_Ouie has quit [Ping timeout: 264 seconds]
<_axx>
hm
kevinykchan has joined #ruby
<waxjar>
you could do something like def connect(array); ssh.connect { |ssh| array.each { |cmd| ssh.exec(cmd) } }; end
<waxjar>
and pass connect an array: connect [Apt.update, Apt.install('mysql')]
<apeiros_>
amaya_the: a) ri Math, b) Math.constants
<amaya_the>
apeiros_: thank you !
clj_newb has joined #ruby
<amaya_the>
But I can't work it out?
<amaya_the>
ri Math , What is it?
<apeiros_>
ri is a command line tool
<apeiros_>
in your bash (or whatever other shell) you just type `ri Math`. requires the docs to be installed (`rvm docs generate` if you installed ruby via rvm)
phelps has quit [Quit: Computer has gone to sleep.]
<amaya_the>
I see, I am using irb.
<amaya_the>
well , method B works.
<amaya_the>
[:DomainError, :PI , :E]
<amaya_the>
This is the result.
binaryplease has quit [Quit: WeeChat 0.3.9.2]
<apeiros_>
amaya_the: irb is *not* your shell
<apeiros_>
your shell is the place where you type `irb` in order to start irb.
<amaya_the>
I am a windows user.
<amaya_the>
:(
<apeiros_>
so?
<apeiros_>
you double click irb or what?
<amaya_the>
[:DomainError, :PI , :E]
<amaya_the>
This is the result.
<apeiros_>
amaya_the: how do you start irb?
<amaya_the>
Well , I will restart it again.
robotmay has joined #ruby
<apeiros_>
…
maciek` has quit [Remote host closed the connection]
<apeiros_>
amaya_the: how about you just answer my question?
Neomex has joined #ruby
<amaya_the>
well , I double click irb.
i42n has quit [Quit: afk.]
FiveAcres has joined #ruby
<apeiros_>
ok, so indeed no shell.
<apeiros_>
last time I checked, people would use run.cmd (or whatever the name was)
<amaya_the>
Just double click.
adac has joined #ruby
kil0byte has quit [Remote host closed the connection]
<browndawg>
apeiros_: Double clicking irb starts an irb session in cmd.exe. I don't see how that would be different
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
<apeiros_>
browndawg: read the backlog. hint: explain shell to a windows user.
<diegok>
amaya_the: ri is a nice CLI tool for looking into ruby docs
yshh has joined #ruby
<browndawg>
apeiros_: :) The lack of a usable shell is why I can't use windows anymore
definiv has joined #ruby
jackbrownhf has quit [Remote host closed the connection]
<diegok>
amaya_the: I'm completely lost on windows, but I guess you should have ri from cmd.exe. ri --help will teach you all its goodies ;-)
kil0byte has quit [Ping timeout: 240 seconds]
phelps has joined #ruby
<diegok>
browndawg: lack of an usable [put whatever here] you should say :p
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
<browndawg>
diegok: Well, I'm one of those people who actually like windows. If only it was a *nix.
* browndawg
sighs
<diegok>
browndawg: but, then you shuld give a try to cygwin I guess (or probably you already did that)
<amaya_the>
Thank you, I tyed ri Math in command line window, but it answered,'Nothing Known about Math'
<browndawg>
diegok: I have, but I just prefer to use an actual unix like system
<browndawg>
diegok: With proper package management
<diegok>
browndawg: sure!, I'm just saying :)
<browndawg>
diegok: Yeah. I actually like the windows gui. :)
<diegok>
browndawg: I'm an old unix who can't get why pple like something around win32
timonv has joined #ruby
Xeago has quit [Remote host closed the connection]
<diegok>
browndawg: stockholm syndrome :-p
<browndawg>
diegok: unix is a lot better than windows imho
<diegok>
sure!
<diegok>
About 10y ago I was forced to use windows for a while and I've discovered cygwin to be fantastic tool for that situation :)
kirun has joined #ruby
<browndawg>
diegok: I just like windows. I guess its because I had windows when I first started hacking around on a computer. I guess a bit of sentimental attachment there.
ChampS666 has quit [Ping timeout: 244 seconds]
<diegok>
sure :)
<browndawg>
diegok: Still prefer a good old linux install over cygwin
<diegok>
browndawg: sure!, now I'm using a mac and still missing my linux/freebsd goodies from time to time...
workmad3 has quit [Ping timeout: 244 seconds]
timonv has quit [Ping timeout: 250 seconds]
devdazed has quit [Ping timeout: 244 seconds]
<browndawg>
diegok: isnt osx bsd based?
<diegok>
yes, it is.
hotovson has joined #ruby
hotovson has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
Naeblis has joined #ruby
bel3atar has joined #ruby
u89 has quit [Remote host closed the connection]
kirun_ has joined #ruby
kirun has quit [Ping timeout: 252 seconds]
u89 has joined #ruby
bronson has joined #ruby
dnyy has joined #ruby
quest88 has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
u89 has quit [Read error: No route to host]
synthetix has joined #ruby
lectrick has joined #ruby
hsbt_away is now known as hsbt
nomenkun has joined #ruby
havenn has quit [Remote host closed the connection]
hsbt has quit [Ping timeout: 240 seconds]
tommyvyo has joined #ruby
ChampS666 has quit [Ping timeout: 255 seconds]
beachandbytes has joined #ruby
EyesIsMine has joined #ruby
Slivka has joined #ruby
denken has joined #ruby
rellin has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
ewag has quit [Ping timeout: 255 seconds]
Neomex has joined #ruby
bronson has quit [Quit: bronson]
Neomex has quit [Client Quit]
kirotan has joined #ruby
bel3atar has quit [Ping timeout: 240 seconds]
babykosh has joined #ruby
babykosh has quit [Client Quit]
piccalingo2 has joined #ruby
joeycarmello has joined #ruby
babykosh has joined #ruby
hsbt_away has joined #ruby
Yarou has quit [Read error: Connection reset by peer]
Yarou has joined #ruby
joeycarmello has quit [Remote host closed the connection]
<babykosh>
I have a loop that prints a hash to the screen 9 times. I wish to merge each printed hash into a new hash so that at the end of the loop I can say puts new_hash_of_hashes ….which contains each individual 9 hashes. How to do this?
tenmilestereo has quit [Read error: Connection reset by peer]
tenmilestereo has joined #ruby
adambeynon has joined #ruby
yshh has quit [Remote host closed the connection]
<waxjar>
i'd just use an Array if you're not gonna look up values with keys
BoomCow has quit [Ping timeout: 255 seconds]
<babykosh>
@waxjar ah, but I will be
<waxjar>
then i don't understand the problem, if you have keys you just do new_hash[key] = hash.inspect (or whatever) ?
<shevy>
everytime I end up rewriting something, I curse at doing so
<banisterfiend>
babykosh: i dont understand your q.
<banisterfiend>
babykosh: what do you mean "merge each printed hash into a new hash" ?
<canton7>
an example would probably help
phelps has quit [Ping timeout: 248 seconds]
<babykosh>
ok 1 sec...
Neomex has joined #ruby
Neomex has quit [Client Quit]
browndawg has quit [Quit: Leaving.]
phelps has joined #ruby
phelps has quit [Max SendQ exceeded]
phelps has joined #ruby
phelps has quit [Max SendQ exceeded]
phelps has joined #ruby
phelps has quit [Max SendQ exceeded]
Michael__ has quit [Remote host closed the connection]
Flocon has joined #ruby
wermel has quit [Remote host closed the connection]
S3kx has quit [Quit: Leaving]
<babykosh>
ok….here is a gist related to the question…..I'm trying to build a hash of hashes….https://gist.github.com/4246346
tommyvyo_ has joined #ruby
bel3atar has joined #ruby
havenn has joined #ruby
withnale has quit [Excess Flood]
<waxjar>
can you give an example of input and what you'd like to get as output? i think that'd be easier
withnale has joined #ruby
<babykosh>
@waxjar ok…i sec
phelps has joined #ruby
jlwestsr has joined #ruby
bel3atar has quit [Quit: Leaving]
h4mz1d has joined #ruby
bel3atar has joined #ruby
marknyc has quit [Ping timeout: 264 seconds]
chrishunt has joined #ruby
dmiller has quit [Ping timeout: 246 seconds]
bel3atar has left #ruby [#ruby]
phelps has quit [Ping timeout: 250 seconds]
ejholmes has joined #ruby
BoomCow has joined #ruby
havenn has quit [Remote host closed the connection]
cj3kim has joined #ruby
dmiller has joined #ruby
clj_newb has joined #ruby
ebouchut has joined #ruby
Guest73164 has quit [Quit: Guest73164]
jekotia has joined #ruby
scruple has quit [Ping timeout: 252 seconds]
phelps has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
phelps has quit [Remote host closed the connection]
Michae___ has joined #ruby
phelps has joined #ruby
darthdeus has joined #ruby
<reppard>
bueller?
danneu has joined #ruby
Nimsical has quit [Quit: Computer has gone to sleep.]
piccalingo2 has joined #ruby
darthdeus has quit [Read error: Connection reset by peer]
Guest73164 has joined #ruby
cakehero has joined #ruby
phelps has quit [Ping timeout: 255 seconds]
havenn has joined #ruby
darthdeus has joined #ruby
havenn has quit [Read error: Connection reset by peer]
darthdeus has quit [Client Quit]
havenn has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
drlaj has quit [Remote host closed the connection]
babykosh has quit [Quit: babykosh]
devdazed has quit [Ping timeout: 260 seconds]
withnale has quit [Excess Flood]
jankly has joined #ruby
withnale has joined #ruby
drlaj has joined #ruby
devdazed has joined #ruby
phelps has joined #ruby
phelps has quit [Max SendQ exceeded]
xorigin has joined #ruby
<ddd>
again, just as you did in #rubyonrails, hounding won't get people to flock to your aid, especially when double and triple tapping channels
phelps has joined #ruby
h4mz1d has quit [Ping timeout: 264 seconds]
ephemerian has joined #ruby
IcyDragon has joined #ruby
trumpeter2003 has quit [Ping timeout: 248 seconds]
prettymuchbryce has joined #ruby
<havenn>
reppard: Can you paste a Gist of the problem and what you have so far?
niklasb has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
artm has quit [Quit: artm]
<prettymuchbryce>
Hello #ruby. I am trying to figure out the best way to run a simple ruby application that I built on ec2. I have my ec2 ubuntu instance running, and I installed ruby on it. Does anyone else run ruby on ec2 ?
<reppard>
my logic seems correct to me but its returning the wrong value
<havenn>
prettymuchbryce: Are you trying to configure ec2 for http(s) traffic or looking for Ruby web server for serving up your rack app?
hsbt_away has quit [Ping timeout: 264 seconds]
xorigin has left #ruby [#ruby]
ebouchut has quit [Quit: This computer has gone to sleep]
<prettymuchbryce>
haven Web traffic probably with sinatra, and a TCP web socket server written in Ruby running on the same instance.
pcarrier has joined #ruby
<reppard>
havenn: you see any logical flaws?
<havenn>
reppard: !n is never nil
<waxjar>
reppard, haven't read the thingy but `if !n.nil?` => `unless n.nil?`, `true if n == b` => `n == b` and maybe the culprit: `#select {|i| i if n % i == 0 && i != n}` => #select { |i| n % i == 0 && i != n }
F1skr has quit [Quit: WeeChat 0.3.9.2]
kil0byte has joined #ruby
<apeiros_>
`if !n.nil?` can in most cases be simplified to `if n`
BoomCow has joined #ruby
Takehiro has quit [Remote host closed the connection]
mpereira has joined #ruby
<reppard>
havenn: if i take that out i get bad value for range, thats why i added that
<havenn>
def d n; 1.upto(n)
kil0byte has quit [Ping timeout: 252 seconds]
hotovson has quit [Remote host closed the connection]
<havenn>
reppard: Wait, range should work fine there. I'm confused.
ooO0Ooo has joined #ruby
phelps has quit [Ping timeout: 264 seconds]
ooO0Ooo has left #ruby ["WeeChat 0.3.9.2"]
<reppard>
it should, thats why i am stumped
<reppard>
haha
<reppard>
i just tried your upto and added i.even? to my select
Michae___ has quit [Remote host closed the connection]
<reppard>
the problem is range doesnt like an odd number in this situation for some reason, but only even numbers should have a pair anyway
<havenn>
reppard: Works on My Machine. (C)
devdazed has quit [Ping timeout: 255 seconds]
<reppard>
havenn: the code works on my machine but it produces the wrong answer
<havenn>
reppard: Ahh, okay. I am just confused, need to drink my coffee.
<reppard>
=)
tommyvyo has quit [Quit: Computer has gone to sleep.]
hsbt_away has joined #ruby
yshh has joined #ruby
niklasb has quit [Quit: WeeChat 0.3.9.2]
marknyc has joined #ruby
<reppard>
i ran someone elses code without looking at the actually code( didnt want help with all the logic) and their solution produces an answer about 900 less than mine
<reppard>
so know my logic is very close but can't figure out why its incorrect
devdazed has joined #ruby
<reppard>
i do however like the looks of upto instead of range so thanks for that atleast !
<havenn>
Munto: Not really an answer... but I'm a big fan of Chronic gem so you don't have to think about such things!: require 'chronic'; Chronic.parse('Dec 8, 2012 16:26').to_date
IcyDragon has quit [Quit: Space~~~]
<apeiros_>
Munto: %a is day of week
CaptainJet has joined #ruby
<apeiros_>
and Dec isn't a day
<apeiros_>
also something with a time in it isn't a date, it's a datetime
<havenn>
apeiros_: Oooh, touche!
<Munto>
oh gosh...
<Munto>
thank you apeiros_
<apeiros_>
Munto: and last but not least, when you get an error and want help, for fucks sake provide the error!
philcrissman has quit [Remote host closed the connection]
<dukedave>
Do we have a bot in here that can evaluate Ruby?
<Munto>
I will
<Munto>
thanks
reppard has quit [Ping timeout: 265 seconds]
<havenn>
dukedave: Used to, don't think she's here anymore though.
<apeiros_>
havenn: please move private code evals to pm
<apeiros_>
same @ reactormonk
haxrbyte has quit [Remote host closed the connection]
<reactormonk>
aww
haxrbyte has joined #ruby
<reactormonk>
apeiros_, doesn't respond to those...
Takehiro has joined #ruby
beachandbytes has quit [Ping timeout: 260 seconds]
hsbt has quit [Ping timeout: 244 seconds]
<apeiros_>
ok. still, no public evals which aren't related to a question
havenn has quit [Remote host closed the connection]
answer_42 has quit [Ping timeout: 276 seconds]
gbchaosmaster has quit [Quit: leaving]
BoomCow has quit [Ping timeout: 276 seconds]
BoomCow has joined #ruby
LouisGB has quit [Ping timeout: 265 seconds]
Takehiro has quit [Ping timeout: 256 seconds]
kiyoura has joined #ruby
arturaz has quit [Ping timeout: 240 seconds]
shevy has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
mneorr has joined #ruby
jankly has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
jankly has joined #ruby
hsbt_away has joined #ruby
alee has quit [Ping timeout: 276 seconds]
havenn has joined #ruby
xAndy is now known as xandy
Guest73164 has quit [Quit: Guest73164]
dnyy has quit [Remote host closed the connection]
Slivka has joined #ruby
dankest is now known as dankest|away
danneu has joined #ruby
phelps has quit [Ping timeout: 255 seconds]
Naeblis has quit [Ping timeout: 250 seconds]
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
FredLe has joined #ruby
dankest|away is now known as dankest
cyong has joined #ruby
Slivka has quit [Remote host closed the connection]
xandy is now known as xAndy
etank has joined #ruby
Beoran_ has joined #ruby
tenmilestereo has quit [Read error: No buffer space available]
rippa has quit [Ping timeout: 264 seconds]
h4mz1d has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
tenmilestereo has joined #ruby
Spaceboy has quit [Ping timeout: 276 seconds]
darthdeus has quit [Quit: Leaving...]
segv- has quit [Quit: segv-]
haxrbyte has joined #ruby
Beoran__ has quit [Ping timeout: 244 seconds]
emmanuelux has quit [Ping timeout: 265 seconds]
phelps has joined #ruby
<invisime>
apeiros_: havenn's eval was related to my question.
<havenn>
eval spam is bad, mea culpa
iaj has quit [Ping timeout: 265 seconds]
Naeblis has joined #ruby
<havenn>
I love that RVM2 is written in Ruby not Bash, can't seem to figure out how to install it properly though: https://github.com/rvm/rvm
mahmoudimus has joined #ruby
<hackeron>
hey, question, I have a set of elements a = Set.new[] - is there any way to limit the size to keep the last 10 items? - or alternatively to "pop" or delete the last item from the Set?
iaj has joined #ruby
chrishunt has quit [Quit: Leaving...]
havenn has quit [Remote host closed the connection]
Jamone has joined #ruby
hsbt_away is now known as hsbt
LouisGB has joined #ruby
lolcathost has joined #ruby
arturaz has joined #ruby
yeban_ has quit []
yeban_ has joined #ruby
seanstickle has joined #ruby
Monie has quit [Ping timeout: 255 seconds]
phelps has quit [Ping timeout: 276 seconds]
aaronmacy has quit [Quit: Leaving.]
emmanuelux has joined #ruby
<reppard>
.
slainer68 has quit [Remote host closed the connection]
bonemind has quit [Ping timeout: 264 seconds]
Jamone has quit [Quit: Quit]
<reppard>
still there hackeron ?
nomenkun has joined #ruby
Spaceboy has joined #ruby
<hackeron>
reppard: yep - but switched to just using array and shifting when length>10, heh
<reppard>
haha
<reppard>
i was going to say something like a[1..-2] would do the trick
<hackeron>
reppard: and manually checking for duplicates before pushing items :)
bluehavana has quit []
<reppard>
that will exclude the last element
bluehavana has joined #ruby
elkclone has joined #ruby
<hackeron>
reppard: it doesn't :( irb(main):033:0> Set[1,2,3,4,5][0]
<pnbeast>
hackeron: I'm not a Ruby expert. I only know what usually constitutes a hash, plus what my docs say. Note that one instance of correct order does not constitute a general requirement on the language definition.
Monie has joined #ruby
etank has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
mneorr has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
seanstickle has quit [Quit: seanstickle]
nomenkun has joined #ruby
<reppard>
a.methods.sort will give you everything you have to work with
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
mneorr has joined #ruby
eka has quit [Remote host closed the connection]
leonardorb has quit [Remote host closed the connection]
<reppard>
hackeron: just extend the Set class ;)
NimeshNeema has quit []
dankest|away is now known as dankest
<hackeron>
reppard: hmm, I think array is ok for me - I only want 10 items so don't think it's much overhead to do array.push(item) unless array.include? item :P
wallerdev has quit [Quit: wallerdev]
<reppard>
indeed that works
<reppard>
then if you want it ordered just use sort
phelps has joined #ruby
dekz_ has quit []
<hackeron>
reppard: I want it ordered in the original order :P
<reppard>
shovel operator works well for this situation
<hackeron>
reppard: is there a difference between the 2?
NimeshNeema has joined #ruby
<hackeron>
reppard: reason I use push is I have shift afterwards, just looks cleaner -- @recordings.push(recording) unless @recordings.include? recording \n @recordings.shift if @recordings.length > 10
<reppard>
<< accepts only a single argument while push accepts multiple
<reppard>
both push to the end of the array
Monie has quit [Read error: Connection reset by peer]
beachandbytes has joined #ruby
Monie has joined #ruby
<reppard>
i believe you can initialze the array with << as well
lolcathost has quit [Quit: leaving]
<hackeron>
reppard: that's useful
Xeago has joined #ruby
<reppard>
nope, nevermind, wrong on that last one
<reppard>
haha
phelps has quit [Ping timeout: 250 seconds]
<hackeron>
oh, lol, meh
lolcathost has joined #ruby
<reppard>
good ol irb
guardian has left #ruby [#ruby]
d3c has joined #ruby
d3c has quit [Client Quit]
BoomCow has quit [Quit: This computer has gone to sleep]
chrishunt has joined #ruby
phelps has joined #ruby
lolcathost has quit [Read error: Connection reset by peer]
generalissimo has quit [Remote host closed the connection]
GeekOnCoffee has joined #ruby
lolcathost has joined #ruby
Virunga has joined #ruby
dankest is now known as dankest|away
slainer68 has quit [Ping timeout: 264 seconds]
eka has joined #ruby
theRoUS has quit [Ping timeout: 250 seconds]
gyre007 has joined #ruby
hsbt_away has joined #ruby
tps_ has quit [Quit: tps_]
freakazoid0223 has joined #ruby
vasile has quit [Ping timeout: 265 seconds]
jimeh has joined #ruby
dv_ has quit [Read error: Connection reset by peer]
leonardorb has joined #ruby
khimera has quit [Quit: khimera]
iaj has joined #ruby
danneu has quit [Ping timeout: 240 seconds]
dv_ has joined #ruby
Briney has joined #ruby
jackbrownhf has quit [K-Lined]
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
gbchaosmaster has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
eka has quit [Remote host closed the connection]
jeffreybaird has joined #ruby
d2dchat has joined #ruby
aaronmacy has joined #ruby
lolcathost has quit [Quit: xterm is shit]
niklasb has joined #ruby
phelps has quit [Ping timeout: 244 seconds]
fcoury_ has quit []
Monie has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
fcoury has joined #ruby
sjhuang has quit [Ping timeout: 255 seconds]
mildfate has joined #ruby
tommyvyo_ has joined #ruby
BoomCow has joined #ruby
nickbuff has joined #ruby
raycarr has joined #ruby
<tsp>
I'm confused. There's both #ruby and #ruby-lang, which channel is best to ask my question in or do I need both?
sjhuang has joined #ruby
<waxjar>
i believe #ruby-lang is more of a discussion channel, but i'm not sure
vasile has joined #ruby
<banisterfiend>
more top rubyists hang out in #ruby-lang
<banisterfiend>
#ruby is for the low brow drug addled rubyists
<banisterfiend>
:P
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
statarb3 has quit [Quit: Leaving]
<pnbeast>
tsp: From my memory of things said in the past, the channels arose independently. Some people would just as soon see them combined, but other people don't want that or won't be bothered enough to do it. As for "best", I guess you'd have to lurk in both and make your own judgement, there.
* pnbeast
heats another spoon full of heroin with his crack pipe.
jmeeuwen has joined #ruby
h8R has quit [Ping timeout: 265 seconds]
haxrbyte_ has joined #ruby
epwhorl has joined #ruby
lkba has joined #ruby
EyesIsMine has quit [Ping timeout: 248 seconds]
<epwhorl>
734, that's quite a number
vasile has quit [Ping timeout: 255 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
<tsp>
I'd like some input on how to improve my small script. Mainly, is there some idiom I'm missing to let me set xml inside of the block and access it outside? http://dpaste.com/843293/
<tsp>
Because ruby usually uses end, I can't just search for end to find the end of a function I don't want to read, so this seems to be the next best solution
raycarr has quit [Quit: raycarr]
stnly has quit [Ping timeout: 244 seconds]
haxrbyte_ has quit [Ping timeout: 255 seconds]
stnly has joined #ruby
thomasfedb has joined #ruby
phelps has quit [Ping timeout: 250 seconds]
havenn has joined #ruby
[Neurotic] has joined #ruby
ikaros has quit [Quit: Ex-Chat]
hotovson_ has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby
phelps has joined #ruby
<canton7>
tsp, use a decent editor :)
hsbt_away has joined #ruby
gabrielrotbart has joined #ruby
emmanuelux has quit [Ping timeout: 265 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
gabrielrotbart has quit [Remote host closed the connection]
elico has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
slainer68 has joined #ruby
drlaj has joined #ruby
hiroyuki has joined #ruby
<babykosh>
@davidcelis incorrect, there is no answer to that question
hiroyuki has quit [Remote host closed the connection]
hiroyuki has joined #ruby
<davidcelis>
except for that answer by megas?
<davidcelis>
on which i left a comment with another way to do it? so you have _two_ answers?
eka has joined #ruby
cableray has joined #ruby
jeffreybaird has joined #ruby
Virunga has quit []
drlaj has quit [Remote host closed the connection]
<babykosh>
megas's answer is not selected ----for a reason----it does not work
kil0byte has joined #ruby
techhelp has quit [Quit: Leaving]
jackdanger has joined #ruby
<davidcelis>
how so?
epwhorl has joined #ruby
GoGoGarrett has joined #ruby
<babykosh>
"how so?" would initialize going through the same 2hr long process to attempt to implement megas answer into "build_virtual_boards_hash(board, player)"
eka has quit [Ping timeout: 240 seconds]
tommyvyo has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
<davidcelis>
sounds like your problem is not creating a hash of hashes, then; since `hash = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }` does that easily
<babykosh>
inside 'build_virtual_boards_hash' method on the next to last line…..is…p virtual_board_hash. what actual code goes here OR how would this method be rewritten so that the desired output is returned
<davidcelis>
that initializes a deep hash. if that doesn't answer your question, you need to title it better. it's impossible to tell what you're trying to do
Briney has quit [Quit: Briney]
epwhorl has quit [Client Quit]
<davidcelis>
your problem is that `empty_spaces_on_board.length` is always 7
rouss has joined #ruby
<davidcelis>
and not 1-6 like you want it to be
<davidcelis>
so you just keep overwriting VB7's value in that hash