apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p286: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
Cultofmetatron has quit [Remote host closed the connection]
panpainter has quit [Quit: panpainter]
qwerxy has joined #ruby
arya has joined #ruby
Cultofmetatron has joined #ruby
chimkan has joined #ruby
arya has quit [Client Quit]
dpk has quit [Excess Flood]
emmanuelux has joined #ruby
ksaw123 has joined #ruby
sandstorm has quit []
qwerxy has quit [Client Quit]
<ksaw123> hey guys getting a "wrong number of arguments error" on line 21 can someone help please. http://pastie.org/5337665
dpk has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<cirwin> ksaw123: the actual error is one line below that in the backtrace: puts "\n\n\t\tSeat #: " + Pass.book_seat(@choice.to_s)
<cirwin> You can't pass an argument to book_seat because it doesn't take an argument
cakehero has quit [Quit: Computer has gone to sleep.]
greenarrow has quit [Quit: IRC is just multiplayer notepad]
<ksaw123> hm gotcha. know a way to fix it?
strangeworks has quit [Quit: Leaving]
<cirwin> ksaw123: either don't pass an argument
arya has joined #ruby
<cirwin> or make it "def book_seat(choice)" so that it accepts an argument
cirwin has left #ruby [#ruby]
<ksaw123> ok, if i make it def book_seat(choice) i can still have the user enter 1 or 2 yes?
keyvan has joined #ruby
postmodern has joined #ruby
anachronistic has left #ruby [#ruby]
mahmoudimus has joined #ruby
Virunga has quit [Remote host closed the connection]
hadees has joined #ruby
SCommette has quit [Quit: SCommette]
chessguy has joined #ruby
keyvan has quit [Remote host closed the connection]
butblack has joined #ruby
elico has quit [Quit: elico]
horofox has quit [Quit: horofox]
sheerun has quit [Quit: and thanks for all the fish]
SCommette has joined #ruby
arya has quit [Ping timeout: 244 seconds]
ksaw123 has quit [Remote host closed the connection]
arya has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
horofox has joined #ruby
mmitchell has quit [Remote host closed the connection]
Orcris has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
Araxia has quit [Remote host closed the connection]
lenovodroid has joined #ruby
Russell^^ has joined #ruby
philcrissman has joined #ruby
centipedefarmer has joined #ruby
slainer68 has quit [Remote host closed the connection]
enderx86 has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
jrist-aafk is now known as jrist
tatsuya_o has quit [Remote host closed the connection]
k610 has joined #ruby
tehlulz has joined #ruby
<RobZ1> Hi, I'm getting a SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) What can I do to resolve?
mmitchell has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
k610 has quit [Ping timeout: 240 seconds]
k610 has joined #ruby
volty has joined #ruby
<davidcelis> what OS?
k610 has quit [Ping timeout: 260 seconds]
<davidcelis> do you have ssl certs installed?
<RobZ1> davidcelis: ubuntu 12.04 yes certs are installed
<havenn> RobZ1: In irb does "require 'openssl'
<havenn> " work?
<havenn> sry for multi-line fail.
TheFuzzball has quit [Read error: Operation timed out]
<havenn> RobZ1: You probably need to compile Ruby with openssl
fyolnish has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
<havenn> RobZ1: If RVM: 'rvm pkg install openssl'
<RobZ1> havenn: yes it does. And then visiting a https site works too. But trying to use activemerchant with a providers pem file and it fails (although works fine on local dev machine and another server)
<havenn> RobZ1: Never mind about openssl then...
jenrzzz has joined #ruby
osvico has quit [Ping timeout: 248 seconds]
sailias has joined #ruby
freakazoid0223 has joined #ruby
tommyvyo has joined #ruby
arya has quit [Read error: Connection reset by peer]
arya has joined #ruby
slainer68 has joined #ruby
TheFuzzball has joined #ruby
cpruitt has joined #ruby
chrisja has joined #ruby
mercwithamouth has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
hsbt is now known as hsbt_away
hbpoison has joined #ruby
volty has quit [Quit: Konversation terminated!]
omg765 has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mahmoudimus has joined #ruby
philcrissman has quit [Remote host closed the connection]
yshh has joined #ruby
yshh has quit [Remote host closed the connection]
binaryplease has joined #ruby
Floydzy has quit [Quit: Floydzy]
hbpoison has quit [Ping timeout: 264 seconds]
elaptics is now known as elaptics`away
davidcelis has quit [Quit: K-Lined.]
Astral has joined #ruby
Astral is now known as Guest97990
arya has quit [Ping timeout: 255 seconds]
Guest97990 is now known as _Astral
ksaw123 has joined #ruby
<ksaw123> hey can you guys help me fix this error on line 59 before i kill myself.. please lol http://pastie.org/5337665
apok has quit [Quit: apok]
c0rn has joined #ruby
bradhe has quit [Remote host closed the connection]
c0rn has quit [Client Quit]
ephemerian has quit [Quit: Leaving.]
binarypl1 has joined #ruby
arya has joined #ruby
binarypl1 has quit [Client Quit]
binarypl1 has joined #ruby
<ksaw123> any ruby pro free?
yshh has joined #ruby
shiin has quit [Quit: Computer has gone to sleep.]
emergion has joined #ruby
binaryplease has quit [Ping timeout: 248 seconds]
<havenn> ksaw123: I'd recommend ditching all "+"s and interpolating your Pass.book_seat(s) to start with: "\n\n\t\tSeat #: #{Pass.book_seat(@choice)}"
binarypl1 has quit [Client Quit]
marr has quit []
binaryplease has joined #ruby
cpruitt has quit [Quit: cpruitt]
sailias has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
c0rn has joined #ruby
mikepack has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
Progster has joined #ruby
joeycarmello has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
horofox has quit [Quit: horofox]
ngoldman has quit [Remote host closed the connection]
minijupe has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
roadt_ has joined #ruby
c0rn has joined #ruby
Raboo_ has joined #ruby
tvw has quit [Remote host closed the connection]
Raboo has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
tommyvyo has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
mlue has quit [Quit: leaving]
mmitchell has quit [Remote host closed the connection]
DefV has quit [Ping timeout: 260 seconds]
<shevy> anyone knows...
DefV has joined #ruby
<shevy> ModuleName.constants - does this work differently between ruby 1.8.x and 1.9.x ?
emmanuelux has quit [Remote host closed the connection]
ksaw123 has quit [Quit: irc2go]
Koshian__ has quit [Ping timeout: 260 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
hbpoison has joined #ruby
JonnieCache has joined #ruby
lenodroid has joined #ruby
emergion has quit [Ping timeout: 246 seconds]
Koshian__ has joined #ruby
sailias has quit [Quit: Leaving.]
sdk has quit [Ping timeout: 252 seconds]
c0rn has joined #ruby
pac1 has joined #ruby
darkwing_duck has joined #ruby
marius has joined #ruby
arya has quit [Ping timeout: 244 seconds]
redbull has quit [Remote host closed the connection]
osvico has joined #ruby
arya has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
lenovodroid has quit [Ping timeout: 255 seconds]
tyfighter has quit [Quit: tyfighter]
brianpWins has quit [Quit: brianpWins]
c0rn has quit [Client Quit]
jimeh has quit [Quit: Computer has gone to sleep.]
maletor has quit [Quit: Computer has gone to sleep.]
arubin_ has joined #ruby
arya has quit [Read error: Connection reset by peer]
tehlulz has quit [Ping timeout: 246 seconds]
tehlulz has joined #ruby
fmcgeough has joined #ruby
c0rn has joined #ruby
arya has joined #ruby
keyvan has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
enderx86 has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
mrsolo has quit [Quit: Leaving]
niklasb has quit [Read error: Operation timed out]
slainer68 has quit [Remote host closed the connection]
nari has joined #ruby
maxer has quit [Quit: maxer]
Orcris has quit [Ping timeout: 240 seconds]
dmiller has quit [Ping timeout: 246 seconds]
Tombar has joined #ruby
Tombar has quit [Read error: Connection reset by peer]
blazes816 has quit [Quit: blazes816]
Tombar has joined #ruby
thinkdevcode has joined #ruby
maxer has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Read error: Operation timed out]
Aiur has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Russell^^ has quit [Quit: Russell^^]
c0rn has joined #ruby
dmiller has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ryanlecompte has quit [Remote host closed the connection]
davidcelis has joined #ruby
arya_ has joined #ruby
ffranz has quit [Quit: Leaving]
ksaw123 has joined #ruby
CaptainJet has joined #ruby
<ksaw123> i got the airline program working, but I can't get it to assign a seat other than seat 1 even though i hav $i =+ 1.each
daniel_- has joined #ruby
ewag has joined #ruby
arya has quit [Ping timeout: 244 seconds]
Chryson has joined #ruby
hsbt_away is now known as hsbt
yshh has quit [Remote host closed the connection]
alexim has quit [Quit: bye]
atlantaman has joined #ruby
minijupe has quit [Quit: minijupe]
tbrock_ has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 252 seconds]
nadirvardar has quit [Quit: Computer has gone to sleep.]
artOfWar has quit [Remote host closed the connection]
bmulholland has joined #ruby
<bmulholland> Hey, how can I send a post request and include a cookie? I've googled around and can't find any resources
yshh has joined #ruby
moshee has quit [Ping timeout: 265 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
ksaw123 has quit [Quit: irc2go]
enderx86 has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
jenrzzz has joined #ruby
atlantaman has quit [Quit: atlantaman]
dpatel has quit [Quit: dpatel]
mengu has quit [Remote host closed the connection]
ttt_ has joined #ruby
kenud has joined #ruby
macmartine has joined #ruby
bmulholland has quit [Quit: bmulholland]
voodoofish430 has quit [Quit: Leaving.]
slainer68 has joined #ruby
ZubKonst_ has joined #ruby
xsbeats has quit [Ping timeout: 260 seconds]
ZubKonst has quit [Ping timeout: 260 seconds]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Tombar has quit [Remote host closed the connection]
daniel_- has quit [Ping timeout: 252 seconds]
Tombar has joined #ruby
davidokner has joined #ruby
<davidokner> Did anyone here learn ruby recently?
horofox has joined #ruby
<Grieg> i do atm
bricker has quit [Ping timeout: 240 seconds]
<gozes> me too, Just finish reading the well graunded rubyeis today :-)
<davidokner> Grieg: I'm learning using pragmaticstudio.com program
<Grieg> codecademy.com here
<davidokner> It is very well done.
<Spaceghostc2c> davidokner: I learned it recently in the last handful of years.
_alejandro has joined #ruby
dmiller_ has joined #ruby
slainer68 has quit [Ping timeout: 255 seconds]
cakehero has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
<davidokner> I might not have checked out code academy, but I thought I did.
<davidokner> I was at the other 2 or three similar sites
infinite_ has joined #ruby
joeycarmello has joined #ruby
<davidokner> I'm also using RubyMine as my editor with the Pragmatic Studio. That all cost money.
ghanima has joined #ruby
<davidokner> I paid $270.
chimkan has quit [Quit: chimkan]
<tehlulz> hey everyone!
<tehlulz> :D
fast_ has quit [Ping timeout: 240 seconds]
jarred_ has quit [Quit: jarred_]
arya_ has left #ruby [#ruby]
arya_ has joined #ruby
<arya_> hey everyone!
<davidokner> Code School is the site I saw
<arya_> noob here :)
<davidokner> Code School and Team treehouse
jenrzzz has quit [Ping timeout: 248 seconds]
RobZ1 has quit [Remote host closed the connection]
<tehlulz> What would people suggest as a good starting out tutorial for learning Ruby? :)
<tehlulz> can be book
<davidokner> Code school has ruby bits part 1 and 2
<davidokner> Code academy has ruby
<davidokner> those are both free
<davidokner> I paid $200 for Pragmatic Studio
CaptainJet has quit []
joeycarmello has quit [Ping timeout: 246 seconds]
mneorr has joined #ruby
brianpWins has joined #ruby
ksaw123 has joined #ruby
dankest has quit [Quit: Linkinus - http://linkinus.com]
<ksaw123> i changed most of my code. I cant get @choice to return the random number. It assigns seat 1 and 2 need help plsplspls. have 2.6 hours to complete.
kenud has quit [Quit: Saliendo]
<davidokner> What I think is stupid is that they are not teaching backbone.js using Coffeescript over at codeschool.com
<tehlulz> davidokner: for web stuff, do you use rails? or sinatra?
<davidokner> I will use Rails.
sn0wb1rd has joined #ruby
<davidokner> Actually not familiar with Sinatra, other than in name.
<davidokner> And I've only done some minor practice with rails so far. I'm focusing on ruby right now.
khakimov has quit [Ping timeout: 252 seconds]
joeycarmello has joined #ruby
xsbeats has joined #ruby
khakimov has joined #ruby
<davidokner> I might go back and take ruby classes from the free sources after I finish pragmatic studio
<tehlulz> does the ruby bits cover more then the try ruby?
stephenjudkins has quit [Quit: stephenjudkins]
<davidokner> YES
<davidokner> Ruby bits is much better
<tehlulz> sweet
<tehlulz> cause yeh, try ruby kinda put me off
<tehlulz> didn't explain much at all
<davidokner> Ruby bits by code school and Ruby on Code Academy are comprehensive from what I can tell.
<davidokner> If you want to spend $200 there is Pragmatic Studio ruby course.
<davidokner> Try Ruby is not systematic or comprehensive
<davidokner> Just look at PragmaticStudio.com too
<davidokner> CodeSchool is very good for rails I think.
<davidokner> But you want to start with Ruby
<tehlulz> well, id like to learn ruby before jumping into rails haha
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
tbrock_ has joined #ruby
atlantaman has joined #ruby
mneorr has quit [Remote host closed the connection]
etrnl has joined #ruby
freeayu has joined #ruby
adeponte has quit [Remote host closed the connection]
u89 has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 244 seconds]
<etrnl> keep getting " A JSON text must at least contain two octets! (JSON::ParserError)" when trying to open and parse a json formatted response, cna't figure out why
<ksaw123> what is the difference between @ and $
<ksaw123> $ global?
sepp2k1 has quit [Remote host closed the connection]
<Spaceghostc2c> ksaw123: One makes me want to cry if you abuse them.
<ksaw123> lol one just tries to pass ISA 3010
<ksaw123> http://pastie.org/5338075 is my code, I can't get it to return the right value from arrays I am thinking maybe if i change @choice to $choice?
J-_-L has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<ksaw123> and for some reason I have to input the seat type twice?
scx has quit [Ping timeout: 276 seconds]
dakine has joined #ruby
tehlulz has quit [Read error: Connection reset by peer]
linoj has joined #ruby
tehlulz has joined #ruby
caleb_io has joined #ruby
mahmoudimus has joined #ruby
maxer has quit [Quit: maxer]
scx has joined #ruby
zastern has joined #ruby
samphipp_ has joined #ruby
<ksaw123> can anyone see why i have to input the number twice?
samphippen has quit [Ping timeout: 252 seconds]
samphipp_ is now known as samphippen
philcrissman has joined #ruby
Progster has quit [Ping timeout: 276 seconds]
levabalkin has joined #ruby
horofox has quit [Quit: horofox]
ksaw123 has quit [Quit: irc2go]
Hanmac1 has joined #ruby
darkwing_duck has quit [Read error: Connection reset by peer]
ilyam has quit [Quit: ilyam]
levabalkin has quit [Ping timeout: 260 seconds]
yshh has quit [Ping timeout: 246 seconds]
Hanmac has quit [Ping timeout: 246 seconds]
horofox has joined #ruby
haxrbyte has joined #ruby
medik has quit [Quit: medik has no reason]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
chrisja has quit [Quit: leaving]
wizard` has joined #ruby
darkwing_duck has joined #ruby
chimkan has joined #ruby
_alejandro has quit [Remote host closed the connection]
chendo_ is now known as chendo
`brendan has joined #ruby
<etrnl> diving deeper into this issue, i'm getting a nil response from the server, at least while setting the variable, the error I get returns the response text
JonnieCache has quit [Ping timeout: 252 seconds]
tnk1 has quit [Ping timeout: 260 seconds]
yshh has joined #ruby
tpe11etier has joined #ruby
keyvan has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
<mercwithamouth> what would be a eloquent way to write unless @blah.empty.each do |t| .... end
<mercwithamouth> unless the array is empty execute
fmcgeough has quit [Quit: fmcgeough]
tnk1 has joined #ruby
kokainepizza has joined #ruby
mrkris has joined #ruby
<mrkris> 'evening
havenn has joined #ruby
tpe11etier has quit [Ping timeout: 240 seconds]
horofox has quit [Quit: horofox]
imbric has joined #ruby
Ruler_Of_Heaven_ has quit [Ping timeout: 252 seconds]
pipopopo has joined #ruby
<imbric> hey guys. I'm new to writing Ruby libraries and I have a testing question. Is it a good idea to use both Minitest::Unit and Minitest::Spec ? Or do they serve the same purpose but in different ways?
Servidorv has joined #ruby
Servidorv has quit [Client Quit]
havenn has quit [Ping timeout: 256 seconds]
<imbric> I'm sort of leaning towards this layout…. test/helper.rb does high level setup…. then each of test/unit/ and test/spec/ have a *_helper.rb which does any specialized setup….
<imbric> is this sane?
rockets has joined #ruby
philcrissman has quit [Remote host closed the connection]
bier_ has quit [Ping timeout: 268 seconds]
joeycarmello has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
zastern has quit [Ping timeout: 248 seconds]
Grieg has quit [Ping timeout: 268 seconds]
ilyam has joined #ruby
radic has quit [Disconnected by services]
scx has quit [Read error: Connection reset by peer]
radic_ has joined #ruby
kiyoura has quit [Quit: Leaving]
`brendan has quit [Ping timeout: 246 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
`brendan has joined #ruby
<davidcelis> kinda weird to use both Unit and Spec, IMO
chimkan has quit [Ping timeout: 260 seconds]
<davidcelis> they're both for unit testing, they just use a different DSL. you should pick one and stick with it
<davidcelis> imbric: ^
x82_nicole has joined #ruby
<x82_nicole> How can I work on someone else's gem? I've cloned it to my computer. How exactly do I edit, and "reload" it to see my changes?
lushious is now known as lushbot
lushbot is now known as lushious
<imbric> ok…. then, do you think its reasonable to have separate test classes for "unit level tests" (like when I test my low-level implementation as I'm building auxiliary helper methods) versus more high level (testing the library's public interface)
chessguy has quit [Remote host closed the connection]
chimkan_ has joined #ruby
BrianJ has quit [Quit: BrianJ]
gozes has left #ruby [#ruby]
alvaro_o has quit [Quit: Ex-Chat]
BrianJ has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
`brendan has quit [Ping timeout: 240 seconds]
<shevy> x82_nicole: all gems that you install, will be downloaded. you can find them in the cache/ subdirectory
nateberkopec has quit [Quit: Leaving...]
d2dchat has quit [Remote host closed the connection]
<shevy> on my system this is at /usr/lib/ruby/gems/1.9.1/cache/
<shevy> there you can extract the .gem file, make your changes, then rebuild the gem again
<x82_nicole> Hmm, so I edit them, and then once I'm happy, go back to the one I've forked on GitHub, clone it, and paste those changes?
<shevy> if you use github anyway, there is no need to modify the gem itself
cakehero has quit [Quit: Computer has gone to sleep.]
<shevy> you can just use git
chimkan_ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
<etrnl> still keep getting "A JSON text must at least contain two octets! (JSON::ParserError)" when trying to open and parse a json formatted response, can't figure out why
artnez has joined #ruby
Tombar has quit [Remote host closed the connection]
wizard` has quit [Ping timeout: 240 seconds]
caleb_io has quit [Quit: caleb_io]
stephenjudkins has joined #ruby
wmoxam has quit [Quit: leaving]
caleb_io has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
lenodroid has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
bapa has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
siyusong has quit [Quit: Computer has gone to sleep.]
x82_nicole has quit [Quit: Computer has gone to sleep.]
Tombar has joined #ruby
ananthakumaran has joined #ruby
chimkan_ has joined #ruby
joeycarmello has joined #ruby
sn0wb1rd_ has joined #ruby
mneorr has joined #ruby
n_blownapart has joined #ruby
linoj has quit [Quit: linoj]
nga4 has quit [Ping timeout: 276 seconds]
sn0wb1rd has quit [Ping timeout: 246 seconds]
sn0wb1rd_ is now known as sn0wb1rd
<n_blownapart> hi any tips on why this won't work? getting the longest error message ever. thanks: http://pastie.org/5338344
levabalkin has joined #ruby
krz has joined #ruby
hbpoison has joined #ruby
chimkan_ has quit [Ping timeout: 255 seconds]
rockets has quit [Remote host closed the connection]
Tombar has quit [Read error: Connection reset by peer]
zastern has joined #ruby
darkwing_duck has quit [Quit: Lost terminal]
zastern has quit [Read error: Connection reset by peer]
Tombar has joined #ruby
hbpoison has quit [Ping timeout: 248 seconds]
cakehero has joined #ruby
zastern has joined #ruby
linoj has joined #ruby
bapa has joined #ruby
zastern has quit [Remote host closed the connection]
Progster has joined #ruby
mrkris has left #ruby ["'MURICA!"]
areil has joined #ruby
gnnr has quit [Read error: Connection reset by peer]
Ry_ has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
cyong has joined #ruby
Progster has quit [Ping timeout: 264 seconds]
kamsky has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
<kamsky> hi guys, need ur help, do u see anything wrong here?
<kamsky> def send_email( from='Nano Store <whatever@asd.com>', to, subject='Nanocellulose', body, attachment=nil, smtp_info)
<kamsky> im getting this error
<kamsky> syntax error, unexpected ',', expecting '='
<kamsky> but I dont get it
hbpoison has joined #ruby
slainer68 has joined #ruby
jenrzzz has joined #ruby
zodiak has quit [Ping timeout: 265 seconds]
mneorr has quit [Remote host closed the connection]
bigmac has quit [Quit: Leaving]
manizzle has quit [Ping timeout: 245 seconds]
tbrock_ has quit [Quit: Computer has gone to sleep.]
caleb_io has quit [Quit: caleb_io]
slainer68 has quit [Ping timeout: 240 seconds]
yshh has quit [Ping timeout: 246 seconds]
mneorr has joined #ruby
linoj has quit [Quit: linoj]
<davidcelis> kamsky: bro don't you know it's election time
<davidcelis> go watch the elections
<dakine> obama won
<kamsky> lol, I got the news on the tv
bapa has quit [Read error: Connection reset by peer]
linoj has joined #ruby
love_color_text has quit [Remote host closed the connection]
<kamsky> yup, they saying Obama won
<kamsky> people yelling in my hood!
kil0byte has joined #ruby
amacgregor_osx has quit [Read error: Operation timed out]
imbric has quit [Quit: imbric]
<davidcelis> and democrats took the senate, too
savage- has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
bapa has joined #ruby
thecreators has joined #ruby
imbric has joined #ruby
imbric has quit [Client Quit]
atlantaman has quit [Quit: atlantaman]
kiyoura has joined #ruby
skaczor has joined #ruby
<Whackatre_> yup he won
kpshek has joined #ruby
kpshek has quit [Client Quit]
ananthakumaran1 has joined #ruby
amacgregor_osx has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
xsbeats has quit [Ping timeout: 255 seconds]
ewag has quit [Ping timeout: 265 seconds]
bradhe has quit [Remote host closed the connection]
nignaztic has quit [Ping timeout: 256 seconds]
yshh has joined #ruby
wmoxam has joined #ruby
kiyoura has quit [Quit: Leaving]
hsbt_away is now known as hsbt
Slivka has quit [Read error: Connection reset by peer]
arya has joined #ruby
nateberkopec has joined #ruby
nga4 has joined #ruby
rjsamson has quit [Remote host closed the connection]
quest88 has joined #ruby
rjsamson has joined #ruby
butblack has quit [Quit: butblack]
rjsamson has quit [Ping timeout: 256 seconds]
adeponte has joined #ruby
arya has quit [Ping timeout: 244 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
pyx has joined #ruby
monkegjinni has joined #ruby
jarred_ has joined #ruby
icole has quit [Remote host closed the connection]
nadirvardar has joined #ruby
nadirvardar has quit [Max SendQ exceeded]
J-_-L has quit [Quit: Leaving.]
J-_-L1 has joined #ruby
hsbt is now known as hsbt_away
nadirvardar has joined #ruby
nari has quit [Ping timeout: 260 seconds]
rakl has quit [Quit: sleeping]
d2dchat has joined #ruby
lukeholder has joined #ruby
bradhe has joined #ruby
fir_ed has quit [Ping timeout: 246 seconds]
Edward__ has quit [Ping timeout: 264 seconds]
Kudos has quit [Ping timeout: 264 seconds]
ramu3 has joined #ruby
ramu3 has quit [Client Quit]
Guest10501 has joined #ruby
etrnl has quit [Quit: ABCWTF]
zodiak has joined #ruby
arkiver has joined #ruby
Kudos has joined #ruby
JohnBat26 has joined #ruby
xsbeats_ has joined #ruby
xsbeats_ is now known as xsbeats
linoj has quit [Quit: linoj]
JonnieCache has joined #ruby
ryanf has quit [Ping timeout: 255 seconds]
slainer68 has joined #ruby
siyusong has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
snorkdude has joined #ruby
nari has joined #ruby
snorkdude has quit [Client Quit]
slainer68 has quit [Ping timeout: 240 seconds]
Kudos has quit [Quit: ZNC - http://znc.in]
bradhe has quit [Ping timeout: 240 seconds]
xsbeats has quit [Ping timeout: 276 seconds]
binaryplease has quit [Quit: WeeChat 0.3.9]
Kudos has joined #ruby
beachandbytes has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
xsbeats has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
Araxia has joined #ruby
freakazoid0223 has quit [Ping timeout: 240 seconds]
xsbeats_ has joined #ruby
J-_-L1 has quit [Ping timeout: 265 seconds]
Ry_ has joined #ruby
siyusong has quit [Quit: Computer has gone to sleep.]
freakazoid0223 has joined #ruby
ping-pong has quit [Ping timeout: 252 seconds]
kokainepizza has quit [Quit: My pooter is sleep.]
pothibo has quit [Quit: pothibo]
n_blownapart has quit [Remote host closed the connection]
davidokner has left #ruby [#ruby]
pu22l3r_ has quit [Remote host closed the connection]
lukeholder has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
undersc0re97 has quit [Quit: Leaving]
linoj has joined #ruby
arkiver has quit [Quit: Leaving]
kokainepizza has joined #ruby
ryanf has joined #ruby
rakl has joined #ruby
ryanf_ has joined #ruby
queequeg1 has quit [Read error: Operation timed out]
linoj has quit [Quit: linoj]
tonini has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
yshh has quit [Ping timeout: 246 seconds]
rippa has joined #ruby
stkowski has quit [Quit: stkowski]
yshh has joined #ruby
siyusong has joined #ruby
Tombar has quit [Remote host closed the connection]
roadt_ has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
dreamz__ has quit [Ping timeout: 276 seconds]
caleb_io has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ping-pong has joined #ruby
dreamz__ has joined #ruby
centipedefarmer has joined #ruby
minijupe has joined #ruby
jrist is now known as jrist-afk
MarcWeber has quit [Quit: leaving]
BrianJ has quit [Quit: BrianJ]
davidcelis has quit [Quit: K-Lined.]
ltsstar has joined #ruby
margle has joined #ruby
artOfWar has joined #ruby
JohnBat26 has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
joofsh has joined #ruby
roadt_ has joined #ruby
joofsh has quit [Remote host closed the connection]
artOfWar has quit [Remote host closed the connection]
artOfWar has joined #ruby
PraiseChaos has quit [Quit: PraiseChaos]
jgrevich_ has joined #ruby
<SirFunk> Is there some way to do something like Array.each until a certain value is returned?
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
kil0byte_ has joined #ruby
freakazoid0223 has quit [Ping timeout: 240 seconds]
<heftig> SirFunk: break out of the loop
<heftig> or use Array.find
<heftig> er, Array#find
<heftig> find will terminate as soon as the block returns true
<SirFunk> i don't see find on the array docs?
<heftig> Enumerable
JohnBat26 has quit [Read error: Connection reset by peer]
Guest10501 has quit [Quit: Guest10501]
kil0byte has quit [Ping timeout: 246 seconds]
xpen has joined #ruby
freakazoid0223 has joined #ruby
BoomCow has joined #ruby
<BoomCow> sup pimpins
<SirFunk> hmm.. find seems like almost what i need
<SirFunk> here's what i'm trying to do. I have an array of Package objects. I need to loop through the Packages running Package.add(item) until one of them returns true (the package was added) otherwise make a new one and push it onto the array
Juul has joined #ruby
<SirFunk> ... maybe array.find would do that
<Paradox> you could just use a while loop
<Paradox> packageval = false
JohnBat26 has joined #ruby
<Paradox> while !packageval ¬ packageval = Package.add(herp) ¬ end
siyusong has quit [Quit: Computer has gone to sleep.]
Andrew__ has joined #ruby
<SirFunk> yeah, i kinda feel like that's clunky and not ruby-esque
<SirFunk> but it would work
adeponte has quit [Remote host closed the connection]
margle has quit [Quit: Computer has gone to sleep.]
<SirFunk> what is 'ifnone'
<SirFunk> can that be a function or is it just a value that will be returned?
<BoomCow> why don't you just make an array
<BoomCow> and push the objects into the array
<BoomCow> new_package = []
Andrew__ is now known as andrewhl
crackfu has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 246 seconds]
<SirFunk> the packages have a maximum number of items they can contain aswell as a max weight
<SirFunk> so whenever I add_item it checks if it can be added or not
erichmenge has joined #ruby
<BoomCow> I feel like I joined mid convo
<SirFunk> perhaps
<SirFunk> I was trying to find a way to loop through my aray of packages attempting to add an item to each of them until one successfully ads
xsbeats_ has left #ruby [#ruby]
<SirFunk> otherwise make a new package and add to that
<BoomCow> packages.each { |p| new_package << p unless !p }
<BoomCow> .each do*
<BoomCow> each.do*
SCommette has quit [Quit: SCommette]
roadt_ has quit [Read error: Connection reset by peer]
<SirFunk> that wouldn't try to add the items to it.. that would only create the pacakge if there is none, correct?
Trioke has quit [Ping timeout: 260 seconds]
Jonah11_ has quit [Ping timeout: 244 seconds]
skaczor has quit [Remote host closed the connection]
davidcelis has joined #ruby
thecreators has quit [Quit: thecreators]
cakehero has quit [Quit: Computer has gone to sleep.]
ltsstar has quit [Quit: ltsstar]
<BoomCow> do you have a gist
<BoomCow> SirFunk,
<SirFunk> i can, hangon
yxhuvud has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
pu22l3r has joined #ruby
<SirFunk> BoomCow: relevant stuff.. and the solution I came up with (untested) is on line 38 https://gist.github.com/638e269830a5d99c4361
<BoomCow> what is send
<BoomCow> send("#{name}=", value)
bradhe has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
<SirFunk> it 'sends' that command to the object... It's just so i can pass in object properties like Order.new(:shippingaddress => this, :billingaddress => that)
<SirFunk> that's how active record models work but i'm not using active record so you need that bit to get the same type of functionality
<BoomCow> packageval = self.packages.find(){|x| x.add_item(item)}
<BoomCow> so you're iterating through the package?
<BoomCow> I have no idea what's going on in this line
<SirFunk> through the packageS yes
<SirFunk> well.. that's the bit i haven't tested yet.. but from my understanding it should run that block on each package until one returns something non false
<BoomCow> give me a min
nga4 has quit []
bradhe has quit [Ping timeout: 252 seconds]
Chryson has quit [Quit: Leaving]
robbyoconnor has joined #ruby
kamsky has quit [Ping timeout: 260 seconds]
minijupe has quit [Quit: minijupe]
gabrielrotbart has quit [Remote host closed the connection]
erichmenge has quit [Quit: Be back later]
Mon_Ouie has quit [Ping timeout: 246 seconds]
rippa has quit [Ping timeout: 252 seconds]
<BoomCow> SirFunk, I'm having a tough time trying to figure out what you're trying to accomplish
<SirFunk> ok
<SirFunk> I can try to re-explain
<BoomCow> let me show you what i've tried to do so far
carlyle has joined #ruby
<BoomCow> i think i have a mistake in there
awestroke has joined #ruby
hackerdude has quit [Remote host closed the connection]
cyong has quit [Quit: Leaving.]
DrShoggoth has quit [Quit: Leaving]
<SirFunk> I have a bunch of Items and depending on their type (in this code it's actually Item.gallery.slug that distinguishes) they have different weight and they take up a different amount of spaces in a Package. I need to figure out the optimal number of packages to fit all the items into. So what I'm doing is iterating over the list of existing pacakges, trying to add the item to the package (if it has space) if none of them have space I'll create
<SirFunk> a new pacakge and add the item to that
sagax has joined #ruby
<BoomCow> ahh
<BoomCow> so what is packageval
khakimov has quit [Ping timeout: 256 seconds]
<SirFunk> just a true/false value
fixl has joined #ruby
rohit has joined #ruby
straind has joined #ruby
khakimov has joined #ruby
<SirFunk> mocking objects for specs can be a pain
straind` has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
<BoomCow> has i'm still working on your thing
<SirFunk> yeah me too. I'm trying to write a unit test
<SirFunk> writing the test may be harder than writing the code that makes it pass :-P
<BoomCow> agreed
carlyle has quit [Ping timeout: 245 seconds]
pu22l3r has quit [Ping timeout: 265 seconds]
Ry_ has quit [Quit: Ry_]
<SirFunk> hmm
<BoomCow> hold on
<BoomCow> I'm still working on it
<SirFunk> unless nil ... does that execute or not?
<BoomCow> I"m just rewriting it
ABK has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
<SirFunk> oh wow this spec is making me find all kinds of problems with my logic :-p
awestroke has quit [Remote host closed the connection]
<BoomCow> SirFunk, hope that helps
<BoomCow> that's how I would approach your porblem
pu22l3r_ has quit [Remote host closed the connection]
manizzle has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
<BoomCow> it's incomplete as is
<BoomCow> because I don't know how you're checking if package is empty or full
<BoomCow> but you can fil that part in
bradhe has joined #ruby
<SirFunk> great that'll help thanks
<SirFunk> one problem I ran into is that i'm not considering the quantity of an item
<BoomCow> yeah
<SirFunk> is there a quick way to like.. duplicate one hash x times?
<Paradox> SirFunk, 10.times { hash.dup }
<Paradox> you want to assign them to variables?
<Paradox> gotta do a bit of metaprogramming
<Paradox> but still easy
<BoomCow> damn, I was trying to google the answer
<SirFunk> well.. I want to dump them into an array
<BoomCow> I was thinking
<SirFunk> ultimately
<BoomCow> he iterates with an index
<Paradox> oh
<Paradox> thats easier
<BoomCow> and use that index to create his x arrays
<BoomCow> hash*
AlbireoX`Laptop has quit [Remote host closed the connection]
<BoomCow> create the array outside the loop
<BoomCow> and then iterate and push into the array
<Paradox> arry = Array.new; 10.times { arry << hash.dup }
<Paradox> done
<SirFunk> Paradox: thanks
<SirFunk> oh.. and if the number of times is a string variable? :-P
<Paradox> dup ensures that each is a unique value
<Paradox> 10 is just a fixnum
JonnieCache has quit [Ping timeout: 265 seconds]
<Paradox> you can change it to whatever
<Paradox> if youre getting it from a string
<SirFunk> so like... Item.quantity.times works?
<Paradox> just string.to_i
<BoomCow> .to_i
<SirFunk> err
<SirFunk> item.quantity.to_i.times
<SirFunk> haha ok
<Paradox> ie "14".to_i == 14 would return true
jhgaylor has quit [Read error: Connection reset by peer]
answer_42 has joined #ruby
<BoomCow> did you catch our convo earlier Paradox
<Paradox> no
jhgaylor has joined #ruby
v0n has joined #ruby
<Paradox> lole
<Paradox> trole lole
andrewhl has quit [Remote host closed the connection]
wargasm has quit [Read error: Connection reset by peer]
<BoomCow> i'm lost again
manizzle has quit [Remote host closed the connection]
<_br_> BoomCow: with what?
dmiller_ has quit [Remote host closed the connection]
notVert has quit [Remote host closed the connection]
aganov has joined #ruby
tehlulz has quit [Quit: tehlulz]
sphera has quit [Quit: ZNC - http://znc.in]
quest88 has quit [Quit: quest88]
fantazo has quit [Remote host closed the connection]
dmiller has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
sphera has joined #ruby
topek has joined #ruby
rellin has joined #ruby
sphera has quit [Client Quit]
slainer68 has joined #ruby
<SirFunk> is there some way to do do something like this in online: items = get_items.map{|x| x[:quantity].to_i.times {x.dup}}
manizzle has joined #ruby
arubin_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yshh has quit [Ping timeout: 246 seconds]
siyusong has joined #ruby
<w2f2> anyone got pics of awesome PC desks?
Tania has joined #ruby
rohit has quit [Ping timeout: 252 seconds]
siyusong has quit [Client Quit]
sphera has joined #ruby
joeycarmello has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 240 seconds]
g-ram has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Remote host closed the connection]
yshh has joined #ruby
manizzle has quit [Remote host closed the connection]
gregorg has quit [Quit: Quitte]
F1skr has quit [Quit: WeeChat 0.3.9]
otters has quit [Ping timeout: 252 seconds]
<BoomCow> SirFunk, try it in IRB :)
<BoomCow> wait
<BoomCow> mapping only sorts it
<BoomCow> you'd still get the same count
<SirFunk> yeah.. that's why i was asking if there was something _like_ it :-P
<BoomCow> what do you want to do with it
<BoomCow> sort the items in get_item by quantity
<SirFunk> no sorting
<SirFunk> duplicating items by their quantity
<SirFunk> so if there was one item that had a quantity of 5.. then the returned array would have 5 identical items
<BoomCow> items.each do |item| item[:quantity].to_i.times {x.dup} end
<BoomCow> change the do and end to { }
<BoomCow> items.each { |item| item[:quantity].to_i.times {x.dup} }
queequeg1 has joined #ruby
<Paradox> cough use pry cough
<BoomCow> que es pry
artnez has quit [Quit: artnez]
<BoomCow> ahh
<BoomCow> tomato tomato
v0n has quit [Quit: Leaving]
<BoomCow> I actually use pry for work
maesbn has joined #ruby
<BoomCow> not sure why though
zommi has joined #ruby
hamed_r has joined #ruby
nadirvardar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
awestroke has joined #ruby
apeiros_ has quit [Ping timeout: 252 seconds]
manizzle has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
Morkel has joined #ruby
chussenot has joined #ruby
nadirvardar has joined #ruby
nadirvardar has quit [Remote host closed the connection]
shiin has joined #ruby
dekroning has quit [Ping timeout: 268 seconds]
mahmoudimus has joined #ruby
manizzle has quit [Remote host closed the connection]
elsifaka has joined #ruby
manizzle has joined #ruby
Mon_Ouie has joined #ruby
artOfWar has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
alem0lars has joined #ruby
jjang has quit [Remote host closed the connection]
eldariof has joined #ruby
joeycarmello has joined #ruby
jimeh has joined #ruby
u89 has joined #ruby
margle has joined #ruby
timonv has quit [Remote host closed the connection]
Hanmac1 is now known as Hanmac
charliesome has joined #ruby
wallerdev has quit [Quit: wallerdev]
hotovson_ has joined #ruby
joeycarmello has quit [Ping timeout: 255 seconds]
xorigin has joined #ruby
edi has joined #ruby
edi has left #ruby [#ruby]
khakimov has quit [Quit: Computer has gone to sleep.]
ilyam has quit [Quit: ilyam]
BoomCow has quit [Quit: Leaving]
uuair has joined #ruby
gregorg has joined #ruby
enderx86 has quit [Remote host closed the connection]
icole has joined #ruby
filipe has joined #ruby
kil0byte has joined #ruby
dekroning has joined #ruby
_alejandro has joined #ruby
dakine has quit [Quit: Leaving]
kil0byte_ has quit [Ping timeout: 260 seconds]
icooba has quit [Quit: Textual IRC Client: www.textualapp.com]
savage- has quit [Quit: savage-]
fyolnish has quit [Read error: Connection reset by peer]
beachandbytes2 has joined #ruby
r4um has joined #ruby
savage- has joined #ruby
fyolnish has joined #ruby
beachandbytes has quit [Ping timeout: 245 seconds]
und3f has joined #ruby
tris has quit [Ping timeout: 260 seconds]
jphpsf has quit [Ping timeout: 246 seconds]
mattp_ has quit [Ping timeout: 260 seconds]
rich__ has quit [Ping timeout: 265 seconds]
{^_^}_______ has quit [Ping timeout: 240 seconds]
emergion has joined #ruby
mattp_ has joined #ruby
etehtsea has joined #ruby
amacgregor_osx has quit [Read error: Operation timed out]
adeponte has quit [Remote host closed the connection]
savage- has quit [Client Quit]
__miha__ has quit [Ping timeout: 260 seconds]
jphpsf has joined #ruby
icooba has joined #ruby
arturaz has joined #ruby
icole has quit [Remote host closed the connection]
{^_^}_______ has joined #ruby
__miha__ has joined #ruby
richardjapenga has joined #ruby
qwerxy has joined #ruby
k610 has joined #ruby
sonne has left #ruby ["Leaving"]
akemrir has joined #ruby
Xeago has joined #ruby
monkegji_ has joined #ruby
tris has joined #ruby
Tania has quit [Quit: :p]
nilg has joined #ruby
d2dchat has quit [Remote host closed the connection]
disappearedng has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ephemerian has joined #ruby
Beoran_ has joined #ruby
Beoran__ has quit [Read error: Connection reset by peer]
nilg has quit [Ping timeout: 246 seconds]
yshh has quit [Ping timeout: 246 seconds]
yshh has joined #ruby
chussenot has quit [Ping timeout: 246 seconds]
swex has joined #ruby
cezar-b has joined #ruby
jarred_ has quit [Quit: jarred_]
timmillwood has joined #ruby
kil0byte_ has joined #ruby
sejo has quit [Quit: leaving]
sejo has joined #ruby
sejo has quit [Client Quit]
sejo has joined #ruby
sejo has quit [Client Quit]
jlwestsr has joined #ruby
kil0byte has quit [Ping timeout: 265 seconds]
icole has joined #ruby
sejo has joined #ruby
sejo has quit [Client Quit]
marr has joined #ruby
answer_42 has quit [Ping timeout: 276 seconds]
sejo has joined #ruby
r4um has left #ruby [#ruby]
sejo has quit [Client Quit]
virtuose has joined #ruby
sejo has joined #ruby
ottbot has joined #ruby
amacgregor_osx has joined #ruby
ryanf has quit [Quit: leaving]
ryanf_ has quit [Quit: leaving]
zigomir has joined #ruby
morf has joined #ruby
statarb3 has joined #ruby
qwerxy has quit [Quit: offski]
kil0byte has joined #ruby
jprovazn has joined #ruby
Sou|cutter has quit [Ping timeout: 260 seconds]
awestroke has quit [Remote host closed the connection]
radic_ has quit [Ping timeout: 246 seconds]
JonnieCache has joined #ruby
kil0byte_ has quit [Ping timeout: 240 seconds]
elaptics`away is now known as elaptics
havenn has joined #ruby
alem0lars has quit [Quit: quit]
blacktulip has joined #ruby
havenn has quit [Read error: No route to host]
alem0lars has joined #ruby
_alejandro has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 276 seconds]
runciter has joined #ruby
pavilionXP has joined #ruby
radic has joined #ruby
u89 has quit [Remote host closed the connection]
rakl has quit [Quit: gone]
casheew has quit [Read error: Connection reset by peer]
Erfankam has joined #ruby
drbawb has quit [Ping timeout: 265 seconds]
casheew has joined #ruby
hbpoison has joined #ruby
kokainepizza has quit [Quit: My pooter is sleep.]
slainer68 has joined #ruby
apeiros_ has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
casheew has quit [Read error: Connection reset by peer]
nari has quit [Ping timeout: 260 seconds]
alup has quit [Read error: Connection reset by peer]
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Erfankam has quit [Ping timeout: 246 seconds]
slainer68 has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Quit: Lost terminal]
akemrir has quit [Quit: WeeChat 0.3.9]
Averna has joined #ruby
elentras has joined #ruby
casheew has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
werdnativ has quit [Quit: werdnativ]
alup has joined #ruby
jprovazn has quit [Ping timeout: 252 seconds]
elico has joined #ruby
jgrevich has quit [Quit: jgrevich]
vlad_starkov has joined #ruby
chussenot has joined #ruby
awestroke has joined #ruby
Jellyg00se has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
Virunga has joined #ruby
timonv has joined #ruby
shiin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
und3f has quit [Quit: Leaving.]
bradhe has quit [Remote host closed the connection]
amacgregor_osx has quit [Read error: Operation timed out]
havenn has joined #ruby
shiin has joined #ruby
fyolnish has quit [Remote host closed the connection]
jlwestsr has quit [Ping timeout: 246 seconds]
Zai00 has joined #ruby
manizzle has quit [Ping timeout: 255 seconds]
skum has joined #ruby
esya has joined #ruby
codecaster has joined #ruby
amacgregor_osx has joined #ruby
hamed_r has quit [Ping timeout: 255 seconds]
Floydzy has joined #ruby
havenn has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
txdv has joined #ruby
yshh has quit [Ping timeout: 246 seconds]
dzhulk has joined #ruby
jbw has joined #ruby
tatsuya_o has joined #ruby
mikecmpbll has joined #ruby
qwerxy has joined #ruby
jprovazn has joined #ruby
yshh has joined #ruby
uuair has quit [Quit: uuair]
marius has quit []
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
flexd has quit [Quit: WeeChat 0.3.6]
manizzle has joined #ruby
workmad3 has joined #ruby
JonnieCache has quit [Quit: Reconnecting]
caleb_io has quit [Quit: caleb_io]
JonnieCache has joined #ruby
xpen has quit [Ping timeout: 255 seconds]
zmo_ has joined #ruby
Erfankam has joined #ruby
Rizzle has joined #ruby
Xeago has joined #ruby
bradhe has joined #ruby
Serial_Killer_C has joined #ruby
ViperMaul|_ has quit [Ping timeout: 246 seconds]
shiin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
shiin has joined #ruby
hotovson_ has quit [Remote host closed the connection]
timmow has joined #ruby
icole has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
havenn has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
francisfish has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Ping timeout: 268 seconds]
mneorr has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 246 seconds]
mneorr has joined #ruby
dekroning has quit [Quit: leaving]
jprovazn has quit [Ping timeout: 264 seconds]
colinbm has joined #ruby
shiin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
maasha has joined #ruby
cdt has joined #ruby
<maasha> hey, what is the best way to dump a data structure as XML?
AndChat| has quit [Ping timeout: 260 seconds]
* maasha is looking at xml-simple
margle has quit [Quit: Computer has gone to sleep.]
amacgregor_osx has quit [Read error: Operation timed out]
<JonnieCache> xmlsimple does the job. if you want heavy duty xml handling nokogiri is the one
<maasha> Right
manizzle has quit [Remote host closed the connection]
Ry_ has joined #ruby
jprovazn has joined #ruby
horofox has joined #ruby
<Muz> ActiveSupport specifies a #to_xml method on the Hash class. May not output the exact XML you need and something a bit more heavy weight may be desirable.
Xeago has quit [Remote host closed the connection]
<Muz> Also, there's the given "eurgh" of using a gem named /^Active\S+/
Xeago has joined #ruby
jprovazn has quit [Ping timeout: 240 seconds]
Erfankam has quit [Quit: Leaving.]
anderse has joined #ruby
<JonnieCache> activesupport is good
amacgregor_osx has joined #ruby
<JonnieCache> you can require it a piece at a time these days
k610 has quit [Ping timeout: 255 seconds]
samphippen has joined #ruby
whitedawg has joined #ruby
maxer has joined #ruby
hbpoison has joined #ruby
banister_ has joined #ruby
fermion has joined #ruby
kil0byte_ has joined #ruby
jbw has quit [Remote host closed the connection]
bradhe has joined #ruby
Grieg has quit [Quit: laterz! :D]
tonini has quit [Remote host closed the connection]
heftig has quit [Quit: leaving]
kil0byte has quit [Ping timeout: 252 seconds]
kil0byte has joined #ruby
baphled has joined #ruby
banister_ has quit [Ping timeout: 268 seconds]
hbpoison has quit [Ping timeout: 260 seconds]
jprovazn has joined #ruby
kil0byte_ has quit [Ping timeout: 246 seconds]
hamed_r has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
swex_ has joined #ruby
swex has quit [Ping timeout: 248 seconds]
schaary has joined #ruby
schaary has left #ruby [#ruby]
reinaldob has joined #ruby
manizzle has joined #ruby
margle has joined #ruby
Axsuul has quit [Ping timeout: 240 seconds]
topek has quit [Remote host closed the connection]
jds has quit [Ping timeout: 240 seconds]
greenarrow has joined #ruby
dhruvasagar has quit [Ping timeout: 265 seconds]
yshh has quit [Remote host closed the connection]
jds has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
Serial_Killer_C has quit [Remote host closed the connection]
samphippen has joined #ruby
runciter has quit [Quit: sleep!]
schaary has joined #ruby
zz_chrismcg is now known as chrismcg
d3vic3 has quit [Ping timeout: 252 seconds]
d3vic3 has joined #ruby
iamjarvo has joined #ruby
ohsiris has left #ruby [#ruby]
codecaster has quit [Quit: Leaving.]
havenn has joined #ruby
fyolnish has joined #ruby
Shrink has quit [Ping timeout: 265 seconds]
_Astral has quit [Ping timeout: 260 seconds]
dhruvasagar has joined #ruby
Edward__ has joined #ruby
fir_ed has joined #ruby
hamed_r has quit [Ping timeout: 246 seconds]
havenn has quit [Ping timeout: 256 seconds]
k610 has joined #ruby
sepp2k has joined #ruby
icole has joined #ruby
bradhe has joined #ruby
carloslopes has joined #ruby
icole has quit [Read error: Operation timed out]
berserkr has joined #ruby
Serial_Killer_C has joined #ruby
FlyingFoX has quit [Read error: Operation timed out]
etehtsea has quit [Quit: Computer has gone to sleep.]
timonv has quit [Ping timeout: 252 seconds]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
timonv has joined #ruby
FlyingFoX has joined #ruby
pigoz has joined #ruby
Shrink has joined #ruby
reinaldob has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
beiter has joined #ruby
reinaldob has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
adambeynon has joined #ruby
codecaster has joined #ruby
bier has quit [Ping timeout: 240 seconds]
ZubKonst_ has quit [Remote host closed the connection]
Averna has quit [Quit: Leaving.]
ZubKonst has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
cezar-b has quit [Ping timeout: 276 seconds]
Progster has joined #ruby
jrajav has joined #ruby
vlad_starkov has joined #ruby
hbpoison has joined #ruby
scx has joined #ruby
beachandbytes2 has quit [Ping timeout: 276 seconds]
zmo_ has quit [Quit: Leaving]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hbpoison has quit [Ping timeout: 260 seconds]
larissa has joined #ruby
Xeago_ has joined #ruby
mikecmpbll has joined #ruby
cezar-b has joined #ruby
SPYGAME has joined #ruby
bier has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
horofox has quit [Quit: horofox]
bluenemo has quit [Quit: Verlassend]
vlad_sta_ has joined #ruby
jenrzzz has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
carloslopes has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
radic_ has joined #ruby
horofox has joined #ruby
arietis has joined #ruby
carloslopes has joined #ruby
krz has quit [Quit: krz]
hbpoison has joined #ruby
bradhe has joined #ruby
u89 has joined #ruby
u89 has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
Xeago has joined #ruby
test3 has joined #ruby
Edward__ has quit [Ping timeout: 255 seconds]
ZubKonst has quit [Read error: Connection reset by peer]
fir_ed has quit [Ping timeout: 255 seconds]
ZubKonst has joined #ruby
Jdubs has joined #ruby
radic has joined #ruby
chussenot has quit [Quit: chussenot]
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
radic_ has quit [Ping timeout: 268 seconds]
yshh has joined #ruby
topek has joined #ruby
polymar has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
wicky has joined #ruby
test3 has quit [Quit: Leaving.]
daniel_- has joined #ruby
ttt_ has quit [Remote host closed the connection]
hamed_r has joined #ruby
Progster has quit [Ping timeout: 252 seconds]
<Jdubs> Hi guys, I'm about halfway through Why's poignant guide, and I finished the codeacademy Ruby page, where should I go from here? I'd like to do something to take a break from Why's guide and go back to it later
<Xeago> Jdubs: write a number series, like fibonacci
<Xeago> or a series of primes
<Jdubs> that's pretty easy, i need something harder
dreamz__ has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 265 seconds]
<Jdubs> I'm trying to get good enough to write a small text game (current goal)
timonv has quit [Remote host closed the connection]
<Jdubs> long term goal is a job working with Ruby :)
<Xeago> write a quiz
<Xeago> which reads out questions from a file
<Xeago> as ruby code
<Xeago> so you want a nice dsl there
<Xeago> and then collect information on the answers
<JonnieCache> or just write your own game of life implementation and try and make it efficient
colinbm has quit [Quit: colinbm]
<JonnieCache> thats always a good one
<Jdubs> Xeago, do I need to know YAML do that part? I haven't used that yet
<Xeago> you can also continue with ggenerated math-questions
<Xeago> Jdubs: no
<Xeago> write a ruby Dsl
<Jdubs> Xeabo, what does dsl stand for?
<Xeago> domain specific language
<Jdubs> And what would that mean, functionally, in relation to the objective of writing a ruby DSL?
<Jdubs> Sorry for the silly questions
<Jdubs> lol
colinbm has joined #ruby
<Xeago> question "Question text { option "1"; option "2"; answer "3" }
<Xeago> that is a dsl
<Xeago> it misses a " tho
<Jdubs> oh
<Xeago> nice small DSLs usually look pretty
<Xeago> and are fun to write
<Jdubs> So you program it to replace all instances of question with the other part?
<Xeago> they have nice relationships
slainer68 has joined #ruby
<Xeago> there was a nice article about DSL's a while ago
<Xeago> sec
<Jdubs> ok
<JonnieCache> Jdubs: they are a good way to learn about metaprogramming
<JonnieCache> and to have fun
<Jdubs> ahh!
<Jdubs> that's the part i was doing in the poignants guide
<Jdubs> but it got a bit confusing, so i wanted to take a break lol
<Jdubs> I'm also trying to work through the About.com text based game guide
<Jdubs> btw, i meant the metaprogramming section of poignants guide
Zai00 has quit [Quit: Zai00]
slainer68 has quit [Ping timeout: 246 seconds]
zemanel has joined #ruby
slainer68 has joined #ruby
SPYGAME has quit [Ping timeout: 260 seconds]
adeponte has joined #ruby
ffranz has joined #ruby
timonv has joined #ruby
reisl has joined #ruby
eqbaqu has joined #ruby
<Xeago> Jdubs: if I craft you a valid ruby file, your assignment is to make a program that asks the user for a file to load, and then asks the user questions
<Xeago> okay?
mpereira has joined #ruby
D4T has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fyolnish has quit [Remote host closed the connection]
<Jdubs> ok!
<eqbaqu> Hi everyone, I'm using jruby implementation, and i'm creating an application that is supposed to habdle at least 10k open TCP connections, it's more like a social networking app, anyways, I tried so many solution like celluloid and others but keep getting the same error which is i can't get more than 1.2 K Threads anyways
<Jdubs> I'll do my best
<Jdubs> You want me to post the answer to pastebin?
<JonnieCache> eqbaqu: sounds like an OS limit
<eqbaqu> is there anyways to enhance that ? like to do some workaround something like changing the limit's in my OS
<JonnieCache> eqbaqu: have you tried increasing some unix paramaters? ulimit and os on?
<eqbaqu> JonnieCache thanks for your welling to helo here
larissa has quit [Ping timeout: 246 seconds]
<JonnieCache> look at ulimit and stuff
<eqbaqu> but no i didn't , i would appreciate any help here
<JonnieCache> also there is a jruby channel on here
<eqbaqu> so is this related to jruby ? is this channel for MRI implementation ?
<Jdubs> Xeago: is this a decent page to learn how to do the assignment? http://jroller.com/rolsen/entry/building_a_dsl_in_ruby
[Neurotic] has quit [Remote host closed the connection]
<Xeago> thats the one I was looking for
<Xeago> ty :)
<Xeago> it gives you half of the assignment
<Xeago> altho I don't really agree with their DSL
<Xeago> I'd like it a bit more structured
<Xeago> when adding a tiny bit more structure to the DSL there, the relations become alot more natural
Slivka has joined #ruby
<Jdubs> hmmm
<Jdubs> Well I'm not really sure how you mean, since I haven't read the page yet lol
<Xeago> actually, that link will give you all of what I'd ask you to do
<Xeago> then don't :)
tk__ has joined #ruby
<Jdubs> Don't what? Sorry I can be a bit dense lol
<Xeago> then don't read it yet
<Jdubs> oh ok
<Jdubs> so try to do it just from your assignment ?
<Jdubs> without reading anything
Zai00 has joined #ruby
<mikecmpbll> quite liking this new relic dev thing
<JonnieCache> eqbaqu: this is the channel for the ruby language in general
<mikecmpbll> http://snag.gy/037ke.jpg - don't know what i can learn from that though
<JonnieCache> eqbaqu: however in the jruby channel you will find jruby experts
dekroning has joined #ruby
<eqbaqu> ok thanks a lot here , appreciated
LouisGB has joined #ruby
u89 has joined #ruby
<Xeago> Jdubs: here is an example file to read
Virunga has quit [Remote host closed the connection]
<Jdubs> ok so you want me to write a program that uses this to prompt the user for the answer?
heftig has joined #ruby
SPYGAME has joined #ruby
Virunga has joined #ruby
eqbaqu has quit [Quit: Page closed]
Serial_Killer_C has quit [Remote host closed the connection]
chussenot has joined #ruby
skaczor has joined #ruby
bradhe has joined #ruby
codecaster has quit [Read error: Connection reset by peer]
<Jdubs> Xeago?
colinbm has quit [Quit: colinbm]
sheerun has joined #ruby
codecaster has joined #ruby
PraiseChaos has joined #ruby
fyolnish has joined #ruby
PraiseChaos has quit [Client Quit]
Floydzy has quit [Quit: Floydzy]
vlad_starkov has joined #ruby
<Xeago> Jdubs: yes
frogstarr78 has quit [Ping timeout: 240 seconds]
Virunga has quit [Remote host closed the connection]
atlantaman has joined #ruby
frogstarr78 has joined #ruby
vlad_sta_ has quit [Read error: Connection reset by peer]
enderx86 has joined #ruby
hammond has joined #ruby
Mon_Ouie has joined #ruby
<hammond> hi Python vs Ruby, which would be the easiest to learn?
Virunga has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
colinbm has joined #ruby
<elaptics> hammond: if you're asking in the #ruby channel, what answers do you think you're going to get :)
atlantaman has quit [Ping timeout: 240 seconds]
mklappstuhl has quit [Ping timeout: 240 seconds]
<Xeago> hammond: mostly depends on your background
<hammond> I know some C++
mgrayson has joined #ruby
fixl has joined #ruby
<hammond> elaptics lol
Banistergalaxy has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
rippa has joined #ruby
radic has quit [Disconnected by services]
jrajav has quit []
Mon_Ouie has quit [Ping timeout: 246 seconds]
radic_ has joined #ruby
jprovazn has quit [Ping timeout: 240 seconds]
<Xeago> hammond: experience with c++11?
<Xeago> c++11 is pretty, and can sometimes resemble dynamicness
baphled has quit [Ping timeout: 246 seconds]
<Xeago> anyways I'll be right back
Ry_ has quit [Quit: Ry_]
filipe has quit [Ping timeout: 246 seconds]
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
<hammond> sure C++11
Xeago has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
Tania has joined #ruby
vlad_starkov has joined #ruby
pyx has quit [Quit: Leaving]
<JonnieCache> hammond: if you can known out modern C code without sweating over it you will be happy in python or ruby i reckon
<JonnieCache> s/known/knock
Xeago has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
<Xeago> Jdubs: progress?
x0F_ is now known as x0F
timonv has quit [Remote host closed the connection]
Juul has quit [Ping timeout: 265 seconds]
hotovson has joined #ruby
timonv has joined #ruby
ewag has joined #ruby
margle has joined #ruby
sailias has quit [Quit: Leaving.]
strangeworks has joined #ruby
ltsstar has joined #ruby
<Jdubs> Xeago sorry
<Jdubs> Xeago had to afk to take care of some stuff
<Jdubs> Xeago: writing the prog now
vlad_starkov has quit [Remote host closed the connection]
filipe has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Banistergalaxy has joined #ruby
mgrayson has quit [Quit: mgrayson]
mgrayson has joined #ruby
erichmenge has joined #ruby
mgrayson has quit [Client Quit]
yakko has joined #ruby
havenn has joined #ruby
mark_locklear has joined #ruby
kil0byte_ has joined #ruby
havenn has quit [Remote host closed the connection]
chrisja has joined #ruby
kil0byte has quit [Ping timeout: 264 seconds]
erichmenge has quit [Quit: Be back later]
mengu has joined #ruby
dekroning has quit [Ping timeout: 265 seconds]
whitedawg has quit [Quit: Leaving.]
jozefk has joined #ruby
jozefk has joined #ruby
undersc0re97 has joined #ruby
answer_42 has joined #ruby
greenail has joined #ruby
fantazo has joined #ruby
<greenail> i'm doing {:name => obj.name,:klass => obj.class}.json and obj.class is expanded to an array of objects unless i call .class.to_s
<greenail> any idea why? I"m using datamapper
radic has joined #ruby
<greenail> also i'm using rails
bradhe has joined #ruby
radic_ has quit [Ping timeout: 240 seconds]
<greenail> s/.json/.to_json/
<greenail> any ideas?
<Muz> Calling .class on an object returns a Constant representing the class, not a string showing the classname
<Muz> 1.9.3-p194 :003 > Object.class.to_s => "Class"
<ddd> oo, didn't know that myself
<Muz> 1.9.3-p194 :004 > Object.class => Class
<Muz> Note the quotes.
<greenail> ya, i get that
Vert has joined #ruby
<greenail> but calling {:foo => obj.class}.to_json is expanding into {"foo",{[obj1,obj2]}
<ddd> Muz: but why would that cause an array of that_class objects to be returned? (curious myself as to the answer, didn't think that would do that)
<greenail> ya, i'm assuming datamapper or rails is mokeypatching .class
<Muz> What's defining to_json?
<greenail> rails i guess
kil0byte_ has quit [Remote host closed the connection]
<greenail> or json
<Muz> Either datamapper or something else is monkeypatching .class (!!!), or has different handling for a String vs a Constant
<greenail> ya String works fine
<greenail> but it was soo odd
<greenail> i had to ask
<Muz> My point is that Object.class is not equal to Object.class.to_s due to different return values. :)
<greenail> agreed
hammond has left #ruby [#ruby]
<greenail> i'll go bug the datamapper folks thanks
greenail has left #ruby [#ruby]
daniel_- has quit [Quit: WeeChat 0.3.9]
<ddd> his point makes perfect sense. i would have thought, based on what he said, that you would have been populated with a constant not an array. like he's saying that tells me (now that he made the behaviour clear) there's a bug in whichever is hadling the to_json. I can't think of an instance where returning an array because you used .class is valid.
dekroning has joined #ruby
<ddd> when you figure out which it is (rails or the json gem) i'd file a bug. that's .. unexpected.. behaviour in just about any instance.
<ddd> unless someone else disagrees.
krawchyk has joined #ruby
jlwestsr has joined #ruby
Araxia has quit [Quit: Araxia]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
thecreators has joined #ruby
<JonnieCache> i bet its rails
flip_digits has joined #ruby
rippa has quit [Ping timeout: 264 seconds]
dekroning has quit [Ping timeout: 260 seconds]
Ry_ has joined #ruby
ltsstar has quit [Quit: ltsstar]
skaczor has quit [Remote host closed the connection]
jprovazn has joined #ruby
skaczor has joined #ruby
Katniss has quit [Ping timeout: 248 seconds]
dekroning has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
geekbri has joined #ruby
ddv has quit [Ping timeout: 240 seconds]
<Muz> JonnieCache: it often is. Too much magic for its own good!
Elhu has joined #ruby
linoj has joined #ruby
slainer68 has quit [Remote host closed the connection]
<ddd> tis why i've stayed away from it for awhile. but i've a contract dealing with a rails app, so, no more hiding for me :/
philcrissman has joined #ruby
Katniss has joined #ruby
Tania has quit [Read error: Connection reset by peer]
moshee has quit [Ping timeout: 260 seconds]
ddv has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
jprovazn has quit [Ping timeout: 260 seconds]
seanyo has joined #ruby
tbrock_ has joined #ruby
Shrink has quit [Ping timeout: 265 seconds]
crocket has joined #ruby
mikecmpbll has joined #ruby
<crocket> Is it possible to deploy multiple instances of a rails application via NameVirtualHosts with different values of RAILS_ENV variable?
radic has quit [Disconnected by services]
radic_ has joined #ruby
<Hanmac> crocket you are in the wrong channel
hamed_r has quit [Quit: Leaving]
<Hanmac> you are looking for #rubyonrails
<ddd> #rubyonrails and no, not that i know of
skaczor has quit [Remote host closed the connection]
iPhoneMRZ has joined #ruby
skaczor has joined #ruby
dr_bob has joined #ruby
enderx86 has quit [Remote host closed the connection]
tommyvyo has joined #ruby
Guest10501 has joined #ruby
<jozefk> can ruby be used for web without rails?
kamsky has joined #ruby
<Hanmac> jozefk i think yes
<Jdubs> Xeago: You there?
<Xeago> 'ish
SPYGAME has quit [Ping timeout: 255 seconds]
<JonnieCache> jozefk: www.sinatrarb.com
<Xeago> there's also rack
<Xeago> which is what rails and sinatra are build on
<jozefk> sinatra is CMS or something like that yeah?
<Xeago> no
<ddd> sinatra, padrino, ramaze, and a couple others
chussenot has quit [Quit: chussenot]
<heftig> sinatra is a minimal app framework
awestroke has quit [Remote host closed the connection]
<JonnieCache> theyre all frameworks
<Jdubs> Xeago: ok, just wanted to let you know, i had to cook lunch etc so i was gone a bit, in case you were wondering why i was taking so long :)
<Jdubs> Xeago: I think I'm close to a solution, I hope
<jozefk> I see. same like rails is framework as well
tatsuya_o has quit [Remote host closed the connection]
<jozefk> so I guess nothing is wrong with rails then :)
jprovazn has joined #ruby
<Xeago> not really, people love it, people hate it
chussenot has joined #ruby
<Xeago> like with everything
Shrink has joined #ruby
krawchyk_ has joined #ruby
<jozefk> but it works good enough and most of the time I believe
<ddd> its more a matter of that A) is does a LOT of magic behind the scenes so it can be difficult to figure out what exactly is going on, and B) that so many people think that you can't use ruby without rails that it puts a shadow on ruby itself directly that is undeserved
kamsky has quit [Ping timeout: 248 seconds]
<jozefk> it seems you can't use ruby for web without framework but that's normal I guess
<heftig> the most minimal thing is using CGI, i guess
<ddd> there is Net::HTTP and others
<ddd> you most assuredly can use ruby for the web without frameworks. frameworks just dot he magic and building of core pieces for you
<jozefk> CGI like with perl for example?
tbrock_ has quit [Quit: Computer has gone to sleep.]
<Xeago> 'ish, you can get comfortably low with rack
robinbowes has joined #ruby
<robinbowes> Afternoon all
Jdubs has quit [Read error: Operation timed out]
<JonnieCache> the problem with rails is that it can do everything, therefore people do everything with it
<JonnieCache> rather than judging if its appropriate or not
<jozefk> :)
<ddd> i'll agree with that
<robinbowes> I'm writing a custom function for puppet to pass in a hash and a list of key names and ensure that a) all keys are present and b) all values are non-empty
<jozefk> what is Rails best for?
krawchyk has quit [Ping timeout: 255 seconds]
<Xeago> happy developers
<Xeago> sometimes
<jozefk> haha
<robinbowes> I'm struggling to come up with a test for "non-emptiness"
<JonnieCache> its good for people who dont really know where theyre going, but want to get there fast
arkiver has joined #ruby
<JonnieCache> startups and the like
<ddd> best is subjective. it all depends on who you're talking to. that kind of question willg et you 400 different answers out of 400 different people
jprovazn has quit [Ping timeout: 260 seconds]
<jozefk> sounds like Rails is not bad at all :)
<JonnieCache> robinbowes: value.present?
<heftig> it's not
<JonnieCache> dunno if thats part of stdlib or not
<robinbowes> Ooo, sounds promising...
<Xeago> I think it is active support
<ddd> it isn't. some people will implement certain things differently and don't like this or that implementation within the framework, but that can be said of every framework in existance
<Xeago> I think that is nil and blank
crocket has left #ruby ["Leaving"]
<heftig> robinbowes: present? being provided by rails (activesupport)
<ddd> really the only answer is to look at what rails framework can do, and see if it fits your needs/wants
<robinbowes> Mmm, am not using rails
<ddd> and btw, know that you can use the gems that rails uses without using rails itself.
mark_locklear has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
<jozefk> nice
<ddd> I use the behometh called ActiveRecord, along with ActiveModel, ActiveSupport, and Arel without rails in a lot of my personal projects
bradhe has joined #ruby
<heftig> robinbowes: it's basically ! (x.respond_to?(:empty?) ? empty? : !self)
<ddd> use standalone_migrations gem to mimic the rails migration generator
Uranio has quit [Remote host closed the connection]
<heftig> er
seanyo has quit [Read error: Connection reset by peer]
<heftig> robinbowes: it's basically !(x.respond_to?(:empty?) ? x.empty? : !x)
<ddd> i really need to learn the Sequel gem, so i cn swap out AR
tpe11etier has joined #ruby
tpe11etier has quit [Client Quit]
<Xeago> ddd: I did that, then my employer wanted elasticsearch
<ddd> just there are a lot of the AR helpers that I like
<Xeago> now all my projects use elasticsearch as storage
<Xeago> with tire as client
<robinbowes> heftig: thx - am testing now
hemanth has quit [Read error: Connection reset by peer]
SPYGAME has joined #ruby
hemanth has joined #ruby
<ddd> heard *of* elasticseach, just never used it
jcaudle has joined #ruby
<Xeago> heftig: btw, what I said yesterday: never said your root's home to your normal admin user's root directory
<Xeago> it wipes your ~/Library
<heftig> robinbowes: it does special-case a few things, though. mostly performance, but strings full of whitespace are "non-present" as well
bbttxu has quit [Quit: bbttxu]
<heftig> Xeago: ah, i don't use osx.
ananthakumaran has quit [Quit: Leaving.]
<jozefk> got to go for a while. catch you later :)
jozefk has quit [Quit: by-bye]
<ddd> i do, but now i know i'll never try such a strange thing :)
Lemtzas has quit [Read error: Connection reset by peer]
Jdubs has joined #ruby
<ddd> Xeago: for what reason would you do such a strange thing in the first place?
<Jdubs> Xeago: Can I show you what I have so far and see if I'm on track?
<Xeago> same environment when having to do stuff in root
<ddd> beyond not desiring full isolation of the root account
<Xeago> Jdubs: sure
<robinbowes> heftig: seems to work
<ddd> i see
aquaranto has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<robinbowes> Doesn't treat a string of ' ' as empty though (which is good - that's what I want)
AndChat| has joined #ruby
GoGoGarrett has joined #ruby
sheerun has left #ruby [#ruby]
Lemtzas has joined #ruby
hemanth has joined #ruby
cakehero has joined #ruby
<Xeago> Jdubs: try to not do error handling now
hemanth has quit [Read error: Connection reset by peer]
<Jdubs> ok
<Xeago> and you will want classes to represent questions
hemanth has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<Jdubs> hmmm
<Jdubs> Like...a separate class for each question?
krawchyk_ has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
<Xeago> a separate instance of class question per question
joofsh has joined #ruby
krawchyk has joined #ruby
<Hanmac> File.new is not what you want ...
csaunders has joined #ruby
<Jdubs> ahhh i see
pothibo has joined #ruby
<Jdubs> so for instance question1 = question.new?
<Xeago> Jdubs: the way I would approach this is to ask myself, how does a question look like?
AndChat- has joined #ruby
<Xeago> e.g. what is the data structure I will be working with and how do I want to interact with it?
arietis has quit [Quit: Computer has gone to sleep.]
<robinbowes> heftig: Ended up with this: Array(args[1]).each {|k| raise "Value of key #{k} not set" if (args[0][k].respond_to?(:empty?) ? args[0][k].empty? : !args[0][k])}
mark_locklear has joined #ruby
invisime has joined #ruby
<Jdubs> ok
<Jdubs> Keep in mind this is the first real program I've written in Ruby, and the first time I've done metaprogramming lol
AndChat| has quit [Ping timeout: 260 seconds]
<Jdubs> But I think I have an idea
<Jdubs> I need to use class_eval right?
<Jdubs> to input more classes?
JonnieCache has quit [Read error: Operation timed out]
<Xeago> Jdubs: don't think on that level when starting, start by defining your classes => models
<Jdubs> ok
Banistergalaxy has quit [Ping timeout: 260 seconds]
horofox has quit [Quit: horofox]
bradhe has quit [Ping timeout: 264 seconds]
Banistergalaxy has joined #ruby
carlyle has joined #ruby
<Xeago> ask the following questions, what makes up a question
AndChat- has quit [Ping timeout: 260 seconds]
<Xeago> it might have answers like: A question-text, wrong answers and correct answers
JonnieCache has joined #ruby
jrist-afk is now known as jrist
jonathanwallace has joined #ruby
jeffreybaird has joined #ruby
<Xeago> a question type, multiple-choice, open
atmosx has joined #ruby
bbttxu has joined #ruby
<atmosx> hello
kil0byte has joined #ruby
sheerun has joined #ruby
<atmosx> I received an email from a company looking for a ROR dev, relocation in berlin. if anyone is interested drop a pm.
solidoodlesuppor has joined #ruby
<Jdubs> Xeago: Ok, how's this? http://pastebin.com/JMPuuTG3
<JonnieCache> if its like that, we're hiring ruby devs in brighton :)
tpe11etier has joined #ruby
<atmosx> JonnieCache: there are no ruby devs in Brighton?
Banistergalaxy has quit [Ping timeout: 260 seconds]
<atmosx> I can't believe the market is so badly in need for ruby developers :-P
gmci has quit [Quit: Computer has gone to sleep.]
<Hanmac> self. can be replaced with @
iPhoneMRZ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<Jdubs> Hanmac: is it interchangable? If so, I prefer if both work the same
<JonnieCache> atmosx: no decent ones who are unemployed
<Jdubs> I prefer .self*
<JonnieCache> tbh we havent been looking very hard
gmci has joined #ruby
<Xeago> Jdubs: that intialize defines a structure but does not lay out a structure, also this requires the answers, and the questions known before initialization
mikepack has joined #ruby
<Xeago> tbh, that looks java'ish
<atmosx> JonnieCache: can I ask you a question that you might probably be able to answer :-P
<Xeago> Jdubs: do you know what a block is?
<atmosx> JonnieCache: why do you need relocation in Brighton and can't the guy work via internet?
<Jdubs> Xeago: any group of code basically
<Hanmac> Jdubs they are not interchangeable but in your case, @ would be better
<Xeago> Jdubs: aight, look at the file I gave you, are there blocks in there?
<Jdubs> Xeago yeah
rjsamson has joined #ruby
<Xeago> shall I give you a hand in how I'd like it to look?
<JonnieCache> atmosx: because remote working is much less eficient than having people in the office
<Jdubs> Xeago, would it be better if I try again? perhaps with just a general hint or something?
<Jdubs> Xeago, I don't like to give up
pothibo has quit [Quit: pothibo]
<JonnieCache> i think if they wanted remote workers they already have freelancers they know and have used before
<Xeago> Jdubs: not sure if I am competent enough to describe it as a hint, may I give it in code?
<Jdubs> Xeago: yeah that's fine
<atmosx> JonnieCache: and out of curiosity, what is the monthly avg salary for a ror dev in UK?
lake has quit [Quit: WeeChat 0.3.7]
gmci has quit [Client Quit]
iamjarvo has quit [Quit: Computer has gone to sleep.]
radic_ has quit [Ping timeout: 246 seconds]
<Xeago> JonnieCache: my girlfriend wants to work in customer support.. can we come as a package:O?
gmci has joined #ruby
iamjarvo has joined #ruby
<wmoxam> atmosx: 3
axl_ has joined #ruby
<atmosx> Xeago: you're willing to leave Sweden for UK?
rjsamson has quit [Ping timeout: 268 seconds]
<atmosx> wmoxam: 3k UKP?
<atmosx> or 3k EUR?
<wmoxam> no, just 3
<wmoxam> ;)
iamjarvo has quit [Client Quit]
<atmosx> like in penis?
<atmosx> lol
<Xeago> atmosx: willing to leave sweden for work for my girlfriend
<atmosx> oIo <-- that 3?
<atmosx> omg
<wmoxam> lol
<Xeago> she's applied to a ton of companies here in sweden
<wmoxam> 8===D <- 3
<Xeago> and gotten a bit depressed because she did not get a single reaction
nateberkopec has joined #ruby
<atmosx> Xeago: crisis?
kn330 has joined #ruby
<Xeago> atleast a "You have been considered but not found applicable" would have been nice
<atmosx> I see
<Xeago> even if they didn't consider her at all
<atmosx> :-(
jamescarr has joined #ruby
<Xeago> jsut _any response_
<atmosx> those bastards
u89 has quit [Remote host closed the connection]
<Xeago> Jdubs: did the three lines of code help a bit?
maasha has quit [Quit: Page closed]
nanderoo has joined #ruby
arkiver has quit [Quit: Leaving]
<jamescarr> How can I stop feeling dirty doing things like Person.find() inside of my classes? I'm used to uding DI
<jamescarr> rather than just stubbing out Person's static methods
otters has joined #ruby
slainer68 has joined #ruby
<Jdubs> Xeago I think I got the class down maybe
<Jdubs> tell me what you think
freeayu has quit [Remote host closed the connection]
gmci has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
<Jdubs> oops continue should be one line lower
adeponte has quit [Remote host closed the connection]
gmci has joined #ruby
<Jdubs> actually I just noticed a big mistake, lol...i have it working on the text instead of the block
<Jdubs> :/
arya_ has joined #ruby
<Xeago> Jdubs: the block does not contain strings per line
<Jdubs> oh wait
<Jdubs> hmm
<Xeago> it contains ruby methods
adeponte has joined #ruby
<Xeago> I don't think you can do block.each
gift has joined #ruby
<Xeago> you'll have to eval it on the question instance
<Jdubs> then I have no clue how to do it :/
<Xeago> and that is 1 line of meta programming
Cultofmetatron has joined #ruby
butblack has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
slainer68 has quit [Ping timeout: 240 seconds]
<JonnieCache> jamescarr: whats stopping you from doing DI
bairui has quit [Ping timeout: 256 seconds]
<jamescarr> JonnieCache: it feels akward?
<Jdubs> so do I need a definition for wrong and true inside of the Question class? and in the initialize part I need a yield to run the block?
<jamescarr> instead of calling Person.first() I call @person.first() and instantiating the object is: TokenRefresher.new(Person)
gmci has quit [Client Quit]
bairui has joined #ruby
gmci has joined #ruby
tpe11etier has left #ruby [#ruby]
mikepack has quit [Remote host closed the connection]
kn330 has quit [Read error: Connection reset by peer]
ddd has left #ruby [#ruby]
ddd has joined #ruby
<Xeago> wops it has to be instance_eval(&block) instead of self.instance_eval
lkba has joined #ruby
<JonnieCache> jamescarr: whats wrong with that. it only looks weird because ruby people think theyre too good for OO
nitti has joined #ruby
<JonnieCache> you could probably use some metaprogramming to make it look nicer
<Jdubs> Xeago: so my assignment is to try to use this outline to build it into running each block/question, ask user for input, and determine if true?
<Xeago> first parse the datafile I send you the first time, it asks the user for the file
<Xeago> than to construct in ruby a representation of questions and answers
<Xeago> and then ask the user the questions and spit out data about how correct the user was
postmodern has quit [Quit: Leaving]
<Xeago> if you want to go really fancy, don't think of text as a string
<Xeago> it can be lambda's that return a string
<Xeago> but that is for later
<jamescarr> JonnieCache: I got ya
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
undersc0re97 has quit [Quit: Leaving]
casheew has quit [Read error: Connection reset by peer]
jaygen has quit [Remote host closed the connection]
<Jdubs> Xeago: Ok i'll do my best
KindTwo has quit [Ping timeout: 246 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<jamescarr> unrelated question... I am using thin and during local development I have to hit ctrl+c like 50 times to get it to exit?
jaygen has joined #ruby
erichmenge has joined #ruby
ilyam has joined #ruby
jrajav has joined #ruby
asobrasil has quit [Read error: Connection reset by peer]
casheew has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<JonnieCache> weird isnt it
gmci has quit [Quit: Computer has gone to sleep.]
<JonnieCache> i think perhaps its because it doesnt want to drop open connections?
Appineer has joined #ruby
asobrasil has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
gmci has joined #ruby
jaygen has quit [Ping timeout: 252 seconds]
horofox has joined #ruby
samphippen has joined #ruby
gmci has quit [Client Quit]
gmci has joined #ruby
clj_newb has joined #ruby
morf has quit [Quit: eof]
gmci has quit [Client Quit]
<Jdubs> Xeago: Okay I think I got it! :)
CQN has quit [Ping timeout: 244 seconds]
guns has joined #ruby
Katniss has quit [Ping timeout: 260 seconds]
KindTwo has joined #ruby
<atmosx> using iconv is deprecated in r1.9 right?
chussenot has quit [Quit: chussenot]
<JonnieCache> think so
gmci has joined #ruby
<JonnieCache> its all built in now
<Xeago> Jdubs: what is @num?
<Xeago> and why does @answers exist?
seanyo has joined #ruby
fmcgeough has joined #ruby
gmci has quit [Client Quit]
chussenot has joined #ruby
<Xeago> you are altering the representation of an answer inside a question
guns has quit [Client Quit]
<Xeago> there's no need to prefix a number when constructing a question
<Jdubs> ummm
nedbat has joined #ruby
<Jdubs> The numbers are so they will know what number to enter
<Xeago> do that when you ask the user
<Jdubs> and then the program can reference the number to the answer
gmci has joined #ruby
<Jdubs> to determine if it is correct
<Xeago> neither the question nor the answer need to know which answer they are
francisfish has quit [Ping timeout: 265 seconds]
<nedbat> I'm a ruby newby, trying to edit a rakefile. I have Dir["common/lib/*"].each do |lib| etc, but it's finding regular files as well as subdirectories. I want to only loop over the subdirectories. How can I do that?
<otters> Dir["common/lib/*"].select{|x|File.directory?(x)}
k610 has quit [Ping timeout: 265 seconds]
artnez has joined #ruby
<Jdubs> Xeago: I guess I don't understand what all the variables are for then :/
<nedbat> otters: thanks!
gmci has quit [Client Quit]
<Xeago> Jdubs: okay, let me explain then
<Xeago> @false is an array which holds all false answers
<Xeago> @true is an array which holds all true answers
<Xeago> @text holds the question text
k610 has joined #ruby
<Xeago> each item in @true/@false, for now, is a string
Katniss has joined #ruby
<Jdubs> oh ok, so later we will use a method that will see if each array includes the answer?
stopbit has joined #ruby
gmci has joined #ruby
<Xeago> each what array?
<Xeago> the question class does not care about answers given by users
<Xeago> it just says what the question is, and possible answers
wallerdev has joined #ruby
<Xeago> you can access the question text with the #text method (see the attr_reader)
<Jdubs> the @true @false and @answer arrays
<Xeago> there is no @answer array
<Xeago> Question-class does not care about user input
<Jdubs> oh i made one lol
<Xeago> I did not :), the quiz class will check if the user provided answer is correct or not
<Xeago> 'quiz class' in quotes
vickaita has joined #ruby
<scx> how to split string [0-9]+[a-z]* (e.g.: 0, 0a, 3s, 2) to [0-9]+ and [a-z]*?
KindTwo has quit [Ping timeout: 240 seconds]
<Jdubs> will the user be providing a string answer or a number answer?
<Xeago> Jdubs: does not matter at this stage
Morkel has quit [Quit: Morkel]
<Xeago> Jdubs: do you have irb open?
<Jdubs> im having trouble understanding how we will get the right order of the answers
<Jdubs> yes
<Xeago> Jdubs: focus on getting the file-representation in ruby-objects first, then we will continue with quizzing the questions
<jrajav> scx: Just put both of those sub-expressions in parens and use that regex to capture them
<jrajav> scx: Do you know about capturing subgroups in regex?
<Jdubs> if all we return in the true and false answers, how will we later put outthe answers in the right order?
<Xeago> Jdubs: we're not at that part yet
<scx> jrajav: no, i dont know how to do that in ruby (but i know grep/sed)
<Jdubs> ok
<Jdubs> i think i got it this time lol
bbttxu has quit [Ping timeout: 246 seconds]
<Hanmac> scx "0a".scan(/([0-9]+)([a-z]*)/)[0] or "0a".match(/([0-9]+)([a-z]*)/)[1..-1]
<scx> Hanmac: thanks
rafter has joined #ruby
<Xeago> Jdubs: however, answers always returns @false, @true in that order
<Xeago> use a .shuffle on them :)
rjsamson has joined #ruby
<Jdubs> I don't know that command yet
<Jdubs> How do I use it?
<Xeago> Array#shuffle
<Xeago> [1,2,3].shuffle => [3,1,2]
gmci has quit [Quit: Computer has gone to sleep.]
<Xeago> it shuffles the array, randomly
margle has quit [Quit: Computer has gone to sleep.]
<Xeago> you can add arrays together: [1,2]+[3,4] = [1,2,3,4]
francisfish has joined #ruby
<Xeago> ([1,2]+[3,4]).shuffle => [2,4,3,1]
Astral has joined #ruby
gmci has joined #ruby
<Jdubs> ok so return [@false , @true].shuffle ?
Astral is now known as Guest84680
<Xeago> to answer your earlier issue: you can def correct? (text); @true.contains? text; end
SPYGAME has quit [Read error: Connection reset by peer]
<jrajav> Xeago: How's the VM coming?
<Xeago> no, (@false + @true).shuffle
BrianJ has joined #ruby
<Jdubs> ah i see
<Xeago> vagrant is harder than I thought
elsifaka has quit [Read error: Connection reset by peer]
<Xeago> booting it up next this weekend to just see how the vm itself is set up
<Xeago> and then decide to either leave it running
siyusong has joined #ruby
iamjarvo has joined #ruby
<Xeago> or do other stuff
elsifaka has joined #ruby
<jrajav> I still don't understand why it has to be vagrant :P
<jrajav> Couldn't you just use virtualbox
<Xeago> vagrant makes managing the box a bit easier
bdnelson has joined #ruby
<Xeago> which leads me to this question, I'll have to modify the vm with a screen attached (vbox-vnc prolly), right?
siyusong has quit [Client Quit]
<Xeago> to get my ssh-key in it
<Jdubs> Xeago: I made the change on the return, am I ready for the next step?
bdnelson has left #ruby [#ruby]
<Xeago> Jdubs: next step is to parse the file and call question(text,&block) :)
bbttxu has joined #ruby
radic has joined #ruby
bradhe has joined #ruby
<Xeago> you probably want to do something like this
<jrajav> Xeago: Uh, well.. you would need a screen attached at some point to start the bot and/or set up stuff, so yeah
heftig has quit [Quit: leaving]
<Xeago> I mean a gui*
<Muz> Fortunately, Virtualbox has the vrdp adapter for displays.
<jrajav> Right, but you need the gui to set up stuff for headless too
<Muz> Which means you could boot it up on a headless box and from another machine, RDP to the host:port
<Appineer> Are there any good GUI bindings for Ruby? I've seen GTK-ruby but it seems rather out of date.
qwerxy has quit [Quit: offski]
t4nk310 has joined #ruby
<Xeago> Muz: I'd prefer the vnc version of that
<Muz> Appineer: shoes, Qt4. What're you trying ot achieve?
<t4nk310> Hello
<t4nk310> where can i find where yard stores documentation?
guns has joined #ruby
<t4nk310> YARD gem*
<Appineer> Muz: I've got a collection of dev related scripts that I want to create a graphical interface for, for some of the less tech savvy people on my team to feel more comfortable using.
<Jdubs> Xeago: will this run the file? "instance_eval(File.read(file))"
<Muz> Appineer: shoes may be a lightweight-enough solution.
<Xeago> Jdubs: that I don't know
gmci has quit [Quit: Computer has gone to sleep.]
<Appineer> Muz: Cool, I will check that out.
centipedefarmer has joined #ruby
Serial_Killer_C has joined #ruby
<Xeago> Jdubs: look at the docs if you can pass instance_eval a string
sambio has joined #ruby
yshh has quit [Remote host closed the connection]
krz has joined #ruby
gmci has joined #ruby
bdnelson has joined #ruby
KindTwo has joined #ruby
<Jdubs> hmmm
BadProphet has joined #ruby
<Jdubs> Xeago: how would you do it?
<Xeago> probably load(file)
seanyo has quit [Ping timeout: 246 seconds]
t4nk310 has quit [Client Quit]
timonv has quit [Remote host closed the connection]
SCommette has joined #ruby
radic has quit [Read error: Operation timed out]
mpereira has quit [Ping timeout: 260 seconds]
radic has joined #ruby
reisl has quit [Quit: Leaving]
zommi has quit [Quit: Leaving.]
<Jdubs> ok i think i probably need to read some documentationon file io..i haven't done any, not even in other langauges :/
timonv has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
jamescarr has quit [Quit: Page closed]
hamed_r has joined #ruby
SPYGAME has joined #ruby
rippa has joined #ruby
Serial_Killer_C has joined #ruby
tk__ has quit [Quit: ばいばい]
polymar has quit [Ping timeout: 245 seconds]
Ry_ has quit [Read error: Connection reset by peer]
<butblack> quick question on the ruby api documentation.. I was reading through Why's book and saw that you can do something like File.open( cool.txt, "w") … I'm now looking at the ruby api and don't see that "w" option… http://ruby-doc.org/core-1.9.3/File.html#method-c-open
dhruvasagar has joined #ruby
_alejandro has joined #ruby
<butblack> i guess my question is, how do you know which parameters can be passed
<atmosx> hello any ideas on this? https://gist.github.com/4032260#comments it's encoding related issue
Uranio has joined #ruby
Appineer has quit [Remote host closed the connection]
<jrajav> butblack: It's there, it's the 'opt' parameter
<ottbot> butblack: have a look at the rdoc for IO
mr-rich has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<jrajav> Err, 'mode' rather
<SirFunk> is there a way to do like if a.valid? and b.valid? but actually run both of them (not stop after a.valid? fails)
BrianJ_ has joined #ruby
und3f has joined #ruby
<ottbot> SirFunk: maybe something like [a.valid?, b.valid?].all?
<SirFunk> would if !(a.valid? or b.valid?) do that is or is my logic screwy
<SirFunk> ottbot: that looks cleaner, thanks
<butblack> jrajav: i guess my question is, how do you know what I can put in that opt argument
<Muz> SirFunk: if you want both to run, and for the output of both to matter "if (A && B)"
<ottbot> SirFunk: probably [a.valid?, b.valid?].any? instead
<ottbot> is more like an "or"
<SirFunk> Muz: ooo even nicer
vlad_starkov has joined #ruby
<Muz> Your choice of languge is somewhat vague though. It's hard to tell what you actually want.
tvw has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 240 seconds]
<jrajav> butblack: ::open refers to ::new, which itself says "See the description of class IO for a description of mode."
<Hanmac> SirFunk && ottbot: [a, b].all?(&:valid?)
<Muz> SirFunk: http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_expressions.html referencing "Defined?, And, Or, and Not" may help.
BrianJ has quit [Ping timeout: 246 seconds]
BrianJ_ is now known as BrianJ
guns has quit [Quit: guns]
<jrajav> butblack: There's a description of mode constants/strings at the top of http://ruby-doc.org/core-1.9.3/IO.html
<SirFunk> Muz: actually that didn't work
<SirFunk> ottbot's solution did though
<jrajav> butblack: See the table following "If the mode is given as a String, it must be one of the values listed in the following table."
<ottbot> && will still short circuit
<butblack> ah yeah
<butblack> jrajav: ah yeah, cool thanks
carlyle has quit [Remote host closed the connection]
<jrajav> butblack: These are common to POSIX libraries for C and such, btw
dmiller has joined #ruby
mahmoudimus has joined #ruby
shellox has joined #ruby
bairui has quit [Ping timeout: 252 seconds]
<ottbot> Hanmac: even better :)
v0n has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<butblack> jrajav: yeah for sure, imagine going through the source code that often!
<Jdubs> Xeago: Should I be trying to parse the information and then call question from the parser using an array of texts and array of blocks?
Ry_ has joined #ruby
<jrajav> butblack: Well, most of posix has nice manpages :)
<butblack> jrajav: always found it hilarious that they are called manpages
<Xeago> Jdubs: the file contains method calls
mahmoudimus has quit [Client Quit]
<Xeago> therefore it can be executed
<jrajav> butblack: For instance, in this case, 'man 2 open'
baroquebobcat has joined #ruby
<Jdubs> Xeago, alright i'll try to figure that out
<Xeago> and hence no parsing by you (but the ruby interpreter)
<Jdubs> Xeago, just haven't worked with files really lol
<Ry_> [offtopic, but no idea where to post this.. anyone here online from china?]
jenrzzz has quit [Ping timeout: 260 seconds]
Floydzy has joined #ruby
SPYGAME has quit [Ping timeout: 252 seconds]
zaargy has joined #ruby
<zaargy> if /home/somebody/src/something/lib is in my $LOAD_PATH then should i be able to resolve Something::One from my spec where one is in in /home/somebody/src/something/lib/one.rb?
<Jdubs> Xeago: Okay, I'm going to be honest here, I'm having trouble finding anything in the documentation to help me do this...Any suggestions on what methods to read up on?
quest88 has joined #ruby
JonnieCache has quit [Quit: Reconnecting]
JonnieCache has joined #ruby
<Xeago> just use load()
<Xeago> and have def qustion at that level
<Hanmac> zaargy ruby does not have this per default
<Hanmac> so it does not require one.rb automaticly
<zaargy> yes i know but i'm using bundler
<zaargy> and i can see lib is my load path
kn330 has joined #ruby
jenrzzz has joined #ruby
bbttxu has quit [Quit: bbttxu]
<Hanmac> zaargy did you know that bundler has an extra channel?
<zaargy> yes...
u89 has joined #ruby
<Hanmac> because in this channel there are users that never needed bundler
<Jdubs> Xeago: okay I just added "def run(file); load(file);end" Is that good?
ananthakumaran has joined #ruby
sn0wb1rd_ has joined #ruby
codecaster has quit [Quit: Leaving.]
d3vic3 has quit [Ping timeout: 245 seconds]
<Xeago> Jdubs: no idea,
Araxia has joined #ruby
elsifaka has quit [Quit: Veloma e!]
Araxia has quit [Client Quit]
d3vic3 has joined #ruby
seanyo has joined #ruby
esya has quit [Quit: esya]
alex__c2022 has joined #ruby
aganov has quit [Remote host closed the connection]
sn0wb1rd has quit [Ping timeout: 276 seconds]
sn0wb1rd_ is now known as sn0wb1rd
erichmenge has quit [Quit: Be back later]
zaargy has left #ruby [#ruby]
iamjarvo has quit [Ping timeout: 268 seconds]
iamjarvo has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
SPYGAME has joined #ruby
jaygen has joined #ruby
starship has joined #ruby
y5wars has joined #ruby
hotovson has quit [Ping timeout: 246 seconds]
apeiros_ has quit [Remote host closed the connection]
atmosx has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
lxsameer has joined #ruby
atmosx has joined #ruby
hotovson has joined #ruby
<Jdubs> Xeago: Okay I'm experimenting in IRB to try and run the txt file, I can't get it to work
y5wars has left #ruby [#ruby]
qwerxy has joined #ruby
adeponte has quit [Remote host closed the connection]
<Xeago> pasting that in irb should populate questions
drbawb has joined #ruby
topek has quit [Quit: Leaving.]
<lxsameer> i have a method signature like "def A (a, b, c = nil, d=nil)" , can i call it like obj.A("Asd", "asdas", d: "asdasd") ?
<Xeago> I don't think there is named parameters yet
<Xeago> maybe it is in 2.0
shellox has quit [Quit: Computer has gone to sleep.]
<lxsameer> Xeago: really ?
schaary has quit [Quit: Leaving.]
bradhe has joined #ruby
<Xeago> people usually pass in a hash
<Xeago> seen people pass a small block aswell
radic has quit [Ping timeout: 246 seconds]
<lxsameer> Xeago: wow, it's unbelievable
blacktulip has quit [Ping timeout: 240 seconds]
<Xeago> ?
joshman_ has joined #ruby
quest88 has quit [Quit: quest88]
carlyle has joined #ruby
artnez has quit [Quit: artnez]
<lxsameer> Xeago: a modern language such as ruby did not support such a simple feature yet
clj_newb has quit [Ping timeout: 245 seconds]
<Xeago> there's no overloaded methods either
blacktulip has joined #ruby
<lxsameer> Xeago: noo, you're kidding
<Jdubs> Xeago: i keep getting a NameError for method 'questions'
vickaita has quit [Ping timeout: 246 seconds]
dnstbr has joined #ruby
rjsamson has quit [Remote host closed the connection]
mr-rich has joined #ruby
rjsamson has joined #ruby
kalleth has joined #ruby
minijupe has joined #ruby
maesbn has quit [Remote host closed the connection]
ABK has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
jimmy1980 has joined #ruby
Shamgar has quit [Read error: Connection reset by peer]
centipedefarmer has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
crankycoder has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
<Xeago> Jdubs: make questions an instance variable
lenovodroid has joined #ruby
centipedefarmer has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 260 seconds]
<Jdubs> k
dmiller_ has joined #ruby
BrianJ has quit [Ping timeout: 246 seconds]
BrianJ has joined #ruby
dmiller has quit [Ping timeout: 268 seconds]
k610 has joined #ruby
<Jdubs> Still getting the error :(
baroquebobcat has joined #ruby
radic has joined #ruby
mikecmpbll has joined #ruby
pu22l3r has joined #ruby
rjsamson has quit [Ping timeout: 240 seconds]
dakine has joined #ruby
centipedefarmer has joined #ruby
vickaita has joined #ruby
<Xeago> this you can paste in irb: http://cl.ly/text/1g2d172s0e2j
bradhe has quit [Ping timeout: 252 seconds]
metrix has joined #ruby
Servidorv has joined #ruby
dekroning has quit [Ping timeout: 276 seconds]
<JonnieCache> we already have named arguments with the implicit hash arguments
<JonnieCache> arguments dont get any more named than that
<JonnieCache> i dont see why people complain
<metrix> I would like logger to send an E-mail if a fatal error occurs.. is there a plugin out there to do this? Googling hasn't returned much.
fyolnish has quit [Remote host closed the connection]
d3vic3 has quit [Ping timeout: 260 seconds]
zemanel has quit [Quit: Remote hottie closed the connection]
ckrailo has joined #ruby
abbey has joined #ruby
davidcelis has quit [Quit: K-Lined.]
J-_-L has joined #ruby
d3vic3 has joined #ruby
seanyo_ has joined #ruby
<abbey> hiii
Shamgar has joined #ruby
Morkel has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
seanyo has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
slash_nick has joined #ruby
davidcelis has joined #ruby
<abbey> how is everyone?
rjsamson has joined #ruby
jprovazn has joined #ruby
hackerdude has joined #ruby
esya has joined #ruby
yshh has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
<Jdubs> Xeago: I must be really stupid because I replaced my whole .rb file with what you just sent me...and required it from IRB, and STILL getting an error when I try to use the load function
<Jdubs> Xeago: I'm typing load('questions.txt')
<Jdubs> and the error is
<Jdubs> NameError: undefined local variable or method 'questions' for main:Object
<Jdubs> from (irb):3
abbey has left #ruby [#ruby]
emptyflask has joined #ruby
<Jdubs> from usr/bin/irb:12:in '<main>'
<matti> Jdubs: Ig you want to use variables inside this .txt file, they need to be either in current scope (and will not be), or global.
<matti> Jdubs: Or, you can abuse eval which is always bad.
levabalkin has quit [Read error: Connection reset by peer]
apok has joined #ruby
<matti> Jdubs: Write proper thing and just require ;]
Cultofmetatron has joined #ruby
levabalkin has joined #ruby
<Jdubs> Well the whole point is that he is trying to teach me DSL :(
beachandbytes has joined #ruby
Servidorv has quit [Read error: Connection reset by peer]
beachandbytes has quit [Client Quit]
richardjapenga has quit [Quit: Leaving]
BSaboia has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<matti> With DSL you won't load.
pestouille has joined #ruby
lenovodroid has quit [Remote host closed the connection]
<matti> A common idion is to read content and instance_eval a block inside.
<Xeago> Jdubs: as I said before questions => @questions
<Xeago> yea, but I don't know how to out of the top of my head
<Xeago> haven't touched io in ages
<Xeago> I know load just evals the file in the current context
v0n has quit [Read error: Operation timed out]
<Xeago> which is good enough for what I am trying him to learn
<Xeago> Jdubs: I paste it inside irb
<Xeago> and that works okay
<Jdubs> I can't paste into IRB :/
<Jdubs> my terminal doesn't let me copy or paste
rasbonics has quit [Quit: rasbonics]
<Jdubs> so i have to save as RB file and run it
<Xeago> I can $ irb question.rb
<matti> Jdubs: LOL
<Xeago> which runs that and then quits
<matti> Jdubs: You need to get yourself better terminal emulator ;s
<matti> Jdubs: Even xterm, which de-facto is older tham me (probably) can do it ;p
<Xeago> you sure you can't paste?
<Xeago> some paste on right click
hackerdude has quit [Remote host closed the connection]
<Xeago> selecting with cursor copy's
<matti> rxvt can do it.
F1skr has joined #ruby
<Jdubs> i think i have another terminal emulator
<Jdubs> let me try that one
<Xeago> what do you have?
<Jdubs> can't paste in that one either
<Xeago> what os are you running?
<Jdubs> XTerm and UXTerm
<Jdubs> Lubuntu
<Xeago> try rightclicking?
<Jdubs> Just selects everything like a shift click
filipe has quit [Ping timeout: 240 seconds]
juarlex has quit [Remote host closed the connection]
<Xeago> that sucks..
<Jdubs> yeah :/
<Xeago> no edit->paste menu either?
<Jdubs> nope
<matti> Hard to belive.
<Jdubs> what's a better terminal I can download with apt-get?
<matti> ;]
<Xeago> but irb <file> should run without errors with the last link
<matti> Jdubs: Terminator
ABK has quit [Read error: Connection reset by peer]
dnstbr has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ABK has joined #ruby
maesbn has joined #ruby
<Jdubs> i ran IRB <file> but it just runs the file and exits, doesn't let me put any commands in to test it out
juarlex has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
adeponte has joined #ruby
seanyo_ has quit [Ping timeout: 246 seconds]
<Xeago> it should give you the result of each statement
krzd has joined #ruby
<Jdubs> ok i used the new terminal
<Xeago> you can just open up irb
<Jdubs> to paste everything
<krzd> hi, what is the easiest way to access the usenet and its files through ruby? or using which library?
<Xeago> and require 'file'
<Jdubs> then I tried to use load, and still get the error
<Jdubs> :/
apeiros_ has joined #ruby
<Xeago> after the require you can use the question method
<Xeago> (note that @questions already has an item in it at that point)
<Xeago> here's how it looks on my shell
Tombar has joined #ruby
vickaita has quit [Ping timeout: 265 seconds]
<Jdubs> So the questions method runs fine from INSIDE t?he program, but won't work from a file input? Any idea why
<Jdubs> ?
<Xeago> it works fine for me either way?
<Xeago> wait
<Xeago> didn't load a file tho
zigomir has quit [Ping timeout: 245 seconds]
bdnelson has quit [Quit: Textual IRC Client: www.textualapp.com]
bradhe has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
ABK has quit [Read error: Connection reset by peer]
<Jdubs> ok
<Xeago> Jdubs: works here aswell: http://cl.ly/text/2c0S233s2Y0k
<Jdubs> This is weird
<Jdubs> if i run the file on it's own it is fine
<Xeago> what is the error?
ABK has joined #ruby
<Jdubs> but if i try to do anything with question method myself through IRB, i get errors all over
banisterfiend has joined #ruby
<matti> Hey banisterfiend
<banisterfiend> sup
hackerdude has joined #ruby
iamjarvo has joined #ruby
margle has joined #ruby
ABK has quit [Read error: Connection reset by peer]
dnstbr has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
dnstbr is now known as Guest41522
rasbonics has joined #ruby
ABK has joined #ruby
margle has quit [Client Quit]
dakine is now known as ICE_COLD
centipedefarmer has joined #ruby
JonnieCache has quit [Ping timeout: 276 seconds]
jgrevich has joined #ruby
mengu has quit [Remote host closed the connection]
ICE_COLD is now known as dakine
filipe has joined #ruby
Guest41522 has quit [Client Quit]
its-pots has joined #ruby
Tombar has quit [Remote host closed the connection]
Tombar has joined #ruby
<Jdubs> Xeago: http://imgur.com/lmBHF
haxrbyte_ has quit [Ping timeout: 246 seconds]
philcrissman has quit [Remote host closed the connection]
its-pots has quit [Remote host closed the connection]
philcrissman has joined #ruby
khakimov has joined #ruby
<Xeago> question "question" { wrong "wrong"; correct "correct" }
JonnieCache has joined #ruby
<JonnieCache> OMG OMG OMG
* JonnieCache just found out you can do #{} in the middle of haml templates
<matti> ;p
haxrbyte has joined #ruby
werdnativ has joined #ruby
<matti> JonnieCache: >_>
ABK has quit [Read error: Connection reset by peer]
<Jdubs> hmmm
ABK has joined #ruby
<Xeago> Jdubs: you can use do and end in irb aswell
jimmy1980 has quit [Ping timeout: 256 seconds]
<Jdubs> yeah
<Xeago> try typing the example at line 30-33 in irb
<Xeago> including the enters
<Xeago> you give an argument, and pass in a block with do-end
k610 has quit [Ping timeout: 240 seconds]
tommyvyo_ has joined #ruby
gglitch has joined #ruby
andrewhl has joined #ruby
Trioke has joined #ruby
<Jdubs> line 30-33 of what? my rb file?
alvaro_o has joined #ruby
krzd has quit [Quit: Leaving]
margle has joined #ruby
<Jdubs> that didn't give me an error
<gglitch> Hello. I'm trying to use backticks to call rsync from a ruby script, but there are spaces in the path. I've tried all kinds of quotes, double-quotes, etc. Anyone know how to do this?
jimmy1980 has joined #ruby
ltsstar has joined #ruby
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Xeago> gglitch: System("")
<apeiros_> gglitch: a) require 'shellwords' and use that, b) use spawn
mercwithamouth has joined #ruby
<Xeago> what apeiros_ siad is better
haxrbyte has quit [Ping timeout: 245 seconds]
<gglitch> Not familiar with those, but I'll look them up. THank you.
<apeiros_> and with b), use the version of spawn where you pass the arguments individually, which bypasses shell interpolation (and thus doesn't create issues with special chars like spaces)
v0n has joined #ruby
<apeiros_> spawn is found under Kernel#spawn
<apeiros_> (ruby 1.9+)
<apeiros_> shellwords exists for like forever
gmci has joined #ruby
gmci has quit [Max SendQ exceeded]
psycho_one has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
gmci has joined #ruby
gmci is now known as Guest25517
arya_ has joined #ruby
minijupe has quit [Quit: minijupe]
dr_bob has quit [Quit: Leaving.]
<gglitch> apeiros_: thank you. Being new, I'm sure those will help. Since I'll have to learn them both, which do think I should learn first?
margle has quit [Client Quit]
Banistergalaxy has joined #ruby
<apeiros_> spawn
<apeiros_> in my ~8y of ruby, I've used shellwords like 2 times
<apeiros_> and spawn is very powerful, you should generally not use any other way of subprocess invocation as of 1.9
<apeiros_> (except maybe fork)
SmoothSage has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<Xeago> i've seen people use a shell script to receive base64, and then execute that
timonv has quit [Remote host closed the connection]
callenb has joined #ruby
nasso has quit [Ping timeout: 245 seconds]
ABK has joined #ruby
krz has quit [Quit: krz]
banisterfiend has quit [Ping timeout: 245 seconds]
clj_newb has joined #ruby
n_blownapart has joined #ruby
samphippen has joined #ruby
kiddy56842 has joined #ruby
hamed_r has quit [Quit: Leaving]
zommi has joined #ruby
timmow_ has joined #ruby
<lxsameer> why does data did not sent on threaded more http://dpaste.com/826582/ ?
<n_blownapart> hi I'm a bit confused (beginner to programming) about where/how to set up the "hash_contents" file in this prog to get it to work. and/or if there are other problems. thanks alot: http://pastie.org/5338344
<Xeago> apeiros_: got some time this weekend, around 2-7pm GMT?
timmow__ has joined #ruby
<apeiros_> sc2?
<Xeago> yea
timmow has quit [Read error: Connection reset by peer]
timmow__ is now known as timmow
<apeiros_> I might
<apeiros_> my brother might even join
<Xeago> :O ok!
arya_ has quit [Ping timeout: 244 seconds]
chussenot has quit [Quit: chussenot]
nasso has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
gift has quit [Quit: it puts the packet in the socket or else it gets the close again]
bluenemo has quit [Read error: Connection reset by peer]
ewag has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 276 seconds]
dpatel has joined #ruby
filipe has quit [Remote host closed the connection]
<n_blownapart> saints encouraged to answer: hi I'm a bit confused (beginner to programming) about where/how to set up the "hash_contents" file in this prog to get it to work. and/or if there are other problems. thanks alot: http://pastie.org/5338344
timmow_ has quit [Ping timeout: 252 seconds]
aantix has joined #ruby
mityaz has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
ABK has quit [Read error: Connection reset by peer]
<apeiros_> n_blownapart: doesn't look like you'd have to set it up
<apeiros_> it'll be created in your current working directory by that code
anderse has quit [Quit: anderse]
rasbonics has quit [Quit: rasbonics]
ABK has joined #ruby
<Jdubs> Xeago: I think I give up on that assignment...I can't get it to work :( I guess I'll just read that article you suggested
mneorr has quit [Remote host closed the connection]
<n_blownapart> apeiros_: that's what I thought. thanks ! but then something else is going sour
<Xeago> okay, fair enough
<Jdubs> Xeago: then maybe after i can try again, or you can give me a new assignment
andrewhl has quit [Remote host closed the connection]
mneorr has joined #ruby
blazes816 has joined #ruby
davidcelis has joined #ruby
kokainepizza has joined #ruby
<apeiros_> n_blownapart: I ran the code and the issue is that you monkey-patch a core class
<apeiros_> YAML itself needs Hash
<apeiros_> and you override Hash#[]=, which is used by to_yaml too, now you've got an infinite recursion
brendan` has quit [Read error: Connection reset by peer]
<apeiros_> n_blownapart: also, for future reference, if you encounter an error, you say so when asking for help.
<apeiros_> and you paste the error alongside the code
brendan` has joined #ruby
ABK has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
ABK has joined #ruby
hadees has quit [Quit: hadees]
<n_blownapart> apeiros_: thanks, got it on the protocol. hmmm, the book says I will get 'yaml-ized' hashes printed out. the weird thing is that the error message seems like an infinite loop
<apeiros_> because it is
<lxsameer> is there any program (except of ruby itself) to check a ruby code syntax and styling ?
<apeiros_> as said, YAML uses Hash#[]= in order to work
jgrevich_ has joined #ruby
atlantaman has joined #ruby
artOfWar has joined #ruby
jgrevich has quit [Read error: Operation timed out]
jgrevich_ is now known as jgrevich
<n_blownapart> apeiros_: ok then this code, typed exactly as the book example, is trying to teach me something and should have a normal output. so I don't see the point...
samphippen has joined #ruby
<apeiros_> n_blownapart: I guess the book example was written back when YAML worked differently and didn't use Hash#[]=, i.e. it'd have worked back then.
<apeiros_> you could try by installing ruby 1.8.6 or older and see whether it works
<apeiros_> but yeah, the example teaches you something which you shouldn't do (at least not lightly)
AlbireoX has joined #ruby
atlantaman has quit [Client Quit]
<n_blownapart> apeiros_: o.k. thanks. the book covers 1.9.1 and so far all the examples have been working
<n_blownapart> apeiros_: many thanks I can move on !
<apeiros_> n_blownapart: you could rewrite the example and name the method something else than []=
<apeiros_> should work just fine then
v0n has quit [Ping timeout: 255 seconds]
Musk has joined #ruby
Musk has left #ruby [#ruby]
<n_blownapart> apeiros_: thanks will work on it in afternoon
<Jdubs> what does .ask do?
n_blownapart has quit [Remote host closed the connection]
<Xeago> ask for input usually
<Jdubs> so how is it different from gets?
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
<Xeago> read the docs
<Xeago> I don't know sorry
ABK has quit [Read error: Connection reset by peer]
rakm has joined #ruby
siyusong has joined #ruby
ABK has joined #ruby
margle has joined #ruby
<Jdubs> ok
horofox has quit [Quit: horofox]
ryanlecompte has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
idzuna has joined #ruby
joeycarmello has joined #ruby
xorigin has quit [Quit: leaving]
esya has quit [Quit: esya]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
esya has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
dekroning has joined #ruby
joeycarmello has quit [Ping timeout: 246 seconds]
ngoldman has joined #ruby
ABK has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
ABK has joined #ruby
v0n has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
haxrbyte has joined #ruby
niklasb has joined #ruby
virtuose has quit [Read error: Connection reset by peer]
Araxia has joined #ruby
colinbm has quit [Quit: colinbm]
dankest has joined #ruby
ltsstar has quit [Quit: ltsstar]
slainer68 has joined #ruby
SuperrMann has joined #ruby
Guest25517 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
arya has joined #ruby
bairui has joined #ruby
dekroning has quit [Quit: leaving]
brianpWins has quit [Quit: brianpWins]
philcrissman has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
Servidorv has joined #ruby
<Servidorv> hey guys
slainer68 has quit [Ping timeout: 264 seconds]
<Servidorv> how are you all??
<Servidorv> i have a quick question
<Jdubs> Xeago: Just wanted to say thanks for all your help and patience :)
<Servidorv> here i have get the max best = hash.max {|a,b| a[1] <=> b[1]} || []
sn0wb1rd has joined #ruby
<Xeago> no problem!
<Servidorv> now i want to get the second max
<Servidorv> is there a way to do so??
<Xeago> you can remove the item from the hash
<Xeago> and do max again
<Servidorv> thanks bro, didn't thought of that
<Servidorv> thanks
<Jdubs> hi servidorv o/
<Servidorv> hi guys
<Servidorv> :)
<Jdubs> I'm a ruby newb, but I'll probably be here most every day from now on
<Jdubs> I have a thirst for learnin that cannot be quenced
<Jdubs> quenched*
<Jdubs> XD
h4mz1d has joined #ruby
<Servidorv> lol, me too
<Jdubs> anyways, bbiab dinner
<Servidorv> thats the reason why im here
otters has quit [Ping timeout: 252 seconds]
ij has quit [Read error: Connection reset by peer]
vickaita has joined #ruby
ij has joined #ruby
bradhe has quit [Remote host closed the connection]
FlyingFoX has quit [Ping timeout: 276 seconds]
philcrissman has joined #ruby
und3f has quit [Quit: Leaving.]
ABK has quit [Read error: Connection reset by peer]
jmeeuwen has quit [Ping timeout: 244 seconds]
ABK has joined #ruby
caveat- has quit [Disconnected by services]
caveat- has joined #ruby
otters has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
jmeeuwen has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
ABK has quit [Read error: Connection reset by peer]
vickaita has quit [Ping timeout: 240 seconds]
ABK has joined #ruby
<Servidorv> hey guys i have one question
<Servidorv> how do i use pry on a goliath stage
<Servidorv> ??
clj_newb has quit [Ping timeout: 252 seconds]
hasse has joined #ruby
samphippen has joined #ruby
<blazes816> servidorv: check out pry-remote or pry-remote-em
<Servidorv> opk thanks
baphled has joined #ruby
jrajav has quit []
iamjarvo has quit [Ping timeout: 260 seconds]
carloslopes has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
wwalker has joined #ruby
ABK has quit [Read error: Connection reset by peer]
zodiak has quit [Read error: Operation timed out]
ABK has joined #ruby
katherinem13 has quit [Ping timeout: 256 seconds]
mikepack has joined #ruby
FlyingFoX has joined #ruby
tbrock_ has joined #ruby
krz has joined #ruby
horofox has joined #ruby
lxsameer has quit [Quit: Leaving]
<wwalker> vim colorscheme? syntax/ruby.vim exposes 90+ element types, yet most color schemes lump them all into about 7 colors. anyone using a scheme that is dark background and uses more colors (not 90, but maybe 10 to 15 differentiating some more stuff?
ABK has quit [Read error: Connection reset by peer]
adeponte has quit [Remote host closed the connection]
ABK has joined #ruby
gglitch has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
SuperrMann has quit [Quit: Computer has gone to sleep.]
zodiak has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
skum has quit [Quit: Leaving...]
ryanlecompte has joined #ruby
Tombar has quit [Remote host closed the connection]
erichmenge has joined #ruby
axl_ has quit [Quit: axl_]
elaptics is now known as elaptics`away
katherinem13 has joined #ruby
arya_ has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
ngoldman has quit [Remote host closed the connection]
theRoUS has quit [Remote host closed the connection]
ddd has quit [Quit: Leaving.]
strangeworks has quit [Read error: Connection reset by peer]
strangeworks has joined #ruby
ngoldman has joined #ruby
strangeworks has quit [Max SendQ exceeded]
bradhe has joined #ruby
strangeworks has joined #ruby
otters has quit [Ping timeout: 252 seconds]
cezar-b has quit [Remote host closed the connection]
strangeworks has quit [Max SendQ exceeded]
Servidorv has quit [Quit: Easy as 3.14159265358979323846...]
strangeworks has joined #ruby
arya has quit [Ping timeout: 244 seconds]
strangeworks has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
c0rn has joined #ruby
strangeworks has joined #ruby
nomenkun has joined #ruby
kn330 has quit [Quit: Ex-Chat]
margle has quit [Quit: Computer has gone to sleep.]
callenb has left #ruby [#ruby]
strangeworks has quit [Max SendQ exceeded]
strangeworks has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
c0rn has quit [Ping timeout: 260 seconds]
ABK has quit [Read error: Connection reset by peer]
vickaita has joined #ruby
ABK has joined #ruby
jj`` has joined #ruby
<jj``> is there a channel dedicated to ruby-gtk queries ?
ltsstar has joined #ruby
<rking> wwalker: Ha!
<rking> My color scheme brother exists!
Ch4rAss has joined #ruby
<rking> wwalker: You even used some of the same verbiage that I use.
mrsolo has joined #ruby
nitti has quit [Remote host closed the connection]
enroxorz-work has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
<rking> wwalker: I'm actively working on this.
ABK has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
ABK has joined #ruby
stephenjudkins has joined #ruby
joeycarmello has joined #ruby
evenix has joined #ruby
<jj``> i'm running debian unstable, window manager: dwm
F1skr has quit [Read error: Operation timed out]
<jj``> when i run this sample http://pastie.org/5341727, i get flicker whenever i change desktops
FemaleEngineer has joined #ruby
jeff_sebring has joined #ruby
moshee has quit [Ping timeout: 256 seconds]
F1skr has joined #ruby
<jj``> i'd like the window to be either old widget content or black (modify_bg color) when switching back to the desktop holding this window, before the expose_event
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
enroxorz-work is now known as baraxorz
<FemaleEngineer> Hi every1
<baraxorz> I dont believe you are a FemaleEngineer
kiddy56842 has quit [Quit: Ðóñèôèöèðîâàííûé mIRC 6.31 îò yXo ** http://BestIRC.ru **]
<baraxorz> but hi never the less
<FemaleEngineer> any 1 knows C# ?? please help
<FemaleEngineer> Baraxorz whyy ?
DeeRuu has joined #ruby
undersc0re97 has quit [Remote host closed the connection]
kiddy56842 has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<baraxorz> FemaleEngineer: im a jerk. I know some C#, but have you tried a .NET channel?
DeeRuu has left #ruby [#ruby]
<FemaleEngineer> no i havent
beachandbytes has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<FemaleEngineer> give me the link
<baraxorz> FemaleEngineer: ##csharp
<FemaleEngineer> I'm Dema
jenrzzz has quit [Ping timeout: 264 seconds]
Tombar has joined #ruby
<FemaleEngineer> thank u
hackerdude has quit [Remote host closed the connection]
havenn has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ddd has joined #ruby
ABK has joined #ruby
Dreamer3 has joined #ruby
mpereira has joined #ruby
Jdubs has quit [Remote host closed the connection]
<wwalker> rking: what is pry ?
<Xeago> a repl like irb
Zai00 has quit [Quit: Zai00]
<dakine> bbl class
dakine has quit [Quit: Leaving]
ilyam has quit [Quit: ilyam]
voodoofish430 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
kbeddingfield has joined #ruby
wargasm has joined #ruby
metrix has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121010144125]]
lobak has quit [Quit: No Ping reply in 180 seconds.]
lobak has joined #ruby
ilyam has joined #ruby
sambio has quit [Ping timeout: 252 seconds]
ABK has quit [Read error: Connection reset by peer]
ilyam has quit [Client Quit]
ABK has joined #ruby
BrianJ has quit [Quit: BrianJ]
undersc0re97 has joined #ruby
<rking> wwalker: A REPL unlike IRB. ☺
AlbireoX has quit [Remote host closed the connection]
hackerdude has joined #ruby
<rking> wwalker: gem install pry-plus && pry
<rking> (Or pry-full, if you like having stuff)
Jdubs has joined #ruby
<Xeago> rking: nice word twist
<Jdubs> Anyone know a good video editor I can get from apt-get?
AlbireoX has joined #ruby
tenmilestereo has joined #ruby
sebastorama has joined #ruby
<rking> Jdubs: That's rather offtopic, but I'd download Blender from http://www.blender.org/download/get-blender/ (not from apt! It's super old), and use its video editor
<Uranio> warning: already initialized constant HTTP
<Uranio> how could I shut up that
<rking> Jdubs: E.g. http://youtu.be/yRwrEU6KDYY
<rking> Uranio: Are you sure you want to shut it up?
margle has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<rking> Uranio: As opposed to handling it better some other way, I mean.
Eldariof40-ru has joined #ruby
slainer68 has joined #ruby
<Uranio> rking: look this
amacgregor_osx has quit [Remote host closed the connection]
BrianJ has joined #ruby
<Uranio> Net::HTTP=Net::HTTP::Proxy($proxy_host,$proxy_port,$proxy_user,$proxy_pass)
ngoldman has quit [Ping timeout: 264 seconds]
SPYGAME has quit [Ping timeout: 255 seconds]
<Uranio> for proxyfi all!
davidcelis has quit [Quit: K-Lined.]
<wwalker> rking: Thank you for detailed! Looks very much like want I want. It's my new default color scheme!
ABK has quit [Read error: Connection reset by peer]
c0rn has quit [Quit: Computer has gone to sleep.]
<Xeago> I doubt that is possible Uranio
davidcelis has joined #ruby
<Xeago> as proxy itself uses Net::HTTP
krawchyk_ has joined #ruby
ABK has joined #ruby
davidcelis is now known as Guest85173
<Uranio> Xeago: ok, it work pretty fine for me
<wwalker> rking: so if pry is available, detailed uses it to parse ?
rippa has quit [Ping timeout: 240 seconds]
vickaita_ has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
krawchyk has quit [Ping timeout: 255 seconds]
brianpWins has joined #ruby
<rking> wwalker: Nope. I'm curious where I gave that impression, though?
<wwalker> vim vs pry vs vim default
<wwalker> image
dhruvasagar has quit [Ping timeout: 268 seconds]
<rking> Aha
<rking> Yes, there's a pry plugin called pry-theme, and one of the themes it has is vim-detailed, which is a sibling of the detailed.vim color scheme
<rking> But it needs to be updated to sync up better
<Xeago> what is the best way in ruby to get all #values as values in the following scenario: "This is #space #separated" => ["space","separated"]
Danielpk_ has joined #ruby
qwerxy has quit [Quit: offski]
<rking> And the thing is, CodeRay (which Pry uses), doesn't actually get in as much detail.
<Xeago> anyone mind regexing it?
Eldariof40-ru has quit [Remote host closed the connection]
vickaita has quit [Ping timeout: 264 seconds]
brianpWins has quit [Client Quit]
stat1x has joined #ruby
arielpts has quit [Ping timeout: 265 seconds]
ABK has quit [Read error: Connection reset by peer]
u89 has quit [Remote host closed the connection]
ABK has joined #ruby
Danielpk has quit [Ping timeout: 240 seconds]
Danielpk_ is now known as Danielpk
<Xeago> there was a website that allowed you to insert strings and results
<Xeago> and it figures out a regex for you
<rking> Xeago: "This is #space #separated".scan(/#(\S+)/).map {|e| e[0]}
ABK has quit [Read error: Connection reset by peer]
clj_newb has joined #ruby
ABK has joined #ruby
dmiller_ has quit [Remote host closed the connection]
<Xeago> why [0] and not flatten
<apeiros_> why capture at all
<Xeago> capture?
macabre has joined #ruby
<apeiros_> no capture = no need for flatten or map
areil has quit [Remote host closed the connection]
arielpts has joined #ruby
nitti has joined #ruby
<apeiros_> Xeago: () in regex are called "capturing group"
<Xeago> where does it captchure?
ABK has quit [Read error: Connection reset by peer]
<apeiros_> and scan only returns a nested array when you have captures
ABK has joined #ruby
jimeh has quit [Ping timeout: 246 seconds]
<Xeago> okay, and how error tolerant is scan?
<Xeago> or in this case
<Xeago> S+ ?
<apeiros_> "This is #space #separated".scan(/(?<=#)\S+/)
<apeiros_> no map, no flatten needed
heftig has joined #ruby
<apeiros_> error tolerance? in regex matching?
<apeiros_> not sure what you mean by that
<Xeago> that gives syntax error
kalleth has quit [Ping timeout: 246 seconds]
emptyflask has quit [Remote host closed the connection]
<Xeago> what matches but I don't want it to match
<rking> apeiros_: Better. =)
rippa has joined #ruby
<Xeago> e.g. edge-cases that I should be aware of
<apeiros_> 19:48 Xeago: that gives syntax error
<apeiros_> hu? what?
ABK has quit [Read error: Connection reset by peer]
jimeh has joined #ruby
<apeiros_> you aren't using ancient versions of ruby, are you? o0
<Xeago> irb(main):038:0> "This is #space #separated".scan(/(?<=#)\S+/)
<Xeago> SyntaxError: compile error (irb):38: undefined (?...) sequence: /(?<=#)\S+/
<Xeago> from (irb):38
<havenn> Xeago: Switch to Ruby 1.9.2+
<Xeago> 1.8.7 :\
<Xeago> can't
<Xeago> well atleast not for this project
brianpWins has joined #ruby
<apeiros_> well, 1.8's regex engine is way inferior to 1.9's, and yes, that one does not understand look-behinds
<apeiros_> (?<= … ) is a look-behind
<apeiros_> well, flatten then…
qwerxy has joined #ruby
<Xeago> /#\S+/ seems to work for me tho
<Xeago> with no look behind, which I have read is often slow
<apeiros_> that contains the # too, from scrollback I gathered you didn't want the # to be included
<Xeago> hmm indeed
siyusong has quit [Quit: Computer has gone to sleep.]
<Xeago> I am blind..
ananthakumaran has quit [Quit: Leaving.]
<Xeago> what is the meaning of S in regex?
mercwithamouth has quit [Ping timeout: 260 seconds]
<havenn> Xeago: Any non-whitespace character
<apeiros_> \S, S alone means just that, the letter "S"
dongbroken has joined #ruby
<dongbroken> hi
<Xeago> aight, non-whitespace is okay for me
<dongbroken> any one want to char here?
<apeiros_> beware, 1.8's regex engine changes the meaning of character classes depending on the $KCODE setting
<dongbroken> hey guys still up
<dongbroken> ?
ngoldman has joined #ruby
<apeiros_> unless you explicitly add either the n, u, j or s flag
dongbroken has left #ruby [#ruby]
evilsushi has joined #ruby
evilsushi has quit [Changing host]
evilsushi has joined #ruby
jrajav has joined #ruby
nitti has quit [Ping timeout: 260 seconds]
<rking> Uranio: Net.send :remove_const, :HTTP
emptyflask has joined #ruby
minijupe has joined #ruby
zommi has quit [Quit: Leaving.]
<rking> Uranio: Or, something like: module Net; remove_const :HTTP end
rippa has quit [Ping timeout: 260 seconds]
_alejandro has quit [Read error: Connection reset by peer]
<FemaleEngineer> help me in C# http://pastebin.com/9KZFJ4TG
_alejandro has joined #ruby
<apeiros_> FemaleEngineer: this is not a C# channel
<Xeago> line 10 is useless
dmiller has joined #ruby
<baraxorz> apeiros_: that was 2000 and late bro
baphled has quit [Quit: Lost terminal]
<apeiros_> baraxorz: ?
Hanmac has quit [Ping timeout: 265 seconds]
arturaz has quit [Remote host closed the connection]
timmow has quit [Ping timeout: 252 seconds]
baphled has joined #ruby
<baraxorz> apeiros_: the FemaleEngineer and C# thing. I pointed her to where she needed to be a while back. hence 2000 and late. lame joke is lame, but whatever im in a good mood.
seanyo has joined #ruby
v0n has quit [Ping timeout: 268 seconds]
Neomex has joined #ruby
<apeiros_> baraxorz: I know that you did. but I wasn't here then. I'm here now. And she asked now too. And I reacted to that.
strangeworks has quit [Quit: Leaving]
<minijupe> anyone know how to list the gems in an rvm gemset?
<Uranio> rking: NameError: uninitialized constant Net::HTTP
<Uranio> that destroy all :D
esya has quit [Quit: esya]
samphippen has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
stkowski has joined #ruby
carlyle has quit [Remote host closed the connection]
maxer has quit [Quit: maxer]
<Uranio> I'd try VERBOSE=nil
<Uranio> but not..
_bart has quit [Quit: _bart]
ABK has joined #ruby
<baraxorz> apeiros_: ok then. i shall be quiet for the rest of the day. :'(
monkegji_ has quit [Remote host closed the connection]
erichmenge has quit [Ping timeout: 246 seconds]
u89 has joined #ruby
rafter has quit [Remote host closed the connection]
Hanmac has joined #ruby
<apeiros_> baraxorz: that's up to you
Floydzy has quit [Quit: Floydzy]
kirun has joined #ruby
Russell^^ has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<baraxorz> apeiros_: but...but...ok :( also, have you ever used ruboto?
<Jdubs> Any experienced ruby guys want to give me an assignment to work on for the next two hours?
butblack has quit [Quit: butblack]
bbttxu has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
Floydzy has joined #ruby
butblack has joined #ruby
kirun_ has joined #ruby
tjbiddle has joined #ruby
ABK has quit [Read error: Connection reset by peer]
arietis has joined #ruby
<apeiros_> baraxorz: not using android, so no, I haven't
Goles has joined #ruby
<Jdubs> Xeago: are you still here?
shellox has joined #ruby
CamonZ_ has joined #ruby
ABK has joined #ruby
jrajav has quit []
CamonZ_ has quit [Read error: Connection reset by peer]
<apeiros_> Jdubs: reimplement Array#map and Array#select using only Array#each from self
imami|afk is now known as banseljaj
horofox has quit [Ping timeout: 264 seconds]
<Jdubs> hmmm
<Xeago> Jdubs: did you finish the quiz?
Floydzy has quit [Client Quit]
<Jdubs> Xeago: not on my own, I went through the one on the web page
slainer68 has quit [Remote host closed the connection]
<Xeago> did that work?
<Jdubs> Yeah :)
ABK has quit [Read error: Connection reset by peer]
<Xeago> aight, if that works you might try modifying it for the slightly different DSL that I proposed
ABK has joined #ruby
kirun has quit [Ping timeout: 256 seconds]
<Xeago> my DSL does not require remembering lastquestion and stuff like that
<Jdubs> Apeiros: How hard of a job is that? I don't actually know what select or map do lol
<Jdubs> Xeago: Gotcha
<Jdubs> Xeago: :)
<Xeago> select filters out elements in an array
thone_ has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<Jdubs> like a regular expression?
nitti has joined #ruby
<Xeago> you pass it a block, if the block returns true, it is kept otherwise not
CamonZ has quit [Read error: Connection reset by peer]
<apeiros_> Jdubs: depends. it should be doable within an hour if you have at least the most basic ruby knowledge
ABK has joined #ruby
<Xeago> (1..10).select { |i| i%2==0 }
<apeiros_> including reading the docs of Array#map and #select
reinaldob has quit [Ping timeout: 240 seconds]
<Xeago> but not the source!
<Xeago> even though I think it is in c
<Xeago> still gives too much away imo
bitrain has joined #ruby
<Jdubs> lol, I know C!
<Jdubs> i'm gonna go look at source :P
<Jdubs> just kidding not gonna do that
<Jdubs> brb, gonna go try to do it
Guest85173 is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<Xeago> Jdubs: Ruby c, is helladifferent than the c I was taught..
<Xeago> ale
<Xeago> apeiros_, what is your opinion about HoTS?
<Jdubs> gotta do dishes first, bbiab
erichmenge has joined #ruby
<apeiros_> Xeago: looks interesting. widow mine seems OP.
bitrain has quit [Remote host closed the connection]
<Xeago> interesting but lame'ish
thone has quit [Ping timeout: 248 seconds]
<apeiros_> I'm not sure whether it's an overall improvement, though
<Xeago> I agree
<apeiros_> swarm host's locusts IMO are done in a bad way
Araxia has quit [Ping timeout: 255 seconds]
<apeiros_> right now the live too long, you can siege from sooo far away
<Xeago> imo it should spawn more lower health units
<Xeago> and live way shorter with a tiny bit higher speed
<Xeago> 10-15 health
ABK has quit [Read error: Connection reset by peer]
Tania has joined #ruby
ABK has joined #ruby
horofox has joined #ruby
icole has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
rburton- has joined #ruby
SuperrMann has joined #ruby
SuperrMann has quit [Client Quit]
ABK has quit [Read error: Connection reset by peer]
SuperrMann has joined #ruby
ABK has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
ddv has quit [Changing host]
ddv has joined #ruby
joeycarmello has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<slash_nick> 11win 2
Araxia has joined #ruby
ABK has quit [Read error: Connection reset by peer]
thinkdevcode has joined #ruby
timmillwood has quit [Ping timeout: 246 seconds]
rampantmonkey has joined #ruby
rburton- has quit [Quit: Leaving...]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
werdnativ_ has joined #ruby
samphippen has joined #ruby
sagax has left #ruby ["Ухожу я от вас"]
Cultofmetatron has quit [Remote host closed the connection]
werdnativ has quit [Read error: Connection reset by peer]
werdnativ_ is now known as werdnativ
irocksu has joined #ruby
<irocksu> hi
<irocksu> i am on ubuntu 12.10 and i have installed rmagick, but it does not work.
<mr-rich> Is there a gem or Ruby lib for calculating IPs? ie: given an IP & netmask, return info about IP ranges, etc?
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<irocksu> the gem install rmagick --no-rdoc --no-ri installed as expected, but once i try to require it it sais no such file rmagick
siyusong has joined #ruby
cdt has quit [Ping timeout: 244 seconds]
rburton- has joined #ruby
rampantmonkey has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Xeago> irocksu: you need imagemagick aswell
rampantmonkey has joined #ruby
<irocksu> Xeago: The gem? or apt packages?
<baraxorz> irocksu: gem install rmagick -- '--with-opt-dir="[path to ImageMagick]"'
<baraxorz> try thet bro
_bart has joined #ruby
<Xeago> the library
<apeiros_> mr-rich: maybe ipaddr can
<irocksu> yeah i installed it as well with: apt-get install imagemagick libmagickwand-dev
<Xeago> if you have a choice, choose something else than imagemagick
tbrock_ has quit [Quit: Computer has gone to sleep.]
<Jdubs> Wow guys I'm super dumb... lol
kbeddingfield has quit [Remote host closed the connection]
Cultofmetatron has joined #ruby
<davidcelis> isn't it kinda difficult _not_ to use imagemagick these days? what alternatives are there?
<Jdubs> I can't think how to parse the arguments since they have pipes
jenrzzz has quit [Read error: Connection reset by peer]
<Jdubs> hmm
<atmosx> hello
<Xeago> there is gd
workmad3 has joined #ruby
<Xeago> there is imagescience
Virunga_ has joined #ruby
<Xeago> which "kicks the living crap out of RMagick"
swarley has joined #ruby
<Xeago> "and doesn't leak like a sieve"
emmanuelux has joined #ruby
<atmosx> apeiros_: can you please take a look at this: https://gist.github.com/4032260
burgestrand has quit [Quit: Leaving.]
<baraxorz> irocksu: did you look into mini_magick?
Virunga has quit [Ping timeout: 256 seconds]
otters has joined #ruby
burgestrand has joined #ruby
ABK has joined #ruby
chrxn has joined #ruby
awestroke has joined #ruby
manizzle has quit [Ping timeout: 248 seconds]
margle has quit [Quit: Computer has gone to sleep.]
<Jdubs> Apeiros: I think this task is way above my level :(
jenrzzz has joined #ruby
<Xeago> google for the result of one
<Xeago> study it
<Xeago> try the other one
<apeiros_> Jdubs: start off with this problem then: given an array [1,2,3,4], create an array with each item multiplied by 10
kbeddingfield has joined #ruby
mattsgarrison has joined #ruby
horofox has quit [Quit: horofox]
ABK has quit [Read error: Connection reset by peer]
<apeiros_> Jdubs: everything goes, i.e. everything is allowed.
mikepack has quit [Remote host closed the connection]
ABK has joined #ruby
Araxia_ has joined #ruby
phantasm66 has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
Araxia_ is now known as Araxia
<apeiros_> atmosx: you need CGI.escape
TheFuzzball has quit [Ping timeout: 240 seconds]
<Hanmac> Jdubs: look at Rubys Enumerable module ... you may need it someday
Uranio has quit [Quit: WeeChat 0.3.8]
<atmosx> url_encoded_string = CGI::escape("'Stop!' said Fred") <--
<atmosx> thanks apeiros_ :D
ABK has quit [Read error: Connection reset by peer]
<Jdubs> def arraytimesten( array )
<Jdubs> newarray ||= []
<Jdubs> end
<Jdubs> end
<Jdubs> array.each do | num |
<Jdubs> newarray << num*10
<apeiros_> eeeeeew, don't use :: to invoke methods
<apeiros_> Jdubs: pastie
<Jdubs> how's that?
ABK has joined #ruby
ekristen has joined #ruby
mikepack has joined #ruby
<apeiros_> yes, that's good. don't use ||= there, though
<ekristen> I'm new to ruby, whats the difference between array['value'] and array[:value] ?
<apeiros_> just do a straight new_array = []
<apeiros_> ekristen: 'value'.class # => String
v0n has joined #ruby
<apeiros_> :value.class # => Symbol
minijupe has quit [Quit: minijupe]
<Jdubs> What's wrong with ||=? I thought it was always better?
<swarley> no
<Hanmac> ekristen and your array is not an array its an Hash
judd7 has joined #ruby
<apeiros_> ekristen: there's a vast amount of resources on 'ruby string vs. symbol' (google)
<swarley> ||= defines it if it is undefined
<swarley> unknown_var ||= 1
<swarley> known_var = 1
<apeiros_> Jdubs: gist.github.com or pastie.org for future pastes btw. please
ABK has quit [Read error: Connection reset by peer]
<ekristen> apeiros_: which is better? string or symbol?
<Hanmac> Jdubs: ||= is only usefull if you need to init an instance_variable inside an method
<Jdubs> Aperios: ok
mmitchell has joined #ruby
<swarley> read ||= as 'or equals'
<Hanmac> ekristen: depends
<swarley> ekristen; it depends
ABK has joined #ruby
<apeiros_> ekristen: there are no silver bullets. if one was in all regards better than the other, the other wouldn't exist.
<Jdubs> Hanmac: Alright thanks
<Jdubs> Apeiros: is my code okay besides the ||=? What should I do next?
ABK has quit [Read error: Connection reset by peer]
jlwestsr has joined #ruby
ABK has joined #ruby
<apeiros_> ekristen: I suggest you google the term I gave you. I'll gladly help if you - after reading some of the resources - still have troubles with it
emptyflask has quit [Remote host closed the connection]
Morkel has quit [Read error: Connection reset by peer]
<ekristen> I'm reading one right now -- thanks
<apeiros_> Jdubs: use that code to implement Array#map, because that's what you just did ;-)
Morkel has joined #ruby
_bart has quit [Quit: _bart]
<Jdubs> Apeiros: hmmm :O
tvw has quit [Read error: Connection reset by peer]
krz has quit [Quit: krz]
swarley has quit [Read error: Connection reset by peer]
<Jdubs> But I thought map uses a block that is provided ?
sebastorama has quit [Quit: Computer has gone to sleep.]
<apeiros_> Jdubs: call it map2, e.g. start off with: http://pastie.org/5342121
siyusong has quit [Quit: Computer has gone to sleep.]
shellox has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
<apeiros_> Jdubs: yes. you call the block with `yield(value)`
otters has quit [Ping timeout: 252 seconds]
<apeiros_> and yield returns what the block returns
workmad3 has quit [Ping timeout: 264 seconds]
Goles has quit [Ping timeout: 240 seconds]
<apeiros_> in other words, it works almost like a method
swarley has joined #ruby
whitedawg has joined #ruby
<Jdubs> Apeiros ok, and how do I reference the provided block? #{&block}?
jimeh has quit [Ping timeout: 245 seconds]
ABK has quit [Read error: Connection reset by peer]
<swarley> use &block to use it as a block, block to use it as a proc
rampantmonkey has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Read error: No route to host]
<apeiros_> swarley: na, don't shoot over the target. small steps for now for Jdubs
<apeiros_> Jdubs: you don't. you just call yield
<apeiros_> yield calls the block
<Jdubs> hmmm
<Jdubs> k
<apeiros_> def foo; block_returned = yield(1); puts "block returned: #{block_returned}"; end
jimeh has joined #ruby
<apeiros_> foo { |x| x+1 } # -> "block returned 2"
<apeiros_> you can call yield as often as you want.
emptyflask has joined #ruby
psycho_one has quit [Remote host closed the connection]
axl_ has joined #ruby
pothibo has joined #ruby
<Xeago> var.is_a Array does not work?
<swarley> oh whoops
<Xeago> what is the correct syntax?
<swarley> i answered without looking
Araxia_ has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
<apeiros_> x.is_a? Array
<apeiros_> you omitted the question mark. part of the method name.
<Xeago> damnit
<apeiros_> many methods returning a boolean have one :)
dzhulk has quit [Quit: Leaving.]
<apeiros_> you shouldn't check for class usually, though
<Xeago> that was a resort
<Xeago> maybe it was defined on class
evenix has quit [Ping timeout: 240 seconds]
Araxia has quit [Read error: Connection reset by peer]
<apeiros_> hm?
jrajav has joined #ruby
tomsthumb has joined #ruby
Araxia_ is now known as Araxia
<Xeago> thought it might've been defined at the class-instance
<Xeago> for a second*
<apeiros_> the method is_a? ?
<apeiros_> Object#is_a?
<Xeago> yes
<Xeago> I hate writing code in 4 different languages at the same time >.<
<apeiros_> lol
* apeiros_ does that all day
starship has quit [Quit: WeeChat 0.3.8]
<apeiros_> well, granted, 2 out of the 5 languages are structural only
<apeiros_> then again, 3 out of the 5, I dislike, some with more, some with less passion
artOfWar has quit [Remote host closed the connection]
fernand has joined #ruby
FemaleEngineer has left #ruby [#ruby]
kokainepizza has quit [Quit: My pooter is sleep.]
seanyo has quit [Ping timeout: 265 seconds]
thecreators has quit [Ping timeout: 268 seconds]
fernand is now known as starship
Dreamer3 has quit [Quit: Computer has gone to sleep.]
ddd has quit [Quit: Leaving.]
<Xeago> is this considered ugly or pretty: http://pastebin.com/JY2Dt8ta
<JohnTeddy> http://pastebin.com/N7eYH35j .. I am trying to use rspec and use rake... it's part of a beginner ruby test suite: https://github.com/alexch/learn_ruby ; I'm having trouble with 01_temperature... the results are in the pastebin.
reinaldob has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
<Jdubs> Apeiros: Am I even getting close? http://pastie.org/5342194
<apeiros_> Xeago: I prefer ternary for such terse things
krawchyk has joined #ruby
<Xeago> even multiline ternary?
<JohnTeddy> If I get rid of the round_to() function I can pass the first 2/3 tests, though on the last test it says: Failures, 1) temperature conversion functions#ftoc converts body temperature, Failure/Error: ftoc(98.6).should == 37, expected 37, got: 36.99999999999999 (using ==)
<apeiros_> Xeago: I'd put it on 1 line
<swarley> @tags = (@params[:tags]) ? @params[:tags].split(/,/) : @search_string.scan(/#(\S+)/).flatten
<swarley> thats what i would do
<swarley> but thats just me
axl__ has joined #ruby
<apeiros_> Xeago: might move the two parts into methods
Goles has joined #ruby
<apeiros_> @tags = tags_from_params || tags_from_search_string || []
<JohnTeddy> So I wrote the round_to part to try to get 36.999999999999 to 36 even, so it would pass the rspec test. I'm not sure if these beginner Ruby tests were written on ruby 1.8* or something... have things changed since that would affect this?
<apeiros_> Jdubs: taking a look
axl_ has quit [Ping timeout: 260 seconds]
axl__ is now known as axl_
<apeiros_> Jdubs: yes, getting close. not there yet, though :)
ABK has joined #ruby
Drewch has joined #ruby
<apeiros_> Jdubs: you don't want to store the result of map2, you want to return it. so don't use an instance variable, a local variable is good. but you have to return it at the end.
<apeiros_> Jdubs: map yields the array item, not the index (you currently yield the index)
krawchyk_ has quit [Ping timeout: 260 seconds]
<apeiros_> those are the two only things I think
baphled has quit [Quit: Lost terminal]
<Jdubs> Apeiros: I still have trouble understanding what variables i'm referencing with the | a, b, c | system
<apeiros_> Jdubs: they are new variables. they are filled with the value passed by yield
kirun_ has quit [Read error: Operation timed out]
philcrissman has quit [Remote host closed the connection]
baphled has joined #ruby
<apeiros_> Jdubs: http://pastie.org/5342229
<apeiros_> (`foo { |x| puts x }` and `foo do |x| puts x end` do mostly the same, you can safely ignore the difference between them for now)
pu22l3r has quit [Ping timeout: 252 seconds]
Servidorv has joined #ruby
<Xeago> apeiros_: what is the difference?
<Xeago> I thought only their notation was different?
<apeiros_> Xeago: precedence
<Servidorv> hey guys
<Servidorv> back again
<Xeago> ah ok
tbrock_ has joined #ruby
<apeiros_> Xeago: foo bar do … end # do/end belongs to foo
<apeiros_> foo bar { … } # { … } belongs to bar
<Servidorv> you know im trying to remove a value from a hash since i already have the best.max worst.min, i need to eliminate them from the has, so i can find the second best.max worst.min
dsog has joined #ruby
<Xeago> foo "bar" { … } aswell?
<apeiros_> Xeago: yes, which is why you get a syntax error
<Xeago> well didn't know that
<apeiros_> since a string not being a method can't accept a block
<Servidorv> but the problem is that both of my codes return the same best.max
slainer68 has joined #ruby
<Servidorv> can any one see why
rampantmonkey has joined #ruby
<Servidorv> im using hash.delete(best)
<Servidorv> the same for worst
<apeiros_> servidorv: Hash#delete deletes by key, not value
maesbn has quit [Remote host closed the connection]
<Jdubs> Apeiros: closest I think I will get http://pastie.org/5342240
<Servidorv> mm what can i use to delete by value??
<Jdubs> out of ideas
<apeiros_> Jdubs: remove the +1 and you should get a 'success' ;-)
<apeiros_> oh, no, actually not
carlyle has joined #ruby
<apeiros_> Jdubs: ok, 2 issues still remaining
whitedawg has quit [Quit: Leaving.]
<apeiros_> Jdubs: 1. newarr, not @newarr
<apeiros_> Jdubs: 2. return newarr in the end
thecreators has joined #ruby
<apeiros_> gah, and to clarify, the "actually not" meant that it was not all that is left to do, so:
<apeiros_> Jdubs: 3. remove the +1
<apeiros_> and then you should see a 'success'
<Jdubs> Syntax error :(
<Jdubs> undefined local variable newarr
<apeiros_> oh? paste the code please?
philcrissman has joined #ruby
<Xeago> bb
<Xeago> goinhg home
tbrock_ has quit [Quit: Computer has gone to sleep.]
<apeiros_> Jdubs: ah, well, you have to use newarr instead of @newarr *everywhere* within the method ;-)
<Jdubs> Yeah I changed it :(
<Jdubs> I didnt have an error when i was using @newarr
<apeiros_> care to paste the new code?
<Jdubs> ooo fixed it
<mr-rich> Ok, I have 2 arrays. I want to create a hash with one array as the keys and the other array as the values.
<Jdubs> i put return in a bad spot
<Jdubs> Works now
<apeiros_> mr-rich: FAQ, Hash[keys.zip(values)]
Xeago_ has joined #ruby
slainer68 has quit [Ping timeout: 248 seconds]
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<apeiros_> Jdubs: great. paste then :)
<mr-rich> apeiros_: ty
philcrissman has quit [Remote host closed the connection]
<Jdubs> You know, even though spending all day in this chatroom doing stuff for people has made me feel really stupid, it's also helped me learn a lot lol
<Hanmac> what about def map2;newarr = []; self.each {|o| newarr << yield(o)}; return newarr;end
arturaz has joined #ruby
swarley has quit [Read error: Operation timed out]
jlwestsr has quit [Ping timeout: 246 seconds]
<Jdubs> yeah my counter is extra lol
<csmrfx> Is this ok code? http://pastie.org/5342259
swarley has joined #ruby
<Jdubs> from when i tried something different
<csmrfx> What would you improve?
<apeiros_> Hanmac: he was supposed to get there on his own…
<Jdubs> Apeiros: http://pastie.org/5342256 <-- in case you didn't see it
philcrissman has joined #ruby
Xeago_ has quit [Remote host closed the connection]
<apeiros_> Jdubs: just clicked it ;-)
<Jdubs> awesome!
<apeiros_> Jdubs: you can delete line 4 btw.
kokainepizza has joined #ruby
<burgestrand> csmrfx: what’s up with all the random strings above the methods? this is not python
TheFuzzball has joined #ruby
<apeiros_> (the `counter = 0` line)
ABK has quit [Quit: Leaving]
<csmrfx> burgestrand: those are multiline comments
Goles has quit [Remote host closed the connection]
timonv has joined #ruby
<burgestrand> csmrfx: no they are not, they are strings
rjsamson has quit [Remote host closed the connection]
<csmrfx> burgestrand: You dislike them?
<Jdubs> Apeiros: are you here often? I'm trying to get into a developer academy bootcamp and I want to be as prepared as possible before I get there...So I have about 3 months to train...I don't mind spending 40+ hours a week studying. know anyone that might want to mentor me?
alem0lars has quit [Quit: quit]
ngoldman has quit [Remote host closed the connection]
<csmrfx> burgestrand: they are comments in the sense that they have no effect on the modules function
hotovson has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 255 seconds]
<burgestrand> csmrfx: comments in ruby start with either a # or =begin — you use both of those, and string sprinkling.
rjsamson has joined #ruby
<apeiros_> Jdubs: I used to be here like all the time. but nowadays, that's not a given anymore.
<burgestrand> csmrfx: you are not consistent.
<burgestrand> csmrfx: I’m just saying it’s not idiomatic.
<apeiros_> it's also ugly
<csmrfx> burgestrand: yep, moving towards ' ' comments cause =begin =end cannot be indented -> ugly
<Jdubs> Apeiros: My code is ugly?
<apeiros_> Jdubs: no, that was @ csmrfx
<apeiros_> Jdubs: sorry :)
<Jdubs> @apeiros lol!
<apeiros_> csmrfx: just use # like everybody else
<apeiros_> any sane editor allows you to block-comment with them
<burgestrand> csmrfx: ^
<burgestrand> csmrfx: you already do that within the methods.
<Jdubs> Apeiros: Do you know anyone who might be willing to mentor me though? or should I just be here every day asking people for assignments?
<reactormonk> apeiros_, depends on your definition of block-commenting
<apeiros_> Jdubs: speaking as an op - it's perfectly fine if you just ask for assignments here
Ry_ has quit [Quit: Ry_]
dzhulk has joined #ruby
<Jdubs> Should I keep everything in a github so people can see what I've worked on?
dzhulk has quit [Client Quit]
cczona has joined #ruby
* csmrfx makes note
ghanima has quit [Ping timeout: 240 seconds]
<apeiros_> Jdubs: I think that's a great idea
<Servidorv> can any one help??? i need to get the second hash.max and the second hash.min
rjsamson has quit [Ping timeout: 252 seconds]
<cczona> Why is Time.at is giving an unexpected year value, i.e. Time.at 1383181200000 => 45801-04-08 09:00:00 -0700
<apeiros_> servidorv: your calculate_best_worst gives you back an array of the form [[max_key, max_value], [min_key, min_value]], all you have to do is get min_key and max_key from that
<apeiros_> and pass that to the delete
<apeiros_> cczona: what is it supposed to return?
<apeiros_> cczona: 2013-10-31 02:00:00 +0100 ?
<yxhuvud> cczona: because you feed it with milliseconds since 1970 instead of seconds.
<apeiros_> cczona: coming from javascript? :) js uses ms, ruby uses s
<cczona> coming from json
emmanuelux has quit [Quit: emmanuelux]
<cczona> Interesting
<apeiros_> which is *javascript* object notation. so ms
<cczona> yep
<cczona> it's coming from an API, so I don't control it. how do I convert?
<apeiros_> also, json has no representation of dates/times.
havenn has quit [Remote host closed the connection]
Shamgar has quit [Read error: Connection reset by peer]
<apeiros_> cczona: errrrr, srsly?
<apeiros_> you really ask how to convert between milliseconds and seconds? o0
<csmrfx> use the 1000
havenn has joined #ruby
<Servidorv> thanks apeiros_
<cczona> "ms" wasn't self-explanatory. now, yep
baphled has quit [Quit: Lost terminal]
<apeiros_> cczona: then you probably should have asked what I meant by it…
<apeiros_> though I thought it was evident, given that yxhuvud spelled it out
v0n has quit [Ping timeout: 245 seconds]
<pothibo> Is it possible to fetch keys matching regex in a hash?
cocainepizza has joined #ruby
<apeiros_> pothibo: not directly. you have to iterate over the hash.
freakazoid0223 has quit [Ping timeout: 246 seconds]
<pothibo> I see
<apeiros_> which defeats its purpose, of course
cczona has quit [Quit: cczona]
<pothibo> apeiros_: If I was to extend Ruby hash to include the ~= operator to return an array of key matching the regex, is there anything I should be awared of?
sheerun_ has joined #ruby
punkrawkR has joined #ruby
sheerun_ has left #ruby [#ruby]
<apeiros_> pothibo: well, for starters that it is =~, not ~= :-p
<yxhuvud> hmm. constructing an index that takes a regexp doesn't seem trivial.
<pothibo> apeiros_: :)
stephenjudkins has quit [Quit: stephenjudkins]
pestouille has quit [Quit: pestouille]
<apeiros_> pothibo: naming it =~ is a bad idea
<apeiros_> =~ is supposed to return true/false
etehtsea has joined #ruby
<pothibo> apeiros_: You are right
maletor has quit [Quit: Computer has gone to sleep.]
<apeiros_> or well, should be usable in a boolean context
etehtsea is now known as Guest74625
havenn has quit [Ping timeout: 246 seconds]
<pothibo> apeiros_: match() could work tho, a bit like String#match
<apeiros_> pothibo: also, hash.keys.grep(/regex/)
sheerun has quit [Ping timeout: 240 seconds]
<apeiros_> I don't think it's worth to monkey patch Hash if getting there is so easy
<pothibo> hmm, good idea
<Jdubs> Apeiros: Git is a bit confusing lol
kokainepizza has quit [Ping timeout: 256 seconds]
<Jdubs> Apeiros: Anyways I think I got it setup right
<pothibo> didn't think of grep. I've been doing JS the whole day
<apeiros_> Jdubs: heh, yeah, it's not very beginner friendly
<csmrfx> git is not confusing, but you need to understand it
<apeiros_> Jdubs: well, you can work off gist if you don't want to be distracted by git right from the start
<csmrfx> never been easier to learn, tons and tons of videos for git
Shamgar has joined #ruby
<apeiros_> Jdubs: but I strongly recommend learning git. it's a very powerful tool
ewag has joined #ruby
joeycarmello has joined #ruby
<Jdubs> @csmrfx Yeah I'm sure, I just haven't really learned it
<Jdubs> Apeiros: I'll definitely spend some time on learning it :)
<Jdubs> What is my next assignment?
<wallmani> git is amazing
<wallmani> and gitorious
<csmrfx> see visual git guide and then power workflow git video
havenn has joined #ruby
<Jdubs> Wallmani: Thanks! :)
iamjarvo has joined #ruby
<csmrfx> visual guide 10 mins, workflow vid 70 mins, done
Guest10501 has quit [Quit: Guest10501]
dmiller has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
baphled has joined #ruby
<wallmani> git is fascinating when you are working with people that make silly things
<Jdubs> Wallmani: what do you mean
marius has joined #ruby
<csmrfx> it's also fun how you can throw it at anything unversioned to get your own versioning
havenn has joined #ruby
<wallmani> Jdubs: say someone commits code that is broken to a master branch you can easily restore saved files
caleb_io has joined #ruby
<wallmani> you can also easily view changes
<wallmani> that that person has made
<Jdubs> Sounds pretty useful.
<wallmani> yep
<wallmani> you can use github or set up your own git repos for free remotely
TheFuzzball has quit [Read error: Connection reset by peer]
<wallmani> and work with that
SJr has quit [Excess Flood]
znake has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
<apeiros_> csmrfx: maximum is singular, maxima is plural, not maximas.
joeycarmello has quit [Ping timeout: 246 seconds]
adeponte has joined #ruby
<csmrfx> ooo, typo
philcrissman has quit [Remote host closed the connection]
<Jdubs> Apeiros_: Would you like to give me another assignment? Approx ~1 hour or less duration please lol
<apeiros_> Jdubs: there's still Array#select ;-)
<Jdubs> k
<apeiros_> Jdubs: [1,-2,-3,4,5].select { |x| x > 0 } # => [1,4,5]
otters has joined #ruby
SJr has joined #ruby
mneorr has quit [Remote host closed the connection]
Serial_Killer_C has quit [Ping timeout: 246 seconds]
havenn has quit [Ping timeout: 252 seconds]
Serial_Killer_C has joined #ruby
<apeiros_> try to solve it outside of array. that is - given: `array = [1,-2,-3,4,5]; new_array = []`, how do I fill new_array with all values which are greater than zero?
<apeiros_> and then, just like you did with map, try to move it into the Array class. call the method `select2`
aetcore has joined #ruby
caleb_io has quit [Quit: caleb_io]
<apeiros_> Jdubs: also, you can try to replace `self.length.times do | counter |` in your map2 with a variant which uses `each` instead
TheFuzzball has joined #ruby
caleb_io has joined #ruby
kokainepizza has joined #ruby
philcrissman has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
shevy has quit [Ping timeout: 245 seconds]
caleb_io has quit [Client Quit]
bier_ has joined #ruby
cocainepizza has quit [Ping timeout: 255 seconds]
sieson has joined #ruby
nkts has joined #ruby
znake has quit [Quit: Linkinus - http://linkinus.com]
mityaz has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
kokainepizza has quit [Ping timeout: 240 seconds]
haxrbyte_ has joined #ruby
Tuxist has joined #ruby
haxrbyte has quit [Ping timeout: 268 seconds]
havenn has joined #ruby
<Jdubs> Apeiros: `pastie.org/5342414
<Jdubs> Getting an error
aquaranto has quit [Remote host closed the connection]
haxrbyte has joined #ruby
<swarley> Jdubs; self.length.times do | counter |
<swarley> i would use self.each do |element|
<swarley> and then just yield(element)
kirun has joined #ruby
joeycarmello has joined #ruby
rampantmonkey has quit [Quit: Computer has gone to sleep.]
mrsolo has quit [Quit: This computer has gone to sleep]
<apeiros_> Jdubs: `if … then`, not `if … do`
<swarley> also, thats not how select works
<apeiros_> Jdubs: also don't forget to return new_array
<apeiros_> swarley: um, yes, it (almost) is
<swarley> new_array << yield(self[counter])
erichmenge has quit [Ping timeout: 246 seconds]
<swarley> [1,2,3].select {|x| x > 1 }
<Jdubs> I don't know what you mean by if...then vs if..do
<swarley> so... an array of true?
<apeiros_> ah, oh, you're right swarley, sry
<apeiros_> Jdubs: your code: `if yield(self[counter]) == true do`
haxrbyte_ has quit [Ping timeout: 255 seconds]
<apeiros_> it's not "do" there, it's "then"
<apeiros_> `if yield(self[counter]) == true then`
<Jdubs> I don't understand the difference :(
<Jdubs> I don't think I've used then before
<swarley> also, you can omit then if your structure spans more than 1 line
aetcore has quit [Remote host closed the connection]
mrsolo has joined #ruby
<apeiros_> Jdubs: you understand that one works and one doesn't?
siyusong has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
<swarley> do ... end is for blocks, if ... then is a control structure
<swarley> well, the conditional part of one
erichmenge has joined #ruby
Serial_Killer_C has joined #ruby
miphe has joined #ruby
haxrbyte_ has joined #ruby
<Jdubs> Apeiros: http://pastie.org/5342440 Am I getting close?
<swarley> That's still not how select works, select applies the block provided to each element and returns all that it results as a true return. For example [1,2,3,4,5].select {|x| x > 2 } would return [3,4,5]
manizzle has joined #ruby
<swarley> apeiros_; did you teach him about map?
<swarley> oh, well nevermind
haxrbyte has quit [Ping timeout: 245 seconds]
<swarley> i see that was a dumb question now
<apeiros_> Jdubs: the part `if yield(element) == true then` is good. you can shorten it to just `if yield(element) then`
k610 has joined #ruby
rjsamson has joined #ruby
<apeiros_> but as swarley already said, the next line is not yet good. `new_array << yield(element)` means you call the block a second time for the value
<apeiros_> and you append the return value of the block to the result
<apeiros_> but we do not want the return value of the block in the result. we want the array element.
<Jdubs> Ahhhh!!!
<Jdubs> :D
F1skr has quit [Quit: WeeChat 0.3.9]
<Jdubs> Success!!!
<Jdubs> I didn't really understand the select function
<Jdubs> but when you said it that way, i finally understood it
<Jdubs> lol
aetcore has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.9]
<Jdubs> Apeiros_:http://pastie.org/5342461
<swarley> select {|item| block } → new_ary click to toggle source
<swarley> select → an_enumerator
<swarley> Invokes the block passing in successive elements from self, returning an array containing those elements for which the block returns a true value (equivalent to Enumerable#select).
[Neurotic] has joined #ruby
<apeiros_> Jdubs: looks good :)
<swarley> pretty close to what i said. Nifty
<apeiros_> Jdubs: Enumerable in general has a couple of methods which are fun to implement yourself. Enumerable only uses the `each` method for all of its methods.
Tombar_ has joined #ruby
<Jdubs> What is enumerable?
<apeiros_> a module
k610 has quit [Ping timeout: 252 seconds]
<apeiros_> ah, damn, too slow… http://rdoc.info/stdlib/core/Enumerable
reinaldob has quit [Remote host closed the connection]
FemaleEngineer has joined #ruby
<swarley> i feel like i just made a shitty version of eventmachine..
<swarley> what a waste of 30 minutes
Tombar has quit [Ping timeout: 260 seconds]
k610 has joined #ruby
<swarley> at least i used cool extending.. class MyServer < Eventful TCPServer
krawchyk has quit [Remote host closed the connection]
Ry_ has joined #ruby
Araxia has joined #ruby
Serial_K_ has joined #ruby
und3f has joined #ruby
<Hanmac> apeiros_ you could also remove the than ... its not needed
Serial_K_ has quit [Read error: Connection reset by peer]
sieson has left #ruby [#ruby]
<swarley> then*
<Jdubs> lol
<starship> qui
starship has quit [Quit: WeeChat 0.3.8]
Serial_K_ has joined #ruby
<Jdubs> Apeiros: I have 45 minutes till I am getting off, what do you want me to do next? :)
arturaz has quit [Remote host closed the connection]
Serial_Killer_C has quit [Read error: Connection reset by peer]
irocksu_ has joined #ruby
<Hanmac> Jdubs: useful one-line: self.each { | element | new_array << element if yield(element) }
Servidorv has quit [Quit: He who laughs last, thinks slowest]
fernand has joined #ruby
Serial_Killer_C has joined #ruby
<Jdubs> @Hanmac Very nice :)
Araxia has quit [Read error: No route to host]
SuperrMann has quit [Ping timeout: 248 seconds]
k610 has quit [Ping timeout: 255 seconds]
<swarley> Hanmac; if you're doing extreme one lines.. def map2; each_with_object([]) {|x,y| y << x if yield(x) }; end
Araxia has joined #ruby
<Hanmac> you mean select2 but you are right
k610 has joined #ruby
<swarley> w/e you can do the same with select2
<swarley> errrr
Serial_K_ has quit [Read error: Operation timed out]
<swarley> map2
<Jdubs> Swarley: that hurts my brain :(
Araxia has quit [Read error: Connection reset by peer]
<swarley> Its not too terrible with some practice
<Jdubs> Why would you want extreme one liners? It seems harder to read
irocksu has quit [Ping timeout: 245 seconds]
<Hanmac> Jdubs to scare the dumb ones :D
<Jdubs> I think apeiros_ got jumped by some chunky bacon
<swarley> when its easy like that
<Jdubs> Hanmac :(
<swarley> For instance, i can look at that and fix it just as easily and save a few lines
<Jdubs> I come from a long line of dummies :(
<NuclearL1cifer> Guys.. How can I call modules method from in instances method? This one seems to not work: https://gist.github.com/cb15fd54764c26cac06e
c0rn has joined #ruby
awestroke has quit [Remote host closed the connection]
emptyflask has quit [Remote host closed the connection]
<apeiros_> Jdubs: write a small class `Hero`, it should have the methods hit(damage), health_points and alive?
<swarley> NuclearL1cifer; t.send(:baz)
<apeiros_> when you create it, you should pass the name of the hero
minijupe has joined #ruby
<swarley> wait
<swarley> sorry, i read that too quickly
<NuclearL1cifer> swarley, And how can I pass any args to baz method? 't.send(:baz(args))'?
<swarley> are you sure you dont mean to use include instead of extend?
<apeiros_> NuclearL1cifer: require 'lib/…' is wrong in and of itself
<apeiros_> NuclearL1cifer: that lib/fuuuu contains Foo::Bar is wrong in and of itself
Araxia has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
<apeiros_> NuclearL1cifer: and to actually solve your problem: you want include, not extend
nanderoo has quit [Quit: Leaving.]
<NuclearL1cifer> hm
<apeiros_> extend adds a module's methods as class methods
k610 has quit [Ping timeout: 276 seconds]
<NuclearL1cifer> didn't realize that.. So what's the different between extend and include? When should I use extend and when include?
k610 has joined #ruby
<NuclearL1cifer> s/different/difference/
daniel_- has quit [Ping timeout: 240 seconds]
dsog has left #ruby [#ruby]
strangeworks has joined #ruby
<apeiros_> NuclearL1cifer: errr, I just told you?
<apeiros_> 22:21 apeiros_: extend adds a module's methods as class methods
sn0wb1rd has joined #ruby
<NuclearL1cifer> apeiros_, ah, my bad, sorry.
JSchwag has joined #ruby
icole has quit [Remote host closed the connection]
<Jdubs> Apeiros_: What should the HP method do?
<JSchwag> hey guys im having some trouble with 'gem install pg'
<JSchwag> wondering if anyone can give me a quick hand
sambio has joined #ruby
<apeiros_> Jdubs: return the current amount of health points the hero has left
icole has joined #ruby
ngoldman has joined #ruby
<apeiros_> the hit(damage) should reduce the health points by the amount of damage
fantazo has quit [Remote host closed the connection]
c0rn has quit [Quit: Lates.]
<apeiros_> JSchwag: we don't know whether we can help until you actually said something describing your problem…
<Hanmac> NuclearL1cifer that also means you could extend an Module into an single Object like o = Object.new; o.extend(Enumerable) and o does have all Enumerable methods, but not the other Objects
<JSchwag> im doing a 'bundle install' and this PG gem keeps giving me problems. how do i disable it from being installed?
<havenn> JSchwag: Could you gist the error output?
<Jdubs> Apeiros_ http://pastie.org/5342524
icole has quit [Read error: Connection reset by peer]
<Jdubs> I'm having a lot of fun, I htink i may stay up late if you stay on Apeiros :)
icole has joined #ruby
<JSchwag> its giving me an error because i dont ave postgresql installed. i cant actually install it though because i dont have root
<Hanmac> information: extend does not work on every object ... some of them cant be extended like Symbol or Fixnum
<JSchwag> so im looking to bypass the PG gem some how
jlwestsr has joined #ruby
<swarley> because you cant initialize them
<swarley> well
<swarley> you can for a symbol
c0rn has joined #ruby
<swarley> but you cant just do Fixnum.new
nachooo has joined #ruby
aetcore has quit [Remote host closed the connection]
<swarley> because you have to create a fixnum to give it a value anyway
<nachooo> what's the key to make stylesheet_link_tag to work with paths in gh-pages
k610 has quit [Ping timeout: 260 seconds]
<apeiros_> Jdubs: I might fall asleep anytime soon, though
<havenn> JSchwag: Remove 'gem "pg"...' from your Gemfile: http://gembundler.com/gemfile.html
caleb_io has joined #ruby
<JSchwag> heres the gist: https://gist.github.com/4034598
k610 has joined #ruby
<apeiros_> Jdubs: try to make the `alive?` method shorter
stenno\splat has joined #ruby
<NuclearL1cifer> apeiros_, I'm not sure what do you meant writing about 'lib/fuuuu'.. I used it only in gist..
<Jdubs> Apeiros_ on it!
<apeiros_> Jdubs: think about what `a < b` returns ;-)
<stenno\splat> how do i ask an instance in ruby: "Do you have this certain module mixed in?"
<apeiros_> (or well, `a > b`)
tUze has joined #ruby
pothibo has quit [Quit: pothibo]
<stenno\splat> i mean, a class instance
<apeiros_> stenno\splat: obj.is_a?(ModuleName)
<stenno\splat> :o
<stenno\splat> thanks!
awestroke has joined #ruby
<apeiros_> stenno\splat: uh? what now?
nitti has quit [Remote host closed the connection]
<Jdubs> Apeiros_ I changed true to '1' and false to 'nil'
<JSchwag> i will read that link havenn thanks
<Jdubs> does that work?
<stenno\splat> sexy ruby <3
<tUze> hello, gimme ideas to create an application in ruby related with music. please
<apeiros_> class X; include Y; end; X < Y # => true - if you mean that
<swarley> Jdubs; no
<apeiros_> but: X.new.is_a?(Y)
icole has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 244 seconds]
<stenno\splat> oh i see there is a difference
<swarley> you dont have to have the ternary and the control structure
<stenno\splat> thanks for the clarification. it was the instance i wanted to ask
<swarley> just def alive?; hp > 0; end
<tUze> hello, gimme ideas to create an application in ruby related with music. please
<Jdubs> @swarley hahah!!! you are right! awesome :D
<stenno\splat> not hp.zero?
<swarley> tUze; ID3 tag reader
<swarley> stenno\splat; what if hp is less than zero?
pyx has joined #ruby
<stenno\splat> eh right
<stenno\splat> stupid me
icole has joined #ruby
<swarley> its easier to just use > unless the exact zero matters
<JSchwag> havenn: how can i find where the .gem file is located
<stenno\splat> i assumed sanity checks before that!!
<JSchwag> havenn: ive looked in tons of directories and cant find it
<Jdubs> How about just !hp_zero
<swarley> occams razor at work
<Jdubs> !hp.zero
qwerxy has quit [Quit: offski]
<havenn> JSchwag: In the root dir of your project is there a file named "Gemfile"?
<swarley> Jdubs; its a lot easer to just do hp > 0
<swarley> because if you get hit and have -1 hp
timonv has quit [Remote host closed the connection]
<apeiros_> Jdubs: what if hero.hit(200) ?
<swarley> !hp.zero is true
<apeiros_> given his @hp == 100 before the hit…
<JSchwag> havenn: yes thanks!
<JSchwag> havenn: jeez
<apeiros_> his @hp would be < 0 in that case…
g-ram has joined #ruby
<Jdubs> yeah
<Jdubs> ok hp < 0 it is
<Jdubs> :)
<Jdubs> Btw, this is a really fun example for me
<Jdubs> because one of my short term goals is to build a text RPG over the next month
<Jdubs> :)
<swarley> That was a goal for me as well
<apeiros_> heh
<swarley> Beginning Ruby has an example using one
<Jdubs> I'm going to use the game to propose to my girlfriend hehe
<Jdubs> :)
* apeiros_ blinks
<burgestrand> Better not bug then.
* apeiros_ hopes Jdubs' girlfriend is a nerd
<Jdubs> LOL
<Jdubs> she won't even know until/unless she reaches the end
<Jdubs> then she'll turn around and see me with a ring :)
<stenno\splat> i always wanted to say to you that i loSIGSEGV
joshman_ has quit [Ping timeout: 246 seconds]
<swarley> if you manage a segfault in pure ruby, i applaud you :p
<Jdubs> Apeiros_ she's not, but she can appreciate me putting in the hard work to do it and the uniqueness of it :)
<apeiros_> swarley: thanks, thanks, I appreciate your applauding…
<apeiros_> though, the thanks goes to whichever native lib it was back then…
<Jdubs> Apeiros_ what do you want me to do next?
<Jdubs> :)
<apeiros_> Jdubs: paste the current code :-p
<Jdubs> kk sec
<apeiros_> btw., I prefer health_points over hp, but it's your game ;-)
elux has joined #ruby
und3f has quit [Quit: Leaving.]
<Jdubs> Apeiros_ http://pastie.org/5342570
<Jdubs> Man, back in the 90s I used to MUD all the time!!! ANyone else?
rburton- has quit [Quit: Leaving...]
sailias has quit [Quit: Leaving.]
<swarley> you have an extra end
<apeiros_> next step: getter and setter for helmet, breast_armor, trousers, boots and gloves. accepting integers representing the armor value
beneggett has joined #ruby
<swarley> under hp > 0
<stenno\splat> Jdubs: still playing roguelikes today :)
<havenn> gotta insert random rolls everywhere too!
<apeiros_> Jdubs: yepp, line 16 is superfluous
<Jdubs> @Stenno Nice!!!
<stenno\splat> nethack ftw!
<Jdubs> Apeiros: I fixed it :)
<booyakah> apeiros_, what is this? are you making a game?
erichmenge has quit [Quit: Be back later]
<apeiros_> booyakah: no, Jdubs is making one
<swarley> hm. Maybe i should make a text rpg framework..
qwerxy has joined #ruby
<booyakah> oh
<JSchwag> havenn: thx problem solved
maletor has joined #ruby
mark_locklear has quit [Remote host closed the connection]
thecreators has quit [Quit: thecreators]
maletor has quit [Client Quit]
<stenno\splat> swarley: make a sane roguelike framework in ruby and i give you all the love i have and maybe some money, too :P
und3f has joined #ruby
<stenno\splat> first step would be to make ruby speak ANSI-Term
_bart has joined #ruby
maletor has joined #ruby
<apeiros_> stenno\splat: aren't there like a dozen of libs for roguelike?
<stenno\splat> i mean, both speak and understand
<Jdubs> @apeiros: Are the armor parts under a new class?
<apeiros_> Jdubs: no, they're attributes of the Hero class
<swarley> Its pretty easy to do that
jamescarr has joined #ruby
<stenno\splat> i have to admit the roguelike stuff i have seen so far is nethack, and thats K&R C
<jamescarr> is there an rspec task for rake?
<swarley> yes for minitest
<jamescarr> I gogoled, found a post from 2008 but the example doesn't work (naturally) :)
<swarley> also, i have my own text coloring library already :p so that wouldnt be that hard
shevy has joined #ruby
<stenno\splat> also i just found http://roguebasin.roguelikedevelopment.org/index.php?title=Ruby of the venerable roguebasin
<apeiros_> swarley: I hope with 216 colors, not just those lame 7 ones…
<jamescarr> swarley: oh I dont want to use minitest
<stenno\splat> swarley: do you implement ANSI-Term ?
otters has quit [Ping timeout: 252 seconds]
<swarley> Not every terminal supports 216 though
<stenno\splat> true, but doesn't matter
<apeiros_> fuck those
<swarley> also, it moves between IRC colors and Terminal colors
<havenn> system "tput setaf 2"
<stenno\splat> lol
<stenno\splat> swarley: uhm what?
<swarley> so thats why there are only like, 18 colors lol
<apeiros_> seriously, that's like saying "but windows' terminal doesn't support all ansi sequences"
<apeiros_> so what, fuck windows too :)
<swarley> stenno\splat; the library does IRC colors, html colors, and terminal colors
<stenno\splat> oh i get it
<stenno\splat> neat
und3f has quit [Client Quit]
<swarley> its pretty lame really. Its just monkey hacks to String
<stenno\splat> so when i give "mystring".color("term", "red") it just gives "\e[30mmystring" or something?
<swarley> "hi".red_on_blue <- method_missing magic
<stenno\splat> w/e the actual escape code is
CaptainJet has joined #ruby
<stenno\splat> ewwww method_missing
awestroke has quit [Remote host closed the connection]
aetcore has joined #ruby
<swarley> method missing is a good thing
<jamescarr> fuck it. I'll just call a commandline command from rake
und3f has joined #ruby
<stenno\splat> what could possibly go wrong with method_missing :(
<csmrfx> anyone got comment row from indentation vim oneliner+
<csmrfx> *?
<swarley> stenno\splat; its just a shortcut to Colorize::#{CurrentColorScheme}("hi")
Bosma has quit [Ping timeout: 252 seconds]
clj_newb has quit [Ping timeout: 248 seconds]
JustinAiken has joined #ruby
<shevy> method_missing leads to brittle designs
v0n has joined #ruby
<Jdubs> Apeiros_ http://pastie.org/5342626 XD
jrajav has quit []
<jamescarr> found it
Bosma has joined #ruby
<swarley> oh my lord
<swarley> thats all just uh
theoros has quit [Ping timeout: 276 seconds]
Neomex has quit [Quit: Neomex]
nedbat has left #ruby ["Leaving"]
<stenno\splat> swarley: can your module also parse ansi-term, or only speak it?
<JustinAiken> Hey all! I'm looking to integrate rabbitmq queuing between two different apps, and I'm wondering if anyone knows of some really good examples, that move beyond a simple 'how to set it up' and shows how to set it up for fault tolerance?
<apeiros_> Jdubs: ooh, it should only accept an integer value. take a look at attr_accessor
<swarley> stenno\splat; i made something else to parse terminal values. Its not in that library
<Jdubs> Apeiros_ Is the extra functionality not good?
<swarley> its incorrect
<apeiros_> Jdubs: small steps ;-)
<Jdubs> :(
<apeiros_> also I don't think it works right now
<swarley> it doesnt
theoros has joined #ruby
<stenno\splat> swarley: a) is that code working good and b) can i use it? ^^"
<swarley> Jdubs; are you coming from php?
<stenno\splat> hehe
<Jdubs> I did C awhile back, before that (many years) I did html/javascript and MIRC scripts
maxer has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
<Jdubs> Why?
<swarley> stenno\splat; I can't remember, I'd have to look for it. It just outputs a tree like CodeRay so that it can be transfered to a library i was going to code
<apeiros_> Jdubs: http://rdoc.info/stdlib/core/Module#attr_accessor-instance_method (man, I really wish ruby's documentation was better in some places…)
baphled has quit [Quit: Lost terminal]
daniel_- has joined #ruby
scant has joined #ruby
<swarley> Jdubs; @trousers['name' => name, 'ac' => ac] because seeing people do things like that who come from php is common
kbeddingfield has joined #ruby
<stenno\splat> swarley: fair enough. my attempt to build a grammar tree failed somehow because i got bored soon. used treetop iirc
<Jdubs> Swarley: what's wrong with hashes?
emptyflask has joined #ruby
<swarley> No, Im sorry i wasnt clear
<swarley> I mean, using hashes that havnt been initialized as hashes, or wanting to go multiple levels down in a hash without ever putting a hash in its place
Hanmac has quit [Read error: Connection reset by peer]
_cheney has quit [Ping timeout: 260 seconds]
Hanmac has joined #ruby
<Jdubs> Apeiros: is there a method to make sure the variable is an integer?
<Jdubs> like ac.is_i?
<swarley> i see a lot of foo[1][:ho][:lol][1][:hi] = 2 when they did foo = {} on the line before
_cheney has joined #ruby
<stenno\splat> that is rather terrible :|
philcrissman has quit [Remote host closed the connection]
<swarley> yeah, i thing its a php thing.. Not sure though
<apeiros_> Jdubs: you could test for it, but I wouldn't right now. just assume that the value passed is indeed an integer
siyusong has quit [Quit: Computer has gone to sleep.]
<tUze> gimme ideas to create an application in ruby related with music. please
gener1c has quit [Ping timeout: 268 seconds]
<apeiros_> Jdubs: as said, small steps ;-)
<stenno\splat> quack quack!
<Jdubs> apeiros what is that thing youa re talking about with attr?
<Jdubs> do I need that?
theRoUS has quit [Ping timeout: 240 seconds]
<apeiros_> Jdubs: yes. use attr_accessor for this step.
<burgestrand> tUze: use http://github.com/Burgestrand/spotify and write something that can generate a waveform from a spotify song. ^^
erichmenge has joined #ruby
<apeiros_> it makes your life a lot easier.
<swarley> attr_accessor is a convenience method to do what you're already doing
<swarley> but faster
<apeiros_> Jdubs: also ensure (via the initialize method) that all of those properties start with the value 0
<Jdubs> Ok, I don't really know what to do with it, i need to go read
<burgestrand> (would’ve suggested writing an audio player, but I know what that’s like and nobody should have to do that but me)
Araxia has quit [Read error: Connection reset by peer]
rellin has quit [Ping timeout: 276 seconds]
Araxia_ has joined #ruby
<swarley> I hate dealing with audio/video files
kbeddingfield has quit [Ping timeout: 246 seconds]
geekbri has quit [Remote host closed the connection]
<swarley> tUze; make a command line tool that makes a bass drop starting at a given frequency and make it modulate down and up a random amount of times before stopping
<Jdubs> Apeiros: do you have a link to a better explanation? that one didn't help any
mneorr has joined #ruby
<apeiros_> Jdubs: I'd have to google
<Jdubs> Apeiros: nevermind i didnt see it continued
<Jdubs> lol
ilyam has joined #ruby
<apeiros_> the top answer is quite good
dakine has joined #ruby
caleb_io has quit [Quit: caleb_io]
betz has joined #ruby
ChampS666 has joined #ruby
Edward__ has joined #ruby
fir_ed has joined #ruby
SmoothSage has quit [Quit: Leaving]
jcaudle has quit [Quit: jcaudle]
<betz> Hi! I am trying to install this bundle https://github.com/malclocke/fulcrum but when installing i get this error http://pastebin.com/dsNBYgBV . Now, i tried installing ruby1.9.1-dev, but it staill gives the same error
<apeiros_> hakunin: well done (SO reply above)
<betz> does anyone can help me? Installing on a ubuntu machine
BoomCow has joined #ruby
bier_ has quit [Read error: Operation timed out]
<BoomCow> what is ruby's energy drink of choice
<Jdubs> Apeiros_ I have lots of errors :(
<BoomCow> #ruby*
dinkel has joined #ruby
hasse has quit [Quit: Page closed]
RudyValencia- has joined #ruby
<apeiros_> Jdubs: move the attr_accessor outside of the initialize
<Jdubs> Where do I put it?
enderx86 has joined #ruby
<apeiros_> right after the line `class Hero`
JJMalina has joined #ruby
<apeiros_> can be anywhere where you'd start a method definition. that is, anywhere inside the class body.
_bry4n has joined #ruby
<apeiros_> and line 18-36 can then be removed
ekristen_ has joined #ruby
<apeiros_> Jdubs: do you have git installed?
<Jdubs> yes
baraxorz has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<apeiros_> ok. give me a minute.
wargasm1 has joined #ruby
ViperMaul|_ has joined #ruby
<apeiros_> do you have an account on github? if not, create one.
<Jdubs> yes i do
beiter has quit [Quit: beiter]
hiroyuki_ has joined #ruby
ngoldman_ has joined #ruby
ekristen_ has quit [Client Quit]
elux has quit [Quit: Bye!]
fernand is now known as starship
nitti has joined #ruby
starship has quit [Quit: WeeChat 0.3.8]
headius has quit [Quit: headius]
ij has quit [Ping timeout: 246 seconds]
<hakunin> apeiros_: ah thanks : )
blacktulip has quit [Remote host closed the connection]
Virunga_ is now known as LennyLinux
array_ has joined #ruby
cousine has joined #ruby
Villadelfia_ has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
codezombie has joined #ruby
mneorr has quit [Remote host closed the connection]
raddazong has joined #ruby
RudyValencia has quit [Read error: Connection reset by peer]
hemanth has quit [Read error: Connection reset by peer]
nateberkopec has quit [Read error: Connection reset by peer]
nyrb has quit [Read error: Connection reset by peer]
ekristen has quit [Read error: Connection reset by peer]
wargasm has quit [Read error: Connection reset by peer]
KnowTheLedge has quit [Read error: Connection reset by peer]
ngoldman has quit [Read error: Connection reset by peer]
Rizzle has quit [Read error: Connection reset by peer]
Kudos has quit [Ping timeout: 264 seconds]
Villadelfia has quit [Ping timeout: 264 seconds]
hiroyuki has quit [Ping timeout: 264 seconds]
tommylommykins has quit [Ping timeout: 264 seconds]
array has quit [Ping timeout: 264 seconds]
madhatter has quit [Ping timeout: 264 seconds]
tommylommykins has joined #ruby
Villadelfia_ is now known as Villadelfia
Cultofmetatron has quit [Remote host closed the connection]
sriehl has joined #ruby
nitti_ has joined #ruby
<Jdubs> THE SKY IS FALLING!!!
<Jdubs> D:
hemanth has joined #ruby
KnowTheLedge has joined #ruby
<atmosx> Jdubs: skyfall
<apeiros_> Jdubs: https://github.com/apeiros/teaching_rpg clone this
<apeiros_> ah, err…
<apeiros_> create a directory 'apeiros_rpg', cd into it, then do:
cousine has quit [Read error: Connection reset by peer]
Kudos has joined #ruby
<betz> so i installed ruby-1.9 and dev, but it always tries to install it with 1.8 "Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/capybara-webkit"
<JustinAiken> @aperios_ you shold attr_accessor up heatlh_points
nitti has quit [Ping timeout: 252 seconds]
<apeiros_> git clone git@github.com:apeiros/teaching_rpg.git apeiros_rpg
<apeiros_> JustinAiken: please, I have an idea on how to move onward
cousine has joined #ruby
<apeiros_> JustinAiken: attr_accessors are Jdubs' next step. one step after the other.
tenmilestereo has quit [Quit: Leaving]
<apeiros_> JustinAiken: also, tab completion for nicknames :-p
nitti_ has quit [Remote host closed the connection]
<JustinAiken> haha, ok :)
<apeiros_> Jdubs: I'll try to do every step you should do as a separate git commit
invisime has quit [Quit: Leaving.]
emmanuelux has joined #ruby
<apeiros_> you can use `git log` and `git checkout COMMIT_SHA` to see the individual states of progress
jlogsdon has joined #ruby
<Jdubs> ok what do i do now
enderx86 has quit [Remote host closed the connection]
<apeiros_> get the accessor to work :)
<Jdubs> i did
baroquebobcat has quit [Read error: Connection reset by peer]
<Jdubs> now im trying to get the armor value to work
<apeiros_> ok
und3f has quit [Quit: Leaving.]
<apeiros_> Jdubs: can you create a git repository of your code too and push it to github?
siyusong has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
<Jdubs> uhhh'
baroquebobcat has joined #ruby
Araxia has joined #ruby
<Jdubs> You mean add another folder under my apeiros_rpg folder and named it lib?
<apeiros_> if you encounter problems, do tell ;-)
<apeiros_> Jdubs: on github, click "create new repository"
<Jdubs> I don't really know what you are talking about :)
JJMalina has quit [Quit: Linkinus - http://linkinus.com]
<apeiros_> you should have two projects - yours and mine
<apeiros_> Jdubs: no, no, separate
<apeiros_> put your current code into 'lib/hero.rb' too please (within that repository)
tommyvyo_ is now known as tommyvyo
<apeiros_> follow the steps github tells you to do
<Jdubs> I don't really understand the github stuff :/
stephenjudkins has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
Araxia_ has quit [Read error: Connection reset by peer]
carlyle has quit [Remote host closed the connection]
<apeiros_> Jdubs: don't worry, I'll help you
uris has quit [Quit: Leaving]
carlyle has joined #ruby
nitti has joined #ruby
manizzle has quit [Ping timeout: 260 seconds]
Guest74625 has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ltsstar has quit [Quit: ltsstar]
baphled has joined #ruby
sailias has joined #ruby
<Jdubs> I don't think it's working :/
enderx86 has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
SuperrMann has joined #ruby
carlyle has quit [Remote host closed the connection]
<apeiros_> you've got skype?
<Jdubs> error: src refspec master does not match any.
<Jdubs> error: failed to push some refs to '
<Jdubs> yeah
<Jdubs> I can't voice chat atm though
awestroke has joined #ruby
joofsh has quit [Ping timeout: 246 seconds]
<apeiros_> Jdubs: sent you a private message
<apeiros_> as long as screen sharing is possible… :)
JustinAiken has left #ruby [#ruby]
stephenjudkins has quit [Ping timeout: 264 seconds]
Araxia has quit [Read error: Connection reset by peer]
<Eiam> when i have a data structure like x=[[1,2],[3,4]] I can do x.each {|k,v| } and k is 1 and v is 2. but when i try x.each_with_index { |k,v,index| } k becomes [1,2] and v becomes the index..
<Eiam> what gives?
stephenjudkins_ has joined #ruby
tommyvyo_ has joined #ruby
<apeiros_> Eiam: your params are value and index, and value is [1,2]
mengu has joined #ruby
baphled has quit [Client Quit]
<apeiros_> in the .each ruby automatically expands (splats) the [1,2] to k,v
<apeiros_> just like: a,b = [1,2]; # a # => 1
SCommette has quit [Quit: SCommette]
baphled has joined #ruby
baphled has quit [Client Quit]
<apeiros_> Eiam: you can force it with each_with_index: each_with_index { |(k,v), index|
<Eiam> apeiros_: okay, so i figured maybe i should try to splat it, like Hash[*x].each_with_index but its an "odd number of arguments"
pestouille has joined #ruby
elaptics`away is now known as elaptics
<Eiam> apeiros_: okay thats more what i was after. i mean I understood that .each {|k,v| } was sort of 'cheating' by automatically treating my [1,2] as two different items
jlogsdon has quit [Remote host closed the connection]
<Eiam> but i figured each_with_index would extend the same courtesy =0
esya has joined #ruby
slash_nick has quit [Ping timeout: 246 seconds]
Araxia has joined #ruby
jlogsdon has joined #ruby
sriehl has quit [Remote host closed the connection]
<Eiam> apeiros_: ill give that a shot, kind of intersting that it would work
<apeiros_> Eiam: it's not a function of the method, it's a function of rubys syntax
v0n has quit [Ping timeout: 245 seconds]
<apeiros_> and just like it won't expand `a,b,c = [1,2],3` to 1,2,3, it won't do with here either
<Eiam> so how does the { |(k,v),index| } part work, its seeing that the input is an array and splatting it into two params for me?
<Eiam> i don't quite understand the mechanism by which (k,v) is doing something
daniel_- has joined #ruby
<Eiam> (in the each_with_index example)
<apeiros_> (k,v),index <- two params, (k,v) and index
ChampS666 has quit []
qwerxy has quit [Quit: offski]
<apeiros_> now it's k,v = [1,2] again, which it can splat automatically
banseljaj is now known as imami|afk
<Eiam> ahhh okay, i was thinking souldn't it be |[k,v],index|
<Eiam> i see now, its saying pass the 'block function for parameters' these two values
<Eiam> which its going to splat like it does for .each
k610 has quit [Ping timeout: 240 seconds]
<Eiam> apeiros_: thank you =)
<Eiam> very helpful (as usual ha)
rjsamson has quit [Remote host closed the connection]
otters has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
rjsamson has joined #ruby
wargasm has joined #ruby
jimmy1980 has quit [Ping timeout: 248 seconds]
banjara has joined #ruby
Hanmac1 has joined #ruby
wargasm1 has quit [Ping timeout: 246 seconds]
Z0idberg has joined #ruby
dankest has quit [Quit: Linkinus - http://linkinus.com]
stephenjudkins_ has quit [Ping timeout: 260 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
Hanmac has quit [Ping timeout: 240 seconds]
Hanmac1 is now known as Hanmac
erichmenge has quit [Quit: Be back later]
banisterfiend has joined #ruby
nateberkopec has joined #ruby
jeffreybaird has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
wargasm has quit [Ping timeout: 252 seconds]
kil0byte has quit [Remote host closed the connection]
BrianJ has quit [Ping timeout: 248 seconds]
kil0byte has joined #ruby
Ch4rAss has quit [Quit: leaving]
stephenjudkins has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
ddd has joined #ruby
ddd is now known as Guest17445
mmitchell has quit [Remote host closed the connection]
rjsamson has quit [Ping timeout: 265 seconds]
BrianJ has joined #ruby
wargasm has joined #ruby
Guest17445 has quit [Client Quit]
kil0byte has quit [Ping timeout: 260 seconds]
dinkel has quit [Quit: Leaving]
tommyvyo_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ddd has joined #ruby
vickaita_ has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
stephenjudkins has quit [Ping timeout: 264 seconds]
stephenjudkins has joined #ruby
sertaconay has joined #ruby
swex_ has quit [Remote host closed the connection]
swex has joined #ruby
<reactormonk> apeiros_, rbenv was the other way to install?
alex__c2022 has quit [Quit: alex__c2022]
swarley has quit [Ping timeout: 260 seconds]
TheFuzzball has joined #ruby
Morkel has quit [Quit: Morkel]
kbeddingfield has joined #ruby
sailias has quit [Quit: Leaving.]
Araxia has quit [Read error: Connection reset by peer]
Araxia_ has joined #ruby
<apeiros_> reactormonk: what?
<RubyPanther> Does anybody have an example of a really, really crufty legacy schema that they can release? I am looking for "real world" examples to help me show how to migrate to modern practices, while maintaining backwards compatibility
dmiller has joined #ruby
<reactormonk> apeiros_, besides rvm
csaunders has quit [Read error: Operation timed out]
kbedding_ has joined #ruby
macabre has quit [Remote host closed the connection]
kbeddingfield has quit [Read error: Connection reset by peer]
strangeworks has quit [Read error: Connection reset by peer]
erichmenge has joined #ruby
<RubyPanther> I started looking through my old code, and it turns out almost every legacy schema I have is under NDA
tUze has quit [Quit: The computer fell asleep]
<apeiros_> reactormonk: rbenv only manages versions
<apeiros_> ruby-build or somesuch was the build tool of choice of rbenv
<apeiros_> I'm sure they've got a link on rbenv
awestroke has quit [Remote host closed the connection]
nkts has quit [Ping timeout: 260 seconds]
<csmrfx> Whats a legacy schema?
GoGoGarrett has quit [Remote host closed the connection]
nitti has quit [Remote host closed the connection]
slash_nick has joined #ruby
mpereira has quit [Ping timeout: 260 seconds]
jmeeuwen has quit [Read error: Connection reset by peer]
jmeeuwen has joined #ruby
alanp has joined #ruby
alanp has quit [Read error: Connection reset by peer]
bbttxu has quit [Quit: bbttxu]
alanp has joined #ruby
<RubyPanther> a legacy schema is one that is ugly, doesn't use modern naming conventions, isn't consistently divided, has PKs of different types, or has at least 3 major warts that would make connecting with a modern ORM inconvenient.
Tuxist has quit [Read error: Connection reset by peer]
<RubyPanther> if you look at it and think, "ugh, we don't do it that way anymore, yikes" then it is "legacy." ;)
Tombar_ has quit [Remote host closed the connection]
v0n has joined #ruby
medik has joined #ruby
Xeago has joined #ruby
alanp_ has quit [Read error: Operation timed out]
reinaldob has joined #ruby
headius has joined #ruby
<booyakah> I'm new to Ruby, haven't coded basically anything in 2+ years. I used to do basically web development with html/php/sql etc
<booyakah> and i want to purchase a book
<booyakah> i'm having a hard time grasping some concepts of ruby
<booyakah> like "everything is an object"
<booyakah> rather, i understand it. but it's hard to convert it into thinking
<booyakah> i've found this book "Beginning Ruby"
<booyakah> have anyone read it?
kirun has quit [Quit: Client exiting]
<booyakah> what i want to know, i know basic programming but not much ruby. Would this help me get better understanding of ruby?
Araxia_ has quit [Read error: No route to host]
Araxia has joined #ruby
chrismcg is now known as zz_chrismcg
fantazo has joined #ruby
Shamgar has quit [Ping timeout: 255 seconds]
Serial_Killer_C has quit [Remote host closed the connection]
<reactormonk> apeiros_, yes, they do
Tania has quit [Quit: :p]
<GeekOnCoffee> booyakah: have you done http://www.codeschool.com/courses/try-ruby ?
reset has joined #ruby
strangeworks has joined #ruby
<booyakah> GeekOnCoffee, no. i've done something similar though
<booyakah> like codeacademy and..
manizzle has joined #ruby
<booyakah> ..tryruby.org
Shamgar has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<booyakah> will check it out
<GeekOnCoffee> tryruby.org is them
<booyakah> oh it's the same thing :)
<GeekOnCoffee> their other courses are pretty good too, although not sure if they've got a beginning ruby one
J-_-L has quit [Quit: Leaving.]
pestouille has quit [Quit: pestouille]
lucaspiller_ has quit [Remote host closed the connection]
reinaldob has quit [Remote host closed the connection]
<booyakah> thing is. i know basic concepts of programming like variables, operators, statements like if etc
lucaspiller_ has joined #ruby
<booyakah> but for me the "sense" behind ruby is a little different in how i "think code"
sebastianb has quit [Ping timeout: 246 seconds]
<booyakah> for instance, i can show an example of my source code
c0rn has quit [Ping timeout: 276 seconds]
<booyakah> it's basically how i used to write php
<booyakah> but in ruby
havenn has quit [Remote host closed the connection]
sertaconay has quit [Read error: Operation timed out]
<GeekOnCoffee> booyakah: http://www.codeschool.com/courses/ruby-bits might actually be a good choice for you then
<GeekOnCoffee> I don't actually benefit from you using them
sebastianb has joined #ruby
stopbit has quit [Quit: Leaving]
<GeekOnCoffee> I just don't have any good non-rails books to recommend
havenn has joined #ruby
dmiller has quit [Remote host closed the connection]
<booyakah> if you know what i mean that my code isn't "ruby-like"
<booyakah> lot's of nested if/unless statements
<booyakah> just ugly imo
<GeekOnCoffee> I'm not going to disagree ;)
loka has joined #ruby
slainer68 has joined #ruby
<booyakah> it works but, meh
<booyakah> it's not "proper" :)
<wwalker> booyakah I found Eloquent Ruby great for getting someone from a different background (perl here) writing Ruby the "right" way.
<booyakah> wwalker, this is a book?
<wwalker> yes, paperback
<loka> I found a snippet of code that I think is really deeply nested. Do you have any suggestions to make it look better? http://pastie.org/private/6qt5p55fjefg1hez8uww
sertaconay has joined #ruby
havenn_ has joined #ruby
jrist is now known as jrist-afk
<booyakah> wwalker, thanks will check it out
<wwalker> booyakah: or maybe going through the Ruby Koans if you are a hands on learner rather than a reading learner
dmiller has joined #ruby
mneorr has joined #ruby
<wwalker> Eloquent Ruby is the only book I've actually read, in order, and gotten anything out of. I'm a hands on learner
<booyakah> wwalker, oh yeah. learning by doing is how i've learned what i know so far.
<booyakah> but it's nice to have a reference to fall back on
havenn has quit [Ping timeout: 240 seconds]
yakko has quit [Ping timeout: 276 seconds]
<booyakah> GeekOnCoffee, ruby-bits seems like a nice resource
<GeekOnCoffee> also +1 for the ruby koans
butblack has quit [Quit: butblack]
Floydzy has joined #ruby
gabrielrotbart has joined #ruby
iamjarvo has joined #ruby
v0n has quit [Remote host closed the connection]
BrianJ has quit [Quit: BrianJ]
<GeekOnCoffee> booyakah: writing bad code is like many things… the first step is admitting you have a problem ;)
mneorr has quit [Remote host closed the connection]
<booyakah> GeekOnCoffee, yeah :)
mneorr has joined #ruby
qwerxy has joined #ruby
reinaldob has joined #ruby
<booyakah> while i'm at it. you might noticed all those sql queries
BSaboia has quit [Read error: Connection reset by peer]
<booyakah> i just discovered activerecord like 2 weeks ago
L0L0L0L0L has joined #ruby
mneorr has quit [Remote host closed the connection]
<wwalker> loka: personally I like adding whitespace (blank lines). I'd add a line after lines 5 and 11. Instead of 4,5,6 and 27,28,29, I'd do at 4 : while cid = queue_mutex.synchronize { queue.empty? ? nil : queue.pop(true) }
<booyakah> and it seems like a better solution for what i'm doing
mneorr has joined #ruby
dmiller has quit [Remote host closed the connection]
c0rn has joined #ruby
SuperrMann has quit [Quit: Computer has gone to sleep.]
<wwalker> booyakah: AR makes much cleaner code in many cases. But under some circumstances the performance of AR will force you back to raw SQL. I AM recommending AR, just realize when performance is killin g you AR is the likely culprit
nitti has joined #ruby
<loka> wwalker: okay, whitespace is always good. but why don't you re-paste instead of writing your changes here
<booyakah> wwalker, thanks. for the moment performance is nothing i have to worry about though
reinaldob has quit [Read error: Connection reset by peer]
reinaldob has joined #ruby
fjfish has joined #ruby
BadProphet has quit [Remote host closed the connection]
francisfish has quit [Ping timeout: 245 seconds]
nari has joined #ruby
otters has quit [Ping timeout: 252 seconds]
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<JSchwag> guy im getting a strange error when i try and migrate_plugins
<JSchwag> guys*
<JSchwag> "undefined method `deep_symbolize_keys' for "%s horas registradas ao projeto":String"
<JSchwag> thats all the info i get
lenovodroid has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
butblack has joined #ruby
banisterfiend has quit [Ping timeout: 246 seconds]
medik has quit [Quit: medik has no reason]
jjang has joined #ruby
stephenjudkins has joined #ruby
apeiros_ has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
rburton- has joined #ruby
Xeago has quit [Remote host closed the connection]
minijupe has quit [Quit: minijupe]
siyusong has quit [Quit: Computer has gone to sleep.]
mytec has joined #ruby
LennyLinux has quit [Remote host closed the connection]
enderx86 has quit [Remote host closed the connection]
khakimov has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
awestroke has joined #ruby
amacgregor_osx has joined #ruby
<booyakah> is active record used like hmm.. how should i put it
<booyakah> like a wrapper for sqlite for instance
lledet has joined #ruby
cousine has joined #ruby
<GeekOnCoffee> booyakah: yes
<GeekOnCoffee> basically
<booyakah> so i need activerecord AND something?
<GeekOnCoffee> sqlite or mysql or postres
<booyakah> ok
<GeekOnCoffee> if you do it right, your code should be interchangeable between them
awestroke has quit [Remote host closed the connection]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
nitti has quit [Remote host closed the connection]
<booyakah> yeah
<booyakah> but activerecord isn't a database on it's own?
Slivka has quit [Remote host closed the connection]
L0L0L0L0L has quit [Ping timeout: 256 seconds]
<csmrfx> its a object data mapper
lledet has quit [Quit: lledet]
greenarrow has quit [Quit: IRC is just multiplayer notepad]
LucidDreamZzZ has joined #ruby
Dreamer3 has joined #ruby
L0L0L0L0L has joined #ruby
<booyakah> hmm too advanced for me
<booyakah> will have to google that :P
miphe has quit [Quit: Leaving]
snearch has joined #ruby
<booyakah> ah i see
Juul has joined #ruby
ngoldman_ is now known as ngoldman
otters has joined #ruby
slash_nick has quit [Ping timeout: 252 seconds]
mytec has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
nari has quit [Read error: Operation timed out]
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
solidoodlesuppor has quit [Remote host closed the connection]
stnly has joined #ruby
linoj has quit [Quit: linoj]
rampantmonkey has joined #ruby
rampantmonkey has quit [Client Quit]
irocksu_ has quit [Quit: leaving]
jrajav has joined #ruby
cantonic has joined #ruby
<booyakah> wwalker, Eloquent Ruby seems to be exactly what I need
elaptics is now known as elaptics`away
JSchwag has quit [Quit: Page closed]
pac1 has joined #ruby
rellin has joined #ruby
rellin has quit [Read error: Connection reset by peer]
judd7 has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
elico has quit [Remote host closed the connection]
judd7 has joined #ruby
cascalheira has joined #ruby