<cong>
RubyPanther, that's freeware. i don't want that crap.
nanoyak has joined #ruby
<Jason>
.34
<RubyPanther>
it is just the packager, it is still just Ruby
<cong>
it's still freeware.
asteros has quit [Quit: asteros]
<RubyPanther>
trust me that is not the worst compromise you're making by using windows
<workmad3>
cong: by that definition, ruby itself is just freeware
<bnagy>
and openssl
<workmad3>
bnagy: true
asteros has joined #ruby
<bnagy>
except openssl is really BAD freeware
<cong>
freeware is binary only ruby is different
nari has joined #ruby
<RubyPanther>
cong: No, I'm wrong, you were right when you pointed out you should probably be using perl
jonah has quit [Ping timeout: 272 seconds]
<cong>
why can't we use both?
<bnagy>
ok well that's not what freeware means. If you mean prebuilt then say prebuilt
<workmad3>
cong: it's a binary distribution sure... why does that make it automatically bad and spyware?
mikepack has quit [Ping timeout: 252 seconds]
<RubyPanther>
If you can't compile openssl, what makes you think you're going embed Ruby in perl?
<bnagy>
but, you know, if you're against binary builds then Windows is not really the most logical choice of OS
<workmad3>
bnagy: ah but most of that isn't freeware... because you have to pay for it!
mando has quit [Remote host closed the connection]
<bnagy>
pff sif anyone ever pays for windows
<RubyPanther>
it gives you the setup so that all your gems will compile normally from source, so it makes life much easier _for_people_using_a_lot_of_source_ compared to a hand-built one. Because windows does not lend itself to hand-building.
aryaching has joined #ruby
Hiall has joined #ruby
<RubyPanther>
even windows software is not hand built, it is IDE built
nateberkopec has joined #ruby
justinxreese has joined #ruby
edwardly has joined #ruby
<workmad3>
some of my worst tasks were trying to automate windows build toolchains for CI servers :(
<RubyPanther>
And there is nobody interested in maintaining a windows build except oneclick, and they're providing the format that there is demand for: a binary
<bnagy>
and jruby
cj3kim has joined #ruby
axl_ has quit [Quit: axl_]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
afhammad has quit []
<RubyPanther>
jruby is only 1.9.3 compatible
<bnagy>
no
coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby
tauebel has quit [Quit: Leaving.]
axl_ has joined #ruby
dodosan has joined #ruby
alexfreidah has joined #ruby
Amart41 has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
Amart41 has joined #ruby
iceden has quit [Read error: Connection reset by peer]
linojon has quit [Quit: linojon]
doodlehaus has joined #ruby
tauebel has joined #ruby
mikepack has joined #ruby
Amart41 has quit [Ping timeout: 240 seconds]
<atmosx>
Ignorance is a bitch
cong2 has joined #ruby
Rylee has quit [Ping timeout: 245 seconds]
<momomomomo>
what did ignorance say to you atmosx
twopoint718 has quit [Ping timeout: 245 seconds]
<momomomomo>
TELL ME
axl_ has quit [Quit: axl_]
sambao21 has quit [Quit: Computer has gone to sleep.]
Kabaka has quit [Ping timeout: 240 seconds]
cong has quit [Ping timeout: 272 seconds]
tauebel has quit [Ping timeout: 252 seconds]
cong2 is now known as cong
Maitiu has quit [Ping timeout: 246 seconds]
kevind__ is now known as kevind
mikepack has quit [Remote host closed the connection]
Maitiu has joined #ruby
Spami has joined #ruby
shadoi has joined #ruby
ph8 has quit [Ping timeout: 272 seconds]
nateberkopec has quit [Ping timeout: 265 seconds]
<atmosx>
momomomomo: That I need to use wordpress to make a website for a new business...
cj3kim has quit [Remote host closed the connection]
burlyscudd has quit [Quit: Leaving.]
Wolland has quit [Remote host closed the connection]
ph8 has joined #ruby
ktun has joined #ruby
<atmosx>
momomomomo: turns out that sinatra + one-page-template (free not even premium) looks cool and I don't have t install php on my server
<momomomomo>
neat, but remember they'll be able to manage the wordpress install / template so much easier if you want to be 100% hands off after deployment
hornairs has joined #ruby
iamdoo2 has joined #ruby
cj3kim has joined #ruby
iamdoo2 has quit [Read error: Connection reset by peer]
iamdoo2 has joined #ruby
coca_rails has quit [Remote host closed the connection]
* cong
uninstalls ruby-openssl
<cong>
keeping openssl just incase.
alexfreidah has quit [Ping timeout: 264 seconds]
IceyEC has joined #ruby
<atmosx>
momomomomo: it's my job, so after deployment I might take the time to develop a full-featured app :-)
_mtr has joined #ruby
<atmosx>
cong: are you trying to connect to another host via openssl?
<momomomomo>
;p
<cong>
atmosx, you shouldn't need to concern yourself with my problems.
Vivekananda has quit [Remote host closed the connection]
<momomomomo>
cong: you shouldn't talk about them in the public channel without context, then :p
burlyscudd has joined #ruby
<cong>
if you can help on windows then by all means.
<atmosx>
cong: windows? You deserve your problems.
<atmosx>
and yes I shouldn't be concerned.
angusigu1ss has joined #ruby
<cong>
:D
iamdoo2 has quit [Ping timeout: 272 seconds]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iceden has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
shadoi has quit [Quit: Leaving.]
momomomomo has quit [Quit: momomomomo]
yasushi has quit [Remote host closed the connection]
octoberry has joined #ruby
jaimef has quit [Excess Flood]
Spami has quit [Quit: This computer has gone to sleep]
zz_karupanerura is now known as karupanerura
danshultz has quit [Read error: Operation timed out]
pu22l3r_ has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
twopoint718 has joined #ruby
twopoint718 has joined #ruby
atmosx has quit [Quit: Lost in trance]
octoberry has quit [Ping timeout: 240 seconds]
predator117 has joined #ruby
sassamo has quit [Remote host closed the connection]
Spami has joined #ruby
sassamo has joined #ruby
bradhe has joined #ruby
Lewix has joined #ruby
marr has quit [Ping timeout: 245 seconds]
dodosan has quit [Remote host closed the connection]
jaimef has joined #ruby
MattStratton has joined #ruby
Baluse has quit [Read error: Operation timed out]
predator217 has quit [Ping timeout: 248 seconds]
pu22l3r_ has joined #ruby
twopoint718 has quit [Ping timeout: 272 seconds]
Baluse has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
sassamo has quit [Read error: No route to host]
sassamo has joined #ruby
ewnd9 has joined #ruby
nari has quit [Ping timeout: 245 seconds]
mois3x has joined #ruby
Virtualize|away has joined #ruby
jibi has quit [Read error: Connection reset by peer]
pietr0 has quit [Quit: pietr0]
bradhe has quit [Ping timeout: 272 seconds]
kitak has joined #ruby
tauebel has joined #ruby
jibi has joined #ruby
Schmidt has quit [Quit: WeeChat 0.4.1]
tauebel has quit [Client Quit]
kenndel_ has quit [Read error: Connection reset by peer]
kenndel_ has joined #ruby
cj3kim has quit [Remote host closed the connection]
robscomputer has quit [Read error: Connection reset by peer]
robscomputer has joined #ruby
ephemerian has quit [Quit: Leaving.]
tauebel has joined #ruby
duggiefr_ has quit [Remote host closed the connection]
mikepack has joined #ruby
ktun has quit [Remote host closed the connection]
jaimef has quit [Excess Flood]
bricker`work is now known as bricker`away
Wolland has joined #ruby
Virtualize|away has quit [Ping timeout: 245 seconds]
zz_anildigital is now known as anildigital
tchebb has quit [Ping timeout: 245 seconds]
tharindu_ has joined #ruby
clamstar has joined #ruby
burlyscudd has quit [Quit: Leaving.]
jaimef has joined #ruby
fgo has joined #ruby
brian____ has quit [Quit: brian____]
havenwood has joined #ruby
heidi has quit [Quit: Leaving.]
Wolland has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
shadoi has joined #ruby
nateberkopec has joined #ruby
tchebb has joined #ruby
mongrelion has joined #ruby
<mongrelion>
Hi there o/
Wolland has quit [Remote host closed the connection]
ArchBeOS-work has quit [Read error: Connection reset by peer]
ArchBeOS-work has joined #ruby
ArchBeOS-work has quit [Changing host]
ArchBeOS-work has joined #ruby
Wolland has joined #ruby
whowantstolivef3 has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
pixelgremlins has quit [Read error: Connection reset by peer]
anildigital is now known as zz_anildigital
aryaching has joined #ruby
bricker`away has quit [Ping timeout: 240 seconds]
robustus has quit [Ping timeout: 252 seconds]
pixelgremlins has joined #ruby
mlpinit has joined #ruby
Alina-malina has joined #ruby
dpswirel_ has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
robustus has joined #ruby
nateberkopec has quit [Ping timeout: 248 seconds]
devinus has joined #ruby
tharindu_ has quit [Ping timeout: 252 seconds]
<shevy>
hmm
<shevy>
cong you can compile everything from source on linux
mmcdaris has joined #ruby
whowantstolivefo has quit [Ping timeout: 252 seconds]
<jle`>
george2: no need to be so hard on yourself mate
<george2>
:)
<george2>
I was passing nil around most of my program because I forgot to return anything from one function
pu22l3r_ has joined #ruby
fijimunkii has joined #ruby
mary5030 has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 272 seconds]
rubyracer has quit [Quit: Konversation terminated!]
fire has joined #ruby
Hobogrammer has joined #ruby
thomasxie has joined #ruby
agjacome has quit [Quit: leaving]
rx_ has joined #ruby
asteros has quit [Quit: asteros]
guyz has quit [Quit: quit]
zz_anildigital is now known as anildigital
cong has quit []
brian____ has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
CaptainJet has quit []
mordocai has joined #ruby
phipes has quit [Remote host closed the connection]
phipes has joined #ruby
falood has joined #ruby
_root has quit [Ping timeout: 272 seconds]
standyro1 has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
fire has quit [Ping timeout: 252 seconds]
snath has joined #ruby
phracker has joined #ruby
<pontiki>
o/
estebist_ has quit [Remote host closed the connection]
havenwood has joined #ruby
sputnik13 has joined #ruby
tyl has joined #ruby
tylersmith has joined #ruby
pen has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
jerius has joined #ruby
bongodosmcpheedo has joined #ruby
<bongodosmcpheedo>
Hey all, when executing a "For each file in directory" as in Dir.foreach('my_dir') do |item|, in what order will item be pulled out?
troyready has quit [Read error: Operation timed out]
doodlehaus has quit [Remote host closed the connection]
phipes has quit [Remote host closed the connection]
khfeng has joined #ruby
asteros has joined #ruby
asteros has quit [Client Quit]
iamdoo2 has quit [Ping timeout: 252 seconds]
sableloki has joined #ruby
dukz has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
kitak_ has joined #ruby
kitak has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
guardianx has joined #ruby
browndawg has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
edwardly has joined #ruby
Hanmac has quit [Quit: Leaving.]
Hanmac has joined #ruby
MattStra_ has joined #ruby
x77686d has quit [Quit: x77686d]
MattStra_ has quit [Max SendQ exceeded]
yfeldblum has quit [Ping timeout: 260 seconds]
MattStra_ has joined #ruby
Sawbones has joined #ruby
MattStra_ has quit [Max SendQ exceeded]
yfeldblum has joined #ruby
<Sawbones>
Man I keep trying to learn Ruby but keep failing
kpshek has joined #ruby
<Nilium>
How?
edwardly_ has quit [Ping timeout: 240 seconds]
<Lewix>
Sawbones: keep trying
<Sawbones>
idk I mean I get it and can code with it but I get a little stuck with why they use attr_read and attr_writer
<Sawbones>
then it has symbols passed to it
MattStratton has quit [Ping timeout: 260 seconds]
<Sawbones>
but the represent the instance variable?
<Nilium>
Because it beats writing out methods for :name and :name= over and over.
zz_anildigital is now known as anildigital
<Lewix>
Sawbones: that's when you ask
<Lewix>
Sawbones: look it up, ask questions, we're all learning here
<Lewix>
everyday
<Sawbones>
How is ruby with embedding C?
<Nilium>
I think in MRI there's also some performance difference between hand-written methods for them and attributes, but I don't remember and you shouldn't take my word for that
<Sawbones>
I hear mixed things
<Lewix>
Sawbones: wait, you're good with C?
pu22l3r_ has quit [Remote host closed the connection]
<Nilium>
Embedding C?
<Nilium>
Like, with tcc/clang?
<Nilium>
Never heard of anyone embedding gcc, but I suppose that might also be possible.
<Sawbones>
haha I'm not sure about all that, I just know enough to write c scripts, nothing big really
<Nilium>
C != scripting
<Sawbones>
sorry, c commands
end_guy has joined #ruby
danshultz has joined #ruby
kpshek has quit [Ping timeout: 272 seconds]
* Nilium
scratches his head
<Sawbones>
Lewix: you seem all surpised
<Nilium>
Also doesn't make sense to me, but I'll just assume you're really new to this and don't yet know the vocabulary for what you want to say
<Sawbones>
Possibly
<Lewix>
Sawbones: not anymore
<Sawbones>
Like I said, I don't know enough C to use it what it's meant for
<Nilium>
I like C. And C++. This makes me a masochist in most people's eyes. Particularly that of the filthy, disgusting web developers.
lifestream has left #ruby ["Leaving"]
<Sawbones>
I think that the better you get at programming the less difficult they become
<Nilium>
All the languages start to look the same and you just look for new ways to be lazy.
<Nilium>
Hence why Scala's awesome.
<Sawbones>
I suppose that's the case if you have almost a decade under your belt or something
MattStratton has joined #ruby
<dseitz>
I remember a time when I used to think C was it...
<dseitz>
:)
zxq9 has quit [Read error: Connection reset by peer]
<Nilium>
I'm getting there.
<Sawbones>
From what I'm reading it looks like Ruby is a bit flaky with C code
danshultz has quit [Ping timeout: 272 seconds]
<Nilium>
Depends on the implementation of Ruby.
<Nilium>
MRI's pretty alright with it.
<Nilium>
JRuby's hell on earth.
sski has joined #ruby
<Nilium>
I can't remember what the other one was since I don't use it
dukz has quit [Remote host closed the connection]
<Nilium>
Actually, I don't use jruby either, but I tried to get my gems to work in it and found out it hates C.
Mars` has joined #ruby
dukz has joined #ruby
edwardly has quit [Ping timeout: 264 seconds]
edwardly has joined #ruby
Sawbones has quit [Remote host closed the connection]
dukz_ has joined #ruby
dodosan has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
dukz has quit [Ping timeout: 245 seconds]
Deele has joined #ruby
yasushi has joined #ruby
duggiefresh has quit [Remote host closed the connection]
phipes has joined #ruby
anildigital is now known as zz_anildigital
zz_anildigital is now known as anildigital
estebistec has joined #ruby
anildigital is now known as zz_anildigital
mikepack has joined #ruby
zz_anildigital is now known as anildigital
sableloki has quit [Remote host closed the connection]
kitak_ has quit [Remote host closed the connection]
nclx has joined #ruby
jonahR has joined #ruby
banjara has joined #ruby
kitak has joined #ruby
mikepack has quit [Ping timeout: 248 seconds]
coderhs has joined #ruby
niklasb has joined #ruby
bradhe has joined #ruby
dukz_ has quit [Remote host closed the connection]
dukz has joined #ruby
Dreamer3 has joined #ruby
jtdowney has quit []
clamstar has quit [Quit: Computer has gone to sleep.]
dukz_ has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
mikepack has joined #ruby
sensen has joined #ruby
sensen has quit [Client Quit]
dukz has quit [Ping timeout: 272 seconds]
sensen has joined #ruby
browndawg has quit [Quit: Leaving.]
mikepack has quit [Ping timeout: 260 seconds]
sethen has quit [Quit: Leaving...]
angusigu1ss has joined #ruby
nateberkopec has joined #ruby
vlad_starkov has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
Hobogrammer_ has joined #ruby
bradhe has joined #ruby
Mars` has quit [Remote host closed the connection]
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
hornairs has quit [Quit: hornairs]
angusigu1ss has quit [Ping timeout: 272 seconds]
iamdoo2 has joined #ruby
nateberkopec has quit [Ping timeout: 265 seconds]
Hobogrammer has quit [Ping timeout: 252 seconds]
arietis has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
sparrovv has joined #ruby
zeade has quit [Ping timeout: 245 seconds]
zeade has joined #ruby
iamdoo2 has quit [Ping timeout: 260 seconds]
gja has quit [Quit: This computer has gone to sleep]
yasushi has quit [Remote host closed the connection]
gja has joined #ruby
yarou has quit [Read error: Connection reset by peer]
yarou has joined #ruby
cj3kim has joined #ruby
corehook has joined #ruby
sparrovv has quit [Ping timeout: 264 seconds]
Yayo has quit [Ping timeout: 272 seconds]
thomasxie has left #ruby [#ruby]
corehook has quit [Client Quit]
dukz has joined #ruby
jlast has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
bigkevmcd has quit [Ping timeout: 260 seconds]
dukz_ has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
Mars` has joined #ruby
Mars` has quit [Read error: Connection reset by peer]
craigp has joined #ruby
Mars` has joined #ruby
simoz8 has quit [Ping timeout: 240 seconds]
keen____ has joined #ruby
keen___ has quit [Ping timeout: 272 seconds]
bigkevmcd has joined #ruby
sambao21 has quit [Ping timeout: 245 seconds]
ndrei has quit [Ping timeout: 252 seconds]
yacks has quit [Remote host closed the connection]
craigp has quit [Ping timeout: 272 seconds]
simoz8 has joined #ruby
aryaching has quit [Quit: sayonara! ^_^]
jedinerd has joined #ruby
simoz9 has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
vlad_starkov has quit [Remote host closed the connection]
simoz8 has quit [Ping timeout: 248 seconds]
IceDragon has quit [Quit: Space~~~]
Soda has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
bigkevmcd has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
towski has joined #ruby
<towski>
what is the command line invocation for including a directory to the load path?
Es0teric has quit [Quit: Computer has gone to sleep.]
<towski>
ruby file.rb -I test doesn't seem to work
<towski>
for require 'test_helper'
<towski>
oh fudge is it supposed to be before
<towski>
duh ok
fgo has quit [Remote host closed the connection]
BrixSat has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
BrixSat has joined #ruby
bigkevmcd has joined #ruby
dodosan has quit [Remote host closed the connection]
kitak has joined #ruby
Hanmac has joined #ruby
guardianx has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
heftig has quit [Quit: Quitting]
Barrin6 has quit [Quit: Leaving]
intuxicated has joined #ruby
timonv has joined #ruby
Mars` has quit [Remote host closed the connection]
simoz9 has quit [Read error: Connection timed out]
Shidash has quit [Quit: Leaving.]
dodosan has joined #ruby
mudmaste_ has quit [Read error: Connection reset by peer]
mudmaster has joined #ruby
JohnBat26 has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
ckinni_ has joined #ruby
ckinni has quit [Read error: Connection reset by peer]
<BraddPitt>
Is a Gemfile the same a require inside of a script?
thealch3m1st has quit [Read error: Connection reset by peer]
<BraddPitt>
in other words, can i delete all of my requires and move them to the Gemfile?
thealch3m1st has joined #ruby
venkat has joined #ruby
timonv has joined #ruby
ndrei has joined #ruby
Shidash has joined #ruby
<havenwood>
BraddPitt: Nope, the Gemfile resolves and then installs dependencies when you `bundle`. Requiring what you need is an entirely different matter.
pranny has joined #ruby
brennanMKE has quit [Remote host closed the connection]
<BraddPitt>
ok, i think i understand, did some googling
brennanMKE has joined #ruby
nateberkopec has joined #ruby
lifestream has joined #ruby
dukz_ has joined #ruby
estebistec has quit [Remote host closed the connection]
mocfive has quit [Remote host closed the connection]
bradhe has joined #ruby
Shidash has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 252 seconds]
kiri has joined #ruby
mocfive has joined #ruby
dukz has quit [Ping timeout: 260 seconds]
brennanMKE has quit [Ping timeout: 265 seconds]
nateberkopec has quit [Ping timeout: 260 seconds]
iMe has joined #ruby
Hobogrammer_ has quit [Quit: さようなら]
alexfreidah has joined #ruby
angusigu1ss has joined #ruby
Hobogrammer_ has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
simoz9 has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
banjara has joined #ruby
speakingcode has quit [Read error: Operation timed out]
mocfive has quit [Ping timeout: 264 seconds]
v10energy has quit [Ping timeout: 252 seconds]
alexfreidah has quit [Ping timeout: 264 seconds]
iamdoo2 has joined #ruby
angusigu1ss has quit [Ping timeout: 264 seconds]
jedinerd_ has joined #ruby
caveat- has joined #ruby
tsakman has joined #ruby
closer has quit [Ping timeout: 252 seconds]
dukz_ has quit [Ping timeout: 245 seconds]
iamdoo2 has quit [Ping timeout: 260 seconds]
dukz has joined #ruby
jedinerd has quit [Ping timeout: 245 seconds]
noop has joined #ruby
closer has joined #ruby
karupanerura is now known as zz_karupanerura
bluOxigen has joined #ruby
tagrudev has joined #ruby
Macaveli has joined #ruby
dukz_ has joined #ruby
sassamo has joined #ruby
Mars` has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
dukz has quit [Ping timeout: 260 seconds]
allen_on_c has joined #ruby
apeiros has joined #ruby
anildigital is now known as zz_anildigital
ktosiek has joined #ruby
zz_anildigital is now known as anildigital
binw has quit [Read error: Connection reset by peer]
Virtualize|away has quit [Quit: Leaving...]
Mars` has quit [Remote host closed the connection]
incade has joined #ruby
angusigu1ss has joined #ruby
dukz has joined #ruby
binw has joined #ruby
anildigital is now known as zz_anildigital
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dukz_ has quit [Ping timeout: 245 seconds]
angusigu1ss has quit [Ping timeout: 252 seconds]
dukz_ has joined #ruby
phipes has quit [Remote host closed the connection]
niakpi has joined #ruby
phansch has joined #ruby
dukz_ has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 252 seconds]
dukz__ has joined #ruby
phipes has joined #ruby
dukz has quit [Ping timeout: 272 seconds]
Apocalypse has quit [Ping timeout: 272 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
Kricir has joined #ruby
kiri has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
kiri has joined #ruby
timonv has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 248 seconds]
incade is now known as cade
venkat has quit []
jprovazn_ has joined #ruby
cade is now known as incade
vlad_starkov has quit [Remote host closed the connection]
Shidash has joined #ruby
phipes has quit [Remote host closed the connection]
dik_dak has quit [Quit: Leaving]
Apocalypse has joined #ruby
dreinull has joined #ruby
kitak has quit [Ping timeout: 245 seconds]
kobain has quit [Ping timeout: 256 seconds]
<dreinull>
is there a simple method similar to Array#delete_if that returns the deleted elements?
kitak has joined #ruby
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
intuxicated has quit [Quit: Leaving]
fgo has joined #ruby
gja has joined #ruby
nateberkopec has joined #ruby
brennanMKE has joined #ruby
daxroc has joined #ruby
tylersmith has quit [Remote host closed the connection]
bal has joined #ruby
dukz has joined #ruby
sassamo has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
iamdoo2 has joined #ruby
Amart41 has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
dukz__ has quit [Ping timeout: 248 seconds]
kevinykchan has quit [Read error: Connection reset by peer]
thomasxie has joined #ruby
<havenwood>
dreinull: nope, but several ways to do it without too much backbending
kevinykchan has joined #ruby
Macaveli has joined #ruby
daxroc has quit [Quit: Leaving.]
yfeldblum has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 252 seconds]
<dreinull>
havenwood: ok, I think I'll just shift them into another array
brennanMKE has quit [Ping timeout: 265 seconds]
ndrei has quit [Read error: Connection reset by peer]
Amart41 has quit [Ping timeout: 264 seconds]
Fuzai has joined #ruby
<Fuzai>
is there an easy way in ruby to run a loop for a certain amount of time?
krz has joined #ruby
<dreinull>
Fuzai: while looping over two time objects?
<Fuzai>
i thought something might abstract that process so I figured I would come and ask
<dreinull>
first guess
<havenwood>
Fuzai: start = Time.now; until Time.now == start + 2 do
ndrei has joined #ruby
<havenwood>
Fuzai: will continue after time expires but wont do another loop after
dodosan has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby
<havenwood>
Fuzai: or do you want to abort with exception when time runs out
<Fuzai>
start = Time.now; while Time.now < start + 60 do ......
<Fuzai>
what run an infinite loop until a timer cooks off and kills it?
<Fuzai>
couldn't something as well be done with eventmachine then and use a timer loop with no timeout and a second timer to kill the first one after 60 seconds?
<havenwood>
Fuzai: if you want to kill it, look at Timeout in stdlib
<havenwood>
Fuzai: if you want a flexible timer, timers gem
dagobah has joined #ruby
<havenwood>
"Timeout provides a way to auto-terminate a potentially long-running operation if it hasn't finished in a fixed amount of time."
phipes has quit [Read error: Connection reset by peer]
phipes has joined #ruby
<havenwood>
nice to have decent timers
<havenwood>
TIME ALL THE THINGS \o/
raar has joined #ruby
SCommette has quit [Quit: SCommette]
jbueza has joined #ruby
raar is now known as Guest72535
kkh has joined #ruby
standyro1 has joined #ruby
kkh is now known as Guest78613
<Fuzai>
It's nice to work with metrics
<Fuzai>
takes alot of the guess work out of it
krz has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
phipes has quit [Ping timeout: 248 seconds]
_HolyCow has joined #ruby
heidi has quit [Read error: Connection reset by peer]
heidi has joined #ruby
cj3kim has quit [Remote host closed the connection]
dukz has joined #ruby
Virtualize|away has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
jonah has quit [Remote host closed the connection]
kevinykchan has joined #ruby
bal has quit [Quit: bal]
brennanMKE has joined #ruby
dukz_ has quit [Ping timeout: 252 seconds]
bal has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
<havenwood>
Fuzai: Maybe tempting to just do it with a thread and sleep: done = false; Thread.new { sleep 5; done = true}; until done do; sleep 1; puts 'tick'; end
Virtualize|away has quit [Ping timeout: 252 seconds]
<Fuzai>
honestly I think timeout is the ideal here
<havenwood>
nice
<havenwood>
that is simple then
<Fuzai>
but it was almost 10k slower
<Fuzai>
but that could have been anything
dyu1 has joined #ruby
<havenwood>
Timeout uses a thread itself
yfeldblum has joined #ruby
<Fuzai>
this is jruby btw
niakpi has quit [Ping timeout: 252 seconds]
shime has joined #ruby
yfeldblu_ has joined #ruby
shedd has quit [Remote host closed the connection]
gja has joined #ruby
jonahR has quit [Quit: jonahR]
andikr has joined #ruby
synergy_ has quit [Read error: Connection reset by peer]
krz has quit [Ping timeout: 272 seconds]
LekeFly has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
LekeFly has quit [Client Quit]
Mars` has joined #ruby
blackmesa has joined #ruby
skaflem has joined #ruby
yfeldblu_ has quit [Ping timeout: 248 seconds]
ndrei has quit [Ping timeout: 240 seconds]
zipper has joined #ruby
Mars` has quit [Ping timeout: 252 seconds]
brennanMKE has quit [Ping timeout: 265 seconds]
kitak has quit [Remote host closed the connection]
op84 has joined #ruby
araujo has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
<op84>
hi there - how i delete a key with nil of a hash?
<havenwood>
op84: you want to keep key value pairs unless the value is nil?
monkegjinni has joined #ruby
kitak has joined #ruby
<op84>
havenwood: nope my hash looks like this: {"role"=>"", nil=>""} and i want to remove the nil key
<havenwood>
aha
nateberkopec has joined #ruby
_Andres has joined #ruby
<havenwood>
do you want to keep `false` as a key?
<havenwood>
if false isn't an issue:
<havenwood>
>> {"role"=>"", nil=>""}.keep_if { |k, _| k }
<godd2>
I thought the difference between a function and a method was that one guarantees that the state of the program doesn't change, and the other one doesn't offer that guarantee. So like Math.sqrt(2) would be a function.
<apeiros>
(you made just as much a claim as I did…)
ndrei has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
dukz_ has joined #ruby
<krainboltgreene>
This just in: StackOverflow is a dictionary.
LekeFly has joined #ruby
<apeiros>
godd2: hm, haven't heard of it like that. I know bertrand meyer made a distinction of that kind. but I think he called it command (mutates state) and query (never mutates)
<krainboltgreene>
That's pretty cool terminology.
<krainboltgreene>
I like that.
shedd has joined #ruby
<godd2>
Ive heard the difference between command and query with respect to the types of unit tests one should write.
iamdoo2 has quit []
<apeiros>
krainboltgreene: maybe you supply a list of accepted dictionaries.
iamdoo2 has joined #ruby
<krainboltgreene>
I'm a lazy slob, remember?
<apeiros>
krainboltgreene: in that case, keep using wrong terminology and make a joke of yourself.
<apeiros>
I can't beam you my hardcover books, and I'm not even willing to search them.
<havenwood>
minaswan
<havenwood>
too bad, beaming hardcovers sounds nice
dukz has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
<krainboltgreene>
havenwood: Doesn't apply to veterans of the channel, duh.
Senjai has quit [Ping timeout: 272 seconds]
<apeiros>
krainboltgreene, aka "~600ppl on stackoverflow disagree with me, nobody agrees, but I'm still right" :-p
yfeldblum has joined #ruby
<krainboltgreene>
Well if that's the metric for correctness in #ruby these days.
shedd has quit [Ping timeout: 252 seconds]
Kneferilis has joined #ruby
<apeiros>
whatever that's supposed to mean.
noop has quit [Ping timeout: 252 seconds]
alexfreidah has quit [Ping timeout: 240 seconds]
tylersmith has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
<havenwood>
the metric is whoever the foxes agree with...
<havenwood>
obviously.
simoz10 has joined #ruby
<lewellyn>
what sound does the fox make?
<krainboltgreene>
Wrong fox, probably.
tobago has joined #ruby
tobago_ has joined #ruby
dukz has joined #ruby
prateekp has joined #ruby
<havenwood>
is there an animal sounds gem?
<krainboltgreene>
I don't know what would be worse: Wanting a standard output specification for rake-based development tools and getten hundreds of mildly bad specifications or the current "every gem is unique".
<apeiros>
havenwood: I don't apply minswan to trolls (and at that point, krainboltgreene is either a troll or an idiot)
<prateekp>
how to get absolute url of image from relative href #nokogiri
heftig has joined #ruby
<krainboltgreene>
I don't think that's how minswan works, buddy.
<Nilium>
I am. I was unable to drink anything other than warm water for the past week and a half.
<Nilium>
Warm water is depressing.
<krainboltgreene>
#CloseEnough
<krainboltgreene>
Nilium: Ugh, been there. Sucks.
<apeiros>
you know, the fact that I haven't banned you yet is somehow contradicting your claim of bans for "not worshiping my pedestal".
<krainboltgreene>
Oh praised be your restraint.
ahawkins has joined #ruby
VinceThePrince has quit [Ping timeout: 260 seconds]
<Nilium>
And soon I get to have a tooth ground down to a stump and crowned.
* lewellyn
decides that since apeiros isn't banning, ignore is justified.
<Nilium>
So next I'll get to chew normally again.
mercwithamouth has joined #ruby
tyl has joined #ruby
<krainboltgreene>
Nilium: Ah, tooth thing? Good luck with that.
<havenwood>
Nilium: i just realized why you cant drink cold water, yikes i'm slow tonight
Usse has quit [Remote host closed the connection]
<Nilium>
Yep. The nerve has recovered, at least, so no need for a root canal.
<krainboltgreene>
Nilium: My girlfriend has to have some major oral surgery, so we're going to have make some dietary changes for that (including the water thing probably).
pskosinski has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
<Nilium>
I can drink cold water now, thankfully
<Nilium>
They pulled a filling out of my tooth and replaced it with a sedative filling.
<Nilium>
So, that means the nerve can recover on its own and I don't need to murder the tooth before getting a crown.
BraddPitt is now known as [-wolong-]
<Nilium>
The crown is because of a fracture, which is what caused the nerve to go haywire in the first place.
daxroc has quit [Ping timeout: 245 seconds]
<krainboltgreene>
Ouch, yeah, damn.
<krainboltgreene>
Sympathies, I hate tooth problems.
noop has joined #ruby
[-wolong-] is now known as Guest40994
<Nilium>
That tooth just sucks.
dukz has quit [Remote host closed the connection]
Guest40994 is now known as BraddPitt
olivier_bK has joined #ruby
<krainboltgreene>
Angela has just bad tooth genetics, so she's been on a dentists chair for a lot of her life.
<Nilium>
Been that way for two and a half months and only now did we finally confirm it was a fracture and where it was.
dukz has joined #ruby
<krainboltgreene>
I almost feel bad for the good luck I've had.
daxroc has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
<krainboltgreene>
Nilium: Which one is it?
havenwood has left #ruby [#ruby]
<Nilium>
Last molar on the upper left.
ndrei has quit [Ping timeout: 252 seconds]
terrellt_ has joined #ruby
<Nilium>
Meaning that entire side of my mouth is off limits for chewing, and has been for months. Not a good thing.
Deejay_ has joined #ruby
Xeago has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<krainboltgreene>
Wow, damn. Well at least it's soon to be better.
terrellt has quit [Ping timeout: 265 seconds]
<Nilium>
Hopefully. Otherwise my only other option really is to get the damned thing pulled or something, I guess.
timonv has joined #ruby
<Nilium>
I guess the one upside is the fracture's in a visible part of the tooth, so it won't just split the tooth in half the way some fractures can
DouweM has quit [Ping timeout: 240 seconds]
<Nilium>
Which if that happens, the tooth is gone, as far as I know.
<krainboltgreene>
Right, yesh.
dukz has quit [Ping timeout: 265 seconds]
<apeiros>
*sob*, BSD vs. GNU tools differences are annoying
RoxasShadowRS has joined #ruby
<Nilium>
I just use BSD and pray the difference will never matter.
<Nilium>
So far, it hasn't.
<apeiros>
I mostly use BSD (due to OS X), and find my self constantly using man on the servers as those are GNU and tend to not like the flags I pass them :-/
<Nilium>
Ah, yeah, that happens.
<Nilium>
I don't have to do it on servers, but when I reboot into Linux, I have to double-check a lot of stuff
timonv has quit [Ping timeout: 241 seconds]
<Nilium>
And, in the case of dd, quadruple-check
<Nilium>
Because dd makes me paranoid as hell
chipotle has quit [Quit: cya]
pskosinski_ has joined #ruby
pskosinski has quit [Remote host closed the connection]
maximveksler has joined #ruby
nari has quit [Ping timeout: 245 seconds]
ewnd9 has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ctp has joined #ruby
iamdoo2 has quit [Remote host closed the connection]
thealch3m1st has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nvrch has joined #ruby
ndrei has joined #ruby
amerine has joined #ruby
<amerine>
krainboltgreene: Sounds like a rough crowd in here tonight.
duggiefresh has joined #ruby
havenwood has joined #ruby
phracker has quit [Remote host closed the connection]
nateberkopec has joined #ruby
m8 has joined #ruby
blaxter has joined #ruby
rdark has joined #ruby
dukz has joined #ruby
claymore has quit [Read error: Operation timed out]
camilasan has joined #ruby
claymore has joined #ruby
avril14th_ has joined #ruby
avril14th_ has quit [Read error: Connection reset by peer]
roolo has joined #ruby
thealch3m1st has joined #ruby
bradhe has joined #ruby
duggiefresh has quit [Ping timeout: 240 seconds]
<Cope>
I'm looking for a very lightweight process manager / daemoniser - just to run a test sinatra app - purely as a test fixture. I don't want to have to install native extension, so god is out. Any recommendations?
Davey has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
<Cope>
i literally want something one step better than 'ruby app.rb &'
ndrei has quit [Quit: Lost terminal]
chipotle has joined #ruby
<havenwood>
Cope: bluepill is another option, no native ext
timonv has joined #ruby
<Cope>
ok grest - will check that oyut
eka has joined #ruby
<soahccc>
Cope: You just want to daemonize or to "monitor" the process?
<Wolland>
Cope can you just monit it or supervisord?
<Cope>
soahccc: i dont realy care about monitoring it - just daemonising
<Wolland>
I think they will do that for you
<Cope>
Wolland: could do but i'd rather not install extra shit just for the test, so if i can do it in pure ruby that's ideal
<Cope>
will checkout bluepill
<Wolland>
there is also a gem ... I think it's called daemonize
Rix- has quit [Read error: Connection reset by peer]
<Wolland>
gotcha
lkba has left #ruby ["Leaving"]
<Cope>
ah ok - will chevk that out too; thanks all
<soahccc>
yeah I would recommend daemonize for this job but I don't know bluepills
chipotle has quit [Client Quit]
craigp has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
LekeFly has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<krainboltgreene>
dante was a good gem.
<krainboltgreene>
It made CLI things that needed to daemonize easy.
<chipotle>
what is ember.JS? does it work with ruby? is it advised?
charliesome has joined #ruby
<apeiros>
chipotle: ember.js is client side, ruby is server side. so no conflicts there.
<chipotle>
is it a competitor to angularJS?
<krainboltgreene>
Not technically.
<krainboltgreene>
Culturally yes.
tobago|work has quit [Client Quit]
cj3kim has joined #ruby
tobago|work has joined #ruby
<krainboltgreene>
AngularJS is a thing you use to build the framework you need. EmberJS is the framework people have put together for common tasks.
<chipotle>
ah, i see
tobago|work has quit [Client Quit]
<chipotle>
right now i'm learning ruby, my first programming language. should i take some time out of my day (i do 8 hours of ruby a day) to learn JS too, or should i wait until i've got ruby down?
Davey has quit [Quit: Computer has gone to sleep.]
tobago|work has joined #ruby
tobago|work has quit [Remote host closed the connection]
<krainboltgreene>
If you've got Rails developers who don't do much front-end but need a rich client, I'd say EmberJS has done a good job. If you have experienced front ends and need a rich client, I'd go with Angular.
dweeb_ has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
<krainboltgreene>
chipotle: Frankly whatever keeps you writing code is the best opion.
<krainboltgreene>
option*
pedda has joined #ruby
<krainboltgreene>
That's really the only thing that matters at that stage.
tobago has left #ruby [#ruby]
shedd has joined #ruby
tobago_ has quit []
tobago has joined #ruby
blackmesa has joined #ruby
<chipotle>
okay
<chipotle>
thanks :)
cj3kim has quit [Ping timeout: 245 seconds]
<amerine>
chipotle: Nah, man. krainboltgreene is wrong. You need to hand roll your ajax with a little jquery.
ewnd9 has quit [Ping timeout: 252 seconds]
m8 has quit [Quit: Sto andando via]
havenwood has quit [Remote host closed the connection]
<krainboltgreene>
Languagescale.
<shevy>
chipotle depends on what you use the languages for
havenwood has joined #ruby
<shevy>
I use ruby because it is pretty much the glue language I use on my computers
<shevy>
if I'd have a web-related job I'd probably have no real way to avoid javascript
shedd has quit [Ping timeout: 252 seconds]
dukz_ has joined #ruby
dyu1 has left #ruby [#ruby]
Shidash has quit [Ping timeout: 252 seconds]
Astralum has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
dukz has quit [Ping timeout: 260 seconds]
ghr has joined #ruby
jonah has joined #ruby
relix has joined #ruby
asmodlol has joined #ruby
<shevy>
"sharedmimeinfo.yml"
<shevy>
huh
_Andres has quit [Read error: Connection reset by peer]
<shevy>
is there a reliable way to get rid of the file suffix in general?
Kricir has joined #ruby
<nclx>
4/quit
nclx has quit [Quit: leaving]
<apeiros>
shevy: File has some methods, but I prefer just plain sub(/\.[^.]+/, '')
<apeiros>
whoops
jonah has quit [Ping timeout: 265 seconds]
<apeiros>
sub(/\.[^.]+\z/, '') # forgot the anchor
<canton7-mac>
of course, that'll also strip any path
<amerine>
Nobody ever shows String#chomp any love anymore.
<apeiros>
that's because String#chomp could only be used if you knew the specific suffix to strip
monkegjinni has joined #ruby
Kricir has quit [Ping timeout: 248 seconds]
<amerine>
apeiros: Obviously.
<canton7-mac>
there's File.extname for that
shredding has joined #ruby
<dweeb_>
I need a way for a non-programmer to write a snippet of code to calculate delivery fees for different stores. Any ideas how to do that in a simple way? Like store a string with "order_price > 100 then 0 else 10" and then compute it.
<lupine>
that takes you into expert knowledge systems ^^
<amerine>
dweeb_: Pull up a chair and let's talk about DSLs
<lupine>
you don't want to be there. honestly.
<shevy>
apeiros cool
<apeiros>
dweeb_: I think "simple way" won't really be possible with your requirement
<lupine>
simple way is to have a set of predefined rules into which users can slap numbers. if they want something not yet expressible as a rule, get a programmer to add a suitable rule
<shevy>
hmm
<lupine>
this is much, much less programming time
lemonsparrow has joined #ruby
CptJeanLucPicard has joined #ruby
CptJeanLucPicard has joined #ruby
<apeiros>
mhm, pattern matching a library of predefined routines. yeah, that'd certainly be relatively simple. can grow complex quickly too, though (input validation, dynamic number of inputs, referencing predefined inputs, etc.)
CoastGuard has joined #ruby
CoastGuard has quit [Client Quit]
CptJeanLucPicard has quit [Read error: Connection reset by peer]
CptJeanLucPicard has joined #ruby
yfeldblum has joined #ruby
ArchBeOS-work has quit [Ping timeout: 252 seconds]
canton7-mac has quit [Remote host closed the connection]
<shevy>
"CPAN, the Comprehensive Perl Archive Network, is an archive of over 124,000 modules of software written in the Perl programming language"
krz has joined #ruby
<shevy>
hmm ruby still has to catch up to perl in this regard
robbyoconnor has joined #ruby
<apeiros>
I'd prefer if it caught up in quality, not quantity.
<shevy>
true
* hoelzro
<3 CPAN
mikecmpbll has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
TMM has joined #ruby
TMM has quit [Changing host]
TMM has joined #ruby
<shevy>
what is with this "Processing documentation" thingy there
<shevy>
that takes like forever
<dweeb_>
lupine, apeiros: I was thinking maybe Using execjs. feed = ExecJS.eval "%d > 100 ? 0 : 15" % price
workmad3 has joined #ruby
nateberkopec has joined #ruby
<dweeb_>
fee*
<shevy>
"name_of_gem (version) is being processed. You'll be redirected when the pages are built, it shouldn't take much longer. "
<shevy>
like an endless loop that is...
blackmesa has quit [Ping timeout: 240 seconds]
<lupine>
dweeb_, careful with that
<lupine>
although
kung has joined #ruby
<lupine>
doing it client-side has some advantages, actually
vlad_starkov has quit [Remote host closed the connection]
<lupine>
I still wouldn't touch it with a bargepole
<apeiros>
dweeb_: how does that fit the "non-programmer" bill? but yes, sure. just make sure ExecJS doesn't allow any access to the ruby side of things. otherwise you have a glaring security hole.
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
<dweeb_>
apeiros: I guess a non-programmer still can type "price > x ? y : z" :)
iamdoo2 has joined #ruby
<apeiros>
dweeb_: can he figure the error messages too?
bradhe has joined #ruby
bubbajoness has joined #ruby
<dweeb_>
dweeb_: Probably not :o
bubbajones has quit [Remote host closed the connection]
bubbajoness has quit [Remote host closed the connection]
<apeiros>
dweeb_: also the above piece implies you wrap the JS, since that statement alone does nothing.
bubbajones has joined #ruby
Matriks has joined #ruby
monkegjinni has quit [Read error: No route to host]
<apeiros>
i.e., what variables do you provide? what happens with the output (always a single number?) etc.
top4o has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
nateberkopec has quit [Ping timeout: 272 seconds]
heftig has quit [Ping timeout: 252 seconds]
Advocation has joined #ruby
<dweeb_>
apeiros: Input var is the total price of the order and the output should be the delivery fee depending on the order value. Maybe I should just hardcode everything.
danijoo has joined #ruby
klaut has joined #ruby
iamdoo2 has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 252 seconds]
allen_on_c has quit [Quit: Leaving]
heftig has joined #ruby
Hiall has quit [Quit: hiall]
ndrei has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
greenarrow has joined #ruby
Wolland has quit [Remote host closed the connection]
nhhagen has joined #ruby
rtpg has joined #ruby
<rtpg>
is there a way to suppress output for one statement in irb?
ndrei has joined #ruby
krz has quit [Ping timeout: 252 seconds]
Kneferilis has quit [Quit: Leaving]
<hoelzro>
rtpg: expr ; nil
dweeb_ has quit [Quit: Computer has gone to sleep.]
<greenarrow>
whats the # name for RoR
<greenarrow>
I can't join it
<greenarrow>
Is it not #RubyOnRails?
<apeiros>
#rubyonrails, you probably have to register your nickname
<greenarrow>
Good point !
<greenarrow>
sorted.
DouweM has joined #ruby
noop has quit [Ping timeout: 272 seconds]
<rtpg>
hoelzro, thanks, good tip
bigkevmcd has quit [Quit: back to Glasgow :-)]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamdoo2 has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
ndrei has joined #ruby
pen has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
zxq9 has joined #ruby
ohwhoa has joined #ruby
yacks has joined #ruby
iamdoo2 has quit [Ping timeout: 252 seconds]
Kneferilis has joined #ruby
cj3kim has joined #ruby
nhhagen has quit [Remote host closed the connection]
Kneferilis has quit [Read error: Connection reset by peer]
mojjojo has joined #ruby
heftig has quit [Ping timeout: 252 seconds]
heftig has joined #ruby
mengu has quit [Remote host closed the connection]
shedd has joined #ruby
lars_nordfeld has joined #ruby
jlebrech has joined #ruby
robbyoconnor has quit [Ping timeout: 272 seconds]
alexfreidah has joined #ruby
DouweM has quit [Ping timeout: 252 seconds]
ewnd9 has quit [Ping timeout: 272 seconds]
noop has joined #ruby
Kneferilis has joined #ruby
sensen has quit [Ping timeout: 272 seconds]
francisfish has joined #ruby
zxq9 has quit [Ping timeout: 245 seconds]
sensen has joined #ruby
shedd has quit [Ping timeout: 252 seconds]
humani has joined #ruby
alexfreidah has quit [Ping timeout: 265 seconds]
Hiall has joined #ruby
_root has quit [Ping timeout: 248 seconds]
falood has quit [Remote host closed the connection]
<apeiros>
aniM: then you can do: `sorted = array.sort_by { |person| person.values.first[:demo_count] }`
daniel__ has joined #ruby
daniel__ has left #ruby [#ruby]
brennanMKE has quit [Ping timeout: 264 seconds]
gregoriokusowski has joined #ruby
<apeiros>
aniM: but your hashes seem to be badly set up. using the name as a key in each hash doesn't make using it easy.
<shevy>
aniM are you still there
<rtpg>
does Array#include? do something special with array of strings?
phansch_ has joined #ruby
<apeiros>
rtpg: no
<apeiros>
Array#include? uses == to compare array members
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has quit [Ping timeout: 245 seconds]
<rtpg>
because I tried writing a bsearch to replace an include? on a sorted list of strings , I thought it would be faster but ended up being a lot slower
<shevy>
"Returns true if the given object is present in self (that is, if any element == object), otherwise returns false."
<rtpg>
a bsearch { |entry| word<=>entry }
* aniM
absorbs all the answers
<shevy>
aniM we need to keep in mind: {} is for hash, [] is for array. what you wrote on the paste seems to be ... an array or a hash? because if it is a hash, it was missing the []
<shevy>
oops
<shevy>
if it was an array, it was missing the []
<aniM>
I initialized the variable with Hash.new
<aniM>
and I just I dumped it in my html view
<apeiros>
rtpg: include doesn't have to invoke a block, which is costly. so bsearch will only pay with larger arrays.
heftig has joined #ruby
phansch has quit [Ping timeout: 245 seconds]
<Hanmac1>
apeiros: instead of .values use this: sort_by{|n| n.first.last[:demo_count] }
Hanmac1 is now known as Hanmac
grimly has joined #ruby
<rtpg>
oh, good point
<apeiros>
Hanmac: I wanted to make it more evident that he's just using the first value
<apeiros>
with .first.last a reader has to put more thought into what's going on and why.
<aniM>
back in 5 minutes
<rtpg>
though my array is my /usr/share/dict/words file, so it's not that small, I would think
<apeiros>
rtpg: indeed
Senjai has quit [Ping timeout: 252 seconds]
<apeiros>
I'd expect bsearch to pay off with N > 100 already tbh
Senjai has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
blackmesa has quit [Remote host closed the connection]
<rtpg>
ruby arrays are actually arrays, right? as in contiguous arrays of memory? My cache might be big enough to store everything which would make an include pretty quick ...
<apeiros>
moshef: that question reeks of "doing it wrong"
<apeiros>
moshef: you can evaluate a piece of code in the context of an object using instance_eval
ewnd9 has joined #ruby
<moshef>
I know, I'm doing it wrong
danshultz has joined #ruby
RoxasShadowRS has joined #ruby
<apeiros>
you can't use another class' instance method in your class (unless you inherited it)
<moshef>
I'm trying to do a hack here
<apeiros>
you can share common methods by using modules and including them
jtdowney has joined #ruby
jtdowney has quit [Max SendQ exceeded]
<apeiros>
you didn't really tell us what problem you try to solve, though
jonah has quit [Ping timeout: 252 seconds]
<apeiros>
all you showed us is your way of solving it
simoz10 has quit [Ping timeout: 252 seconds]
<moshef>
fair enough, you don't have enough scope.
<moshef>
give me a moment then
<apeiros>
sure
<moshef>
how would you do that using instance eval tho?
<apeiros>
moshef: problem is with the "that"
<apeiros>
I still don't really know what "that" is
ewnd9 has quit [Max SendQ exceeded]
<apeiros>
class B; def hello; A.new.instance_eval do …this code runs in the context of an instance of A… end; end; end
ewnd9 has joined #ruby
<moshef>
the context is a rails method that uses respond_to
shedd has quit [Ping timeout: 248 seconds]
bambuka has joined #ruby
<moshef>
but when i try to call it from method B I'm getting an exception from rails, which i still didn't dig enough to understand where its getting from.I thought its due to the different context but I might e wrong
<apeiros>
moshef: I suggest you gist your code
<Hanmac>
apeiros: you can cheat with define method and proc ;P
<Hanmac>
>> class A;def hello;"hello from A";end;end;class B;define_method(:hello,&A.new.method(:hello));end;B.new.hello
<apeiros>
sorry, equivalent to String.new().[]('foo') # forgot to put the argument
<shevy>
I never saw String.new().[]() before
ewnd9 has quit [Ping timeout: 248 seconds]
<mikecmpbll>
^wat
brennanMKE has joined #ruby
shime has joined #ruby
<apeiros>
shevy: that's because it makes no sense to use that :)
<apeiros>
or use it that way
blackmesa has joined #ruby
<shevy>
lol
<shevy>
damn
<apeiros>
String.new itself is pretty pointless already
<shevy>
now I wish it would be possible
<shevy>
mikecmpbll imagine how it would look if we could combine it with ->() !
<apeiros>
the only use of it I've ever seen is when subclassing String
<mikecmpbll>
rofl
<Hanmac>
supclassing core classes in ruby is not soo a good idea ... :/
<Zap-W>
it's from "The ruby programming language book"
<apeiros>
indeed. but I've done so :)
<mikecmpbll>
why isn't it? btw
<shevy>
Zap-W normally people use [] right on an object. like: x = String.new 'abc'; x[1,1] # => "b"
<mikecmpbll>
not heard that before.
<apeiros>
the full rule is: only subclass core classes when you know what the f'ck you're doing ;-)
<mikecmpbll>
why why why why
<apeiros>
mikecmpbll: it's hard to not create a leaky subclass. e.g. if you inherit from Array, lots of methods will return an Array and you have to manually wrap it.
<shevy>
I am scared of subclassing hash and array
<mikecmpbll>
ahh, yes.
<apeiros>
Hanmac, mikecmpbll: the better rule is: don't subclass classes you don't own
<apeiros>
because that rule is universal
<soahccc>
Is there a ruby quiz or something? I have some good questions already :D
<shevy>
Hanmac don't subclass at all, instead work on rxw!
<apeiros>
mikecmpbll: also if you don't own the class, implementation may change at a whim, and your subclass may break
<shevy>
soahccc yes a channel online quiz all the time
<Hanmac>
shevy i will do today after the raid has reshaped
<mikecmpbll>
same applies to any dependency though
<shevy>
the raid?
<mikecmpbll>
that's a pretty weak argument
<mikecmpbll>
but the leakage stuff is valid.
<apeiros>
mikecmpbll: incorrect
<mikecmpbll>
why so?
<apeiros>
mikecmpbll: with dependencies you go via external contracts
<mikecmpbll>
elaborate ..
<apeiros>
with inheritance you can/should use internals, those are not ensured by any contract
<Hanmac>
shevy: i installed a new HDD into my Computer and now the RAID does need to reshape the data (reordering from 4 disks to 5 disks)
<apeiros>
Array#each "promises" to always iterate over all elements of an array, yielding one argument
<mikecmpbll>
i don't know what you mean by that i'm afraid.
<apeiros>
external contract
camilasan has quit [Ping timeout: 252 seconds]
<apeiros>
internal parts of Array, which you rely on in a subclass, do not make any promise. because they're internal.
<mikecmpbll>
still don't understand how that differs from using a gem and relying on that in any part of an application.
<apeiros>
the moment you go only via the external contract, there's no point in subclassing anymore. just use a delegate.
brennanMKE has quit [Ping timeout: 264 seconds]
chipotle has quit [Quit: cya]
<apeiros>
mikecmpbll: when you provide a gem, do you change its API on a whim?
<mikecmpbll>
gems change far more than ruby core libs change..
<apeiros>
I'm not talking about *change*
<apeiros>
I'm talking about *change of API*
<mikecmpbll>
then i've no idea what you are talking about.
<apeiros>
you can change a gem without ever changing the API
<shevy>
apples and bananas
<shevy>
it's all about them
<mikecmpbll>
what do you mean by API in this case? how the gem/lib is interacted with?
mavcunha has quit [Quit: Computer has gone to sleep.]
nhhagen has joined #ruby
Zap-W has quit []
<apeiros>
mikecmpbll: ok, different route - you know why you should not use private methods, right?
Macaveli has joined #ruby
<Hanmac>
shevy: why not both? *just image a apple in the from of a banana ;P *
<apeiros>
mikecmpbll: yes. the methods it documents and publicly provides. that's its API.
<mikecmpbll>
then my point remains the same
<ccooke>
The point of an API is to have a documentable, stable interface between projects. It serves to insulate dependant code from changes *within* the library providing the API
shime_ has joined #ruby
<mikecmpbll>
that changes far more in gems than it does in core libs
<apeiros>
ccooke: precisely
ndrei has quit [Ping timeout: 252 seconds]
shime has quit [Ping timeout: 260 seconds]
samuelkadolph has quit [Ping timeout: 246 seconds]
tejas has joined #ruby
<mikecmpbll>
if you upgrade Ruby and a core lib API changes I don't see how it's any different from upgrading a gem and the same thing happening.
<apeiros>
mikecmpbll: you're comparing the wrong thing.
pdtpatr1ck has quit [Ping timeout: 246 seconds]
relix has joined #ruby
<mikecmpbll>
[11:37:11] <apeiros> mikecmpbll: also if you don't own the class, implementation may change at a whim, and your subclass may break
<apeiros>
I, as a developer, have *zero* obligation to provide a stable internal way my stuff works. because *I* own it. and *you* are not supposed to use it.
<apeiros>
I, as a developer *have an obligation* to provide a stable external way my stuff works. because that's what *I* expose to *you* to work with. it's what enables you to use my stuff.
samuelkadolph has joined #ruby
<apeiros>
a better developer will do that better, a worse developer will fail at it. but that's how theory works vs. reality.
pdtpatr1ck has joined #ruby
<mikecmpbll>
i understand what you're saying, but i don't agree.
koaps has joined #ruby
Xeago has joined #ruby
<apeiros>
mikecmpbll: well, you asked for the reason why you shouldn't inherit from classes you don't own. that's it. whether you agree or disagree with it is - of course - up to you.
<mikecmpbll>
it is :)
<mikecmpbll>
thanks for providing your answer
bradhe has joined #ruby
<apeiros>
similar rationale as with private methods btw.
<canton7>
C# has an "internal" access modifier - only stuff in my library has access to this method. if ruby had (could have?) an equivalent, then this argument would be moot :P
<apeiros>
canton7: I love that ruby doesn't try to hold the developers hands
cj3kim has joined #ruby
sensen has quit [Quit: leaving]
<Xeago>
canton7: access modifiers in C# don't do shit btw
Beoran_ has joined #ruby
<apeiros>
if you aim a rocket launcher at your foot, it happily lets you pull the trigger. and IMO that's good :)
<canton7>
but ruby has private?
<apeiros>
yes, which is mostly advisory
<apeiros>
see __send__
<Hanmac>
canton7: "private" in ruby can be highjacked ,P
<apeiros>
you can also mark constants private now
<Xeago>
Hanmac: same with C#
<canton7>
but it's a way of saying "this method is part of the internal implementation. sure you can use it, but it might break"
<canton7>
same would go for "internal"
<apeiros>
you can also just use Module#public to revert the private statement :)
nateberkopec has quit [Ping timeout: 272 seconds]
<apeiros>
canton7: yes. agreed.
<Hanmac>
apeiros: except the class itself is frozen
<canton7>
sure, I agree with all of that - the point is someone can't complain if a method marked private changes :P
<apeiros>
canton7: ruby allows you to communicate intent. which is good.
<apeiros>
canton7: but ruby doesn't enforce intent. which is also good.
<canton7>
agreed on both counts
<canton7>
I never disagreed with those
Squarepy has joined #ruby
<apeiros>
good :D
moshef has quit [Quit: moshef]
<mikecmpbll>
indeed.
<apeiros>
I quite love that aspect of ruby
<mikecmpbll>
moshef got bored ^
<apeiros>
"do whatever the fuck you please". yes, I will, thank you :D
<canton7>
but having an access modifier which says "it's ok for me to use this in my subclasses, but you shouldn't" is also a useful thing :P
<apeiros>
canton7: ah, ok
<apeiros>
canton7: didn't get understood that you meant that
<apeiros>
canton7: ok, yes, agreed. if we had means to communicate proper ways of subclass, that'd be nice.
<apeiros>
*of subclassing
<shevy>
soahccc, awesome link
<canton7>
then Array could happily be subclassed, and its internals used, by other stdlib classes, but third parties can't complain if those internals break
<shevy>
I never saw: require 'fiddle' before
yfeldblum has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<soahccc>
shevy: yeah quite interesting. I have a lot of such links in my head (more or less). I need to finish my blog sometimes
<apeiros>
well, with ruby core it's relatively easy since the internals are in C and thusly not reachable from ruby. but assuming pure ruby classes - agreed.
cj3kim has quit [Ping timeout: 248 seconds]
<canton7>
anyway, that's all I was trying to say :)
<apeiros>
then again, I'd probably be lazy and just mark everything internal :D
<shevy>
soahccc one good blog from you in one year!
<apeiros>
canton7: thanks for explaining. I understand now :)
* apeiros
thinks subclassing is overrated anyway
<canton7>
no problem, when I finally managed to make myself clear :P
danijoo has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
<apeiros>
when I count the classes where I don't inherit at all, vs. classes where I inherit forcedly (e.g. AR::Base) which could be solved differently, vs. classes where I'm willingly subclass…
therod has quit [Ping timeout: 272 seconds]
danijoo has joined #ruby
<canton7>
I used it far more to fix someone else's library, than for architectural reasons :P
<apeiros>
I think the ration is somewhere around 100:20:1
<Hanmac>
tayzlor: you can also try the #capistrano channel if you didnt try to ask there yet
<tayzlor>
Hanmac: yup - thanks, asked there too, buts its very quiet
chipotle has quit [Ping timeout: 245 seconds]
<Hanmac>
tayzlor: "require " ... did you try "require_relative" ?
havenwood has quit [Ping timeout: 264 seconds]
ganesh has joined #ruby
ganesh is now known as Guest89887
alexfreidah has joined #ruby
mikepack has joined #ruby
<pontiki>
ah, yah, it's a require issue, really
<tayzlor>
ah, doh!
<tayzlor>
Hanmac++
<pontiki>
you can add root to your load path in the Cap file, or use require_relative
<pontiki>
application root i mean
* Hanmac
is now known as Hanmad
chipotle has joined #ruby
<pontiki>
Hanmac.prev
larissa has joined #ruby
iamdoo2 has joined #ruby
therod has joined #ruby
pen has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
freidahpatch has quit [Ping timeout: 264 seconds]
chipotle has quit [Ping timeout: 245 seconds]
MrZYX|off is now known as MrZYX
zoscoy has joined #ruby
Davey has joined #ruby
greenarrow has quit [Quit: 500]
iamdoo2 has quit [Ping timeout: 240 seconds]
olivier_bK has quit [Ping timeout: 252 seconds]
therod has quit [Ping timeout: 248 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
pen has quit [Ping timeout: 252 seconds]
r0bby_ has joined #ruby
bluenemo has joined #ruby
Elhu has joined #ruby
ahmedelgabri has joined #ruby
ktosiek_ has joined #ruby
shime has joined #ruby
alexfreidah has quit [Ping timeout: 252 seconds]
nine_ has joined #ruby
ktosiek has quit [Ping timeout: 252 seconds]
angusigu1ss has joined #ruby
therod has joined #ruby
TheLarkInn has joined #ruby
ahmedelg_ has quit [Ping timeout: 248 seconds]
<TheLarkInn>
'
<TheLarkInn>
oops Hello ruby friends!
mavcunha has joined #ruby
<nine_>
Hi, can I ask for help with following code line ---> root to: "welcome#index" <---- I'm not sure what exactly is happening there. I guess root is a method called with ommited parantheses, but what is to: "sth"? It can't be a hash neither method invocation. Can I ask for explanation?
<canton7>
it is a hash
<canton7>
original: root({:to => "welcome#index})
<canton7>
then there's some hash syntax to ease having symbols as keys: root({to: "welcome#index"})
<canton7>
then you can skip the {}, since that has to be a hash
vlad_starkov has quit [Remote host closed the connection]
ewnd9 has joined #ruby
<TheLarkInn>
maybe I switch to using global gemsets?
Amart41 has quit [Ping timeout: 245 seconds]
cj3kim has joined #ruby
maligree has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<MrZYX>
TheLarkInn: try rvmsudo
<MrZYX>
but otoh you most likely don't want to run a ruby application directly on port 80 but rather reverse proxy it with something
maligree has left #ruby [#ruby]
chipotle has joined #ruby
<TheLarkInn>
well in this case i do, its just an api for an interoffice network
AlSquirrel has joined #ruby
<TheLarkInn>
on a local machine
chipotle has quit [Read error: Connection reset by peer]
bluenemo has quit [Remote host closed the connection]
chipotle has joined #ruby
senayar has joined #ruby
Amart41 has joined #ruby
yfeldblum has joined #ruby
krz has joined #ruby
sailias has joined #ruby
cj3kim has quit [Ping timeout: 272 seconds]
havenwood has joined #ruby
drumusician has joined #ruby
shedd has joined #ruby
danshultz has joined #ruby
tkuchiki has quit [Remote host closed the connection]
arietis has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
sailias has quit [Ping timeout: 272 seconds]
lkba has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
Virtualize|away has joined #ruby
Elhu has joined #ruby
poulson has quit [Ping timeout: 252 seconds]
sepp2k has joined #ruby
shedd has quit [Ping timeout: 252 seconds]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has quit [Remote host closed the connection]
poulson has joined #ruby
IceyEC has joined #ruby
Virtualize|away has quit [Ping timeout: 245 seconds]
aspiers has quit [Ping timeout: 245 seconds]
zeeraw has joined #ruby
greenarrow has joined #ruby
<TheLarkInn>
rvmsudo gem install and rvmsudo ruby app.rb did the trick
<TheLarkInn>
Thank you very much MrZYX
nari has joined #ruby
shaunbaker has joined #ruby
nowthatsamatt has joined #ruby
nowthatsamatt has quit [Client Quit]
IceyEC has quit [Quit: IceyEC]
<TheLarkInn>
anyone mess with xmpp4r or xmpp4r-simple with ruby 2.0 + before?
IceyEC has joined #ruby
mengu has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
pranny has quit [Quit: Leaving.]
jonah has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
camilasan has joined #ruby
shime has quit [Ping timeout: 265 seconds]
mojjojo has quit [Quit: mojjojo]
camilasan has quit [Remote host closed the connection]
camilasa_ has joined #ruby
akam-it has joined #ruby
phansch has joined #ruby
mikepack has joined #ruby
dkamioka has joined #ruby
jonah has quit [Ping timeout: 272 seconds]
gnephiak has joined #ruby
mojjojo has joined #ruby
pen has joined #ruby
crazymykl has quit [Remote host closed the connection]
crazymykl has joined #ruby
iamdoo2 has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
pen has quit [Read error: Connection reset by peer]
yacks has quit [Ping timeout: 264 seconds]
pen has joined #ruby
ewnd9 has quit [Ping timeout: 245 seconds]
yacks has joined #ruby
<shevy>
gem install coderay-1.1.0.gem
<shevy>
ERROR: While executing gem ... (Errno::EINVAL)
<shevy>
Invalid argument
joonty_ has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
<shevy>
Gem version: 2.2.0
<shevy>
hmm
joonty has quit [Ping timeout: 265 seconds]
gnephiak has quit [Remote host closed the connection]
Al1_andre has joined #ruby
gnephiak has joined #ruby
iamdoo2 has quit [Ping timeout: 272 seconds]
pen has quit [Ping timeout: 245 seconds]
chipotle has quit [Quit: cya]
<shevy>
how do I install gems on ruby 2.1.0 ?
lifestream has joined #ruby
lifestream has joined #ruby
Sawbones has joined #ruby
mupkoo has joined #ruby
mark_locklear has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
tesuji has joined #ruby
greenarrow has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
ndrei has joined #ruby
ckinni_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
securitycrush has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<Hanmac>
shevy: "gem install coderay-1.1.0.gem" works for me ;P
RaCx_ has joined #ruby
root has joined #ruby
yfeldblum has joined #ruby
root is now known as Guest63695
aniM has quit [Ping timeout: 272 seconds]
RaCx has quit [Ping timeout: 272 seconds]
RaCx_ is now known as RaCx
Guest63695 has quit [Client Quit]
maoko has joined #ruby
_root has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<maoko>
Hi guys. Is there a way to use =~ /some pattern/ within case...when conditions?
jkamenik has joined #ruby
Xeago_ has joined #ruby
droid has joined #ruby
nateberkopec has joined #ruby
monkegjinni has joined #ruby
<Hanmac>
maoko: case val when /some pattern/
krz has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
LekeFly has joined #ruby
<apeiros>
maoko: `case subject when condition then … end` tests the when by doing `condition === subject` (note which one is the receiver and which the argument!)
<TheLarkInn>
is there a way to controll STDOUT is saved when running an application with Process.daemon
garybrett has joined #ruby
mlpinit has joined #ruby
brennanMKE has joined #ruby
<apeiros>
maoko: and Regexp#=== is the same as =~. that's why what Hanmac suggested works.
francisfish has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
<apeiros>
TheLarkInn: you can reassign $stdout. e.g. $stdout = File.open('mylogfile.txt', 'a')
<shevy>
Hanmac yeah does not work for me
Xeago has quit [Ping timeout: 248 seconds]
Xiti has quit [Ping timeout: 248 seconds]
<shevy>
Hanmac so much for trying to switch to 2.1.0, gem install works fine on 1.9.x I'll be going back to 1.9.x
tjsousa has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
tjsousa has joined #ruby
garybrett has quit [Quit: Leaving...]
Advocation has joined #ruby
RaCx has quit [Ping timeout: 252 seconds]
shime has joined #ruby
w4pm has quit [Read error: Operation timed out]
mercwithamouth has joined #ruby
gnephiak has quit [Read error: Connection reset by peer]
RaCx has joined #ruby
gnephiak has joined #ruby
bubu has joined #ruby
tjsousa has quit [Ping timeout: 253 seconds]
rx has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
Butcho has joined #ruby
zahna has quit [Ping timeout: 272 seconds]
tyl has quit [Ping timeout: 248 seconds]
zahna has joined #ruby
noop has quit [Ping timeout: 240 seconds]
tyl has joined #ruby
whowantstolivef3 is now known as whowantstolivefo
blassin has joined #ruby
<blassin>
hey
rtpg has joined #ruby
<blassin>
is is possible to change a block's parameters once "captured" ?
Megtastique has quit []
twopoint718 has joined #ruby
twopoint718 has joined #ruby
<bubu>
Hey guys, kinda new to ruby an initilaising objects. I'd like to use initialize to create an s3 object for use in a script like: https://gist.github.com/anonymous/8598764
<hoelzro>
blassin: for example?
<bubu>
any ideas?
<blassin>
hoelzro: for example, imagine I'm doing Rack::Test tests, and I want to do GETs on a subdomain
MrSamuel has joined #ruby
<blassin>
so I create a helper method def on_subdomain name, &block ; block.call(... something?) ; end
securitycrush has quit [Ping timeout: 240 seconds]
<blassin>
and then I do on_subdomain :whatever do ; get '/' ; end
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
interactionjaxsn has joined #ruby
<bubu>
shevy: thanks but not really what I'm after. I don't want to make lots of 'expensive' calls to s3. I'd rather initialize an s3 object and pass that into my method..
<shevy>
bubu dunno. We'd have fundamental aims or goals when using ruby. I never try to optimize for speed much at all, if things work I am usually happy and move on to do other things
nateberkopec has joined #ruby
<bubu>
Aye, really struggling to instantiate the s3 object
<bubu>
:(
bradhe has quit [Ping timeout: 245 seconds]
<shevy>
I thought optimization is the problem, now you say you can't even instantiate it :P
Uranio has joined #ruby
Speed has left #ruby ["WeeChat 0.4.2"]
coderhs has quit [Ping timeout: 272 seconds]
duggiefresh has quit [Read error: Connection reset by peer]
<shevy>
I started "s3sh"
<shevy>
/usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require':LoadError: cannot load such file -- /usr/bin/../lib/aws/s3
<shevy>
I have no confidence that this library is any good
duggiefresh has joined #ruby
afhammad has quit []
brennanMKE has joined #ruby
glen has joined #ruby
aryaching has quit []
mengu has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
<glen>
hi. i have list of ip addresses, i would like to put addresses into two arrays based on what some other function returns (that other function is here: https://gist.github.com/bmc/2728451) any nice code for that?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
glen: your method returns true/false?
<jasonsmr>
definatlyy a gem method
yfeldblum has joined #ruby
LiohAu has joined #ruby
<apeiros>
(or trueish/falsish)
therod has joined #ruby
<bubu>
lol shevy
<glen>
yes, true and false, but can make it return something else
<bubu>
shevy: I want to instantiate it, in order to optimise..
Xeago_ has quit [Remote host closed the connection]
<bubu>
How can I instantiate and use the s3 object?
<LiohAu>
is there anybody using ruby on windows ? How do you pass environement vars to ruby when executing a ruby application on windows ? (the equivalent of the command : VAR='value' app in a linux/osx shell)
<apeiros>
glen: sorry, got distracted, but I see somebody already pointed you to Enumerable#partition
gnephiak has quit [Remote host closed the connection]
<rAad>
workmad3: oh right, thanks
<workmad3>
rAad: try subject.paw instead?
gnephiak has joined #ruby
<Hanmac>
rAad: "Cat.paw" is a class method not a instance method
CptJeanLucPicard is now known as ArchBeOS-work
<workmad3>
Hanmac: too slow ;)
<workmad3>
Hanmac: this time I'm the thunder-stealer :P
heftig has quit [Ping timeout: 240 seconds]
zenhob has joined #ruby
<glen>
apeiros: YEP. Thx
sassamo has quit [Remote host closed the connection]
<workmad3>
rAad: btw, a good way to diagnose that sort of error is to call Cat.paw in the test outside of the expect{} block, so you can see what exception got raised
burlyscudd has joined #ruby
sassamo has joined #ruby
bean__ has joined #ruby
skaflem has quit [Quit: Leaving]
yasushi has quit [Remote host closed the connection]
glen has left #ruby [#ruby]
<MrZYX>
hm, btw. does somebody know the reason rspec deprecated giving a specific error class to to_not raise_error? This is a good example on why it could be useful
Baluse has quit [Ping timeout: 264 seconds]
enebo has joined #ruby
<rAad>
MrZYX: I found that odd when I saw it
<apeiros>
the reason is: rspec
<workmad3>
MrZYX: no idea... it seemed really odd to me
Baluse has joined #ruby
<apeiros>
sorry, biased against rspec.
aryaching has joined #ruby
rAad has left #ruby [#ruby]
alexherbo2 has joined #ruby
IceDragon has joined #ruby
yasushi has joined #ruby
krz has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
freezey has quit [Remote host closed the connection]
therod has joined #ruby
<jeffleeismyhero>
I'm trying to setup a new machine with Boxen, and some dot files (https://github.com/mathiasbynens/dotfiles). I'm having success for most things but not with rbenv (I've always used rvm)
freezey has joined #ruby
<workmad3>
ooh... that's what they deprecated... not_to raise_error(SomeExceptionClass)
<MrZYX>
wait, not_to and to_not aren't aliases?
<jeffleeismyhero>
When I try to install gems (with rbenv-gemset) it seems to be (trying to) installing them globally.
<workmad3>
MrZYX: probably... but it's different from to
<MrZYX>
my question was why the remove it for to_not/not_to
<MrZYX>
*they
<workmad3>
I'm guessing because it's a PITA? :)
relix has quit [Client Quit]
<workmad3>
I'd not realised it was just the not_to they'd removed it from
nhhagen has quit [Remote host closed the connection]
krz has quit [Ping timeout: 265 seconds]
henkalni has joined #ruby
pierre1 has joined #ruby
yosafbridge has quit [Read error: Operation timed out]
<workmad3>
MrZYX: I'd guess that the rspec devs are pushing home the point that a not_to raise_error(SpecificClass) should be rewritten as a comparable to raise_error(OtherSpecificClass)
yosafbridge has joined #ruby
<workmad3>
MrZYX: or a general not_to raise_error
therod has quit [Ping timeout: 252 seconds]
end_guy has quit [Ping timeout: 240 seconds]
yalue has quit [Ping timeout: 248 seconds]
mgorbach has quit [Ping timeout: 248 seconds]
rf has quit [Ping timeout: 248 seconds]
henkalni has quit [Client Quit]
end_guy has joined #ruby
mgorbach has joined #ruby
yalue has joined #ruby
St_Marx has quit [Ping timeout: 245 seconds]
rf has joined #ruby
bal has quit [Quit: bal]
Deejay_ has quit [Quit: Computer has gone to sleep.]
bbloom has joined #ruby
shedd has joined #ruby
pen has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
jtdowney has quit []
gja has quit [Quit: This computer has gone to sleep]
dkamioka has joined #ruby
lmickh has joined #ruby
gja has joined #ruby
sambao21 has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
CogitoErgoSum has joined #ruby
larissa has quit [Ping timeout: 240 seconds]
larissa has joined #ruby
shedd has quit [Ping timeout: 248 seconds]
therod has joined #ruby
band has joined #ruby
<band>
Hello. I got stuck at "Getting started with rails" tutorial (http://guides.rubyonrails.org/getting_started.html). I'm getting ActiveModel::ForbiddenAttributesError in PostsController#create error even after I have defined def post_params params.require(:post).permit(:title, :text). Do you have any ideas what am I doing wrong?
illbyte has quit [Quit: Connection closed for inactivity]
sparrovv has quit [Remote host closed the connection]
<MrZYX>
asking #ruby for #RubyOnRails stuff might be one thing ;)
sambao21 has quit [Client Quit]
_maes_ has joined #ruby
mikesplain_ has joined #ruby
axl_ has joined #ruby
mikesplain has quit [Ping timeout: 272 seconds]
mikesplain_ is now known as mikesplain
<LiohAu>
can anybody tell me what this error : "superclass mismatch for class FormPage <TypeError>" means ?
Deejay_ has joined #ruby
ganesh has joined #ruby
ganesh is now known as Guest51955
Megtastique has joined #ruby
<MrZYX>
Wasn't that a Rails error?
<band>
MrZYX: i have to be identified to ask there
mikepack has joined #ruby
<MrZYX>
band: yes, /msg NickServ help
therod has quit [Ping timeout: 252 seconds]
<MrZYX>
LiohAu: oh, just happening more regulary with their autoloading. it means you're doing class FormPage; end; class FormPage < Something; end;
gnephiak has quit [Remote host closed the connection]
gnephiak has joined #ruby
yacks has quit [Remote host closed the connection]
<LiohAu>
MrZYX: so I should find two "class FormPage" in my code right ?
<MrZYX>
your code or code you include
<LiohAu>
ok so it seems that the requires options I'm using are ignored on windows
<LiohAu>
because the same code is working on osx
mojjojo has quit [Quit: mojjojo]
dukz has quit [Remote host closed the connection]
<LiohAu>
it seems that my form_page_ios.rb AND my form_page_android.rb are loaded at the same time on windows, while they are not on OSX, but I don't know if it is a cucumber problem, or a ruby problem
kiri has quit [Ping timeout: 245 seconds]
sassamo has joined #ruby
dukz has joined #ruby
pen has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 264 seconds]
deception has joined #ruby
kiri has joined #ruby
_maes_ has quit [Ping timeout: 260 seconds]
kpshek_ has joined #ruby
FL1SK has joined #ruby
kpshek has quit [Ping timeout: 252 seconds]
kpshek_ is now known as kpshek
senj has joined #ruby
SCommette has quit [Ping timeout: 248 seconds]
<LiohAu>
MrZYX: any idea? maybe you're a cucumber user ? (even if looking at the stack trace it looks like it is ruby that is failing the require)
<MrZYX>
I'm not a windows user
<MrZYX>
nor a OS X user
angusigu1ss has joined #ruby
pushpak has joined #ruby
<LiohAu>
ok :(
SCommette has joined #ruby
troessner has quit [Quit: Leaving]
thesheff17 has joined #ruby
therod has joined #ruby
TheDick has joined #ruby
agjacome has joined #ruby
bradhe has joined #ruby
pel_daniel has joined #ruby
<shevy>
MrZYX yay \o/
<shevy>
as long as you aren't a debian user ...
cj3kim has joined #ruby
<MrZYX>
nah...
<MrZYX>
neither ubuntu ;)
cjsarette has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
zegerjan has joined #ruby
angusigu1ss has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
iamdoo2 has joined #ruby
therod has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 245 seconds]
fijimunkii has joined #ruby
gnephiak has quit [Remote host closed the connection]
rayners has joined #ruby
iMe has quit [Ping timeout: 248 seconds]
gnephiak has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
gja has quit [Quit: This computer has gone to sleep]
<shevy>
OS X is the true hipster OS
dfranciosi has quit [Remote host closed the connection]
gja has joined #ruby
iamdoo2 has quit [Ping timeout: 252 seconds]
jack_rabbit has joined #ruby
securitycrush has joined #ruby
alexfreidah has joined #ruby
mojjojo has joined #ruby
blackmesa has joined #ruby
Squarepy has quit [Quit: Leaving]
blackmesa has quit [Remote host closed the connection]
pen has joined #ruby
blackmesa has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tommyblue has quit [Quit: Coyote finally caught me]
pen has quit [Client Quit]
shedd has joined #ruby
<sailias>
MrZYX is a slackware user
alexfreidah has quit [Ping timeout: 260 seconds]
Amart41_ has quit []
AndrewMartin has joined #ruby
therod has joined #ruby
AndrewMartin is now known as Amart41
ndrei_ has quit [Read error: Operation timed out]
shaunbak_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
band has quit [Quit: Page closed]
<shevy>
\o/
<shevy>
slackers know their things
lars_nordfeld has quit [Quit: Leaving]
mikepack_ has joined #ruby
arietis has joined #ruby
fire has quit [Quit: WeeChat 0.4.1]
kevind has joined #ruby
fire has joined #ruby
einarj has quit [Remote host closed the connection]
scarolan_ has joined #ruby
therod has quit [Ping timeout: 252 seconds]
mojjojo has quit [Read error: Connection reset by peer]
fire is now known as fire_
mikepack has quit [Ping timeout: 252 seconds]
Chira_Miso has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
noname001__ has quit [Ping timeout: 272 seconds]
enebo has quit [Quit: enebo]
jasonsmr has quit [Quit: Leaving]
snath has joined #ruby
fijimunkii has quit [Ping timeout: 264 seconds]
* IceDragon
tackles shevy
mojjojo has joined #ruby
dblessing has quit [Quit: dblessing]
x77686d has quit [Quit: x77686d]
mikesplain_ has joined #ruby
scarolan has quit [Ping timeout: 260 seconds]
mikesplain has quit [Ping timeout: 245 seconds]
mikesplain_ is now known as mikesplain
cj3kim has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
Davey has joined #ruby
rtpg has quit [Read error: Operation timed out]
<ReinH>
> M.fromList [(1,1)]
<ReinH>
woops
Fire-Dragon-DoL has joined #ruby
dblessing has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danshultz has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
tyl has joined #ruby
tauebel1 has joined #ruby
securitycrush has quit [Ping timeout: 240 seconds]
kevinykchan has quit [Ping timeout: 252 seconds]
gnephiak has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
dkamioka has joined #ruby
gnephiak has joined #ruby
tauebel has quit [Ping timeout: 245 seconds]
swingha has joined #ruby
_maes_ has joined #ruby
weems has joined #ruby
jack_rabbit has joined #ruby
Advocation has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
Mon_Ouie has joined #ruby
arctarus has quit [Quit: Leaving]
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
freezey has joined #ruby
cj3kim has quit [Ping timeout: 272 seconds]
duggiefresh has joined #ruby
tauebel1 has quit [Read error: No route to host]
havenwood has quit []
tauebel has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
lfox has joined #ruby
<shevy>
anyone uses ruby to backup data?
therod has joined #ruby
jailbot has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
<pragmatism>
Morning all, happy Friday
<shevy>
hi pragmatism
<shevy>
will you release any gems today?
newbie has joined #ruby
blackmesa has joined #ruby
Matriks has quit [Remote host closed the connection]
newbie is now known as Guest39285
<Guest39285>
Newb question, i've learned how blocks and Proc's work, but not sure how I should be using them in a practical sense, i.e. where they are applicable
<pragmatism>
shevy: Nah, but I'll spend a lot of time complaining about event machne
<shevy>
Guest39285 do you know what you can do with a block in ruby
r0bby_ is now known as robbyoconnor
dkamioka has left #ruby [#ruby]
therod has quit [Ping timeout: 240 seconds]
<Guest39285>
Yes, I can pass the block parameters and get something back
<Guest39285>
But I'd like a practical example of writing a method that accepts a block
<shevy>
no I mean
tylersmith has joined #ruby
<shevy>
can you show a working example of how you use a block?
<shevy>
any example
<Guest39285>
3.times do |x| puts x; end
cong2 has joined #ruby
<shevy>
yes!
<shevy>
now is that not practical already
<Guest39285>
I mean writing a method that accepts a block
<Guest39285>
I get how to use them
<shevy>
what method did you use above in your example
ewnd9 has quit [Ping timeout: 240 seconds]
<Guest39285>
the times method
<shevy>
yes!
<Guest39285>
on Integer class
<Guest39285>
instance
<MrZYX>
Guest39285: do you have any prior programming experience? Ever heard of the template method pattern?
<shevy>
I can see you are not a noob
tkuchiki has quit [Remote host closed the connection]
f0ster has quit [Ping timeout: 245 seconds]
tobago has quit [Remote host closed the connection]
brunops has joined #ruby
<Guest39285>
Lol
<shevy>
Guest39285 to tap into a block, you can use something like this here, without the quotes: "yield if block_given?"
<Guest39285>
I do, I have Java experience
<shevy>
yield will yield the content of the block you pass to a method
<Senjai>
MrZYX: Why does the template method pattern apply here?
senayar_ has joined #ruby
<shevy>
block_given? checks if a block was given to a method in ruby
rtpg has quit [Ping timeout: 272 seconds]
octoberry has joined #ruby
<Guest39285>
I understand how to use the block in a method. I'm looking for practical examples in terms of when to use method blocks
<Senjai>
MrZYX: Template Methods != blocks
<MrZYX>
Guest39285: Senjai: in ruby you do that best with blocks, not with inheritance
<shevy>
Guest39285 and in ruby, every method accepts one block
Guest40504 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
albertgrala has joined #ruby
<shevy>
Guest39285 so to answer your question, "yield" is the thing you want
yfeldblum has joined #ruby
SilentHobo has joined #ruby
albertgrala has quit [Read error: Connection reset by peer]
<Guest39285>
I guess I'm asking about Design Patterns in Ruby
klaut has quit [Remote host closed the connection]
<shevy>
well see
<shevy>
given that every method accepts a block
<shevy>
all times
dukz has quit [Remote host closed the connection]
<Guest39285>
I feel I do my Ruby coding in a Java way, i.e. statically typed
<Senjai>
whether or not that method uses the block *
twopoint718 has quit [Ping timeout: 265 seconds]
aniM has quit [Ping timeout: 265 seconds]
gnephiak has quit [Remote host closed the connection]
<Guest39285>
i write methods that don't use blocks
<shevy>
it means you get an additional argument in for freee
<shevy>
you can also use it like a finalizer
<shevy>
in File.open() {}
EngierkO_ has quit [Remote host closed the connection]
gnephiak has joined #ruby
mocfive has joined #ruby
<Senjai>
Guest39285: You shouldn't be asking, how can I code using blocks? You should be asking, given problem x, is there a better way to refactor it using the advantages ruby provides over other languages?
<shevy>
Guest39285 yes most of my methods don't need blocks either
<MrZYX>
Guest39285: if you have little example programs you did for learning ruby, feel free to post them here and almost all the time someone will show you a "more ruby" version of it
<shevy>
Guest39285 I can give you one example of how I use blocks
<shevy>
no wait, there is a better one
<shevy>
the ruby cgi library
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mark_locklear has quit [Ping timeout: 245 seconds]
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hobogrammer_ has quit [Ping timeout: 245 seconds]
senayar_ has quit [Ping timeout: 245 seconds]
carraroj has quit [Ping timeout: 245 seconds]
<shevy>
cgi.html() do
mikepack has quit [Remote host closed the connection]
<shevy>
the example is awful
<shevy>
but you get the idea:
<shevy>
html() {
<shevy>
}
subbyyy_ has joined #ruby
<shevy>
html {
<shevy>
}
<shevy>
ok?
<Senjai>
shevy: RSpec.configure do |config|
EngierkO has joined #ruby
securitycrush has joined #ruby
mikepack has joined #ruby
<shevy>
Guest39285 you get the closing tag for free!
recurrence has quit [Ping timeout: 248 seconds]
<shevy>
and you could pass in regular arguments too
brunops has quit [Quit: leaving]
x77686d has quit [Quit: x77686d]
<shevy>
div(:margin => :5px) { 'wtf is this here' }
<Guest39285>
i see
<Guest39285>
thanks for the info
therod has joined #ruby
Fractional has joined #ruby
<shevy>
<div style="margin: 5px">wtf is this here</div>
<MrZYX>
Guest39285: another good example of using blocks are things like File.open, giving a block to it will make sure that the file gets closed, no matter what happens
mikepack has quit [Read error: Connection reset by peer]
<Fractional>
CSS in the Ruby IRC? What? :O
<shevy>
yeah Fractional
octoberry has quit [Ping timeout: 240 seconds]
<shevy>
as example :D
mikepack has joined #ruby
<Guest39285>
I see
<Senjai>
Or logging
<Guest39285>
So basically, anything I need to wrap around
<Senjai>
my_logger.log "Trying to do x" { do_x }
twopoint718 has joined #ruby
<Senjai>
and you can log the output that way
<shevy>
Guest39285 if you want to
<shevy>
Guest39285 you just need to realize the additional flexibility with blocks
<Senjai>
or run_callbacks(:updating_something) { update_something }
eka has quit [Ping timeout: 252 seconds]
<shevy>
yes. callbacks!
<MrZYX>
Guest39285: wrapping and data acquisition from the user are the two main usages, yeah
jlast has quit [Read error: Connection reset by peer]
i_s has joined #ruby
<pragmatism>
Just use a Cron job and a rake task. Voila, backup
ctp_ has joined #ruby
<pragmatism>
or Thor, really
ctp_ has quit [Client Quit]
jlast has joined #ruby
danshultz has joined #ruby
bambuka has quit [Ping timeout: 252 seconds]
<cong2>
i hate when they have a dozen dependencies. like the wordnik gem. that's why i rolled out my own. http://cxg.de/_a0a473.htm
freezey has quit [Remote host closed the connection]
<shevy>
hmm but the cron syntax is so ugly
IceDragon has joined #ruby
<Senjai>
shevy: delayed_job
<MrZYX>
shevy: check the whenever gem ;P
jonah_ has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
<pragmatism>
whenever is rad
<pragmatism>
Super awesome
olivier_bK has joined #ruby
terrellt_ is now known as terrellt
ctp has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
jonah has quit [Ping timeout: 264 seconds]
mark_locklear has joined #ruby
jbueza has joined #ruby
jonah has joined #ruby
RaCx has joined #ruby
tayzlor has quit [Read error: Operation timed out]
Spami has joined #ruby
sparrovv has joined #ruby
codezomb has joined #ruby
dfranciosi has quit [Remote host closed the connection]
jonah_ has quit [Ping timeout: 245 seconds]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
vpretzel has quit [Remote host closed the connection]
vpretzel has joined #ruby
tvw has quit []
fijimunkii has joined #ruby
daxroc has joined #ruby
jlast has quit [Remote host closed the connection]
gregoriokusowski has joined #ruby
gregoriokusows-1 has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby
lfox has quit [Quit: ZZZzzz…]
smathieu has quit [Remote host closed the connection]
jlast has joined #ruby
Al1_andre has quit [Quit: Ex-Chat Timed out]
mansi has quit [Ping timeout: 272 seconds]
smathieu has joined #ruby
vpretzel_ has joined #ruby
vpretzel has quit [Disconnected by services]
vpretzel_ is now known as vpretzel
nanoyak has joined #ruby
mikepack has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
ckinni has joined #ruby
mikepack has joined #ruby
punter has joined #ruby
heidi has joined #ruby
<punter>
Is "Programming Ruby" by Pragmatic, a good way to start learning Ruby? (I'm a programmer, coming from perl)
iamdoo2 has joined #ruby
ckinni has quit [Client Quit]
x77686d has quit [Quit: x77686d]
dpswireless has quit [Remote host closed the connection]
TheDick_ has joined #ruby
mansi has joined #ruby
dpswireless has joined #ruby
jtdowney has quit []
mansi has quit [Read error: Connection reset by peer]
<Uranio>
punter: and _why poignant guide tu ruby
TheDick has quit [Ping timeout: 248 seconds]
TheDick_ is now known as TheDick
mansi has joined #ruby
<shevy>
punter it's alright
<punter>
Uranio: Now I bought Programming Ruby - is it good?
<punter>
shevy: Thanks
<shevy>
if you know perl already then ruby will be easy
kells has joined #ruby
twopoint718 has quit [Ping timeout: 265 seconds]
<punter>
nice
<shevy>
but the only real way to learn ruby is to write scripts on your own
kells is now known as Guest55739
banjara has joined #ruby
enebo has quit [Quit: enebo]
<shevy>
punter it also helps if you look through these 3 classes a few times: Hash, Array, String
mikepack has quit [Ping timeout: 252 seconds]
alexfreidah has joined #ruby
iamdoo2 has quit [Ping timeout: 252 seconds]
therod has quit [Ping timeout: 245 seconds]
<Uranio>
punter: search in google "try ruby" too
Neomex has quit [Quit: Neomex]
Advocation has quit [Quit: Advocation]
<punter>
thx
<cong2>
or just go straight to tryruby.org
<pragmatism>
Why's guide is a little, uh, _cryptic_
mikesplain_ has joined #ruby
dpswireless has quit [Ping timeout: 272 seconds]
<shevy>
it's like a cartoon teacher
<shevy>
I think he just like to draw the whycats
centrx has joined #ruby
<shevy>
imagine if it would have been merged with "Learn to program" interactively AND try ruby all in one site
mikesplain has quit [Ping timeout: 248 seconds]
mikesplain_ is now known as mikesplain
FireSt0rM has joined #ruby
<Fractional>
Any nice programming projects for a beginner? :)
<FireSt0rM>
hi guys, quick question. How would you go about making an action take place at random intervals?
<Fractional>
Just finished sorting and searching algorithms (the basic ones).
jack_rabbit has quit [Ping timeout: 245 seconds]
<FireSt0rM>
or for any given action A... have a small probability that action B will happen
gnephiak has quit [Remote host closed the connection]
<shevy>
FireSt0rM use rand/random
<Uranio>
I learn a lot by first time usgin "try ruby" web interface
ndrei has quit [Ping timeout: 252 seconds]
gnephiak has joined #ruby
siwica has joined #ruby
<FireSt0rM>
shevy, I figured as much, but I was looking for something a bit more specific
alexfreidah has quit [Ping timeout: 260 seconds]
Hobogrammer_ has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
olivier_bK has quit [Ping timeout: 252 seconds]
x77686d has joined #ruby
havenwood has joined #ruby
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RaCx has quit [Quit: Computer has gone to sleep.]
<Uranio>
FireSt0rM: something like this?
<shevy>
Thread, sleep, and rand. cant think of anything else :)
<Uranio>
while true; sleep(rand 1..99);puts 'hi'; end
magoo_ has joined #ruby
<shevy>
hehehe
<FireSt0rM>
Uranio: that works for the random interval scenario I guess
SilentHobo has quit [Ping timeout: 252 seconds]
<FireSt0rM>
What about having a random probability of something happening after a given actions
<FireSt0rM>
ie. I do A, there's a 10% chance of B happening
bricker`LA has quit [Ping timeout: 260 seconds]
zenhob has left #ruby [#ruby]
thesheff17 has quit [Remote host closed the connection]
therod has joined #ruby
RaCx has joined #ruby
RaCx has quit [Client Quit]
<Uranio>
while true; sleep(rand 1..99);puts 'hi' if rand(0..9)==1; end
<shevy>
yeah
<Uranio>
FireSt0rM: I do not get it :-/ the A and B thing
axl_ has quit [Quit: axl_]
<shevy>
he means two different methods
robbyoconnor has quit [Ping timeout: 248 seconds]
<shevy>
FireSt0rM, simply map the probabilities in a table, then translate that into ruby code
vlad_starkov has joined #ruby
siwica has quit [Read error: Operation timed out]
<shevy>
right now you don't seem to have finished this probability table
azkor has joined #ruby
benlieb has quit [Quit: benlieb]
TMM has quit [Quit: Ex-Chat]
griffindy has joined #ruby
SilentHobo has joined #ruby
<Uranio>
or I guest, test if A is true (happend) and then push B to the random test
punter has quit [Read error: Connection reset by peer]
azkor has left #ruby [#ruby]
<cong2>
use an array ['p4','p9','p1'], p9 wins obviously so that will occur next
cj3kim has joined #ruby
siwica has joined #ruby
gnephiak has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
Megtastique has quit []
vlad_starkov has quit [Read error: Connection reset by peer]
<FireSt0rM>
Don't really need a probability table
<FireSt0rM>
Just want event B to take place randomly after event A
mansi has quit [Remote host closed the connection]
<havenwood>
FireSt0rM: def percent_of_the_time(percent); yield if rand(1..100) <= percent; end
<FireSt0rM>
'randomly' being, say, 5% of the tiem
<shevy>
Uranio already showed you the solution for 10%
<havenwood>
FireSt0rM: percent_of_the_time(5) { puts 'not too likely' }
Hobogrammer_ has quit [Ping timeout: 260 seconds]
mansi has joined #ruby
Advocation has joined #ruby
mansi has quit [Read error: Connection reset by peer]
w4pm has joined #ruby
mansi has joined #ruby
mzahir has joined #ruby
mzahir_ has joined #ruby
<FireSt0rM>
havenwood: that sounds doable
<FireSt0rM>
Shall try something to that effect
<FireSt0rM>
thanks
<havenwood>
FireSt0rM: or if you want to see what your roll is as the return value instead of nil: def percent_of_the_time(percent); roll = rand(1..100); yield if roll <= percent; roll; end
<FireSt0rM>
Thanks Uranio and shevy too
<FireSt0rM>
k
<Uranio>
your welcome
fijimunkii has quit [Ping timeout: 272 seconds]
cj3kim has quit [Ping timeout: 264 seconds]
mzahir_ is now known as muchi
iamsean has quit [Quit: iamsean]
aniM has joined #ruby
rljohnsn has joined #ruby
subbyyy_ has quit [Ping timeout: 260 seconds]
iamsean has joined #ruby
standyro1 has joined #ruby
agjacome has quit [Read error: Operation timed out]
mikepack has quit [Remote host closed the connection]
RaCx has joined #ruby
freezey has joined #ruby
niklasb has joined #ruby
jedimind has quit [Disconnected by services]
subbyyy_ has joined #ruby
cong2 is now known as ur-cong
mansi has quit [Ping timeout: 264 seconds]
w4pm has quit [Ping timeout: 260 seconds]
yedimind has joined #ruby
kevinykc_ has quit [Read error: Connection reset by peer]
RaCx has quit [Client Quit]
mansi has joined #ruby
kbouwser has joined #ruby
kevinykchan has joined #ruby
RaCx has joined #ruby
_root has joined #ruby
jailbot has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
RaCx has quit [Client Quit]
agjacome has joined #ruby
gregoriokusowski has quit [Ping timeout: 245 seconds]
olivier_bK has joined #ruby
twopoint718 has joined #ruby
freezey has quit [Ping timeout: 272 seconds]
tkuchiki has joined #ruby
mikesplain has quit [Ping timeout: 264 seconds]
sumark has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 260 seconds]
RaCx has joined #ruby
mikesplain has joined #ruby
Fractional has quit [Quit: Leaving]
sumark has joined #ruby
bricker`away has joined #ruby
axl_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
RaCx has quit [Client Quit]
byprdct has joined #ruby
jailbot has quit [Ping timeout: 240 seconds]
gregoriokusowski has joined #ruby
w4pm has joined #ruby
Guest80808 is now known as mumblerit
Hobogrammer_ has joined #ruby
ctp has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
mojjojo has quit [Quit: mojjojo]
<shevy>
long live ruby!
Megtastique has joined #ruby
kirun has joined #ruby
burlyscudd has joined #ruby
Hiall has quit [Read error: Operation timed out]
Guest55739 is now known as kells
tauebel1 has joined #ruby
tauebel has quit [Read error: Connection reset by peer]
jailbot has joined #ruby
reset has joined #ruby
bradhe has joined #ruby
SilentHobo has quit [Ping timeout: 240 seconds]
intuxicated has joined #ruby
_root has quit [Quit: Leaving]
tjsousa has quit [Read error: Operation timed out]
fire has quit [Quit: WeeChat 0.4.1]
<ur-cong>
ruin to all ruby 1.8.x and 1.9.x.
zeade has joined #ruby
Al__ has quit [Quit: Al__]
camilasa_ has quit []
|UnNameD| has joined #ruby
mavcunha has quit [Quit: Computer has gone to sleep.]
siwica has quit [Read error: Operation timed out]
Kricir has quit [Remote host closed the connection]
shime has joined #ruby
jprovazn_ has quit [Quit: Odcházím]
<shevy>
what for
rezzack has joined #ruby
<shevy>
I cant even install any gems on 2.x
<havenwood>
shevy: why not?
<ur-cong>
i haveone installed zlib
ch0mskiii has quit [Read error: Connection reset by peer]
magoo_ has quit [Quit: WeeChat 0.4.2]
subbyyy_ has quit [Ping timeout: 252 seconds]
ch0mskiii has joined #ruby
SCommette has quit [Quit: SCommette]
subbyyy has joined #ruby
<ur-cong>
because of the openssl thing? swap out the https sources this http.
bradhe has quit [Ping timeout: 248 seconds]
<shevy>
havenwood no idea, the error message was cryptic: "gem install coderay-1.1.0.gem " ERROR: While executing gem ... (Errno::EINVAL) Invalid argument
jailbot has quit [Remote host closed the connection]
<havenwood>
shevy: tried installing 2.0 with a tool like ruby-install?
<Sc0rp10n>
can some one help me with this? I'm on Ubuntu. Thanks!
pushpak_ has joined #ruby
RaCx has quit [Client Quit]
siwica has joined #ruby
mikepack has joined #ruby
* Hanmac
makes his ruby without ruby-install
burlyscudd has quit [Quit: Leaving.]
<shevy>
yes havenwood
<shevy>
it installs into /usr/local happily
CaptainJet has quit []
<havenwood>
shevy: hm, i need more coffee before i think i can understand what happened in your earlier paste :O
CaptainJet has joined #ruby
rippa has joined #ruby
<shevy>
oh my bad
Brolen has quit [Remote host closed the connection]
zz_anildigital is now known as anildigital
<shevy>
it works now
Spami has quit [Quit: Leaving]
Brolen has joined #ruby
<havenwood>
Hanmac: You also always install from trunk, so you'd be out in the cold with ruby-install. :P
<havenwood>
Hanmac: how to i get wrx gem working!? like it does in sample/
<havenwood>
Hanmac: or not ready for that yet?
pushpak has quit [Ping timeout: 252 seconds]
poulson has quit [Read error: Connection reset by peer]
RaCx has joined #ruby
<Sc0rp10n>
havenwood: can you help me with this?
Brolen has quit [Remote host closed the connection]
Brolen has joined #ruby
<Hanmac>
havenwood: i added a bit of sample code, copied from the C++ samples, but its not finish yet ... there are still classes missing, and the samples are also not complete
bluOxigen has quit [Ping timeout: 245 seconds]
bluOxigen has joined #ruby
Spami has joined #ruby
therod has quit [Quit: Lost terminal]
iamvery has joined #ruby
<havenwood>
Hanmac: ahhh, kk - well looks neat, i wanted to try it! :)
monkegjinni has quit [Remote host closed the connection]
iamvery has quit [Client Quit]
<havenwood>
Sc0rp10n: Erm, missing a Gemfile, ahh 5yrs old.
<pragmatism>
Everyone survive the gream gmail outtage of 2014?
<pragmatism>
#yolo
monkegjinni has joined #ruby
<havenwood>
pragmatism: we're free!!
<ur-cong>
i use outlook. i'm safe.
iamdoo2 has joined #ruby
<havenwood>
Sc0rp10n: I think i'd start by adding a Gemfile to the project and hunting down the gems you need.
mikepack has quit [Remote host closed the connection]
marcgg_ has quit [Read error: Connection reset by peer]
<havenwood>
Sc0rp10n: Do you need to use this app as a starting point? It is quite ancient.
<Sc0rp10n>
well
marcgg has joined #ruby
<Hanmac>
havenwood: currently i do not developing, i wait for my RAID to be resynced (reshape is finished yey!)
interactionjaxsn has joined #ruby
<Sc0rp10n>
I was trying to know more about sinatra and I quite liked it
Macaveli has joined #ruby
<havenwood>
Sc0rp10n: Sinatra is excellent. :D
<Sc0rp10n>
so I thought I wana try out a good sample app made with it
<Sc0rp10n>
yea
mikepack has joined #ruby
heidi has quit [Quit: Leaving.]
<Sc0rp10n>
somehow after working in rails for a while, it feels like a breathe of fresh air
<Sc0rp10n>
it's simple and clean
<Sc0rp10n>
not heavy like rails which is something I like
bluOxigen has quit [Ping timeout: 252 seconds]
daxroc has quit [Quit: Leaving.]
smathieu has quit [Remote host closed the connection]
dfcnvt has quit [Ping timeout: 272 seconds]
<Sc0rp10n>
do you have any suggestions for cool apps built with sinatra that I can try on my localhost?
monkegjinni has quit [Ping timeout: 252 seconds]
decoponio has quit [Quit: Leaving...]
mojjojo has joined #ruby
smathieu has joined #ruby
<Sc0rp10n>
havenwood: ?
iamdoo2 has quit [Ping timeout: 252 seconds]
<shevy>
Hanmac, now you have 3 users of rxw already
arietis has joined #ruby
<Lewix>
if you have an output with virtually two columns, how do you keep all the element of the second column aligned with printf
<Lewix>
x = 33222222; "%-20s" % x # => "33222222 " #not aligned with the previous row
shevy has quit [Quit: ""]
smathieu has quit [Read error: Connection reset by peer]
<Sc0rp10n>
havenwood: Thanks, looking into it right now
smathieu_ has joined #ruby
Kricir has joined #ruby
<havenwood>
Sc0rp10n: Just a `bundle` from the root project dir will install the dependencies.
davy_ has quit [Remote host closed the connection]
<havenwood>
Sc0rp10n: then `ruby app.rb`
<Hanmac>
today my pc did crash and it did reboot (seems like a heat problem) ... but my RAID reshaping was not finish ... for a moment my heart did stop because i thought that ALL data would be GONE!
<havenwood>
Hanmac: ykes
whomp has joined #ruby
Kricir has quit [Remote host closed the connection]
<Hanmac>
havenwood: but then the pc started normally (i may did lose not saved data but everything looks normal and the RAID reshaping did continue ... ) ... seems like my OS is made of Nintendium ;D
<havenwood>
wwhew
Kricir has joined #ruby
dpswireless has joined #ruby
mikepack has quit [Remote host closed the connection]
Mars` has quit [Remote host closed the connection]
<punter>
I just installed rvm, with curl, and set up ruby 2.0.0. Now "ri" contains no documentation. How do I fill my system with documentation? "ri Time" for example says "Nothing known about Time"
<punter>
(I'm a total noob)
vlad_starkov has joined #ruby
<havenwood>
punter: maybe try: rvm docs generate
aryaching has quit []
<punter>
thanks
Macaveli has quit [Ping timeout: 272 seconds]
Mars` has quit [Ping timeout: 272 seconds]
jetblack has joined #ruby
Mars` has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
yedimind has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<havenwood>
hehe
<freeone3000>
I'm building a ruby gem with geminabox. Gem is StarAtlas (yes, I know) version 0.0.2, and is uploaded to the geminabox data folder. However, in another project, I depend on 'gem 'StarAtlas', '0.0.2'' . It loads from my repository, but fails to find the gem, with the message 'Could not find gem 'StarAtlas (= 0.0.2) x86-mingw32''
dfcnvt has joined #ruby
mneorr has quit []
nanoyak has quit [Quit: Computer has gone to sleep.]
mlpinit_ has quit [Remote host closed the connection]
Notte has joined #ruby
dpswireless has quit [Ping timeout: 245 seconds]
mlpinit has joined #ruby
skaflem has joined #ruby
<freeone3000>
It doesn't have a native component, or a native dependencies. How do I remove the necessity of a matching native classifier?
mojjojo has quit [Quit: mojjojo]
coca_rails has joined #ruby
aniM has quit [Ping timeout: 252 seconds]
christopherhein has joined #ruby
Megtastique has quit []
dpswirel_ is now known as dpswireless
christopherhein has left #ruby [#ruby]
christopherhein has joined #ruby
aniM has joined #ruby
mojjojo has joined #ruby
axl_ has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
Megtastique has joined #ruby
<centrx>
freeone3000, gems are usually retrieved from rubygems.org, you may have to add a new repository location somehwere
<centrx>
freeone3000, You can do that in the line where you specify the gem dependency even
kewjo has joined #ruby
ohwhoa has quit [Quit: woah!]
Macaveli has joined #ruby
bradhe has joined #ruby
arietis has joined #ruby
arietis has quit [Client Quit]
<freeone3000>
centrx: Yeah, I have a source line, and I have "Fetching gem metadata from http://10.0.1.23:9292/.." in my `builder install` log, so it's hitting my local repository.
dfcnvt has quit [Ping timeout: 272 seconds]
Macaveli has quit [Client Quit]
monkegjinni has joined #ruby
geggam has joined #ruby
kindjal has joined #ruby
Advocation has quit [Quit: Advocation]
bradhe has quit [Ping timeout: 272 seconds]
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
centrx has quit [Quit: Leaving]
smathieu_ has quit [Remote host closed the connection]
axl_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
smathieu has joined #ruby
olivier_bK has quit [Ping timeout: 252 seconds]
mojjojo has quit [Quit: mojjojo]
craigp has quit []
Senjai`work has quit [Read error: Connection reset by peer]
Senjai`work has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
shadoi has joined #ruby
brennanMKE has joined #ruby
sassamo has quit [Remote host closed the connection]
jonah has quit [Remote host closed the connection]
ExceptionlCatch has joined #ruby
smathieu has quit [Ping timeout: 252 seconds]
Advocation has joined #ruby
byprdct has joined #ruby
Hobogrammer_ has quit [Ping timeout: 260 seconds]
<ExceptionlCatch>
i'm researching ruby + fastcgi + nginx and i'm not seeing as much information as i would have expected. does anyone have personal experience running with that or similar setup?
mojjojo has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
<apeiros>
ExceptionlCatch: the de-facto standard to run webapps with ruby is rack
cocotton has joined #ruby
<apeiros>
and for nginx the probably best choice is passenger
<apeiros>
which is also probably the reason you don't find much on ruby+fastcgi. it's just not common. that said, rack can run on fastcgi too.
sassamo has quit [Ping timeout: 240 seconds]
MacGruberMan has quit [Ping timeout: 264 seconds]
<cocotton>
Anyone knows how to run a windows command prompt command. inside a ruby script? Can't manage to have it work. The command would be : sc create sensu-client start= auto binPath= 'C:\opt\sensu\bin\sensu-client.exe' DisplayName= 'Sensu Client'
<ExceptionlCatch>
thanks apeiros, i'm checking that out. i'm new to the augmented server philosophy
<apeiros>
o0 augmented server? is that the newest buzzword?
<apeiros>
a quick google doesn't yield anything which seems relevant to 'augmented server'. got any link?
mansi has quit [Read error: Connection reset by peer]
gregoriokusowski has quit [Quit: gregoriokusowski]
<apeiros>
if that doesn't work, make sure sc can be found in the environment within which `` runs
mansi has joined #ruby
Guest63085 is now known as ponbiki
<ur-cong>
cocotton, use backquotes: `sc sensu-client etc`
<ExceptionlCatch>
apeiros: there's the web server apache/nginx/etc then the software rack or passenger that also acts like a server, and then there is the ruby script
<ExceptionlCatch>
shame on me for creating a buzzword, haha
<apeiros>
ExceptionlCatch: it doesn't really act like a server
<apeiros>
it's a webserver abstraction layer
<cocotton>
apeiros: I've tried that but for a weird reason it does not work
<apeiros>
similar as to what you probably know from database independence layers
<apeiros>
cocotton: as said, probably doens't find the command
<cocotton>
First, I would probably need to escape de backslashes
* apeiros
afk
zoscoy has joined #ruby
<apeiros>
ah, yes, that for sure
<cocotton>
If I try sc in the command prompt, it works
zoscoy has quit [Client Quit]
jonah has joined #ruby
<cocotton>
well, lemme see something realy quick
sassamo has joined #ruby
SCommette has joined #ruby
<cocotton>
so I got that : `sc create sensu-client start= auto binPath= \'C:\\opt\\sensu\\bin\\sensu-client.exe\' DisplayName= \'Sensu Client\'`
vinmaster has quit [Quit: Leaving.]
<cocotton>
I tried without escaping the ', but still it does not work. What's weird is that I have no error output
<havenwood>
ExceptionlCatch: Usually there is a Rack frameworks (like Rails or Sinatra), Rack, a Rack webserver (like Passenger, Unicorn or Thin) then Nginx or Apache as a reverse proxy pointing at your Rack webserver.
dik_dak has joined #ruby
<havenwood>
Rack framework*
<cocotton>
apeiros: I guess I could put the line in a .bat file and run it, but that's not really ellegant
alvaro_o has joined #ruby
banjara has quit [Quit: Leaving.]
sski has quit [Remote host closed the connection]
coca_rails has quit [Remote host closed the connection]
lmickh has quit [Remote host closed the connection]
pushpak has joined #ruby
<havenwood>
ExceptionlCatch: The Rack framework is optional, since you can just do your app in straight Rack if you don't want suger.
<havenwood>
sugar*
Paradox has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
<havenwood>
Also the reverse proxy is optional, but usually used if only for load balancing.
allaire has quit []
<ExceptionlCatch>
lots of new projects to research, yeah, for messing around at the beginning i just want to run a simple ruby script plugged into this flow
lmickh has joined #ruby
<ExceptionlCatch>
once i'm confident with the setup then i can add frameworks
Paradox has joined #ruby
<havenwood>
ExceptionlCatch: If you're already using Nginx, I'd suggest just pointing a route at Unicorn. Good resources online for Nginx/Unicorn configuration.
DrShoggoth has joined #ruby
tauebel1 has quit [Quit: Leaving.]
tauebel has joined #ruby
sski has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
jailbot has quit []
rootshift has joined #ruby
iceden has quit [Remote host closed the connection]
sambao21 has joined #ruby
sassamo has quit [Read error: Connection reset by peer]
<terrellt>
freeone3000: Because included modules don't add class methods?
<benzrf>
freeone3000: ^
rljohnsn has quit [Quit: Leaving.]
aryaching has joined #ruby
parduse has quit [Ping timeout: 272 seconds]
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
pietr0 has quit [Quit: pietr0]
<freeone3000>
terrellt: Ah. I want to use 'extends' on line 8?
<freeone3000>
terrellt: And possibly on line 12?
<terrellt>
I'm not sure, actually.
sski has quit [Remote host closed the connection]
<terrellt>
I don't know if you can execute module bodies.
sambao21 has quit [Client Quit]
Hanmac1 has joined #ruby
sski has joined #ruby
<terrellt>
Yup, sure can
<terrellt>
You want extend for line 12.
meatherly has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
linojon has quit [Quit: linojon]
monkegjinni has joined #ruby
Amart41 has quit [Remote host closed the connection]
MrSamuel has joined #ruby
jasonsmr_ has joined #ruby
Neomex has joined #ruby
<jasonsmr_>
Question: a API that I am currently working on is using ruby 1.9.3 and I was wondering if it would be allright if I used the newer version 2.0.0
Neomex has quit [Client Quit]
<benzrf>
jasonsmr_: i believe it is like 98% backward compatable
<jasonsmr_>
thanks
<terrellt>
jasonsmr_: Probably.
<benzrf>
*compatible
rljohnsn has joined #ruby
davy_ has quit [Ping timeout: 245 seconds]
<jasonsmr_>
yea they seemed pretty supportive of the last update too^
Hanmac has quit [Ping timeout: 272 seconds]
<terrellt>
If you want to maintain backwards compatibility just don't use #prepend or something.
<freeone3000>
terrellt: Alright, that fixed it, thanks.
asmodlol has joined #ruby
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jerius has quit []
kirun has quit [Quit: Client exiting]
parduse has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
nifty has quit [Ping timeout: 245 seconds]
jerius has joined #ruby
jtoy has quit [Ping timeout: 272 seconds]
Kovensky has quit [Ping timeout: 272 seconds]
freezey has joined #ruby
sski has quit [Ping timeout: 252 seconds]
jasonsmr has quit [Ping timeout: 252 seconds]
lmickh has quit [Remote host closed the connection]
Hertz has quit [Quit: Lost terminal]
RoryHughes has joined #ruby
monkegjinni has quit [Ping timeout: 245 seconds]
alexherbo2 has quit [Quit: WeeChat 0.4.2]
jtoy has joined #ruby
sassamo has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
shevy has joined #ruby
<shevy>
oh man
<shevy>
reinstalled finally and another hdd
<shevy>
:(
jtdowney_ has joined #ruby
freezey has quit [Ping timeout: 245 seconds]
Jason has left #ruby [#ruby]
lfox has joined #ruby
larissa has quit [Quit: Leaving]
Hanmac1 is now known as Hanmac
apeiros has quit [Remote host closed the connection]
parduse has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
jtdowney_ has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 272 seconds]
ktun has quit [Remote host closed the connection]
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
mikepack has joined #ruby
bricker`1ork has joined #ruby
bricker`1ork has quit [Client Quit]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banjara has quit [Quit: Leaving.]
angusiguess has joined #ruby
dideler has joined #ruby
bricker`work has quit [Ping timeout: 252 seconds]
dblessing has quit [Quit: dblessing]
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dideler has left #ruby [#ruby]
tjsousa has quit [Quit: Computer has gone to sleep.]
<ur-cong>
do you still remember why you installed again? try installing a gem now.
tjsousa has joined #ruby
fijimunkii has joined #ruby
crzrcn has joined #ruby
tjsousa has quit [Read error: Connection reset by peer]
Speed has joined #ruby
<shevy>
I think the other hdd was failing
<shevy>
trying to list the content of a dir had a delay before it continued
<shevy>
like 3-6 seconds
<shevy>
then it worked well for like 10 seconds
<shevy>
then it slowed down again
* Hanmac
has raid for that ...
<banister>
shevy you forgot all the roses dont come down on sunday she's not gonna choose u for standing so tall
<crzrcn>
I am making a CLI tool in Ruby as a gem. I would like to store persistent data. What are the best practices? Where to store the data? Any good articles out there about the topic?
axl_ has quit [Quit: axl_]
<shevy>
Hanmac how much did you have to pay?
<shevy>
crzrcn how about yaml?
diegoviola has quit [Ping timeout: 245 seconds]
<shevy>
if not yaml, you could try mashal and just store it somewhere where the gem resides
<Hanmac>
shevy: hm i dont remember ... currently my PC has 5 HDDs in a RAID5 ... that means i can lose one Disk and it still works without probs
dpswireless has quit [Remote host closed the connection]
<shevy>
I understand that but how much did you have to pay roughly :D
f0ster has joined #ruby
<freeone3000>
Hanmac: Unless you lose a disk while rebuilding the raid. Which is annoyingly common.
<Morrolan>
'specially when there's four disks which might possibly fail.
mrsolo has joined #ruby
<Morrolan>
(And all of them are roughyl equally old and used)
<shevy>
haha
Mars` has quit [Remote host closed the connection]
<shevy>
Hanmac they want to cheer you up I think
<Hanmac>
freeone3000: it already happens today ... it was reshaping and the PC did shutdown because of to hot (it seems one of the sensors is to sensitive)
<freeone3000>
Hanmac: A RAID5 rebuild stresses all of the disks really heavily, so it's more likely to fail during a rebuild than any other time.
<xybre>
Hmm. Is there a way to unset a global variable?
<benzrf>
xybre: $foo = nil?
fixl has joined #ruby
terrellt_ has joined #ruby
* Morrolan
hands Hanmac a vacuum cleaner.
<freeone3000>
Hanmac: With that in mind: Use one of the drives as hotswap, at least, or move over to raid6, which doesn't kill disks as fast.
<shevy>
yeah, setting to nil
<Hanmac>
freeone3000: "today my pc did crash and it did reboot (seems like a heat problem) ... but my RAID reshaping was not finish ... for a moment my heart did stop because i thought that ALL data would be GONE!" "but then the pc started normally (i may did lose not saved data but everything looks normal and the RAID reshaping did continue ... ) ... seems like my OS is made of Nintendium ;D"
<ur-cong>
crzrcn, you can use the ini-data module http://cxg.de/_92047b.htm i kept it simple as possible.
<Hanmac>
Morrolan: i already cleaned the airfans the time when i build the new disk in ... there was dust in the filter thick like a carpet :P
<Morrolan>
^^
dodosan has quit [Remote host closed the connection]
<shevy>
dead insects
<xybre>
I'm doing a dirty hack and not thinking clearly, so really I'm trying to get the contents of a variable inside an instance_eval contaxt so I can programmatically alias some class methods from an array.
bradhe has joined #ruby
Mon_Ouie has joined #ruby
* Morrolan
covers ears
mhenrixon is now known as mhenrixon|afk
mhenrixon|afk is now known as mhenrixon
<banister>
xybre lol sounds nuts
mhenrixon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mars` has joined #ruby
scarolan has quit [Quit: leaving]
scarolan has joined #ruby
<xybre>
banister: Blame ActiveRecord. I'm just shimming out some methods on it so I can laod a model in isolation.
scarolan has quit [Client Quit]
octoberry has joined #ruby
Jeticus has joined #ruby
Fractional has quit [Read error: Connection reset by peer]
iamdoo2 has quit [Ping timeout: 245 seconds]
CaptainJet has quit [Ping timeout: 245 seconds]
<shevy>
xybre I wonder why defined? says that a global variable was defined
Hanmac1 has joined #ruby
parduse has quit [Remote host closed the connection]
dodosan_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<Hanmac1>
shevy: got my last message at 00:32:11 ?
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<xybre>
shevy: As far as the parser is concerned, it is
sailias has quit [Ping timeout: 240 seconds]
baroquebobcat has joined #ruby
shadoi has quit [Quit: Leaving.]
mmcdaris has quit [Quit: mmcdaris]
Hanmac has quit [Ping timeout: 260 seconds]
shadoi has joined #ruby
Hanmac1 is now known as Hanmac
bradhe has quit [Ping timeout: 272 seconds]
centrx has quit [Quit: Leaving]
MindfulMonk has joined #ruby
<shevy>
Hanmac not sure, my eyes are closing slowly
crzrcn has left #ruby [#ruby]
reset has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
<Hanmac>
(00:32:11) Hanmac: shevy: no ... the dead insects are near my window ... once a day in summer there was a fly problem ... each time i killed some, and then put the clapper away, a new fly it the window ... then i got *aggressive* and killed >30 flies in a row ;D
reset has joined #ruby
jtdowney_ has joined #ruby
<shevy>
yeah
<shevy>
they can be annoying
<shevy>
best is to try to not let them in in the first place
<shevy>
or get a garden with some wasps
<shevy>
they hunt flies sometimes
<freeone3000>
shevy: There was an old woman who swallowed a fly...
fijimunkii has quit [Quit: leaving]
jtdowney_ has quit [Client Quit]
<Hanmac>
i didnt know how they got in, but i know they didnt get out alive *evil grin* ;D
<shevy>
freeone3000 poor fly
pardusf has joined #ruby
parduse is now known as Guest637
dx7 has quit [Remote host closed the connection]
pardusf has quit [Changing host]
pardusf has joined #ruby
pardusf is now known as parduse
Guest637 has quit [Ping timeout: 272 seconds]
Jeticus has quit []
standyro1 has joined #ruby
vlad_starkov has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
styped has joined #ruby
styped has quit [Max SendQ exceeded]
banjara has joined #ruby
workmad3 has joined #ruby
octoberry has quit [Ping timeout: 240 seconds]
camilasan has quit [Quit: Konversation terminated!]
camilasan has joined #ruby
camilasan has quit [Client Quit]
vlad_starkov has quit [Read error: Connection reset by peer]
<xybre>
Figured it out. I just used singleton_class and send with define_method and alias_method, problem solved and while still hacky, I think thats as good as ActiveRecord is goign to get.
<shevy>
"forced to use this because of activerecord - now deceased"
<shevy>
and your mind went away!
<Hanmac>
xybre: are you looking for "define_singleton_method" ?
<shevy>
Hanmac he still needs an alias!
<xybre>
Hanmac: Nah, I wanted to create aliases. I probably could have used it instead of singleton_class.define_method, but I'd still have to do it later.
<xybre>
I should publish this code. Mostly so people can lol@it.
Cache_Money has joined #ruby
<benzrf>
shevy: do you mean 'epigraph
<benzrf>
'
<shevy>
Hanmac, what editor are you using again?
tcstar has quit [Ping timeout: 272 seconds]
<shevy>
benzrf dunno... that thing that you chisel into a stone... into marble and stuff on a grave
<benzrf>
*epitaph
<benzrf>
derp
sambao21 has joined #ruby
<shevy>
that's unpronouncable!
<benzrf>
ep-i-taph
<Hanmac>
shevy: depends ... for short looking or small edits i use gedit ... for organisating whole projects i use eclipse ...
<shevy>
taph... is that like taffy
baroquebobcat has joined #ruby
<shevy>
epitaffy
<benzrf>
yeah
<shevy>
Hanmac really? gedit? hmmm
<shevy>
for ruby?
<benzrf>
vims where its at
Jetchisel has joined #ruby
<shevy>
I am in a transition phase... I must switch to ruby 2.1 ... I must switch to a better editor... and I have to learn rails...
<Hanmac>
hm yeah gedit is good for ruby and good for C++ code too ...
<shevy>
nah vim plays with my mind, I hate it when software does that
<benzrf>
??
mikepack has quit [Remote host closed the connection]
<Hanmac>
shevy: "with rails you are forced in only one direction" ;P
<shevy>
yeah
SCommette has quit [Quit: SCommette]
* Hanmac
is currently meta-physical
phipes has joined #ruby
mikepack has joined #ruby
diegoviola has quit [Ping timeout: 272 seconds]
mansi has joined #ruby
<shevy>
what does that mean
Vivekananda has joined #ruby
mikepack has quit [Remote host closed the connection]
<benzrf>
shevy: not using vim is your own loss
<benzrf>
i hope that you understand this important fact
shime has joined #ruby
<Hanmac>
shevy: just image rails in real train rails ... with that you are forced into directions ... if you want it or not ;P
zeknox has joined #ruby
<shevy>
benzrf vim reshapes my neuronal activity pattern. I hate that, it kills my productivity in a very unpleasant way. it gets into my way rather than out of my way. like ruby, which changes my activity pattern as well but in a much more pleasant way
<zeknox>
using string.split(":")[0] how can I grab everything in the array but element 0 ?
mmcdaris has joined #ruby
<benzrf>
.-.
<benzrf>
zeknox: arr[1..-1] ?
kevind has quit [Quit: kevind]
<shevy>
zeknox just specify other parts of the array
mocfive has quit [Remote host closed the connection]
<shevy>
atmosx no time :(
<atmosx>
shevy: why?
<shevy>
the coming week will kill me
<atmosx>
shevy: why dead tired?
mocfive has joined #ruby
<shevy>
dunno, did not sleep too well and my eyes feel very tired
<atmosx>
shevy: I have 1 exam left and I can go home on Wednesday, finally... can't wait I don't care about the exam anymore
<zeknox>
string.split(":")[1..-1] works for my needs, but what does [1..-1] do?
brandon_black has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
<benzrf>
zeknox: it is a slice
<benzrf>
arr[foo..bar] will pick out all of the elements starting at foo and ending at baroquebobcat
nateberkopec has quit [Quit: Leaving...]
<benzrf>
zeknox: negative indices count from the end
<benzrf>
zeknox: so -1 is the last, -2 is 2nd last, etc
<shevy>
atmosx hehe cool that you can relax, I have 3 exams the week, but I also have to meet my boss for working as intern the next month at a pharma company
araujo has joined #ruby
<benzrf>
zeknox: therefore 1..-1 will pick out 1 to the last
<baroquebobcat>
benzrf: hello
<zeknox>
benzrf: thanks, will need to look into slices