apeiros_ changed the topic of #ruby to: Ruby 2.2.0; 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
kiyote23 has quit [Ping timeout: 244 seconds]
<g0dc0mpl3x> 03/28DEC announces PDP-11, 1970
dfinninger has joined #ruby
<apeiros_> who's bot is g0dc0mpl3x?
<Crazy_Atheist> no idea, but the randomness is annoying as fock
<gr33n7007h> mine
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Crazy_Atheist> well gr33n7007h please get it out of this channel, it has no need in this channel
<gr33n7007h> ok done :)
<apeiros_> gr33n7007h: it's considered spamming. please remove it.
g0dc0mpl3x has quit [Remote host closed the connection]
<apeiros_> thanks.
<Crazy_Atheist> thank you
Sawbones has joined #ruby
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
ta_ has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
dcarmich has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
Pupeno has quit [Remote host closed the connection]
Neomex_ has quit [Read error: Connection reset by peer]
josephndenton has quit [Ping timeout: 256 seconds]
Spami has quit [Quit: This computer has gone to sleep]
VBlizzard has joined #ruby
blizzy has quit [Disconnected by services]
VBlizzard is now known as blizzy
dfinninger has quit [Ping timeout: 245 seconds]
lest has quit [Ping timeout: 250 seconds]
emmesswhy has joined #ruby
tamal has joined #ruby
ajacmac has quit [Ping timeout: 250 seconds]
felltir has quit [Remote host closed the connection]
Pupeno has joined #ruby
ixti has quit [Ping timeout: 240 seconds]
tamal has quit [Client Quit]
DadoCe has joined #ruby
AmirolAhmad has joined #ruby
AmirolAhmad has quit [Client Quit]
devoldmx has quit [Remote host closed the connection]
<wasamasa> gr33n7007h: what the hell was that
ixti has joined #ruby
<gr33n7007h> wasamasa, just a bit of fun bot, pulling random quotes from /usr/share/calendar/calendar.computer on every ping request
krisquigley has joined #ruby
krisquigley has quit [Client Quit]
devoldmx has joined #ruby
jenrzzz has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
jottr has joined #ruby
wallerdev has joined #ruby
towski_ has joined #ruby
josephndenton has joined #ruby
fandi has joined #ruby
ohaibbq has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
startupality has quit [Quit: startupality]
carvantes has quit [Quit: WeeChat 0.3.7]
msmith_ has joined #ruby
jefus__ is now known as jefus
doritostains has quit [Quit: WeeChat 1.0.1]
msmith_ has quit [Ping timeout: 240 seconds]
bkok has quit [Ping timeout: 246 seconds]
valeriansaliou has joined #ruby
cmarques has quit [Remote host closed the connection]
soupson has joined #ruby
soupson has left #ruby [#ruby]
emmesswhy has quit [Quit: Leaving]
Nameo0 has joined #ruby
mgberlin has joined #ruby
valeriansaliou has quit [Ping timeout: 265 seconds]
<shevy> hehe
sondr3 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mgberlin has quit [Remote host closed the connection]
Takle has joined #ruby
<Nameo0> Happy 2015! I was wondering how you could go about checking if a certain element exists in certain path while scrapping a website? I am using Nokogiri and Mechanize and this website does not Id or name the elements. So the only way to identify specific elemtns is using .xpath.
dc_ has quit [Remote host closed the connection]
skinux has joined #ruby
<pontiki> ddd: my javascript console is in the chrome dev tools
<skinux> Can anyone direct me to the best tutorial (or some kind of free course) for moving from php to ruby?
<ddd> pontiki, ah
<ddd> i've heard of people asking that. moving from php to ruby but found nothing except to just learn ruby itself
charliesome has joined #ruby
<pontiki> ddd: node.js does have a REPL
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takle has quit [Ping timeout: 245 seconds]
<ddd> skinux, check out http://iwanttolearnruby.com - Collection of Ruby tutorials, excercises, puzzles, screencasts, blogs, podcasts, conference recordings, and other resources to help you learn Ruby.
<ddd> pontiki, will look for it. much obliged
mercwithamouth has joined #ruby
blizzy has quit [Ping timeout: 245 seconds]
Sawbones has quit [Remote host closed the connection]
<skinux> I either want to learn Python or Ruby. Seems like to use Python I have to learn dJango or something, which was a difficult task when I was last trying.
jefus_ has joined #ruby
<pontiki> ddd, you just run node without and files
<pontiki> s/and/any/
jefus has quit [Ping timeout: 245 seconds]
<ddd> ah no separate 'irb' command. got it. i've yet to get node on here. when i do i'll try that out. didn't know it did that
<Bish> >"test
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
<Bish> "test" =~ /test/ => 0
<Bish> am i fukin missing something?
jherbst has joined #ruby
<shevy> missing where
<Bish> shouldn't that be true!?
<Bish> im using that all the time, and it fucks me up right now
<shevy> should =~ yield true?
jottr has quit [Ping timeout: 250 seconds]
<Bish> should helping me cryptic?
<Bish> be*
<shevy> it is a simple question
<shevy> you claimed that it should be true
<shevy> "test" =~ /e/ # => 1
<shevy> I claim that it returns a number on a match
<Bish> oh i see.. i didn't know that, wow
<shevy> it will be nil if it won't match so you can use it in an if-condition still
<shevy> if "abc" =~ /z/
<shevy> won't be evaluated, returns nil, so the if clause will not be entered
<shevy> if "abc" =~ /a/
<shevy> now it works
<shevy> \o/
<Bish> but if my match is at offset 0, it doesn't go into the if body
<Bish> oh it does, nevermind
jack_rabbit has joined #ruby
<shevy> well here you have to remember that nil and false in ruby will be considered false
mary5030 has joined #ruby
soupson has joined #ruby
<Bish> okay, thank you
<shevy> so true, 0,1,2, "3" and so forth should be truthy
<shevy> power of ruby \o/
<pontiki> >> "helpa?"
<eval-in__> pontiki => "helpa?" (https://eval.in/238825)
<pontiki> oh still here
eka has joined #ruby
ItSANgo has quit [Quit: Leaving...]
<pontiki> >> "test" =~ /test/
<eval-in__> pontiki => 0 (https://eval.in/238826)
<pontiki> >> !("test" =~ /test/)
<eval-in__> pontiki => false (https://eval.in/238827)
<pontiki> >> !!("test" =~ /test/)
<eval-in__> pontiki => true (https://eval.in/238828)
Akuma has joined #ruby
caustic has joined #ruby
<pontiki> if you really need something true or false (and you almost never do) you can use that double bang (!!) to do that
sevvie has joined #ruby
nicolastarzia has joined #ruby
robustus has quit [Ping timeout: 250 seconds]
<Bish> thank you very much, but i never saw a language that does if 0 => get executed
<Bish> but it's actually making sense
<Bish> i really started to like nil in ruby
<Bish> you can do stuff like Hash["count"] += Hash["count"].to_i
<Bish> wait that's not making sense.. i am still drunk
robustus|Off has joined #ruby
robustus|Off is now known as robustus
<Bish> h["c"] = h["c"].to_i + 1
<Bish> inc or create in 1 line, i always hated that in other languages
sondr3 has joined #ruby
brb3 has quit [Quit: Textual IRC Client: www.textualapp.com]
dc_ has joined #ruby
nicolastarzia has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: zzz]
nfk has quit [Quit: yawn]
SOLDIERz has quit [Quit: Be back later ...]
nfk has joined #ruby
wallerdev has quit [Quit: wallerdev]
<apeiros_> Bish: if you have a sane design, there will never be a non-int in h["c"], and then you can just do h["c"] += 1
<apeiros_> (often sobriety is a prerequisite for sane designs, though)
<godd2> "often"
<pontiki> that ellusive Ballmer Peak
<apeiros_> yes, often indeed.
* apeiros_ codes best around ~2.7‰
<godd2> "per mille"
jcdesimp has joined #ruby
Techguy305 has quit [Ping timeout: 255 seconds]
devoldmx has quit [Remote host closed the connection]
anskeit has quit []
nfk has quit [Quit: yawn]
m8 has quit [Quit: Sto andando via]
charliesome has joined #ruby
<Bish> pontiki, "do you listen to anyone?" =~ /li/
<Bish> pontiki => "do you listen to anyone?" =~ /li/
<Bish> wow, im really too fucked up from new years eve
<Bish> >> "test"
<eval-in__> Bish => "test" (https://eval.in/238830)
dkb20k has joined #ruby
<Bish> lol, i thought u were the bot, don't do drugs kids
cesarstafe has joined #ruby
anaeem1 has quit [Remote host closed the connection]
DadoCe has quit [Remote host closed the connection]
dkb20k has quit [Ping timeout: 244 seconds]
soupson has quit [Ping timeout: 240 seconds]
sevvie has quit [Remote host closed the connection]
synire has quit [Read error: Connection reset by peer]
skinux has quit [Read error: Connection reset by peer]
max96at is now known as max96at|off
it0a has quit [Ping timeout: 240 seconds]
exadeci has quit [Quit: Connection closed for inactivity]
ItSANgo has joined #ruby
j2p2 has joined #ruby
marr has quit [Ping timeout: 244 seconds]
msmith_ has joined #ruby
bronson has joined #ruby
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
icebourg has joined #ruby
<shevy> lol
sevvie has joined #ruby
<shevy> that's pretty hilarious
icebourg has quit [Max SendQ exceeded]
sevvie has quit [Client Quit]
icebourg has joined #ruby
<towski_> >> RUBY_VERSION
<eval-in__> towski_ => "2.1.3" (https://eval.in/238831)
mrmargolis has quit [Remote host closed the connection]
tikibot has joined #ruby
<tikibot> hey pontiki
bronson has quit [Ping timeout: 264 seconds]
msmith_ has quit [Ping timeout: 264 seconds]
tikibot has quit [Remote host closed the connection]
icebourg has quit [Client Quit]
<pontiki> yes?
<godd2> man, pontiki is so popular. i wish i was pontiki
sevvie has joined #ruby
philwantsfish1 has joined #ruby
bricker has quit [Ping timeout: 245 seconds]
devoldmx has joined #ruby
<towski_> >> Process.uid
<eval-in__> towski_ => 1000 (https://eval.in/238832)
philwantsfish has quit [Ping timeout: 240 seconds]
hamakn has joined #ruby
djdarkbeat has joined #ruby
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
devoldmx_ has joined #ruby
caustic has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
sondr3 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tokik has joined #ruby
sondr3 has joined #ruby
Takle has joined #ruby
hamakn has quit [Ping timeout: 264 seconds]
<gr33n7007h> >> RUBY_PLATFORM
<eval-in__> gr33n7007h => "i686-linux" (https://eval.in/238833)
<gr33n7007h> >> open("|uptime").gets
<eval-in__> gr33n7007h => (https://eval.in/238834)
<shevy> pontiki hehe just teasing you... I thought tikibot would be a good name for a pontiki-bot
<apeiros_> botiki
<shevy> so many variations...
<shevy> take godd2 as nick... that would not lend itself well at all for the name of a bot
Takle has quit [Ping timeout: 240 seconds]
<shevy> I mean, just think about it... godbot? botgod? naaah
<shevy> Bish on the other hand, now that would be a great name for a bot
blizzy has joined #ruby
<shevy> Bishbot the bishcot!
unreal has joined #ruby
<shevy> oh weird
<shevy> it is written Biskotte in german ... but in english it is called either "sponge finger" or "ladyfinger" ... really weird
<shevy> A Biskotte http://goo.gl/sTVffa
mroach has quit [Ping timeout: 272 seconds]
chipotle has quit [Quit: cheerio]
robinboening has joined #ruby
<robinboening> hey all.
mrmargolis has joined #ruby
hamakn has joined #ruby
<robinboening> I installed ruby 2.2.0 via rvm on my machine (OSX 10.10) and tried to install sqlite3 then. Unfortunately that ended up with an error while compiling some c extensions. The error is exactly the same as you can see in this gist: https://gist.github.com/zzak/695d1e25ec13d62ca671
<robinboening> Does anyone have an idea how to fix that?
gheegh has quit [Quit: Textual IRC Client: www.textualapp.com]
icebourg has joined #ruby
kies`prime has joined #ruby
cesarstafe has quit [Ping timeout: 245 seconds]
kies`prime has quit [Remote host closed the connection]
phil101_ has joined #ruby
<brocktimus> robinboening: What version of rvm? I
<brocktimus> robinboening: What version of rvm? I've heard of a lot of people having issues with it
phil101 has quit [Ping timeout: 245 seconds]
<robinboening> I updated to latest rvm version before
<robinboening> rvm 1.26.7 (master)
gh has joined #ruby
<apeiros_> that does not look like a problem with rvm…
Cust0sLim3n has quit [Read error: Connection timed out]
kirun has quit [Quit: Client exiting]
Cust0sLim3n has joined #ruby
<apeiros_> sqlite3-1.3.10 on 10.9 installs for me. what version of sqlite3 are you trying to install, robinboening?
<robinboening> when using ruby 2.1.1 I can install sqlite3 without any problems
<robinboening> Successfully installed sqlite3-1.3.10 (on ruby 2.1.1)
boulder-ruby has quit [Quit: boulder-ruby]
<robinboening> ohhh
<robinboening> It seems to be an issue with the combination of sqlite3 v1.3.8 and ruby 2.2.0
deryl has joined #ruby
jefus_ is now known as jefus
<robinboening> I just installed sqlite3 v1.3.10 on ruby 2.2.0
<robinboening> successfully
deryl has quit [Remote host closed the connection]
* agent_white learns it is possible to nests methods
<robinboening> but installing sqlite3 v1.3.8 throws that error
ddd has quit [Read error: Connection reset by peer]
<apeiros_> agent_white: it probably doesn't do what you think it does
<apeiros_> a "nested" method is simply being defined every time you call the outer method
dopie has quit [Remote host closed the connection]
<agent_white> apeiros_: Oh I just thought it was neat to call the nested method via the outer method.
<agent_white> Didn't think about it any more than that :P
<apeiros_> robinboening: 2.2 is probably not ABI compatible with 2.1 then and 1.3.10 matches the 2.2 version
<agent_white> apeiros_: Is there any usecase of making nested method?
<apeiros_> IMO no sane one.
<apeiros_> rails 3.x had a case were a method redefined itself
<apeiros_> that was rather nasty to debug
<agent_white> Ooo boy I bet.
gh has quit [Quit: Leaving]
<brocktimus> Would probably also bust the any method caching so probably unperformant?
<apeiros_> mostly because it was a longish method and the nested method was somewhat unremarkable
renderful has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros_> brocktimus: not sure how 2.1 & 2.2's method caches work. I heard somebody ported the hierarchic cache.
<apeiros_> so it might be possible it's no longer like in <=1.9 where defining a method, extending or including killed all caches.
pwnz0r has joined #ruby
j2p2 has quit [Ping timeout: 240 seconds]
Sawbones has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
renderful has quit [Ping timeout: 240 seconds]
<robinboening> thanks @apeiros_
Sawbones has quit [Remote host closed the connection]
<apeiros_> yw
chipotle has joined #ruby
<shevy> apeiros_ sounds pretty meta-programmy when methods redefine themselves at runtime
<shevy> evolutionary programs!
Sawbones has joined #ruby
<agent_white> shevy: We are scientists. http://www.explodingdog.com/title/wearesci.html
* Nilium is pretty sure that if he could make a dog explode via code, he'd be a scientist.
Sawbones has quit [Remote host closed the connection]
havenwood has joined #ruby
mary5030 has quit [Remote host closed the connection]
<shevy> poor puppy
<godd2> >> class Dog; def explode; puts "boom"; end; end; dog = Dog.new; dog.explode
<eval-in__> godd2 => boom ... (https://eval.in/238835)
mary5030 has joined #ruby
* agent_white hands godd2 scientist degree
boulder-ruby has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
valeriansaliou has joined #ruby
adriancb has joined #ruby
axisys has joined #ruby
axisys has quit [Changing host]
axisys has joined #ruby
pwnz0r has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 245 seconds]
bashusr has quit [Ping timeout: 245 seconds]
mary5030 has quit [Ping timeout: 255 seconds]
dkb20k has joined #ruby
bashusr has joined #ruby
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
zorak8 has quit [Ping timeout: 244 seconds]
valeriansaliou has quit [Ping timeout: 265 seconds]
kapil__ has joined #ruby
boulder-ruby has left #ruby [#ruby]
boulder-ruby has joined #ruby
haxr has joined #ruby
mary5030 has joined #ruby
haxr has quit [Max SendQ exceeded]
haxr has joined #ruby
wallerdev has joined #ruby
dfinninger has joined #ruby
tbloncar has joined #ruby
kiyote23 has joined #ruby
<godd2> I guess now I can finish my book "How I Became a Scientist"
tbloncar has quit [Ping timeout: 255 seconds]
adriancb has quit [Ping timeout: 240 seconds]
slawrence00 has joined #ruby
apeiros_ has quit [Remote host closed the connection]
adriancb has joined #ruby
apeiros_ has joined #ruby
boulder-ruby has quit [Quit: boulder-ruby]
jaequery has joined #ruby
kiyote23 has quit [Ping timeout: 265 seconds]
boulder-ruby has joined #ruby
Spami has joined #ruby
nicolastarzia has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Remote host closed the connection]
giuseppesolinas has joined #ruby
nicolastarzia has quit [Ping timeout: 244 seconds]
luriv_ has joined #ruby
ta_ has joined #ruby
robinboening has quit [Quit: robinboening]
icbm has quit [Quit: Leaving]
evanjs has joined #ruby
luriv has quit [Ping timeout: 245 seconds]
ta_ has quit [Ping timeout: 265 seconds]
DadoCe has joined #ruby
Akuma has quit [Quit: So long sukkas!]
msmith_ has joined #ruby
bronson has joined #ruby
banister has joined #ruby
oleo is now known as Guest1719
banister has quit [Max SendQ exceeded]
oleo__ has joined #ruby
DadoCe has quit [Ping timeout: 244 seconds]
kt2 has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest1719 has quit [Ping timeout: 264 seconds]
kt2 has joined #ruby
xenomorph is now known as {xenomorph}
msmith_ has quit [Ping timeout: 244 seconds]
bronson has quit [Ping timeout: 240 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
dfinninger has quit [Remote host closed the connection]
ajaiswal has joined #ruby
davedev2_ has quit [Ping timeout: 244 seconds]
davedev24_ has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
tbloncar has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
ebbflowgo has joined #ruby
banister has joined #ruby
Yzguy has joined #ruby
sevvie has joined #ruby
silkfox has joined #ruby
chipotle has joined #ruby
oleo__ has quit [Quit: Verlassend]
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brlkid_ has joined #ruby
phutchins has quit [Ping timeout: 265 seconds]
oleo__ has joined #ruby
ddd has joined #ruby
oleo__ is now known as oleo
dain has joined #ruby
dain has left #ruby [#ruby]
oo_ has joined #ruby
ddd has quit [Client Quit]
Takle has joined #ruby
ddd has joined #ruby
ddd has quit [Client Quit]
adriancb has quit [Remote host closed the connection]
silkfox has quit [Ping timeout: 265 seconds]
adriancb has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
tbloncar has quit [Quit: Leaving.]
dkb20k has quit [Read error: Connection reset by peer]
nisstyre_ is now known as nisstyre
dkb20k has joined #ruby
oo_ has quit [Remote host closed the connection]
waxjar has joined #ruby
pengin has joined #ruby
Sawbones has joined #ruby
Menorah has joined #ruby
caustic has quit []
adriancb has quit [Ping timeout: 264 seconds]
msmith_ has joined #ruby
ddd has joined #ruby
ddd has quit [Client Quit]
Spami has quit [Quit: This computer has gone to sleep]
ddd has joined #ruby
ddd has quit [Client Quit]
Sawbones has quit [Remote host closed the connection]
drdanmaku has joined #ruby
ddd has joined #ruby
maletor has joined #ruby
pengin has quit [Remote host closed the connection]
pengin has joined #ruby
haxr has quit [Ping timeout: 244 seconds]
magic__ has joined #ruby
mferrier has joined #ruby
oo_ has joined #ruby
Musashi007 has joined #ruby
<epitron> godd2: don't forget to make the method redefine itself so you can only blow up the dog once :)
boulder-ruby has quit [Quit: boulder-ruby]
ddd has quit [Client Quit]
luriv_ has quit [Ping timeout: 245 seconds]
uber_hulk has joined #ruby
karmatr0n has joined #ruby
pengin has quit [Ping timeout: 265 seconds]
<godd2> >> class Dog; def explode; puts "boom"; self.instance_eval { def explode; puts "already boomed!"; end }; end; end; dog = Dog.new; dog.explode; dog.explode
<eval-in__> godd2 => boom ... (https://eval.in/238837)
<godd2> aww man. better remove the first puts
ddd has joined #ruby
<godd2> >> class Dog; def explode; "boom"; self.instance_eval { def explode; puts "already boomed!"; end }; end; end; dog = Dog.new; dog.explode; dog.explode
<eval-in__> godd2 => already boomed! ... (https://eval.in/238838)
uber_hulk has left #ruby [#ruby]
braincras has quit [Quit: bye bye]
<IceDragon> why are you Boom-ing dogs D:
ndrei has joined #ruby
braincrash has joined #ruby
joast has joined #ruby
<godd2> Cause I'm a scientist!
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
GGMethos has quit [Ping timeout: 244 seconds]
oo_ has quit [Ping timeout: 244 seconds]
Musashi007 has quit [Quit: Musashi007]
blizzy is now known as blizzy
Cache_Money has joined #ruby
valeriansaliou has joined #ruby
yfeldblum has joined #ruby
prudchy_ has joined #ruby
Spami has joined #ruby
oo_ has joined #ruby
Asher has quit [Quit: Leaving.]
valeriansaliou has quit [Ping timeout: 265 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 244 seconds]
arescorpio has quit [Excess Flood]
prudchy_ has left #ruby ["Textual IRC Client: www.textualapp.com"]
Yzguy has quit [Quit: I'm sleeping, go away.]
oo_ has quit [Remote host closed the connection]
mrmargolis has quit [Remote host closed the connection]
fandi has quit [Ping timeout: 264 seconds]
kiyote23 has joined #ruby
DivineEntity has quit [Quit: Lost terminal]
oo_ has joined #ruby
kiyote23 has quit [Ping timeout: 244 seconds]
Parker0 has joined #ruby
jaequery has joined #ruby
fandi has joined #ruby
brlkid_ is now known as brlkid
nicolastarzia has joined #ruby
GGMethos has joined #ruby
cyberarm_ has quit [Quit: Leaving]
nicolastarzia has quit [Ping timeout: 250 seconds]
ta_ has joined #ruby
<brocktimus> godd2: you don't even need instance eval
<brocktimus> >> class Dog; def explode; "boom"; def explode; puts "already boomed!"; end; end; end; dog = Dog.new; dog.explode; dog.explode
<eval-in__> brocktimus => already boomed! ... (https://eval.in/238839)
yfeldblum has joined #ruby
mattwildig has joined #ruby
<godd2> aww dangit
carvantes has joined #ruby
<godd2> I rubyed too much
<godd2> rubied?
jcdesimp has quit [Quit: Leaving...]
iamninja has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
tokik has quit [Ping timeout: 245 seconds]
pwnz0r has joined #ruby
bronson has joined #ruby
<epitron> brocktimus: hahah
<epitron> that's awesome
<agent_white> godd2: roobd?
<epitron> >> class Dog; def explode; "boom"; def explode; "already boomed!"; end; end; end; dog = Dog.new; [dog.explode; dog.explode]
<eval-in__> epitron => /tmp/execpad-220dbaa6c843/source-220dbaa6c843:2: syntax error, unexpected ';', expecting ']' ... (https://eval.in/238840)
karmatr0n has quit [Remote host closed the connection]
<epitron> >> class Dog; def explode; "boom"; def explode; "already boomed!"; end; end; end; dog = Dog.new; [dog.explode, dog.explode]
<eval-in__> epitron => [:explode, "already boomed!"] (https://eval.in/238841)
<epitron> :D
it0a has joined #ruby
<epitron> wait, lol
<godd2> yea the method define returns a symbol
<epitron> >> class Dog; def explode; def explode; "already boomed!"; "boom!"; end; end; end; dog = Dog.new; [dog.explode, dog.explode]
<eval-in__> epitron => [:explode, "boom!"] (https://eval.in/238842)
<epitron> fff
<epitron> >> class Dog; def explode; def explode; "already boomed!"; end; "boom!"; end; end; dog = Dog.new; [dog.explode, dog.explode]
<eval-in__> epitron => ["boom!", "already boomed!"] (https://eval.in/238843)
<epitron> THERE we go
<epitron> sorry about that, everyone
<godd2> eval-in__ driven development
sevenseacat has joined #ruby
havenwood has quit [Remote host closed the connection]
<epitron> EDD
<epitron> silly object driven design (SODD)
bronson has quit [Ping timeout: 250 seconds]
Spami has quit [Quit: This computer has gone to sleep]
wallerdev has quit [Quit: wallerdev]
* agent_white pulls ruby-putter from his golfbag
Sawbones has joined #ruby
Morkel has joined #ruby
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
onewheelskyward has joined #ruby
<banister> epitron i enjoyed that, thanks
mattwildig has quit []
kp666 has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brlkid has quit [Ping timeout: 250 seconds]
onewheelskyward has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
tlarevo has quit [Ping timeout: 240 seconds]
Lexun has joined #ruby
evanjs has quit [Remote host closed the connection]
pwnz0r has quit [Remote host closed the connection]
pwnz0r has joined #ruby
Auv has quit [Quit: ZNC - http://znc.in]
soupson has joined #ruby
pwnz0r has quit [Ping timeout: 244 seconds]
agent_white has quit [Quit: night]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
gr33n7007h has quit [Quit: Leaving]
Takle has joined #ruby
nonnatus_ has quit [Read error: Connection reset by peer]
<brocktimus> >> class Dog; def explode; "boom"; def explode; puts "already boomed!"; end; end; end; dog = Dog.new; dog.explode; Dog.new.explode; dog.explode
<eval-in__> brocktimus => already boomed! ... (https://eval.in/238844)
<brocktimus> wait that wasnt what I wanted
magic__ has quit [Ping timeout: 255 seconds]
<brocktimus> >> class Dog; def explode; "boom"; def explode; puts "already boomed!"; end; end; end; dog = Dog.new; dog.explode; Dog.new.explode;
<eval-in__> brocktimus => already boomed! ... (https://eval.in/238845)
<brocktimus> interesting, so the redefined method is on the class rather than the instance
msmith__ has joined #ruby
Takle has quit [Ping timeout: 240 seconds]
etdev has joined #ruby
msmith_ has quit [Ping timeout: 244 seconds]
Sawbones has quit [Remote host closed the connection]
s00pcan has joined #ruby
banister has quit [Read error: No route to host]
arup_r has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
sondr3 has quit [Quit: Textual IRC Client: www.textualapp.com]
chipotle has joined #ruby
tus has quit []
ebbflowgo has quit [Quit: ebbflowgo]
xcesariox has joined #ruby
frog0909 has quit [Remote host closed the connection]
HarrryW has joined #ruby
<HarrryW> Hey guys, can i get some help?
<chipotle> you may
<chipotle> i'm getting a puppy this weekend, i hope!
<etdev> What would you like help with?
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
leafybasil has quit [Remote host closed the connection]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<chipotle> i would like to know how i should begin learning ruby?
<chipotle> i went through learn to program with chris pine
<chipotle> but i didn't understand it all
<chipotle> is the next best step, the well grounded rubyist?
<chipotle> i really want to solve problems soon with ruby
<sevenseacat> the next step is to understand it all
banister has joined #ruby
banister has quit [Max SendQ exceeded]
mary5030 has quit [Ping timeout: 256 seconds]
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
josephndenton has quit [Ping timeout: 244 seconds]
soupson has quit [Ping timeout: 256 seconds]
<etdev> The codecademy course is pretty good. You could try that next.
chipotle has quit [Ping timeout: 244 seconds]
<etdev> Also the Ruby Koans are great for some more hands-on experience.
mary5030 has joined #ruby
jaequery has joined #ruby
chipotle has joined #ruby
freerobby has quit [Quit: Leaving.]
<chipotle> ping?
<chipotle> etdev: still around?
bronson has joined #ruby
<chipotle> tab width in a text editor should be two, right?
<etdev> Yes
<sevenseacat> always for ruby.
<etdev> For Ruby anyway
<sevenseacat> and spaces, not tabs.
<chipotle> okay
<chipotle> sorry if this got posted before, my router was messing up...
<chipotle> i would like to know how i should begin learning ruby?
<chipotle> i went through learn to program with chris pine
<chipotle> but i didn't understand everything
<chipotle> is the next best step, the well grounded rubyist?
<sevenseacat> the next step is to understand it all
<chipotle> maybe lynda? or other videos?
<chipotle> sevenseacat: i don't think pine's book covers much...
<sevenseacat> what parts didnt you understand?
<sevenseacat> it does.
<chipotle> compared to what i see in the well grounded rubyist
banister has joined #ruby
thomas has quit [Quit: weeee.]
<chipotle> i want to start solving problems; really coding. so far i've used drupal for ~3 years, but i really haven't coded anything
<chipotle> i'm hoping to change that by learning ruby then RoR
thomas has joined #ruby
<chipotle> sevenseacat: idk, the problems that were advanced at the end of the chapters, not all of them i got
<chipotle> i really want to get a more thorough understanding, from the beginning... would the well grounded rubyist do that?
<chipotle> or are there videos like lynda, or something else, you'd recommend
<chipotle> i have the next month off and i plan on intensive studying learning ruby and maybe js, if there's time...
<sevenseacat> well if we dont know what you dont get, how can we help?
mary5030 has quit [Remote host closed the connection]
<sevenseacat> are you just going to just try random things until one of them works?
mary5030 has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
Calmoto has joined #ruby
<chipotle> sevenseacat: no, i want a comprehensive way to start fresh
dseitz has joined #ruby
Asher has joined #ruby
ARCADIVS has joined #ruby
HarrryW has quit []
<chipotle> and i'm wondering the best way for this?
ddd has quit [Read error: No route to host]
mary5030 has quit [Ping timeout: 264 seconds]
brlkid has joined #ruby
valeriansaliou has joined #ruby
klmlfl has joined #ruby
<sevenseacat> chris pine's book is normally what i recommend
<sevenseacat> just pick something else if you didnt like it
josephndenton has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
klmlfl has quit [Remote host closed the connection]
valeriansaliou has quit [Ping timeout: 244 seconds]
sevvie has joined #ruby
LetErikTry has quit [Quit: sleep]
sevvie has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 245 seconds]
<chipotle> sevenseacat: have you read the well grounded rubyist?
<chipotle> are there any videos that are good ?
sevvie has joined #ruby
ndrei has quit [Quit: Lost terminal]
ndrei has joined #ruby
Asher has quit [Quit: Leaving.]
centrx has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
kapil__ has quit [Quit: Connection closed for inactivity]
nicolastarzia has joined #ruby
bousquet has joined #ruby
chipotle has joined #ruby
Rickmast_ has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
Rickmasta has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
<chipotle> how does nodeJS work with ruby/RoR? isn't it a separate language?
nicolastarzia has quit [Ping timeout: 244 seconds]
koderok has joined #ruby
<centrx> Do you th
<centrx> whoa what
<centrx> nodeJS and ruby/RoR a separate language?
<centrx> yes
<centrx> you can make anything work with anything, but it is a different thing
brlkid has quit [Quit: ô¿ô]
<chipotle> centrx: why would i want to use node if i'm using ruby?
<centrx> node is a bit of a fad, the silly Javascript callbacks and all
<centrx> but it is good for quickly transmitting messages between nodes
<centrx> some kind of big web installation would have use for it
<centrx> The JavaScript is very fast ever since V8, I would say that's the big advantage with node
<centrx> and it is designed for a a distributed system, quick fast responses
<centrx> but it's really kind of a nutty thing node
jenrzzz has joined #ruby
<chipotle> centrx: isn't it dying because the main contrib left it for go or something?
<centrx> there is a lot of a drama going on with Node right now
<chipotle> i don't really know what that means...i'm new to programming
adriancb has joined #ruby
<chipotle> been doing drupal for three years
<centrx> I think it wouldn't matter if the tech is solid
<chipotle> am currently learning ruby and want to learn other useful things
josephndenton has quit [Ping timeout: 255 seconds]
<centrx> Javascript is very useful as it is, because it's used in all the UI
<centrx> So whether you learn it through learning node, or whether you learn it through coding some UI and Ajax
<centrx> it's good either way
<centrx> Javascript is key even if the concept of Javascript on the Server is kind of wacky
<centrx> I do like Javascript
bronson has joined #ruby
carvantes has quit [Quit: WeeChat 0.3.7]
<centrx> but the programming concepts are most important
mengu has joined #ruby
<centrx> whatever language you choose to expand into
Lexun has quit [Quit: Manjaro-KDE user leaving!]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> you can do multi-threaded programming with Ruby or Python or Java or whatever
bronson has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
adriancb has quit [Ping timeout: 240 seconds]
koderok has quit [Read error: Connection reset by peer]
koderok has joined #ruby
koderok has quit [Client Quit]
<shevy> hmm
<shevy> so far all I am using is jquery
<centrx> Is that a version of COBOL
<chipotle> centrx: okay, so i'll study javascript alongside ruby
<chipotle> centrx: any recommendation for how to learn js?
oo_ has quit [Remote host closed the connection]
<chipotle> centrx: btw, what is angularjs? is it similiar to nodejs?
sevenseacat has quit [Ping timeout: 264 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx> chipotle, angularjs is more on the front-end
oetjenj has quit [Quit: Textual IRC Client: www.textualapp.com]
sevvie has quit [Read error: Connection reset by peer]
<centrx> chipotle, Javascript is historically a front-end language, used entirely in the browser even
leafybasil has joined #ruby
<centrx> chipotle, Things like Angular and Ember provide a good way of keeping state between the backend and the frontend but they are still primarily front-end
<centrx> chipotle, That is, in the views
<chipotle> so what is the point of adding angularjs on top of straight js?
msmith__ has quit [Remote host closed the connection]
uber_hulk has joined #ruby
<centrx> chipotle, It makes it easy to make UIs and manage UIs that have multiple pages
ballpointcarrot has quit [Ping timeout: 252 seconds]
iamninja has quit [Remote host closed the connection]
<centrx> chipotle, jQuery is the basic Javascript framework, that's one thing you should learn
iamninja has joined #ruby
<centrx> chipotle, Javascript itself is almost a very rudimentary language
<chipotle> and how is jquery different than angular?
<chipotle> what do you mean by rudimentary?
<centrx> chipotle, It doesn't have advanced things like map for example
<centrx> chipotle, and technically it isn't even object-oriented
<chipotle> is jquery basic because i'ts simple?
lxsameer has joined #ruby
lxsameer has joined #ruby
<centrx> chipotle, jQuery has a lot of things like a convenience library
<centrx> chipotle, It also has things for dealing with the DOM, using CSS Selectors
Azure has quit [Quit: My MBP went to sleep.]
<centrx> chipotle, So it improves JavaScript greatly, like say ActiveSupport (part of Rails) does with Ruby
timonv_ has joined #ruby
<centrx> chipotle, And then it has specific things to deal with UI issues like HTMl/CSS Selectors
<centrx> chipotle, as well as a lot of plugins use jQuery, like jQuery charts
leafybasil has quit [Ping timeout: 265 seconds]
<chipotle> ok
<chipotle> so i guess i should learn js, then jquery, then maybe angular?
Ankhers has joined #ruby
<centrx> chipotle, sure yes, JS and jQuery are more fundamental
<centrx> chipotle, angular might change and not be a standard framework anymore
<centrx> chipotle, they also have a new release coming out so it might all change in which case less helpful to learn the old version
<centrx> chipotle, where JavaScript and jQuery are much more core knowledge
<centrx> chipotle, but you might decide to learn angular or ember or backbone or some other thing
pwnz0r has joined #ruby
<chipotle> centrx: why would it change?
<chipotle> doesn't google own it?
<chipotle> ok
<chipotle> i will stick to learning js
<chipotle> what is the best way to learn js?
<centrx> I have no clue, try #javascript
<centrx> chipotle, Douglas Crockford is a big JavaScript guy so anything from him is good, but it might be too advanced for an intro
chipotle_ has joined #ruby
mr_george has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
chipotle has quit [Read error: Connection reset by peer]
hamakn has quit [Remote host closed the connection]
Joufflu_ has quit [Quit: Leaving]
Joufflu has quit [Quit: Leaving]
Takle has joined #ruby
yfeldblu_ has joined #ruby
lemur has joined #ruby
<chipotle_> ceej_irccloud: thanks!
<chipotle_> i'm heading to bed, gnite centrx
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
Takle has quit [Ping timeout: 245 seconds]
bluOxigen has joined #ruby
yfeldblu_ has quit [Ping timeout: 255 seconds]
lkba_ has quit [Quit: Bye]
lkba has joined #ruby
kapil__ has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Menorah has quit [Quit: This computer has gone to sleep]
cmarques has joined #ruby
nonnatus has joined #ruby
icebourg has quit []
ddd has joined #ruby
Dopagod has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
Cache_Money has joined #ruby
govg has joined #ruby
lektrik has joined #ruby
ValicekB has joined #ruby
chipotle_ has quit [Ping timeout: 244 seconds]
chipotle has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 245 seconds]
koderok has joined #ruby
koderok has quit [Client Quit]
josephndenton has joined #ruby
magic__ has joined #ruby
towski_ has quit [Remote host closed the connection]
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
cesarstafe has joined #ruby
jenrzzz has joined #ruby
josephndenton has quit [Ping timeout: 255 seconds]
duncannz has joined #ruby
_Andres has joined #ruby
oo_ has joined #ruby
bronson has joined #ruby
mferrier has quit [Remote host closed the connection]
uber_hulk has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
amclain has quit [Quit: Leaving]
uber_hulk has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has quit [Ping timeout: 250 seconds]
PanzerModern has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
claptor has quit [Quit: this channel is bakas]
anarang has joined #ruby
ta_ has joined #ruby
<pontiki> o/
<ddd> \o
uber_hul1 has joined #ruby
uber_hulk has quit [Read error: Connection reset by peer]
valeriansaliou has joined #ruby
<pontiki> i successfully fought the urge to completely rewrite one of services for the client i'm working for
ta_ has quit [Ping timeout: 244 seconds]
timonv_ has quit [Remote host closed the connection]
msmith_ has joined #ruby
chipotle has quit [Ping timeout: 244 seconds]
valeriansaliou has quit [Ping timeout: 245 seconds]
Channel6 has quit [Quit: Leaving]
phil101_ has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
silkfox has joined #ruby
Musashi007 has joined #ruby
psy has joined #ruby
msmith_ has quit [Ping timeout: 245 seconds]
bousquet has quit []
TomyWork has joined #ruby
Takle has joined #ruby
sandelius has joined #ruby
phil101 has joined #ruby
<sandelius> Is it appropriate to built a large scale app with Sinatra?
charliesome has joined #ruby
valeriansaliou has joined #ruby
_ixti_ has joined #ruby
cmarques has quit [Remote host closed the connection]
Dopagod has quit [Read error: Connection reset by peer]
tobago has joined #ruby
yfeldblum has joined #ruby
<pontiki> define "large scale" ?
silkfox has quit [Ping timeout: 244 seconds]
<sandelius> Large codebase, many many page views
ixti has quit [Ping timeout: 245 seconds]
<sandelius> most of the endpoint will be an API that serves JSON
<pontiki> what about database stuff? model / business logic? service objects? and so on?
<sandelius> Yeah I would put in ActiveRecord or Sequel
oo_ has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pontiki> if you end up doing everything that Rails would have given you, would it be worth it?
rbrs has joined #ruby
<sandelius> pontiki here's a quote I found: "There are a lot of other commenters who say that it quickly becomes Rails, and while that's true, I think it's OK, because it becomes Rails tailored for you"
<pontiki> that's basically the question, isn't it
<pontiki> you will have learned a lot along the way
<pontiki> if i weren't using Rails, i wouldn't bother with AR
yfeldblum has quit [Ping timeout: 240 seconds]
Cache_Money has quit [Quit: Cache_Money]
LouisRoR has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
<sandelius> pontiki I actually like AR, it makes me productive
<pontiki> I like it as well
davedev2_ has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 256 seconds]
nicolastarzia has joined #ruby
<pontiki> the question of "appropriate" has to be determined by you
<pontiki> that's all
<pontiki> if this were something i was working on for a client, with other people, rails is probably the way we'd go
<pontiki> because the people i work with are all more capable and productive in that realm
psy has quit [Ping timeout: 240 seconds]
<sandelius> pontiki yeah I know. Since our application we're about to build will mostly be an API for a angular frontend I really don't want to bake in entire rails. But I'm a bit worried the rest of the developers will be able to manage a large sinatra app. It requires a lot more thinking but in the end (if you get it right) I think it would be great and performant.
<pontiki> but if it's not for a specific client, and i'm doing it solo, i'd at least give Sinatra, LotusRB, Cuba, and several alternatives a look. even think about doing it in Rack
zorak8 has joined #ruby
<pontiki> you don't have to bake in the entire rails stack
<sandelius> no I know but there
<pontiki> you can exclude huge swaths of it, in fact
<sandelius> Yeah but when I've done that, why use Rails then?
<sandelius> The client is us
<pontiki> because what's left is still easy to work with, and more familiar to everyone else
nicolastarzia has quit [Ping timeout: 240 seconds]
Cache_Money has joined #ruby
<Nilium> Hm, my INI parser can read a 27kb INI file in a little under 2ms.. that seems bad.
<sandelius> pontiki I know you're right but Sinatra makes it so fast and pretty :)
<pontiki> i'm NOT saying do it in Rails
<Nilium> Not counting reading the INI file into memory
<pontiki> i'm also not saying don't do it in Rails
<pontiki> just be clear on your overall desired outcomes for the project
<sandelius> pontiki get that and I appreciate to discuss both for and against
<pontiki> Sinatra is decidedly *un*pretty when you have create many many routes for resources
terlar has quit [Quit: WeeChat 1.0.1]
<sandelius> pontiki well I would split it into severeal "routes" files and reopen the app class and define them there
<Nilium> I view Sinatra as a thing you build tiny little test projects in and nothing else
<pontiki> doesn't make it prettier
<Nilium> I honestly can't imagine trying to write anything extensive using it
noop has joined #ruby
uber_hul1 is now known as uber_hulk
Cache_Money has quit [Client Quit]
Musashi007 has quit [Quit: Musashi007]
terlar has joined #ruby
arup_r has quit [Remote host closed the connection]
Lingo__ has joined #ruby
Lingo__ has quit [Client Quit]
<pontiki> sandelius: another consideration is whether you're app should be monolithic, or broken into microservices
<pontiki> sinatra is quite helpful with microservices
livathinos has joined #ruby
cesarstafe has quit [Ping timeout: 240 seconds]
<pontiki> but going the microservice route introduces complications as well
kamilc__ has joined #ruby
silkfox has joined #ruby
gr33n7007h has joined #ruby
LouisRoR has joined #ruby
psy has joined #ruby
StoneCypher has quit [Ping timeout: 272 seconds]
hamakn has joined #ruby
timonv_ has joined #ruby
silkfox has quit [Ping timeout: 265 seconds]
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kevr_ has quit [Changing host]
kevr_ has joined #ruby
kevr_ is now known as kevr
sandelius has joined #ruby
ta_ has joined #ruby
startupality has joined #ruby
timonv_ has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
jack_rabbit has quit [Ping timeout: 264 seconds]
ianfleeton has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
arup_r has joined #ruby
livathinos has quit [Read error: Connection reset by peer]
livathinos has joined #ruby
silkfox has joined #ruby
yeticry has quit [Ping timeout: 244 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
yeticry has joined #ruby
gusto has quit [Ping timeout: 265 seconds]
SixiS has joined #ruby
gusto has joined #ruby
jaequery has joined #ruby
ohaibbq has quit [Quit: Leaving...]
LouisRoR has quit [Ping timeout: 245 seconds]
LouisRoR has joined #ruby
yfeldblum has joined #ruby
jack_rabbit has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
Axy has joined #ruby
Mia has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
j0n3 has joined #ruby
j0n3 has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
codecop_ has quit [Quit: Išeinu]
valeriansaliou has quit [Quit: Be back later ...]
pwnz0r has quit [Remote host closed the connection]
decoponio has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
pwnz0r has joined #ruby
silkfox has quit [Ping timeout: 265 seconds]
Techguy305 has joined #ruby
oo_ has quit [Ping timeout: 264 seconds]
jack_rabbit has quit [Ping timeout: 245 seconds]
pwnz0r has quit [Ping timeout: 256 seconds]
haxr has joined #ruby
Flcn__ has joined #ruby
lkba has quit [Ping timeout: 255 seconds]
Musashi007 has quit [Quit: Musashi007]
Nameo0 has quit [Ping timeout: 240 seconds]
valeriansaliou has joined #ruby
lkba has joined #ruby
felltir has joined #ruby
Musashi007 has joined #ruby
gigetoo has joined #ruby
zorak8 has quit [Ping timeout: 250 seconds]
chipotle has quit [Quit: cheerio]
valeriansaliou has quit [Ping timeout: 240 seconds]
arup_r has quit []
bronson has joined #ruby
_ixti_ has quit [Ping timeout: 256 seconds]
bMalum has joined #ruby
siso has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
haxr has quit [Ping timeout: 255 seconds]
valeriansaliou has joined #ruby
Musashi007 has joined #ruby
noname001 has joined #ruby
oo_ has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
Sawbones has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
oo_ has quit [Ping timeout: 240 seconds]
Ilyas has joined #ruby
ta_ has joined #ruby
iamninja has quit [Remote host closed the connection]
psy has quit [Read error: No route to host]
msmith_ has joined #ruby
fandi has quit [Quit: Leaving]
iamninja has joined #ruby
psy has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
msmith_ has quit [Ping timeout: 240 seconds]
Techguy305 has quit [Ping timeout: 240 seconds]
abdulsattar has joined #ruby
leafybasil has joined #ruby
Musashi007 has quit [Quit: Musashi007]
yfeldblum has joined #ruby
kiyote23 has joined #ruby
valeriansaliou has quit [Quit: Be back later ...]
mengu has quit [Remote host closed the connection]
iamninja has quit [Quit: ZZZzzz…]
yfeldblum has quit [Ping timeout: 250 seconds]
ARCADIVS has quit [Quit: ARCADIVS]
kiyote23 has quit [Ping timeout: 244 seconds]
nicolastarzia has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
timonv_ has joined #ruby
duncannz has quit [Ping timeout: 250 seconds]
kp666 has quit [Read error: Connection reset by peer]
marr has joined #ruby
jenrzzz has joined #ruby
yeticry has joined #ruby
duncannz has joined #ruby
Cust0sLim3n has quit [Read error: Connection timed out]
Cust0sLim3n has joined #ruby
nicolastarzia has quit [Ping timeout: 265 seconds]
silkfox has joined #ruby
valeriansaliou has joined #ruby
gccostabr has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
yeticry has joined #ruby
silkfox has quit [Ping timeout: 244 seconds]
siso has quit [Ping timeout: 272 seconds]
gccostabr has quit [Ping timeout: 245 seconds]
gccostabr has joined #ruby
yeticry has quit [Remote host closed the connection]
valeriansaliou has quit [Quit: Be back later ...]
Flcn__ has quit [Quit: Be back later ...]
yeticry has joined #ruby
abdulsattar has quit [Quit: Leaving.]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
siso has joined #ruby
Sawbones has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 244 seconds]
Sawbones has joined #ruby
banister has quit [Ping timeout: 240 seconds]
Criztian has joined #ruby
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
DaniG2k has joined #ruby
banister has joined #ruby
ta_ has joined #ruby
yeticry has joined #ruby
rbrs has quit [Quit: Leaving]
lemur has quit [Ping timeout: 244 seconds]
jefus_ has joined #ruby
ta_ has quit [Ping timeout: 255 seconds]
yeticry has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
jefus has quit [Ping timeout: 255 seconds]
rbrs has joined #ruby
sevvie has joined #ruby
ianfleeton has quit [Remote host closed the connection]
felltir has quit []
Yzguy has joined #ruby
Sawbones has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
yeticry has quit [Remote host closed the connection]
yeticry has joined #ruby
gregf__ has quit [Quit: Lost terminal]
oo_ has joined #ruby
sevvie has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
yeticry has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 255 seconds]
Flcn__ has joined #ruby
lkba_ has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
sevvie has joined #ruby
Yzguy has quit [Quit: I'm sleeping, go away.]
lkba has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
andikr has joined #ruby
yfeldblum has joined #ruby
ddd has quit [Ping timeout: 245 seconds]
gregf_ has joined #ruby
davedev24_ has joined #ruby
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 265 seconds]
ptrrr has joined #ruby
Flcn__ has quit [Ping timeout: 256 seconds]
fantazo has joined #ruby
mengu has joined #ruby
wald0 has joined #ruby
<wald0> im not very familiarized with C yet, and I use a lot of regex like gsub, what there's good solutions in C for do regex/substitutions?
<wald0> for example, how i can use strcmp with regex ?
<wald0> or how i can remove the trailing slash from "/usr/local/share:/usr/local/share/:/usr/share/" ?
zorak8 has joined #ruby
m8 has joined #ruby
Lingo__ has joined #ruby
andikr has quit [Remote host closed the connection]
sandelius has joined #ruby
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 255 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dts|pokeball has quit [Ping timeout: 245 seconds]
Rickmasta has joined #ruby
kamilc__ has quit [Quit: Leaving...]
Morkel_ has joined #ruby
kamilc__ has joined #ruby
Lingo__ has quit [Quit: Lingo: www.lingoirc.com]
Morkel has quit [Ping timeout: 264 seconds]
Morkel_ is now known as Morkel
<wald0> damn, im in #ruby, not ##c
VBlizzard has joined #ruby
blizzy has quit [Disconnected by services]
VBlizzard is now known as blizzy
Rickmasta has quit [Ping timeout: 245 seconds]
gfawcettpq has joined #ruby
C1V0 has quit []
sevvie has quit [Read error: Connection reset by peer]
leo-unglaub has joined #ruby
max96at|off is now known as max96at
TrOuBleStArTeR has joined #ruby
charliesome has quit [Quit: zzz]
sevvie has joined #ruby
arup_r has joined #ruby
Flcn__ has joined #ruby
ajaiswal has quit [Remote host closed the connection]
leo-unglaub has quit [Quit: Leaving.]
narph has joined #ruby
msmith_ has joined #ruby
_ixti_ has joined #ruby
lkba has joined #ruby
lkba_ has quit [Ping timeout: 245 seconds]
krz has joined #ruby
Sawbones has joined #ruby
Akuma has joined #ruby
msmith_ has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
charliesome has joined #ruby
Sawbones has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
oo_ has quit [Ping timeout: 265 seconds]
chinmay_dd has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
exile-bot-2 has joined #ruby
gh has joined #ruby
_ixti_ has quit [Ping timeout: 255 seconds]
bMalum has quit [Quit: bMalum]
bMalum has joined #ruby
charliesome has quit [Quit: zzz]
bMalum has quit [Client Quit]
Yzguy has joined #ruby
_ixti_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
Spami has joined #ruby
timonv_ has quit [Remote host closed the connection]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
timonv_ has joined #ruby
gh has quit [Quit: Leaving]
Yzguy has quit [Quit: I'm bouncing outta here!]
Yzguy has joined #ruby
gusto has quit [Ping timeout: 244 seconds]
geppo has joined #ruby
<geppo> !list
exile-bot-2 has quit [Remote host closed the connection]
geppo has left #ruby [#ruby]
exile-bot-2 has joined #ruby
sevvie has joined #ruby
Spami has quit [Ping timeout: 250 seconds]
sevvie has quit [Read error: Connection reset by peer]
evanjs has joined #ruby
<shevy> wald0 yeah ... use ruby!
exile-bot-2 has quit [Remote host closed the connection]
exile-bot-2 has joined #ruby
<Yzguy> rubyyy
exile-bot-2 has quit [Remote host closed the connection]
valeriansaliou has joined #ruby
ta_ has joined #ruby
Flcn__ has quit [Quit: Be back later ...]
blueOxigen has quit [Ping timeout: 255 seconds]
sevvie has joined #ruby
bluOxigen has joined #ruby
exile-bot-2 has joined #ruby
valeriansaliou has quit [Ping timeout: 265 seconds]
doev has joined #ruby
WillAmes has quit [Remote host closed the connection]
WillAmes has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
Hobogrammer has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
valeriansaliou has joined #ruby
valeriansaliou has quit [Excess Flood]
ta_ has quit [Ping timeout: 244 seconds]
joonty has joined #ruby
Cust0sLim3n has quit [Read error: Connection timed out]
Cust0sLim3n has joined #ruby
<TrOuBleStArTeR> can someone explain why ruby would be better than python ?
exile-bot-2 has quit [Remote host closed the connection]
exile-bot-2 has joined #ruby
<apeiros_> its name requires 2 characters less to be typed.
exile-bot-2 has quit [Remote host closed the connection]
exile-bot-2 has joined #ruby
blizzy has quit [Ping timeout: 240 seconds]
<sandelius> apeiros_ that changes everything :)
exile-bot-2 has quit [Remote host closed the connection]
exile-bot-2 has joined #ruby
<apeiros_> ruby IMO has the cleaner OOP model and a nicer syntax. python has better scientific libs afaik.
exile-bot-2 has quit [Remote host closed the connection]
exile-bot-2 has joined #ruby
<apeiros_> tho, pythons py2 vs. py3 divide is an issue.
exile-bot-2 has quit [Remote host closed the connection]
exile-bot-2 has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
exile-bot-2 has quit [Remote host closed the connection]
* apeiros_ exiled the exile-bot
<TrOuBleStArTeR> apeiros lol
<apeiros_> TrOuBleStArTeR: and what did the pythonistas say?
<TrOuBleStArTeR> python keep still robust
{xenomorph} is now known as xenomorph
phutchins has joined #ruby
<TrOuBleStArTeR> yes ruby is a new still syntax simplfied
<shevy> TrOuBleStArTeR ruby is extremely adaptable; for instance take prawn
<TrOuBleStArTeR> but ...
<apeiros_> sandelius: right? it's the little things which matter!
<TrOuBleStArTeR> :)
<shevy> TrOuBleStArTeR http://pastie.org/9809440
<shevy> ignore the wrong indent haha
psy has quit [Read error: Connection reset by peer]
<apeiros_> hash rockets?
<TrOuBleStArTeR> shevy yes, theses king of things are interesting
<apeiros_> shevy, y u still so y2k?
<Yzguy> RUBY
<shevy> TrOuBleStArTeR hmm not sure how the example would look in python
_ixti_ has quit [Ping timeout: 240 seconds]
<Yzguy> its weird coming from python to ruby
<TrOuBleStArTeR> i'm just trying to compare...
<Yzguy> syntax is like "da eff"
<shevy> Yzguy da eff?
<apeiros_> TrOuBleStArTeR: learn both. tell us what you find.
psy has joined #ruby
<shevy> TrOuBleStArTeR well both fill a very similar niche
<apeiros_> (it's not that hard, both languages are more similar than dissimilar)
<TrOuBleStArTeR> apeiros just ruby is a little easier at the moment
<Yzguy> I really want to learn Ruby and be good at it
<Yzguy> I am in a DevOps role so, very helpful
<TrOuBleStArTeR> apeiros iagre, they are lots of similar
<shevy> is Yzguy monologing or something
<Yzguy> yes!
<shevy> :P
<shevy> TrOuBleStArTeR more people use python than ruby
DadoCe has joined #ruby
jherbst has joined #ruby
postmodern has quit [Quit: Leaving]
<TrOuBleStArTeR> yes shevy
<TrOuBleStArTeR> and it's 99% integrated in OS systems
<TrOuBleStArTeR> not like ruby
<shevy> even compiling stuff
<TrOuBleStArTeR> even if it's simple to install interpreter
bronson has joined #ruby
<shevy> I had software of xorg-components break because they were python2 only
<shevy> replace "break" with "failed to compile" with python3 actually :)
<shevy> it annoyed me that I had to compile python2 just because of that
cesarstafe has joined #ruby
<TrOuBleStArTeR> if one day something similar is changing in ruby developpment code, what will you do ? :p
jenrzzz has quit [Ping timeout: 265 seconds]
<shevy> well the thing is
<shevy> ruby will always stay ruby
Criztian has quit []
<shevy> ruby 2.1.5 is still pretty much the very same as ruby 1.8.7 philosophy wise
<shevy> if we'd let's say have some random new guy take over and change ruby into some undefinable morph, probably I would use python
<shevy> but we have matz so there is nothing to worry here
noop has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 240 seconds]
noop has joined #ruby
<godd2> plus we have tenderlove so there is nothing to worry about
soupson has joined #ruby
Akuma has quit [Quit: So long sukkas!]
<TrOuBleStArTeR> :)
<TrOuBleStArTeR> ok
<shevy> TrOuBleStArTeR have you read matz old interview from 2003 about ruby's philosophy yet?
yfeldblum has joined #ruby
jenrzzz has joined #ruby
_5kg has quit [Ping timeout: 255 seconds]
jphenow has quit [Quit: Be back later ...]
yfeldblum has quit [Ping timeout: 264 seconds]
noop has quit [Ping timeout: 245 seconds]
DaniG2k has quit [Ping timeout: 245 seconds]
noop has joined #ruby
_ixti_ has joined #ruby
Yzguy has quit [Quit: I'm sleeping, go away.]
sevvie has quit [Read error: Connection reset by peer]
<TrOuBleStArTeR> shevy not yet
<TrOuBleStArTeR> have a link ?
sevvie has joined #ruby
nfk has joined #ruby
mengu has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
nkts has joined #ruby
gccostabr has joined #ruby
<godd2> mine has it all on one page :P
Takle has quit [Remote host closed the connection]
<matti> ;s
<TrOuBleStArTeR> thx
<TrOuBleStArTeR> ruby and ruby on rails are the smae ?
<matti> O_o
<matti> TrOuBleStArTeR: RoR is written in Ruby.
<TrOuBleStArTeR> matti and what doeas it changes ?
<matti> I shall leave this question to be answered by shevy.
<godd2> TrOuBleStArTeR rails is a bunch of ruby code that makes it so you can make a website
<TrOuBleStArTeR> ok ok
Rickmasta has joined #ruby
<TrOuBleStArTeR> thx
mengu has joined #ruby
jefus_ is now known as jefus
<godd2> shevy haha I'm reading some forum posts regarding that interview
<godd2> "I always hear how ruby is great because it combines the best of perl with OO, and i also agree. what happens when perl6 comes out?"
<godd2> - 2003
Xeago has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
Takle has joined #ruby
paulfm has joined #ruby
wald0 has quit [Quit: Lost terminal]
dr_bob has joined #ruby
jphenow has joined #ruby
sevvie has joined #ruby
jschoolcraft has joined #ruby
<shevy> lol
hvxgr has quit [Ping timeout: 240 seconds]
nonnatus_ has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
valeriansaliou has joined #ruby
valeriansaliou has quit [Excess Flood]
St_Marx has quit [Remote host closed the connection]
valeriansaliou has joined #ruby
St_Marx has joined #ruby
nonnatus has quit [Ping timeout: 255 seconds]
siso has quit [Quit: siso]
ta_ has joined #ruby
Morkel has quit [Quit: Morkel]
hamakn has joined #ruby
raldu has left #ruby [#ruby]
gccostabr has quit [Quit: ZZZzzz…]
ta_ has quit [Ping timeout: 244 seconds]
apurcell has joined #ruby
msmith_ has joined #ruby
_5kg has joined #ruby
JDiggity has joined #ruby
apurcell has quit [Ping timeout: 245 seconds]
msmith_ has quit [Ping timeout: 240 seconds]
_ixti_ has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
Sawbones has joined #ruby
freerobby has joined #ruby
sevvie has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
alex88 has joined #ruby
Sawbones has quit [Ping timeout: 265 seconds]
droidburgundy has joined #ruby
Ilyas has quit [Ping timeout: 255 seconds]
xenomorph is now known as {xenomorph}
soupson has quit [Ping timeout: 245 seconds]
livathinos has quit []
DaniG2k has joined #ruby
arup_r has quit []
{xenomorph} is now known as xenomorph
charliesome has joined #ruby
shredding has joined #ruby
alex88 has quit [Client Quit]
joonty has quit [Quit: Leaving]
alex88 has joined #ruby
s00pcan has quit [Remote host closed the connection]
_ixti_ has joined #ruby
s00pcan has joined #ruby
alex88 has quit [Client Quit]
sinkensabe has joined #ruby
aclearman037 has joined #ruby
kiyote23 has joined #ruby
anarang has quit [Quit: Leaving]
DadoCe has quit [Remote host closed the connection]
silkfox has joined #ruby
nicolastarzia has joined #ruby
Sgeo has quit [Read error: Connection reset by peer]
chinmay_dd has quit [Read error: Connection reset by peer]
Sgeo has joined #ruby
Flcn__ has joined #ruby
xenomorph is now known as {xenomorph}
kiyote23 has quit [Ping timeout: 250 seconds]
silkfox has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
nicolastarzia has quit [Ping timeout: 264 seconds]
haxr has joined #ruby
Deele has joined #ruby
brb3 has joined #ruby
kostitas has joined #ruby
Zai00 has joined #ruby
chinmay_dd has joined #ruby
zorak8 has quit [Ping timeout: 240 seconds]
{xenomorph} is now known as xenomorph
aclearman037 has quit [Quit: I'm out!]
ta_ has quit [Ping timeout: 265 seconds]
nonnatus_ has quit [Read error: Connection reset by peer]
nonnatus_ has joined #ruby
blackoperat has joined #ruby
mercwithamouth has joined #ruby
felltir has joined #ruby
tesaf has joined #ruby
paulfm has quit [Quit: Goodbye]
banister has quit [Ping timeout: 244 seconds]
dblessing has joined #ruby
aclearman037 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
apurcell has joined #ruby
<droidburgundy> how do i specify an exact argument when making a method call in ruby?
<felltir> what do you mean, "exact argument"?
<godd2> droidburgundy can you elaborate/give an example?
egtann has joined #ruby
<droidburgundy> if I wanted to only give foo during the call
silkfox has joined #ruby
<godd2> then just blah(7)
<felltir> that will work for foo, but not bar
<godd2> the 7 will overwrite the default value for foo, and bar will still be nil
<felltir> you need keyword args, I think http://robots.thoughtbot.com/ruby-2-keyword-arguments
sevvie has quit [Read error: Connection reset by peer]
<droidburgundy> ok so what if I wanted to give bar instead of foo
<felltir> then you need keyword arguments
<droidburgundy> blah('',7)
<droidburgundy> ah ok
<felltir> or that, I guess
<godd2> droidburgundy then yea you'd have to do it another way, either with keyword arguments, or some kind of options hash
<droidburgundy> what if I work somewhere where I have to use ruby 1.8.7 :'(
<godd2> so that you odn't have to rely on order
<felltir> then options hash :)
<godd2> droidburgundy you can pass a hash
chinmay_dd has quit [Read error: Connection reset by peer]
<droidburgundy> ah ok
<droidburgundy> will have to go over the other methods then too
<droidburgundy> thanks
<felltir> def blah(args = {}); foo,bar = args[:foo],args[:bar]; end
apurcell has quit [Ping timeout: 244 seconds]
<droidburgundy> options.merge could be my friend
<felltir> hmm
kostitas has quit [Ping timeout: 265 seconds]
<felltir> not convinced godd2, what if that options hash is used elsewhere?
<felltir> you're altering it
<godd2> I'm only alterive values if the key doesnt have one yet
fandi has joined #ruby
<felltir> yeah, but still
sevvie has joined #ruby
<felltir> what if those options are used for two methods, with different defaults on each?
<godd2> I'm not sure what you're implying is wrong with my code
<godd2> I mean, if there is something wrong/bad I'd like to know
<felltir> so imagine that two methods use the same options hash, which is empty
<felltir> in the first, it's empty, so your code alters it
<felltir> in the second, it's no longer empty, so the default values are not applied
<godd2> opts is local to the method call
ItSANgo has quit [Read error: Connection reset by peer]
silkfox has quit [Ping timeout: 256 seconds]
<felltir> unless a hash is passed in
<felltir> in which case it's that object
<godd2> ah I see
Heskie has joined #ruby
ItSANgo has joined #ruby
<godd2> okay lemme go think about it
<waxjar> Hash#merge, ftw!
<felltir> do you want me to make up an example to help?
nonnatus_ has quit [Read error: Connection reset by peer]
krz has quit [Ping timeout: 240 seconds]
cescalante_ has quit [Ping timeout: 240 seconds]
nonnatus_ has joined #ruby
<felltir> yeah, this is why merge is good here :)
<felltir> because it's not merge!
<godd2> ah you're right
<godd2> thank you :_
<godd2> :) *
cescalante has joined #ruby
<felltir> I've been bitten before :) no problem
<droidburgundy> yeah I am reading about merge
<droidburgundy> learning ruby as i go here
<godd2> I have some production code to change...
TrOuBleStArTeR_ has joined #ruby
krz has joined #ruby
rbrs has quit [Quit: rbrs]
giuseppesolinas has joined #ruby
TrOuBleStArTeR_ has quit [Client Quit]
<godd2> man, no wonder keyword args are better
<felltir> yeeeep
<felltir> I was so happy when they came in
<godd2> the easier alternative is opts = opts.dup but of course, that has its clear drawbacks
sevvie has quit [Read error: Connection reset by peer]
<felltir> heh, yeah
<felltir> Merge is just that but easier
<godd2> well actually, would it be so bad?
<godd2> merge makes a new hash anyway
josephndenton has joined #ruby
<felltir> yeah
DLSteve has joined #ruby
<felltir> it's no worse than merge
<felltir> just more verbose
TrOuBleStArTeR has quit [Ping timeout: 240 seconds]
<droidburgundy> why would anyone stay with 1.8.7
<godd2> yea that's true. If I want to be more declarative, then merge is better
<droidburgundy> is updating and managung rvm that much trouble?
<felltir> they really like production security issues?
<droidburgundy> its eol though
haxrr has joined #ruby
<droidburgundy> lol
<felltir> they hate utf-8?
<felltir> idk :p
<godd2> they love hashrockets
<waxjar> the switch between 1.8.7 and 1.9 was quite big i believe. other than that, no idea.
<felltir> we still have hashrockets!
haxr has quit [Ping timeout: 244 seconds]
<waxjar> laziness
<godd2> 1.9 really was a 2.0 kind of change in a lot of ways
<godd2> all except for the name
<felltir> yup
sevvie has joined #ruby
josephndenton has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
bronson has joined #ruby
lxsameer has quit [Quit: Leaving]
icbm has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
Heskie_ has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
Heskie has quit [Ping timeout: 250 seconds]
Heskie_ is now known as Heskie
Hanmac has quit [Ping timeout: 265 seconds]
wald0 has joined #ruby
pyr0commie has joined #ruby
TrOuBleStArTeR_ has joined #ruby
TrOuBleStArTeR_ is now known as TrOuBleStArTeR
TrOuBleStArTeR has quit [Client Quit]
AlSquire has joined #ruby
shredding has quit [Quit: shredding]
shredding has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
Flcn__ has quit [Quit: Be back later ...]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
Hanmac has joined #ruby
hamakn has quit [Remote host closed the connection]
silkfox has joined #ruby
doev has quit [Quit: Verlassend]
rurban has joined #ruby
rurban has left #ruby [#ruby]
Heskie has quit []
apurcell has joined #ruby
jherbst has quit [Read error: Connection reset by peer]
Heskie has joined #ruby
uber_hulk has quit [Quit: leaving]
s7ry93r has joined #ruby
tkuchiki has joined #ruby
egtann has quit []
apurcell has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
ta_ has joined #ruby
josephndenton has joined #ruby
shredding has quit [Quit: shredding]
tkuchiki has quit [Ping timeout: 240 seconds]
shredding has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
freerobby has quit [Quit: Leaving.]
St_Marx has quit [Ping timeout: 250 seconds]
kostitas has joined #ruby
freerobby has joined #ruby
shredding has quit [Client Quit]
j2p2 has joined #ruby
nrsk has joined #ruby
nrsk has quit [Client Quit]
TrOuBleStArTeR has joined #ruby
shredding has joined #ruby
doodlehaus has joined #ruby
d10n-work has joined #ruby
codecop has quit [Remote host closed the connection]
apurcell has joined #ruby
bMalum has joined #ruby
iamjarvo has joined #ruby
silkfox has quit [Ping timeout: 255 seconds]
Heskie has quit []
St_Marx has joined #ruby
sambao21 has joined #ruby
Altonymous has joined #ruby
Nameo0 has joined #ruby
msmith_ has joined #ruby
apurcell has quit [Ping timeout: 255 seconds]
iamjarvo has quit [Client Quit]
<Altonymous> All I have a key/value list of ~6MM items, using redis.. In some cases I’m doing a multi-get lookup on this set for about 250k keys. (I batch them in 1k batches) This is becoming a real performance issue. Does anyone have a good pattern for how I might make this more performant? The keys are random strings and the value is which group that string belongs in.
rbennacer has joined #ruby
yfeldblum has joined #ruby
msmith_ has quit [Ping timeout: 245 seconds]
Sawbones has joined #ruby
Asher has joined #ruby
Heskie has joined #ruby
blizzy has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Client Quit]
<IceDragon> Altonymous: sounds to me thats a redis question, not much of a ruby question
giuseppesolinas has joined #ruby
silkfox has joined #ruby
slawrence00 has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
yalue has joined #ruby
Sawbones has quit [Ping timeout: 250 seconds]
sinkensabe has quit [Remote host closed the connection]
devoldmx has joined #ruby
MarcWeber has joined #ruby
Nameo0 has quit [Ping timeout: 256 seconds]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
Xeago has quit [Remote host closed the connection]
Altonymous has quit [Quit: Altonymous]
diegoviola has joined #ruby
blackmesa has joined #ruby
Xeago has joined #ruby
nicolastarzia has joined #ruby
rbennacer has quit [Remote host closed the connection]
Menorah has joined #ruby
Pupeno has quit [Ping timeout: 255 seconds]
snath has quit [Ping timeout: 272 seconds]
shredding has quit [Quit: shredding]
rbennacer has joined #ruby
oleo has quit [Ping timeout: 250 seconds]
oleo has joined #ruby
nicolastarzia has quit [Ping timeout: 245 seconds]
j2p2 has quit [Ping timeout: 240 seconds]
crueber has joined #ruby
sinkensabe has joined #ruby
behrz has joined #ruby
mikedugan is now known as mikedugan_unzipd
silkfox has quit [Ping timeout: 256 seconds]
j2p2 has joined #ruby
mikedugan_unzipd is now known as mikedugan
silkfox has joined #ruby
revoohc has joined #ruby
felltir has quit []
sevvie has quit [Read error: Connection reset by peer]
kirun has joined #ruby
gr33n7007h has quit [Ping timeout: 264 seconds]
Altonymous has joined #ruby
<Altonymous> IceDragon: I asked in redis, but I think this is more of a logic puzzle then a specific technology.
gr33n7007h has joined #ruby
sevvie has joined #ruby
<bradland> your solution will be a combination of Redis optimization and systems architecture
<IceDragon> first up, you need to get the database access times and then ruby's conversion times before you can be sure its one or the others fault
<Altonymous> I can switch to any tech needed.
paulfm has joined #ruby
<bradland> IceDragon is right. Before you can optimize, you should fully understand what is slow. Time for some profiling.
greenbagels has quit [Ping timeout: 272 seconds]
<Altonymous> I understand what is slow.
_5kg has quit [Ping timeout: 244 seconds]
hydrozen has joined #ruby
Fire-Dragon-DoL has joined #ruby
<Altonymous> It’s an issue on the querying of redis.
fantazo has quit [Quit: Verlassend]
<Altonymous> I don’t think there’s anymore optimizations to be done, aside from sharding the data out to multiple servers
bMalum has quit [Quit: bMalum]
leafybasil has quit [Remote host closed the connection]
<Altonymous> I’m trying to look for a different storage pattern to see if I can query the data more effeciently before I throw more hardware at it
motti74 has joined #ruby
leafybasil has joined #ruby
Flcn__ has joined #ruby
nonnatus_ has quit [Read error: Connection reset by peer]
nonnatus_ has joined #ruby
<motti74> hello
giuseppesolinas has joined #ruby
<Altonymous> The strings are random and I have no control over them. When a new string comes in that doesn’t match a key in redis we iterate over ~500 regex expressions to find a group for it. Once a group is found it is put into redis with the string as the key and the group # as the value.
<shevy> this is starting to sound like a nightmare
Flcn__ has quit [Ping timeout: 244 seconds]
gsd has joined #ruby
m8 has quit [Ping timeout: 244 seconds]
sinkensabe has quit [Remote host closed the connection]
<Altonymous> It most definitely is..
m8 has joined #ruby
ta_ has joined #ruby
silkfox has quit [Ping timeout: 244 seconds]
mrmargolis has joined #ruby
omosoj has joined #ruby
<bradland> when you say you’re using regexp to find a group, is that data part of the string that comes in?
<omosoj> hey guys, i'm having trouble installing ruby 2.1.3 with rvm
<bradland> that’s probably an obvious question, but i want to make sure
rbrs has joined #ruby
<Altonymous> i use the string that is sent in and iterate over a group of approx ~500 regexs When there is a match I stop iterating and use the details for that regex as the value in the key/value pair I insert into redis. The regexs are stored in a postgresql table with the regex and meta data about that “group”
hydrozen has quit [Quit: Computer has gone to sleep.]
<shevy> omosoj looks as if it tries to use a binary
<shevy> does not rvm normally compile from source?
<bradland> what percentage of the total op time is spent on that portion of the work?
bMalum has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
ta_ has quit [Ping timeout: 244 seconds]
<omosoj> shevy, should i add --without-binary?
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<bradland> omosoj: i’d start with `rvm get stable`. it might just be an out of date URL.
<shevy> omosoj don't really know but I think the binary part is weird, even more so as I would assume that you would not have to download rubygems, if you use an up-to-date source ruby
<shevy> rubygems comes bundled with source ruby tarball archives
<omosoj> bradland, what affect does the --without-binary have?
<bradland> Altonymous: the reason i ask is that regex is slow compared to operations like a hash lookup or straight comparisons
<Altonymous> The regex only happens when I can’t find the key in redis
<bradland> omosoj: that will cause rvm to skip the checks for binary versions of the ruby and rubygems applications. which means they’ll compile on your machine.
Zai00 has quit [Quit: Zai00]
<bradland> Altonymous: ok, so that’s not really in the problem domain you’re trying to solve.
weems|mac has joined #ruby
<Altonymous> That is not where the time is spent, the time is in the redis query to look for the keys that match the lists of strings I’m given. I use mget to retrieve them from redis.
Flcn__ has joined #ruby
<Altonymous> Right I was just giving the overall design
DaniG2k has quit [Ping timeout: 250 seconds]
giuseppesolinas has joined #ruby
<bradland> ok, cool
<omosoj> bradlands, hm, what affect does that have? (sorry i don't know very much)
<Altonymous> To help paint a clearer picture of what is going on
<Altonymous> The problem is there are 6MM keys in redis ..
<bradland> yeah, that’s a sizable data set
<Altonymous> I get anywhere from 0 to ~250k keys in a request
nunayerBeezwax has joined #ruby
<electrical> Altonymous: you could try to use the scripting inside redis to have some work in redis done. might be faster.
<bradland> but key lookups is what redis does
<Altonymous> that I need to lookup in redis
<bradland> so, if you’re hitting a performance ceiling, you either need to look at a way to change your key structure so that you can group more easily
<bradland> or you need to start scaling out
kapil__ has quit [Quit: Connection closed for inactivity]
<Altonymous> Yeah and that’s what I’m racking my brain on.. how to better build out he key structure.
<bradland> omosoj: when software is “compiled”, the source code is downloaded and “built” from the source files.
<Altonymous> build out the*
<bradland> the end result is a “binary” (multiple binaries and libraries, actually)
apurcell has joined #ruby
Flcn___ has joined #ruby
<bradland> for common architectures (operating system and processor types), rvm will try to download a pre-compiled set of software, so you don’t have to wait on compilation
mostlybadfly has quit []
<Altonymous> I have a feeling scaling out is the next step, but it would be helpful if I could make sure before asking for more funding...
Flcn__ has quit [Read error: Connection reset by peer]
<bradland> rvm keeps a list of locations for these binaries
mostlybadfly has joined #ruby
<bradland> so the very first thing you should do is run `rvm get stable`, which will update rvm to the latest version
<bradland> this will have the most up to date list of binary locations and build strategies
<omosoj> bradland, ah, i think i understand.
athan has joined #ruby
<bradland> Altonymous: unfortunately, i don’t know a whole lot about redis. can you have multiple keys for a single data node?
<omosoj> i get an error when i do rvm get stable. lol. gpg error :(
<Altonymous> bradland: no problem. Not sure I follow your question.
karmatr0n has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
<athan> Hey folks, does ruby have a module system? I see that gems are a thing, and we can load them with `require "foo"`, but how would one organize an application internally with gems / modules? I see some examples where files themselves are imported, but is there something more semantic and clean for this? I'm trying to load some rails code btw - I'm not sure if there's a standard "boostrapping" system for ruby / module delcaration system that'
<athan> s sound.
Zai00 has joined #ruby
Cust0sLim3n has quit [Read error: Connection timed out]
<bradland> Altonymous: well, what i’m thinking is that if you have grouping strategies, you could create keys based on those groups, then query based on the group instead of just a set of unique keys.
<bradland> the goal being to reduce the set of keys you have to query for.
charliesome has quit [Quit: zzz]
apurcell has quit [Ping timeout: 244 seconds]
Cust0sLim3n has joined #ruby
amil has joined #ruby
<Altonymous> Well the one thought I had was to make a set of more generic regex’s that could narrow down the sets.. but I don’t think it’s going to buy me much other than more complexity
yfeldblum has joined #ruby
ponga has joined #ruby
<Altonymous> I’ve tried thinking about a way to flip the dataset and query by group and then get a list of all “strings” that belong in that have been found for that group..
bronson has joined #ruby
<Altonymous> But the list of “strings” per group can be over 1MM
dkb20k has quit [Remote host closed the connection]
dr_bob has left #ruby [#ruby]
<bradland> yikes
<bradland> time to scale it out
<Altonymous> So I’d have Group X with 1MM keys.. that I would have to iterate over looking for a match
kamilc__ has quit [Ping timeout: 256 seconds]
<nunayerBeezwax> after adding an api wrapper gem to a non-rails ruby project i receive this error "undefined method `logger' for Rails:Module (NoMethodError)" which is generated by the line from the gem "self.logger ||= configuration.logger || (defined?(Rails) ? Rails.logger : Logger.new(STDOUT))" help?
<bradland> omosoj: you’re probably going to need to reinstall rvm
<Altonymous> I tried switching to memcached so I could take advantage of the LRU feature it has by default, since I can’t enable that on our redis instance.. but I got a crazy # of timeouts.. so I had to switch back to redis.
<omosoj> bradland, is that easy? i mean, what happens to all the ruby versions?
DaniG2k has joined #ruby
<omosoj> bradland, okay, think rvm update is working now
krz has quit [Quit: WeeChat 1.0.1]
yfeldblum has quit [Ping timeout: 255 seconds]
boulder-ruby has joined #ruby
<IceDragon> nunayerBeezwax: defined?(Rails) will return true if you have anything that defined a Rails constant (whether it was a class, or module)
ule has joined #ruby
<IceDragon> nunayerBeezwax: Are you using active_support or something from the actionpack?
<bradland> Altonymous: redis sounds like it’s probably the right tool for the job. you’re just hitting the upper boundary of your current architecture’s performance.
bronson has quit [Ping timeout: 245 seconds]
<bradland> athan: depends on what you mean by “module” system. gems are packaged code.
DaniG2k has quit [Client Quit]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
StoneCypher has joined #ruby
DaniG2k has joined #ruby
<athan> bradland: I want to say something that references code
sinkensabe has joined #ruby
<bradland> when you install them, they’re unpacked to a location specified by the rubygems system. they’re available for use in your application because rubygems/bundler alters the load path.
ule has left #ruby [#ruby]
karmatr0n has quit [Remote host closed the connection]
Sawbones has joined #ruby
<athan> bradland: Okay, that makes sense. Internally though, we just import arbitrary files, kinda like PHP?
noname001 has quit [Ping timeout: 245 seconds]
Flcn___ has quit [Ping timeout: 240 seconds]
<bradland> ok, so `require` is what you want
<bradland> what is “requireable” depends on your load path
Heskie has quit [Read error: Connection reset by peer]
<athan> ahh! I see!
<athan> is `.` in the load path by default?
<bradland> not any more
<bradland> it used to be, but it’s a security issue
<bradland> there is require_relative though
<omosoj> hey bradland, looks like it's working. thanks for the help :)
<athan> ahh shoot, so you have to manually add files to the gemfile or something to make them requireable?
Heskie has joined #ruby
ta_ has joined #ruby
<bradland> well, Gemfile is part of bundler
<athan> wow, thanks for the info bradland, that helps a lot
<bradland> i know, this gets to be kind of all over the place
<bradland> but
renderful has joined #ruby
<bradland> at the heart of it all is the load path. you can inspect the load path by looking at the variable $LOAD_PATH
<athan> it's not as bad as Yii on php :P
<athan> ahh! Awesome!
<bradland> Gemfile is part of bundler
<bradland> the docs for bundler are pretty accessible
<bradland> bundler is a layer on top of rubygems
TomyWork has quit [Ping timeout: 250 seconds]
StoneCypher4k has joined #ruby
<bradland> so, at the base you have the LOAD_PATH, which is a list of directories where ruby will attempt to file files specified in `require ‘filename’`
<athan> oh woah, okay, where rubygems is a package organization methodology?
StoneCypher has quit [Ping timeout: 245 seconds]
Pupeno has joined #ruby
Pupeno has joined #ruby
<bradland> rubygems downloads and upacks code to GEM_HOME, and if implemented in your application, makes everything installed there available to require
Sawbones has quit [Ping timeout: 240 seconds]
<athan> ahh okay that makes sense, and bundler makes those packages locally available to your project?
<athan> with `bundle install`?
<bradland> bundler allows you to specify a list of gems required for your application, and provides a toolset for installing and locking versions of gems
<athan> ahh perfect
<bradland> right
<bradland> bundler is a lot more than that though
<bradland> for example, when it comes time to deploy your application, bundler has tools for installing the bundle to specific locations (for server deployments)
tadasp has joined #ruby
<bradland> it’s all very flexible, but there are some conventions
<athan> ahh that's nice!
sevvie has joined #ruby
<athan> we can't make executables with ruby, can we?
<athan> standalone ones?
<bradland> short answer: ruby is interpreted, so you need the ruby interpreter.
<bradland> just like PHP
Yzguy has joined #ruby
<ponga> someone said 'just like PHP' ?
<bradland> but there is a project whose aim is to make standalone ruby executables
<bradland> hahaha :)
* ponga glares
renderful has quit [Ping timeout: 265 seconds]
<athan> that makes sense, I wouldn't doubt some nutty people to compile it thought
<athan> lol
Asher has quit [Quit: Leaving.]
<bradland> i would definitely not start with that though
<bradland> i’d start with a ruby interpreter installed by a ruby manager
<athan> I won't lol
<bradland> ruby developers are very tool oriented
<bradland> it’s common to install many different versions of ruby
<athan> Command-line tool?
<ponga> i use RVM
<bradland> yeah, command line tools for managing all sorts of things
<athan> ahh yeah, I've got rbenv on my rig right now
kasperti_ has joined #ruby
<ponga> i don't hate it
<bradland> ok, yeah. rbenv is one of the ruby managers
<athan> lol
vin` has joined #ruby
<bradland> there are three mainstream ones: chruby, rbenv, and rvm
<athan> I want to port it to the fish shell =\
<bradland> studying a ruby manager is a great way to understand how ruby and rubygems work
<ponga> i only used rvm, is rbenv that good so it seems that pretty much everyone in this channel uses rbenv or source
<ponga> at least to me
<bradland> chruby has become very popular
<ponga> like, everyone is using rbenv here
<bradland> i use rvm
mary5030 has joined #ruby
<bradland> but i’m ambivalent
<ponga> about rvm?
<bradland> about ruby managers in general
<diegoviola> RubySpec is dead?
SixiS has quit [Quit: SixiS]
ajacmac has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
boulder-ruby has quit [Quit: boulder-ruby]
<ponga> bradland: are you one of the folks who believe everything is better when done manually
<IceDragon> diegoviola: yep
<IceDragon> diegoviola: would you like the new article?
<IceDragon> *news
<diegoviola> already have it
<diegoviola> ty
<IceDragon> k
<bradland> ponga: sorry, no. i mean that I don’t have a strong preference for any one ruby manager, but I do think using a ruby manager is a good idea.
<ponga> ah hah
blackmesa has quit [Ping timeout: 245 seconds]
GaryOak_ has joined #ruby
* athan grows a computer organ
* IceDragon gawks @ athan
alecs has joined #ruby
<athan> X_X
<diegoviola> what does the end of RubySpec means for the community
<IceDragon> no more up to date ruby-specing? /bent the words
<bradland> RubySpec is open source.
<IceDragon> what bradland said, some brave soul will take up the torch and carry it on
<bradland> or they won't
<diegoviola> bradland: yes, someone can just fork it and keep improving it
boulder-ruby has joined #ruby
Milos has joined #ruby
<bradland> the maintainer’s complaint is that MRI doesn’t use it to his satisfaction, so the question isn’t what does the end of RubySpec mean, the question is, how does the lack of an accessible Ruby specification affect the Ruby community.
<bradland> Ruby has an ISO spec, btw.
<bradland> Apparently it costs $$ to access it and it’s not up to date.
<IceDragon> you could always get the drafts for free
_5kg has joined #ruby
<IceDragon> or just look at mruby for an idea, since its based off the ISO spec
giuseppesolinas has joined #ruby
shellfu has joined #ruby
apurcell has joined #ruby
<bradland> If you use MRI, the events surrounding RubySpec don’t mean much for you. If you use an alternate Ruby implementation, it means that the maintainers have lost a significant contributor to the process of identifying and documenting the canonical Ruby(MRI) implementation specification.
omosoj has quit [Quit: leaving]
<bradland> upon which they build their language.
<bradland> but as you’ll probably read, some other implementations are able to run the MRI test suite against their own code base.
<bradland> JRuby does this.
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fivetwentysix has joined #ruby
fivetwentysix has quit [Client Quit]
<brixen> raise your hand if you have implemented Ruby and used MRI's tests
<ponga> when would you want to use Jruby over MRI
<ponga> im really asking this
apurcell has quit [Ping timeout: 240 seconds]
<brixen> ponga: you should try it
<brixen> direct experience is worth far more than 874 opinions
<ponga> does Jruby mean ruby is compiled not interpreted like java
<ponga> ok
aef_ has quit [Remote host closed the connection]
aef has joined #ruby
<bradland> to be clear, my comments are not intended to diminish the herculean effort required to maintain RubySpec or the contribution that it has provided.
_Andres has quit [Ping timeout: 264 seconds]
hydrozen has joined #ruby
<ponga> brixen: so for Jruby i just write in ruby ? not like i have to use java methods and syntax inside ruby?
DaniG2k has quit [Quit: leaving]
<IceDragon> ponga: you can import java stuff in your ruby code :3
aclearman037 has joined #ruby
msmith_ has joined #ruby
_Andres has joined #ruby
tus has joined #ruby
<bradland> ponga: You can just write ruby, or you can import java libs. However, you’ll have to use the Java libs’ interfaces, which are often quite different from Ruby libs.
<ponga> ok
<bradland> `rvm install jruby`
<bradland> give it a whirl
snath has joined #ruby
<ponga> im reading my java book again at the moment
<ponga> and apparently i still don't like java
Flcn___ has joined #ruby
msmith_ has quit [Ping timeout: 240 seconds]
basichash has joined #ruby
blackmesa has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Flcn___ has quit [Ping timeout: 245 seconds]
msmith_ has joined #ruby
psy has quit [Remote host closed the connection]
haxrr has quit [Ping timeout: 244 seconds]
<bradland> i’m not crazy about the way most java apps are structured, but jruby is a ruby interpreter, so you needn’t touch any java to use it.
<bradland> it “just works™”
<shevy> needs java
<brixen> until you get a backtrace ;)
<bradland> hahaha
<brixen> you never get those in Ruby though, amirite
<shevy> there are no bugs here
<brixen> ponga: please try Rubinius, too. easiest is to use chruby and ruby-install
<bradland> i was going to say. can’t be much worse than digging through 25 lines of library calls until i get to my app.
<shevy> athan cool you are a fish shell user
_Andres has quit [Read error: Connection reset by peer]
<shevy> I always liked the colourized help in it
<shevy> the only reason why I still use bash really is because I am too lazy to switch
<athan> shevy: The incompatability with bash is the thorn in the heel, but I love it
<shevy> hehe
<athan> yeah haha
<athan> it also has better typing
<athan> like your $PATH variable is actually an array
<athan> and commands are semicolon delimited (idk if bash does this actually)
silkfox has joined #ruby
<JimmyNeutron> Anyone know of any free site that allows multiple people to work on a ruby source code file in real time and run it so everyone can see the output?
psy has joined #ruby
<ponga> damn i need to install java to use jruby?
<ponga> it says broken and asks me to install one
<ponga> installed one, still saying broken
<bradland> er, yeah. there’s that.
ta_ has joined #ruby
<ponga> would i need to restart my mac for this
<JimmyNeutron> Most site I see allows you to edit in real time w/ multiple people, but can't run it online so everyone can see the results.
<ponga> i installed it right but still saying errors
Flcn___ has joined #ruby
<shevy> ponga hehe
<shevy> that is why I dont use java
<athan> JimmyNeutron: Vnc? :s
shellfu is now known as shellfu_coffee
<shevy> JimmyNeutron yeah there is some site
<shevy> some guy pasted a link here like 8 days ago or so
<ponga> shevy: so you don't use jruby?
<shevy> I do not recall what pastie it was
<athan> JimmyNeutron: I'm gonna make one soon, but on haskell :\
<JimmyNeutron> athan, I'm trying to avoid VNC, RDP, etc..
<shevy> ponga nope because of the java requirement
<bradland> ponga: do you have JDK installed?
<ponga> damn it it was jdk?
<ponga> why would it then asked me to install JRE
<ponga> not JDK
<shevy> yeah the larger part
<bradland> JimmyNeutron: I don’t know if any collaborative editing service that allows you to eval.
<shevy> the smaller one is for users but you are becoming a big developer ponga so get the big download!
<bradland> ponga: doh! sry, it probably only requires the JRE.
<bradland> I have JDK because i do some minecraft stuff.
<shevy> :D
<shevy> gamer!
<ponga> bradland: so i installed JRE fine but still saying same error
* ponga still don't like java
<shevy> haha
<JimmyNeutron> Thanks everyone! Guess they have to just save the output and run it locally.
<bradland> i don’t know what the requirement is for jruby JDK/JRE.
hellome has joined #ruby
<ponga> shevy: my first programming exprience was java
<bradland> JimmyNeutron: have you considered using something like a tmux shares session?
<ponga> i don't like it
<shevy> mine was BASIC
<shevy> I actually liked BASIC
<ponga> what?
<shevy> :)
<ponga> my dad's first was like BASIC
<shevy> goto 40
<ponga> how old are you ser
_Andres has joined #ruby
<shevy> I can't say
<bradland> what did you program BASIC on shevy?
<JimmyNeutron> bradland, actually, that's not a bad idea...forgot all about tmux and screen
terlar has quit [Ping timeout: 244 seconds]
<JimmyNeutron> bradland, Thanks!
<bradland> i had a BASIC cartridge for my Atari 400.
<lpaste> athan pasted “Why no run? L:(” at http://lpaste.net/117642
<bradland> you bet JimmyNeutron
<shevy> bradland not much really, I was way too young to program ... I only read the handbook there and typed in the examples mostly
<bradland> same here
<bradland> i was just a kid
<shevy> I think good books are really immensely useful and helpful
<bradland> funny how programs were distributed in books lol
<shevy> yeah
<bradland> my atari 400 had a miserable membrane keyboard
<ponga> why is my jruby still broken after JRE installation :(
<shevy> but it was good! I also learned to use linux with a debian handbook
<bradland> my fingers got so sore
* ponga is disappointed with java again
<shevy> I also had a SuSE Handbook, that only showed the GUI. this book sucked. the debian handbook taught me the commandline
abdulsattar has joined #ruby
<athan> ponga: Why are you trying to get jruby up and running?
ta_ has quit [Ping timeout: 244 seconds]
<bradland> ponga: try this at a term: which java
Flcn___ has quit [Ping timeout: 240 seconds]
<shevy> though the xorg-server would not start hahaha... but that was good, I spent some days just typing in commands
Altonymous has quit [Quit: Altonymous]
<athan> It's benchmarks don't look that impressive :\
mrsolo has joined #ruby
<ponga> bradland: jre 8u25.dmg
<shevy> athan that is only for the initial startup no?
<shevy> once it runs, it is fast
<ponga> athan: because i was told its good that i should try out?
<bradland> ponga: wuuuuut? that’s the output of `which java`?
timonv_ has quit [Remote host closed the connection]
<ponga> ah
<shevy> hehehe
<ponga> at a term
<ponga> sorry wait
<athan> shevy: http://www.isrubyfastyet.com/ This is what I was looking at
<ponga> bradland: /usr/bin/java <- this?
<athan> it's like 10% better :\
<shevy> ponga I think you will not like java tomorrow either ;-)
nonnatus_ has quit [Read error: Connection reset by peer]
<bradland> ponga: ok, cool. just verifying the basics.
<athan> (only on responses)
<bradland> ponga: try this: java -version
<bradland> also at a term
<athan> with my scotty web server, I get 6k responses per second
<ponga> No Java runtime present, requesting install.
<ponga> damn!?
johnnyfivr has joined #ruby
nonnatus_ has joined #ruby
<ponga> what the?
<shevy> athan I think that is not complete
yfeldblum has joined #ruby
shellfu_coffee is now known as shellfu
<athan> and that was a core-2-duo 1G ram machine lol
johnnyfivr has left #ruby [#ruby]
<ponga> i installed JRE fine!
<athan> shevy: I think you're right :\ didn't do much research here
cndiv has joined #ruby
<bradland> ponga: yer java is busted
<ponga> i even have the control panel running fine
<shevy> fannkuch-redux
<ponga> what? my java committed crime? what do you mean busted
<ponga> you mean broken?
cndiv is now known as Guest36266
<shevy> Ruby JRuby720.42 seconds
johnnyfivr has joined #ruby
<shevy> Ruby3,316.17 seconds
<bradland> ponga: yes broken. it’s environment related.
<ponga> so jruby is faster shevy?
<bradland> what OS version?
<bradland> 10.10?
<shevy> ruby 2.1.5p273 vs. jruby 1.7.x something
<bradland> “faster” is relative
michaeldeol has joined #ruby
<bradland> and is a moving target
<shevy> ponga yeah, except for that initial startup time so I think for large programs jruby should be significantly faster all the time
Guest36266 has quit [Client Quit]
<ponga> *uck
<athan> shevy: Oh wow, okay yes this is impressive
<shevy> like big fat ruby-gnome apps!
<shevy> except that noone has written one yet hahaha!!!
<ponga> I hate JAVA so much now
<shevy> ponga well there iso ne good thing about jruby
<ponga> i can't uninstall it smoothly?
<shevy> ponga the idea of shoes GUI
<shevy> this is java man; once you are in, you are in for life. like in the movie fightclub
<shevy> you don't talk about it any longer
<bradland> ponga: in a terminal: echo $JAVA_HOME
<ponga> hey bradland
michaeldeol has quit [Client Quit]
<bradland> heyo
wallerdev has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<ponga> i uninstalled java as website told but it stays in the system preference
<shevy> ponga try out shoes if you get jruby to work though -> http://shoesrb.com/ I used it when it did not depend on java and _why was in charge, it was a GREAT idea
<ponga> :( ugly
fantazo has joined #ruby
<ponga> shevy: i know shoes you taught me
mengu has quit [Remote host closed the connection]
<bradland> ponga: that’s just a preferences pane file in ~/Library/PreferencePanes
<bradland> it’s not indicative of an actual install
<shevy> it's kinda cool because the API is also a bit similar to prawn pdf generation
bricker has joined #ruby
<bradland> just a lazy uninstall tool
<bradland> which java
<bradland> will tell you if there is a java executable on your PATH
<ponga> i uninstalled it now, now installing JDK
yfeldblum has quit [Ping timeout: 255 seconds]
sinkensabe has joined #ruby
diegoviola has quit [Quit: WeeChat 1.0.1]
cndiv_ has joined #ruby
<ponga> god damn it, no permission ?
<ponga> i own this shit , listen to me mac!
GreatDanton has joined #ruby
nonnatus_ has quit [Read error: Connection reset by peer]
nonnatus_ has joined #ruby
valeriansaliou has quit [Quit: Be back later ...]
<shevy> hehe
<ponga> im starting to realise i should never get close to java again
<bradland> erm
<bradland> sounds to me more like an environment issue :P
<ponga> bradland: which java still tells there is java in my mac
<ponga> lol
<bradland> environment issue :P
<bradland> you probably installed java through some other means
bronson has joined #ruby
<ponga> *uck java i didn't install any java after clean install
dkb20k has joined #ruby
<bradland> ls -l /usr/bin/java
<ponga> and i used official dmg
<bradland> see if it’s a symlink
<ponga> lrwxr-xr-x 1 root wheel 74 Nov 23 19:46 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
<ponga> i should have stick to shevy's words
<ponga> that java is evil..
<bradland> phone, be away for a bit
kiyote23 has joined #ruby
<shevy> I'd like to compile java from source using GNU conforming tools
<ponga> ok now i can't even uninstall java properly
* ponga is furious
<ponga> so angry
bronson has quit [Ping timeout: 265 seconds]
cndiv_ has quit [Quit: WeeChat 0.4.3]
Takle has quit [Remote host closed the connection]
ndrei has quit [Remote host closed the connection]
Sawbones has joined #ruby
ponga has quit [Quit: Leaving...]
St1gma1 has joined #ruby
thumpba has joined #ruby
nicolastarzia has joined #ruby
<IceDragon> ponga: just leave it be
<IceDragon> its only Java
diegoviola has joined #ruby
<IceDragon> can't be as bad as me trying to remove haskell after messing up my packages
ndrei has joined #ruby
St1gma1 has quit [Changing host]
St1gma1 has joined #ruby
timonv_ has joined #ruby
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
hydrozen has quit [Quit: Computer has gone to sleep.]
Sawbones has quit [Ping timeout: 240 seconds]
<headius_> ponga: did you get JRuby working?
mrmargolis has quit [Remote host closed the connection]
<ponga> soon
<headius_> Java on OS X is probably the most cumbersome of all platforms, because of Apple making it difficult
headius_ is now known as headius
<bradland> troof
Takle has joined #ruby
ohaibbq has joined #ruby
nicolastarzia has quit [Ping timeout: 255 seconds]
Takle has quit [Read error: Connection reset by peer]
<headius> ponga: this bash function helps me switch Java instances...might be useful to you: https://gist.github.com/headius/143128
Pupeno has quit [Remote host closed the connection]
<ponga> thanks headius
Takle has joined #ruby
<headius> source that and then "pickjdk" command will give you a menu of Java installs and fix up PATH and JAVA_HOME based
<headius> -based
mferrier has joined #ruby
<headius> feel free to stop into #jruby if you still have trouble
Takle has quit [Read error: Connection reset by peer]
michaeldeol has joined #ruby
jmdade has joined #ruby
abdulsattar has quit [Quit: Leaving.]
jottr has joined #ruby
St1gma1 has quit [Ping timeout: 265 seconds]
Pupeno has joined #ruby
Takle has joined #ruby
bMalum has quit [Quit: bMalum]
icebourg has joined #ruby
<ponga> so 'jruby is faster' is not always correct?
<ponga> cos my old and rubbish benchmark is working way faster on mri 2.2.0
<ponga> hm
<ponga> oh but wait, the time to load up the JVM counts too
<ponga> hm
brlkid has joined #ruby
Takle_ has joined #ruby
<bradland> ponga: use benchmark-ips rather than benchmark, and make sure to give it plenty of warmup.
<ponga> ok
Takle has quit [Read error: Connection reset by peer]
<ponga> im surprised bradland still talks to me
<ponga> im so rubbish you know, you could just ignore me
<bradland> hahaha :)
ta_ has joined #ruby
poetazus has joined #ruby
rbirch has quit []
johnnyfivr has left #ruby [#ruby]
nfk has quit [Ping timeout: 255 seconds]
wallerdev has quit [Quit: wallerdev]
jobewan has joined #ruby
Xsploit has joined #ruby
<ponga> shevy:
<ponga> are you there
<ponga> and bradland
Zai00 has quit [Ping timeout: 240 seconds]
<Xsploit> i am looking for a website to parse code, anyone got one that still works?
<ponga> what's this all about ruby and multicore?
<ponga> ruby can't utilise multicore CPU?
ta_ has quit [Ping timeout: 244 seconds]
LouisRoR has quit [Ping timeout: 244 seconds]
<bradland> ponga: i’m here, but on the phone so in and out.
<bradland> MRI Ruby’s interpreter is not the best at utilizing multi-core processors because of its threading architecture.
Parker0 has quit [Ping timeout: 256 seconds]
<ponga> bradland: that was like the best answer to my question thanks
<headius> ponga: if you find a benchmark where JRuby's slower (and it has had appropriate time to heat up), then we would like bugs filed
<headius> JRuby should almost never be slower than MRI
giuseppesolinas has joined #ruby
deryl has joined #ruby
<ponga> headius: or maybe my code was just rubbish
<headius> that's a possibility too :-)
<ponga> also it contained time to start up JVM
<headius> ahh yeah, so if it's only a few seconds to run most of that will be booting
<headius> not really our fault, but we're working on it
<ponga> we're? are you working on Jruby headius
<deryl> he's the main driving force :)
mrsolo has left #ruby ["Leaving"]
<ponga> really?
<ponga> i see
iamninja has joined #ruby
havenwood has joined #ruby
<Yzguy> so do you guys use the ClassName.method or self.method syntax for class methods?
hvxgr has joined #ruby
kasperti_ has quit []
sargas has joined #ruby
<headius> ponga: I work on low-level bits like IO, JIT compilation, threading
<headius> and I make a lot of noise online
Zai00 has joined #ruby
exadeci has joined #ruby
<bradland> ponga: i can’t vouch for the accuracy/quality of this comentary, but you may find this Omniref walk through Ruby Thread and GIL interesting: https://www.omniref.com/ruby/2.2.0.preview1/files/thread_pthread.h#annotation=4057266&line=38
<ponga> thank you bradland
<ponga> but my ruby code won't require that much of speed competetion
sondr3 has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
<sargas> Is the module code at the middle of http://learnrubythehardway.org/book/ex39.html best practice? (I'm talking about all the `def Dict.method` thing)
nonnatus_ has quit [Read error: Connection reset by peer]
bMalum has joined #ruby
Alina-malina has joined #ruby
sondr3 has quit [Client Quit]
deryl is now known as ddd
<havenwood> Yzguy: self
<Yzguy> that's what I was thinking, just in the case you wanted to change the classname later
tlarevo has joined #ruby
<Yzguy> you'd have to go through and change it throughout, not hard with find and replace but
jottr has quit [Ping timeout: 256 seconds]
sondr3 has joined #ruby
kiyote23 has quit [Remote host closed the connection]
magic__ has quit [Quit: Leaving]
it0a has quit [Ping timeout: 256 seconds]
magic__ has joined #ruby
kiyote23 has joined #ruby
jottr has joined #ruby
towski has joined #ruby
shredding has joined #ruby
<towski> >> ENV
sandelius has joined #ruby
<eval-in__> towski => {"LIBC_FATAL_STDERR_"=>"1", "LANG"=>"en_US.UTF-8", "HOME"=>"/tmp/execpad-c6e8dd24fbd0"} (https://eval.in/239043)
<havenwood> sargas: There're several places that code diverges from idiomatic Ruby, for what it's worth.
bronson has joined #ruby
dts|pokeball has joined #ruby
<sargas> havenwood: and the format `def Module.method` is one of them right?
<havenwood> sargas: Yeah, that and the headlessCamelCase, explicit returns, etc.
<sargas> havenwood: the latter were more evident to me... but that method def just bug me so much...
magic__ has quit [Client Quit]
djbkd has joined #ruby
<sargas> is the dot (.) an operator there?
econerd4ever has joined #ruby
luriv has joined #ruby
ohaibbq has quit [Remote host closed the connection]
<sargas> or is it part of the method name?
giuseppesolinas has quit [Quit: This computer has gone to sleep]
ohaibbq has joined #ruby
ponga has quit [Quit: Leaving...]
jottr has quit [Ping timeout: 244 seconds]
<havenwood> sargas: The dot is syntax, it's not part of the method name.
fandi has quit [Read error: Connection reset by peer]
fandi has joined #ruby
<sargas> havenwood: I see, now I'm wondering why the heck would you do that?
kiyote23 has quit [Remote host closed the connection]
<arrubin> sargas: For one, self.method is preferable to ModuleName.method.
sondr3 has quit [Quit: Textual IRC Client: www.textualapp.com]
<arrubin> sargas: But using a module in that manner is bizarre.
yfeldblum has joined #ruby
kh019267 has joined #ruby
<arrubin> It is not clear why he did not just use a class.
kasperti_ has joined #ruby
Flcn___ has joined #ruby
sondr3 has joined #ruby
dopie has joined #ruby
<shevy> sargas one reason for self.method is that should you ever need to move this to another class or module, or rename the class/module, then you dont have to do any additional work
<shevy> so def self.foo will work in all modules and all classes when they are defined in them, def Foo.foo however had will only work for Foo
wallerdev has joined #ruby
brlkid has quit [Ping timeout: 250 seconds]
<arrubin> It looks like classes are covered in the very next chapter.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sargas> so he is building up content just for teaching purposes
poetazus has quit [Remote host closed the connection]
<arrubin> sargas: Yes, but he has 39 chapters of potentially bad Ruby code.
<havenwood> sargas: And teaching Ruby like it's Python.
poetazus has joined #ruby
<sargas> I'm wondering if he is using modules to later explain that classes are modules too
kiyote23 has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
poetazus has quit [Remote host closed the connection]
<sargas> havenwood: exactly!!! He was the one that wrote Learn Python the Hard Way
<arrubin> It seems like he just wants to use modules for organization and does not want to explain self.
iamjarvo has joined #ruby
<sargas> at least for now...
<arrubin> I do not like books that teach languages in a non-idiomatic fashion.
<arrubin> Beginners do not know that they are not seeing idiomatic code.
<sargas> well, now I have peace of conscience knowing I'm not the only one bugged by that syntax
<arrubin> And more experienced people do not need to be shielded from concepts like classes.
<sargas> yeah... so the author perhaps was right when he titled it "Learn Ruby the Hard Way" haha
<sargas> he is truly making it harder in a few aspects
<GaryOak_> "Learn ruby in a way that doesn't make sense"
<shevy> sargas class and modules are very similar in ruby unfortunately
LouisRoR has joined #ruby
<sargas> shevy: I though it was fortunately...
hashpuppy has joined #ruby
<shevy> why
bMalum has quit [Quit: bMalum]
<shevy> when you use a class, you are not able to do include
<shevy> when you use a module, you can not use .new in the sense of instantiating that module as an object
bMalum has joined #ruby
<shevy> >> Module.class
<eval-in__> shevy => Class (https://eval.in/239045)
ta_ has joined #ruby
<shevy> hmm
<sargas> shevy: for me, when I learned how classes worked, then was explained modules are basically classes too (then showed the differences) made a lot of sense to me
<shevy> yeah but precisely
<sargas> >> Class.ancertors
<eval-in__> sargas => undefined method `ancertors' for Class:Class (NoMethodError) ... (https://eval.in/239046)
<shevy> when they are so similar, why are they then different concepts?
<sargas> >> Class.ancestors
<eval-in__> sargas => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/239047)
<shevy> Module is a class too :)
blackoperat has quit [Ping timeout: 244 seconds]
<shevy> >> module Foo; end; Foo.new
<eval-in__> shevy => undefined method `new' for Foo:Module (NoMethodError) ... (https://eval.in/239048)
<sargas> shevy: they aren't right? classes are basically modules that can have intances
<shevy> well ok you can add the method new to a module
rpage has joined #ruby
<arrubin> shevy: And Zed did!
felltir has joined #ruby
<shevy> except that you can not use include with a class sargas
<sargas> arrubin: exactly... I was so bugged by that
<arrubin> But that is actually worse, since it does not behave like a typical Ruby object.
<sargas> shevy: oh, just learned something new
valeriansaliou has joined #ruby
Flcn___ has quit [Ping timeout: 244 seconds]
<shevy> so you always have to make a tradeoff
<sargas> arrubin: the first half of the chapters were really nice... but now that it's getting deeper into the object model, it is getting uglier by the chapter
<shevy> will your top namespace be a module? or a class?
<shevy> class Foo; class Bar
<shevy> in this case, you can do Foo.new just fine on the top namespace
blackmesa has quit [Ping timeout: 240 seconds]
timonv_ has quit [Read error: Connection reset by peer]
<shevy> but then you can not include the Foo namespace
<shevy> well actually come to think about it
<shevy> you can store data in a module, in form of a constant
<shevy> and you can add the method new, so actually that is quite close to how classes work :-)
valeriansaliou has quit [Client Quit]
<shevy> or @ivars too of course
Sawbones has joined #ruby
valeriansaliou has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
<TrOuBleStArTeR> no ftp class ?
<felltir> nope
<TrOuBleStArTeR> :)
kiyote23 has quit [Remote host closed the connection]
<sargas> shevy: isn't the convention that modules are used for organizing namespaces and classes for instantiation?
<felltir> (it moved)
<TrOuBleStArTeR> ok net/ftp
<shevy> sargas I think most people will use a module yes
<shevy> sargas but some will use a toplevel class :-)
<TrOuBleStArTeR> thx all
<wallerdev> happy new year
<wallerdev> :)
<shevy> happy new waller
<felltir> doesn't support sftp, though I think
kiyote23 has joined #ruby
<sargas> wallerdev: likewise
razieliyo_ has joined #ruby
<ddd> but adding that toplevel class is the non standard wheras using a module for namespacing is, correct?
ta_ has joined #ruby
<wallerdev> new years resolution: start a new programming project :D
<wallerdev> maybe a site that matches dogs that need walking based on location so people can walk multiple dogs at once to save time
razieliyo has quit [Ping timeout: 245 seconds]
<ddd> hope your walkers are vetted. need experience ith handling multiple dogs or the dogs will rule the human and you'll end up losing dogs (if more than say 2 or 3 per walker)
<sargas> ddd: that's what I usually practice, but according to shevy not everybody follows that
valeriansaliou has quit [Ping timeout: 244 seconds]
<ddd> sargas: not everyone following means some break from 'standards'. you'll find that anywhere
<ddd> its more of what is the convention
icebourg has quit [Ping timeout: 240 seconds]
<sargas> ddd: true, it is just a convention, if you implement namespacing right, modules or classes are fine
Azure has joined #ruby
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sondr3 has quit [Quit: Textual IRC Client: www.textualapp.com]
<sargas> at least in the Ruby community you can do that without being crucified
St1gma has quit [Remote host closed the connection]
behrz has quit [Quit: Leaving]
ta_ has quit [Ping timeout: 264 seconds]
<arrubin> sargas: His explanations seem entirely too brief for his target audience.
<ddd> i was taught modules were for thinning multiple classes that all use the same behavior by pushing tht behavior into a module and using the module in those classes. wasnt for namespacing etc
St1gma has joined #ruby
<ddd> since ruby only does single inheritance
<arrubin> ddd: It can be used for either.
<sargas> ddd: you're right
<arrubin> s/It/They/
bronson has quit [Remote host closed the connection]
sondr3 has joined #ruby
michaeldeol has joined #ruby
it0a has joined #ruby
<arrubin> They make a lot of sense in some cases. See the Math module.
silkfox has quit [Ping timeout: 265 seconds]
jack_rabbit has joined #ruby
icebourg has joined #ruby
blackoperat has joined #ruby
bMalum has quit [Quit: bMalum]
JDiggity has quit [Quit: Leaving]
Akuma has joined #ruby
apurcell has joined #ruby
retornam has quit [Ping timeout: 250 seconds]
sinkensabe has quit [Remote host closed the connection]
sandelius has joined #ruby
retornam has joined #ruby
pwnz0r has joined #ruby
gfawcettpq has quit [Ping timeout: 245 seconds]
<TrOuBleStArTeR> what's the basic to "call" a class in a main program ?
karmatr0n has joined #ruby
<TrOuBleStArTeR> i'm writing an ftp program
Sawbones has quit [Remote host closed the connection]
<TrOuBleStArTeR> i use the net/ftp
apurcell has quit [Ping timeout: 256 seconds]
<TrOuBleStArTeR> what i must use in my main program to make it works ?
behrz has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<felltir> require 'net/ftp'
<felltir> ftp = Net::FTP.new('example.com')
<felltir> then follow the docs
<TrOuBleStArTeR> thx felltir
<felltir> np :)
sevvie has quit [Read error: Connection reset by peer]
<TrOuBleStArTeR> :P
<felltir> (as I noted before, this is not going to work for SFTP)
<TrOuBleStArTeR> ok, specific class ?
<felltir> not sure what you mean
djbkd has quit [Remote host closed the connection]
<TrOuBleStArTeR> what to do to sftp work ?
<felltir> there's nothing in core, I don't think
behrz has quit [Remote host closed the connection]
<felltir> I use that gem in production, it's solid
qhartman has quit [Quit: Ex-Chat]
<TrOuBleStArTeR> ok ok
<TrOuBleStArTeR> i've got an error
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<felltir> what is the error?
behrz has joined #ruby
<TrOuBleStArTeR> undefined local variable or method anonymous
<TrOuBleStArTeR> like the syntax at the authentification is bad
<felltir> ah yes
<felltir> it is
jottr has joined #ruby
<felltir> you've not put quotes round it
<felltir> so it's not a string, it's a local variable (which there isn't one)
karmatr0n has quit [Ping timeout: 255 seconds]
<TrOuBleStArTeR> ah
<felltir> make sense?
<TrOuBleStArTeR> because i've just see there in documentation
<TrOuBleStArTeR> not yes make sense !!!
<TrOuBleStArTeR> yes
<TrOuBleStArTeR> make sense ...
<felltir> yes, so
ajacmac has quit [Ping timeout: 244 seconds]
<TrOuBleStArTeR> but not read in docs
icebourg has quit [Ping timeout: 240 seconds]
<felltir> the documentation is to tell you the order of the arguments
<TrOuBleStArTeR> not explain
<TrOuBleStArTeR> yes i'm ok
<felltir> you don't need the passwd= bit
<TrOuBleStArTeR> just too noob at the moment :p
<felltir> you'll get there :)
<TrOuBleStArTeR> o:p
<TrOuBleStArTeR> passwd optionnal ?
sondr3 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<felltir> all of the arguments are optional :)
icebourg has joined #ruby
<TrOuBleStArTeR> how do you know this ? i've just read : "the given user name, password, and (optionally) account are used to log in"
<TrOuBleStArTeR> again in the docs :)
kiyote23 has quit [Remote host closed the connection]
<TrOuBleStArTeR> so i think only "acct" was optionnal
<felltir> if the user is given, the given user name, password, and (optionally) account are used to log in
<felltir> note the if at the start :)
Channel6 has joined #ruby
<felltir> so if there's no user, it won't do anything
dts|pokeball has quit [Read error: Connection reset by peer]
<TrOuBleStArTeR> it's because
<TrOuBleStArTeR> on ftp.free.fr
<TrOuBleStArTeR> if you don't use 'anonymous' as user
<TrOuBleStArTeR> the anonymous connection don't wokr
mrmargolis has joined #ruby
Pupeno has quit [Ping timeout: 244 seconds]
dts|pokeball has joined #ruby
sevvie has joined #ruby
chipotle has joined #ruby
icebourg_ has joined #ruby
allcentury has joined #ruby
<felltir> so what you want to do
<felltir> is not pass a user at all
<TrOuBleStArTeR> when i test in ftp.cmd
<TrOuBleStArTeR> ftp.exe cmd
<TrOuBleStArTeR> if i don't put the anonymous in login field
icebourg has quit [Ping timeout: 240 seconds]
<TrOuBleStArTeR> the connection don't succeed
<felltir> I don't know what you mean.
djbkd has joined #ruby
towski_ has joined #ruby
<TrOuBleStArTeR> lol
sinkensabe has joined #ruby
ajacmac has joined #ruby
<TrOuBleStArTeR> if i put a login as empty
<TrOuBleStArTeR> on ftp.free.fr
davedev2_ has joined #ruby
<TrOuBleStArTeR> the auth don't succeed
davedev24_ has quit [Ping timeout: 265 seconds]
<felltir> weird
wallerdev has quit [Quit: wallerdev]
<felltir> it should.
<felltir> I think, at least
<TrOuBleStArTeR> i've tsted, if i put "anonymous" as login, it's works ...
<felltir> ok
phil101 has quit [Ping timeout: 255 seconds]
<TrOuBleStArTeR> another error
<felltir> which is?
<TrOuBleStArTeR> from the FTP SERVER
<TrOuBleStArTeR> 530 can't change fro guest user
<TrOuBleStArTeR> permission error
startupality has quit [Quit: startupality]
<TrOuBleStArTeR> netftpperm error
cmarques has joined #ruby
cazrin has joined #ruby
mattwildig has joined #ruby
<felltir> on which line?
tlarevo has quit [Read error: No route to host]
boulder-ruby has quit [Quit: boulder-ruby]
Cache_Money has joined #ruby
lemur has joined #ruby
phil101 has joined #ruby
tlarevo has joined #ruby
<felltir> ok
behrz has quit [Quit: Leaving]
<felltir> and what happens with just Net::FTP.new('ftp.free.fr') ?
phil101 has quit [Client Quit]
<TrOuBleStArTeR> no error
<TrOuBleStArTeR> but empty line
doodlehaus has quit [Ping timeout: 240 seconds]
<felltir> so ftp.list said nothing?
<TrOuBleStArTeR> yes you're correct
<felltir> change it to "puts ftp.list"
behrz has joined #ruby
<TrOuBleStArTeR> works ...
<TrOuBleStArTeR> lol
gsd has joined #ruby
mikecmpbll has joined #ruby
rpage has quit [Quit: Leaving]
behrz has quit [Client Quit]
<felltir> :D
<felltir> hooray!
<TrOuBleStArTeR> lol
<felltir> glad to help
<TrOuBleStArTeR> ftp.list just retunr anything
<TrOuBleStArTeR> but i was going good
<TrOuBleStArTeR> if i understand
<felltir> yeah
<TrOuBleStArTeR> so "puts" let me see the results
<felltir> yes :)
tvw has joined #ruby
Takle_ has quit [Remote host closed the connection]
<TrOuBleStArTeR> ok thx felltir
kiyote23 has joined #ruby
behrz has joined #ruby
yfeldblum has joined #ruby
mikecmpbll has quit [Client Quit]
<TrOuBleStArTeR> i will still to not reproduce these kind of errors
<TrOuBleStArTeR> :)
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<felltir> good luck!
<TrOuBleStArTeR> thx
PanzerModern has quit [Remote host closed the connection]
michaeldeol has joined #ruby
<bradland> funny Net::SSH story.
yfeldblum has quit [Ping timeout: 264 seconds]
<bradland> once upon a time I was automating some tasks to run against some AdTran media gateway devices, and I decided I’d use Ruby after lots of hair pulling with expect.
kiyote23 has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby
<bradland> so I stub out some basic structure of my automator, and I run it against a single device.
<bradland> all of the sudden, the AdTran just disappears. i can’t see it at its network address at all.
<bradland> i futz around a little bit, and all of the sudden it reappears. so i try again.
<bradland> bewm. gone again.
silkfox has joined #ruby
<bradland> so i call the site where the device is located and have them attach to the serial port.
<bradland> turns out, every time I hit the device with Ruby’s Net::SSH lib, the AdTran would crash, core dump, and reboot.
<bradland> quality hardware.
rpag has joined #ruby
leafybas_ has joined #ruby
leafybas_ has quit [Remote host closed the connection]
BTRE has quit [Quit: Leaving]
anarang has joined #ruby
icebourg has joined #ruby
wald0 has quit [Quit: Lost terminal]
icebourg_ has quit [Ping timeout: 255 seconds]
russt has joined #ruby
fivetwentysix has joined #ruby
iamjarvo has joined #ruby
BTRE has joined #ruby
sleepee has joined #ruby
leafybasil has quit [Ping timeout: 244 seconds]
silkfox has quit [Ping timeout: 265 seconds]
sargas has quit [Quit: Leaving]
msmith_ has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 245 seconds]
valeriansaliou has joined #ruby
mattwildig has quit [Remote host closed the connection]
Flcn___ has joined #ruby
icebourg has quit [Ping timeout: 245 seconds]
valeriansaliou has quit [Client Quit]
felltir has quit []
fryguy9 has joined #ruby
icebourg has joined #ruby
nicolastarzia has joined #ruby
Cust0sLim3n has quit [Read error: Connection timed out]
behrz has quit [Remote host closed the connection]
Cust0sLim3n has joined #ruby
sondr3 has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Flcn___ has quit [Ping timeout: 256 seconds]
jaequery has joined #ruby
wallerdev has quit [Ping timeout: 244 seconds]
tlarevo has quit [Ping timeout: 245 seconds]
antgel has quit [Ping timeout: 244 seconds]
nicolastarzia has quit [Ping timeout: 250 seconds]
tlarevo has joined #ruby
behrz has joined #ruby
Axy is now known as Mia
jaequery has quit [Client Quit]
reset has joined #ruby
tjbiddle has joined #ruby
arup_r has joined #ruby
wallerdev has joined #ruby
jaequery has joined #ruby
noop has quit [Ping timeout: 264 seconds]
Sawbones has joined #ruby
behrz has quit [Remote host closed the connection]
kostitas has quit [Read error: Connection reset by peer]
dain has joined #ruby
bronson has joined #ruby
Takle has joined #ruby
hrs has joined #ruby
dts|pokeball has quit [Ping timeout: 244 seconds]
behrz has joined #ruby
tyfighter has joined #ruby
dts|pokeball has joined #ruby
behrz has quit [Client Quit]
Sawbones has quit [Read error: No route to host]
Sawbones has joined #ruby
Fauch has joined #ruby
<Fauch> ok
byprdct has joined #ruby
<bradland> roger
siso has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
Sawbones has quit [Client Quit]
tkuchiki has joined #ruby
Akuma has quit [Quit: So long sukkas!]
arup_r has quit [Quit: Leaving.]
timonv_ has joined #ruby
tlarevo has quit [Remote host closed the connection]
behrz has joined #ruby
dkb20k has quit [Ping timeout: 265 seconds]
tlarevo has joined #ruby
behrz has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 245 seconds]
fryguy9 has quit [Quit: Leaving.]
<bradland> can anyone provide insight why pstrptime is slower in this use case? https://gist.github.com/bradland/b6a7fa78326485ac201a
<bradland> on jruby, that is
<bradland> i have some shell scripts that parse log files and bin data by period, so there’s lots of string —> date stuff going on
behrz has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<riceandbeans> why are you using jruby?
<bradland> i’m experimenting
<bradland> i’m just curious in this case
fryguy9 has joined #ruby
<bradland> jruby, obviously being not the best choice for scripts because of startup time
dain has left #ruby [#ruby]
thumpba has quit [Remote host closed the connection]
Fauch has quit []
behrz has quit [Remote host closed the connection]
Fauch has joined #ruby
cmarques_ has joined #ruby
fryguy9 has quit [Client Quit]
cmarques has quit []
cmarques_ is now known as cmarques
doodlehaus has joined #ruby
Fauch is now known as Fauch1602
blackmesa has joined #ruby
chrishough has joined #ruby
kiyote23 has joined #ruby
antgel has joined #ruby
timonv_ has quit [Remote host closed the connection]
tobago has quit [Remote host closed the connection]
msgodf has joined #ruby
claymore has joined #ruby
Akuma has joined #ruby
anaeem1 has joined #ruby
ajacmac has quit [Quit: Going offline, see ya! (www.adiirc.com)]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
<mozzarella> guys I need help
behrz has joined #ruby
ajacmac has joined #ruby
yfeldblum has joined #ruby
<mozzarella> if I do
<mozzarella> ruby -e "puts %x(ffmpeg -i '/home/sam/Pictures/People/Selena Gomez/ceZJK85.webm' 2>&1 | grep -P -o '\d+x\d+')"
<mozzarella> it doesn't print anything, however it does print something if I type the command itself
last_staff has joined #ruby
<mozzarella> I don't understand why
Hobogrammer has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
<wallerdev> is there a purpose to run that through ruby lol
omosoj has joined #ruby
poetazus has joined #ruby
<mozzarella> wallerdev: it's just a test case…
<omosoj> what is <=> called?
<wallerdev> comparison operator probably
<mozzarella> I need to use it inside a ruby script
<shevy> omosoj I think you can use it for sorting
mattwildig has joined #ruby
<mozzarella> omosoj: it's called the spaceship operator
<wallerdev> thats the nontechnical term lol
<mozzarella> use it and go to space
kamilc__ has joined #ruby
<bradland> mozzarella: interesting. %x() should return the output of the command.
<shevy> we can implement Ranges with <=>
yfeldblum has quit [Ping timeout: 240 seconds]
<wallerdev> ffmpeg doesnt use stdout i think
<wallerdev> uses like curses
msgodf has quit [Remote host closed the connection]
<wallerdev> to make pretty output
<bradland> wallerdev: he’s redirecting stderr to stdout
<bradland> from ffmpeg
<bradland> and then piping through grep
<bradland> so grep is what should be returning, not ffmpet
<bradland> er ffmpeg
* omosoj gets into <=> and flies away
<shevy> ffmpet!
adriancb has joined #ruby
<shevy> my pet!
<bradland> ffmpeg’s more likeable cousin
<bradland> what’s the -P switch on grep?
amil has quit [Ping timeout: 250 seconds]
<mozzarella> perl syntax
<shevy> that switch makes grep look bad
<shevy> -P, --perl-regexp PATTERN is a Perl regular expression
<ishikawa> matz loves perl
<shevy> matz is not always right
<bradland> mozzarella: try wrapping in popen and capture stderr and stdout
<shevy> I mean, ruby is the better perl
<bradland> see if the data is being written to stderr for some reason
jaequery has joined #ruby
<diegoviola> the drama is still going strong I see
<shevy> not really
jaequery has quit [Client Quit]
<mozzarella> oh shit
<mozzarella> I know!
Akuma has quit [Quit: So long sukkas!]
<shevy> if you pump air into a balloon it'll be a mighty huge balloon but it will still have only air inside diegoviola
<bradland> sry mozzarella, open3, not popen
<diegoviola> shevy: and?
<shevy> diegoviola give the balloon time to shrink and it'll be back to its normal state soon enough!
antgel has quit [Ping timeout: 245 seconds]
<bradland> my preference would be that the channel try to be open-minded and focused on productive conversation on that topic
<mozzarella> I need to double escape \d's because you can have escape characters in %x
Synthead has quit [Remote host closed the connection]
<bradland> mozzarella: hrm, not sure how that’s relevant to the open3 suggestion
<bradland> %x() returns the contents of what was written to stdout when the enclosed command is executed
<bradland> so, if for some reason the command doesn’t write to stdout, you’ll get nothing
shredding has quit [Quit: shredding]
<bradland> however, at your terminal, you’ll see the output, because the default destination of stderr for interactive sessions is your tty
shellfu is now known as shellfu_foodmayb
<bradland> open3 is a library that allows you to execute commands *and* capture both stdout and stderr
<bradland> although, i don’t know why grep would be writing to stderr to begin with
tjbiddle has quit [Ping timeout: 250 seconds]
it0a has quit [Ping timeout: 240 seconds]
shredding has joined #ruby
__main__ has quit [Ping timeout: 265 seconds]
<shevy> the *open* variants are all rather confusing
<shevy> Popen3 Popen4 Popen65
<shevy> Popen-1 !!!
<bradland> welcome to “shelling out” for fun and profit
Atrumx has quit [Quit: exit]
tjbiddle has joined #ruby
jottr has joined #ruby
jaequery has joined #ruby
timonv_ has joined #ruby
banister has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv^ has joined #ruby
<mozzarella> I found teh bug
<bradland> what was it?
econerd4ever has quit [Remote host closed the connection]
<mozzarella> as I said, %x allows escape characters and the \d's were seen as escape characters
gsd has joined #ruby
<mozzarella> so I had to double escape them
<bradland> oh, sry
<bradland> when you said that earlier, i thought you meant that you already had
<bradland> didn’t scroll back
<bradland> mozzarella: i often use %q() for command string construction to avoid such circumstances
pwnz0r has quit [Remote host closed the connection]
godd2 has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 250 seconds]
<bradland> shevy: open3 is pretty straight forward: http://pastie.org/9810068
studiotate has joined #ruby
Flcn___ has joined #ruby
<shevy> hmm
sleepee has quit [Quit: Leaving]
timonv_ has quit [Ping timeout: 245 seconds]
<shevy> bradland the stdout there, that is not $stdout right?
<bradland> right
<bradland> it’s the contents of stdout from the cmd
<bradland> the vanilla system, ``, %x() commands all deal with the output of stdout only
poetazus has quit [Remote host closed the connection]
matchaw has quit [Remote host closed the connection]
it0a has joined #ruby
leafybasil has joined #ruby
djbkd has quit [Remote host closed the connection]
Flcn___ has quit [Ping timeout: 250 seconds]
apurcell has joined #ruby
tvw has quit []
revoohc has quit [Quit: revoohc]
ohaibbq has quit [Ping timeout: 265 seconds]
<waxjar> system "returns" the exit status (true for 0, false for other)
anaeem1 has quit [Read error: Connection reset by peer]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leafybasil has quit [Ping timeout: 245 seconds]
apurcell has quit [Ping timeout: 244 seconds]
<bradland> derp
<bradland> good point
anaeem1_ has joined #ruby
felltir has joined #ruby
sondr3 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ebanoid has joined #ruby
Fauch1602 has quit [Ping timeout: 245 seconds]
kiyote23 has quit [Remote host closed the connection]
davedev2_ has quit [Ping timeout: 256 seconds]
Xeago has quit [Remote host closed the connection]
kiyote23 has joined #ruby
revoohc has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
kiyote23_ has joined #ruby
kiyote23 has quit [Remote host closed the connection]
kiyote23_ has quit [Remote host closed the connection]
davedev24_ has joined #ruby
arietis has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eightyeights has joined #ruby
kiyote23 has joined #ruby
sonOfRa has quit [Quit: Bye!]
kiyote23_ has joined #ruby
Calmoto has quit [Ping timeout: 255 seconds]
JBreit has joined #ruby
kiyote23 has quit [Remote host closed the connection]
sevvie has joined #ruby
kiyote23_ has quit [Remote host closed the connection]
ohaibbq has joined #ruby
Spami has joined #ruby
siso has quit [Quit: siso]
<bradland> holy cow
sonOfRa has joined #ruby
fivetwentysix_ has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
<eightyeights> holly berry
PinkAstronaut has joined #ruby
<bradland> so, here’s a very straight forward example of why being able to dip in to Java libs has its advantages
<bradland> JODA
fivetwentysix has quit [Ping timeout: 256 seconds]
fivetwentysix_ is now known as fivetwentysix
eightyeights has quit [Client Quit]
<bradland> JODA is over 2.5x faster than Ruby’s std-lib Time#strptime
it0a has quit [Quit: WeeChat 1.0.1]
<shevy> yoda?
<shevy> the small green fighter thingy?
it0a has joined #ruby
<bradland> i, of course, assumed that’s how they pronounce it
<PinkAstronaut> hi
<felltir> hi
sevvie has joined #ruby
<PinkAstronaut> i'm looking for something to work on tonight..
thumpba has joined #ruby
claudiuinberlin has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheMoonMaster_ is now known as TheMoonMaster
shellfu_foodmayb is now known as shellfu
nunayerBeezwax has quit [Remote host closed the connection]
bronson has joined #ruby
arietis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rbrs has quit [Quit: rbrs]
<shevy> PinkAstronaut start a project in ruby
<felltir> PinkAstronaut: what kind of thing?
psyton_ has joined #ruby
thumpba has quit [Ping timeout: 240 seconds]
sevvie has joined #ruby
<PinkAstronaut> i'm just bored of working on personal projs
psyton_ is now known as psyton
<PinkAstronaut> if u kno what i mean
<felltir> ?
bronson has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
last_staff has quit [Quit: last_staff]
lxsameer has joined #ruby
lxsameer has joined #ruby
evanjs has quit [Remote host closed the connection]
<PinkAstronaut> thanks
diegoviola has quit [Remote host closed the connection]
ta_ has joined #ruby
arietis has joined #ruby
iamjarvo has joined #ruby
<havenwood> PinkAstronaut: you could write a Hobbit extension (https://github.com/patriciomacadden/hobbit-contrib) or a Roda plugin (https://github.com/jeremyevans/roda#plugins).
<havenwood> i think there're some low-hanging fruit there
sevvie has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
<shevy> lol
<shevy> Hobbit
Cyberheb has joined #ruby
djbkd has joined #ruby
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
Nameo0 has joined #ruby
itadder has joined #ruby
dotix has joined #ruby
shellfu has quit [Ping timeout: 245 seconds]
lemur has quit [Ping timeout: 240 seconds]
DonOtreply has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
djbkd has quit [Ping timeout: 265 seconds]
shellfu has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
jphenow has quit [Quit: Lingo: www.lingoirc.com]
cpt_yossarian has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby
deryl has joined #ruby
jobewan has quit [Quit: Leaving]
duncannz has joined #ruby
ddd is now known as Guest21792
codecop has joined #ruby
deryl is now known as ddd
kh019267 has quit [Read error: Connection reset by peer]
davedev24_ has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
davedev24_ has joined #ruby
valeriansaliou has joined #ruby
Guest21792 has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 240 seconds]
lemur has joined #ruby
Fauch1602 has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
cpt_yossarian has joined #ruby
hephaestus_rg has joined #ruby
ta_ has joined #ruby
msmith_ has joined #ruby
Xeago has quit [Remote host closed the connection]
<basichash> How do I add an hour to Time.now?
dh64 has joined #ruby
<basichash> e.g. I want to find the time five hours from now, something like Time.now.hours("+5")
<arrubin> basichash: Time.now + seconds
<felltir> 2.2.0 :001 > Time.now
<felltir> => 2015-01-02 21:07:38 +0000
<felltir> 2.2.0 :002 > Time.now + (60 * 60)
<felltir> => 2015-01-02 22:07:39 +0000
<eam> basichash: this is actually a super complicated question. If you want a super simple answer, just add the number of seconds
<eam> but that will not be correct around a number of corner cases
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<arrubin> When would it not be correct?
<basichash> heh, i thought ruby would be able to handle this easily?
valeriansaliou has quit [Ping timeout: 265 seconds]
<eam> leap seconds
<eam> basichash: *nothing* handles time easily
bweston92 has joined #ruby
<bweston92> I have 2 services one written in Ruby and one written in PHP with Laravel. My Laravel application handles authentication and customers data-storage. My Ruby application requires and authentication token (the user would get this after logging into the Laravel app) this token is then sent with all requests to the Laravel application to obtain data. U
<bweston92> nfortunately I've got a Ruby worker also that needs to talk to the Laravel API and get customer information at any given point. What is the best way to give this service a "master" token for the worker? Would I just make a authentication token and give it admin rights, does anyone have any resources on this?
<eam> unless you can disregard corner cases in which case it's pretty easy in ruby
mferrier has quit [Ping timeout: 256 seconds]
<arrubin> It is unlikely that he is doing anything where leap seconds matter.
<eam> arrubin: thus "if you want a super simple answer"
<arrubin> I assumed that there were more "corner cases".
<felltir> DST
<eam> DST isn't a corner case here
<bradland> DST is a localization issue
riceandbeans has quit [Quit: leaving]
<eam> yeah
<arrubin> Time.now already includes timezone.
<arrubin> Should not be an issue.
jottr has joined #ruby
<GaryOak_> bweston92: just treat the ruby worker like a user and have them call the login system, or hard code a key
ta_ has quit [Ping timeout: 265 seconds]
<bradland> basichash: if you’re doing science, worry about leap seconds. otherwise, add seconds.
<basichash> ok thanks
fantazo has quit [Quit: Verlassend]
<eam> basichash: if you're using rails, Fixnum gets methods to convert numbers to for example 1.days
<bweston92> GaryOak_ you think that would be ok to give them a super user as such?
nunayerBeezwax has joined #ruby
<bradland> bweston92: in a general sense, you want to adhere to the principle of least priviledge.
<GaryOak_> You can setup a worker user type and give them just the privs it needs
arietis has quit [Quit: Textual IRC Client: www.textualapp.com]
<bradland> so if the app is making requests on the behalf of an identity that exists in the provider API, you should impersonate that identity, not give “super user” access
jobewan has joined #ruby
<bweston92> bradland: Ok, so just certain permissions to certain scopes?
<bradland> ideally, it would adhere to the scope defined by the permissions of the user
<basichash> eam: perfect, exactly what i was looking for
<bradland> so, if you have a user in the Laravel app, you have some kind of authorization definition, right?
<bradland> when that user transitions to the Ruby app, you want to preserve that identity, so you can use the same authorization definition
lemur has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 255 seconds]
<bweston92> I do that using headers and then Ruby gets that header and obtains the token and sends it to the Laravel app when it needs the data
<bradland> this is based on the assumption that the Ruby app is acting as an agent for users
<bweston92> The worker is like a totally separate process
lemur has joined #ruby
blizzy has quit [Ping timeout: 240 seconds]
<bradland> the process architecture is separate from the security architecture
<bradland> you can pass information around between processes
Flcn___ has joined #ruby
<bradland> what you want to do is look at what the Ruby app is doing
<bradland> is it acting as an agent for users?
<bweston92> Slightly, it is getting information about "orders" for example at certain stages
Sid05 has joined #ruby
<bradland> ah, ok.
<bweston92> It's also got to pass FCA approval in the UK
leafybasil has joined #ruby
<bradland> i re-read your second message.
yalue has quit [Quit: return 0;]
Azure has quit [Quit: My MBP went to sleep.]
<bradland> doe sthe Ruby “worker” interact with users?
GaryOak_ has quit [Ping timeout: 245 seconds]
<bradland> or is it simply doing some work and storing the results back in the Laravel app?
lemur has quit [Ping timeout: 244 seconds]
<bradland> i don’t understand why the user gets access to the token
GaryOak_ has joined #ruby
<bradland> is why i’m asking
dkb20k has joined #ruby
Flcn___ has quit [Ping timeout: 245 seconds]
<bradland> where possible, you want to centralize your authorization defonition, so that have a single source of truth for who can access what
aclearma_ has joined #ruby
zorak8 has joined #ruby
Musashi007 has joined #ruby
chrishough has joined #ruby
aclearman037 has quit [Ping timeout: 240 seconds]
<bweston92> bradland: The Ruby application when used by HTTP (a RESTful API) allows users to set-up reminders for there customers (The user sends authentication token for this so we can get their firm details). The Ruby worker runs through each of these daily, whilst going through each reminder set up it needs to get the customers for each user that meet a cer
<bweston92> tain criteria (that was set by the user)
<bweston92> their customers*
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
itadder has quit [Ping timeout: 244 seconds]
blizzy has joined #ruby
djbkd has joined #ruby
dkb20k has quit [Ping timeout: 265 seconds]
<bradland> sry, i’m really struggling to get a complete picture of what’s going on there (because I’m a slow learner). maybe someone else has done something similar and can offer advice.
paulfm_ has joined #ruby
paulfm has quit [Ping timeout: 255 seconds]
riceandbeans has joined #ruby
riceandbeans has joined #ruby
tjbiddle has joined #ruby
thumpba has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
bronson has joined #ruby
<bweston92> bradland its ok I think I'm just trying to be to complicated :)
hashpuppy has quit [Ping timeout: 244 seconds]
carvantes has joined #ruby
it0a has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
Yzguy has quit [Quit: I'm sleeping, go away.]
rbennacer has quit []
Xeago has quit [Remote host closed the connection]
bweston92 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
devoldmx_ has joined #ruby
rbennacer has joined #ruby
devoldmx has quit [Ping timeout: 244 seconds]
Fauch1602 has quit [Ping timeout: 245 seconds]
narph has quit [Quit: Connection closed for inactivity]
bronson has quit [Ping timeout: 255 seconds]
blackoperat has quit [Remote host closed the connection]
icebourg has quit [Ping timeout: 240 seconds]
aston_ has joined #ruby
rbennacer has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
<aston_> Hello everybody.
josephndenton has quit [Ping timeout: 256 seconds]
icebourg has joined #ruby
rbennacer has joined #ruby
davedev2_ has joined #ruby
ta_ has joined #ruby
davedev24_ has quit [Ping timeout: 255 seconds]
Musashi007 has joined #ruby
nfk has joined #ruby
<mozzarella> guys, I do "format.js { render('_post', post: post) }"
Musashi007 has quit [Client Quit]
econerd4ever has joined #ruby
<mozzarella> but it says ActionView::Template::Error (undefined local variable or method `post' for #<#<Class:0x007f738056d718>:0x007f738090da08>):
<mozzarella> what am I doing wrong
<aston_> I am brand new to programming and have decided to pick up Ruby as my first language. My programming goals are, most importantly, to create a 2d rpg similar to the old Final Fantasy games, and eventually learning web development skills as well with Rails. I just downloaded Ruby 1.9.3 and Rails 4.2.0 along with the Dev Kit. When I installed the devkit in the command prompt, Everything installed properly but then I get an error.
<cazrin> mozzarella: is there a variable called "post" within scope of of your controller action?
jordanm has joined #ruby
bMalum has joined #ruby
<mozzarella> cazrin: yes
<cazrin> are you sure? :D
<aston_> "ERROR: While generating documentation for actionpack - 4.2.0
<mozzarella> and the error comes from the template, not from the controller
<aston_> Has Rails successfully installed, or is this going to be a problem?
<cazrin> ah yeah good point
<terrellt> aston_: Rails is great for web development, ruby may not be the best place to start if you want to make a 2d RPG.
<cazrin> is there a partial that isn't being passed a local variable?
hrs has quit [Quit: Textual IRC Client: www.textualapp.com]
<mozzarella> cazrin: what do you mean?
dotix has quit [Read error: Connection reset by peer]
decoponio has quit [Quit: Leaving...]
<jordanm> I am a bit confused by the behavior of reduce. when I use mystr.split(//).reduce do .... it starts with the second element, but mystr.split.reduce("") do ... iterates over the entire array. what is happening with the first example?
<terrellt> mozzarella: render :partial => :post, :locals => {:post => post}
dotix has joined #ruby
yfeldblum has joined #ruby
<aston_> terrellt: What would you recommend instead? I want to make indie games, so I don't think that I need the highest performance languages like C++
Heskie has quit []
<cazrin> mozzarella: what terrellt said ^ if you're rendering a partial then you'll need to pass it local variables
ta_ has quit [Ping timeout: 244 seconds]
<alecs> Hello! Is there any Gem that i could use to check if my app is upgradable from ruby 1.9.3 to ruby 2.0 ? or 2.2 ?
<mozzarella> terrellt: thank you, though I think it used to work…
<mozzarella> I think it works inside views
<aston_> What programming language would be best for an newbie who plans on creating a 2d rpg game AND getting into web development down the road? Or would I need to learn 2 different languages?
<jordanm> alecs: just run the test suite with the different ruby versions?
Heskie has joined #ruby
<shevy> aston_ probably javascript
<cazrin> aston_: you should take a look at Unity (www.unity3d.com)
bMalum has quit [Client Quit]
fivetwentysix has quit [Quit: fivetwentysix]
Musashi007 has joined #ruby
<shevy> unity requires a windows machine or?
<alecs> jordanm: thanks, but unfortunately no test suite :|
<cazrin> aston_: JavaScript is probably the only thing that crosses the boundary of both, and you can make some good stuff with Phaser (phaser.io), but they are two very different skill sets IMO
<terrellt> cazrin: There are various better solutions - usually written in C, C++, C#, Java (? I think)
wolf4ood has joined #ruby
<cazrin> shevy: pretty sure there's a Mac client
<jordanm> alecs: sounds like it wasn't designed to be changed :)
<jordanm> there is no linux client for the web player
<jordanm> the non-web unity engine works on linux, with some bugs
davedev2_ has quit [Ping timeout: 245 seconds]
<aston_> cazrin: I actually have Unity installed and I planned on learning C# (I bought a book on both C++ and C#), but I've seen theen been told that I should use a more beginner friendly language, so I haven't gotten too far.
<jordanm> rust is an example of a modern game that uses it
<shevy> well if you know C# then using a simpler language is always easily possible anyway
<GaryOak_> aston_: you could try javascript with unity
<sweeper> kerbal space program \o
<terrellt> I think you can do JS with Unity.
<cazrin> it's TypeScript, which is effectively JS
<terrellt> I've heard you have to drop down into C# or whatever fairly often though.
<shevy> aston_ and after you know both C# and JS, come to ruby ;)
<aston_> Yeah, I believe it is called UnityScript
<zenspider> ruby does 2d games quite well with gosu. I'm not fond of the latest version because it doesn't just work out of the box on gem install, but it is still really easy to get up and running on
<zenspider> aston_: ^^
yfeldblum has quit [Ping timeout: 264 seconds]
<jordanm> I came at a bad time. games are much more interesting than my dull question :)
<zenspider> (older gosu gems would install and immediately run, which was nice when doing demos to newbs)
Yzguy has joined #ruby
Heskie has quit [Read error: Connection reset by peer]
tyfighter has quit [Quit: tyfighter]
<cazrin> aston_: if you have experience in neither subject (games or web), at this point I would just focus on one and worry about the other one later. Experience in one of them is going to help you down the road if you decide to switch anyway. Don't try and do both at the same time
<aston_> zenspider: See, this is why I am hesitating on what language to start with. I get one person saying Ruby and another person saying Javascript, then another person saying I should just learn C++ for games and then PHP for web..
<zenspider> jordanm: `ri Enumerable.reduce`
Heskie has joined #ruby
<zenspider> aston_: you'll ALWAYS get different answers to any such question
russt has quit [Quit: russt]
<sweeper> aston_: if you want to do web, just don't use vanilla rails as it tends to induce bad OO habits :v
nunayerBeezwax has quit [Remote host closed the connection]
timonv^ has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 240 seconds]
<shevy> well
<GaryOak_> haha here we go!!!
<terrellt> aston_: It's subject specific. If you want web, there's recommendations, 2d games, that's a vastly different subject space.
<sweeper> 2000 line models, hurra
<zenspider> "best" is a bullshit subjective thing and everyone has an opinion
<terrellt> sweeper: I don't think 2000 line models are a recommendation. ;)
claw_ has joined #ruby
davedev24_ has joined #ruby
<shevy> aston_ pick any really :) - you can transition from javascript into ruby or back quite easily; C# I found harder because it did not seem to be that much fun, that is why I think you should start with C#, you can pickup both JS and ruby easily lateron
<aston_> sweeper: Well, I intend to learn web as a way to make money on the side when I get off work or something, or possibly even get a job doing it so I don't have to work at McDonalds lol.
<sweeper> terrellt: no, but I have a strong suspicion that rails somehow makes people do that
russt has joined #ruby
<terrellt> sweeper: Programming makes people do that. OO's hard.
<aston_> But gamedev is why I gained an interest in programming in the first place.
<zenspider> rails doesn't induce 2000 line models any more than any other framework / language. you can write shit in anything.
claw has quit [Ping timeout: 245 seconds]
<jordanm> zenspider: "Nothing known about Enumerable" - i guess I don't have the docs installed
<shevy> aston_ I don't think anyone here has recommended php yet hehe
<jordanm> it really isn't clear which package in debian would contain them either
<zenspider> jordanm: you should fix that. ri is fantastic.
<sweeper> I dunno man, I just feel that way. don't harsh on my feels
<zenspider> assuming you used rvm, there's some command to do it
timonv_ has joined #ruby
<terrellt> Only people in #php will recommend PHP, and even then...
<aston_> shevy: No, but my friend has.
<GaryOak_> aston_: my friend who doesn't know anything about making games or programming started using gamemaker and built something awesome
<shevy> aston_ but he knows php? and if so, does he know python or ruby?
<zenspider> jordanm: to answer your q, the basic API is:
<zenspider> enum.inject(initial) { |memo, obj| block } -> obj
<zenspider> enum.inject { |memo, obj| block } -> obj
<sweeper> if you want to really stretch your brain and have something catchy on your resume, there's always Go
<zenspider> if you don't provide initial, it takes the first element
rbennacer has quit [Remote host closed the connection]
<terrellt> Need to start doing more with Go.
<shevy> Go Go then!
<aston_> shevy: He knows php and has a bachelors I believe in CS. He doesn't know python or ruby. He also lives in Chile if that means anything haha.
<sweeper> I mean, that will at least enforce you to write things concurrently, which is the name of the game these days
<jordanm> zenspider: ah, I see now. thanks
<sweeper> s/en//
brb3 has quit [Quit: Textual IRC Client: www.textualapp.com]
icbm has quit [Quit: Computer sleeping]
<terrellt> aston_: I was a PHP programmer for a long time. The point at which you feel like an above average PHP programmer, you're leagues below a competent any-other-language web developer. That's been my experience at least.
<jordanm> is foo.split(//), foo.split("") or some other way the "preferred" method?
<shevy> aston_ nope, no idea about Chileans; but I assumed he did not know python or ruby. I used php years ago, I abandoned it in favour of ruby. But I would also recommend python. So both python and ruby would be fine, you should be able to do everything that php does in either of these two languages, but both have a much better design than php really
jottr has joined #ruby
<sweeper> jordanm: why bother?
<ddd> zenspider: rvm docs generate
<sweeper> >> "foo"[0]
<eval-in__> sweeper => "f" (https://eval.in/239080)
iamjarvo has joined #ruby
<jordanm> sweeper: yes, but strings do not have reduce()
jobewan has quit [Quit: Leaving]
Vile` has joined #ruby
<jordanm> I didn't look very closely for an equivalent string method though
<TrOuBleStArTeR> hi
<TrOuBleStArTeR> wich is the best method
thumpba has quit [Remote host closed the connection]
<TrOuBleStArTeR> to have argument
<shevy> .bicker!
icarus has joined #ruby
<TrOuBleStArTeR> i want to create a ruby for linux
<shevy> ok sort your mind first mate
<TrOuBleStArTeR> ruby script
<sweeper> and, check if string inherits from enumerable
thumpba has joined #ruby
<TrOuBleStArTeR> like ftp [host] [port]
<TrOuBleStArTeR> and a ftp -h
<zenspider> jordanm: split(//) is my preferred
<terrellt> Psh
<zenspider> I always have to think about empty string.
<terrellt> >> "foo".each_char
<eval-in__> terrellt => #<Enumerator: "foo":each_char> (https://eval.in/239081)
<terrellt> Reduce that.
<sweeper> TrOuBleStArTeR: ARGV provides an array of arguments, but if you want more complicated things, there are frameworks available
<aston_> Thank you all for the help. Now I'm stuck between Ruby and Javascript. I want whichever is going to set me up to do both game dev and web (which I believe is both). Hmm....Well, I like the Ruby logo and I want to put a Ruby sticker on my brand new laptop, so I guess I should learn Ruby! ^_^
<jordanm> terrellt: perfect, thanks
<terrellt> Lol, aston_ ftw.
<zenspider> TrOuBleStArTeR: if you want options as in flags, then optparse. Otherwise just use ARGV straight
<TrOuBleStArTeR> sweeper i'm ont it actually, i just was wondering if exist others methods
Heskie has quit [Read error: Connection reset by peer]
<terrellt> I printed 3D rubies for my ruby developers, you should get one. https://pbs.twimg.com/media/BtFvCNsCIAA7dCj.jpg:large
<TrOuBleStArTeR> ok ok thx
<zenspider> terrellt: were you the speaker at rubyconf with the big one?
<terrellt> TrOuBleStArTeR: Look into docopts, it's glorious.
<aston_> terrellt: Whatttt??? How do I get one??
<terrellt> zenspider: Nah.
<zenspider> kk
<terrellt> aston_: Find a 3d printer!
<felltir> terrellt: that's pretty cool
Heskie has joined #ruby
thumpba has quit [Remote host closed the connection]
<aston_> terrellt: I've never used one of those. Now I have to find the nearest one!
<shevy> terrellt what is that material? paper?
pwnz0r has joined #ruby
<TrOuBleStArTeR> terrellt it's ruby too ?
<terrellt> Nah, plastic.
<terrellt> Printed from a makerbot.
drjfreez1 has left #ruby [#ruby]
<TrOuBleStArTeR> okkk
<terrellt> I work at a University Library - we have...four now
<terrellt> 3D printers, two are makerbots
davedev2_ has joined #ruby
testcore has joined #ruby
rbennacer has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
duncannz has quit [Ping timeout: 240 seconds]
<bradland> aston_: keep in mind that you’re going to be learning two things at once: a programming language, and how to program.
malcolmva has quit [Ping timeout: 250 seconds]
davedev2_ has joined #ruby
<bradland> much of what you learn about how to program will be transferrable to other areas, but it takes time.
davedev24_ has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
Azure has joined #ruby
lxsameer has quit [Quit: Leaving]
anarang has quit [Quit: Leaving]
omosoj has quit [Ping timeout: 256 seconds]
last_staff has joined #ruby
<aston_> bradland: Yeah, that is why I thought that a high level language would be my best bet. I can learn the logic behind coding and then switch syntax semi easily when I need to move to a more efficient language. I don't want to start with C++ right away because it would just make the learning that much harder, plus I probably don't need that kind of performance for a turn based 2d rpg.
Xeago has quit [Remote host closed the connection]
<aston_> One last question to push me over to the Ruby side so that I can get started. I may have already asked a question similar to this, but I didn't get the kind of answer I was looking for.
<terrellt> You'll learn what makes a good program with ruby, which is great. We also have the best testing toolsets, so that's pretty awesome.
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<aston_> With Ruby (and Gosu or any other frames), can I make a small/medium sized 2d turn based rpg?
<bradland> Gosu is literally a 2D game development library. So yes, that is its express purpose.
aclearma_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cazrin> aston_: you can probably make a 2D turn-based RPG yeah, but please don't start there :) make some basics like snake/pong etc. first to get a handle on the framework
<aston_> I understand that it may have some hiccups, but it would be doable, right? I mean, I'm sure that Ruby can't be that slow that a game like that would lag hardcore.
<bradland> heh
<bradland> lag
<bradland> in 2D games, you don’t typically see lag.
<aston_> cazrin: Ok, that was my plan anyway. I am going to work my way up from Pong until I feel comfortable starting my rpg.
<bradland> you should get used to deconstructing generalizations like “lag” as well
<bradland> lag can mean many different things
<bradland> rendering frame rate drops
<aston_> bradland: I know, but I hear that it is slow and framerates may drop. I'm just making sure that it won't be super bad.
<bradland> network latency issues
<bradland> framerates in 2D games aren’t really an issue
Musashi007 has quit [Quit: Musashi007]
<bradland> on modern hardware anyway
<bradland> modern *desktop* hardware
<aston_> bradland: I'm sorry. Like I said, I am a complete beginner. I have done some research, but that is about it.
<cazrin> aston_: I still think you might be better served with JS rather than Ruby, but getting started is better than doing nothing at all (www.phaser.io is essentially like Gosu but for JS - though better IMO)
athan has quit [Remote host closed the connection]
<bradland> i’m kind of with cazrin
<bradland> the problem with developing a gosu game is that very few people will be able to enjoy it
apurcell has joined #ruby
<bradland> because they’d have to install ruby
shredding has quit [Quit: shredding]
<bradland> applications you develop in JS run in a web browser, which is kind of the ultimate distribution platform
<sweeper> yea. JS has definitely attracted a lot of "low barrier to entry" projects
<bradland> web browsers are everywhere
PinkAstronaut has quit [Read error: Connection reset by peer]
<aston_> cazrin: bradland But I really want to put a Ruby sticker on my laptoppppp :( And I can't do that if I don't know Ruby!
rbennacer has quit [Remote host closed the connection]
<cazrin> if that's your goal then I can't help you :P
revoohc has quit [Quit: revoohc]
diegoviola has joined #ruby
<bradland> pretty solid felltir
<aston_> JS isn't strictly for web dev then?
<felltir> nope
<aston_> (Pardon my ignorance)
<felltir> it's a really flexible language :)
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bradland> what do you define as “web dev”
<felltir> it works in browsers yes, but with things like Node.js, it's viable serverside too.
<bradland> because lots of games are deliverd through web browsers
<aston_> Designing and coding websites
<felltir> if you want a browser based game, javascript is a good idea.
keen__________22 has quit [Read error: Connection reset by peer]
<bradland> that’s it’s most common use case, for sure, but I would argue that Javascript is one of the most diverse (in terms of usage) languages in use right now
__main__ has joined #ruby
apurcell has quit [Ping timeout: 240 seconds]
<bradland> the upside of a browser based game is that you can upload the files to a web server and anyone can see/play your game
<bradland> the upside of develping a game in ruby is that you get to program in ruby instead of javascript :)
yfeldblum has joined #ruby
keen__________22 has joined #ruby
<aston_> *sigh* I was kind of hoping that you Rubyists would sway me to use Ruby, not JavaScript... (/.\)
<bradland> it depends on what you want
iamjarvo has joined #ruby
malcolmva has joined #ruby
<bradland> never trust someone who will blindly steer you one direction
<aston_> A Ruby sticker. :)
<bradland> gosu is a good option
<bradland> but you should understand the pros and cons
<aston_> Is deployment the only big con to Ruby?
<felltir> aston_: for a ruby sticker, try doing something more simple than a game, like a basic gem :)
<aston_> As well as JS being slightly faster.
<felltir> just to get to grips with the language
<bradland> eh
<bradland> the whole “faster” thing is a red herring
<bradland> your 2D RPG isn’t going to suffer performance issues under ruby or javascript
<aston_> felltir: Ahhh, good idea! Maybe I can just print "Hello World" and slap a Ruby sticker on my laptop to show the world that I have mastered that language!
weems|mac has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<bradland> there you go
<bradland> you’ll be as good as me at that point lol
<felltir> aston_: you're already there!
dc_ has quit [Remote host closed the connection]
<felltir> >> print "hello world"
<eval-in__> felltir => hello worldnil (https://eval.in/239087)
<aston_> puts "Hello World"
<felltir> :O
<aston_> Isn't it puts?
<bradland> prefix with >>
cazrin has quit [Remote host closed the connection]
<felltir> pro rubyist right here
<bradland> puts includes newline, print doesn't
Flcn___ has joined #ruby
<bradland> >> puts “hello world"
<aston_> Ok, so puts is Java's println and print is Java's print?
<bradland> dunno much about Java, but sure! :)
karmatr0n has joined #ruby
rbennacer has joined #ruby
<aston_> lol
<felltir> (yes)
snath has quit [Ping timeout: 240 seconds]
<aston_> Does anybody have a project that they would let a newbie like myself hop on? I need to be adopted.
<aston_> I think I'm going to choose Ruby first, and then JavaScript. I'm going to need to learn both anyways, once I get into web dev at least.
<felltir> is that the goal?
Spami has quit [Quit: This computer has gone to sleep]
<shevy> aston_ I think most projects require a bit of knowledge first
<felltir> http://tryruby.org/ is okay to get started, if you're ok with a heavy dose of whimsy
<shevy> aston_ my first project was an IRC bot in ruby. you could try to start it by aligning input (what is said in a channel) to a reaction of the bot (what the bot may say)
<aston_> The goal is just making games for fun. Not selling them or anything (unless I find out that I am really good at making them..). Web is just a side option for me so that I can maybe get a job in the computer field, or at least make a few extra bucks deving sites for people
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Flcn___ has quit [Ping timeout: 245 seconds]
josephndenton has joined #ruby
rbennacer has quit [Ping timeout: 265 seconds]
test__ has joined #ruby
test__ has quit [Client Quit]
test__ has joined #ruby
test__ has left #ruby [#ruby]
silkfox has joined #ruby
<bradland> aston_: do you program in Java?
<aston_> bradland: I have a little, yes. By a little I mean I have used cases and nested cases to create a short and simple text adventure.
<TrOuBleStArTeR> Excuse me, i'm here : http://ruby-doc.org/stdlib-2.2.0/libdoc/optparse/rdoc/OptParse.html , how to understand what's do the "options = {}" in the minimal exemple ???
mrmargolis has quit [Remote host closed the connection]
dc has joined #ruby
<shevy> TrOuBleStArTeR that is a hash
<shevy> >> {}.class
<eval-in__> shevy => Hash (https://eval.in/239092)
<aston_> I started off with Java (and own Headfirst Java), but have been hopping languages ever since because I'm scared that I will not choose a language that will suit my needs.
<shevy> it is empty. fill it with data
<bradland> aston_: cool. just curious if you had any background.
bluOxigen has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
<TrOuBleStArTeR> shevy where it's explain ?
<aston_> bradland: A little. I've messed around with a few languages, but I feel like Ruby is the most fun so far. Either Ruby or Python. Most people seem to use Python so I want to use Ruby lol
<aston_> Plus the little logo is cooler. :p
<bradland> TrOuBleStArTeR: Hash is a core Ruby class. It’s documented on the ruby-doc.org site as well, under Core
snath has joined #ruby
cjm_ has joined #ruby
<TrOuBleStArTeR> bradland ok thx
<TrOuBleStArTeR> thx shevy
<felltir> aston_: I've pinged you some more stuff
paulfm_ has quit [Quit: Goodbye]
sevenseacat has joined #ruby
djbkd has quit [Remote host closed the connection]
claymore has quit [Quit: Leaving]
weems|mac has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
<cjm_> Hi Folks, I'm getting abused by Ruby! I know just enough about it to get in trouble, which I have. I need to run "bundle install --path vendor/bundle --without development,test" and I must do it as root, which upsets bundler, but I have no choice. I am getting a complaint: "The path `.../vendor/gems/cache_digests-0.1.0` does not exist. Wasn't yum install rubygems supposed to do that?
sinkensabe has quit [Remote host closed the connection]
Xeago has joined #ruby
silkfox has quit [Ping timeout: 244 seconds]
tekk has joined #ruby
sinkensabe has joined #ruby
msgodf has joined #ruby
TrOuBleStArTeR has quit [Quit: Going offline, see ya! (www.adiirc.com)]
davedev2_ has quit [Ping timeout: 244 seconds]
jefus_ has joined #ruby
josephndenton has quit [Ping timeout: 245 seconds]
pwnz0r has quit [Remote host closed the connection]
Spami has joined #ruby
<zenspider> cjm_: #bundler ?
silkfox has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<cjm_> zenspider, I'm not sure what you want to know...
Xeago has quit [Remote host closed the connection]
jefus has quit [Ping timeout: 244 seconds]
<zenspider> cjm_: as in, this question might be better suited for #bundler
<cjm_> zenspider, Oh, ... Well I like to start with the top dog. (-:
<cjm_> zenspider, Thanks.
<Yzguy> Hello
davedev24_ has joined #ruby
<bradland> Yzguy, hi. Have a question or just stopping by?
<Yzguy> eh, I was gonna ask for a tall order but I guess I'll keep it to myself
<felltir> ahah
<felltir> ask away
<Yzguy> I'm starting to get into ruby, so as a little project i was going to rewrite this python project I did
<Yzguy> and I want to do it in an OOP fashion rather than procedural
djbkd has joined #ruby
<Yzguy> I unfortunately struggle with breaking out of the procedural mindset
elaptics is now known as elaptics`away
<bradland> Yzguy: What kind of app is it?
<bradland> Command line?
<Yzguy> kinda yeah.
<cjm_> Hi Folks, Can anybody tell me anything about "cache_digest", like who creates it and who uses it?
<bradland> Yzguy: that’s a nice simple little script you could rebuild in Ruby
<shevy> Yzguy well, a simple way is this: you can keep on thinking procedural, but also think of attaching the procedural code onto classes that govern the behaviour. For instance: User.login
<bradland> It’d be a good one to refactor to an OOP app too because it’s so simple.
mrmargolis has joined #ruby
<shevy> Yzguy in the worst case, you could put all procedural code into one huge class too :)
<bradland> Ruby script OOP patterns range from really simple, to modular and sophisticated.
<zenspider> Yzguy: then start with procedural... it'll still work... you can move in babysteps to OO
sinkensabe has joined #ruby
<Yzguy> I guess that would be good.
<bradland> Start by wrapping the entire thing in a class with a single method named run
lemur has joined #ruby
<bradland> Then at the bottom of the script, call that method to run the app.
<bradland> From there, you just start refactoring
<Yzguy> hmm, I like that workflow.
<Yzguy> okay, I shall give it a try!
<Yzguy> thanks
charliesome has joined #ruby
<jordanm> it seems odd that in ruby it's idiomatic to not use "return", but it's the opposite in perl
valeriansaliou has joined #ruby
siso has joined #ruby
timonv_ has quit [Remote host closed the connection]
<shevy> jordanm nono, you can use return
<zenspider> shevy: he said idiomatic and he's right
<shevy> jordanm the problem is; when it is not required, people like to omit stuff
<zenspider> jordanm: ruby gets more readable the smaller the code goes. perl is the opposite. :)
startupality has joined #ruby
<shevy> zenspider I use return a lot
<cjm_> felltir, Man, I don't understand how that applies... Apparently there is suppose to be something in "cache_digests", but I don't know what, not why it is not there... Seems like I have not properly installed something, but what?
<eam> zenspider: no way
mbug has joined #ruby
<zenspider> shevy: yes. and you don't write idiomatic ruby.
<eam> IMO it's the opposite, the larger the program is the more I'd rather it be written in perl vs ruby
<shevy> zenspider yes and I don't care about what you say, please don't interrupt
TheRinger has quit [Read error: Connection reset by peer]
TheRinger has joined #ruby
<zenspider> shevy: interrupt? we're in a public channel and we're having a public discussion. shove it.
<eam> it's the small trivial bits of syntax where ruby is more clear
<bradland> Yzguy: here’s a simple stub script for you with my general starting point for scripts:
<shevy> eam why?
<shevy> zenspider yeah and I was talking to him not to you
<zenspider> writing non-idiomatic ruby isn't a bad thing... it's just non-idiomatic
<jordanm> sorry, I didn't intend to start a flame war
<shevy> jordanm no it's fine, it's a difference of opinion
<eam> shevy: because of ruby's over-use of global constructs like monkeypatching objects
<arrubin> eam: You mean trivial bits like parameter handling?
<Yzguy> perfect, thank you! bradland
<shevy> eam you mean when others can change core classes and such?
<zenspider> eam: haha. really? You think once it hits a size threshold it would be better in perl not ruby?
sevvie has quit [Read error: Connection reset by peer]
<eam> zenspider: yeah
<zenspider> eam: got any examples?
<eam> well not anything public, most of what I've done in perl is closed source but I've worked on large projects
<zenspider> jordanm: ignore him. it's not even opinion. the idioms are known. published even. he's just got a bug up his ass for some reason.
<eam> the thing is for a large program what's most important is the architecture
<shevy> eam I think that problem can be solved eventually, not sure whether through refinements or something else, I would assume that it was acknowledged when ruby core thinks about it
<eam> and encapsulation
<eam> ruby has a lot of practices that involve global state changes
<eam> (like adding a method to a class)
<zenspider> eam: sure. but why do you think that perl supports architecture and encapsulation better than a pure OO approach?
<jordanm> eam: you can do that in python too
<zenspider> (where I mean, everything is an object, all objects have classes, everything is a message send, etc)
<eam> zenspider: I think it's less a matter of what can be done and more a matter of what is convention
<shevy> jordanm take writing styles like: "def foo bar" versus "def foo(bar)" people who prefer the first variant often dislike having to type the two () characters
studiotate has quit [Quit: Computer has gone to sleep.]
<eam> jordanm: sure, and you can do it in perl
<eam> it's just that people don't
gregf has joined #ruby
<zenspider> eam: interesting... I haven't written any perl professionally for ... ~15 years or so. I don't know what current practices look like.
ebanoid has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality_ has joined #ruby
valeriansaliou has quit [Ping timeout: 265 seconds]
felltir has quit []
<eam> there's not a whole lot of difference imo
s7ry93r has quit [Ping timeout: 264 seconds]
<eam> other than perl having a lot of scary syntax and weird old behaviors
<zenspider> eam: what's the current "OO Way™" in perl these days? it isn't just plain blessed hashes like it used to be, is it?
studiotate has joined #ruby
thumpba has joined #ruby
<eam> zenspider: to be honest it's been a few years for me too, but Moose is what folks are using I think
<arrubin> zenspider: Moose.
startupality has quit [Ping timeout: 264 seconds]
startupality_ is now known as startupality
weems|mac has quit [Quit: bai]
sevvie has joined #ruby
aston_ has quit [Quit: Page closed]
<eam> the last perl project I worked on was a packaging system that had to support a range of about two decades of perl/unix versions on multiple platforms so we mostly did things the old way, and it was pretty much fine
<eam> there's dumb boilerplate and so on but you put in a convention and it's no big deal
<zenspider> moose... I think I just bought a ketone meter from them.
mrmargolis has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
lemur has quit [Remote host closed the connection]
<zenspider> not sure if it's the same moose
<zenspider> I don't read swedish :)
lemur has joined #ruby
thumpba has quit [Ping timeout: 255 seconds]
<eam> zenspider: I'm really not critiquing ruby vs perl so much as oo vs non-oo design styles
crueber has quit [Quit: Leaving.]
<Yzguy> haha, just spent a couple minutes confused by an ArgumentError, because I spelled initialize wrong
<zenspider> oh god. did perl add python style comprehensions?
<zenspider> eam: I get it
<eam> I prefer only a little bit of oo paradigm where especially appropriate
<zenspider> Yzguy: initialise ? I do that periodically :)
rubie has joined #ruby
havenwood has quit []
<Yzguy> initalize :P
josephndenton has joined #ruby
<rubie> hi all: im a beginner and was wondering if anyone could critique my code or show me how to make my hangman game better https://github.com/gabrie30/Practice/tree/master/Projects/Hangman
Sid05 has quit [Ping timeout: 265 seconds]
banister has quit [Read error: No route to host]
<shevy> rubie there is still the problem of @@art
<jordanm> rubie: check out exercism.io. I am doing the ruby problems on that currently, and have got some really helpful critique
icarus has quit [Remote host closed the connection]
claudiuinberlin has quit [Quit: Leaving.]
<rubie> shevy: i know everything i've tried has failed
<rubie> i've tried putting in a method
mrmargolis has joined #ruby
<shevy> Yzguy happened to me too... took me minutes to figure out why "def intialize" is wrong
lemur has quit [Ping timeout: 265 seconds]
<rubie> i've changed how its intiialized
<rubie> i dont even know what to google to get help
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<Yzguy> @jordanm that is perfect, just what I'm looking for
dkb20k has joined #ruby
<GaryOak_> rubie: you could try requiring it and setting it as a constant???
mbug has quit [Ping timeout: 256 seconds]
shellfu is now known as shellfu_food
<shevy> rubie ah I see what you mean. As GaryOak_ wrote, just make it a constant instead
<shevy> from @@art to ART for instance
<rubie> right
<shevy> or perhaps call it IMAGE or something
<rubie> but isnt' that doing the same thing as a class variable, since there is only one class
<arrubin> rubie: Is the value constant or variable?
<rubie> i was going to try a hash
<shevy> well you just put data into an Array
<GaryOak_> You aren't going to dynamically modify the artwork, so it's constant throughout your code
<rubie> do you know why an instance variable doest work?
dkb20k has quit [Ping timeout: 240 seconds]
<shevy> rubie class variables would more naturally seem to be used when you need to have a class variable across all classes
<shevy> rubie well define it in a method
<shevy> and call that method; you set it outside any method right now
msgodf has quit [Remote host closed the connection]
<shevy> look at your class; you initialize instance variables in def initialize; end scope
cesarstafe has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 265 seconds]
josephndenton has quit [Ping timeout: 244 seconds]
<rubie> i've tried calling it @art and initializing it a few times, then i would get undefined method `[]' for nil:NilClass (NoMethodError) this error
<shevy> rubie but you did not put it into a method right?
<rubie> i bet its because of the order
<rubie> no i tired putting in a method
<shevy> then it must work, if you call the method before you use it the first time
Spami has quit [Quit: This computer has gone to sleep]
byprdct has quit [Ping timeout: 250 seconds]
karmatr0n has quit [Remote host closed the connection]
Ankhers has quit [Remote host closed the connection]
MrSparkle has quit [Quit: doin good]
thumpba has joined #ruby
karmatr0n has joined #ruby
<rubie> `<main>': private method `images' called for #<HangmanGame:0x007fddc9894230> (NoMethodError)
TripTastic has joined #ruby
<Yzguy> does File.read close the file at the end?
mrmargolis has quit [Remote host closed the connection]
<eam> Yzguy: maybe!
<eam> or sorry, yes. But File.open.read is maybe
<eam> zenspider: I forgot, this is another reason I like perl for large programs - refcounting vs gc
<shevy> rubie so you had a method that was private
<rubie> should i wrap the def images in a HangmanGame class?
<shevy> Yzguy, not sure but I guess you can use the block form? File.read('test.txt') { }
<rubie> i dont know how else it will know that the def images method belongs to the HangmanGame class
<shevy> it should then be closed at the } ... at least that should work for File.new, not sure if File.read too
<eam> shevy: read() should close before returning
<eam> does it even have a block form?
JBreit has quit [Ping timeout: 250 seconds]
<eam> (it does not)
karmatr0n has quit [Ping timeout: 256 seconds]
jmdade has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pkrzywicki has joined #ruby
pkrzywicki is now known as noname001
<bradland> Yzguy: File.read comes from IO. you probably don’t want that though.
<bradland> It depends on what you wan tto do with th efile.
<Yzguy> well I need to read the whole file because it's a markdown tempalte
bashusr has quit [Read error: Connection reset by peer]
<Yzguy> So open markdown template, convert it to markdown
<bradland> ah, ok then… you do want the whole thing :)
<Yzguy> I keep typing function names with colons haha
siso has quit [Quit: siso]
<Yzguy> by accident,
blackmesa has joined #ruby
banister has joined #ruby
<Yzguy> my end goal is too at least remove the CSV file part for data, and use a database
banister has quit [Max SendQ exceeded]
fryguy9 has joined #ruby
loopj has joined #ruby
<shevy> Yzguy if you need it in array form, you can use File.readlines()
<Yzguy> but the whole project is to get more use to ruby, do some OOP, and testing stuff
mattwildig has quit []
claptor has joined #ruby
<Yzguy> then I'd like to do Rakefile, etc.
Sid05 has joined #ruby
<rubie> shevy: does this look better?
<loopj> I have a gem that still needs to support ruby 1.8, is there a good way to specify a dependecy on the json gem for people with 1.8.x only?
<loopj> I don't want people to have to install the json gem for 1.9+ since it comes with 1.9
Nameo0 has quit [Ping timeout: 245 seconds]
mbug has joined #ruby
bashusr has joined #ruby
alkoma has joined #ruby
<zenspider> eam: refcounting is a drawback imo. slower overall performance (gc book by richard jones) and cyclic islands stay alive.
riceandbeans has quit [Ping timeout: 240 seconds]
<eam> hard to see the argument for slower, a huge portion of my day job is dealing with large (mostly java) apps in gc death throes
riceandbeans has joined #ruby
<eam> I haven't read jones but I suspect he isn't considering ten or hundred gig sized heaps
<eam> there's a scaling factor there
alkoma has quit [Remote host closed the connection]
dotix has quit [Ping timeout: 244 seconds]
<eam> islands are an issue but refcounting at runtime doesn't exclude optionally using a gc for debugging
<eam> IMO it's a matter of determinism
<shevy> rubie yeah a bit
<rubie> anything else that you think could improve this?
<shevy> rubie yeah
<shevy> rubie you do this:
<shevy> game = HangmanGame.new(0, puzzle)
<shevy> game.images
<eam> zenspider: this book? LMK before I hit "buy" and expense it :) http://www.amazon.com/Garbage-Collection-Algorithms-Automatic-Management/dp/0471941484
tyfighter has joined #ruby
<shevy> you should move the call to images() into the HangmanGame class
MrSparkle has joined #ruby
<shevy> then you do no longer have to call it manually on your own
<rubie> move it to the initialize function
cmarques has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: last_staff]
<shevy> rubie for example
<shevy> rubie I sometimes call a bundled method from initialize() that will have the logical steps
<Yzguy> this is what I got so far
<shevy> rubie but the main gain is that you no longer have to manually invoke it like you currently do
djbkd has quit [Quit: My people need me...]
<rubie> ya it works if i just put images in the initialize function
phutchins has quit [Ping timeout: 255 seconds]
<shevy> Yzguy looks ok so far or?
<Yzguy> I think it does, just making sure I can open the files
<Yzguy> with some checking :P i didn't do that really in the other one
<shevy> if that is like your first ruby code written then that is quite amazing
SOLDIERz has joined #ruby
<Yzguy> it kind of is :P except for example code
<Yzguy> I have done a lot of Python, PHP, Java, etc so the concepts aren't super new but
<shevy> yeah
ta_ has joined #ruby
<shevy> your code is already grouped up into logical chunks
davedev2_ has joined #ruby
<Yzguy> I'd love to get this working just plain ruby, then work on getting it into a Rails application
DLSteve has quit [Quit: Leaving]
rkalfane has joined #ruby
<rubie> shouldn't ruby be able to find the @art variable without calling the method or putting images in the initialize function?
davedev24_ has quit [Ping timeout: 265 seconds]
<shevy> rubie well, why should it know?
gigetoo has quit [Read error: Connection reset by peer]
<shevy> I mean the @variable is not known until you would access it
<shevy> so in your images() method, you define it for the first time
<Yzguy> I work with Puppet at my job, which is Ruby. So it will help with that too :)
<rubie> because @ art is an instance variable in the class
<shevy> sure, but where do you initialize it?
<rubie> which is available throughout the class
<shevy> sure, but where do you initalize it ...
<shevy> ;)
<shevy> damn it
<shevy> I wrote initialize wrong again
<shevy> rubie you could initialize it in "def initialize" as well
<shevy> and let the method images() return the Array that contains the ascii art
<rubie> should i do the same thing with the game.covered_word
<zenspider> eam: it's probably a bit dated by now, but it is very good.
anaeem1_ has quit [Remote host closed the connection]
<zenspider> and in the world of GC, things don't move too fast.
kiyote23 has joined #ruby
<shevy> rubie yeah, the idea is that, if you do Foo.new, it will work without having to do anything else
Soda has joined #ruby
Soda has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 265 seconds]
loopj has quit [Quit: Page closed]
recurrence has joined #ruby
dc has quit [Read error: Connection reset by peer]
<rubie> ok
<rubie> thanks for your help!
dc has joined #ruby
<shevy> you could even provide a readable method to start the hangman game
<shevy> like: HangmanGame.start or something like that
adriancb has quit [Remote host closed the connection]
davedev2_ has quit [Ping timeout: 244 seconds]
apurcell has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
davedev24_ has joined #ruby
recurrence has left #ruby [#ruby]