<wallerdev>
why write pretty code when you can write fewer characters is my motto
r0nin has quit [Ping timeout: 240 seconds]
<mr_snowf1ake>
wallerdev, by that logic, nested ternary operators ftw :P
<wallerdev>
yeah and skip the parens on those :p
pel_daniel1 has left #ruby [#ruby]
davy has joined #ruby
coderxin has quit [Remote host closed the connection]
<shevy>
you evil bastards
Azure has joined #ruby
platzhirsch has left #ruby [#ruby]
<shevy>
def foo(a,b,c,d)
<shevy>
this is what I will use from now on
afreidah has joined #ruby
<shevy>
because wallerdev said so
sailias has quit [Ping timeout: 240 seconds]
<wallerdev>
def f(p,a,c,k,e,r)
sambao21 has joined #ruby
samuel02 has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 240 seconds]
rjhunter has quit [Ping timeout: 264 seconds]
<benzrf>
wallerdev: function(i,s,o,g,r,a,m)
poikon has quit []
bradhe has joined #ruby
<shevy>
def b(e,n,z,r,f)
nobitanobi has quit []
<wallerdev>
anyway i came up with the optimal solution to his issue
<wallerdev>
using regex of course
eynj has joined #ruby
<wallerdev>
user.name[/.{1,}/]
maletor has quit [Quit: Computer has gone to sleep.]
<wallerdev>
haha or +
danshultz has joined #ruby
davy has quit [Remote host closed the connection]
cashnguns has joined #ruby
gregf1 has quit [Quit: WeeChat 0.4.3]
funktor has joined #ruby
afreidah has quit [Ping timeout: 265 seconds]
|RicharD| has quit [Quit: Sto andando via]
sdwrage has joined #ruby
lepht has joined #ruby
papercode has quit [Quit: WeeChat 0.4.4-dev]
funktor has quit [Remote host closed the connection]
Hobogrammer_ has quit [Ping timeout: 252 seconds]
afreidah has joined #ruby
mikecmpbll has quit [Quit: ciao.]
sailias has joined #ruby
<shevy>
man
lukec has joined #ruby
Shidash has joined #ruby
<boombadaroomba>
lady
afreidah has quit [Ping timeout: 240 seconds]
shinobi_one has quit [Quit: shinobi_one]
<thoraxe>
so i'm having a brain malfunction right now. https://gist.github.com/thoraxe/9752673 ultimately i want to generate an ID if id isn't passed in, but right now if id is passed in I get an undefined method error, which I am guessing makes sense because id is a reader not an accessor?
<joshsmith>
PhotoColor has the column reference_color which is a hex value
<thoraxe>
benzrf: not sure how to hardcode it i guess.
<joshsmith>
I’m trying to get all the photos with a given reference_color
predator117 has joined #ruby
sailias has quit [Quit: Leaving.]
<joshsmith>
I’m trying color_class.where(reference_color: hex).joins(:photo) but that just gives me an array of PhotoColors
<Danny_Joris>
I’m having issues with upgrading ruby gems. I have to say I’m not a ruby developer, I just need the gems for sass and jekyll etc.. Jekyll stopped working so I read I need to install the json gem. This fails, resulting in this error: ERROR: Error installing json: ERROR: Failed to build gem native extension.
<wallerdev>
joshsmith: #rubyonrails probably
<Danny_Joris>
I updated xcode command line tools, but no success
tkuchiki has quit [Ping timeout: 252 seconds]
mansi has quit [Ping timeout: 264 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
<Danny_Joris>
sudo gem install json --platform=ruby --verbose —> didn’t work either
<joshsmith>
ah wallerdev thought I was in rails
<Danny_Joris>
jekyll -v doens’t even work
<Danny_Joris>
any ideas?
derek_c has joined #ruby
oneawayman has joined #ruby
predator217 has quit [Ping timeout: 240 seconds]
ffranz has quit [Quit: Leaving]
lolmaus has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
polyidus has quit [Quit: EOF]
razrunelord has quit []
lepht_ has quit []
apeiros has quit [Remote host closed the connection]
<thoraxe>
https://gist.github.com/9752673 this sortof works but if i don't pass an id value it doesn't auto generate one still
ephemerian has quit [Remote host closed the connection]
<wallerdev>
thoraxe: i think by hardcoding he was just saying if params[:file_contents] @file_contents = params[:file_contents]
<havenwood>
thoraxe: you want setter methods only, no getter methods for the ones you're adding?
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<thoraxe>
havenwood: not sure i understand the question. in theory you shouldn't be able to change the id for an existing object
p4tux has quit [Read error: Connection reset by peer]
<thoraxe>
but when creating an instance of the object you should be able to set its id
p4tux has joined #ruby
<havenwood>
thoraxe: i mean for your param attr= methods
<wallerdev>
hes not creating methods
<wallerdev>
hes using send
<havenwood>
oh
<thoraxe>
havenwood: don't understand the question
<havenwood>
thoraxe: nevermind, looked closer at what you're actually doing
<havenwood>
thoraxe: why are you doing that!? :P
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
jason__ has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kitak has joined #ruby
ndrei has quit [Read error: Operation timed out]
<havenwood>
thoraxe: what are you doing then with those params?
<pontiki>
heyo o/
<havenwood>
hey
invinceable has quit [Ping timeout: 268 seconds]
<thoraxe>
havenwood: not sure again that i understand the question. ultimately i just want a really simple class that can easily be serialized to json for storage in redis
cpruitt has joined #ruby
dkamioka has joined #ruby
kaspergrubbe has joined #ruby
m0s has joined #ruby
andy__ has joined #ruby
cpruitt has quit [Client Quit]
brain_shim has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
pimpthink has quit [Quit: leaving]
cpruitt has joined #ruby
TigerWolf has joined #ruby
nateberkopec has joined #ruby
cpruitt has quit [Client Quit]
<havenwood>
thoraxe: maybe pasting more code would help. what i'm curious about is how you mean to use the params you assign here: self.public_send("#{attr}=", value)
jmarbach has joined #ruby
cpruitt has joined #ruby
samuel02 has joined #ruby
<havenwood>
thoraxe: consider using `@id.nil?` instead of `@id == nil`
<thoraxe>
havenwood: not sure i understand the question -- how would you "use" params normally? foo.param1, foo.param2 ?
cpruitt has quit [Client Quit]
no6 has quit [Ping timeout: 265 seconds]
trhodes_ has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
kbarry has quit [Ping timeout: 245 seconds]
incade has quit [Quit: incade]
mehlah has quit [Quit: Leaving...]
<postmodern>
is there such a thing as String#rsplit
robustus has quit [Ping timeout: 252 seconds]
SidWu has joined #ruby
SidWu has quit [Max SendQ exceeded]
hakunin_ is now known as hakunin
dcope has quit [Ping timeout: 264 seconds]
sleepee has joined #ruby
trhodes_ has joined #ruby
jason__ has quit [Remote host closed the connection]
lyanchih_ has joined #ruby
jason__ has joined #ruby
robustus has joined #ruby
<shevy>
postmodern no but perhaps you can .reverse the string first
mansi has quit [Remote host closed the connection]
<havenwood>
thoraxe: i was just confused as to your intention, i'm slow on the uptake this evening. i'd have expected you to set the instance variable.
lukec has quit [Quit: lukec]
n1tr0g has joined #ruby
necrotic_ has joined #ruby
necrotic_ has quit [Remote host closed the connection]
<Danny_Joris>
I have two versions of Ruby on my Mac. How do I get rid of this?
<Danny_Joris>
jekyll is in version 1.8 , but I also have 2.x it seems..
<Nilium>
Might just want to set up a ruby environment thing like chruby or rbenv.
<Nilium>
Or use bundler, I guess. I admittedly don't use it for anything.
<havenwood>
or install Ruby to /usr/local with ruby-install
mikepack has joined #ruby
<wallerdev>
or install a virtual machine and run ruby from that
funktor has joined #ruby
<Nilium>
Or build a virtual machine so you have absolute control
Kam_ has joined #ruby
<Nilium>
Then you can implement special ruby-specific instructions at the VM level
geopet has quit []
<Danny_Joris>
havenwood: thanks! removing that way worked. Now installing it again throws this error: http://pastebin.com/aN1yHhVf
<wallerdev>
gcc :(
monkegjinni has joined #ruby
<havenwood>
Danny_Joris: You'll need command line tools to build C-extensions. Grab latest Xcode then run: xcode-select --install
Voodoofish430 has quit [Quit: Leaving.]
<Danny_Joris>
havenwood: I did that earlier. xcode-select --install trows an error saying that it’s not available. I did install it by going into the apple developer site and downloading it manually
<havenwood>
Danny_Joris: Do you have Xcode installed?
echevemaster has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
brain_shim has quit [Ping timeout: 246 seconds]
danshultz has joined #ruby
<havenwood>
Danny_Joris: Setting up a brew install of Ruby, ruby-install to /usr/local, or ruby-install/chruby, ruby-build/rbenv, or RVM are all options for getting Ruby 2.1.1 and leaving the OS X system Ruby issues behind.
yacks has joined #ruby
LostDatagram has joined #ruby
papercode has quit [Quit: WeeChat 0.4.4-dev]
Es0teric has quit [Ping timeout: 252 seconds]
<Danny_Joris>
havenwood: jekyll seems to be installed correctly now using archflags. (it seems like I’d need to use that approach for every gem install)
p4tuxx has joined #ruby
<havenwood>
Danny_Joris: wallerdev nailed that one ;)
<Danny_Joris>
yes brew or rvm might be a better way
p4tux has quit [Read error: Connection reset by peer]
shutchie has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
cpruitt has joined #ruby
elaptics`away has quit [Ping timeout: 268 seconds]
<havenwood>
Danny_Joris: if you had problems with brew you likely just didn't update your PATH with something like this in your .bashrc: export PATH=$(brew --prefix ruby)/bin:$PATH
Es0teric has joined #ruby
BuSerD has quit [Ping timeout: 265 seconds]
sdouglas has joined #ruby
danshultz has quit [Ping timeout: 265 seconds]
sdouglas has quit [Remote host closed the connection]
RaptorJesus has quit [Remote host closed the connection]
rh1n0 has joined #ruby
charliesome has joined #ruby
sputnik13 has joined #ruby
elaptics`away has joined #ruby
RaptorJesus has joined #ruby
teddyp1cker has joined #ruby
mikepack_ has joined #ruby
BuSerD has joined #ruby
<Danny_Joris>
havenwood: thanks, added that now
<Danny_Joris>
trying to install jekyll under ruby installed with brew
<Danny_Joris>
and it seems to work
<Danny_Joris>
json too
<Danny_Joris>
w00t !
<Danny_Joris>
havenwood & wallerdev : Thank you so much!!! :)
<Danny_Joris>
havenwood++
mikepack has quit [Ping timeout: 240 seconds]
Ca11yWally has quit [Ping timeout: 240 seconds]
tacos1de has quit [Ping timeout: 265 seconds]
sdwrage has quit [Quit: Leaving]
zarul[afk] has joined #ruby
<Danny_Joris>
wallerdev++
Brando753 has quit [Ping timeout: 255 seconds]
wallerdev is now known as wallerdev2
boombadaroomba has quit [Ping timeout: 240 seconds]
sumark has quit [Ping timeout: 240 seconds]
end_guy has quit [Ping timeout: 265 seconds]
matcouto has quit [Ping timeout: 268 seconds]
nuba has quit [Ping timeout: 268 seconds]
Solnse has quit [Ping timeout: 240 seconds]
snath has quit [Ping timeout: 246 seconds]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
nuba has joined #ruby
tacos1de has joined #ruby
CaptainJet has joined #ruby
<wallerdev2>
anyway
<wallerdev2>
have a good night, time for me to go home :p
teddyp1cker has quit [Ping timeout: 264 seconds]
end_guy has joined #ruby
wallerdev2 has quit [Quit: wallerdev2]
toastynerd has joined #ruby
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
jgoss has joined #ruby
jgoss has joined #ruby
felipecvo has joined #ruby
toastynerd has quit [Remote host closed the connection]
Brando753 has joined #ruby
sumark has joined #ruby
koowgnojeel has joined #ruby
armyriad has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
koowgnojeel has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Abyss__ has joined #ruby
mansi has joined #ruby
hamakn_ has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
nisstyre has quit [Ping timeout: 264 seconds]
toastynerd has joined #ruby
gancl has joined #ruby
dkamioka has quit [Remote host closed the connection]
Rober9393 has quit [Quit: Computer has gone to sleep.]
Ca11yWally has joined #ruby
beneggett has joined #ruby
zarul[afk] has quit [Quit: Leaving]
mikepack_ has quit [Remote host closed the connection]
mikepack has joined #ruby
boombadaroomba has joined #ruby
mikepack_ has joined #ruby
Cache_Money has joined #ruby
sambao21 has joined #ruby
agrinb has joined #ruby
Solnse has joined #ruby
freezey has joined #ruby
<benzrf>
yo
spicerack has joined #ruby
sambao21 has quit [Client Quit]
<benzrf>
is there a hook for overriding of constant assignment?
<benzrf>
and method declaration?
freezey has quit [Remote host closed the connection]
jason__ has quit [Remote host closed the connection]
jason__ has joined #ruby
<centrx>
Sounds like you are ready to switch to LISP.
mikepack_ has quit [Read error: Connection reset by peer]
funburn has joined #ruby
mikepack_ has joined #ruby
jason____ has joined #ruby
mikepack_ has quit [Client Quit]
<benzrf>
haha
<benzrf>
it's for quick
<benzrf>
i want it to log what you've defined so that you can export it later
agrinb has quit [Ping timeout: 252 seconds]
<benzrf>
and also view it in the fs
<benzrf>
the idea being that if you open pry and define a method, it should appear as an editable file
<benzrf>
but i'd need a hook to get the code content
<benzrf>
:I
incade_ has joined #ruby
joshsmith has quit [Quit: joshsmith]
matcouto has joined #ruby
mikepack_ has joined #ruby
<benzrf>
hmm, maybe i can hook into pry instead.
<benzrf>
or maybe not o-o
<benzrf>
that seems like a brittle solution
jason__ has quit [Ping timeout: 264 seconds]
whomp has joined #ruby
lukec has quit [Quit: lukec]
lukec has joined #ruby
sambao21 has joined #ruby
lukec has quit [Client Quit]
lethjakman has quit [Ping timeout: 268 seconds]
coderxin has joined #ruby
mikepack has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 252 seconds]
hfp is now known as hfp`away
hfp`away is now known as hfp
Lewix has joined #ruby
hfp is now known as hfp`away
patrick99e99 has joined #ruby
<boombadaroomba>
is there a RAILS channel?
whomp has quit [Ping timeout: 240 seconds]
<benzrf>
#rails
aspires has quit []
<benzrf>
#rubyonrails actually, but #rails forwards to it
yfeldblum has quit [Remote host closed the connection]
marcdel has joined #ruby
<boombadaroomba>
invite only
coderxin has quit [Ping timeout: 264 seconds]
Spami has quit [Quit: This computer has gone to sleep]
<benzrf>
neh?
agarie has quit [Quit: Leaving...]
<havenwood>
boombadaroomba: just register your nick
<boombadaroomba>
how to do?
<boombadaroomba>
Havent used IRC since 95
toastynerd has quit [Remote host closed the connection]
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
etqqkoiflwhb has joined #ruby
timonv has quit [Remote host closed the connection]
m0s^away is now known as m0s
Speed has joined #ruby
rahult has quit [Client Quit]
monkegjinni has joined #ruby
blackmes1 has quit [Ping timeout: 268 seconds]
pliu219 has joined #ruby
timonv has joined #ruby
etqqkoiflwhb has quit [Ping timeout: 252 seconds]
camilasa_ has quit [Remote host closed the connection]
camilasan has joined #ruby
lkba has joined #ruby
mengu has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
rahult has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
roberto_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
mostlybadfly has joined #ruby
Advocation has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
fabrice31 has quit [Remote host closed the connection]
gregf_ has joined #ruby
_justin has quit [Quit: _justin]
roberto_ is now known as maculai
coderxin has joined #ruby
red234324 has quit [Remote host closed the connection]
tgkokk has joined #ruby
sski has joined #ruby
gancl has joined #ruby
Advocation has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
maculai has quit [Quit: Saliendo]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
bambuka has joined #ruby
twiceaday has quit [Ping timeout: 264 seconds]
twiceaday has joined #ruby
mrnugget has quit [Quit: mrnugget]
razibog has joined #ruby
danshultz has joined #ruby
S0da has quit [Remote host closed the connection]
fabrice31 has joined #ruby
end_guy has quit [Remote host closed the connection]
end_guy has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
tgkokk has quit [Ping timeout: 252 seconds]
tgkokk has joined #ruby
Advocation has joined #ruby
sparrovv has joined #ruby
razibog has quit [Quit: Leaving.]
rahult is now known as rahult_
jottr has joined #ruby
jason___ has joined #ruby
dzhulk has quit [Quit: Leaving.]
hermanmunster has joined #ruby
ndrei has quit [Ping timeout: 268 seconds]
tgkokk has quit [Ping timeout: 252 seconds]
boboc has joined #ruby
LexicalScope has quit [Read error: Connection reset by peer]
mrnugget has joined #ruby
nari has quit [Ping timeout: 264 seconds]
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
n1tr0g has joined #ruby
danshult_ has joined #ruby
gancl has quit [Ping timeout: 265 seconds]
gaussblurinc has quit [Quit: Leaving.]
roolo has quit [Quit: Leaving...]
gaussblurinc has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
sski has quit [Remote host closed the connection]
skammer has quit [Ping timeout: 264 seconds]
sski has joined #ruby
bradhe has joined #ruby
Lewix has joined #ruby
Loaft has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
francois_ has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
nfk has joined #ruby
bradhe has joined #ruby
nateberkopec has joined #ruby
patrick99e99 has quit [Ping timeout: 252 seconds]
razibog has joined #ruby
samuel02 has quit [Remote host closed the connection]
danshult_ has quit [Remote host closed the connection]
rahult_ is now known as rahult
Hanmac1 has quit [Ping timeout: 252 seconds]
samuel02 has joined #ruby
danshultz has joined #ruby
jmarbach has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
jason___ has quit [Remote host closed the connection]
jmarbach has quit [Remote host closed the connection]
_justin has joined #ruby
gancl has joined #ruby
jason___ has joined #ruby
Advocation has quit [Quit: Advocation]
bradhe has quit [Ping timeout: 265 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
cover has joined #ruby
Danny_Joris has joined #ruby
jkamenik has joined #ruby
nvrch has quit [Quit: nvrch]
samuel02 has quit [Ping timeout: 240 seconds]
r0nin has joined #ruby
NovapaX has joined #ruby
danshultz has quit [Ping timeout: 265 seconds]
antihero has joined #ruby
skammer has joined #ruby
skammer has quit [Max SendQ exceeded]
<antihero>
I'm trying to install stuff with rubygems. If I do gem install, I get cannot write to /usr/lib/... which makes sense, but if I do sudo gem install, it tries to install it to /root/.gem
<antihero>
which is like
<antihero>
wat
jason___ has quit [Ping timeout: 264 seconds]
<apeiros>
sounds like you borked your ruby installation to begin with
shredding has quit [Quit: shredding]
<antihero>
I installed it with pacman
francois_ has quit [Quit: Leaving]
francois_ has joined #ruby
<apeiros>
I'd ask in pacman related channels then
<apeiros>
it sounds as if you installed a user installation in /usr/lib
ndrei has joined #ruby
<crome>
pacman <o>
r0nin has quit [Ping timeout: 265 seconds]
<apeiros>
pacman… C • • •
<crome>
that kind of pacman is alright
rahult is now known as rahult_
francois_ has quit [Client Quit]
Hanmac has quit [Quit: Leaving.]
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
freggles has quit [Remote host closed the connection]
sparrovv has quit [Remote host closed the connection]
ndrei has joined #ruby
sparrovv has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
hamakn has quit [Remote host closed the connection]
nari has joined #ruby
monkegjinni has joined #ruby
TuxLyn has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
pu22l3r_ has quit [Ping timeout: 240 seconds]
jxport has quit [Read error: Operation timed out]
kwertie has quit [Read error: Operation timed out]
eregon has quit [Read error: Operation timed out]
jxport has joined #ruby
kwertie has joined #ruby
mark_locklear has joined #ruby
patronus_ has joined #ruby
tgkokk has quit [Ping timeout: 265 seconds]
monsieur1 has joined #ruby
eregon has joined #ruby
monsieurp has quit [Read error: Operation timed out]
Sawbones has joined #ruby
jibi has quit [Read error: Operation timed out]
alk_ has quit [Read error: Operation timed out]
tkuchiki_ has joined #ruby
alk_ has joined #ruby
bradhe has joined #ruby
<TuxLyn>
Hello, is it possible to do something like this in ruby > (PHP) for ($i=1; $i<=10; $i++) { echo $i; }
jibi has joined #ruby
sparrovv has quit [Ping timeout: 268 seconds]
patronus has quit [Ping timeout: 252 seconds]
<jhass>
1.upto(10) {|i| print i }
<TuxLyn>
I know you can do something like; (RUBY) for i in 1..10 do puts i end but its not the same, because when you want to reverse that it wont work :)
sski has quit [Remote host closed the connection]
<jhass>
10.downto(1) {|i| print i }
sski has joined #ruby
<TuxLyn>
example in reverse in (PHP) for ($i=10; $i>=1; $i--)
<TuxLyn>
jhass, is that the same ?
<TuxLyn>
let me try :)
<jhass>
;)
momomomomo has joined #ruby
Advocation has quit [Quit: Advocation]
tkuchiki has quit [Ping timeout: 246 seconds]
<TuxLyn>
jhass, ok how will this be in block ?
<jhass>
hm?
<TuxLyn>
jhass, like into 3 lines :)
<jhass>
1.upto(10) do |i|
<jhass>
print i
<jhass>
end
<TuxLyn>
thank you :)
gancl has quit [Ping timeout: 240 seconds]
<TuxLyn>
jhass, yeah this is what I was looking for :) any other way to do this ?
bradhe has quit [Ping timeout: 246 seconds]
<jhass>
a couple, no superior IMO
<jhass>
(1..10).each / (10..1).each is a common one (actually not sure if the last one works)
yacks has quit [Ping timeout: 252 seconds]
Beoran_ has joined #ruby
<TuxLyn>
so you think this is the best way to convert (PHP) function like I showed above ?
sski has quit [Ping timeout: 246 seconds]
<jhass>
don't convert code to ruby from php
<DefV>
don't convert PHP code to ruby
<jhass>
write new code with the same functionality
<DefV>
indeed
<DefV>
and cover it with tests while you're at it
nateberkopec has joined #ruby
<TuxLyn>
jhass, last one dont work
yfeldblum has joined #ruby
<TuxLyn>
jhass, thanks
_justin has joined #ruby
tgkokk has joined #ruby
oneawayman has joined #ruby
Advocation has joined #ruby
<TuxLyn>
jhass, oh one more thing is it possible to do this with vars ? like instead of defining static numbers.
<TuxLyn>
lolmaus_, long ass one-lines are just stupid :)
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Advocation has quit [Client Quit]
<TuxLyn>
no offance :)
<lolmaus_>
TuxLyn: i'm struggling to compose a question as short as possible, hold on. I'm not doing code golf in real life projects.
<jhass>
yeah, no benefit over hash = {id: 'foo'}; hash[:title] = "#{hash[:id].capitalize}."
<TuxLyn>
jhass, has the best answers so far :-)
einarj has quit [Remote host closed the connection]
jollyy has quit [Quit: jollyy]
sambao21 has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
<lolmaus_>
I'm doing this: `{}.tap { |hash| hash[:id] = 'foo'; hash[:title] = hash[:id].capitalize + '.' }`. I wonder whether there's a way to do the same with the literal syntax? something like: `{ id: 'foo', title: self.capitalize + '.'}`.
<jhass>
I already wrote what I think you should be doing
<lolmaus_>
jhass: i know that self wouldn't work, but there might be another reserved word or something.
<jhass>
ruby has very few reserved words (compared to other languages)
sambao21 has quit [Client Quit]
<TuxLyn>
so now I can do something like > ended.downto(start) or start.upto(start) :D very cool.
<TuxLyn>
sorry 2nd one is > start.upto(ended)
benzrf is now known as benzrf|offline
benzrf|offline is now known as benzrf
xcv has quit [Remote host closed the connection]
armyriad has quit [Ping timeout: 246 seconds]
samuel02 has quit []
<lolmaus_>
jhass: i hate to create ad hoc variables when they are used only once, especially when you define half of the hash with a literal and the other half with assignments. The tap approach looks cleaner to me. But at the same time it's bulkier, so i crave for being able to access a literal from itself.
benzrf is now known as benzrf|offline
dumdedum_ has quit [Quit: foo]
withnale_ has joined #ruby
<jhass>
well, in a realworld example I'd expect, def to_h; {id: id, title: "#{id.capitalize}." }; end
<jhass>
or s/id/@id/
Danny_Joris has left #ruby [#ruby]
afreidah1 has joined #ruby
Advocation has joined #ruby
<jhass>
or id passed as parameter to the method building the hash
afreidah has quit [Ping timeout: 246 seconds]
poguez__ has joined #ruby
jcs222_ has joined #ruby
sparrovv has joined #ruby
Photism_ has joined #ruby
Photism has quit [Read error: Connection reset by peer]
mjmac has quit [Ping timeout: 265 seconds]
withnale has quit [Quit: No Ping reply in 180 seconds.]
tvw has quit [Remote host closed the connection]
poguez_ has quit [Ping timeout: 265 seconds]
twiceaday has quit [Remote host closed the connection]
artgoeshere has quit [Ping timeout: 265 seconds]
jcs222 has quit [Ping timeout: 265 seconds]
Abyss__ has quit [Ping timeout: 265 seconds]
mjmac has joined #ruby
jackneill has quit [Ping timeout: 265 seconds]
poguez__ is now known as poguez_
Alina-malina has quit [Read error: Connection reset by peer]
artgoeshere has joined #ruby
sparrovv has quit [Remote host closed the connection]
sparrovv has joined #ruby
benzrf|offline is now known as benzrf
Bumptious has quit [Ping timeout: 255 seconds]
afreidah2 has joined #ruby
twiceaday has joined #ruby
Alina-malina has joined #ruby
lolmaus_ has quit [Remote host closed the connection]
lolmaus has joined #ruby
gancl has joined #ruby
<lolmaus>
jhass: i mean, any Ruby expression returns a value. When all you need is to return a new object, why put it into a variable?
jmarbach has joined #ruby
afreidah1 has quit [Ping timeout: 240 seconds]
larissa has joined #ruby
xjiujiu has joined #ruby
jason___ has joined #ruby
<TuxLyn>
Does anyone know if CURB is complete wrapper for CURL ?
<workmad3>
lolmaus: readability?
<jhass>
it can be useful to build it up. as I said I think it's a rare case that you have a static value that you assign to a datastructure and then want to do operations on it
klaut has quit [Remote host closed the connection]
<jhass>
instead you rather have that value available as parameter / method / variable
<jhass>
and then as well can use that reference multiple times
kukyakya has quit [Remote host closed the connection]
soulcake has quit [Read error: Connection reset by peer]
PlxAnswer has quit [Killed (idoru (Spam is off topic on freenode.))]
kukyakya has joined #ruby
dzhulk has left #ruby [#ruby]
soulcake has joined #ruby
coderxin has quit [Remote host closed the connection]
andy___ has joined #ruby
sailias has joined #ruby
m0s^away is now known as m0s
sailias has quit [Client Quit]
andy___ is now known as Guest55922
sailias has joined #ruby
bambuka has quit [Quit: Saliendo]
ahawkins has quit [Quit: leaving]
ahawkins has joined #ruby
ahawkins has quit [Client Quit]
havenwood has quit [Remote host closed the connection]
<TuxLyn>
I wonder why there is no CURL wrapper in stdlib ^_^ It's one of the most advanced tools.
havenwood has joined #ruby
ezelohar has quit [Ping timeout: 252 seconds]
ahawkins has joined #ruby
jmarbach has joined #ruby
Guest55922 has quit [Ping timeout: 246 seconds]
senayar_ has quit [Remote host closed the connection]
senayar has joined #ruby
gancl has quit [Ping timeout: 265 seconds]
brain_shim has joined #ruby
felipecv_ has joined #ruby
jmarbach has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 246 seconds]
felipecvo has quit [Read error: Connection reset by peer]
fieldfirst has quit [Ping timeout: 268 seconds]
m0s is now known as m0s^away
TuxLyn has quit [Quit: Leaving]
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
chris_thomson has joined #ruby
inkblots has joined #ruby
jason___ has quit [Remote host closed the connection]
jackneill has joined #ruby
coderxin has joined #ruby
jason___ has joined #ruby
gancl has joined #ruby
tkuchiki has quit [Ping timeout: 268 seconds]
felipecvo has joined #ruby
felipecv_ has quit [Ping timeout: 264 seconds]
brain_shim has quit [Ping timeout: 265 seconds]
armyriad has joined #ruby
dik_dak has joined #ruby
dEPy has joined #ruby
chris_thomson has quit [Quit: Zzz...]
TigerWolf has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jason___ has quit [Ping timeout: 264 seconds]
larissa has quit [Quit: Leaving]
mansi has joined #ruby
_tpavel has joined #ruby
thomasxie has joined #ruby
felipecvo has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
Advocation has quit [Quit: Advocation]
bradhe has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
IceDragon has joined #ruby
sski has joined #ruby
felipecvo has joined #ruby
Advocation has joined #ruby
browndawg has quit [Remote host closed the connection]
trhodes_ has quit [Ping timeout: 255 seconds]
pliu219 has joined #ruby
Vovko has joined #ruby
pliu219 has quit [Max SendQ exceeded]
Lewix has quit [Remote host closed the connection]
pliu219 has joined #ruby
pliu219 has quit [Max SendQ exceeded]
browndawg has joined #ruby
eka has joined #ruby
jollyy has joined #ruby
felipecv_ has joined #ruby
monkegjinni has quit [Remote host closed the connection]
r0nin has joined #ruby
bradhe has quit [Ping timeout: 268 seconds]
monkegjinni has joined #ruby
zachallett has joined #ruby
hfp`away is now known as hfp
trhodes_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
SrRaven-work has joined #ruby
monkegjinni has joined #ruby
dekz__ has quit [Quit: Connection closed for inactivity]
<SrRaven-work>
Hey, I have Ruby 1.9.3p545 and want to install Rake, but rake says it cant because it needs Ruby >=1.9. Which I obviously have installed, any idea ? CentOS is the OS
atno has quit [Read error: Connection reset by peer]
felipecvo has quit [Ping timeout: 268 seconds]
atno has joined #ruby
rjhunter has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pfg has joined #ruby
mansi has quit [Quit: Leaving...]
workmad3 has quit [Quit: leaving]
tkuchiki has joined #ruby
rudisimo has joined #ruby
felipecv_ has quit [Ping timeout: 265 seconds]
felipecvo has joined #ruby
razibog has joined #ruby
Sawbones has quit []
monkegjinni has quit [Remote host closed the connection]
cpruitt has joined #ruby
rvraghav93 has quit [Ping timeout: 240 seconds]
ctp has joined #ruby
monkegjinni has joined #ruby
sk87 has joined #ruby
keen______ is now known as keen_
einarj has joined #ruby
ctp has quit [Client Quit]
yacks has joined #ruby
MattStratton has joined #ruby
scottj has left #ruby [#ruby]
einarj has quit [Remote host closed the connection]
<havenwood>
SrRaven-work: looks like 1.8 and 1.9.3 are being equivocated between
<SrRaven-work>
...whaa?
_justin has quit [Quit: _justin]
<havenwood>
SrRaven-work: Check?: which gem
himsin has quit [Quit: himsin]
<SrRaven-work>
gives me /usr/local/bin/gem
S0da has quit [Remote host closed the connection]
<Takumo>
Hi, in rake is it possible to suppress normal output?
jollyy has joined #ruby
_justin has joined #ruby
<Takumo>
I want to silence the output from `sh` and `cp` etc, and just use a Logger to create a build log
blackmes1 has quit [Read error: Operation timed out]
skaflem has joined #ruby
<havenwood>
SrRaven-work: Looks like maybe an RVM Ruby miss-paired with a system RubyGems? Did you do a `sudo` RVM install or something I wonder.
<SrRaven-work>
yes I had to,otherwise it wouldnt work
<SrRaven-work>
dont ask me why
tonni has joined #ruby
jason___ has joined #ruby
jason___ has quit [Remote host closed the connection]
paulfm has quit []
jottr has quit [Ping timeout: 240 seconds]
<havenwood>
SrRaven-work: I'm not an RVM user, but #rvm may have advice for the best way forward. Curious what you'd get for?: RAILS_ENV=production sudo rake tarantula:install --trace
jason___ has joined #ruby
Celm has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<bilbo_swaggins>
"Programming is terrible; lessons from a life wasted"
jason____ has quit [Ping timeout: 246 seconds]
<banister>
benzrf it was a joke, untwist your panties.
bufferloss has quit [Quit: bufferloss]
<shlant>
banister: yea hide the racism under the thin vail of "it was a joke"
<benzrf>
>tfw banister is a shithead
<benzrf>
shlant: *veil
<benzrf>
;p
abdulsattar has quit [Ping timeout: 240 seconds]
andy___ has joined #ruby
<banister>
shlant i'm a jew myself, it's a common, stupid expression we say among my friends. I apologize from the bottom of my heart if you were offended.
Speed has quit [Ping timeout: 264 seconds]
<alex88>
I've to create an hash like home_team: { some_values: int }, away_team: { some_values: int }, players: { int: { soome_values: int }, int2... } what I've actually is for example "stats['home_team']['yellow_cards'] += 1" and "stats['players'][player_id]['corners'] += 1" but obviously I should check if the value or even the player_id key exists first, should I create a method to set these values or is there an Hash/Struct way to set values and auto c
<alex88>
reate parent keys if they don't exists?
andy___ is now known as Guest82966
<shevy>
man alex88
<shevy>
that was one of the longest sentences here
<alex88>
wops :D
camilasan has quit []
<catphish>
bilbo_swaggins: nice talk :)
cburyta has joined #ruby
<catphish>
"people who are wrong on the internet" :)
<benzrf>
kk
<shevy>
alex88 yes, work with methods - it's what I would use
<benzrf>
banister: the basic idea there is
<benzrf>
banister: modules form dirs
<alex88>
shevy: thanks for reading the long one ;)
<shevy>
the method names can be logical enough so that you never have to worry again about how you store it internally
<benzrf>
banister: methods form files
<shevy>
I dont like hash like this though: stats['players'][player_id]['corners']
<benzrf>
banister: so I mounted Object to the dir 'quick_test'
<alex88>
shevy: well it's just to create some data to be serialized to json
<shevy>
but once it gets as complicated as that, using methods is much better
<benzrf>
then when i cd in, it has all of the constants in Object as subdirs
<shevy>
ewwww
<shevy>
json
<shevy>
one way to bind them
<shevy>
one way to rule them all
<bilbo_swaggins>
shevy, look into ostructs
<shevy>
and in the darkness ... SEND OVER INTO XML HELL
freezey has joined #ruby
<bilbo_swaggins>
they're midway between an object and a hash
<shevy>
hmm bilbo_swaggins
<benzrf>
banister: so i made a class Foo
<bilbo_swaggins>
you can redefine methods on them with ease
shlant has left #ruby [#ruby]
monkegjinni has joined #ruby
<shevy>
isn't that a lord of the ring dude
bradhe has quit [Remote host closed the connection]
<benzrf>
banister: cd'd into it
<shevy>
I remember you said something funny not long ago
<benzrf>
banister: touched the file-method hash on foo to add a bar method
<bilbo_swaggins>
I say lots of funny things
<benzrf>
banister: this creates a 'bar.rb' file in quick_test/Foo/
<alex88>
shevy: hahah never xml, never!
<benzrf>
banister: i edit it to have a definition for bar
<benzrf>
whenever i save, if the file contains valid syntax and nothing but a definition for a bar method, it will load it into the class
senayar has quit [Remote host closed the connection]
<benzrf>
otherwise it holds onto the current code but does not load it
Guest33272 has quit [Ping timeout: 268 seconds]
<benzrf>
i also started a remote pry server in another thread before mounting the dir
<benzrf>
so i pried into the process, and tested out the code I was writing in bar.rb
browndawg has left #ruby [#ruby]
bynaryshef has quit []
Guest82966 has quit [Ping timeout: 240 seconds]
napcae has quit [Quit: leaving]
<benzrf>
itf you'll be able to create the bar.rb file by typing 'quick def bar' or something
patrick99e99 has joined #ruby
napcae has joined #ruby
<benzrf>
instead of manually touching the method hash thingy
<banister>
benzrf cool
m0s is now known as m0s^away
<benzrf>
=o
<benzrf>
you can probably try it on your end
<benzrf>
it's not using dmtcp at all yet
invinceable has joined #ruby
<benzrf>
if you can get FUSE for mac it should work great
kevind has quit [Quit: kevind]
w1zeman1p has joined #ruby
sk87 has joined #ruby
QuintinAdam has joined #ruby
Es0teric_ has quit [Quit: Computer has gone to sleep.]
redlines has joined #ruby
senayar has joined #ruby
sdouglas has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
echevemaster has joined #ruby
patrick99e99 has quit [Ping timeout: 268 seconds]
jollyy has quit [Quit: jollyy]
quatron has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
notjohn has quit [Quit: notjohn]
DrShoggoth has joined #ruby
kevind has joined #ruby
andy__ has joined #ruby
cj__ has joined #ruby
dgaffney has joined #ruby
mercwithamouth has joined #ruby
rezzack has joined #ruby
bradhe has joined #ruby
whomp has joined #ruby
Spami has joined #ruby
roolo has quit [Ping timeout: 252 seconds]
<alex88>
shevy: building the stats object using { home_team: {}, away_team: {}, players: {} } I can do the method like "if @stats[(team + '_team').to_sym][stat.to_sym].nil?; define it; end; increase it" but it creates symbols
<alex88>
in memory
<shevy>
I dont know
Es0teric has joined #ruby
<shevy>
it looks so ugly that I can not get my head over it
sailias has quit [Ping timeout: 246 seconds]
<benzrf>
>tfw cant see shevy's chats
<alex88>
eheh what would you do? create classes?
yfeldblum has joined #ruby
<benzrf>
feelsgoodman
aspires has quit []
bluenemo has quit [Remote host closed the connection]
agrinb has joined #ruby
jollyy has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
dunno, I don't have the whole problem at hand, but before I'd use such a hash, I'd simplify
<shevy>
having to use to_sym twice, and then querying whether it is nil, seems so weird
lmickh has quit [Remote host closed the connection]
<bilbo_swaggins>
alright I'm at work, but I'll take a look as I can
<bilbo_swaggins>
I may be in and out
tyfighter has joined #ruby
tyfighter has quit [Client Quit]
smathieu has joined #ruby
<alex88>
thanks guys!
tyfighter has joined #ruby
<Tachoh>
bilbo_swaggins: haha that nickname
momomomomo has quit [Quit: momomomomo]
<brain_shim>
so you're making a statemachine using ternary operators inside of a case statement?
yfeldblum has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
Dude007 has joined #ruby
<Dude007>
Hi, I just wanna ask. If call validates_presence_of :some_attribute in rails, does it call class method or an instance method?
tkuchiki has quit [Remote host closed the connection]
monkegji_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
<w1zeman1p>
Dude007: instance method
kpshek has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
<bilbo_swaggins>
alex88: can you also post an example list of events?
<alex88>
brain_shim: well forget the ternary operators, I'm going to remove them
<alex88>
bilbo_swaggins: I don't have a complete one, basically { event_type: 'CORNER|SHOT|something else', team_id: int, outcome: 'other text', player_id: int }
apeiros has joined #ruby
ahawkins has joined #ruby
<alex88>
I've just to loop through them and based on each type and team/player increase the value of the stat
<bilbo_swaggins>
alright
saarinen has joined #ruby
lukec has quit [Quit: lukec]
<bilbo_swaggins>
You're getting damn close to being better off with objects
sambao21 has joined #ruby
wallerdev has joined #ruby
<bilbo_swaggins>
Let me critique style and offer suggestions for functionality
<alex88>
create an object for each teams and players?
<alex88>
sure
CreativeEmbassy has quit [Quit: FO SHO]
<bilbo_swaggins>
yeah but hold up
nateberkopec has joined #ruby
<alex88>
sure
wallerdev has quit [Client Quit]
<bilbo_swaggins>
I'd do that and call player.print, for example
wallerdev has joined #ruby
saarinen has quit [Client Quit]
cover has quit [Ping timeout: 264 seconds]
<bilbo_swaggins>
let me make sure I grok this totally, but you could separate your concerns here
momomomomo has joined #ruby
<wallerdev>
good morning :)
<benzrf>
sup wallerdev
<benzrf>
are u on gnu/linux o3o
<wallerdev>
not much, just got to work
saarinen has joined #ruby
<wallerdev>
going bowling today with my team
<Dude007>
w1zeman1p: How it is implemented then? I am trying something like this: http://hastebin.com/yuwifoxiwa.rb but when I call the come_on_test "Hello world" in same way as validates_presence_of .. it says that the method is not defined
abra has joined #ruby
<wallerdev>
you?
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf>
ok u know what im unignoring shevy just so i dont get confused as to who is talking
<benzrf>
but shevy im totally gonna ignore u in my MIND
ahawkins has quit [Ping timeout: 246 seconds]
<benzrf>
bbl
benzrf is now known as benzrf|offline
<shevy>
benzrf|offline <3
segmond has quit [Ping timeout: 268 seconds]
Chronocity has joined #ruby
aspires has quit []
michaeldeol has joined #ruby
<brain_shim>
alex88: There's a great 5 minute video about refactoring out conditionals, and if you apply this pattern it'll make your case quite a bit easier to read. https://www.youtube.com/watch?v=7K1jB7fTmXQ
deadlock has joined #ruby
<Dude007>
w1zeman1p: class method.........
alexju has quit [Remote host closed the connection]
mad_hatter has joined #ruby
MrThePlague has joined #ruby
CaptainJet has joined #ruby
aspires has joined #ruby
toastynerd has quit [Remote host closed the connection]
<mad_hatter>
hey guys
<alex88>
thanks a lot brain_shim, going through it!
osvico has quit [Ping timeout: 240 seconds]
<mad_hatter>
I'm really excited to learn ruby
<mad_hatter>
what are the best places to start
<shevy>
here
<bilbo_swaggins>
tryruby.com
<mad_hatter>
I have a background in Perl and Java
<bilbo_swaggins>
ruby.learncodethehardway.com
<shevy>
well from perl to ruby is quite the same
MrThePlague has left #ruby [#ruby]
<bilbo_swaggins>
then skip the first one
<bilbo_swaggins>
rubydoc.com
<workmad3>
mad_hatter: install ruby, type 'irb' and then start playing
<brain_shim>
alex88: My pleasure! Also, maybe checkout aasm -> https://github.com/aasm/aasm It looks a lot like you're trying to make a statemachine, and they have a really slick dsl for that.
<wallerdev>
instead of using irb you can just use the bot in this chatroom, just type >> your_ruby_code_here
kennym has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
<bilbo_swaggins>
mad_hatter: pardon ruby-doc.org
<alex88>
brain_shim: you think I really need that in this case? I mean, I see the case I'm actually using very simple
<bilbo_swaggins>
and ruby.learncodethehardway.com
JBreit has joined #ruby
<alex88>
I could just use that for settings which stats to increase, then use the ternary operator just one time
andikr has quit [Read error: Connection reset by peer]
blahblah has joined #ruby
JBreit has quit [Max SendQ exceeded]
abdulsattar has joined #ruby
JBreit has joined #ruby
danno2 has joined #ruby
toastynerd has joined #ruby
cover has joined #ruby
Dude007 has quit []
jason__ has joined #ruby
<brain_shim>
alex88: Maybe aasm is pushing it, but if your thing get's more complicated, it's worth knowing about. But replacing your conditionals with the pattern in the video is definitely a win in my books.
chrisseaton has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
danno1 has quit [Ping timeout: 240 seconds]
poikon has joined #ruby
jespada has joined #ruby
SHyx0rmZ has joined #ruby
andrewlio has joined #ruby
eka has quit [Ping timeout: 240 seconds]
kpshek has joined #ruby
mikepack_ has quit [Remote host closed the connection]
mikepack has joined #ruby
xcv_ has joined #ruby
nvrch has quit [Quit: nvrch]
dangerousdave has joined #ruby
poikon_ has quit [Ping timeout: 268 seconds]
xcv has quit [Read error: Connection reset by peer]
DaniG2k has quit [Quit: leaving]
tylersmith has joined #ruby
andy__ has quit [Read error: Connection reset by peer]
Spami has quit [Ping timeout: 265 seconds]
eka has joined #ruby
Spami has joined #ruby
Lewix has joined #ruby
no6 has joined #ruby
Es0teric has quit [Ping timeout: 265 seconds]
[gmi] has joined #ruby
dagobah has quit [Quit: Leaving...]
pel_daniel has joined #ruby
<alex88>
brain_shim: yeah in that case of course, I've moved out the ternary operator in the method, no i just tell which stat to increase in each case, way more lighter
lw has quit [Quit: s]
mrnugget has quit [Read error: Operation timed out]
acrussell has joined #ruby
<brain_shim>
alex88: What's immediately obvious from your first gist was the duplication caused by the ternary's. It's really the kind of thing you want to decide before you enter the case, and just pass in whether it was home or away. :)
papercode has quit [Remote host closed the connection]
jprovazn has quit [Quit: Odcházím]
kryptek has joined #ruby
andy__ has joined #ruby
papercode has joined #ruby
<alex88>
maybe I should directly set 'home_team' and don't concatenate it in line 39-41
<jlebrech>
i feel like ruby is the proverbial hammer where i work, there's so much complexity when we could sprinkle a bit of javascript in places instead
devdazed has joined #ruby
lw has joined #ruby
Gadgetoid has left #ruby [#ruby]
shinobi_one has joined #ruby
toastynerd has quit [Remote host closed the connection]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: i've nodded off.]
jmpf has joined #ruby
m0s^away is now known as m0s
RaptorJesus has joined #ruby
timonv has joined #ruby
nanoyak has joined #ruby
xcv_ has quit [Remote host closed the connection]
f0ster has joined #ruby
chaos___________ has joined #ruby
lw has quit [Ping timeout: 265 seconds]
f0ster has quit [Changing host]
f0ster has joined #ruby
papercode has quit [Remote host closed the connection]
pr0ggie has quit [Ping timeout: 252 seconds]
freezey has quit [Remote host closed the connection]
papercode has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
r0nin has quit [Remote host closed the connection]
poikon has quit [Read error: Connection reset by peer]
w1zeman1p has quit [Ping timeout: 240 seconds]
toastynerd has joined #ruby
poikon has joined #ruby
benzrf|offline is now known as benzrf
terrellt has joined #ruby
lukec has joined #ruby
monkegji_ has quit [Remote host closed the connection]
<benzrf>
is anybody here on gnu/linux and willing to give my 5% finished half-baked project a try
<benzrf>
owo
monkegjinni has joined #ruby
tgkokk has joined #ruby
poikon has quit [Remote host closed the connection]
<apeiros>
benzrf: you need an answer, quick?
chuk has quit [Quit: This computer has gone to sleep]
boombadaroomba has quit [Remote host closed the connection]
RaCx has quit [Ping timeout: 264 seconds]
jfisk87 has quit [Ping timeout: 264 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
shaileshg has quit [Quit: Connection closed for inactivity]
tgkokk has quit [Client Quit]
m0s is now known as m0s^away
<benzrf>
apeiros: -shrug-
_tpavel has quit [Quit: Leaving]
arietis has quit [Quit: Computer has gone to sleep.]
<sigurding>
short question: is there a command line parser, which offers a “wizard” like input, when no params are specified?
pu22l3r has quit [Ping timeout: 265 seconds]
endash_ has joined #ruby
zeropx has quit [Ping timeout: 240 seconds]
<banister>
sigurding not that i know of, but u should write it, i'd use it, thanks
hiall has quit [Quit: hiall]
<sigurding>
banister: I saw it in the cloudfoundry client
<sigurding>
which was previously based on ruby
popl has joined #ruby
popl has joined #ruby
<banister>
sigurding probably a custom thing, but you can ask them
<sigurding>
now ported to go
pel_daniel has quit [Read error: Connection reset by peer]
<banister>
what is so cool about go?
chuk_ has joined #ruby
<jokke>
wallerdev: i think i found a way
shinobi_one has joined #ruby
toastynerd has joined #ruby
sk87 has joined #ruby
bilbo|brb_at_Mor is now known as lex
geggam has quit [Ping timeout: 264 seconds]
lex is now known as bilbo_swaggins
smathieu_ has quit [Remote host closed the connection]
pel_daniel has joined #ruby
weems has quit [Quit: Leaving]
smathieu has joined #ruby
xcv_ has joined #ruby
sk87 has quit [Client Quit]
zeropx has joined #ruby
fantazo has joined #ruby
xcv has quit [Read error: Connection reset by peer]
freggles has joined #ruby
eka has joined #ruby
chuk_ has quit [Client Quit]
__class__ has joined #ruby
weems has joined #ruby
spider-mario has joined #ruby
_justin has joined #ruby
patrick99e99 has joined #ruby
redlines has quit [Ping timeout: 252 seconds]
redlines has joined #ruby
invinceable has quit [Ping timeout: 265 seconds]
senayar has joined #ruby
[gmi] has quit [Read error: Connection reset by peer]
papercod1 has quit [Ping timeout: 246 seconds]
papercod1 has joined #ruby
senayar has quit [Read error: Connection reset by peer]
senayar has joined #ruby
pel_daniel has quit [Quit: Leaving.]
creede has joined #ruby
afex has quit [Ping timeout: 240 seconds]
papercod1 has quit [Client Quit]
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
lw has quit [Quit: s]
CorySimmons has joined #ruby
baroquebobcat has joined #ruby
patrick99e99 has quit [Ping timeout: 264 seconds]
papercode has joined #ruby
weems has quit [Quit: Leaving]
smathieu has quit [Remote host closed the connection]
sputnik13 has joined #ruby
smathieu has joined #ruby
monkegjinni has joined #ruby
geggam has joined #ruby
senayar has quit [Ping timeout: 240 seconds]
bilbo_swaggins has quit [Quit: Leaving]
mikepack_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
lolmaus has quit [Read error: Connection reset by peer]
kirun has joined #ruby
andrewlio has quit [Quit: Leaving.]
sputnik13 has quit [Ping timeout: 252 seconds]
mehlah has quit [Quit: Leaving...]
mikepack has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
_justin has quit [Quit: _justin]
zarul has quit [Quit: Leaving]
nanoyak has joined #ruby
BuSerD has quit [Ping timeout: 264 seconds]
Dreamer3 has quit [Quit: Leaving...]
znow has joined #ruby
lolmaus has joined #ruby
afex has joined #ruby
_justin has joined #ruby
failshell has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<znow>
heya! I have an array of elements, where each element contains elements. Each elements in element has an attribute "correct" which is true/false, its basically an array of answers, and each answers has the attribute "correct". I need to count which "array" / "element" has the largest number of correct's.. So some comparison, how could I do this easiest?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<bricker`LA>
What would cause a ping to a URL resolve to a completely different URL? My problem is that I'm trying to ping one of our websites and the resolved URL is something that's just completely wrong, some random website.
<havenwood>
znow: it's easier for humans to understand complex data than complex logic, mind gisting the expected input and desired output?
<bricker`LA>
I realize that question has nothing to do with ruby
BuSerD has joined #ruby
pel_daniel has joined #ruby
<atmosx>
bricker`LA: ping and URL don't play well together.
<znow>
havenwood: ofc, just a sec
<atmosx>
bricker`LA: different protocols involved
<bricker`LA>
atmosx: interesting
Spami has joined #ruby
bobwilliams has left #ruby ["Leaving..."]
<bricker`LA>
atmosx: so you're saying I should always use IP when trying to ping something?
<Vlat->
znow: have to agree with havenwood. however, i guess you can simply do the job using code blocks (lambda)
nanoyak has quit [Read error: Connection reset by peer]
<atmosx>
bricker`LA: A uniform resource locator, abbreviated as URL (also known as web address, particularly when used with HTTP)
<znow>
havenwood: yeah ofc, it was a rather tricky question haha, give me a sec, and thanks :)
<znow>
Vlat-: true true :D
nanoyak has joined #ruby
<atmosx>
bricker`LA: when you ping, you use HTTP? Do you choose protocol and remote port when pinging?
<bricker`LA>
atmosx: no, just `ping google.com`, for example
<atmosx>
bricker`LA: so you are not using the URL, you're using the hostname
ahawkins has joined #ruby
<atmosx>
domain name to be more precise
<apeiros>
znow: max_by + count
duggiefresh has joined #ruby
<bricker`LA>
ah, which is going through DNS and so the resolved URL I was seeing was some other website on the same nameservers? Or something like that. I don't know jack shit about networking.
malnek has left #ruby [#ruby]
<atmosx>
bricker`LA: anyway, what are you trying to do exactly, resolve a URL or test a domain is online?
<znow>
apeiros: will google that thanks
<apeiros>
znow: but better yet you use proper classes instead of just nest arrays
<apeiros>
znow: noooo!
<apeiros>
znow: use actual *api docs*
<bricker`LA>
atmosx: actually right now I'm just trying to test that outgoing HTTP connections are working
<znow>
apeiros: what I meant, sorry ;)
<apeiros>
both methods are either on Array or Enumerable
<atmosx>
bricker`LA: HTTP connections are *usually* made to ports 80 and 443, so instead of ping you should probably use a tool like netcat: nc www.google.com 80 (telnet will do too, but it's not optimal)
seemant has joined #ruby
<atmosx>
bricker`LA: what I'm saying is that your server/host/whatever might be able to send ICMP and receive a reply (ping) but not connect to port 80, depends on teh firewall rules of the router, ISP, firewall... whatever sits in between.
<seemant>
hi all, anyone recommend "the ruby way" to get a hash of hashes from a larger hash of hashes, based on keys in an array
<shlant>
would I need .each for entries that could have multiples?
shutchie has joined #ruby
<apeiros>
shlant: I don't think line 11/12 works
<shlant>
apeiros: yea it won't currently
<shlant>
how can I make it work
<apeiros>
unless chef is as horrible to use a notation that looks like json but isn't
jespada has quit [Quit: Leaving]
<shlant>
apeiros: currently it only puts the first down value
<apeiros>
use an array
<shlant>
in the json?
shutch has quit [Read error: Operation timed out]
yokel has quit [Ping timeout: 246 seconds]
fieldfirst has quit [Ping timeout: 264 seconds]
mengu has joined #ruby
terrellt has quit [Ping timeout: 265 seconds]
yokel has joined #ruby
yfeldblum has joined #ruby
<apeiros>
shlant: yes. if you don't, your data won't even *contain* two values
<apeiros>
i.e., what you do in the code no longer even matters.
afex has quit [Ping timeout: 265 seconds]
<apeiros>
but I don't know how chef works, whether you can call up/down more than once e.g.
nanoyak has quit [Quit: Computer has gone to sleep.]
lethjakman has joined #ruby
<shlant>
apeiros: it errors with Option down must be a kind of String! You passed ["ip r d 172.22.0.0/16 via 10.1.0.1 dev eth0", "ip r d 10.19.0.0/16 via 10.1.0.2 dev eth0"]
YamakasY has quit [Ping timeout: 265 seconds]
<j416>
o/ this is somewhat of a crosspost from #bundler which seems rather dead at the moment; if I have a Gemfile with only dev stuff (I use rack and rspec, neither of which are required for just running the program), how would I specify this so that bundler won't barf saying I need to bundle install when running the program? They're in a group :dev. Should I just skip the require 'bundler/setup'?
agarie_ has joined #ruby
<shlant>
apeiros: I guess I could ask the cookbook maintainer to create it as an array
<Paradox>
hmm, when i use Bundler.require, it works fine if i start the script within the same path as the Gemfile, i.e 'ruby script.rb'. However, if i attempt to run the script from OUTSIDE that path (say, from the parent directory by 'ruby myscript/script.rb), i get this error: private method `require' called for Bundler:Module (NoMethodError)
nanoyak has joined #ruby
<Paradox>
a quick googling turns up thousands of results on that error
<Paradox>
but no actual fixes, just people ripping out bundler require and replacing it with manual requires
wallerdev has quit [Quit: wallerdev]
<apeiros>
Paradox: do your require bundler prior to Bundler.require?
<Paradox>
yup
<sigurding>
what do I need to do, if I get: “There are files that need to be committed first.”
<dx7>
I've had this error after run rspec: "[BUG] Bus Error"
<dx7>
Do you know something about that?
lw has joined #ruby
<freeone3000>
benzrf: Because I need to execute a command on the user's path, and figuring out where they stuck it is way more trouble.
thumpba_ has joined #ruby
<benzrf>
freeone3000: it's really not
<benzrf>
there are utilities for this
<benzrf>
:I
<freeone3000>
benzrf: It's a python script. Did they build it manually? Is it stuck in /bin/env? Are they in a virtualenv instead? Did they install it from source manually?
<benzrf>
>.>
<benzrf>
wait, what do you mean by 'stuck in /bin/env'
timonv has quit [Remote host closed the connection]
<makerops>
how would i add a -y to that? system("yum", "install", *packages)
<makerops>
after install*
funktor has quit []
wallerdev has quit [Quit: wallerdev]
<benzrf>
..just add -y?
<makerops>
benzrf, it seems to split it up into 2 commands if i do that
<shevy>
freeone3000 what kind of scientists :)
zachallett has quit [Remote host closed the connection]
<makerops>
if i call "yum", "install" *packages, it works, but it's then interactive
<shevy>
makerops system 'yum install -y '+packages.join(' ')
<sigurding>
is it possible to bundle all required gems, necessary to run?
smathieu has quit [Remote host closed the connection]
crystal77 has quit [Quit: Computer has gone to sleep.]
wald0 has joined #ruby
<benzrf>
shevy no
mansi has quit [Remote host closed the connection]
smathieu has joined #ruby
<makerops>
No such command: install -y. Please use /usr/bin/yum --help
yasushi has joined #ruby
<makerops>
thats the output if i just add the -y to "install"
brain_shim has quit [Ping timeout: 240 seconds]
<shevy>
makerops what command do you use
<makerops>
shevy, what do you mean?
<shevy>
makerops build up the full string you would use on the commandline, then send it as string to system()
benzrf is now known as benzrf|offline
rainmanjam has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
mansi has joined #ruby
<bilbo_swaggins>
sigurding bundler
<sigurding>
bilbo_swaggins: and how?
<shevy>
now the name suddenly makes sense :)
<sigurding>
I did bundle install
arubincloud has joined #ruby
<bilbo_swaggins>
I'm not sure what you're asking then?
<bilbo_swaggins>
Automatic generation of dependency list when creating a project?
andrewlio has joined #ruby
sivoais has quit [Quit: leaving]
makerops has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.3]
crystal77 has joined #ruby
momomomomo has quit [Quit: momomomomo]
monkegjinni has quit [Remote host closed the connection]
<sigurding>
bilbo_swaggins: I created a project, which depends different other gems. Now I created `rake build`and afterwards I do: ruby -Ilib ./bin/project
monkegjinni has joined #ruby
<sigurding>
getting the error: cannot load such file — ‘bla/blu’
elaptics is now known as elaptics`away
omegahm has quit [Ping timeout: 264 seconds]
jlast has quit [Remote host closed the connection]
mrnugget has joined #ruby
chipotle has joined #ruby
popl has quit [Quit: Touch the frog.]
<bilbo_swaggins>
sigurding: sorry I don't know
crystal77 has quit [Max SendQ exceeded]
monkegjinni has quit [Ping timeout: 264 seconds]
jlast has joined #ruby
crystal77 has joined #ruby
danshultz has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
<freeone3000>
sigurding: You want require_relative instead of require when loading depends in your own module.
smathieu has joined #ruby
danshultz has joined #ruby
m0s is now known as m0s^away
sivoais has joined #ruby
danman_ has quit [Quit: danman_]
sailias has quit [Ping timeout: 246 seconds]
YamakasY has joined #ruby
bluenemo has quit [Ping timeout: 264 seconds]
petey has quit []
poikon_ has joined #ruby
doodlehaus has quit []
mary5030_ has quit [Ping timeout: 246 seconds]
fantazo has quit [Quit: Verlassend]
freezey has quit [Remote host closed the connection]
oneawayman has joined #ruby
quba is now known as Su7
duggiefresh has joined #ruby
Voodoofish430 has joined #ruby
rm_ has quit [Remote host closed the connection]
danshultz has quit [Ping timeout: 268 seconds]
duggiefr_ has joined #ruby
rm_ has joined #ruby
<sigurding>
bilbo_swaggins: bundle install –binstubs it is
poikon__ has joined #ruby
poikon has quit [Ping timeout: 240 seconds]
duggiefr_ has quit [Read error: Connection reset by peer]
lw_ has joined #ruby
wallerdev has joined #ruby
duggiefr_ has joined #ruby
aspires has quit []
Abyss__ has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
lw_ has quit [Max SendQ exceeded]
linojon has joined #ruby
freezey has joined #ruby
lw_ has joined #ruby
mrnugget has quit [Quit: mrnugget]
duggiefresh has quit [Ping timeout: 240 seconds]
lw_ has quit [Max SendQ exceeded]
alex88 has quit [Quit: Leaving...]
roolo has joined #ruby
no6 has quit [Ping timeout: 240 seconds]
ikawnoclast has quit [Remote host closed the connection]
xIzIv has joined #ruby
poikon_ has quit [Ping timeout: 268 seconds]
lw has quit [Ping timeout: 268 seconds]
alex88 has joined #ruby
aspires has joined #ruby
rm_ has quit [Ping timeout: 264 seconds]
shlant1 has joined #ruby
<hfp>
Hi guys!
<hfp>
Is there a syntax sugar way of writing things like `foo = foo.to_s` ?
<banister>
hfp no
echevemaster has quit [Quit: Leaving]
<hfp>
ok
<hfp>
That's fine, I still like Ruby
bklane has joined #ruby
DallasG has joined #ruby
shlant has quit [Ping timeout: 264 seconds]
Mrdarknezz has quit [Ping timeout: 264 seconds]
<sigurding>
hfp: congrats
<sigurding>
:)
<mozzarella>
foo = "#{foo)"
<mozzarella>
shit
<mozzarella>
foo = "#{foo}"
lw has joined #ruby
<banister>
hfp does any language have that? :P
YamakasY has quit [Remote host closed the connection]
<mozzarella>
use the to_s! function
duggiefresh has joined #ruby
acrussell has quit [Quit: Leaving.]
no6 has joined #ruby
fluve has quit []
rabeldable has quit [Quit: Leaving.]
duggiefr_ has quit [Ping timeout: 264 seconds]
bluenemo has joined #ruby
emdub has quit [Quit: .]
emdub has joined #ruby
freezey has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
duggiefresh has quit [Ping timeout: 265 seconds]
lw has quit [Quit: s]
<xIzIv>
mozzarella: where you found to_s! method?)
mengu__ has joined #ruby
bluenemo has quit [Ping timeout: 246 seconds]
rabeldable has joined #ruby
mengu has quit [Ping timeout: 240 seconds]
poikon__ has quit [Remote host closed the connection]
YamakasY has joined #ruby
whomp has quit [Ping timeout: 264 seconds]
toastynerd has joined #ruby
alex88 has quit [Quit: Leaving...]
<bilbo_swaggins>
all objects have #to_s, but not necessarily #to_s!
mengu__ has quit [Read error: Connection reset by peer]
<shevy>
hey hfp
<shevy>
aren't you the guy that is learning ruby?
alexherbo2 has quit [Quit: WeeChat 0.4.3]
<hfp>
shevy: I am he
<bilbo_swaggins>
aren't we all?
mengu has joined #ruby
<shevy>
bilbo_swaggins dunno, I guess a few people know so much that they learn only very little anymore
juarlex has joined #ruby
Chronocity has quit [Ping timeout: 268 seconds]
<bilbo_swaggins>
I'd be willing to pay for tutoring services, then
jrhorn424 is now known as zz_jrhorn424
osvico has joined #ruby
toastynerd has quit [Ping timeout: 252 seconds]
<shevy>
understandably
<shevy>
after all rails killed your father
spider-mario has quit [Remote host closed the connection]
jonaskindler has joined #ruby
kaleigh has quit [Remote host closed the connection]
* hfp
is now known around here as "the guy who is learning Ruby"
zachallett has joined #ruby
poikon has joined #ruby
abdulsattar has quit [Ping timeout: 268 seconds]
BuSerD has quit [Ping timeout: 240 seconds]
<shevy>
yeah hfp
<shevy>
we will document your errors
<shevy>
so in 3 years you can either laugh about them
evenix has quit [Remote host closed the connection]
<shevy>
or be very much ashamed
mary5030 has joined #ruby
whomp has joined #ruby
<freeone3000>
https://gist.github.com/freeone3000/206d3cd00e0bdb2d9e23 <- Why do I get the error "NoMethodError: undefined method `run_with_arguments' for NoctilucentWorker::NoctilucentBuilder:Module"? It's passed in as a parameter.
mark_locklear has quit [Quit: Leaving]
ctp has joined #ruby
wedgeV has joined #ruby
LexicalScope` has joined #ruby
jonaskindler has quit [Quit: jonaskindler]
subbyyy_ has joined #ruby
xIzIv has quit [Ping timeout: 265 seconds]
LexicalScope has quit [Read error: Connection reset by peer]
duggiefresh has joined #ruby
rudisimo has quit []
<centrx>
freeone3000, Your module does not have the method you are callin.
cschneid has quit [Ping timeout: 264 seconds]
rickenharp__ has quit [Ping timeout: 264 seconds]
bpgoldsb has quit [Ping timeout: 245 seconds]
yosafbridge has quit [Ping timeout: 245 seconds]
mikepack_ has quit [Remote host closed the connection]
<lethjakman>
so when I use tap...is there a way to use outside variables?
<freeone3000>
centrx: It's passed in as a parameter. It's the second parameter to that method. It's defined as a lambda elsewhere and passed in.
<centrx>
lethjakman, Variables from outside a block can be used in the block.
rickenharp__ has joined #ruby
yosafbridge has joined #ruby
wallerdev has quit [Quit: wallerdev]
<centrx>
freeone3000, Use #call to call a lambda, like run_with_arguments.call("string")
xcv_ has quit [Remote host closed the connection]
ada2358_ has joined #ruby
r0nin has quit [Remote host closed the connection]
tris- has joined #ruby
<freeone3000>
centrx: Ah. That worked, thanks.
shlant1 has quit [Read error: Connection reset by peer]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shlant has joined #ruby
george2 has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 264 seconds]
zarul has joined #ruby
zarul has quit [Changing host]
zarul has joined #ruby
bpgoldsb has joined #ruby
brandon_1 has joined #ruby
toastynerd has joined #ruby
brandon__ has quit [Ping timeout: 245 seconds]
ada2358 has quit [Ping timeout: 245 seconds]
tris has quit [Ping timeout: 245 seconds]
tris- is now known as tris
omegahm has joined #ruby
LBRapid has quit [Ping timeout: 264 seconds]
banister is now known as banisterfiend
vjt has quit [Ping timeout: 245 seconds]
yasushi has quit [Remote host closed the connection]
ohcibi has quit [Read error: Connection reset by peer]
ohcibi has joined #ruby
shadoi has quit [Ping timeout: 245 seconds]
Liothen has quit [Ping timeout: 245 seconds]
jokke has quit [Ping timeout: 264 seconds]
jason__ has quit [Remote host closed the connection]
shadoi has joined #ruby
St_Marx has quit [Ping timeout: 245 seconds]
pagios has quit [Read error: Connection reset by peer]
jason__ has joined #ruby
vjt has joined #ruby
jokke has joined #ruby
YamakasY_ has joined #ruby
pagioss has joined #ruby
Liothen has joined #ruby
spyderman4g63 has quit []
workmad3 has joined #ruby
LBRapid has joined #ruby
cschneid has joined #ruby
toretore has quit [Read error: Connection reset by peer]
jason__ has quit [Read error: Connection reset by peer]
xMopxShell has quit [Ping timeout: 264 seconds]
YamakasY_ has quit [Remote host closed the connection]
jason__ has joined #ruby
patronus_ has quit [Read error: Connection reset by peer]
toretore has joined #ruby
YamakasY_ has joined #ruby
BuSerD has joined #ruby
St_Marx has joined #ruby
Vlat- has quit [Quit: Vlat-]
AlexRussia has joined #ruby
YamakasY has quit [Ping timeout: 264 seconds]
duggiefresh has quit [Remote host closed the connection]
hermanmunster has quit [Remote host closed the connection]
xMopxShell has joined #ruby
agrinb has joined #ruby
YamakasY_ is now known as YamakasY
kevind_ has joined #ruby
alexju has quit [Remote host closed the connection]
kevind__ has joined #ruby
patronus has joined #ruby
<hfp>
shevy: github does a pretty good job at documenting my steps :D
Es0teric has joined #ruby
kevind__ has quit [Client Quit]
agrinb_ has quit [Ping timeout: 268 seconds]
george2 has joined #ruby
abdulsattar has joined #ruby
zigomir has quit [Ping timeout: 265 seconds]
kevind__ has joined #ruby
maximski has quit []
ChrisAnn has joined #ruby
duggiefresh has joined #ruby
freezey has joined #ruby
kevind has quit [Ping timeout: 240 seconds]
kevind__ is now known as kevind
duggiefresh has quit [Remote host closed the connection]
hobodave has quit [Ping timeout: 268 seconds]
<shevy>
hfp damn
<shevy>
I still have not used github much
<shevy>
git is well above my head :(
benzrf|offline is now known as benzrf
mansi has quit [Remote host closed the connection]
<shevy>
but the issue reporting there is great, rubygems does not offer anything like that
jlast has quit [Remote host closed the connection]
kevind_ has quit [Ping timeout: 268 seconds]
mansi has joined #ruby
<hfp>
github is awesome, you should learn it asap
<bilbo_swaggins>
git is easy when it's just with github
<hfp>
You don't need all the arcane stuff to start, just learn init add commit branch and checkout
<shevy>
hpf I have reached the age where, the less I Need to learn, the better for me ;)
<hfp>
Tijuanense: nice
aspires has joined #ruby
meatherly has quit [Remote host closed the connection]
<bilbo_swaggins>
yeah I really burned myself out trying to learn everything about everything
wedgeV has quit [Quit: wedgeV]
<hfp>
shevy: haha you can't really do without git though. It removes all the pain in having 482989053 copies of the same file with exotic names like file1good fil1goodworkingv2 etc
<shevy>
bilbo_swaggins everything about what?
<shevy>
I mean, I used ruby for a long time, but I still don't know everything
<shevy>
hfp the age at which point you no longer ask!
mansi has quit [Ping timeout: 265 seconds]
nanoyak has joined #ruby
alexherbo2 has joined #ruby
QKO has quit [Changing host]
QKO has joined #ruby
otherj has joined #ruby
<hfp>
shevy: oh well, just saying that git is a fantastic tool and even if you stick to basic commands it will be of a tremendous help in your workflow once you get the whole picture how the system was designed
davy has joined #ruby
<shevy>
hmm
<hfp>
(am I the only one with linked images displaying inline and being disturbed by the link Tijuanense posted?)
<shevy>
but that would mean that I'd have to use git locally too
<shevy>
Tijuanense will get banned for life once apeiros is back, no worries
<shevy>
but the real challenge is to find him in reallife
<hfp>
shevy: what do you mean use it locally too?
<hfp>
yaaay!
juarlex has quit [Remote host closed the connection]
<shevy>
hfp one problem I see is that, if I switch to git, I kinda need to use it everywhere or?
Tijuanense was kicked from #ruby by apeiros [inappropriate]
<shevy>
hfp because right now I am not using git, it would be possible but it would also change my existing workflow
<hfp>
shevy: git works per directory
Avahey_ has joined #ruby
<apeiros>
aaah
<DallasG>
solid ban
<shevy>
lol
<shevy>
yeah
<DallasG>
(nick!*@*)
<apeiros>
damn invisible space!
<benzrf>
thank u based apeiros
<hfp>
shevy: so if you don't want to use it for a given project/directory, you don't need to do anything. If you want to start a git repo for a particular project then you just `git init`
<hfp>
It's a Ruby/Rails shop that provides a complete ecommerce solution in a SaaS form
<shevy>
unholycrab bundle these statements into a method
<shevy>
then call that method
cover has quit [Ping timeout: 252 seconds]
derek_c has joined #ruby
<apeiros>
unholycrab: a `when` part does not end with an `end`
<apeiros>
only the whole case does
<unholycrab>
apeiros: agreed
poikon has joined #ruby
<unholycrab>
aha, looks like i can just put multiple statements, and they will all execute up to the next when
<shevy>
hfp that scrolling there is cool
<shevy>
wonder how that is done, I could use that for my local sitemap haha :D
mehlah has joined #ruby
chris_thomson has joined #ruby
<hfp>
shevy: You mean when clicking one of the top links in the menu bar?
bluOxigen has quit [Ping timeout: 240 seconds]
jason__ has quit [Remote host closed the connection]
afreidah2 has quit [Ping timeout: 265 seconds]
bilbo_swaggins has quit [Quit: Leaving]
jason__ has joined #ruby
eynj has joined #ruby
enebo has quit [Quit: enebo]
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
hfp yeah
<shevy>
that delayed scrolling
<shevy>
I click and click and watch it scroll, it's more fun than the content ;)
linojon has quit [Quit: linojon]
<hfp>
shevy: haha, probably with jQuery
<shevy>
if we could just replace javascript with ruby!
mercwithamouth has quit [Ping timeout: 264 seconds]
<hfp>
shevy: HTML5 + CSS3 can do amazing stuff. You can write CSS3 in Sass which is written in Ruby. It's as close as it gets IMO
YamakasY has quit [Quit: The best revenge is massive success...]
davedev24 has joined #ruby
sambao21 has joined #ruby
<shevy>
but then I'd have to learn Sass too :(
<shevy>
css I like
charliesome has joined #ruby
spicerack has joined #ruby
jason__ has quit [Ping timeout: 264 seconds]
sigurding has quit [Quit: sigurding]
jollyy has joined #ruby
<f0ster>
shevy: just do scss
pierre1_ has quit [Quit: Leaving]
dblessing has quit [Quit: dblessing]
rabeldable has quit [Quit: Leaving.]
sambao21 has quit [Client Quit]
sputnik13 has joined #ruby
QuintinAdam has joined #ruby
aspires has quit []
<hfp>
shevy: CSS is a lot easier with Sass and it's not very complicated to learn. It's mostly CSS on steroids. It took me about 5h to learn enough to make good use of it. If you know Ruby and CSS, you pretty much know 90% of Sass.
<shevy>
5h!!!
iceden has quit [Read error: Connection reset by peer]
<apeiros>
it takes you 5min to put it to good use
<apeiros>
(that is: get rid of all the ;'s and {}'s)
davedev2_ has quit [Ping timeout: 268 seconds]
otherj has quit []
<f0ster>
meh. or you could use scss instead of sass
<apeiros>
if you're good, you might squeeze in selector nesting in the 5min too
jobewan has quit [Quit: Leaving]
<apeiros>
f0ster: but then I don't get rid of those silly sigils
<f0ster>
but then you dont have to worry about fickle whitespacing issues
<f0ster>
:D
<centrx>
Does anyone know if there is a successor to RSRuby? It seems derelict.
<centrx>
RinRuby has more recent activity but still two years old, and it lacks nice Ruby bindings and is apparently slower
<apeiros>
f0ster: odd… I never worried about those and never experienced one…
<apeiros>
f0ster: maybe you need to see an eye-doctor :)
Xeago_ has quit [Remote host closed the connection]
<IceDragon>
I wonder if Hanmac would be interested :O
jaywastaken has quit [Quit: This computer has gone to sleep]
nfk has quit [Ping timeout: 264 seconds]
jaywastaken has joined #ruby
<apeiros>
IceDragon: that's dangerous, I might have a fire atronarch
<IceDragon>
D: keep that far away pls
garndt has quit [Quit: Connection closed for inactivity]
dangerousdave has quit [Quit: Leaving...]
jzig has joined #ruby
Vovko has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
geopet has quit []
rahult has joined #ruby
mary5030 has quit [Remote host closed the connection]
crystal77 has joined #ruby
Jetchisel has joined #ruby
mirage335 has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<shevy>
Hanmac go learn rails, then get a new job!
andrewlio has quit [Quit: Leaving.]
yasushi has joined #ruby
eynj1 has quit [Quit: Leaving.]
<codezomb>
I asked over in rack, but I'm being a little impatient so I thought I'd ask here. when trying to start a rack server, I'd like to set some defaults, that can be overriden by the rackup params. For example, I want to assume a default server (puma), but allow -s to override this. Is there a way to handle this? I was thinking I could somehow load a yaml file, or something however I can't find any easy way to do this.
<shevy>
will matz speak anywhere in 2014?
<shevy>
I mean, a presentation
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
freerobby has quit [Client Quit]
workmad3 has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
Alina-malina has quit [Ping timeout: 246 seconds]
<arubincloud>
shevy: It appears that he normally keynotes RubyConf.
agrinb has quit [Remote host closed the connection]
agrinb has joined #ruby
CreativeEmbassy has quit [Quit: FO SHO]
freezey has quit [Ping timeout: 252 seconds]
gilest has joined #ruby
yasushi has quit [Ping timeout: 264 seconds]
crystal77 has quit [Quit: Computer has gone to sleep.]
obs has joined #ruby
toastynerd has quit [Remote host closed the connection]
agrinb has quit [Ping timeout: 240 seconds]
obs has quit [Client Quit]
x77686d has joined #ruby
mikepack has quit [Remote host closed the connection]
toastynerd has joined #ruby
crystal77 has joined #ruby
Shidash has joined #ruby
inkblots has quit [Remote host closed the connection]
mikepack_ has joined #ruby
relix has joined #ruby
arubincloud has quit []
mikepack_ has quit [Remote host closed the connection]
Abyss__ has joined #ruby
mikepack_ has joined #ruby
cina has joined #ruby
zenergi has quit [Quit: zenergi]
crystal77 has quit [Client Quit]
DallasG has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
funburn has joined #ruby
tyfighter has quit [Quit: tyfighter]
jaywastaken has quit [Quit: This computer has gone to sleep]
abra has quit [Read error: Operation timed out]
evenix has joined #ruby
andy__ has quit [Remote host closed the connection]
claymore has quit [Quit: Leaving]
andy__ has joined #ruby
zenergi has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
havenwood has joined #ruby
S0da has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
patrick99e99 has joined #ruby
abra has joined #ruby
abra has quit [Max SendQ exceeded]
abra has joined #ruby
abra has quit [Max SendQ exceeded]
rainmanjam has joined #ruby
abra has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ctruett has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
andy__ has quit [Ping timeout: 240 seconds]
Speed has joined #ruby
bklane has quit [Quit: Leaving...]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has joined #ruby
patrick99e99 has quit [Ping timeout: 240 seconds]
davedev2_ has joined #ruby
freerobby has quit [Quit: Leaving.]
mengu has quit []
kirun has quit [Quit: Client exiting]
montyboy has joined #ruby
davedev24 has quit [Ping timeout: 246 seconds]
aspires has quit []
freerobby has joined #ruby
okdas has joined #ruby
jollyy has quit [Quit: jollyy]
stephenmac7 has quit [Ping timeout: 255 seconds]
DrShoggoth has quit [Quit: Leaving]
chipotle has quit [Quit: cya]
ChrisAnn has quit [Remote host closed the connection]
riceandbeans has joined #ruby
<riceandbeans>
if I see a crappy gem and want to improve on it, what can I do?
okdas_ has joined #ruby
jollyy has joined #ruby
snath has quit [Ping timeout: 252 seconds]
<DouweM>
riceandbeans: fork it and submit pull requests
<DouweM>
alternatively, if the gem looks unmaintained, ask to be added as a maintainer
<DouweM>
but it helps if you've already got some pull requests to show your skill
sailias has joined #ruby
okdas has quit [Ping timeout: 264 seconds]
charlies_ has joined #ruby
cina has quit [Ping timeout: 240 seconds]
charliesome has quit [Ping timeout: 240 seconds]
rahult is now known as rahult_
VTLob has quit [Quit: VTLob]
mikecmpbll has quit [Quit: i've nodded off.]
iliketurtles has joined #ruby
mikecmpbll has joined #ruby
<riceandbeans>
DouweM: yeah, that's all well and all if there is a link on the page to it being hosted anywhere
<DouweM>
hehe
<riceandbeans>
DouweM: the one I'm looking at links back to the rubygems page
<DouweM>
what gem are we talking here?
<riceandbeans>
net-dns-rbl
<riceandbeans>
I've been doing work with perl for basically the same thing
<riceandbeans>
the gem archive is borked too
b00stfr3ak has quit [Read error: Connection reset by peer]
<riceandbeans>
I downloaded the gem and timestamps on files were from 1969
<shevy>
riceandbeans take it over, improve on it, release a new gem
<shevy>
it was last updated 2 years ago, the author has only 2 gems in total
Olipro has quit [Ping timeout: 246 seconds]
<riceandbeans>
but it has a good name
<shevy>
I hate the name!
<shevy>
two -
jollyy has quit [Quit: jollyy]
vpretzel has quit [Ping timeout: 264 seconds]
<riceandbeans>
one thing I HATE about gems is you get gems that are like foo foobar barfoo foo1bar
<shevy>
require 'foo' are ideal names, also common namespace should be Foo in this case, and the project name should be foo as well
yasushi has joined #ruby
<riceandbeans>
and they all are really similar
<DouweM>
you've got the owners name. try to find his info and ask to take over the project
<shevy>
quality rating is missing on rubygems.org :)
<DouweM>
Although Joseph Lombardo is apparently a mafioso
rudisimo has joined #ruby
<riceandbeans>
yeah? well his crap doesn't work in ruby 1.9
jollyy has joined #ruby
thomasxie has joined #ruby
<riceandbeans>
if I can't copy paste examples from your readme and get output that isn't a complete error and the script crashing, you did something wrong
<DouweM>
meh, who cares about the name. just be findable through google and your 2014 gem will be used over his 2012 one
<riceandbeans>
no it won't, because they'll see, 1 download vs his thousands, so they'll be like, he's got the good one
kevind has quit [Ping timeout: 265 seconds]
cndiv has joined #ruby
<hfp>
I tried to take a sample codility test. Am I doomed as a developer if I hate that kind of abstract mathematical tests?
<DouweM>
and then they check his gem, see it doesn't work (like you did) and use yours
<DouweM>
who cares. if you want to use his project but improve it, check the license and re-release it if allowed
postmodern has quit [Quit: Leaving]
<shevy>
DouweM hehe I thought he just works at a pizzeria
<DouweM>
you'll need to write the code anyway, releasing it as a new gem is just one next step
<benzrf>
yo DouweM wanna try my 5% done half-baked project thing
Olipro has joined #ruby
Olipro has quit [Changing host]
Olipro has joined #ruby
snath has joined #ruby
<DouweM>
benzrf: would love to but not now ;P gotta go to class in 6 hours so I'm just reading this one last post on FB buying Oculus before going to bed :P