apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p286: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
stephenjudkins has joined #ruby
apeiros has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 256 seconds]
hotovson has joined #ruby
jgarvey has quit [Quit: Leaving]
sailias has quit [Quit: Leaving.]
nat2610 has joined #ruby
segmond has joined #ruby
horofox has joined #ruby
TechZombie has joined #ruby
Michael_ has quit [Remote host closed the connection]
swarley has joined #ruby
robertotauille has joined #ruby
hackerdude has quit [Remote host closed the connection]
stopbit has quit [Quit: Leaving]
butblack has quit [Quit: butblack]
statarb3 has quit [Quit: Leaving]
geggam has quit [Remote host closed the connection]
etcetera has quit [Quit: Computer has gone to sleep.]
vitor-br has joined #ruby
hackerdude has joined #ruby
jxf has joined #ruby
Xeago has quit [Remote host closed the connection]
jonathanwallace has quit [Remote host closed the connection]
Maoz has quit [Ping timeout: 240 seconds]
<swarley> Hi
hsbt_away is now known as hsbt
kevinfish has joined #ruby
nari_ has quit [Ping timeout: 265 seconds]
<kevinfish> Hi, I'm not a ruby programmer but I'm trying to get a program (taskjuggler) to run and I'm getting: /usr/bin/ruby18: no such file to load -- auto_gem (LoadError)
qwerxy has joined #ruby
<kevinfish> I tried unsetting RUBYOPT and it says: /usr/local/bin/tj3:9:in `require': no such file to load -- rubygems (LoadError)
<kevinfish> from /usr/local/bin/tj3:9
<kevinfish> How do I fix?
havenn has joined #ruby
qwerxy has quit [Client Quit]
rmcafee has joined #ruby
rmcafee has quit [Client Quit]
chrisbolton has quit [Quit: chrisbolton]
CaptainJet has quit []
clj_newb has quit [Ping timeout: 252 seconds]
jonathanwallace has joined #ruby
<atmosx> kevinfish: what platform you on? which ruby version do you use?
jrajav has joined #ruby
t-mart has joined #ruby
t-mart has joined #ruby
t-mart has quit [Changing host]
reinaldob has joined #ruby
rudolf_ has quit [Ping timeout: 245 seconds]
<kevinfish> atmosx: I'm on sabayon X and I've tried it with 18 and 19. When I switch to 18 w/eselect, it says: It appears you do not have RubyGems installed for this profile.
<kevinfish> If you need RubyGems, emerge dev-ruby/rubygems with the appropriate RUBY_TARGETS setting
hackerdude has quit [Remote host closed the connection]
<kevinfish> but idk what to set RUBY_TARGETS to, however it behaves the same under both versions
<atmosx> kevinfish: use rvm and ruby 1.9
DarthGandalf has joined #ruby
hackerdude has joined #ruby
<atmosx> don't use portage for ruby management
<atmosx> just leave portage install ruby if it needs to for third party packages
<atmosx> but use rvm for ruby programming
dmiller has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
reinaldob has quit [Remote host closed the connection]
<atmosx> bb4
<atmosx> gnite
axl_ has quit [Quit: axl_]
<swarley> Ruby doesn't play we'll with package managers
<swarley> It's better to just install from official source
werdnativ has joined #ruby
<swarley> Or use rvm
jenrzzz has quit [Ping timeout: 245 seconds]
binarypl2 has joined #ruby
hackerdude has quit [Ping timeout: 240 seconds]
<yaymukund> is there a difference between `raise BlahError, 'message'` and `raise BlahError.new('message')`?
Juul has quit [Quit: fell off the server in amazement]
<Elico> kevinfish: what is the problem? can you use pastebin to reveal more?
<Sou|cutter> gah, I'm working with somebody who sprinkles Gemfiles with gem 'foo', :path => '../foo' if File.exists?('../foo')
bricker has quit [Read error: Connection reset by peer]
tomsthumb has quit [Quit: Leaving.]
binaryplease has quit [Ping timeout: 252 seconds]
<werdnativ> What's a clean way to strip 2 lines from the start of a string? So far, I have: str.sub(/(^.*\n){2}/, '')
lenovodroid has quit [Ping timeout: 276 seconds]
<swarley> Why do that?...
J-_-L has quit [Quit: Leaving.]
<swarley> Not you I mean the gemfile thing
<Sou|cutter> so he can hack on gems locally
darthdeus has quit [Quit: Leaving...]
<swarley> Ah
tomsthumb has joined #ruby
<Sou|cutter> I feel like it's sloppy. One day he's going to get something working and forget to share his local modifications
rellin has quit [Ping timeout: 240 seconds]
jonathanwallace has quit [Remote host closed the connection]
<werdnativ> Sou|cutter: there's a bundler option for config.local to take care of that instead of hard-coding it into Gemfile...
bricker has joined #ruby
<swarley> str.sub(/(^.+?$){2}/s)
ndrei has quit [Ping timeout: 255 seconds]
<swarley> Or whatever the suffix for \n match for .
<swarley> Err
<swarley> Sorry never mind
cmarques has joined #ruby
<swarley> What ou have works really
<Eiam> wow, i just spent way too many hours researching basic math to find out i was hit by http://bugs.ruby-lang.org/issues/5228
<Eiam> worse, it was working fine when implemented in javascript, when i re-implemented it in ruby it stopped working. but I totally thought it was my fault not rubys ha
<werdnativ> swarley: yeah, I thought there might be a cleaner way using String#lines or such.
<Eiam> I never assume my hammer is broken, I just assume I'm using it wrong. afterall, how often to hammers break??
<Sou|cutter> swarley: trying to look it up.. how does that work?
<swarley> You could use lines
<Sou|cutter> bundle config local.foo ../foo ?
<swarley> str.lines[2..-1]
dmiller has joined #ruby
<werdnativ> lines returns an Enumerator, so nope, not like that either. :-)
mmitchell has joined #ruby
busybox42 has quit [Ping timeout: 248 seconds]
<swarley> Oh. str.split(/\n/)[2..-1] lol
jord_ has quit [Ping timeout: 252 seconds]
<swarley> You could use lines.to_a if you really wanted to
busybox42 has joined #ruby
jonathanwallace has joined #ruby
mmitchell has quit [Remote host closed the connection]
cakehero has joined #ruby
horofox has quit [Quit: horofox]
chussenot has quit [Quit: chussenot]
ipsifendus has quit [Ping timeout: 268 seconds]
freeayu has joined #ruby
swarley_ has joined #ruby
hotovson has quit [Remote host closed the connection]
Elico has quit [Quit: elico]
slainer68 has quit [Remote host closed the connection]
<shevy> hmm when I have a file foo.pdf, is there a simple pure-ruby way to convert that into a text file?
darthdeus has joined #ruby
<swarley_> uh using a gem yes
<swarley_> PDFs have an XML like language to them i believe. I'm not sure though
jimeh has quit [Quit: Computer has gone to sleep.]
hotovson has joined #ruby
h4mz1d has joined #ruby
BadProphet has quit [Remote host closed the connection]
swarley has quit [Remote host closed the connection]
jonathanwallace has quit [Remote host closed the connection]
Chame has joined #ruby
v0n has joined #ruby
hotovson has quit [Read error: No route to host]
fyolnish has joined #ruby
swarley_ is now known as swarley
werdnativ has quit [Ping timeout: 252 seconds]
kiyoura has joined #ruby
wwalker has quit [Ping timeout: 244 seconds]
Chame has quit []
SCommette has joined #ruby
etcetera has joined #ruby
cascalheira has joined #ruby
<shevy> hmm let's see
postmodern has joined #ruby
rcvalle has quit [Quit: Leaving]
jrajav has quit []
<shevy> cool
<shevy> pdf-reader seems to work
tomsthumb has quit [Quit: Leaving.]
tr4656 has joined #ruby
jord has joined #ruby
emptyflask has quit [Ping timeout: 245 seconds]
wwalker has joined #ruby
iamlacroix has joined #ruby
iamlacroix has quit [Remote host closed the connection]
peregrine81 has quit [Ping timeout: 256 seconds]
stkowski has quit [Quit: stkowski]
jonathanwallace has joined #ruby
GorbiE has quit []
samphippen has quit [Quit: Computer has gone to sleep.]
wwalker has quit [Ping timeout: 245 seconds]
greenarrow has quit [Ping timeout: 246 seconds]
greenarrow has joined #ruby
maxer has quit [Quit: maxer]
peregrine81 has joined #ruby
wwalker has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
jrajav has joined #ruby
seanyo_ has joined #ruby
wroathe has quit [Ping timeout: 260 seconds]
seanyo has quit [Ping timeout: 260 seconds]
thone_ has joined #ruby
TandemAdam has joined #ruby
TandemAdam has left #ruby [#ruby]
thone has quit [Ping timeout: 260 seconds]
havenn has quit [Remote host closed the connection]
nwertman has quit [Quit: leaving]
dmerrick has quit [Quit: dmerrick]
aantix has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
brianpWins has quit [Quit: brianpWins]
SCommette has quit [Quit: SCommette]
SuperrMann has quit [Quit: Computer has gone to sleep.]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mrsolo has quit [Quit: Leaving]
etcetera has quit [Read error: Operation timed out]
cmarques has quit [Ping timeout: 252 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
x82_nicole has joined #ruby
davidcelis has quit [Quit: K-Lined.]
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Grieg has quit [Read error: Connection reset by peer]
slainer68 has quit [Ping timeout: 252 seconds]
pkrnj has joined #ruby
SCommette has joined #ruby
artOfWar has quit [Ping timeout: 255 seconds]
etcetera has joined #ruby
dorei has quit []
adeponte has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
Paradox has quit [Ping timeout: 252 seconds]
goraxe has joined #ruby
blazes816 has quit [Quit: blazes816]
jayteesr has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
CaptainJet has joined #ruby
somazero has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
cdehaan has quit [Quit: Textual IRC Client]
Paradox has joined #ruby
krawchyk has joined #ruby
gabrielrotbart has quit [Read error: Connection reset by peer]
u89 has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
cakehero has joined #ruby
tomsthumb has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9]
tomsthumb has quit [Client Quit]
shtirlic has quit []
shtirlic has joined #ruby
shanemook has joined #ruby
wroathe has joined #ruby
_alejandro has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
roadt has joined #ruby
butblack has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
Grieg has quit [Client Quit]
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
gmci has joined #ruby
gmci is now known as Guest46770
Guest46770 has quit [Client Quit]
Bosma has quit [Quit: leaving]
aata has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<aata> is it possible to to create a has_one relationship only if a certain condition is true, or does the relationship have to exist for every instance of a class
trevortwining has quit [Quit: trevortwining]
apok_ has joined #ruby
joeycarmello has quit [Remote host closed the connection]
apok has quit [Read error: Operation timed out]
apok_ is now known as apok
swex has quit [Ping timeout: 268 seconds]
gabrielrotbart has quit [Remote host closed the connection]
ChampS666 has joined #ruby
jerius has joined #ruby
swex has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
jerius has quit [Client Quit]
fantazo has quit [Ping timeout: 260 seconds]
davidcelis has joined #ruby
enderx86 has joined #ruby
caleb_io has joined #ruby
berserkr has quit [Quit: Leaving.]
kuzushi has joined #ruby
t0rc has joined #ruby
bpfh has quit [Ping timeout: 245 seconds]
bpfh has joined #ruby
itchyouch has joined #ruby
jgrevich has joined #ruby
equus has joined #ruby
dmiller has quit [Remote host closed the connection]
aata has quit [Quit: Page closed]
jenrzzz has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
kuzushi has quit [Ping timeout: 245 seconds]
osirisx11 has joined #ruby
caleb_io has quit [Quit: caleb_io]
banjara has quit [Quit: Leaving.]
nari_ has joined #ruby
pu22l3r has joined #ruby
tjbiddle has joined #ruby
steffes has joined #ruby
osirisx11 has left #ruby [#ruby]
jgrevich_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
tehlulz has joined #ruby
jgrevich has quit [Ping timeout: 268 seconds]
jgrevich_ is now known as jgrevich
pac1 has quit [Quit: I got it one line of code at a time]
Synthead has quit [Ping timeout: 260 seconds]
dubz has quit [Remote host closed the connection]
Michael_ has joined #ruby
bigmcq77 has joined #ruby
Juul has joined #ruby
fumduq has quit [Ping timeout: 264 seconds]
sepp2k1 has quit [Remote host closed the connection]
Michael_ has quit [Remote host closed the connection]
ksaw123 has joined #ruby
Michael_ has joined #ruby
linoj has joined #ruby
Michael_ has quit [Remote host closed the connection]
Michael_ has joined #ruby
<ksaw123> can someone check my code to check what is wrong. It is a code to determine whether a number is prime or not, if it is it displays preceding primes. The prime and preceding portion works, but I tried to add a simple loop to the method to only allow numbers. Ex. a user can enter (7) but can't enter rubyrocks as a number. However, since I added it I can't seem to get the loop to end if a user types a number. it just repeated "enter a number" e
t0rc has quit [Quit: WeeChat 0.3.9]
<jrajav> You're making it rather hard for us
<jrajav> Do we have to guess the pastebin and id?
<CamonZ> "D
<CamonZ> :D
ChampS666 has quit [Ping timeout: 260 seconds]
dankest has quit [Quit: Linkinus - http://linkinus.com]
cburyta has quit [Remote host closed the connection]
seoaqua has joined #ruby
cburyta has joined #ruby
swarley_ has joined #ruby
<jrajav> Hmm
<jrajav> Why would you expect it to end the loop if you enter a number?
<jrajav> The only break I see is for "exit"
<ksaw123> user can enter exit or a number to beging the prime number process
kil0byte has joined #ruby
<jrajav> Yes, but for the latter, why should the program end?
<ksaw123> but if a random string were typed "rubyrocks" it shouldnt allow it
DarthGandalf has quit [Ping timeout: 272 seconds]
<jrajav> The only point of exit you have is break if i == "exit"
<jrajav> You should probably have another break at the end of your number processing block
<ksaw123> I don't want the program to end if a mumber is entered, I just want the rest of the method to continue
<jrajav> Otherwise it will happily continue the loop
<jrajav> break doesn't end the program, it ends the current loop
DarthGandalf has joined #ruby
<ksaw123> maybe break if i =~ /\d/ ?
Michael_ has quit [Remote host closed the connection]
<jrajav> Well, you're already checking =~ /\d/, aren't you?
jonathanwallace has quit [Remote host closed the connection]
Michael_ has joined #ruby
<jrajav> I know you are, you have a block the size of the stay-puft marshmallow man devoted to it
<jrajav> Just break at the end of that
binarypl2 has quit [Quit: WeeChat 0.3.9]
<jrajav> You could also make that and "exit" your loop condition to simplify things a bit
philcrissman has joined #ruby
<ksaw123> heres my current problem:
<ksaw123> enter number :ok
<ksaw123> enter number :ok
<ksaw123> enter number :ok
<ksaw123> enter number :9
<ksaw123> enter number :
mpereira has quit [Ping timeout: 260 seconds]
<jrajav> ... And I'm telling you how to solve it
t0rc has joined #ruby
<jrajav> You seem to have already figured out what break does. Do you understand it?
Guest24429 has quit [Quit: This computer has gone to sleep]
<ksaw123> i do understand break, im just not sure where to put it
jonathanwallace has joined #ruby
cburyta has quit [Remote host closed the connection]
mpereira has joined #ruby
invapid has joined #ruby
<jrajav> I've said it twice now
<jrajav> At the end of your ~= /\d/ block
TechZombie has quit [Quit: Leaving.]
alexim has quit [Quit: sleep]
<jrajav> A block is a sequence of statements enclosed by { }, do .. end, or then .. end, etc.
carlyle has joined #ruby
swarley_ has quit [Ping timeout: 276 seconds]
<ksaw123> ah kk
<jrajav> You have to put it at the end, because break works immediately. Anything following it will not be executed
ryanlecompte has quit [Remote host closed the connection]
cburyta has joined #ruby
<jrajav> But you have to put it inside that block, because you only want it to happen when ~= /\d/
chrisja has quit [Quit: leaving]
gabrielrotbart has joined #ruby
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<ksaw123> gotcha, thanks dude
centipedefarmer has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
tbrock has quit [Quit: Computer has gone to sleep.]
<jrajav> No problem
charliesome has joined #ruby
Michael_ has quit [Read error: Connection reset by peer]
freakazoid0223 has quit [Quit: Leaving]
Michael_ has joined #ruby
<t0rc> why do I need the commented out part to access the variable :a? does attr_accessor make instance only variables? guess that would make sense since it is attr
minijupe has joined #ruby
wargasm1 has joined #ruby
<heftig> t0rc: which code are you talking about?
mnaser has quit [Ping timeout: 265 seconds]
cjk101010 has quit [Ping timeout: 252 seconds]
cjk101010 has joined #ruby
<swarley> because without it you have no method to which yuo can access from the main level
<swarley> it would work with A.send(:a)
<heftig> attr_accessor :a is pretty much the same as "def a; @a; end; def a=(val); @a=val; end"
<swarley> because it calls the method from within the module
<heftig> swarley: no it wouldn't
schickung has joined #ruby
<swarley> ah, i guess not
<heftig> t0rc: notice it's "def a" and not "def self.a"
jaygen has joined #ruby
mnaser has joined #ruby
<heftig> "def a" creates an instance method, so it's only callable on instances of A, not A itself
dmiller has joined #ruby
linoj has quit [Quit: linoj]
<heftig> def self.a creates a singleton method
<heftig> (self is A)
apok has quit [Remote host closed the connection]
apok has joined #ruby
banjara1 has joined #ruby
mercwithamouth has quit [Quit: Lost terminal]
Hanmac1 has joined #ruby
dmiller has quit [Ping timeout: 245 seconds]
minijupe has quit [Quit: minijupe]
tbrock has joined #ruby
v0n has quit [Quit: Leaving]
havenn has joined #ruby
Hanmac has quit [Ping timeout: 276 seconds]
<t0rc> heftig: ahhhh, right right. So attr_accessor is only for instance variables not class variables. Excellent. Thank you, and thank you swarley
<swarley> Mine wasnt correct, but i'm happy to help on the off chance I'm right
Cultofmetatron has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
jxf has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Quit: emmanuelux]
forced_request has joined #ruby
bricker has quit [Quit: leaving]
Monie[ip] has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
davehimself has quit [Ping timeout: 245 seconds]
schickung has quit [Quit: schickung]
schickung has joined #ruby
sheerun has left #ruby [#ruby]
RantriX has joined #ruby
jenrzzz has joined #ruby
philcrissman has quit [Remote host closed the connection]
Michael_ has quit [Remote host closed the connection]
yaymukund has quit [Ping timeout: 252 seconds]
niklasb has quit [Ping timeout: 264 seconds]
vs has joined #ruby
<vs> hi
<vs> anyone here?
redbaritone has joined #ruby
wroathe has quit [Ping timeout: 260 seconds]
redbaritone has quit [Client Quit]
<vs> ?
<swarley> yes
Monie[ip] has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
savage- has joined #ruby
joeycarmello has joined #ruby
Ruler_Of_Heaven_ has joined #ruby
pipopopo has quit [Ping timeout: 255 seconds]
mascool has quit [Ping timeout: 252 seconds]
joeycarmello has quit [Ping timeout: 255 seconds]
osvico has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
haxrbyte has joined #ruby
Ruler_Of_Heaven_ has quit [Ping timeout: 252 seconds]
pipopopo has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
timonv has quit [Remote host closed the connection]
Azure has quit [Excess Flood]
tjbiddle has joined #ruby
haxrbyte has quit [Remote host closed the connection]
Azure has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
haxrbyte has joined #ruby
equus has quit [Ping timeout: 245 seconds]
steffes has quit [Remote host closed the connection]
seoaqua has quit [Ping timeout: 246 seconds]
haxrbyte_ has joined #ruby
d3vic3 has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Client Quit]
nat2610 has quit [Quit: Leaving.]
hoyang has joined #ruby
ksaw123 has quit [Quit: irc2go]
haxrbyte has quit [Read error: Connection reset by peer]
d3vic3 has joined #ruby
vs has quit [Quit: irc2go]
hackerdude has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
JustinCampbell has quit [Remote host closed the connection]
friskd has quit [Ping timeout: 240 seconds]
haxrbyte has joined #ruby
robbyoconnor has quit [Ping timeout: 246 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
haxrbyte_ has quit [Ping timeout: 245 seconds]
vs has joined #ruby
haxrbyte_ has joined #ruby
<vs> anybody here?
reset has quit [Read error: Operation timed out]
vs has quit [Client Quit]
cj3kim has quit [Client Quit]
DarthGandalf has quit [Ping timeout: 260 seconds]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
voodoofish430 has quit [Quit: Leaving.]
stephenjudkins has quit [Quit: stephenjudkins]
seoaqua has joined #ruby
DarthGandalf has joined #ruby
haxrbyte has quit [Ping timeout: 248 seconds]
sn0wb1rd has joined #ruby
<swarley> im here lol
Cakey has joined #ruby
fms has quit [Quit: Leaving]
vickaita has joined #ruby
tehlulz has quit [Read error: Connection reset by peer]
CamonZ has quit [Quit: Linkinus - http://linkinus.com]
tehlulz has joined #ruby
codezombie has joined #ruby
medik has quit [Quit: medik has no reason]
darthdeus has quit [Quit: Leaving...]
<RantriX> what's up?
leoncamel has joined #ruby
garndt has quit [Read error: Connection reset by peer]
garndt has joined #ruby
cj3kim has joined #ruby
adeponte has joined #ruby
robertotauille has quit [Ping timeout: 245 seconds]
dmiller has joined #ruby
nalaginrut has joined #ruby
SCommette has quit [Quit: SCommette]
skaczor has quit [Remote host closed the connection]
etcetera has quit [Quit: Computer has gone to sleep.]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
SCommette has joined #ruby
etcetera has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
Edward_ has quit [Ping timeout: 245 seconds]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
rakl has joined #ruby
mmikeym has quit [Ping timeout: 246 seconds]
SCommette has quit [Quit: SCommette]
nat2610 has joined #ruby
seoaqua has quit [Ping timeout: 255 seconds]
tbrock has joined #ruby
Cakey has quit [Read error: Connection reset by peer]
rellin has joined #ruby
Cakey has joined #ruby
Cakey has quit [Read error: Connection reset by peer]
etcetera has quit [Quit: Computer has gone to sleep.]
krawchyk has quit [Remote host closed the connection]
thinkdevcode has joined #ruby
apok_ has joined #ruby
friskd has joined #ruby
tommyvyo has joined #ruby
noyb has joined #ruby
Cakey has joined #ruby
apok has quit [Ping timeout: 245 seconds]
apok_ has quit [Ping timeout: 255 seconds]
elentras has quit [Quit: This computer has gone to sleep]
vickaita has quit [Ping timeout: 268 seconds]
cj3kim has quit [Quit: This computer has gone to sleep]
t0rc has quit [Quit: WeeChat 0.3.9]
stbaby has joined #ruby
seoaqua has joined #ruby
glyytchy has joined #ruby
butblack has quit [Quit: butblack]
RudyValencia has quit [Quit: Hacked By Chinese!]
hackerdude has quit [Remote host closed the connection]
jackdanger has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
TechZombie has joined #ruby
dpk is now known as dpkbis
dpkbis is now known as dpk
caleb_io has joined #ruby
dpk is now known as dpkbis
tehlulz has quit [Quit: tehlulz]
carlyle has quit [Remote host closed the connection]
dpkbis is now known as dpk
schickung has quit [Quit: schickung]
brianpWins has joined #ruby
slainer68 has joined #ruby
robbyoconnor has joined #ruby
DarthGandalf has quit [Ping timeout: 260 seconds]
slainer68 has quit [Ping timeout: 240 seconds]
peregrine81 has quit [Quit: Computer sleeping.]
aetcore has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
ananthakumaran has joined #ruby
aetcore has joined #ruby
yshh has quit [Ping timeout: 246 seconds]
r0bby has quit [Read error: Connection reset by peer]
stbaby has quit [Quit: Linkinus - http://linkinus.com]
davai has joined #ruby
iamjarvo has joined #ruby
CaptainJet has quit []
k610 has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
DarthGandalf has joined #ruby
peregrine81 has joined #ruby
adeponte has quit [Remote host closed the connection]
butblack has joined #ruby
swarley has quit [Ping timeout: 264 seconds]
adeponte has joined #ruby
k610 has quit [Ping timeout: 252 seconds]
davai has quit [Quit: Linkinus - http://linkinus.com]
vitor-br has quit [Quit: Saindo]
davai has joined #ruby
k610 has joined #ruby
arya has joined #ruby
seoaqua has quit [Ping timeout: 260 seconds]
butblack has quit [Client Quit]
adeponte has quit [Ping timeout: 248 seconds]
Cultofmetatron has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 268 seconds]
rakl has quit [Quit: gone]
k610 has joined #ruby
d3vic3 has quit [Ping timeout: 248 seconds]
stephenjudkins has joined #ruby
savage- has quit [Quit: savage-]
butblack has joined #ruby
g-ram has joined #ruby
d3vic3 has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
emptyflask has joined #ruby
k610 has quit [Ping timeout: 248 seconds]
dmiller has joined #ruby
davai has quit [Quit: Linkinus - http://linkinus.com]
davai has joined #ruby
k610 has joined #ruby
peregrine81 has joined #ruby
cj3kim has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
dmiller has quit [Ping timeout: 246 seconds]
peregrine81 has quit [Client Quit]
k610 has quit [Ping timeout: 245 seconds]
segmond_ has joined #ruby
arya has quit [Ping timeout: 256 seconds]
k610 has joined #ruby
yshh has joined #ruby
Tref has joined #ruby
wroathe has joined #ruby
luckyruby has joined #ruby
segmond has quit [Ping timeout: 276 seconds]
n_blownapart has joined #ruby
arya has joined #ruby
k610 has quit [Ping timeout: 268 seconds]
k610 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
mahmoudimus has joined #ruby
adeponte has joined #ruby
yshh has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
radic_ has joined #ruby
Nykolla has quit [Read error: Connection reset by peer]
Nykolla has joined #ruby
arya has quit [Ping timeout: 240 seconds]
Nisstyre has quit [Ping timeout: 252 seconds]
caleb_io has quit [Quit: caleb_io]
yshh has joined #ruby
hsbt is now known as hsbt_away
emptyflask has quit [Remote host closed the connection]
hsbt_away is now known as hsbt
arya has joined #ruby
Cultofmetatron has joined #ruby
yshh has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
BrianJ has quit [Quit: BrianJ]
k610 has quit [Ping timeout: 240 seconds]
gabrielrotbart has quit [Ping timeout: 245 seconds]
nomenkun has quit [Ping timeout: 245 seconds]
savage- has joined #ruby
Nisstyre has joined #ruby
vickaita has joined #ruby
x82_nicole has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
quest88 has joined #ruby
gabrielrotbart has joined #ruby
vickaita has quit [Ping timeout: 256 seconds]
manizzle has joined #ruby
dmiller has joined #ruby
apok has joined #ruby
jaygen has quit [Remote host closed the connection]
Cultofmetatron has quit [Remote host closed the connection]
slainer68 has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
ablankfield has quit [Ping timeout: 255 seconds]
DarthGandalf has quit [Ping timeout: 245 seconds]
n_blownapart has quit [Remote host closed the connection]
endzyme has joined #ruby
slainer68 has quit [Ping timeout: 240 seconds]
endzyme has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
segmond_ is now known as segmond
centipedefarmer has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
segmond_ has joined #ruby
PhilK has quit [Quit: ZNC - http://znc.in]
TechZombie has quit [Ping timeout: 255 seconds]
<rking> In Ruby, every____ is an expression.
<rking> ____ == ?
<rking> I was going to say "thing", but that's weak.
DarthGandalf has joined #ruby
butblack has joined #ruby
segmond has quit [Ping timeout: 248 seconds]
PhilK has joined #ruby
wroathe has quit [Ping timeout: 246 seconds]
areil has joined #ruby
emptyflask has joined #ruby
x82_nicole has quit [Quit: Textual IRC Client: www.textualapp.com]
x82_nicole has joined #ruby
tjbiddle has joined #ruby
segmond_ is now known as segmond
dmyers has joined #ruby
werdnativ has joined #ruby
straind has joined #ruby
Juul has quit [Quit: Leaving]
Guest91808 has joined #ruby
Guest46581 has joined #ruby
thinkdev_ has joined #ruby
thinkdevcode has quit [Read error: No route to host]
rburton- has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
RudyValencia has joined #ruby
Guest46581 has quit [Ping timeout: 245 seconds]
Jasko has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Jasko has joined #ruby
thinkdev_ has quit [Remote host closed the connection]
wroathe has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
thinkdevcode has joined #ruby
friskd has quit [Quit: friskd]
luckyruby has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
friskd has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
emptyflask has quit [Remote host closed the connection]
friskd has quit [Client Quit]
dmyers is now known as derek__
segmond_ has joined #ruby
segmond_ has quit [Read error: Connection reset by peer]
maletor has joined #ruby
passbe has quit [Read error: Connection reset by peer]
margle has joined #ruby
anandhegde has joined #ruby
jasond has left #ruby ["Killed buffer"]
segmond has quit [Ping timeout: 255 seconds]
ablankfield has joined #ruby
g-ram has joined #ruby
yxhuvud has joined #ruby
derek__ is now known as derekm
maletor has quit [Ping timeout: 252 seconds]
xpen has joined #ruby
paolooo has joined #ruby
gbchaosmaster has joined #ruby
butblack has quit [Quit: butblack]
paolooo has quit [Client Quit]
derekm is now known as dmyers
maletor has joined #ruby
fantazo has joined #ruby
paolooo has joined #ruby
paolooo has quit [Client Quit]
RantriX has quit [Remote host closed the connection]
elsifaka has joined #ruby
bluOxigen has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
greenarrow has quit [Ping timeout: 255 seconds]
greenarrow has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Guest91808 has quit [Read error: Connection reset by peer]
dmyers is now known as derekm
Maoz has joined #ruby
maletor has joined #ruby
dmiller has quit [Remote host closed the connection]
derekm is now known as derek__
derek__ is now known as derekm
xpen has quit [Read error: Connection timed out]
nat2610 has quit [Quit: Leaving.]
x82_nicole has quit [Quit: Computer has gone to sleep.]
quest88 has quit [Quit: quest88]
Maoz has quit [Ping timeout: 245 seconds]
tbrock has joined #ruby
pu22l3r has quit [Remote host closed the connection]
derekm is now known as dmyers
xpen has joined #ruby
tbrock has quit [Client Quit]
robbyoconnor has joined #ruby
tbrock has joined #ruby
BoomCow has joined #ruby
noyb has quit [Ping timeout: 255 seconds]
joeycarmello has joined #ruby
xpen has quit []
xpen has joined #ruby
kiyoura has quit [Quit: Leaving]
tbrock has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 255 seconds]
wroathe has quit [Ping timeout: 248 seconds]
prezioso has joined #ruby
anandhegde has quit [Quit: Linkinus - http://linkinus.com]
Tania has joined #ruby
awarner has quit [Ping timeout: 240 seconds]
arya has joined #ruby
joeycarmello has quit [Remote host closed the connection]
wreckimnaked has joined #ruby
joeycarmello has joined #ruby
butblack has joined #ruby
sheerun has joined #ruby
fixl has joined #ruby
manizzle has quit [Ping timeout: 264 seconds]
jackdanger has quit [Quit: Leaving.]
joeycarmello has quit [Ping timeout: 268 seconds]
tagrudev has joined #ruby
arya has quit [Ping timeout: 240 seconds]
adeponte has quit [Remote host closed the connection]
hotovson has joined #ruby
adeponte has joined #ruby
dmyers has quit [Remote host closed the connection]
arya has joined #ruby
nomenkun has joined #ruby
rippa has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
savage- has quit [Quit: savage-]
Jasko has quit [Read error: Connection reset by peer]
maletor has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Ping timeout: 252 seconds]
Jasko has joined #ruby
elentras has joined #ruby
butblack has quit [Quit: butblack]
manizzle has joined #ruby
prezioso has quit [Read error: Operation timed out]
kil0byte has quit [Read error: Operation timed out]
ryanf has joined #ruby
arya has quit [Ping timeout: 252 seconds]
adeponte has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
RantriX has joined #ruby
Trioke has quit [Ping timeout: 255 seconds]
elentras has quit [Quit: Quitte]
Tearan has quit [Quit: Sleepy Badger....]
butblack has joined #ruby
enderx86 has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 240 seconds]
arietis has joined #ruby
manizzle has quit [Ping timeout: 240 seconds]
savage- has joined #ruby
shanemook has quit [Remote host closed the connection]
zommi has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
butblack has quit [Quit: butblack]
kevinfish has quit [Quit: Leaving.]
tjbiddle has joined #ruby
brianpWins has quit [Quit: brianpWins]
reset has joined #ruby
mahmoudimus has joined #ruby
reset has quit [Client Quit]
Jasko has quit [Read error: Connection reset by peer]
glow_nzl has joined #ruby
Jasko has joined #ruby
Takehiro has joined #ruby
lowg has quit [Ping timeout: 245 seconds]
greenarrow has quit [Ping timeout: 260 seconds]
artm has joined #ruby
slainer68 has joined #ruby
greenarrow has joined #ruby
slainer68 has quit [Read error: Connection reset by peer]
elentras has joined #ruby
slainer68 has joined #ruby
hackerdude has joined #ruby
ndrei has joined #ruby
hoyang has quit [Quit: 离开]
nomenkun has quit [Read error: Connection reset by peer]
cezar-b has joined #ruby
tonini has joined #ruby
Eplemosen has joined #ruby
manizzle has joined #ruby
aganov has joined #ruby
Monie has quit [Ping timeout: 256 seconds]
zigomir has joined #ruby
arturaz has joined #ruby
maesbn has joined #ruby
butblack has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
awarner has joined #ruby
charliesome has quit [Ping timeout: 252 seconds]
paolooo has joined #ruby
paolooo has quit [Client Quit]
gabrielrotbart has joined #ruby
chendo has quit [Ping timeout: 264 seconds]
gabrielrotbart has quit [Remote host closed the connection]
butblack has quit [Client Quit]
glyytchy has quit [Quit: glyytchy]
charliesome has joined #ruby
monkegjinni has joined #ruby
kil0byte has joined #ruby
gbchaosmaster has quit [Quit: Don't get too close to the Windows, you'll fall out.]
chendo_ has joined #ruby
dangerousdave has joined #ruby
Morkel has joined #ruby
Eplemosen has quit [Quit: Hexchat FTW! http://www.hexchat.org/]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
Azure has quit [Excess Flood]
ablankfield has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
jake__ has joined #ruby
dr_bob has joined #ruby
jake_ has quit [Read error: Connection reset by peer]
Azure has joined #ruby
xorgnak has joined #ruby
haxrbyte_ has joined #ruby
joeycarmello has joined #ruby
invapid has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
kil0byte_ has joined #ruby
answer_42 has joined #ruby
nomenkun has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
haxrbyte has quit [Ping timeout: 260 seconds]
Jasko has joined #ruby
xorgnak has quit [Remote host closed the connection]
dmiller has joined #ruby
kil0byte has quit [Ping timeout: 255 seconds]
joeycarmello has quit [Ping timeout: 245 seconds]
manizzle has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
k610 has joined #ruby
prezioso has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
dmiller has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
gregorg_taf has joined #ruby
adeponte has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 255 seconds]
adeponte has joined #ruby
schaary has joined #ruby
k610 has joined #ruby
Morkel_ has joined #ruby
filipe has joined #ruby
Cakey has quit [Ping timeout: 252 seconds]
Morkel has quit [Ping timeout: 248 seconds]
Morkel_ is now known as Morkel
workmad3 has joined #ruby
adeponte has quit [Ping timeout: 252 seconds]
Monie has joined #ruby
k610 has quit [Ping timeout: 268 seconds]
lenovodroid has joined #ruby
manizzle has joined #ruby
AxonetBE has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
rh1n0 has joined #ruby
seanyo_ has quit [Read error: Connection reset by peer]
seanyo has joined #ruby
BoomCow has quit [Ping timeout: 264 seconds]
RantriX has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 265 seconds]
sheerun has left #ruby [#ruby]
osvico has quit [Ping timeout: 260 seconds]
rh1n0 has quit [Quit: Leaving...]
manizzle has quit [Ping timeout: 265 seconds]
Maoz has joined #ruby
arturaz has quit [Remote host closed the connection]
manizzle has joined #ruby
h4mz1d has joined #ruby
robert___ has joined #ruby
paolooo has joined #ruby
hamed_r has joined #ruby
xorigin has joined #ruby
mahmoudimus has joined #ruby
maesbn has quit [Ping timeout: 265 seconds]
tjbiddle has quit [Quit: tjbiddle]
schickung has joined #ruby
znake has joined #ruby
robert___ has quit [Ping timeout: 244 seconds]
timonv has quit [Remote host closed the connection]
schickung has quit [Client Quit]
schickung has joined #ruby
schickung has quit [Client Quit]
khakimov has quit [Quit: Computer has gone to sleep.]
<Maoz> How can I convert { "key1" => [{"name"=>"a", "count"=>100}, {"name"=>"b", "count"=>"200}] } to { "key1" => [{ "a"=>100, "b"=>200}] }
slainer68 has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 240 seconds]
rburton- has quit [Quit: Leaving...]
timtux has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
<Paradox> use a map
<Paradox> nested maps
<Paradox> assume the whole thing is in "derp"
<Maoz> and how do I set the value to be the key?
Beoran__ has joined #ruby
<Paradox> hrm
<Paradox> might actually want an each instead
prezioso has quit [Ping timeout: 240 seconds]
chussenot has joined #ruby
Elhu has joined #ruby
Beoran_ has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
qwerxy has joined #ruby
rellin has quit [Ping timeout: 246 seconds]
hotovson has quit [Remote host closed the connection]
und3f has joined #ruby
tvw has joined #ruby
maesbn has joined #ruby
nkts has quit []
k610 has joined #ruby
jgrevich_ has joined #ruby
afd__ has joined #ruby
Solnse has joined #ruby
dmiller has joined #ruby
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
richardjapenga has joined #ruby
blacktulip has joined #ruby
chussenot has quit [Quit: chussenot]
dmiller has quit [Ping timeout: 260 seconds]
slainer68 has joined #ruby
jimeh has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
ryanf has quit [Quit: leaving]
Hanmac1 is now known as Hanmac
arturaz has joined #ruby
pabloh has joined #ruby
blacktulip has quit [Remote host closed the connection]
arturaz has quit [Read error: Connection reset by peer]
arturas_ has joined #ruby
blacktulip has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
love_color_text has joined #ruby
colinbm has joined #ruby
zmo_ has joined #ruby
havenn has quit [Remote host closed the connection]
ChampS666 has joined #ruby
qwerxy has quit [Quit: offski]
Muz has quit [Quit: Lost terminal]
punkrawkR has joined #ruby
kil0byte has joined #ruby
cezar-b has quit [Read error: Connection reset by peer]
lenodroid has joined #ruby
hotovson has joined #ruby
cezar-b has joined #ruby
nazty has joined #ruby
love_color_text has quit [Remote host closed the connection]
haxrbyte_ has quit [Ping timeout: 245 seconds]
lenovodroid has quit [Ping timeout: 245 seconds]
kil0byte_ has quit [Ping timeout: 268 seconds]
d3vic3 has quit [Quit: leaving]
werdnativ has quit [Quit: werdnativ]
Muz has joined #ruby
Iszak has joined #ruby
gregorg_taf has quit [Changing host]
gregorg_taf has joined #ruby
reset has joined #ruby
elaptics`away is now known as elaptics
mikecmpbll has joined #ruby
xpen has quit [Ping timeout: 252 seconds]
xsbeats has quit [Ping timeout: 252 seconds]
nilg has joined #ruby
emergion has joined #ruby
robustus has joined #ruby
robotmay has joined #ruby
Elico has joined #ruby
jds_ has joined #ruby
rh1n0 has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
jds_ has quit [Remote host closed the connection]
xpen has joined #ruby
rh1n0 has quit [Client Quit]
jds_ has joined #ruby
maesbn has quit [Remote host closed the connection]
<Boohbah> "\\x411".gsub(/\\x\h{1,2}/) {|c| c[2..3].hex.chr}
reset has quit [Quit: Leaving...]
Jasko has quit [Read error: Connection reset by peer]
<Boohbah> how can i capture only the 2 hex digits?
maesbn has joined #ruby
Jasko has joined #ruby
xsbeats has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
jds_ is now known as jds
dekroning has joined #ruby
jgrevich has quit [Quit: jgrevich]
Averna has joined #ruby
<Hanmac> Boohbah: "\\x411".gsub(/\\x(\h{1,2})/){$1.hex.chr} ?
Tania has quit [Read error: Connection reset by peer]
dakine has quit [Quit: Leaving]
fyolnish has quit [Remote host closed the connection]
Vainoharhainen has joined #ruby
<Boohbah> Hanmac: i like that solution, thanks
GeekOnCoffee has quit [Ping timeout: 244 seconds]
Elico has quit [Quit: elico]
Virunga has joined #ruby
clocKwize has joined #ruby
emergion has joined #ruby
codecaster has joined #ruby
chussenot has joined #ruby
hackerdude has quit [Remote host closed the connection]
cdt has joined #ruby
hackerdude has joined #ruby
xpen has quit [Read error: Connection timed out]
lenodroid has quit [Ping timeout: 260 seconds]
savage- has quit [Quit: savage-]
xpen has joined #ruby
GeekOnCoffee has joined #ruby
reinaldob has joined #ruby
paolooo has quit [Quit: Page closed]
paolooo has joined #ruby
hackerdude has quit [Ping timeout: 260 seconds]
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
ephemerian has joined #ruby
kalleth has joined #ruby
timmow has joined #ruby
cdt has quit [Quit: Ex-Chat]
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
rafter has joined #ruby
tjbiddle has joined #ruby
<atmosx> hello
cdt has joined #ruby
cdt_ has joined #ruby
Xeago has joined #ruby
<atmosx> is there any gem that given the no of iteration will calculate the approx time to finnish on the running machine?
<Xeago> how would that work? 30 iterations, now what
<Xeago> there is no knowledge about the duration of an iteration
tjbiddle has quit [Client Quit]
nari_ has quit [Ping timeout: 260 seconds]
<atmosx> Xeago: It should be easy to implement
<atmosx> I'm doing some silly math mistake
<Hanmac> ruby has no "foreseen module" so it does not know that it will do the next time?
<Xeago> if you don't want to measure it
<atmosx> Xeago: I'm running a benchmark on 1.000.000 iteration then I getthrough a division the iter_per_sec
<Xeago> you have to predict it
<atmosx> then I multiply that number per iteration
paolooo has quit [Quit: Page closed]
paolooo has joined #ruby
<Xeago> then what is the issue? ruby has it build in with the benchmark stuff
<atmosx> yeah I want o predict it :-)
<atmosx> Xeago: here https://gist.github.com/4064933
<Xeago> then count instructions
<Xeago> and even then
workmad3 has joined #ruby
<Xeago> it is unlikely it will be what you calculate, cpu timing issues, background processes
<atmosx> Xeago: I'm doing some mistake because the numbers I get are not even close to reality :-P probably some math mistake. But what I'm thinkin of, is that ... depends on the loop really
<Xeago> network activity
<atmosx> well approx
<atmosx> you should be able to predict
<Xeago> atmosx: at the level you will need to count, there is too much error for noise
<Xeago> you are best off calculating it by doing a massive benchmark
dmiller has joined #ruby
x0F has quit [Read error: Connection reset by peer]
<atmosx> what do you mean 'massive' ?
<Xeago> 2^60
<atmosx> uh
<Xeago> depends on your wished accuracy
<atmosx> yeah got it
<rippa> Xeago: look at his code
<Xeago> looking at your code, iter_calc is not relevant?
<t-mart> I'm trying to find the smaller of 2 array[0] elements. More detail here: http://pastebin.com/NLMuwgCg This seems really longwinded; anyone got any pointers on reducing this up?
x0F has joined #ruby
<rippa> I think he assumes than any iteration takes same amount of time
<rippa> be it 'count+=1'
<atmosx> I do
<rippa> or some calculation
<rippa> well, it doesn't
<atmosx> true, that what I was questioning up
<atmosx> exactly
<atmosx> so is there any way to approach this by hmmm maybe using the each loop but still
<atmosx> comparing words is one thing and counting is another
<atmosx> hmm
<Xeago> atmosx: what is the purpose of iter_calc?
<atmosx> Xeago: to give a value to 'iteration per second' on a given hardware
<atmosx> but as rippa says, I think the approach id deeply flawed
<Xeago> those are different iterations than what you want
<atmosx> hmm
<Xeago> those measurements only apply to the while loop
<Xeago> not to anything else
<atmosx> to while loop and numbers
<atmosx> I see
dmiller has quit [Ping timeout: 240 seconds]
<Xeago> and you should remove the database call from your benchmark
<Xeago> and make sure it is fetched and not lazily fetched
mahmoudimus has quit [Quit: Computer has gone to sleep.]
shiin has quit [Ping timeout: 244 seconds]
shiin has joined #ruby
<atmosx> lazily fetched?
<Xeago> the error you are having is that 'while count < 10...end is not representative of oklist.each do ... end
rafter has quit [Read error: Connection reset by peer]
<Xeago> lazily fetched => only actually fetches when you require the desired records
emergion has quit [Quit: Computer has gone to sleep.]
<Xeago> I don't know your @db
jimeh has quit [Quit: Bye.]
<Xeago> ranking = entry[3].to_i
<Xeago> select just that field
jimeh has joined #ruby
<Xeago> instead of select *
manizzle has quit [Ping timeout: 255 seconds]
prezioso has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
jimeh has quit [Client Quit]
jimeh has joined #ruby
<atmosx> Xeago: okay :-)
noxoc has joined #ruby
captain_al has joined #ruby
k611 has joined #ruby
Monie has quit [Read error: No buffer space available]
shtirlic has quit [Read error: No buffer space available]
shtirlic_ has joined #ruby
Monie has joined #ruby
chussenot_ has joined #ruby
maxer has joined #ruby
tchebb has quit [Quit: Leaving.]
sepp2k has joined #ruby
morf has joined #ruby
k610 has quit [Ping timeout: 249 seconds]
rafter has joined #ruby
punkrawkR has quit [Ping timeout: 240 seconds]
chussenot has quit [Ping timeout: 240 seconds]
chussenot_ is now known as chussenot
adambeynon has joined #ruby
punkrawkR has joined #ruby
pcarrier has quit []
<atmosx> thanks for the pointers Xeago rippa
davehimself has joined #ruby
claymore has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
Takehiro has joined #ruby
havenn has joined #ruby
rafter has quit [*.net *.split]
cdt has quit [*.net *.split]
nazty has quit [*.net *.split]
codecaster has quit [*.net *.split]
Muz has quit [*.net *.split]
Elhu has quit [*.net *.split]
dangerousdave has quit [*.net *.split]
chendo_ has quit [*.net *.split]
charliesome has quit [*.net *.split]
wreckimnaked has quit [*.net *.split]
bluOxigen has quit [*.net *.split]
ananthakumaran has quit [*.net *.split]
mpereira has quit [*.net *.split]
swex has quit [*.net *.split]
ViperMaul|_ has quit [*.net *.split]
araujo has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
gregorg has quit [*.net *.split]
icooba has quit [*.net *.split]
otters has quit [*.net *.split]
DarkFoxDK has quit [*.net *.split]
Guest26813 has quit [*.net *.split]
lucaspiller_ has quit [*.net *.split]
Katniss has quit [*.net *.split]
jphpsf has quit [*.net *.split]
telling has quit [*.net *.split]
dkannan has quit [*.net *.split]
Drager has quit [*.net *.split]
TTilus has quit [*.net *.split]
Nowaker has quit [*.net *.split]
tomku has quit [*.net *.split]
GeekOnCoffee has quit [*.net *.split]
cibs has quit [*.net *.split]
paolooo has quit [*.net *.split]
shevy has quit [*.net *.split]
robustus has quit [*.net *.split]
slainer68 has quit [*.net *.split]
glow_nzl has quit [*.net *.split]
elsifaka has quit [*.net *.split]
Drewch has quit [*.net *.split]
virtuose has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
topek has quit [*.net *.split]
JStoker has quit [*.net *.split]
spathi has quit [*.net *.split]
ozzloy has quit [*.net *.split]
uxp_ has quit [*.net *.split]
Cork has quit [*.net *.split]
m_3 has quit [*.net *.split]
Gadgetoid has quit [*.net *.split]
canton7 has quit [*.net *.split]
xid has quit [*.net *.split]
faulkner has quit [*.net *.split]
epitron has quit [*.net *.split]
crazedpsyc has quit [*.net *.split]
shtirlic_ has quit [*.net *.split]
Morkel has quit [*.net *.split]
Azure has quit [*.net *.split]
davai has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
undersc0re97 has quit [*.net *.split]
casheew has quit [*.net *.split]
dnyy has quit [*.net *.split]
bapa has quit [*.net *.split]
undert has quit [*.net *.split]
txdv has quit [*.net *.split]
SJr has quit [*.net *.split]
malcolmva has quit [*.net *.split]
dominikh has quit [*.net *.split]
{^_^}_______ has quit [*.net *.split]
Sargun has quit [*.net *.split]
klip has quit [*.net *.split]
cheez0r has quit [*.net *.split]
preller has quit [*.net *.split]
Kov|abx has quit [*.net *.split]
nimred has quit [*.net *.split]
fcoury has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
_br_ has quit [*.net *.split]
ged has quit [*.net *.split]
mahlon has quit [*.net *.split]
idoru has quit [*.net *.split]
emergion has joined #ruby
znake has quit [Quit: Linkinus - http://linkinus.com]
hsbt is now known as hsbt_away
drizz has quit [Ping timeout: 246 seconds]
rafter has joined #ruby
GeekOnCoffee has joined #ruby
slainer68 has joined #ruby
cdt has joined #ruby
shtirlic_ has joined #ruby
codecaster has joined #ruby
Morkel has joined #ruby
paolooo has joined #ruby
robustus has joined #ruby
Azure has joined #ruby
Elhu has joined #ruby
Muz has joined #ruby
dangerousdave has joined #ruby
glow_nzl has joined #ruby
18VAAEHPH has joined #ruby
charliesome has joined #ruby
nazty has joined #ruby
bluOxigen has joined #ruby
ananthakumaran has joined #ruby
elsifaka has joined #ruby
wreckimnaked has joined #ruby
mpereira has joined #ruby
davai has joined #ruby
Banistergalaxy has joined #ruby
shevy has joined #ruby
swex has joined #ruby
undersc0re97 has joined #ruby
Drewch has joined #ruby
flagg0204 has joined #ruby
ViperMaul|_ has joined #ruby
topek has joined #ruby
casheew has joined #ruby
JStoker has joined #ruby
dnyy has joined #ruby
nyuszika7h has joined #ruby
bapa has joined #ruby
araujo has joined #ruby
virtuose has joined #ruby
TTilus has joined #ruby
Nowaker has joined #ruby
icooba has joined #ruby
dkannan has joined #ruby
undert has joined #ruby
gregorg has joined #ruby
xid has joined #ruby
telling has joined #ruby
tomku has joined #ruby
DarkFoxDK has joined #ruby
Drager has joined #ruby
uxp_ has joined #ruby
lucaspiller_ has joined #ruby
jphpsf has joined #ruby
txdv has joined #ruby
spathi has joined #ruby
Guest26813 has joined #ruby
canton7 has joined #ruby
Gadgetoid has joined #ruby
SJr has joined #ruby
Cork has joined #ruby
malcolmva has joined #ruby
m_3 has joined #ruby
{^_^}_______ has joined #ruby
klip has joined #ruby
otters has joined #ruby
cheez0r has joined #ruby
ozzloy has joined #ruby
cibs has joined #ruby
Kov|abx has joined #ruby
nimred has joined #ruby
preller has joined #ruby
dominikh has joined #ruby
Sargun has joined #ruby
Katniss has joined #ruby
fcoury has joined #ruby
RubyPanther has joined #ruby
faulkner has joined #ruby
epitron has joined #ruby
crazedpsyc has joined #ruby
_br_ has joined #ruby
ged has joined #ruby
idoru has joined #ruby
mahlon has joined #ruby
k611 has quit [Remote host closed the connection]
kkh has quit [Changing host]
kkh has joined #ruby
mahmoudimus has joined #ruby
nickbuff has joined #ruby
k610 has joined #ruby
havenn has quit [Ping timeout: 255 seconds]
cdt_ has quit [Quit: Ex-Chat]
cdt has quit [Quit: Ex-Chat]
slainer68 has quit [Remote host closed the connection]
cdt has joined #ruby
nyuszika7h has quit [Max SendQ exceeded]
dekroning has quit [Ping timeout: 246 seconds]
pcarrier has joined #ruby
cascalheira has joined #ruby
JohnBat26 has joined #ruby
Takehiro has quit [*.net *.split]
prezioso has quit [*.net *.split]
Solnse has quit [*.net *.split]
clocKwize has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
postmodern has quit [*.net *.split]
TomRone has quit [*.net *.split]
caveat- has quit [*.net *.split]
JohnTeddy has quit [*.net *.split]
asuka has quit [*.net *.split]
juarlex has quit [*.net *.split]
dcope has quit [*.net *.split]
wedgeV has quit [*.net *.split]
Cool_Fire has quit [*.net *.split]
pignata has quit [*.net *.split]
BombStrike has quit [*.net *.split]
nick_h has quit [*.net *.split]
xpen has quit [*.net *.split]
mikekelly has quit [*.net *.split]
ccooke has quit [*.net *.split]
rking has quit [*.net *.split]
FDj has quit [*.net *.split]
greenarrow has quit [*.net *.split]
answer_42 has quit [*.net *.split]
bigmcq77 has quit [*.net *.split]
Tref has quit [*.net *.split]
busybox42 has quit [*.net *.split]
Nykolla has quit [*.net *.split]
cj3kim has quit [*.net *.split]
adelcampo has quit [*.net *.split]
ben_alman has quit [*.net *.split]
SeySayux has quit [*.net *.split]
atmosx has quit [*.net *.split]
Weazy has quit [*.net *.split]
starship has quit [*.net *.split]
xbayrockx has quit [*.net *.split]
pcboy_ has quit [*.net *.split]
alee has quit [*.net *.split]
jgilbert has quit [*.net *.split]
fuho has quit [*.net *.split]
BadLarry has quit [*.net *.split]
yellow5 has quit [*.net *.split]
Luceo has quit [*.net *.split]
zf_ has quit [*.net *.split]
crankycoder has quit [*.net *.split]
ezra has quit [*.net *.split]
TheNumb has quit [*.net *.split]
methoddk has quit [*.net *.split]
justinweiss has quit [*.net *.split]
mtfk has quit [*.net *.split]
mariooo has quit [*.net *.split]
celthunder has quit [*.net *.split]
lahwran has quit [*.net *.split]
nw has quit [*.net *.split]
randym has quit [*.net *.split]
SeanTAllen has quit [*.net *.split]
patricksroberts has quit [*.net *.split]
rtl has quit [*.net *.split]
jayne has quit [*.net *.split]
anekos has quit [*.net *.split]
elektronaut has quit [*.net *.split]
reinaldob has quit [*.net *.split]
noxoc has quit [*.net *.split]
maxer has quit [*.net *.split]
chussenot has quit [*.net *.split]
robotmay has quit [*.net *.split]
cezar-b has quit [*.net *.split]
richardjapenga has quit [*.net *.split]
nomenkun has quit [*.net *.split]
und3f has quit [*.net *.split]
schaary has quit [*.net *.split]
dr_bob has quit [*.net *.split]
hamed_r has quit [*.net *.split]
monkegjinni has quit [*.net *.split]
tonini has quit [*.net *.split]
apok has quit [*.net *.split]
forced_request has quit [*.net *.split]
aetcore has quit [*.net *.split]
bpfh has quit [*.net *.split]
roadt has quit [*.net *.split]
_alejandro has quit [*.net *.split]
wwalker has quit [*.net *.split]
t-mart has quit [*.net *.split]
sj26 has quit [*.net *.split]
poRz has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
SoonerBourne has quit [*.net *.split]
SmoothSage__ has quit [*.net *.split]
moted has quit [*.net *.split]
skcin7 has quit [*.net *.split]
fast_ has quit [*.net *.split]
ddd has quit [*.net *.split]
brendan` has quit [*.net *.split]
joast has quit [*.net *.split]
senj has quit [*.net *.split]
hakunin has quit [*.net *.split]
mr-rich has quit [*.net *.split]
JoeJulian has quit [*.net *.split]
croz has quit [*.net *.split]
dpn` has quit [*.net *.split]
jaredrhine has quit [*.net *.split]
sirecote has quit [*.net *.split]
rcs has quit [*.net *.split]
Guedes has quit [*.net *.split]
benwoody has quit [*.net *.split]
realniko has quit [*.net *.split]
nickbuff has quit [Quit: Linkinus - http://linkinus.com]
18VAAEHPH is now known as chendo
chendo is now known as 18VAAEHPH
Takehiro has joined #ruby
hamed_r has joined #ruby
cezar-b has joined #ruby
schaary has joined #ruby
maxer has joined #ruby
Solnse has joined #ruby
chussenot has joined #ruby
robotmay has joined #ruby
clocKwize has joined #ruby
reinaldob has joined #ruby
nomenkun has joined #ruby
tonini has joined #ruby
und3f has joined #ruby
noxoc has joined #ruby
greenarrow has joined #ruby
xpen has joined #ruby
prezioso has joined #ruby
robbyoconnor has joined #ruby
dr_bob has joined #ruby
answer_42 has joined #ruby
Tref has joined #ruby
cj3kim has joined #ruby
apok has joined #ruby
richardjapenga has joined #ruby
monkegjinni has joined #ruby
forced_request has joined #ruby
bigmcq77 has joined #ruby
bpfh has joined #ruby
Nykolla has joined #ruby
roadt has joined #ruby
aetcore has joined #ruby
wwalker has joined #ruby
postmodern has joined #ruby
busybox42 has joined #ruby
_alejandro has joined #ruby
t-mart has joined #ruby
SecretAgent has joined #ruby
moted has joined #ruby
sj26 has joined #ruby
SmoothSage__ has joined #ruby
skcin7 has joined #ruby
poRz has joined #ruby
SoonerBourne has joined #ruby
senj has joined #ruby
adelcampo has joined #ruby
brendan` has joined #ruby
fast_ has joined #ruby
ben_alman has joined #ruby
hakunin has joined #ruby
Weazy has joined #ruby
SeySayux has joined #ruby
celthunder has joined #ruby
atmosx has joined #ruby
joast has joined #ruby
starship has joined #ruby
xbayrockx has joined #ruby
TomRone has joined #ruby
pcboy_ has joined #ruby
ddd has joined #ruby
jgilbert has joined #ruby
alee has joined #ruby
JoeJulian has joined #ruby
BadLarry has joined #ruby
fuho has joined #ruby
Luceo has joined #ruby
asuka has joined #ruby
JohnTeddy has joined #ruby
yellow5 has joined #ruby
caveat- has joined #ruby
zf_ has joined #ruby
juarlex has joined #ruby
crankycoder has joined #ruby
mr-rich has joined #ruby
ezra has joined #ruby
dcope has joined #ruby
TheNumb has joined #ruby
Cool_Fire has joined #ruby
methoddk has joined #ruby
justinweiss has joined #ruby
wedgeV has joined #ruby
pignata has joined #ruby
BombStrike has joined #ruby
croz has joined #ruby
lahwran has joined #ruby
mariooo has joined #ruby
elektronaut has joined #ruby
jayne has joined #ruby
anekos has joined #ruby
Guedes has joined #ruby
realniko has joined #ruby
randym has joined #ruby
benwoody has joined #ruby
SeanTAllen has joined #ruby
rcs has joined #ruby
patricksroberts has joined #ruby
rtl has joined #ruby
nw has joined #ruby
mtfk has joined #ruby
jaredrhine has joined #ruby
dpn` has joined #ruby
sirecote has joined #ruby
FDj has joined #ruby
nick_h has joined #ruby
rking has joined #ruby
mikekelly has joined #ruby
ccooke has joined #ruby
caveat- has quit [Max SendQ exceeded]
SmoothSage__ has quit [Max SendQ exceeded]
SecretAgent has quit [Max SendQ exceeded]
SecretAgent has joined #ruby
caveat- has joined #ruby
SmoothSage__ has joined #ruby
RubyPanther has quit [Ping timeout: 260 seconds]
alienvenom has quit [*.net *.split]
joofsh has quit [*.net *.split]
Companion has quit [*.net *.split]
Goles has quit [*.net *.split]
pavilionXP has quit [*.net *.split]
_veer has quit [*.net *.split]
idzuna has quit [*.net *.split]
ZubKonst_ has quit [*.net *.split]
xclite has quit [*.net *.split]
Villadelfia has quit [*.net *.split]
kkiero has quit [*.net *.split]
gyre007 has quit [*.net *.split]
katherinem13 has quit [*.net *.split]
crodas has quit [*.net *.split]
_cheney has quit [*.net *.split]
seich- has quit [*.net *.split]
jtcoon has quit [*.net *.split]
erichmenge has quit [*.net *.split]
asobrasil has quit [*.net *.split]
Nanuq has quit [*.net *.split]
fbernier has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
neersighted has quit [*.net *.split]
bjeanes has quit [*.net *.split]
ctevie has quit [*.net *.split]
jhowarth has quit [*.net *.split]
thomasfedb has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
drPoggs has quit [*.net *.split]
Voxxit has quit [*.net *.split]
msch has quit [*.net *.split]
dekroning has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
alienvenom has joined #ruby
idzuna has joined #ruby
pavilionXP has joined #ruby
xclite has joined #ruby
Goles has joined #ruby
erichmenge has joined #ruby
joofsh has joined #ruby
Sou|cutter has joined #ruby
jtcoon has joined #ruby
gyre007 has joined #ruby
jhowarth has joined #ruby
Villadelfia has joined #ruby
ctevie has joined #ruby
seich- has joined #ruby
kkiero has joined #ruby
Nanuq has joined #ruby
katherinem13 has joined #ruby
asobrasil has joined #ruby
_cheney has joined #ruby
crodas has joined #ruby
fbernier has joined #ruby
bjeanes has joined #ruby
Companion has joined #ruby
ZubKonst_ has joined #ruby
_veer has joined #ruby
msch has joined #ruby
Voxxit has joined #ruby
drPoggs has joined #ruby
thomasfedb has joined #ruby
Apocalypse has joined #ruby
neersighted has joined #ruby
<k610> if i do my_array.each do |x| ...
<k610> how can avoid that when i deal with very large arrays ?
<k610> I always get my_array printed after on irb or pry
<Hanmac> my_array.each { |x| ...};0
neersighted has quit [*.net *.split]
maxer has quit [*.net *.split]
chussenot has quit [*.net *.split]
dekroning has quit [*.net *.split]
reinaldob has quit [*.net *.split]
robotmay has quit [*.net *.split]
noxoc has quit [*.net *.split]
richardjapenga has quit [*.net *.split]
cezar-b has quit [*.net *.split]
und3f has quit [*.net *.split]
hamed_r has quit [*.net *.split]
tonini has quit [*.net *.split]
dr_bob has quit [*.net *.split]
nomenkun has quit [*.net *.split]
schaary has quit [*.net *.split]
monkegjinni has quit [*.net *.split]
apok has quit [*.net *.split]
forced_request has quit [*.net *.split]
aetcore has quit [*.net *.split]
bpfh has quit [*.net *.split]
moted has quit [*.net *.split]
sj26 has quit [*.net *.split]
wwalker has quit [*.net *.split]
_alejandro has quit [*.net *.split]
t-mart has quit [*.net *.split]
roadt has quit [*.net *.split]
skcin7 has quit [*.net *.split]
poRz has quit [*.net *.split]
SoonerBourne has quit [*.net *.split]
senj has quit [*.net *.split]
brendan` has quit [*.net *.split]
croz has quit [*.net *.split]
joast has quit [*.net *.split]
ddd has quit [*.net *.split]
mr-rich has quit [*.net *.split]
fast_ has quit [*.net *.split]
hakunin has quit [*.net *.split]
dpn` has quit [*.net *.split]
JoeJulian has quit [*.net *.split]
rcs has quit [*.net *.split]
Guedes has quit [*.net *.split]
jaredrhine has quit [*.net *.split]
sirecote has quit [*.net *.split]
realniko has quit [*.net *.split]
benwoody has quit [*.net *.split]
nyuszika7h has joined #ruby
<workmad3> k610: .each will return the array after it's finished
18VAAEHPH is now known as chendo
timonv has joined #ruby
[Neurotic] has quit [Excess Flood]
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
lele has quit [Ping timeout: 246 seconds]
xpen has quit [*.net *.split]
greenarrow has quit [*.net *.split]
Nykolla has quit [*.net *.split]
answer_42 has quit [*.net *.split]
Tref has quit [*.net *.split]
cj3kim has quit [*.net *.split]
bigmcq77 has quit [*.net *.split]
busybox42 has quit [*.net *.split]
atmosx has quit [*.net *.split]
starship has quit [*.net *.split]
ben_alman has quit [*.net *.split]
Weazy has quit [*.net *.split]
SeySayux has quit [*.net *.split]
adelcampo has quit [*.net *.split]
pcboy_ has quit [*.net *.split]
xbayrockx has quit [*.net *.split]
alee has quit [*.net *.split]
fuho has quit [*.net *.split]
BadLarry has quit [*.net *.split]
jgilbert has quit [*.net *.split]
yellow5 has quit [*.net *.split]
Luceo has quit [*.net *.split]
ezra has quit [*.net *.split]
zf_ has quit [*.net *.split]
crankycoder has quit [*.net *.split]
TheNumb has quit [*.net *.split]
justinweiss has quit [*.net *.split]
methoddk has quit [*.net *.split]
lahwran has quit [*.net *.split]
celthunder has quit [*.net *.split]
nw has quit [*.net *.split]
randym has quit [*.net *.split]
mariooo has quit [*.net *.split]
patricksroberts has quit [*.net *.split]
mtfk has quit [*.net *.split]
SeanTAllen has quit [*.net *.split]
rtl has quit [*.net *.split]
jayne has quit [*.net *.split]
anekos has quit [*.net *.split]
elektronaut has quit [*.net *.split]
<k610> the thing is the array is too big making the console freeze while trying to buffer the output string
chendo is now known as 18VAAEHPH
maxer has joined #ruby
chussenot has joined #ruby
noxoc has joined #ruby
neersighted has joined #ruby
dekroning has joined #ruby
reinaldob has joined #ruby
robotmay has joined #ruby
cezar-b has joined #ruby
richardjapenga has joined #ruby
und3f has joined #ruby
hamed_r has joined #ruby
schaary has joined #ruby
monkegjinni has joined #ruby
nomenkun has joined #ruby
dr_bob has joined #ruby
apok has joined #ruby
tonini has joined #ruby
aetcore has joined #ruby
forced_request has joined #ruby
bpfh has joined #ruby
roadt has joined #ruby
_alejandro has joined #ruby
wwalker has joined #ruby
t-mart has joined #ruby
skcin7 has joined #ruby
moted has joined #ruby
sj26 has joined #ruby
poRz has joined #ruby
senj has joined #ruby
hakunin has joined #ruby
joast has joined #ruby
ddd has joined #ruby
SoonerBourne has joined #ruby
JoeJulian has joined #ruby
fast_ has joined #ruby
brendan` has joined #ruby
mr-rich has joined #ruby
dpn` has joined #ruby
realniko has joined #ruby
croz has joined #ruby
rcs has joined #ruby
Guedes has joined #ruby
jaredrhine has joined #ruby
benwoody has joined #ruby
sirecote has joined #ruby
17SAB3J77 has joined #ruby
xpen has joined #ruby
answer_42 has joined #ruby
Nykolla has joined #ruby
greenarrow has joined #ruby
Tref has joined #ruby
cj3kim has joined #ruby
bigmcq77 has joined #ruby
adelcampo has joined #ruby
ben_alman has joined #ruby
busybox42 has joined #ruby
Weazy has joined #ruby
SeySayux has joined #ruby
celthunder has joined #ruby
starship has joined #ruby
atmosx has joined #ruby
pcboy_ has joined #ruby
xbayrockx has joined #ruby
alee has joined #ruby
jgilbert has joined #ruby
fuho has joined #ruby
BadLarry has joined #ruby
Luceo has joined #ruby
zf_ has joined #ruby
ezra has joined #ruby
TheNumb has joined #ruby
crankycoder has joined #ruby
yellow5 has joined #ruby
lahwran has joined #ruby
mariooo has joined #ruby
methoddk has joined #ruby
justinweiss has joined #ruby
rtl has joined #ruby
patricksroberts has joined #ruby
mtfk has joined #ruby
SeanTAllen has joined #ruby
randym has joined #ruby
anekos has joined #ruby
nw has joined #ruby
jayne has joined #ruby
elektronaut has joined #ruby
codecaster has quit [Read error: Connection reset by peer]
rohit has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<workmad3> k610: I tend to just put up with that in irb on the rare occasion I'm dealing with a large array
[Neurotic] has joined #ruby
KnowTheLedge has quit [*.net *.split]
digifiv5e has quit [*.net *.split]
Prudhvi has quit [*.net *.split]
array has quit [*.net *.split]
bluehavana has quit [*.net *.split]
lobak has quit [*.net *.split]
zodiak has quit [*.net *.split]
sejo has quit [*.net *.split]
tris has quit [*.net *.split]
gurps has quit [*.net *.split]
combataircraft has quit [*.net *.split]
mmercer has quit [*.net *.split]
aetaric has quit [*.net *.split]
kstephens has quit [*.net *.split]
joni has quit [*.net *.split]
pavelz has quit [*.net *.split]
willb has quit [*.net *.split]
al-ol has quit [*.net *.split]
nopper has quit [*.net *.split]
xAndy has quit [*.net *.split]
kaleido has quit [*.net *.split]
wang has quit [*.net *.split]
elaptics has quit [*.net *.split]
yugui_zzz has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
chiel has quit [*.net *.split]
<Hanmac> k610; as i said, put an ;0 at the end of the each
bluehavana has joined #ruby
tris has joined #ruby
KnowTheLedge has joined #ruby
xAndy has joined #ruby
nopper has joined #ruby
pavelz has joined #ruby
mmercer has joined #ruby
zodiak has joined #ruby
array has joined #ruby
kstephens has joined #ruby
lobak has joined #ruby
joni has joined #ruby
willb has joined #ruby
digifiv5e has joined #ruby
sejo has joined #ruby
gurps has joined #ruby
kaleido has joined #ruby
combataircraft has joined #ruby
Prudhvi has joined #ruby
chiel has joined #ruby
aetaric has joined #ruby
yugui_zzz has joined #ruby
zz_chrismcg has joined #ruby
wang has joined #ruby
elaptics has joined #ruby
al-ol has joined #ruby
xpen has quit [Remote host closed the connection]
sejo has quit [Max SendQ exceeded]
codecaster has joined #ruby
xpen has joined #ruby
sejo has joined #ruby
Iszak has joined #ruby
workmad3 has quit [*.net *.split]
Averna has quit [*.net *.split]
aganov has quit [*.net *.split]
thone_ has quit [*.net *.split]
freeayu has quit [*.net *.split]
pipopopo has quit [*.net *.split]
mnaser has quit [*.net *.split]
jbw has quit [*.net *.split]
Roa has quit [*.net *.split]
Rydefalk has quit [*.net *.split]
davorb has quit [*.net *.split]
palyboy has quit [*.net *.split]
Gm4n has quit [*.net *.split]
mattp_ has quit [*.net *.split]
queequeg1 has quit [*.net *.split]
maxmanders has quit [*.net *.split]
Martz has quit [*.net *.split]
hemanth has quit [*.net *.split]
etank has quit [*.net *.split]
Mathieu has quit [*.net *.split]
im0b has quit [*.net *.split]
davidboy has quit [*.net *.split]
musl has quit [*.net *.split]
filipe has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
Martz has joined #ruby
jbw has joined #ruby
Rydefalk has joined #ruby
Averna has joined #ruby
maxmanders has joined #ruby
Roa has joined #ruby
mnaser has joined #ruby
palyboy has joined #ruby
aganov has joined #ruby
Gm4n has joined #ruby
mattp_ has joined #ruby
hemanth has joined #ruby
freeayu has joined #ruby
pipopopo has joined #ruby
davorb has joined #ruby
Mathieu has joined #ruby
musl has joined #ruby
im0b has joined #ruby
davidboy has joined #ruby
queequeg1 has joined #ruby
etank has joined #ruby
thone_ has joined #ruby
lele has joined #ruby
robbyoconnor has joined #ruby
<k610> Hanmac: great,
<k610> do ... end;0
<k610> works too
baphled has joined #ruby
pcarrier has quit []
cakehero has joined #ruby
<Hanmac> i dont like the do ... end because it could fool you
<Hanmac> because do ... end are not equal to { ... }
Jdubs_ has joined #ruby
r0bby has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Jdubs_> Hey guys
<Jdubs_> o.
<Jdubs_> o/'
<workmad3> Hanmac: apart from one case in rspec, I've never found any differences between them
<workmad3> Hanmac: you can even chain on a do ... end
tonini has quit [Remote host closed the connection]
<workmad3> Hanmac: it just looks ugly and wrong :)
<Xeago> method argument { .. }
<Jdubs_> hey Xeago
<Jdubs_> o/
<Xeago> does the argument take the block?
<Xeago> hello
<Jdubs_> Xeago: would you mind looking at a pic of my site I'm working on an give an opinion or suggestions?
<Jdubs_> :)
wallerdev has quit [Quit: wallerdev]
<Xeago> as long as it is sfw
<workmad3> Xeago: hmm, good point, I never checked if there was a difference in precedence between them :)
<Jdubs_> Xeago yeah it is
robbyoconnor has quit [Ping timeout: 256 seconds]
hsbt_away is now known as hsbt
baroquebobcat has joined #ruby
qwerxy has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<Xeago> I'd prefer teasers instead of find out how I got involved into bla, or connect with me to derp
<Xeago> show an exceprt of your latest post
<Xeago> a verys hort intro in about me
cj3kim has quit [Ping timeout: 276 seconds]
polymar has joined #ruby
<Hanmac> Xeago & workmad3 i make you guys a table
<Hanmac> method argument { } treats argument as an method
<Hanmac> method1 method2(argument) { .. } method2 gets the block
<Hanmac> method1 method2 argument do;end method1 gets the block
<Hanmac> method argument do; end treats argument as an parameter
<Jdubs_> Xeago: I see... So "blah blah blah...." (click to continue) something like that?
RandyInLA has quit [Quit: RandyInLA]
<workmad3> Hanmac: right, so do;end has a different binding
<Xeago> Jdubs_: ish
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Xeago> don't make unnecessary pages/clicks
<workmad3> Hanmac: which you can make clear with more explicit parens :) method1(method2(argument)) {...}
<Xeago> that is 70's
<Jdubs_> Yeah, I'm trying to learn this whole web 2.0 stuff lol
<Jdubs_> I haven't made a page since the 90s
<Jdubs_> lol
<Xeago> take a look at bootstrap, especially what they call 'hero'
cakehero has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
<Xeago> Hanmac/workmad3 by any chance you running homebrew
<workmad3> Jdubs_: I'd probably go for a very simple, less blocky, less 'harsh' layout that simply had a link for blog, current projects (e.g. github account), social media links and an 'about me' section
17SAB3J77 has quit [Quit: Leaving]
<workmad3> Jdubs_: take a google around 'portfolio sites' for some really nice, clean, elegant styles :)
filipe has joined #ruby
<Jdubs_> Hmmm
<Jdubs_> I'm really bad at web design lol
<Jdubs_> But I need a page I feel
<workmad3> Jdubs_: same :)
<Jdubs_> Do you have a page?
<Xeago> I do, blog.xeago.nl
elaptics is now known as elaptics`away
<workmad3> Jdubs_: workmad3.com
elaptics`away is now known as elaptics
<workmad3> Jdubs_: I just shoved an octopress page on github for that though :)
<Jdubs_> What do you guys think of my logo bar at least?
<Jdubs_> I like that part
<workmad3> so it's really a blog with some fairly poor static pages... nothing great
<Xeago> it is big, takes up most of your screen away from content
<workmad3> Jdubs_: seems a bit stalinesque, IMHO
<bpfh> Hanmac, good synthesis
<workmad3> Xeago: I'm using homebrew, yes
<Jdubs_> So it would be good if I cut the size down a bit do you think? or should I scrap everything and start over? I spent all morning on this design heh
pcarrier has joined #ruby
<Xeago> after trying to brew ugrade today, I have 4 files in Library/ENV/pkgconfig/libcurl.pc marked as ?? by git
<workmad3> heh :) no idea
<bpfh> Hanmac, but could you explain to me why functions aren't first class in ruby? why such design decision?
banjara1 has quit [Quit: Leaving.]
<Xeago> you experiencing something similar?
banjara has joined #ruby
dmiller has joined #ruby
<workmad3> bpfh: how are they not first-class objects?
banjara has quit [Client Quit]
pabloh has quit [Ping timeout: 245 seconds]
maasha has joined #ruby
RubyPanther has joined #ruby
<workmad3> Jdubs_: I dunno... it's all about how you want to look tbh... and in all honesty, most programmers sites look a bit poor :)
* maasha is messing with javascript
<bpfh> if you define a function with the def operator it returns a null and you can't pass a function as an argument like you do in javascript
<maasha> javascript syntax is so ugly compared to ruby.
<workmad3> bpfh: sure you can, you just need to grab it differently
duked has joined #ruby
<Jdubs_> workmad3: that makes me feel better! maybe I should just use a premade like you lol
margle has quit [Ping timeout: 252 seconds]
<workmad3> bpfh: and sure 'def' is a keyword for defining methods, it doesn't return a bound method object (hell, most of the time you use it, it can't return a bound method object, because it has nothing to be bound to)
hotovson has quit [Ping timeout: 240 seconds]
<workmad3> bpfh: some_method(obj.method(:something), obj.method(:something_else) )
pcarrier has quit [Ping timeout: 252 seconds]
g-ram has quit [Ping timeout: 265 seconds]
schaary has quit [Quit: Leaving.]
<bpfh> well, you have to create a lambda or a proc and this doesn't sound quite the same thing
<workmad3> bpfh: see previous statement where you get bound methods
pcarrier has joined #ruby
<workmad3> bpfh: it's just that the syntax doesn't allow for it as easily as javascript, because of the allowance for calling a method without parens
shevy has quit [Ping timeout: 245 seconds]
<duked> hello, I would like to merge hashes based on the filename and sum weights (and skip frequency) : http://pastebin.com/jEF43CDh
margle has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
<duked> i tried with inject but without success
<Jdubs_> workmad3: you have an extra bullet point in your CV btw
<workmad3> Jdubs_: heh :) not surprising :P
hotovson has joined #ruby
rcvalle has joined #ruby
samphippen has joined #ruby
<bpfh> workmad, well... you're passing as an argument a reference to a method associated to an object
<bpfh> in my opinion this doesn't provide the same power that functions have in javascript
chussenot has quit [Quit: chussenot]
derekm has joined #ruby
greenarrow has quit [Ping timeout: 276 seconds]
berserkr has joined #ruby
chussenot has joined #ruby
Cakey has joined #ruby
nomenkun_ has joined #ruby
claymore has quit [Ping timeout: 268 seconds]
horofox has joined #ruby
<workmad3> bpfh: care to expand on what you feel is lacking?
greenarrow has joined #ruby
r0bby has quit [Ping timeout: 240 seconds]
Jdubs_ has quit [Ping timeout: 240 seconds]
twinturbo has quit [Quit: twinturbo]
nomenkun has quit [Ping timeout: 245 seconds]
<Hanmac> bpfh: Dir["*"].map(&File.method(:size)).inject(0,:+)
<bpfh> sure... in javascript you can have a function with a free this that will make a reference to whatever function binds it to, so you can share the same function between many prototypes
<workmad3> bpfh: you can unbind a method and bind it to a different object
duked has quit [Ping timeout: 245 seconds]
<Banistergalaxy> Bpfh use instance_exec
<workmad3> bpfh: and besides, that's a side-effect of the prototype inheritance more than anything else, on top of which you can share the same method between many objects using modules
beiter has joined #ruby
<workmad3> bpfh: plus what Banistergalaxy just said :)
F1skr has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
cj3kim has joined #ruby
<bpfh> just a moment, let me read about instance_exec lol
fantazo has quit [Remote host closed the connection]
atmosx has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
claymore has joined #ruby
claymore has quit [Changing host]
claymore has joined #ruby
atmosx has joined #ruby
<workmad3> bpfh: instance_eval a block, and it changes the context of 'self' to the target of the instance_eval call, e.g. 'some_obj.instance_eval(&some_block)' will change the context of 'self' to 'some_obj' while calling 'some_block'
greenarrow has quit [Read error: Connection reset by peer]
greenarrow has joined #ruby
greenarrow has quit [Client Quit]
kirun has joined #ruby
<Xeago> wjats the difference between instance_eval and instance_exec?
<bpfh> ok but here you're talking about a block
<workmad3> bpfh: by 'block' it's a callable
<workmad3> bpfh: which includes blocks, procs, lambdas and method objects
<Hanmac> bpfh where instance_method is useful: Object.instance_method(:to_s).bind([]).call => "#<Array:0x000000009f3300>"
ianfleeton has joined #ruby
<workmad3> bpfh: it sounds more like you're complaining that the way ruby does things isn't the same as the way javascript does things :P
xpen has quit [Remote host closed the connection]
rohit has quit [Quit: Leaving]
hamed_r has quit [Ping timeout: 245 seconds]
<bpfh> workmad3, it's not that, workmad3, I have to see in more detail the unbinding capability that ruby provides, maybe it turns out to be truly an equivalent to javascript functions
<bpfh> what I'm talking about is the programming practice of passing around functions by name that's very common in javascript and not in ruby
<workmad3> bpfh: yeah, that *style* isn't common
<bpfh> and see that I'm not complaining, I just asked why
<workmad3> bpfh: because ruby makes it more difficult to do, as opposed to just using blocks
<workmad3> bpfh: however, it's not because methods aren't first-class (they are), they're just more awkward to get a handle on and use
ChampS666 has quit [Ping timeout: 256 seconds]
Michael__ has joined #ruby
sejo has quit [Quit: leaving]
<workmad3> bpfh: that accepted answer conflates implementation detail with conceptual model, IMO
Virunga has quit [Remote host closed the connection]
sejo has joined #ruby
emergion has joined #ruby
Peter-W has joined #ruby
maasha has left #ruby [#ruby]
Peter-W has left #ruby [#ruby]
derekm has quit [Remote host closed the connection]
Solnse has quit [Ping timeout: 240 seconds]
<bpfh> well, I share their opinion that methods are not first class constructs
<bpfh> but see that I'm not complaining, it's just a design decision and I wanted to know more about it
cousine has joined #ruby
<workmad3> bpfh: js - get a function object, bind it to a target, call it with arguments (all in one method - some_function.call(target, arguments) ), ruby - get a method object, bind it to a target, call it with arguments ( Object.instance_method(:to_s).bind(target).call(arguments) )
dagnachew has joined #ruby
VolodymyrB has joined #ruby
<workmad3> bpfh: methods are as first-class as any other object in ruby
<workmad3> bpfh: just more awkward to grab than in JS
<VolodymyrB> Hi, please explain what 'do' statement do in this case https://gist.github.com/4065309
davai has quit [Quit: Leaving...]
prezioso has quit [Ping timeout: 240 seconds]
<bpfh> workmad3, in my opinion this sounds more like a composition than a first class method but it's ok, I really got your point and my intention is not to discuss semantics
<workmad3> bpfh: it's all about semantics though ;)
MrSamuel has joined #ruby
<dagnachew> hello everyone
<workmad3> bpfh: I admit I don't think of methods as objects very often in ruby (certainly not as often as I think of procs as objects, etc). And the process of getting them is more convoluted
Edward_ has joined #ruby
<dagnachew> anyone one any idea on concurrency in ruby 2.0 ?
cousine has quit [Remote host closed the connection]
kil0byte has quit [Remote host closed the connection]
carloslopes has joined #ruby
<bpfh> workmad3, neither do I :)
katherinem13 has quit [Ping timeout: 246 seconds]
cousine has joined #ruby
<Hanmac> VolodymyrB from that i could see it does an instance_eval for the object that the service method generated internal ... so the supports function is called on this object and not at the main object
postmodern has quit [Quit: Leaving]
<workmad3> bpfh: I just find the implementation optimisation of 'methods get wrapped into objects when requested' more convoluted and needlessly complicated than 'methods are objects, I can grab them with method(:name)'
<workmad3> bpfh: similar to the implementation distinction between procs and blocks that is needlessly complicated (unless you're writing something like pry :P )
<workmad3> bpfh: it's a great complication, but conceptually unimportant in most circumstances :)
chussenot has quit [Quit: chussenot]
<VolodymyrB> Hanmac: thanks
<workmad3> s/complication/optimisation
<workmad3> dunno how the hell I managed that :/
jds has quit [Ping timeout: 268 seconds]
jds has joined #ruby
<Banistergalaxy> Bpfh I don't think of methods as objects, they are the messages passed between objects, not objects themselves
<Xeago> you throw an object a message containing an object?
<Xeago> like an attachment?:)
<Banistergalaxy> It's result of message passing OO system
bier has quit [Ping timeout: 240 seconds]
jds_ has joined #ruby
<Banistergalaxy> bpfh lamdas and procs are our first class functions
jrajav has joined #ruby
bier_ has quit [Ping timeout: 268 seconds]
<bpfh> Banistergalaxy, I agree with you
vlad_starkov has joined #ruby
<bpfh> and this is an important design decision that must have a strong rationale behind it
jds_ has quit [Read error: Connection reset by peer]
jds_ has joined #ruby
jds has quit [Ping timeout: 256 seconds]
rippa has joined #ruby
u89 has joined #ruby
philcrissman has joined #ruby
koshii_ has joined #ruby
RudyValencia has quit [Quit: Hacked By Chinese!]
jenrzzz has joined #ruby
wreckimnaked has quit [Read error: Operation timed out]
baroquebobcat has quit [Quit: baroquebobcat]
darthdeus has joined #ruby
<Banistergalaxy> Bpfh I think smalltalk is the same. And it kinda works, I rarely desire method objects, blocks are usually good enough
jds_ has quit [Read error: Connection reset by peer]
youconsulting has joined #ruby
jds has joined #ruby
Edward_ has quit [Ping timeout: 264 seconds]
shevy has joined #ruby
Michael__ has quit [Remote host closed the connection]
<youconsulting> I have a controller 'logout_controller' with a method index and a view in my routes file i have the following: match 'logout', :to => 'logout#index' now i wanna link to this page but I can't get it to work:<%= link_to 'Logout', logout %>
<bpfh> Banistergalaxy, yeah it leads to a distinctive style of programming
kil0byte has joined #ruby
jds has quit [Read error: Connection reset by peer]
jds has joined #ruby
bier has joined #ruby
bier_ has joined #ruby
jds has quit [Remote host closed the connection]
dmiller has joined #ruby
jds has joined #ruby
philcrissman has quit [Remote host closed the connection]
larissa has joined #ruby
lolmaus has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<bpfh> Banistergalaxy, in my opinion it makes the language more static and therefore more clear and easy to understand
<bpfh> but at the same time some programming practices like closures sound more awkward and unnatural
baroquebobcat has joined #ruby
claymore has quit [Quit: Leaving]
dmiller has quit [Ping timeout: 260 seconds]
kil0byte_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
jds has quit [Read error: No route to host]
jds has joined #ruby
vlad_starkov has joined #ruby
dagnachew has quit [Remote host closed the connection]
equus has joined #ruby
<equus> bpfh: it also speaks to encapsulation, since objects can only communicate via message sends, they can't access eachothers internal state directly
kil0byte has quit [Ping timeout: 256 seconds]
cascalheira has quit [Ping timeout: 244 seconds]
<workmad3> equus: can't you keep with one name? :(
<equus> bpfh: unlike say in python
<equus> workmad3: phone vs laptop, phone connection is good, laptop connection is bad :)
d3vic3 has joined #ruby
prezioso has joined #ruby
<workmad3> equus: what's wrong with the traditional Banister_? :P
equus is now known as banisterfiend
<banisterfiend> workmad3: just like to mix it up
<banisterfiend> hehe
<workmad3> :)
emergion has quit [Quit: Computer has gone to sleep.]
<banisterfiend> bbl
Virunga has joined #ruby
hamed_r has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
ananthakumaran has joined #ruby
u89 has quit [Remote host closed the connection]
whitedawg has joined #ruby
greenarrow has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Drakevr has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
darthdeus has quit [Quit: Leaving...]
vlad_starkov has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
cakehero has joined #ruby
cj3kim has joined #ruby
mmitchell has joined #ruby
t-mart has quit [Ping timeout: 245 seconds]
sawsaw has joined #ruby
<sawsaw> Hi, is there and easy way to extract geo point info from images with ruby?
vickaita has joined #ruby
youconsulting has quit [Quit: Page closed]
<JonnieCache> sawsaw: do you mean the gps data thats embedded in the file?
<kalleth> i've done extraction of photo metadata (exif) with ruby
<kalleth> and mogrify
<kalleth> not specifically geo data, but
banisterfiend has quit [Ping timeout: 240 seconds]
Drakevr has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
<kalleth> top is how to work it within carrierwave
<kalleth> second is a list of the keys
<sawsaw> JonnieCache: I have few images and need to know any geo point of such info, you can call it gps i guess yeah :)
<sawsaw> kalleth: oh seems cool
vlad_starkov has quit [Ping timeout: 276 seconds]
<kalleth> sawsaw: you'll need to adjust the approach if not using carrier wave in a rails app, but the essentials are there
<kalleth> i think that uses minimagick gem
<kalleth> so you create a minimagick image, manipulate it (i think it then uses mogrify cli tool)
<kalleth> and what you get back also has array of metadata
<kalleth> but you have to query it specifically for the metadata
<kalleth> as i think minimagick uses method_missing
anthonym has joined #ruby
dekroning has quit [Ping timeout: 245 seconds]
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 240 seconds]
seanyo has quit [Read error: Connection reset by peer]
acrocity has quit [Quit: leaving...]
samphippen has joined #ruby
sawsaw has quit [Quit: Page closed]
osvico has joined #ruby
ChronocityLC has joined #ruby
acrocity has joined #ruby
horofox has quit [Ping timeout: 255 seconds]
szuja has joined #ruby
szuja has left #ruby [#ruby]
greenarrow has quit [Ping timeout: 240 seconds]
areil_ has joined #ruby
u89 has joined #ruby
greenarrow has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
vickaita has quit [Ping timeout: 260 seconds]
frytaz1 has joined #ruby
<frytaz1> hi how do i install bundler system wide ?
<frytaz1> if i run bundle as root it uses 1.2.1 and from some other user it uses older version
<Xeago> what is the output of which bundler on both accounts?
nomenkun_ has quit [Read error: Connection reset by peer]
areil has quit [Ping timeout: 268 seconds]
bhavesh_a_p has joined #ruby
Elico has joined #ruby
Elico has quit [Remote host closed the connection]
maesbn_ has joined #ruby
snuglepuss has joined #ruby
maesbn has quit [Read error: Operation timed out]
horofox has joined #ruby
nomenkun has joined #ruby
tbrock has joined #ruby
pcboy_ has quit [Read error: Connection reset by peer]
<frytaz1> /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/ui.rb:56:in `<class:UI>': uninitialized constant Gem::SilentUI (NameError)
pcboy_ has joined #ruby
hsbt is now known as hsbt_away
<frytaz1> when i run it as sudo -u gitlab
<frytaz1> and as root it works fine using 1.2.1
ksk has quit [Ping timeout: 268 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
tvw has quit [Remote host closed the connection]
ksk has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
codecaster has quit [Read error: Connection reset by peer]
darthdeus has joined #ruby
darthdeus has quit [Client Quit]
codecaster has joined #ruby
haxrbyte has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
mmikeym has joined #ruby
haxrbyte_ has joined #ruby
geekbri has joined #ruby
IrishGringo has joined #ruby
vickaita has joined #ruby
irving has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
anthonym has left #ruby [#ruby]
haxrbyte has quit [Ping timeout: 276 seconds]
kil0byte has joined #ruby
ltsstar has joined #ruby
Cakey has quit [Ping timeout: 240 seconds]
ybur has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
shtirlic_ has quit [Read error: Connection reset by peer]
havenn has joined #ruby
Jasko has joined #ruby
irving has quit [Client Quit]
shiin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kil0byte_ has quit [Ping timeout: 260 seconds]
tbrock has joined #ruby
wreckimnaked has joined #ruby
bhavesh_a_p has quit [Quit: Leaving]
tk__ has joined #ruby
x0F has quit [Disconnected by services]
Elico has joined #ruby
x0F_ has joined #ruby
x0F_ is now known as x0F
irving has joined #ruby
cmarques has joined #ruby
brunchpoems has quit [Ping timeout: 245 seconds]
jxf has joined #ruby
slainer68 has joined #ruby
brunchpoems has joined #ruby
k610 has quit [Ping timeout: 268 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
mmitchell has quit [Remote host closed the connection]
k610 has joined #ruby
hsbt_away is now known as hsbt
pigoz has quit [Ping timeout: 248 seconds]
greenarrow has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
tbrock has quit [Quit: Computer has gone to sleep.]
schickung has joined #ruby
mohanmcgeek has joined #ruby
adelcampo has quit [Quit: Leaving...]
RudyValencia has joined #ruby
schickung has quit [Client Quit]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<ybur> d
ybur has quit [Quit: irc2go]
ffranz has quit [Quit: Leaving]
niklasb has joined #ruby
pigoz has joined #ruby
itchyouch has joined #ruby
nanderoo has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
jds has quit [Remote host closed the connection]
mohanmcgeek1 has joined #ruby
mohanmcgeek has quit [Quit: Leaving.]
answer_42 has quit [Ping timeout: 276 seconds]
Raimondi has joined #ruby
timonv has joined #ruby
dekroning has joined #ruby
ffranz has joined #ruby
food has joined #ruby
skaczor has joined #ruby
etehtsea has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
whitedawg has quit [Quit: Leaving.]
cburyta has quit [Remote host closed the connection]
<shevy> bundler will always lead to more problems than it will manage to fix
telling has quit [Read error: Operation timed out]
telling has joined #ruby
telling has quit [Changing host]
telling has joined #ruby
Elico has quit [Ping timeout: 252 seconds]
Muz has quit [Read error: Operation timed out]
shtirlic has joined #ruby
Muz has joined #ruby
apeiros_ has joined #ruby
Elico has joined #ruby
Hanmac has quit [Quit: Leaving.]
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Hanmac has joined #ruby
<workmad3> shevy: bit of a negative opinion... and I take it you base this on your deep knowledge of the problems that bundler tackles and how it attempts to solve them?
<shevy> what deep knowledge? it never worked
<shevy> but go help frytaz1 workmad3
Cakey has joined #ruby
<workmad3> shevy: rather than your usual stance of 'I don't understand bundler! it must be bad!' :P
<food> Hi, I would like to create a new hash, it should be a merge of two existing hashes based on a 'filename', add all their 'weights' (and skip 'frequency') : http://pastebin.com/26jabTH5
<shevy> if it would be great, why would people come with their problems here?
<workmad3> shevy: oh, by the same extension ruby must be bad because some people have problems?
<shevy> workmad3: of course not. ruby is great, 95% of the problems that people have can be solved quite quickly
brunchpoems has quit [Quit: leaving]
schickung has joined #ruby
vickaita has quit [Ping timeout: 245 seconds]
<workmad3> shevy: and scrolling up, frytaz1's issue looks like a barfed up linux environment :P
JustinCampbell has joined #ruby
<workmad3> shevy: with multiple versions installed and no way to specify which one to use
<shevy> food: you want to count up the value for "weight" ?
elaptics is now known as elaptics`away
<food> yep
<shevy> workmad3: I am not defending the linux environment. I used gobolinux for years, appdirs beat the crap out of FHS. the FHS is unable to deal with multiple versions installed side by side, that is why debian uses pseudo-versioning like /usr/bin/ruby1.8 which is a worse solution than appdirs
<shevy> or gentoo uses that eselect crap
<shevy> food: ok
<shevy> "frequency" is discarded?
elsifaka has quit [Quit: Veloma e!]
<shevy> well
<workmad3> shevy: just seems that every time an issue comes up that even mentions bundler you jump on your favorite topic of 'bundler must be crap, lets beat on it'
<shevy> let's assume you only require "weight"
<shevy> bundler is crap :)
<workmad3> shevy: which gets kinda annoying :P
<workmad3> shevy: again, I ask on what you base that opinion?
elaptics`away is now known as elaptics
<shevy> workmad3: on the base that the official rails tutorial, which mandated to use bundler, exploded into my face
<food> shevy: yup discarded if possible
<workmad3> shevy: and this was when?
mark_locklear has joined #ruby
<shevy> workmad3: about 16 months ago, roughly
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
krawchyk has joined #ruby
lenodroid has joined #ruby
<workmad3> shevy: right, so because an update got through that caused an issue on your machine (and might have been a doc bug and since been solved) over a year ago, the tool is permanently and completely broken to you
ananthakumaran has joined #ruby
jds has joined #ruby
<shevy> food: are these 4 separate hashes? or available in some container? because if so, it would be quite easy to use .select
itchyouch has joined #ruby
<shevy> workmad3: perhaps it will get better
<shevy> workmad3: perhaps not :)
vickaita has joined #ruby
<shevy> it's becoming more and more important however
answer_42 has joined #ruby
<workmad3> shevy: incidentally, 16 months ago is before bundler had even gotten to version 1
<workmad3> or was it just at version 1?
<food> shevy: hashes are in an array
<workmad3> something like that anyway
<shevy> food: ok
<Cork> is there a "value" you can pass as a function argument to make it become the default value?
<shevy> food: well, if it is an array, you could actually iterate through it via .each and just sum up the value of hash["weight"]
<shevy> hmm probably via .inject, lemme see
<workmad3> shevy: incidentally, bundler v0.9 - bundler v1 caused issues (because they addressed some things that needed breaking changes), so a doc that may not have been updated to v1 could easily explode, on top of which, I can tell you that I've been using bundler since 0.9, backported it onto older projects and while I've encountered some issues the tool has been mostly damn solid, well engineered and solved issues that caused *major* headach
iamjarvo has joined #ruby
<Cork> ex. so you can set name and options but leave value in this one => def example(name, enabled=true,options={})
havenn has quit [Remote host closed the connection]
<apeiros_> Cork: sadly, no, there is no such value
bluOxigen has joined #ruby
<Cork> ouch
<food> shevy: i have to count up weights for pages with the same filename (in my example they all have the same filename, but sometimes I could have filename3.html)
<workmad3> shevy: so you constantly screaming about bundler being crap from one experience gets kinda annoying considering I've now had 2 years of generally good experience out of it :P
<Cork> apeiros_: thx
<apeiros_> if you're lucky, the method is implemented in a way to replace e.g. nil with a default value
heruka has joined #ruby
<apeiros_> but it's up to the method implementor to do that
<apeiros_> all you can do is look up the current default value for that argument and pass that
wchun has quit [Read error: Operation timed out]
<shevy> food: well ok let's do one thing at a time
wchun has joined #ruby
spike|spiegel has joined #ruby
<shevy> food: http://pastie.org/5371589 now we should have only those with "filename2.html"
invisime has joined #ruby
<shevy> and from these then you need to sum up the "weight" values
<shevy> food: this would work http://pastie.org/5371602 which you could put into a method that does the calculation, however it also has about 5 lines unnecessary...
<shevy> .inject hates me
d3vic3 has quit [Ping timeout: 256 seconds]
jsj has joined #ruby
<food> oki shevy thank you for you help :)
rh1n0 has joined #ruby
<shevy> food: Hanmac here is good for one-liners
d3vic3 has joined #ruby
<food> :o
Elico has quit [Quit: elico]
<shevy> ah
chussenot has joined #ruby
shtirlic_ has joined #ruby
<shevy> array.inject(0) {|sum, element| sum.to_i+element['weight'].to_i}
<shevy> still has too much, but that way you can avoid the local variable sum in the example, removing a few more lines
whitedawg has joined #ruby
csaunders has joined #ruby
tommyvyo has joined #ruby
chichou has joined #ruby
nari has joined #ruby
axl_ has joined #ruby
<apeiros_> sum.to_i is not necessary
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
<arietis> why for is faster than while?
<arietis> almost 10% difference
jds has quit [Remote host closed the connection]
<apeiros_> arietis: any chance to be more vague?
jrist-afk is now known as jrist
Virunga has quit [Remote host closed the connection]
<apeiros_> arietis: and you measured how?
<apeiros_> also, i+=1 with the for is not necessary
vickaita has quit [Ping timeout: 252 seconds]
<arietis> by running in rubymate
Cultofmetatron has joined #ruby
<arietis> lol
<arietis> it becomes 55% faster in this case
<apeiros_> yeah, not reliable
<apeiros_> do a proper benchmark, measure CPU time not realtime
<apeiros_> then you have a halfway meaningful number
<apeiros_> also don't forget to do enough iterations
Cultofmetatron has quit [Remote host closed the connection]
<apeiros_> for … in is 40% slower here (ruby 1.9.3-p286)
hynkle has joined #ruby
hynkle has quit [Client Quit]
stayarrr has joined #ruby
<mohanmcgeek1> for...in is better than while. Enough said.
<Hanmac> each is better than for
<workmad3> 10.times do ...
jds has joined #ruby
<Hanmac> or upto, downto, step
whitedawg1 has joined #ruby
<shevy> let's DANCE
whitedawg1 has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
<workmad3> 1.upto(n) do
<Hanmac> xD
<mohanmcgeek1> .. they all iterate.. Does it have a difference?
jrist is now known as jrist-mtg
<mohanmcgeek1> An iterator is better than while(i<n){ blablabla..; i+=1}
whitedawg has quit [Ping timeout: 252 seconds]
samphippen has joined #ruby
<Hanmac> iterators/enumerators are more cool and more the ruby way of life
<mohanmcgeek1> +1
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
nospam99 has joined #ruby
<nospam99> good morning - is anyone listening?
<Hanmac> nope
<nospam99> :) smartass
<nospam99> I have an rvm question/problem ....
<mohanmcgeek1> yes, I'm listening to music.. problem?
<Hanmac> goto #rvm
jrajav has joined #ruby
LMolr has joined #ruby
daniel_- has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
<shevy> hehehe
<nospam99> #rvm has a nastygram - something about having to be invited
<shevy> uninstall rvm!
<shevy> be a man, compile ruby from source
<shevy> ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.bz2
<nospam99> can do that shevy
<nospam99> but rvm is supposed to be so great, so I'm trying to give it a chance
<shevy> well if #rvm does not want you to join, it's a way of them telling you to "don't use rvm, we don't want to help you anyway"
<Xeago> or do as instructed
<mohanmcgeek1> nospam99: You just need to be registered.
<mohanmcgeek1> that nickserv identify thing..
<nospam99> I here you shevy ... but came here just in case someone here could/would help with rvm
<shevy> #ruby-lang requires registration too if you want to speak there
<shevy> only #ruby is free for everyone
<nospam99> ah mohanmcgeek1, sounds like a "key" to a lock ...
<nospam99> can you give me a quick "howto" on nickserv?
<Xeago> nospam99: freenode.net/faq
<shevy> /msg nickserv identify your_password_here
<nospam99> tks Xeago - I'll take a look
bbttxu has joined #ruby
<mohanmcgeek1> just type /msg nickserv help
<shevy> /msg nickserv register your_password_here
hamed_r has quit [Quit: Leaving]
<mohanmcgeek1> oh damn wtf, an ugly -1- at the end of my name.
<mohanmcgeek1> i'll be back.
<nospam99> tks all - I suspect you have given me enough to get into #rvm - but must go do "homework" now
<shevy> hehe
mohanmcgeek1 has quit [Quit: Leaving.]
<Xeago> nospam99: there's also other tools
macabre has joined #ruby
<Xeago> like rbenv and rbfu
mohanmcgeek has joined #ruby
<shevy> or the source!!!
Guest91808 has joined #ruby
<mohanmcgeek> bac
<Hanmac> may be the source with you :D
<Xeago> I'd recommend the gem ruby-build for that
<shevy> hmm what's that doing? let's google...
<Xeago> builds from source
<mohanmcgeek> seriously, I find myself to be the no-technology-duck here..
<shevy> "ruby-build is an rbenv plugin"
<shevy> :( requires rbenv
<Xeago> can be run without rbenv
<mohanmcgeek> why not rvm>>>
<Xeago> shevy: see the standalone section
<shevy> I think the rbenv author does not like rvm
<shevy> :)
linoj has joined #ruby
<Xeago> the rbenv author was initially a committer of rvm aswell
<nospam99> btw, I get 404 on freenode.net/faq
<shevy> rbenv install 1.9.3-p327
<Xeago> freenode.net/faq.shtml — sorry
<shevy> nospam99: did you try to run the register command already?
<nospam99> :)
<shevy> you'll get some status information from freenode once you try it
<shevy> in your IRC client
<nospam99> not yet - I like to read a bit first
<mohanmcgeek> Are you all always like "We hate rvm", or that somehow becomes the topic everytime I enter this channel?
JustinCampbell has quit [Remote host closed the connection]
<shevy> "Ruby versions will be installed into a directory of the same name under ~/.rbenv/versions."
<spike|spiegel> register command already?
<spike|spiegel> 19:38 < nospam99> :)
<nospam99> well, mohan, I can say that what little I've seen of rvm, the doc is inadequate and it does NOT work seamlessly "out of the box"
<shevy> mohanmcgeek: who said he hates rvm?
<spike|spiegel> oops, cat
<Xeago> shevy: if using ruby-build alone, you have to specify a destination
<shevy> ah ok... nospam99 does
* workmad3 uses ruby-build and rbfu
<nospam99> but lots of serious folks love it so there must be some value add once past the birth pains
<shevy> aha... it's a growing list now :)
<Xeago> nospam99: lots of serious folks hate it aswell
<mohanmcgeek> shevy: note the 'like' part.. it's like regex wildcard..
prezioso has quit [Read error: Operation timed out]
<nospam99> <sigh> Obie Fernandez and Mike Hartl like it
<mohanmcgeek> ^ no no, nvm.. forget that.. i named it wrong.
<workmad3> nospam99: the people I've seen have 'birth pains' with rvm are the same people that would have birth pains with rbenv :P
<shevy> hey, he said rvm docu sucks more
<shevy> Hanmac: this shows you that you should not forget documentation for your projects
<erichmenge> I've gone back and forth a bit. For whatever reason rvm seems to make my shell start less slowly than rbenv
<erichmenge> haven't tried rbfu yet
<mohanmcgeek> nospam99: Why don't you just throw the question and see if someone in this channel can help you?.. They're all smart people.. you know..
<Xeago> erichmenge: that would be a correct assessment, if you want total leanness and lightweight
<Xeago> go for rbfu
<Xeago> it is _way_ lighter than rbfu
<nospam99> k - but first advice here WAS to get into the #rvm channel
<Xeago> rbfu lighter than rbenv*
bbttxu has quit [Quit: bbttxu]
<mohanmcgeek> rule 1 of irc: avoid redirects.
<Xeago> nospam99: to get stuff for rvm
<nospam99> I did what I think is called the single user rvm install
<workmad3> erichmenge: well, doesn't rbenv have to write out its shims in order to activate?
<nospam99> and now rvm fails to install a ruby
snuglepuss has quit [Remote host closed the connection]
<shevy> rvm sucks anyway
<shevy> :D
OldOats has joined #ruby
jonathanwallace has joined #ruby
<nospam99> looks to me like inadequate permissions
<shevy> AHA!
<shevy> ARE YOU NOT THE SUPERUSER!
<mohanmcgeek> sudo !!
<shevy> duso!
<nospam99> I've tried rvm before as root - worked better - but I want to be able to use it as a non-root user
<mohanmcgeek> sudo bang bang
<nospam99> sudo ALL .. ALL etc etc?
<mohanmcgeek> if you install it as super user, you should still be able to use it as normal user..
<mohanmcgeek> right?
<mohanmcgeek> or maybe, it's just my comp that gives me weird pancakes...
<apeiros_> wow, off for a minute and everybody argues about which screwdriver is better to drive a nail into a wall…
<Xeago> :D
<nospam99> i.e. do all users of rvm have to be defined in /etc/sudousers as having ALL permissions?
<workmad3> nospam99: no
<Xeago> nospam99: that would be a horrible thing to do
<apeiros_> mohanmcgeek: your computer gives you pancakes? I WANT ONE!
<workmad3> nospam99: with a multi-user rvm install, users that can install new rubies and gems just need to be in the rvm group
<mohanmcgeek> apeiros_: Yes, Weird pancakes... ask your comp.
<nospam99> I agree, but I've seen some config comments, especially in Ubuntu that suggest that is needed
nomenkun_ has joined #ruby
<apeiros_> mohanmcgeek: mine doesn't give me pancakes. neither weird nor normal :(
<spike|spiegel> rvm sucks, can we move on now please?
<nospam99> k - what is the "rvm group"? did I miss some doc somewhere in the rvm install instructions about setting that up?
<mohanmcgeek> apeiros_: The pancakes are only my suspicion. Might not be true.
<mohanmcgeek> spike|spiegel: That's not the solution to the problem.
<spike|spiegel> don't use it and problem solved?
<mohanmcgeek> nospam99: Do you get any Error in console?
<workmad3> nospam99: it's added as part of the install script
<workmad3> nospam99: and the user that ran the script is added automatically
mmitchell has joined #ruby
<workmad3> (unless they've changed things recently)
<nospam99> hmmmm - let me see if it's already there ....
<nospam99> meanwhile, for your reading enjoyment, the error I get is ....
<workmad3> nospam99: you will need to log out and back in with that user
theRoUS has joined #ruby
ttt has quit [Remote host closed the connection]
<nospam99> [dnlruby@rubyserver ~]$ rvm install 1.9.2 Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file yaml-0.1.4.tar.gz 3 460k 3 16150 0 0 19339 0 0:00:
aquaranto has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
<nospam99> hmmm - there is an rvm group but the user is NOT in it - should my first step be to add the user to the group?
<workmad3> nospam99: have you logged out and back in since installing rvm?
jamesaxl has quit [Ping timeout: 255 seconds]
<nospam99> yes - just logged back in
<nospam99> as non-root user
<workmad3> nospam99: and 'groups' doesn't have rvm in it in that new session?
jamesaxl has joined #ruby
<nospam99> does NOT
Virunga has joined #ruby
<workmad3> nospam99: right, so for some reason your user wasn't added
<workmad3> nospam99: so yes, add your user to the rvm group and log out and back in
<nospam99> lol --- "for some reason"
<workmad3> nospam99: well, I don't know how you ran the script, I also don't use rvm much anymore :P
<nospam99> k - is that something I should put on my "todo" list for all users I want to enable for rvm?
Cultofmetatron has joined #ruby
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
macabre has quit [Remote host closed the connection]
<workmad3> nospam99: it's only needed for users that need to install system-wide rubies and system-wide gems
<mohanmcgeek> you know.. I installed rvm myself and It was installed in my home directory.. PANCAKES!
<workmad3> mohanmcgeek: that's the easiest route generally :)
<nospam99> not installing a system-wide ruby - just a single user ruby
<workmad3> one simple command, done...
niklasb has quit [Ping timeout: 260 seconds]
vickaita has joined #ruby
Roa has quit [Read error: Connection reset by peer]
BadLarry has quit [Ping timeout: 276 seconds]
jeffreybaird has joined #ruby
BadLarry has joined #ruby
<nospam99> so .... if I am NOT tryinig to install a system-wide ruby, should I (yes or no) add the user to the rvm group?
<nospam99> btw, the system-wide ruby is 1.8.7
nari has quit [Ping timeout: 245 seconds]
jackiechan0 has joined #ruby
macabre has joined #ruby
tpe11etier has joined #ruby
lolmaus has quit []
<nospam99> I'm trying to start with one user using 1.9.2 in "isolation"
DrShoggoth has joined #ruby
<nospam99> I hear the crickets .... time to go to #rvm?
d2dchat has joined #ruby
<OldOats> Hello all, I was wondering what is the "ruby way" creating constant values that can be accessed within a class instance, as well as by outside classes via a helper method. Right now I am using class variables, but almost everything I read about class variables advises against using them.
tpe11etier has quit [Read error: Connection reset by peer]
greenarrow has quit [Ping timeout: 248 seconds]
ephemerian has quit [Quit: Leaving.]
<apeiros_> OldOats: class instance variables or constants
food has quit [Ping timeout: 245 seconds]
F1skr has quit [Quit: WeeChat 0.3.9.1]
<apeiros_> class ivars need - like all ivars - accessors to access them from outside.
binaryplease has joined #ruby
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
<OldOats> well an example is that I am creating a class that models a server and I would like to be able to create some kind of constant in the class that can be a single point of reference for the hostname.
jackiechan0 has quit [Quit: Sto andando via]
binaryplease has quit [Client Quit]
kil0byte_ has joined #ruby
kil0byte has quit [Ping timeout: 246 seconds]
lenodroid has quit [Ping timeout: 260 seconds]
lenodroid has joined #ruby
<OldOats> so I want to be able to access the constant from an instance of the class, but not have to create an instance if another class is referencing it. Kinda like Server.get_hostname type method.
codecaster has quit [Quit: Leaving.]
horofox has quit [Quit: horofox]
Appineer has joined #ruby
lenodroid has quit [Client Quit]
<apeiros_> OldOats: bad design. what if you want more than one server with different host names?
Schmidt has quit [Read error: Operation timed out]
<OldOats> instead of Server.new.get_hostname
sailias has joined #ruby
<apeiros_> but if you still want to do that, what I said still applies
glow_nzl has quit [Quit: Leaving]
horofox has joined #ruby
A85 has joined #ruby
a_a_g has joined #ruby
kpshek has joined #ruby
Elico has joined #ruby
dekroning has quit [Read error: Connection reset by peer]
katherinem13 has joined #ruby
SCommette has joined #ruby
dekroning has joined #ruby
aflynn has quit [Quit: Ex-Chat]
nwertman has joined #ruby
<apeiros_> hrm
<shevy> OldOats: is the data changing? if not you could use a constant within your class, and access that via a method
<apeiros_> "%{variable_name:f15,b0}" - instead of "\e[38;5;15;48;5;0m%{variable}\e[0m" is better, yes?
daniel_- has quit [Ping timeout: 252 seconds]
<shevy> Yes
<apeiros_> dunno, I'm still not very happy with my markup…
<shevy> much shorter and less perly ;
areil_ has quit [Remote host closed the connection]
<shevy> yeah, but there is always a limit to cosmetic surgery
<shevy> like the late Michael Jackson !
<apeiros_> L5 for "margin left, 5 spaces", R1 for "margin right, 1 space", P20 for "pad to 20 characters, left aligned" (-20 for right aligned)
nat2610 has joined #ruby
<OldOats> The data would not be changing. Would that constant just be a regular variable inside of the class definition, but outside of a method definition?
<apeiros_> ${f15,b0} for just the colors, ${.} for reset (%{} resets automatically)
nwertman has quit [Client Quit]
<apeiros_> OldOats: constants start with a capital letter
nwertman has joined #ruby
<apeiros_> that's what makes ruby recognize it as a constant and makes it visible via e.g. Server::HostName
<apeiros_> assuming you did `class Server; HostName = "whatever"; end`
tpe11etier has joined #ruby
<OldOats> ok that makes sense.
centipedefarmer has joined #ruby
<shevy> hmm style question... what is nicer. I have a bunch of constants like FOO1, FOO2, FOO3. I want to group them into a new array constants, FOO... now, what would you rather use:
jrist-mtg is now known as jrist
<shevy> FOO = [FOO1,FOO2,FOO3]
<shevy> FOO = [ FOO1, FOO2,FOO3 ]
<shevy> FOO = [ FOO1, FOO2, FOO3 ]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
<shevy> sorry
<shevy> the second one would have been:
<apeiros_> Foo = [Foo1, Foo2, Foo3]
<shevy> FOO = [ FOO1,FOO2,FOO3 ]
<shevy> ok
<apeiros_> assuming you really named them Foo#, I'd drop the Foo# constants entirely
<apeiros_> s/assuming/if/
hackerdude has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
Virunga has quit [Remote host closed the connection]
workmad3_ has joined #ruby
BadLarry has quit [Ping timeout: 265 seconds]
dmiller has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
_alejandro has quit [Remote host closed the connection]
johnjohnson has joined #ruby
a_a_g has quit [Quit: Leaving.]
<shevy> apeiros_: well at least your system is easy to memorize... upper case L for left, R for right, P for Pad, + and - for the amount of alignment. seems simple enough
jds has quit [Remote host closed the connection]
jds has joined #ruby
Uranio has joined #ruby
hackerdude has quit [Ping timeout: 260 seconds]
horofox has quit [Quit: horofox]
punkrawkR has quit [Read error: Connection reset by peer]
freeayu has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
workmad3 has joined #ruby
workmad3_ has quit [Ping timeout: 260 seconds]
dmiller has quit [Ping timeout: 264 seconds]
nospam99 has left #ruby [#ruby]
<apeiros_> shevy: thanks
<apeiros_> I don't think I can make it any better. but I'm still not happy about it :(
samphippen has quit [Quit: Computer has gone to sleep.]
nat2610 has quit [Quit: Leaving.]
<apeiros_> I mean… "%{name:L1,P20,R1,F15,B0,B}"
<apeiros_> it looks so ugly :(
hackerdude has joined #ruby
darthdeus has joined #ruby
perlsyntax has joined #ruby
darthdeus has quit [Read error: Connection reset by peer]
quest88 has joined #ruby
ltsstar has quit [Quit: ltsstar]
mmitchel_ has joined #ruby
darthdeus has joined #ruby
jgarvey has joined #ruby
philcrissman has joined #ruby
<OldOats> I know it is probably difficult to answer this not knowing the full extent of the code that I am writing, but in general would an in class constant be the be way to go about providing a constant value that can be referenced in a single place by outside entities?
prezioso has joined #ruby
mohanmcgeek has quit [Ping timeout: 246 seconds]
Guest91808 has quit [Quit: Guest91808]
stopbit has joined #ruby
x82_nicole has joined #ruby
<apeiros_> OldOats: yes
<joofsh> is the constant relevant to that class?
hackerdude has quit [Ping timeout: 264 seconds]
mmitchell has quit [Ping timeout: 264 seconds]
<apeiros_> as with all such answers - more details may change the answer
BadProphet has joined #ruby
hackerdude has joined #ruby
<OldOats> I understand about more details, Im still trying to wrap my head fully around how I want this to work, but thanks for the info.
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
carlyle has joined #ruby
casheew has quit [Read error: Connection reset by peer]
andre____ has joined #ruby
<shevy> apeiros_: yeah it has a lot of information in that {}
<shevy> OldOats: it is often easier to continue, and at a later time reconsider
hackerdude has quit [Ping timeout: 255 seconds]
<shevy> I am rewriting my old ftp-related code right now... reshuffling things all around
nilg has quit [Remote host closed the connection]
enderx86 has joined #ruby
andre____ is now known as andrewhl
hackerdude has joined #ruby
jamesaxl has quit [Ping timeout: 260 seconds]
Rydefalk has quit [Read error: Connection reset by peer]
Rydefalk_ has joined #ruby
jamesaxl has joined #ruby
<shevy> my three main goals: simplify whenever possible (that includes trying to remove things that are not needed), make a common simple base including console-input via (optionally) Readline, and last but not least, allow this to be used in GUIs, so I can get rid of stuff like gftp or similar
elux has joined #ruby
casheew has joined #ruby
samphippen has joined #ruby
<shevy> ah and make use of all that http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/ftp/rdoc/Net/FTP.html offers, too
kkh has quit [Quit: Good bye!]
<apeiros_> o0
v0n has joined #ruby
Rydefalk has joined #ruby
Rydefalk_ has quit [Read error: Connection reset by peer]
nilg has joined #ruby
kkh has joined #ruby
joshman_ has joined #ruby
shtirlic_ has quit [Remote host closed the connection]
pavilionXP has joined #ruby
hackerdude has quit [Ping timeout: 240 seconds]
rafter has quit [Remote host closed the connection]
kkh has quit [Changing host]
kkh has joined #ruby
AndChat| has joined #ruby
dmerrick has joined #ruby
JohnBat26 has quit [Ping timeout: 252 seconds]
casheew has quit [Read error: Connection reset by peer]
Serial_Killer_C has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
peregrine81 has joined #ruby
casheew has joined #ruby
BadLarry has joined #ruby
Appineer has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Banistergalaxy has quit [Ping timeout: 260 seconds]
casheew has quit [Read error: Connection reset by peer]
savage- has joined #ruby
kil0byte has joined #ruby
volta has joined #ruby
JustinCampbell has joined #ruby
jxf has quit [Quit: Leaving]
zommi has left #ruby [#ruby]
jxf has joined #ruby
kil0byte_ has quit [Ping timeout: 248 seconds]
hackerdude has joined #ruby
casheew has joined #ruby
dnstbr has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
gp5st has joined #ruby
Rydefalk has joined #ruby
k610 has quit [Ping timeout: 260 seconds]
GoGoGarrett has joined #ruby
jackdanger has joined #ruby
kryptek_ has quit [Remote host closed the connection]
_alejandro has joined #ruby
linoj has quit [Read error: Connection reset by peer]
linoj has joined #ruby
daniel_- has joined #ruby
k610 has joined #ruby
nwertman has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Remote host closed the connection]
hackerdude has quit [Ping timeout: 260 seconds]
haxrbyte_ has quit [Ping timeout: 245 seconds]
cburyta has joined #ruby
ttt has joined #ruby
larissa has quit [Quit: Leaving]
nitti has joined #ruby
davehimself has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
yshh has joined #ruby
perlsyntax has quit [Quit: Leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
ndrei has joined #ruby
Cakey has quit [Ping timeout: 240 seconds]
tagrudev has quit [Quit: ydd]
Elico has quit [Quit: elico]
ianfleeton has quit [Quit: ianfleeton]
samphippen has joined #ruby
fyolnish has joined #ruby
ttt has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
greenarrow has joined #ruby
Roa has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
<gp5st> hello. i'm sorry if this is a dumb question. how can I get this to work? I've tried a couple variations including putting the data method as the first thing in the class. http://pastebin.com/NXRBKeaT
iamjarvo has quit [Quit: Computer has gone to sleep.]
tk__ has quit [Quit: ばいばい]
bapa has quit [Quit: No Ping reply in 180 seconds.]
r0bby has joined #ruby
bapa has joined #ruby
<shevy> always include the error you get gp5st
<shevy> also pastie.org is much nicer to read
<gp5st> one sec then
<carloslopes> gp5st: yes, paste the error
<shevy> on first look I'd think that this would not work as is, because it is supposed to be an instance method or?
nateberkopec has joined #ruby
<carloslopes> but on a overview, i think that this is a problem with the method scope
<carloslopes> gp5st: you are creating a method for an instance of Thing
<shevy> gp5st: yeah, the other thing could be that you tried to use it
<carloslopes> not for a Thing class
Guest91808 has joined #ruby
<shevy> before defining it
<shevy> so you could put the method definition before
<shevy> but I am sure it will still not work
<gp5st> shevy: i tried it and it doesn't, but i'll try it with this test and see
<carloslopes> shevy: it won't, the scope is incorrect
tbrock has joined #ruby
daccle has joined #ruby
robotmay has quit [Read error: Connection reset by peer]
<gp5st> that was one thing i was thinking. but if i make it self.data which works and isn't surprising, but then i don't have the scope of the current class when i try to do the send also not surprising?
<shevy> dunno, I avoid .send whenever possible
robotmay has joined #ruby
<shevy> the way how you want to use data() seems to be aking to attr() attr_accessor() etc...
<shevy> perhaps you want a class method? Thing.class_eval { def data; rest_hereputs "class hi!" ; end }
<shevy> defining @data_method = nil outside any method seems also rather unclean
<gp5st> shevy: perhaps. i want to be able to make this a mix-in for some controllers we have
<gp5st> to try to clean up some boilerplate
<gp5st> shevy: it's an instance variable, i shouldn't initialize them? (unnecessary, but an old habit)
cakehero has quit [Quit: Computer has gone to sleep.]
<shevy> ruby will give a warning if uninitialized instance variables are used or queried
gauravag has joined #ruby
BadLarry has quit [Ping timeout: 245 seconds]
daccle has quit [Client Quit]
<gp5st> shevy: like i said, unnecessary, but i find it easier to read and understand code ::shrug::
Cakey has joined #ruby
mityaz has joined #ruby
<shevy> dunno. I always initialize instance variables in my classes
gauravag has left #ruby [#ruby]
joshman_ has quit [Quit: Computer has gone to sleep.]
mityaz has quit [Read error: Connection reset by peer]
zmo_ has quit [Ping timeout: 246 seconds]
<shevy> I can show you one difference
mityaz has joined #ruby
Virunga has joined #ruby
mityaz has quit [Read error: Connection reset by peer]
Guest91808 has quit [Quit: Guest91808]
<gp5st> interesting
pixie79 has joined #ruby
<workmad3> shevy: you forgot to show Thing.instance_methods
<workmad3> shevy: which shows where @data_method actually gets defined ;)
mmitchel_ has quit [Remote host closed the connection]
<pixie79> hi - does anyone here use the ruby-cloudfiles gem, i am trying to use it on large files which i have split to be 2G in size but when they transfer over they arrive in seconds and are only 24B any ideas ?
<shevy> hmm I dont see much from that
mmitchell has joined #ruby
dmiller has joined #ruby
LMolr has quit [Ping timeout: 265 seconds]
<workmad3> err, Thing.instance_variables even
<workmad3> bleh
<gp5st> pixie79: what are those 24bytes?:-p how are you trying to transfer them? more input! need input!
<gp5st> too much shell scripting..i'm ending blocks with done and fi
<workmad3> gp5st: it's not too much until you start writing esac in ruby :)
mityaz has joined #ruby
Voxxit has quit [Quit: http://www.djjoshuad.com/]
monkegjinni has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
jimeh has quit [Quit: Bye.]
C0deMaver1ck has joined #ruby
<pixie79> i am using the rackspace cloudfiles gem to transfer them
<gp5st> pixie79: where are you uploading the file?
daniel_- has quit [Ping timeout: 240 seconds]
dekroning has quit [Ping timeout: 252 seconds]
glyytchy has joined #ruby
<gp5st> and what are the bytes you're getting back?
<pixie79> line 21 - object.write
<gp5st> no, that's just writing the path name
daccle has joined #ruby
<gp5st> i think
<gp5st> i've never used this gem
VolodymyrB has quit [Quit: Leaving.]
<gp5st> what are the bytes you're getting back?
<workmad3> shevy: Thing.instance_variables (I typoed badly :) )
jimeh has joined #ruby
<gp5st> are they the first bunch of the file or are they the path
BadLarry has joined #ruby
<pixie79> none - i have been checking in their web page the file size
<shevy> ok let's see
<pixie79> and they transfer to quick to be transfering a 2G file
dmiller has quit [Ping timeout: 256 seconds]
Elico has joined #ruby
<gp5st> pixie79: check the contents of what you uploaded. that'd be a good first step
fbrn has joined #ruby
<gp5st> shevy: i'm just going to class_eval it.
mikepack has quit [Remote host closed the connection]
<pixie79> yep looks like it has transfered the file name not the file
<gp5st> call the class method data_method and be done with it
<pixie79> hm
<gp5st> pixie79: :)
<pixie79> i wonder how i send the actual file then
<gp5st> pixie79: write the contents of the file, not the path
<shevy> now we know that defining an @ivar within a method is different from defining it outside a method
tjbiddle has joined #ruby
<gp5st> pixie79: read the file:-p there are tutorials online. i'm in the middle of something or i'd be a bit more helpful
<workmad3> shevy: yeah, because 'self' is different :P
<shevy> gp5st: as long as you are not in the middle of sex!!!
<workmad3> shevy: outside a method, in the body of the class, your context is the class, so @ivars are class ivars
<shevy> gp5st: yeah, see workmad3's explanation, I couldn't have explained it much at all :)
daccle has quit [Client Quit]
<workmad3> (classes being themselves instances of Class and all that)
Jdubs_ has joined #ruby
lenovodroid has joined #ruby
<shevy> that is kind of philosophical
topek has quit [Quit: Leaving.]
<fbrn> hai all
<shevy> like the moebius strip
<gp5st> yeah. it's one of those things i "get" but am "groking"
<fbrn> is there a tutorial for beginners to learn ruby?
<Jdubs_> hi all o/
<Xeago> what is the usual spelling when saying "More work?"/"More werk?"
<Jdubs_> fbrn : try codeacademy or rubymonk
<gp5st> fbrn: many
quest88 has quit [Quit: quest88]
mohanmcgeek has joined #ruby
<shevy> fbrn: well yes. THIS ONE -> http://pine.fm/LearnToProgram/?Chapter=01 you have only ten minutes left to finish it
<gp5st> pixie79: just "google read file in ruby" that should give you some good starting places
<Jdubs_> Xeago: the peon version?
<workmad3> gp5st: class instance variables are what most people expect when they use class variables btw :)
<jackdanger> fbrn: I recommend http://ruby.learncodethehardway.org/
mohanmcgeek has left #ruby [#ruby]
<Xeago> Jdubs_: yea
<pixie79> ok thanks
<Jdubs_> Xeago: lol...what brought that up?
<shevy> class instance variables... class variables... instance class variables... variable class instances...
<Xeago> need a title for yesterdays status-report
chussenot_ has joined #ruby
<Xeago> and don't know how to spell it >.<
<shevy> call it "The Big Secret" Xeago
<Jdubs_> lol...
<workmad3> Xeago: 'Daily Status Update for 12/11/2012' maybe?
<shevy> everyone will want to find out what this secret is about
<gp5st> workmad3: yeah, the class itself is an object that can be changed, not just some "thing" that exists only to delineate a type
<fbrn> Jdubs_ shevy jackdanger: thank you for a very quick response. :)
<workmad3> gp5st: yeah :)
BadLarry has quit [Ping timeout: 245 seconds]
<Xeago> they all have non-arbitrary titles, related a bit, geeky n stuff
<shevy> "Here I murdered my neighbour"
<workmad3> gp5st: and when you do 'class Name; ... end;' the stuff in the ... is still just code that is being executed
Maoz has quit [Ping timeout: 256 seconds]
<Xeago> "Daily Status Update for 12/11/2012" would be unrelated to the actual report
<shevy> "This is my status report after I spent 5 hours in a nearby pub"
<Xeago> werk or work
kkh has quit [Quit: Good bye!]
BadLarry has joined #ruby
<workmad3> Xeago: I no longer know the context :P
tommyvyo_ has joined #ruby
<Xeago> what is the usual spelling when saying "More work?"/"More werk?"
aganov has quit [Remote host closed the connection]
chussenot has quit [Ping timeout: 265 seconds]
chussenot_ is now known as chussenot
kkh has joined #ruby
<workmad3> Xeago: well, considering that 'werk' isn't a word...
<workmad3> Xeago: at least not in English...
<Xeago> aight, take as context warcraft peons
<JustinCampbell> MOAR WERK
kkh has quit [Changing host]
kkh has joined #ruby
ner0x has joined #ruby
glyytchy has quit [Quit: glyytchy]
<ner0x> Good morning. *very* new to ruby but not text-based languages. I'm begun the beginners course etc. Are there any ways to install all gems locally?
<workmad3> Xeago: well, the spelling would be 'work', but it might sound like 'werk' with the peon's accent... been too long since I played Warcraft too remember :(
<workmad3> ner0x: all gems?
<ner0x> workmad3: My terminology may be off.
<workmad3> ner0x: do you have a crapload of hard disk space you just don't like anymore and think 'lets fill it with crap'?
<ner0x> workmad3: Any programs I install such as rails, etc.
<ner0x> workmad3: Like I said, terminology can be off.
<workmad3> ner0x: 'gem install <whatever>' installs it locally
wroathe has joined #ruby
<Beoran__> ner0x, on what operating system?
<workmad3> ner0x: there isn't a way to do that other than locally...
<Beoran__> yeah
<workmad3> unless you install onto an NFS, I guess...
<Beoran__> so look at all the gems you want and install them all
<shevy> gem install everything
<workmad3> shevy: :D
<shevy> hmmmm
Monie has quit [Ping timeout: 245 seconds]
<workmad3> shevy: oooh, should write that...
<workmad3> ah, it already exists
<shevy> ner0x: all gem files are .gem files which reside in the cache/ subdirectory, you can find them there and back them up
<workmad3> but it requires everygem...
<shevy> ERROR: While executing gem ... (Gem::DependencyError) Unable to resolve dependencies: everything requires everygem (>= 0)
<shevy> lol
vickaita_ has joined #ruby
dakine has joined #ruby
<workmad3> and everygem doesn't exist :(
<shevy> aha
<workmad3> should write everygem
<shevy> whoever wrote that one probably hated gems
Takehiro has quit [Remote host closed the connection]
<workmad3> with a gemspec that adds a dependency on every gem in rubygems
savage- has quit [Quit: savage-]
<shevy> hehe
<shevy> bad that you can not easily remove your old account from rubygems again :(
<workmad3> shevy: if you want to destroy bundler, write that gem and include it in a Gemfile ;)
<workmad3> shevy: you'll basically set bundler to work on attempting to resolve a valid dependency graph out of the entirety of rubygems...
j3 has joined #ruby
<shevy> I dont think I have ever written a Gemfile... only .gemspec files... that is not the same right?
headius has joined #ruby
<workmad3> no
vickaita has quit [Ping timeout: 240 seconds]
<workmad3> a bundler Gemfile declares the gems you are using in a project
<shevy> ah
<shevy> so like several add_dependency() in .gemspec
<Jdubs_> Xeago: do you have any suggestions for finding an opensource project to work on that's at my level?
<Xeago> github
<workmad3> yeah, although with a Gemfile you also specify the source(s) of the gems (e.g. source :rubygems)
<shevy> Jdubs_: there are many!!! first, identify anything you want to solve with ruby
kkh has quit [Quit: Good bye!]
<shevy> I see
<shevy> as long as it is not rubyforge...
<workmad3> shevy: :)
<j3> hey folks - trying to run 'sudo gem install ledger_web' on mac OS X 10.8 (no xcode installed, but I have installed "command line tools for xcode" instead) - it gets to "Building native extensions. This could take a while" and it runs *forever* - xcrun? it basically will run for days. any ideas?
<shevy> sounds as if it got stuck
elux has quit [Read error: Connection reset by peer]
joshman_ has joined #ruby
<j3> shevy: should i look in a log file somewhere?
<shevy> not sure, if it is stuck in a loop perhaps it will never write to any log file
matti has quit [Read error: Connection reset by peer]
roadt has quit [Ping timeout: 245 seconds]
<j3> maybe i'll install xcode
<shevy> find the .gem file first, then extract it, enter the directory and try to build the native extension
stetho has joined #ruby
<shevy> on my system it is in /usr/lib/ruby/gems/1.9.1/cache/
lenovodroid has quit [Ping timeout: 246 seconds]
dmerrick has quit [Quit: dmerrick]
<shevy> usually when I run extconf.rb or setup.rb there, I get the error directly
<shevy> like missing file foo.h
<j3> pg-0.14.1.gem - found it
<workmad3> j3: also there's 'gem install ledger_web -V' for verbose output, might give you more info
<shevy> or some symlinks to symlinks to symlinks, that don't exist, and then get repeatedly checked if and where they exist
dmerrick has joined #ruby
skcin7 has quit [Quit: Computer has gone to sleep.]
Guest91808 has joined #ruby
<j3> workmad3: yea i have run that too - just gets to that same spot :(
<shevy> pg? sounds like postgresql :)
<workmad3> it is
d-egg has joined #ruby
hackerdude has joined #ruby
<j3> crap but i already have that. or is it a library to interface with postgres
<workmad3> j3: it's the ruby gem for interfacing with it, yes
<j3> ok that's fine then
jgarvey has quit [Quit: Leaving]
hackerdude has quit [Read error: Connection reset by peer]
hackerdu_ has joined #ruby
r0bby is now known as robbyoconnor
kkh has joined #ruby
hackerdu_ has quit [Read error: Connection reset by peer]
hackerdude has joined #ruby
flip_digits has joined #ruby
<d-egg> Hi, I'm doing a tutorial which is not about ruby but uses some ruby examples. I don't know ruby and I'm stuck with this
<d-egg> Can somebody help me?
<DefV> I bet you're on Ruby 1.8
<DefV> require 'rubygems'
geggam has joined #ruby
robotmay has quit [Read error: Connection reset by peer]
<d-egg> ups forgot the cmdline
<DefV> before you require 'thrift'
robotmay has joined #ruby
maesbn_ has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<d-egg> DefV: Oh, thank you
<d-egg> DefV: yes ruby1.8
bbttxu has joined #ruby
nwertman has joined #ruby
jblack has joined #ruby
<JonnieCache> $stdout or STDOUT, which one am i meant to use again?
spanner_ has quit [Read error: Connection reset by peer]
<gp5st> JonnieCache: do you like ALL CAPS or $dollar_signs?
cakehero has joined #ruby
blazes816 has joined #ruby
<DefV> dollar signs ofcourse!
Virunga has joined #ruby
verto|off is now known as verto
spanner has joined #ruby
verto is now known as verto|off
arturas_ has quit [Ping timeout: 248 seconds]
asteve has joined #ruby
jamesaxl has quit [Read error: Operation timed out]
<asteve> can I store an instance of a class in a hash?
richardjapenga has quit [Quit: Leaving]
<asteve> {a => b.new}?
jamesaxl has joined #ruby
wallerdev has joined #ruby
F1skr has joined #ruby
<gp5st> asteve: sure? why not?
kkh has quit [Quit: Good bye!]
kkh has joined #ruby
daniel_- has joined #ruby
bluenemo has joined #ruby
kkh has quit [Changing host]
kkh has joined #ruby
bluenemo has quit [Read error: Connection reset by peer]
jblack has quit [Ping timeout: 240 seconds]
polymar has quit [Remote host closed the connection]
itchyouch_ has joined #ruby
dorei has joined #ruby
<Mon_Ouie> You actually can't store something that's not an instance of a class in a hash
<dorei> hello
apeiros_ has joined #ruby
<Mon_Ouie> Because all the data you manipulate are objects, and an object *is* an instance of a class
axl_ has quit [Quit: axl_]
mityaz has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<dorei> but classes are instances of classes too ;-)
g-ram has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<workmad3> dorei: your point? :)
<dorei> u can have a class T; end and then u can do my_hash[:a]=T
j3 has left #ruby [#ruby]
<ner0x> workmad3: shevy: The idea is to not install with sudo but install to my home directory.
timonv has quit [Remote host closed the connection]
dekroning has joined #ruby
Takehiro has joined #ruby
tungd has joined #ruby
itchyouch has quit [Ping timeout: 265 seconds]
itchyouch_ is now known as itchyouch
tomsthumb has joined #ruby
alvaro_o has joined #ruby
<shevy> yeah I dont even know if that is possible with gems
<shevy> is it?
cascalheira has joined #ruby
tungd has quit [Client Quit]
stetho has quit [Quit: stetho]
<shevy> yeah it is
<shevy> official docu too
<shevy> export GEM_HOME=/home/mygemrepository
<shevy> I assume you must set a variable called GEM_HOME
koshii_ has quit [Ping timeout: 268 seconds]
axl_ has joined #ruby
xbayrockx has quit [Read error: Connection reset by peer]
<ner0x> shevy: Fantastic. That's what I was looking for.
wroathe has quit [Ping timeout: 252 seconds]
<shevy> hehe I have no idea if it works but I hope it does
daniel_- has quit [Ping timeout: 245 seconds]
<shevy> debian still hates gems
dmiller has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
LMolr has joined #ruby
dekroning has quit [Ping timeout: 240 seconds]
<ner0x> shevy: GEM_HOME and prefix? What is a gem repo compared to the prefix stuff?
philcrissman has quit [Remote host closed the connection]
<shevy> I dunno if you need --prefix at all
<shevy> I hope not
<shevy> a gem repo, well that is when you can have your own gem server locally
<shevy> which I suppose is kind of what you want, you can browse all your local gems via that server somehow
<ner0x> I guess I have no idea what a gem is.
morf has quit [Quit: eof]
otters has quit [Ping timeout: 252 seconds]
* ner0x will have to read more.
brendan_ has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
reset has joined #ruby
Mkman has joined #ruby
brendan` has quit [Quit: Leaving]
iamjarvo has joined #ruby
reset_ has joined #ruby
Takehiro has quit [Ping timeout: 240 seconds]
enroxorz-work has joined #ruby
Jdubs_ has quit [Ping timeout: 240 seconds]
reset has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
reset_ has quit [Client Quit]
reset has joined #ruby
nat2610 has joined #ruby
baphled has quit [Ping timeout: 276 seconds]
Schmidt has joined #ruby
kiela has quit [Ping timeout: 240 seconds]
wroathe has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
Goles has quit [Ping timeout: 246 seconds]
ryanlecompte has joined #ruby
IrishGringo has quit [Read error: Operation timed out]
Roa is now known as Roa
colinbm has quit [Quit: colinbm]
werdnativ has joined #ruby
philcrissman has joined #ruby
statarb3 has quit [Quit: Leaving]
Cakey has quit [Read error: Connection reset by peer]
Serial_Killer_C has joined #ruby
linoj_ has joined #ruby
<shevy> ner0x: a .gem file is just a ruby archive
<shevy> you can extract a .gem file anytime
<shevy> via gem unpack
<Xeago> shevy: doesn't a unzipping normally work aswell?
minijupe has joined #ruby
<shevy> unzip?
<shevy> you mean via "unzip"?
khakimov has joined #ruby
linoj has quit [Read error: Operation timed out]
linoj_ is now known as linoj
<shevy> does not seem to work for me
<Xeago> hmm
<shevy> if anyone knows of another way to extract a .gem file
<Xeago> ok
joeycarmello has joined #ruby
AxonetBE has quit [Quit: Leaving.]
noxoc has quit [Quit: noxoc]
<shevy> there must be more ways
<shevy> because I think gem uses only standard ruby stuff, so perhaps "tar" can extract a gem file too, I just dont know how
<Xeago> I know it is zip stuff
moted has quit [Ping timeout: 245 seconds]
zigomir has quit [Ping timeout: 264 seconds]
Trioke has joined #ruby
Morkel has quit [Quit: Morkel]
dmiller has quit [Remote host closed the connection]
moted has joined #ruby
glyytchy has joined #ruby
jaygen has joined #ruby
steg132 has joined #ruby
adeponte has joined #ruby
viktor_ has joined #ruby
dmiller has joined #ruby
kil0byte_ has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
kil0byte has quit [Ping timeout: 245 seconds]
mahmoudimus has joined #ruby
aantix has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
darthdeus has quit [Quit: Leaving...]
ij has joined #ruby
ij has left #ruby ["WeeChat 0.3.9"]
dmiller has quit [Remote host closed the connection]
stat1x has joined #ruby
mikecmpbll has joined #ruby
LMolr has quit [Ping timeout: 245 seconds]
rburton- has joined #ruby
thinkdevcode has joined #ruby
dmiller has joined #ruby
davidcelis has joined #ruby
<ner0x> shevy: It works just as advertised.
<shevy> cool
<ner0x> shevy: Rather slow though.
<shevy> gem is always slow
<shevy> go work on ruby projects meanwhile :P
<shevy> if you need to download like 100 .gem files, that usually is slow
davidcelis has quit [Client Quit]
<ner0x> It's going to take some getting used to.
* ner0x is a perler.
jgrevich has joined #ruby
<hderms> ruby is the future bro
jamesaxl has quit [Ping timeout: 248 seconds]
jamesaxl has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wroathe has quit [Ping timeout: 252 seconds]
<ner0x> hderms: I'm not disagreeing your web community is strong.
csaunders has quit [Quit: Computer has gone to sleep.]
<ner0x> hderms: Still plenty of perlers out there. Just want to make myself well rounded.
<ner0x> Ruby on Rails is what I'm most interested in.
rburton- has quit [Quit: Linkinus - http://linkinus.com]
<ner0x> I give everything a try. :)
glyytchy has quit [Quit: glyytchy]
<hderms> i think the language is one of the best designed out there for expressiveness
<hderms> it's heavily influenced by some of the most paradigm-changing languages out there
<hderms> but never compromises its internal vision
answer_42 has quit [Ping timeout: 276 seconds]
techazard has joined #ruby
stkowski has joined #ruby
chussenot has quit [Remote host closed the connection]
<ner0x> I just hope it has something like cpan.
alexwh has quit [Quit: ZNC - http://znc.in]
chussenot has joined #ruby
Jdubs has joined #ruby
joeycarmello has quit [Remote host closed the connection]
<Jdubs> Hi, who was talking with me in private messages earlier? internet went out and i forgot username
davidcelis has joined #ruby
xorigin has quit [Quit: leaving]
<Sou|cutter> there's no hook for when you extend a class, is there? (like the hook for including)
Xeago has quit [Ping timeout: 265 seconds]
mrsolo has joined #ruby
alex__c2022 has joined #ruby
maletor has joined #ruby
J-_-L has joined #ruby
wroathe has joined #ruby
<Muz> Sou|cutter: there's method_added
<Muz> Or singleton_method_added
aquaranto has quit [Remote host closed the connection]
etcetera has joined #ruby
J-_-L has quit [Client Quit]
<Muz> I'm not entirely sure what happens when you re-define a method and what callbacks are triggered then.
<Muz> If any.
J-_-L has joined #ruby
<Muz> But certainly they exist for defining and removing methods and singleton_methods on a clss.
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
BadLarry has quit [Ping timeout: 276 seconds]
etcetera has quit [Read error: Operation timed out]
filipe has quit [Remote host closed the connection]
qwerxy has quit [Quit: offski]
<Sou|cutter> hrm...
Liothen has quit [Remote host closed the connection]
Mkman has quit [Quit: Lost terminal]
<shevy> ner0x: odd, I always used ruby because it was the better perl really :) never got too much into web-stuff save for .cgi scripts
<shevy> which are all written in ruby, but dont use the default cgi stuff
<ner0x> shevy: Catalyst has come a long way.
<ner0x> shevy: But as with all frameworks, some things could be better.
<shevy> oh, I actually dont mind to write frameworks entirely on my own
<shevy> I am one of those guys
BadLarry has joined #ruby
<shevy> ruby's default syntax is very clean compared to php and perl
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jslowe has joined #ruby
<ner0x> Unless you come from one of those. lol
<apeiros_> no, even when you come from both of those
* apeiros_ did ~5y perl and ~6y php
<shevy> well
<shevy> ner0x: apeiros wrote a 20k lines of code php webframework once
* Hanmac feels sorry that you did php
<shevy> lol
<apeiros_> it was before I knew ruby. not sure it was 20k.
<ner0x> shevy: I have a 5-6k perl one now. :)
tenmilestereo has joined #ruby
<Hanmac> shevy "apeiros wrote a 20k lines of code php webframework once" than hanmac came and reduce them to 200 one-liners (:D)
jackdanger has quit [Quit: Leaving.]
jaygen has quit [Remote host closed the connection]
<apeiros_> Hanmac: not php :-p
<shevy> in php?
pskosinski has joined #ruby
<shevy> Hanmac: did you write a webframework yet anywhere, even in C++
<shevy> :P
<pskosinski> If I want to run a code in fork and I first need to read that code from another file, then I need to read file and in fork block use eval(code), right? Or is there a different way?
ewag has joined #ruby
answer_42 has joined #ruby
Raimondi has left #ruby ["WeeChat 0.3.8"]
nitti has quit [Remote host closed the connection]
<Hanmac> shevy i could write an webframework in a language of your choice ... php, ruby, C++ or C :D
<apeiros_> pskosinski: fork { load(file) }
<Gate> Hanmac: haskell!
pcarrier has quit []
nitti has joined #ruby
<Hanmac> Gate haskell is not a language its "sore throat"
<ner0x> Rails does seem to have a ton more features by default.
slainer68 has quit [Remote host closed the connection]
schickung has quit [Quit: schickung]
schickung has joined #ruby
schickung has quit [Client Quit]
<pskosinski> apeiros_: Ok… thanks. And can I pass some argument to this program, when using load?
monkegjinni has joined #ruby
<pskosinski> arguments *
<pskosinski> I was trying load path, true -- but seems that it is something else
tchebb has joined #ruby
apok has quit [Quit: apok]
<apeiros_> pskosinski: if you want to pass arguments, then use methods
jonan has joined #ruby
<pskosinski> And kinda, vice versa… well, I want to run code in subprocess and then that child should return something. With fork {eval(code)} I can use pipes
<apeiros_> and no, you can't pass arguments to a file. since… well… it's a file, you know?
<ner0x> And way more testing features.
<apeiros_> pskosinski: why tf do you want to eval?
<hderms> yeah
<hderms> avoid eval if at all possible
<hderms> it's always possible to avoid it lol
volta has quit [Remote host closed the connection]
<apeiros_> hderms: load/require are eval too…
<pskosinski> How to use methods, what do you mean?
<apeiros_> my point isn't about eval being evil
<hderms> apeiros_: that's sort of irrelevant don't you think
<apeiros_> hderms: no
<apeiros_> if you do not understand why eval is evil, you are just cargo culting
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
anachronistic has joined #ruby
<hderms> apeiros_: it's pretty obvious why it's bad
<apeiros_> and eval(File.read(path)) is just as evil as load(path)
<apeiros_> which in turn is just as evil as require(path)
<hderms> if you honestly believe that you're demented
dr_bob has quit [Quit: Leaving.]
<apeiros_> hderms: behave, or be gone
<apeiros_> and I won't say that twice
<pskosinski> My point is to avoid crashing app when I am running part of code, code from an external file. But I need to pass some data to that program and then give results to main program…
jds has quit [Remote host closed the connection]
<hderms> load and require have very clear use cases
<apeiros_> hderms: so?
d-egg has quit []
<apeiros_> load is *exactly* just eval(File.read(path))
<apeiros_> + added path resolution
<apeiros_> there is *zero* added security
jds has joined #ruby
<hderms> that doesn't give license to use eval freely in code
<apeiros_> hderms: so tell me, how's eval(File.read(path)) more evil than load(path)
<hderms> just because the language designers used it to add power
tbrock has quit [Quit: Computer has gone to sleep.]
<apeiros_> just answer that question.
Rizzle has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
<Hanmac> if you use load or eval, someday an Hanmac comes and crash your code
<hderms> apeiros_: in what context
etcetera has joined #ruby
<apeiros_> no context. all you have is eval(File.read(path)) vs. load(path)
greenarrow has joined #ruby
koshii_ has joined #ruby
<ner0x> Where can I search for gems?
c0rn has joined #ruby
<apeiros_> your claim is eval was inherently more evil. so… go ahead, show it. explain it.
<hderms> it's bad design in most cases
<hderms> cases require setting up context
<apeiros_> hderms: you're evading. I asked about eval(File.read(path)) vs. load(path)
<hderms> i said eval shouldn't be used if it is at all possible
<hderms> and it's always possible to avoid it
kil0byte has joined #ruby
wreckimnaked has quit [Ping timeout: 245 seconds]
<hderms> you could avoid using it in the vast majority of times
ViperMaul|_ has quit [Ping timeout: 252 seconds]
<ner0x> Anyone?
<apeiros_> 18:45 apeiros_: and eval(File.read(path)) is just as evil as load(path)
<apeiros_> 18:45 apeiros_: which in turn is just as evil as require(path)
<apeiros_> 18:46 hderms: if you honestly believe that you're demented
<apeiros_> hderms: you said more than that. ^
phux has joined #ruby
<apeiros_> so if you feel justified to insult, you are obliged to elaborate.
<apeiros_> otherwise stfu.
<hderms> just because there is a particular usage for eval that is hidden via other terminology and supposed to be used in a very clear manner
<hderms> doesn't mean that all usages of eval are evil
LMolr has joined #ruby
<apeiros_> hderms: you're still evading.
<hderms> nor does it mean that all are good
<apeiros_> you not answering the question.
<hderms> there is one case where it is supposed to be used
<hderms> what does that change about my argument?
maesbn has joined #ruby
<apeiros_> you DONT HAVE an argument.
<hderms> my argument is that it should be avoided in most cases
<hderms> you presented one case where the language designers used it
<hderms> and advocate using it in a controlled manner
sepp2k has quit [Ping timeout: 240 seconds]
<hderms> i don't see how that changes anything
<apeiros_> blablabla…
<hderms> nor does the fact that require being equivalent to eval have anything to do with using eval freely in code
sepp2k has joined #ruby
werdnativ has quit [Quit: werdnativ]
kil0byte_ has quit [Ping timeout: 265 seconds]
Virunga has quit [Remote host closed the connection]
<apeiros_> hderms: what you said before was NOT about using eval freely.
<ner0x> So is ExecJS a core ruby class ?
<hderms> i think it should be avoided in the vast majority of cases because it is extremely powerful and difficult to reason about
Elhu has quit [Quit: Computer has gone to sleep.]
<apeiros_> hderms: you're lame. insulting somebody about something you're wrong and unable to either apologize or correct your statement. sorry, no respect for you.
<hderms> if used for its power
<apeiros_> and then just dancing around the issue.
wroathe has quit [Ping timeout: 256 seconds]
<hderms> i don't really think that's the case
<ner0x> RDBI the best database connect?
u89 has quit [Remote host closed the connection]
<apeiros_> hderms: then again, explain why eval(File.read(path)) is more evil as load(path)
<hderms> it's used in one controlled situation for its power
<apeiros_> *than
shtirlic_ has joined #ruby
<hderms> apeiros_: you're posing that question and trying to draw conclusions from it
<hderms> i don't care if it's used in one case
<ner0x> I'd love to try ruby but the banter back and forth is only showing me the community would rather fight than help it's new members..
Prudhvi has left #ruby [#ruby]
<apeiros_> hderms: you said I was demented if I believed it wasn't.
<apeiros_> hderms: so your claim
LMolr has quit [Ping timeout: 245 seconds]
cezar-b has quit [Remote host closed the connection]
<apeiros_> but you've obviously noticed that you are wrong about that claim and trying to weasel out.
<hderms> one of them is an obvious use case the other one could be used in any context
<apeiros_> they are *the same*
<hderms> at the very least one is more clear as to purpose
tbrock has joined #ruby
aquaranto has joined #ruby
<hderms> i don't think i'm wrong about it at all
<apeiros_> and you're still not telling why it's more evil…
<hderms> it's obvious what one should be used for
<apeiros_> "different use case" - what's that got to do with evil… sheesh
<hderms> so at the very least the intent is clear
<apeiros_> lol
<apeiros_> yeah, bye
kaneda__ has quit [Ping timeout: 248 seconds]
<hderms> ner0x: blame apeiros_, he apparently has some kind of authority in this channel
<hderms> i'm not representative of the ruby community in any way
joeycarmello has joined #ruby
jaygen has joined #ruby
<apeiros_> right, I should have just kickbanned you for insult instead of giving you a chance to redeem.
matti has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
Virunga has joined #ruby
<ner0x> Can you take it to privmsg so we can ask questions?
<apeiros_> ner0x: ExecJS is not a core ruby class, no
<apeiros_> ner0x: not sure about rdbi - are you asking for ruby dbi classes/libs?
chussenot has quit [Quit: chussenot]
<ner0x> apeiros_: I'm getting that "You need a javascript" error that's typical of new rails apps.
<apeiros_> ner0x: and yes, if somebody insults me, that has priority. if you don't like that, well, sorry but that'd be your problem.
<ner0x> apeiros_: Yes, some DBI from ruby, whatever the typical norm is so I can read some docs.
Vainoharhainen has quit [Quit: Leaving...]
<apeiros_> ner0x: Sequel is a nice DBI lib
schickung has joined #ruby
<ner0x> apeiros_: I have no problem with holding your ground. I would too. Just realize it hurts us when we can't ask questions.
<itchyouch> Need a simple help with syntax. Im just trying to do something like File.open("/somefile").grep(/string/) && puts "found"
<apeiros_> can write plain sql with it, use its DSL and/or even its ORM. the orm is optional.
obryan has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<apeiros_> ner0x: yes, usually I kickban. but then people whine about being unjustly treated. so I gave him a chance to redeem. but I guess I'll go back to instakickban on insult again.
<ner0x> apeiros_: I'm looking for something that will do automatic foreign linking for me.
cdt has quit [Ping timeout: 255 seconds]
<apeiros_> ner0x: not sure whether sequel does automatic foreign keys. I think most DBIs put the emphasis on having logic in the app layer (not my choice for those things…)
elaptics is now known as elaptics`away
kalleth has quit [Quit: kalleth]
<ner0x> apeiros_: I just assumed $user->company->name would be something less... language specific.
clj_newb has joined #ruby
dnstbr has quit [Quit: Computer has gone to sleep.]
<apeiros_> ner0x: that's what an ORM does
<apeiros_> not just DBI
linoj has quit [Quit: linoj]
<apeiros_> and for that, there's ActiveRecord (from rails), DataMapper (ex-merb) and Sequel's own ORM
mrsolo has joined #ruby
<apeiros_> AR is by far the most used. Can't give any recommendations as I only used AR so far.
<ner0x> Well considering I'll be using rails, ActiveRecord seems to be the logical place to start.
<apeiros_> itchyouch: you'll have to explain your problem if you want help…
<ner0x> apeiros_++ # helpful
d3vic3 has quit [Ping timeout: 268 seconds]
tjbiddle_ has joined #ruby
robotmay has quit [Read error: Connection reset by peer]
Uranio has quit [Remote host closed the connection]
dnstbr has joined #ruby
aaroncm has joined #ruby
<itchyouch> Im trying to do the following in ruby: grep -q string somefile &&
ewag has quit [Ping timeout: 260 seconds]
<apeiros_> BSD grep?
robotmay has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
<itchyouch> apeiros_: Linux grep
<apeiros_> GNU grep then? don't know what -q does there…
<ner0x> apeiros_: Looks like it comes with Rails. I'm liking rails so far. Not entirely sure about ruby syntax; although it doesn't look to be *that* much different.
<itchyouch> Just working on concatening a file into another file only if the string isn't found
d3vic3 has joined #ruby
<itchyouch> Working on a chef recipe, so im still getting the hang of ruby.
<apeiros_> itchyouch: big files? or small files?
tjbiddle has quit [Ping timeout: 255 seconds]
tjbiddle_ is now known as tjbiddle
<itchyouch> The -q is quiet, so it doesn't print results. Just returns true if found and false if it
<apeiros_> if File.read(path) =~ /regex/ then …
<itchyouch> If not*
<apeiros_> for small files
tbrock has joined #ruby
<itchyouch> Ahh.. Ill try that apeiros_
aaroncm has quit [Client Quit]
<apeiros_> for big files, File.foreach(path).enum_for(:grep, /regex/).first
captain_al has quit [Quit: captain_al]
<ner0x> Okay, really liking ActiveRecord.
<apeiros_> slightly complex. it's to read only a line at a time and short-circuit when something is found
asteve has quit [Quit: Computer has gone to sleep.]
<itchyouch> Thanks apeiros_. That's a lot easier
robertotauill has joined #ruby
dnstbr has quit [Client Quit]
kil0byte has quit [Remote host closed the connection]
csaunders has joined #ruby
<ner0x> gem server is genius.
<ner0x> export GEM_HOME is transparent.
* ner0x approves.
robbyoconnor has quit [Ping timeout: 256 seconds]
sn0wb1rd has joined #ruby
volta has joined #ruby
chussenot has joined #ruby
Ry has joined #ruby
<k610> is it saffer to start ruby apps by specifiying de rvm path e.g; :
<k610> /usr/bin/rvm god
asteve has joined #ruby
coderhut has joined #ruby
<itchyouch> apeiros_: does ruby also have !~ in addition to =~?
<itchyouch> Nvm. It does.
<itchyouch> Just tested it. :p
<ner0x> Can you remove gems?
Virunga has quit [Remote host closed the connection]
<ner0x> I guess I could wipe my custom repo and that would work.
<apeiros_> itchyouch: yes, irb/pry to test such things ;-)
<apeiros_> or ruby -e
<apeiros_> ner0x: gem uninstall
<apeiros_> also gem help ;-p
robertotauill has quit [Read error: Connection reset by peer]
vickaita_ has quit [Ping timeout: 245 seconds]
alexim has joined #ruby
<ner0x> apeiros_: Ah, I missed that.
<ner0x> apeiros_: Still, a good way to find deps would be removing the repo. :)
<apeiros_> ner0x: I think there's a way to get it graphically
<apeiros_> don't know by heart, though
<ner0x> apeiros_: I'm actually pretty impressed so far.
<apeiros_> also if you use bundler, the Gemfile.lock contains the dependency graph in a relatively readable way
ffranz1 has joined #ruby
robbyoconnor has joined #ruby
reset has quit [Quit: Leaving...]
timmow has quit [Ping timeout: 252 seconds]
<ner0x> rails uses bundler, as far as I can tell.
<jds> I'm overhauling our REST API docs. They're currently not very good, or very clever - they're manually typed by hand, not inline in code or anything etc etc.
<jds> Is there anything I should look into to help me?
<apeiros_> ner0x: it defaults to using it. it's not a requirement, though
tommyvyo has quit [Quit: Computer has gone to sleep.]
<apeiros_> jds: google for steveklabnik
<ner0x> apeiros_: I assumed as much. Just like Module::Build or Module::Install for perl.
<apeiros_> he did lots of work with regards to REST APIs, iirc
ffranz has quit [Ping timeout: 245 seconds]
<apeiros_> ner0x: I'm out of perl for far too long :-( no idea what those are anymore (CPAN I still remember)
g-ram has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kalleth has joined #ruby
kalleth has quit [Client Quit]
<ner0x> apeiros_: No problem. All my experience is still valid just lost all the syntax. Was still a MVC structure though. And I'm familiar with ORM and Unit testing... Transition should be pretty smooth.
<ner0x> And lucky for you guys, I'm typically an active contributor to the OS community. :)
tommyvyo has joined #ruby
<apeiros_> cool
<apeiros_> nothing worse than people like me who complain all the time but never provide patches and stuff ;-)
<ner0x> Once I know my shit of course.
fantazo has joined #ruby
Trioke has quit [Ping timeout: 264 seconds]
<ner0x> Do you know if rails has an irc channel?
apok has joined #ruby
<Hanmac> ner0x #rubyonrails
kalleth has joined #ruby
<ner0x> Thank you.
kalleth has quit [Client Quit]
carlyle has quit [Remote host closed the connection]
Trioke has joined #ruby
hotovson has quit [Remote host closed the connection]
aaroncm has joined #ruby
pcarrier has joined #ruby
A85 has quit [Quit: さようなら]
mascool has joined #ruby
twinturbo has joined #ruby
jaygen has quit [Remote host closed the connection]
swex has quit [Remote host closed the connection]
pcarrier_ has joined #ruby
<hderms> i wub wuby
stephenjudkins has joined #ruby
jaygen_ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
vickaita has joined #ruby
cousine has joined #ruby
remi has joined #ruby
voodoofish430 has joined #ruby
Bosma has joined #ruby
jblack has joined #ruby
pavilionXP__ has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
pcarrier has quit [Ping timeout: 255 seconds]
pcarrier_ is now known as pcarrier
mahmoudimus has joined #ruby
dekroning has joined #ruby
pavilionXP has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
vickaita has quit [Ping timeout: 245 seconds]
nat2610 has quit [Quit: Leaving.]
arturaz has joined #ruby
vickaita has joined #ruby
beneggett has quit [Ping timeout: 248 seconds]
dekroning has quit [Ping timeout: 264 seconds]
nat2610 has joined #ruby
chichou_ has joined #ruby
Nanuq has quit [Ping timeout: 246 seconds]
ltsstar has joined #ruby
chichou has quit [Ping timeout: 246 seconds]
Morkel has joined #ruby
beneggett has joined #ruby
senj has quit []
vickaita has quit [Ping timeout: 240 seconds]
adelcampo has joined #ruby
swex has joined #ruby
arietis has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
tommylommykins is now known as tommylommykins[9
tommylommykins[9 is now known as tommylommykins
fbrn has quit [Quit: Leaving.]
pcarrier has quit [Changing host]
pcarrier has joined #ruby
pcarrier has quit []
pcarrier has joined #ruby
kil0byte has joined #ruby
<davidcelis> hderms: wub wub wub WUBWUBWUBWUBWUBWUB
jake_ has joined #ruby
Jdubs has quit [Ping timeout: 248 seconds]
Tuxist has joined #ruby
snearch has joined #ruby
dmiller has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
artOfWar has joined #ruby
Monie has joined #ruby
Takehiro has joined #ruby
Nykolla has quit [Read error: Connection reset by peer]
jake__ has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
freakazoid0223 has joined #ruby
u89 has joined #ruby
nemish has joined #ruby
wroathe has joined #ruby
<nemish> could someone help me fix my elsif statement? http://pastie.org/5373068
statarb3 has quit [Quit: Leaving]
k610 has quit [Ping timeout: 245 seconds]
schickung has quit [Quit: schickung]
<invisime> nemish: what are you trying to do with that semicolon?
perlsyntax has joined #ruby
<nemish> i'm very new to ruby so i might be completely off
thinkdevcode has quit [Ping timeout: 260 seconds]
<nemish> invisime: if hosted? returns true or maybe that should be "ok"?
Takehiro has quit [Ping timeout: 260 seconds]
Jdubs has joined #ruby
<Jdubs> Hi guys
<invisime> is "hosted?" the method you're trying to call?
<Jdubs> Where should I start if I want to build a bot that can search through comments on Reddit and post a reply?
<Jdubs> open-uri?
<invisime> 9gag.
<Jdubs> or Net::HTTPS?
cousine has quit [Remote host closed the connection]
maxer has quit [Quit: maxer]
<Jdubs> invisime: O_O
<invisime> Jdubs: but in all seriousness, use RestClient.
pothibo has joined #ruby
<Jdubs> I want to do it in ruby...
<nemish> if works fine… if and else works fine too… i'm trying to create another option… so basically if image doesn't exist on s3 (AWS:S3:S3Ojbect.exists?) then try a URL… if it doesn't exist there either return the 404 default image
<Jdubs> the point of the bot is ruby practice
<invisime> yes, Hanmac. exactly.
<nemish> so yes invisime i want it to call hosted? and if TRUE then capture that image in blog.. if false then go to else and return 404 image
pcarrier has quit []
pothibo has quit [Client Quit]
<Jdubs> invisme: so i shouldnt try to start from scratch? i should use a prebuilt library to handle it?
<invisime> nemish: then you just need to call it. like so: http://pastie.org/5373101
<invisime> Jdubs: yep. welcome to ruby. "starting from scratch" is sort of relative. ;-)
<Jdubs> invisime: Well, what i mean to say is, will i really learn much from doing it with the library as opposed to starting further down?
<nemish> invisime: "wrong number of arguments (0 for 1)"
Monie has quit [Read error: Connection reset by peer]
Russell^^ has joined #ruby
<invisime> nemish: look at the definition of the hosted? method and pass the argument it's looking for.
<invisime> Jdubs: yes, you will.
<nemish> invisime: like so" 37 elsif hosted? (object)"
<invisime> nemish: probably. I don't really understand what you're trying to do. I'm just offering syntax help.
Virunga has joined #ruby
<nemish> invisime: ok that worked for syntax issue.. but returns the 404 so it's basically saying it skipped over that… so instead of puts "ok" how do I return true or false?
<invisime> nemish: uh, return true or return false?
Solnse has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
<nemish> can i just replace puts "ok" with return true or should i change: elsif hosted? (object) == ok
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
jds has quit [Remote host closed the connection]
jrist is now known as jrist-afk
jds has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
centipedefarmer has quit [Ping timeout: 255 seconds]
<shevy> I think there is not enough sex on #ruby
jds has quit [Read error: Connection reset by peer]
a215 has joined #ruby
<jamesaxl> nemish, yeah if is a true function
<a215> how do i get a list of the methods that have been explicitly defined for a class?
jds has joined #ruby
<a215> as opposed to inherited methods
tommyvyo_ has joined #ruby
mrsolo has joined #ruby
chichou_ has quit [Remote host closed the connection]
<nemish> jamesaxl: invisime: thanks… yes I replace the "puts ok" and "puts nope" with return true and false and it worked
<nemish> thanks
<invisime> no sweat.
yuike has joined #ruby
<nemish> is there an easy way to capture first character of a variable?
swex_ has joined #ruby
vickaita has joined #ruby
<invisime> nemish: not sure.
volta has quit [Remote host closed the connection]
williamcotton has quit [Ping timeout: 246 seconds]
<nemish> so for example if my object was "0361c1db-2057-4ce6-98a4-223aa1bbc940c" i want firstChar=0
<invisime> err, a215: not sure.
centipedefarmer has joined #ruby
perlsyntax has quit [Quit: Leaving]
<jamesaxl> nemish, you can use split and you take the fist item in the lisy
<invisime> a215: depending on circumstances, you may be able to capture the methods that exist on the object before its definition and then git a list of the ones that exist after its definition and use array subtraction.
<nemish> jamesaxl: can you give me example I'm new to ruby never used split
<invisime> nemish: the #[] method may help you.
Luceo has quit [Remote host closed the connection]
answer_42 has quit [Write error: Broken pipe]
alee has quit [Write error: Broken pipe]
Appineer has joined #ruby
<a215> oh
<a215> that's very awkward
Nowaker has quit [Read error: Operation timed out]
Nowaker has joined #ruby
swex has quit [Ping timeout: 260 seconds]
<invisime> a215: yeah, it is.
daniel_- has joined #ruby
<a215> thank god for columns_hash and column_names
<invisime> a215: why do you need this list of methods?
Tuxist has quit [Read error: Connection reset by peer]
<jamesaxl> nemish, if i give an exmaple you will become lazy
<nemish> like this: #{object[0]}
<a215> making an admin gem for rails/mongomapper
<invisime> jamesaxl: ++
<a215> querying explicitly defined methods would allow me to expand it in awesome ways
<a215> although i suppose it doesn't matter
<nemish> should return the first character of object correct
<invisime> a215: ah, yeah. for that I'd use filters and stuff instead of trying to figure out all the entry points to the model.
carlyle has joined #ruby
Tuxist has joined #ruby
<invisime> nemish: you can test it out in irb if you're not sure. ;-)
whitedawg has joined #ruby
Monie has joined #ruby
<nemish> invisime: need to understand how to use irb.. i keep having to make change and restart "rackup"
<nemish> ;)
dankest has joined #ruby
<nemish> but looks like its working
kil0byte has quit [Ping timeout: 260 seconds]
<jamesaxl> nemish, the 1st example and the last one , r="hello" r.split('')[0] will hie you 'h'
Tuxist has quit [Remote host closed the connection]
banisterfiend has joined #ruby
ewag has joined #ruby
Tuxist has joined #ruby
baphled has joined #ruby
<nemish> jamesaxl: yep… that's why i did #{object[0]}
<nemish> :)
<nemish> working like a charm
<jamesaxl> nemish, very good, there are many ways
answer_42 has joined #ruby
<jamesaxl> nemish, http://golf.shinh.org/ if you want to improve yur level in ruby too
<Virunga> >> "ciao".chr => "c"
tvw has joined #ruby
horofox has joined #ruby
apeiros_ has quit [Remote host closed the connection]
codezombie has joined #ruby
apeiros_ has joined #ruby
und3f has quit [Quit: Leaving.]
zaki[] has quit [Ping timeout: 256 seconds]
coderhut has quit [Quit: Page closed]
williamcotton has joined #ruby
glyytchy has joined #ruby
apmacwrk has quit [Read error: Connection reset by peer]
jeff_sebring has joined #ruby
seanyo has joined #ruby
nat2610 has quit [Quit: Leaving.]
nat2610 has joined #ruby
Nanuq has joined #ruby
etcetera has quit [Read error: Operation timed out]
etcetera_ has joined #ruby
krisfremen has joined #ruby
dnstbr has joined #ruby
Morkel has quit [Quit: Morkel]
snearch has quit [Quit: Verlassend]
<Jdubs> ok guys i've been theorcrafting with shevy on what i need to do to build my reddit bot that will search all the comment pages for a string, and then reply to comments with that string with a prespecified string
AndChat| has quit [Ping timeout: 245 seconds]
Appineer has quit [Remote host closed the connection]
dmerrick_ has joined #ruby
<shevy> let's make this short
<Ry> a215: object.methods false should give you anything non inherited
<shevy> - we assume Jdubs already has the string he wants to post on reddit
<shevy> How do you "send" that string to reddit as comment?
<Jdubs> So far i've come up with, get web page, use regex to find urls from main page to build an array of addresses to search for comments...then pull comment page, usea regex to check for the string i need and comment #, and then send back a message to the reddit server in their api format to post
Banistergalaxy has joined #ruby
shtirlic_ has quit [Remote host closed the connection]
<Jdubs> do i have the general idea right?
dmerrick has quit [Ping timeout: 245 seconds]
dmerrick_ is now known as dmerrick
<shevy> let's advertize Jdubs
<shevy> ^^^ HERE IS AN UNSOLVABLE PROBLEM!!!
<shevy> noone on #ruby can answer it
<Ry> basic idea is fine, it's not really anything to do with ruby..
und3f has joined #ruby
thatdudeguy has joined #ruby
thatdudeguy has left #ruby [#ruby]
<Ry> but i'd like to suggest if you're going to use the api to post a comment, may as well use their api for crawling if you can, bound to be faster than regexing for links and such
<Jdubs> Ry yeah i know, i'm just trying to get the general idea right before i start tackling it
love_color_text has joined #ruby
<blazes816> u gotz it bubba
<Ry> prototype with curl & grep ;)
<Jdubs> oh you mean use their search bar basically?
<blazes816> yeah
<blazes816> let them do the work
<blazes816> finding your text
<Jdubs> ooooo
<Jdubs> neat idea
<Jdubs> :)
<Jdubs> I wouldn't have thought of that lol
nickmabry has joined #ruby
zaki[] has joined #ruby
artm has quit [Quit: artm]
<blazes816> jdubs: with a problem like this, the biggest issue is finding ways to offload resource usage
<Jdubs> oic
<blazes816> such as getting reddit to do the searching with their backend instead of writing up something yourself which could easily take orders of magnitude longer
thinkdevcode has joined #ruby
und3f has quit [Ping timeout: 245 seconds]
koshii_ has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
<Jdubs> yeah definitely thanks so much :)
haxrbyte has joined #ruby
<blazes816> np
yuike has quit [Quit: Computer has gone to sleep.]
alee has joined #ruby
senj has joined #ruby
seanyo has quit [Ping timeout: 245 seconds]
werdnativ has joined #ruby
fms has joined #ruby
nickmabry has left #ruby [#ruby]
lamba has joined #ruby
senj has quit [Client Quit]
whitedawg has quit [Quit: Leaving]
csaunders has quit [Quit: Computer has gone to sleep.]
cburyta has quit [Remote host closed the connection]
J-_-L has quit [Quit: Leaving.]
hackerdude has quit [Remote host closed the connection]
cburyta has joined #ruby
hackerdude has joined #ruby
<Jdubs> ok i'm having trouble understanding regular expressions
<GeekOnCoffee> Jdubs: you and the rest of the world ;)
nmabry has joined #ruby
<Jdubs> if i wanted to search for two version of a word, let's say the string "so far" and "so-far" would it be something like /so(- far/?
<Jdubs> it's really confusing
<Jdubs> lol
tommyvyo_ has quit [Ping timeout: 255 seconds]
<fms> Jdubs: /so[- ]far/
ryanf has joined #ruby
ryanf has quit [Client Quit]
<Jdubs> hmmm
<fms> maybe you need to quote that dash though...
<fms> brackets are "this or this or this"
<fms> so you are saying there "dash or space"
<lamba> have the weirdess problem installing gems. seems to fail to connect to the gemspec file, but i dont know why ;-/
slainer68 has joined #ruby
<Jdubs> fms: so brackets are for a single character, but multiple options in the charspace?
tommyvyo_ has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<lamba> just hanging for me.
<shevy> what is that, why not wget
<lamba> that fails too, for what it's worth.
hackerdu_ has joined #ruby
hackerdude has quit [Ping timeout: 268 seconds]
chussenot has quit [Quit: chussenot]
nachtwandler has joined #ruby
krawchyk has quit [Remote host closed the connection]
<nmabry> lamba: that curl command works for me
ckrailo has joined #ruby
<lamba> hmm. must be a disturbance in the interwebs ;-/
r0bby has joined #ruby
und3f has joined #ruby
und3f has quit [Client Quit]
<a215> like a million tiny packets cried out, and then suddenly were silenced
<Jdubs> a215 lol
<a215> it's a packet sniffer!
<Jdubs> you're a packet sniffer!
<a215> take it back
<Jdubs> nevar!
* Jdubs disappears in a flash of smoke!
<lamba> hmm, yea. seems to work from the uk, but not from nz.
* lamba cries.
<Jdubs> I hate lambda's
emmanuelux has joined #ruby
* Jdubs shakes fist!
<a215> lambdas are nice
<a215> you don't even have to name them
<apeiros_> a215: oh my god! the langoliers are coming!
<Jdubs> apeiros_ oh god, worst special effects in a movie evar
judd7 has joined #ruby
<a215> lol
<a215> the C.H.U.D.S.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<apeiros_> Jdubs: who watches the movie…
<Jdubs> apeiros_ STOP JUDGING ME
<Jdubs> judgeing?
<Jdubs> hmmm...
<apeiros_> :D
vlad_starkov has joined #ruby
<apeiros_> oh the irony ;-)
robbyoconnor has quit [Ping timeout: 260 seconds]
jonathanwallace has quit [Remote host closed the connection]
horofox has quit [Quit: horofox]
arturaz has quit [Remote host closed the connection]
LastBeerEver has quit [Ping timeout: 268 seconds]
yshh has quit [Read error: Connection reset by peer]
LastBeerEver has joined #ruby
mahmoudimus has joined #ruby
pdtpatrick has joined #ruby
Maoz has joined #ruby
Tania has joined #ruby
carlyle has quit [Remote host closed the connection]
IrishGringo has joined #ruby
tUze has joined #ruby
tUze is now known as H1gh
maletor has quit [Quit: Computer has gone to sleep.]
linoj has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
yuike has joined #ruby
Maoz has quit [Ping timeout: 245 seconds]
alex__c2022 has joined #ruby
dekroning has joined #ruby
und3f has joined #ruby
<shevy> what is langodier
<shevy> sounds french
<Jdubs> shevy: a stephen king monster
chichou has joined #ruby
vickaita_ has joined #ruby
dekroning has quit [Read error: Connection reset by peer]
wroathe has quit [Ping timeout: 265 seconds]
Takehiro has quit [Remote host closed the connection]
<fms> Guys, I would love to announce here that has-many-with-set 1.0.0 gem has been released!! https://github.com/ebobby/has-many-with-set
<ner0x> Any different from using 'string' or "string" ?
nat2610 has quit [Quit: Leaving.]
vickaita has quit [Ping timeout: 260 seconds]
<pskosinski> How can I destroy a object from it's method?
<pskosinski> an object *
CodeDroid__ has joined #ruby
<pskosinski> its *
francisfish has quit [Remote host closed the connection]
<nmabry> pskosinski: i'm not sure what you mean exactly. do you want to have an object garbage collected by sending it a message?
linoj has quit [Quit: linoj]
<pskosinski> I want program to stop ^^
Tania has quit [Quit: :p]
nat2610 has joined #ruby
<Ry> exit
<pskosinski> And will it remove everything from memory?
andrewhl has quit [Remote host closed the connection]
maletor has joined #ruby
<fms> ner0x: the difference is that single quotes do not take escaped sequences, while double quotes do. puts "\t" ; => ; puts '\t => \t'
rcvalle has quit [Quit: Leaving]
<nmabry> pskosinski: yep. everything will be returned to the system.
<pskosinski> After only exit? Ok, thanks. :)
nat2610 has quit [Client Quit]
etcetera_ has quit [Quit: Computer has gone to sleep.]
<heftig> fms: no interpolation, either. but it does accept \' and \\
andrewhl has joined #ruby
<ner0x> fms: Explaining in terms of ruby doesn't help just yet, I'm *very* new.
Elico has quit [Remote host closed the connection]
<ner0x> fms: Oh, I understand. Just evaluates newline, tab, variables, etc.
<ner0x> fms: Like most other languages. Right.
<heftig> ner0x: inside 'literals', #{foo} and most of the escape sequences (\n \t \r and so on) are not handled specially
jds has quit [Remote host closed the connection]
<ner0x> #{variable} I assume?
IrishGringo has quit [Read error: Operation timed out]
<heftig> actually, #{expression}
<ner0x> I need to go through more ruby tutorials to get some of the basics.
<heftig> "#{3 + 3} is 6" works, and there are no variables
philcrissman has quit [Remote host closed the connection]
<ner0x> Ah, but if if it a variable it's just considered the return statement of the block?
<heftig> what? what block?
<ner0x> {} typical denotes block
jenrzzz has joined #ruby
<Virunga> No, a hash.
<ner0x> But I see the terminology overlap here.
<ner0x> I get it now.
<heftig> after method calls, yes. otherwise it's a hash literal. in strings, #{...} is interpolation
bricker has joined #ruby
<heftig> it evaluates the expression inside the braces and replaces it with its string value
<ner0x> I get it. I'll just have to write some apps to get the finer points but all-in-all pretty awesome.
<ner0x> The :string is weird to me. lol
<nmabry> ner0x: as a side note, to get a handle on strings and other ruby primitives I highly recommend running through the Ruby Koans: http://rubykoans.com/
<heftig> ner0x: it's an interned string, slightly different.
<heftig> ner0x: within a program, two instances of :foo are guaranteed to be the same object
<ner0x> heftig: Rails uses them constantly.
<ner0x> I was reading that everything in ruby is an object. So I'm assuming it's sort of like referencing.
<Jdubs> how do I invoke a json method?
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Jdubs> like the json load method?
<Jdubs> page.json.load()?
<heftig> ner0x: well, every variable you work with is basically an object reference
<ner0x> heftig: That's what I'm seeing. Definitely a different approach than I'm used to.
<ner0x> I do like it so far. Syntax is much different than perl; but concepts always overlap.
<heftig> when you have two literals "foo", they're different object, with their own memory each
<heftig> two literals :foo are always the same object
<ner0x> heftig: :foo shares the reference, saving memory.
<heftig> (they're kept in a global table, like java strings)
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
ChampS666 has joined #ruby
yshh has joined #ruby
<ner0x> nmabry: Downloading "The Koans" now. Just ruby files explaining basic objects?
<heftig> ner0x: they're also never garbage-collected, so creating them dynamically is generally a bad idea
<Virunga> heftig: do you know if a symbol's life last as long as the program's life?
<Virunga> :D
<Virunga> You snswered.
<Virunga> answered*
viktor_ has quit [Quit: This computer has gone to sleep]
<dorei> u can always have them add more memory to the cluster :P
<heftig> ner0x: they're exercises that show you various behaviors
<ner0x> heftig: What are? Literals?
und3f has quit [Quit: Leaving.]
<ner0x> heftig: I mean, never garbage collected.
carloslopes has quit [Remote host closed the connection]
<heftig> symbols
<heftig> the :symbols
<ner0x> So you shouldn't use them on the fly?
<nmabry> ner0x: sort of. but it's interactive. you run `rake koans` or something and it points you to the next failing test. You look up the test and the comments hint at how to fix it. The examples are designed to demonstrate all the basic language concepts and how they differ from other languages.
<ner0x> nmabry: That works.
<Jdubs> Anyone? how do I call a json method
<Jdubs> i feel stupid
<Jdubs> lol
und3f has joined #ruby
xorigin has joined #ruby
<Virunga> google
<ner0x> I assume the "RTFM" response is valid in this channel as well?
Nykolla has joined #ruby
<dorei> json method? i thought json is a way of describing objects
und3f has quit [Client Quit]
und3f has joined #ruby
cmarques has quit [Ping timeout: 260 seconds]
francisfish has joined #ruby
susenbg has joined #ruby
<heftig> ner0x: you should take care when creating them dynamically (as in somestring.to_sym). if you keep doing that and it creates new symbols over and over, you're gonna fill up the memory
kpshek has quit []
<Virunga> Once my Prof. wrote RTFM on the college's forum to a student xD
horofox has joined #ruby
nmabry has quit [Read error: Connection reset by peer]
<Virunga> That was the first time i saw it.
rippa has quit [Ping timeout: 252 seconds]
<ner0x> heftig: Oh, that way. :symboe => "Literal" in a function is fine?
Mkman has joined #ruby
nmabry has joined #ruby
und3f has quit [Client Quit]
und3f has joined #ruby
und3f has quit [Client Quit]
Takehiro has joined #ruby
<heftig> ner0x: sure
<ner0x> heftig: Okay, that's what I thought you were saying.
<ner0x> heftig: I just need to run through these examples after work.
<heftig> what i meant was stuff like 1.upto(10000000) { |x| "foobar#{x}".to_sym }
<ner0x> heftig: And the memory isn't cleared until restart?
kpshek has joined #ruby
<heftig> that creates 10000000 new unique symbols that are probably never used again, yet are saved
<ner0x> heftig: Also, no idea what |x| does yet.
Elico has joined #ruby
<ner0x> Very interesting syntax.
<heftig> 1.upto(3) { |x| puts x }
<ddd> think of it as a placeholder for the .up_to value
<susenbg> how does the gem depenendency resolution work? i have a gem that when i try to install wants to install another gem in a outdated version first. but i can't find that information in the unpacked gem file. so how does 'gem install' know that a .gem requires another gem and what version?
<heftig> outputs three lines: 1, 2 and 3
<ddd> err upto
<heftig> ner0x: it's the parameter list for the block, like the parameter list of a method
<ner0x> It's equivalent to $_ in perl for ( @list ) { print $_; }
<ddd> susenbg: from the gem's gemspec when it was created
Luceo has joined #ruby
<susenbg> ddd: in the .gem file there is no gemspec file included
<ddd> find the repo for the gem you're trying to install and look at its gemspec file then trace
<ddd> i know. its used TO make the gem
<ner0x> Oh well, sort of different than. upto sends whatever it does to local scope.
<ner0x> |varname| scoops up the local scope variables sent?
emergion has joined #ruby
<ner0x> 1.upto(4) { |index| puts index } # Correct?
<heftig> yes
<susenbg> ddd: ok. can i later manually change that version constraint? does it work when i create my own gemspec file?
<ner0x> Alright. Easy enough.
<ner0x> heftig: That just cleared up half the questions I had while reading docs. :)
ipsifendus has joined #ruby
kirun has quit [Quit: Client exiting]
pll has joined #ruby
pll has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<nmabry> Jdubs: sorry, i meant to respond when my router crashed. what exactly do you need to do with JSON?
<heftig> ner0x: upto internally uses "yield". it calls the block attached to a method. (it also takes parameters, which the block is called with)
<Jdubs> @nmabry i figured it out
nat2610 has joined #ruby
<nmabry> Jdubs: sweet
J-_-L has joined #ruby
J-_-L has quit [Client Quit]
<ner0x> heftig: The first parameter will always be equal to yield correct?
<dorei> heftig: ruby blocks behave like anonymous functions?
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<axl_> what would be a good way to convert something like ['and', 'alter', 'antler', 'bag', 'boy', 'big', 'cat', 'cloy', 'climb'] to [['and', 'alter', 'antler'] ['bag', 'boy', 'big'], ['cat', 'cloy', 'climb']] ?
kirun has joined #ruby
<axl_> so group them based on the first letter
<tommylommykins> axl: is it something like enumerable#chunk?
<heftig> dorei: pretty much. they're closures.
<dstywho> isn't there a group_by
theRoUS has quit [Read error: Operation timed out]
nat2610 has quit [Client Quit]
<axl_> (tomaw let me take a look
TomRone has quit [Ping timeout: 240 seconds]
<axl_> err…
<heftig> ner0x: no, the first parameter isn't handled any different
chichou has quit [Read error: Connection reset by peer]
<tommylommykins> axl: maybe sort and then chunk?
<heftig> if you just do "yield" with no arguments, the first parameter doesn't exist
clj_newb has quit [Ping timeout: 265 seconds]
<Hanmac> axl_ arr.each_slice(3).to_a
<heftig> ruby will just give you a 'nil' then
<Ry> axl_: group_by { |x| x[0] }.values assuming you mean group by first letter
<axl_> Hanmac: actually i am grouping them based on the first letter, not groups of 3
<axl_> Ry: that looks promising
vlad_starkov has quit [Remote host closed the connection]
<ner0x> heftig: If |input| is the current index. and yield is the current index, won't they both be the same?
wroathe has joined #ruby
<heftig> ner0x: upto does use an argument. it loops from low to high, passing each integer via "yield i" or something similar. sorry if that was confusing
<Jdubs> nmabry: hey i called JSON.parse and put the output into a variable...i'm having trouble getting out the data that i want from it now. any advice?
<tommylommykins> axl_: my_arr.sort.chunk{}
<tommylommykins> axl_: my_arr.sort.chunk{|thing| thing[0]}.to_a
<Ry> Jdubs: puts variable_name.inspect
TomRone has joined #ruby
<tommylommykins> that basically does what you want
<tommylommykins> oh
<tommylommykins> or group_by
<axl_> man, you guys are awesome
<axl_> thanks
<ner0x> heftig: No, you were good. I don't know what yield does. lol
cmarques has joined #ruby
<heftig> ner0x: try something like this: def foo; yield 1; yield 2; yield 3; end; foo { |x| puts x }
aquaranto has quit [Remote host closed the connection]
<heftig> >> 3
<heftig> meh, no bot
ewag has quit [Read error: Connection reset by peer]
ben_alman has left #ruby ["Adios!"]
Mon_Ouie has quit [Ping timeout: 240 seconds]
jonathanwallace has joined #ruby
gbchaosmaster has joined #ruby
Mon_Ouie has joined #ruby
<nmabry> Jdubs: The properties are accessed by square brackets. my_object["some property"]
<ner0x> heftig: I'm still confused.
h4mz1d has joined #ruby
etcetera has joined #ruby
<ner0x> Ah, so yield pushes things to ||
haxrbyte_ has joined #ruby
<ner0x> I still have a long way to go.
haxrbyte has quit [Ping timeout: 248 seconds]
<Jdubs> nmabry: i tried that, i can't find it :(
Virunga has quit [Remote host closed the connection]
bricker has quit [Ping timeout: 246 seconds]
<Jdubs> http://www.reddit.com/new/.json this is the file i'm loading
<Jdubs> i want to access the modhash
<Ry> ner0x: this is a pretty handy book http://www.ruby-doc.org/docs/ProgrammingRuby/ (it's older ruby, but it's pretty much still useful)
<ner0x> Jdubs: That url doesn't exist.
<gbchaosmaster> Jdubs: Have you looked into some existing reddit API wrappers, or are you doing it from scratch on purpose?
<Jdubs> ner0x works for me
<Jdubs> gbchaosmaster doing it from scratch on purpose
jds has joined #ruby
<gbchaosmaster> Works for me also.
<ner0x> Jdubs: Ah, I see that now.
jxf has quit [Ping timeout: 246 seconds]
<Ry> Jdubs: if you use chrome, try out the JsonView extension, you want var['data']['mod hash'] apparently
<gbchaosmaster> Are you going so far as to do the JSON parsing by hand also? I just got in a bit ago, can't see the scrollback.
<nmabry> Jdubs: agh, so it's a problem tracking down the location of the property. I use a chrome extension to make viewing json easier: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?utm_source=chrome-ntp-icon
haxrbyte_ has quit [Remote host closed the connection]
<Jdubs> nmabry thanks i downloaded thatn ow :)
<nmabry> Jdubs: so in this case the code would be: parsed_response["data"]["mod hash"]
<nmabry> Jdubs: whoops: parsed_response["data"]["modhash"]
aaroncm has quit [Quit: aaroncm]
jds has quit [Remote host closed the connection]
<Ry> nmabry: goddamn, didn't even notice autocorrect got me too on the modhash* :P
<Jdubs> nmabry that's still not working :(
<Jdubs> connect.rb:28:in `[]': can't convert String into Integer (TypeError)
<Jdubs> from connect.rb:28:in `print_page'
<Jdubs> from connect.rb:37:in `<main>'
jds has joined #ruby
<nmabry> Ry: I know. took me 4 tries :)
<Jdubs> line 28: pp @jsondata['data']['modhash']
Jamone has joined #ruby
otters has joined #ruby
<Ry> Jdubs: is that jsondata parsed?
andrewhl has quit [Remote host closed the connection]
geekbri has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
<Jdubs> yeah
steg132 has quit [Ping timeout: 265 seconds]
senj has joined #ruby
<Ry> else it will be trying to index into a string, rather than a property in a hash
<Jdubs> let me pastie my code for you
<Ry> sure, cheers
vlad_starkov has joined #ruby
cburyta has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
<nmabry> Ry: lol, i totally missed your earlier identical responses
<susenbg> ddd: i could solve my problem, thx again
<Ry> Jdubs: I'm guessing parsing line by line is breaking it
andrewhl has joined #ruby
<Ry> gimme a sec to verify
Monie has quit [Ping timeout: 245 seconds]
nanderoo has left #ruby [#ruby]
<Hanmac> http://www.abload.de/img/img_0735d2i30.jpg << this was what i did for last halloween ...
niklasb has joined #ruby
<shevy> hehe
<shevy> that's a smiling pumpkin
ffranz1 has quit [Ping timeout: 260 seconds]
<dstywho> !rules
<Ry> yeah, Jdubs , use @jsondata = JSON.parse(@page.read)
wroathe has quit [Ping timeout: 240 seconds]
<Jdubs> oh sweet thanks
<Ry> and i'll let you figure out the rest :P
geekbri has joined #ruby
<Hanmac> shevy http://www.abload.de/img/img_0736wxd5m.jpg << and this is how the pumpkin looks WITHOUT flash
<Hanmac> shevy did you notice the hidden face :D
viktor has joined #ruby
shtirlic has quit [Ping timeout: 276 seconds]
geekbri has quit [Remote host closed the connection]
<shevy> cool
viktor is now known as Guest39958
<shevy> looks scarier that way
<Jdubs> Ry: I get this error connect.rb:26: warning: Hash#index is deprecated; use Hash#key
<Ry> do..what..it..says? :P
<blazes816> brilliant!
<blazes816> built in error handling
nat2610 has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9.1]
<Hanmac> shevy i did the face from the inside :D
Takehiro has joined #ruby
jrun has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<Jdubs> Ry: I don't understand the error :(
csaunders has joined #ruby
<blazes816> Jdubs: it's a deprecation warning. it's saying the index method on Hash objects should no longer be used, and you should use the key method instead
<Jdubs> hmmm
<Ry> Jdubs:
dangsos has joined #ruby
clj_newb has joined #ruby
<Ry> read up what nmabry said a couple of lines ago when you asked before
<Ry> ponder on it, you'll get there!
cascalheira has joined #ruby
Hannes3 has joined #ruby
<Jdubs> ok it works to print it, but it's printing an empty string :/
<Jdubs> but there is always a modhash
tommyvyo has quit [Quit: Computer has gone to sleep.]
tpe11etier has quit [Ping timeout: 240 seconds]
Tuxist has quit [Remote host closed the connection]
<Ry> check for typos, if you're getting an empty string it means you're getting a nil result
<pskosinski> What if TCPSocket.new will fail to connect? Would I get nil or error somewhere?
statarb3 has quit [Quit: Leaving]
<nmabry> Jdubs: the "modhash" property is nested inside the "data" property in reddit's json. You'll have to access it as @jsondata.key("data").key("modhash") or @jsondata["data"]["mod hash"]
<Jdubs> yeah i did the second one nmabry
k776 has joined #ruby
<Ry> Jdubs: actually ignore what i last said, empty string is correct for the code you pasted before
jxf has joined #ruby
alexwh has joined #ruby
<Ry> if you print @jsondata
alexwh has quit [Client Quit]
<k776> Has anyone noticed 1.9.3 p327 uses a lot more CPU and is much slower than p194?
<Ry> you'll see within data, mod hash is ' '
<Jdubs> hmmm
<Jdubs> oh!
<Jdubs> it's because the program isn't logged in
stayarrr has quit [Quit: Linkinus - http://linkinus.com]
zaki[] has quit [Ping timeout: 255 seconds]
<k776> After upgrading Ruby on production, cpu went from constantly <25% to constantly >50%
<Jdubs> now i need to figure out how to log my program into reddit and keep it logged in
tommyvyo has joined #ruby
alexwh has joined #ruby
baroquebobcat has joined #ruby
<Ry> gl&hf
<Jdubs> Ry: thanks!
nachtwandler has quit [Remote host closed the connection]
<Ry> k776: have you tried to profile for comparisons?
Zolrath has joined #ruby
<gbchaosmaster> Jdubs: A POST request to /api/login/USERNAME with the params user, passwd, and api_type (make that json) will do it.
<k776> Ry: Looks primarily like it's GC
<Jdubs> hmmm...
<pskosinski> Ok, I found something about rescue, ty.
<Jdubs> but how will it distinguish between my program and my browser?
swex_ has quit [Read error: Operation timed out]
jds has quit [Remote host closed the connection]
<Jdubs> is it not logged in by ip?
<k776> Ry: My Rails test suite went from ~4m to ~5.5m in duration, with no changes
ffranz1 has joined #ruby
<shevy> Hanmac, today was the first time I had to use LIBS env ... LIBS=-ldl
<gbchaosmaster> Jdubs: Nope, it'll return some JSON with your cookie (in the data attribute) and your modhash.
remi has quit [Quit: leaving]
margle has quit [Quit: Computer has gone to sleep.]
<gbchaosmaster> Also a zero-length json.errors, for to verification of success.
<Jdubs> i see
<Jdubs> so i need to save the response cookie?
<gbchaosmaster> If invalid, you'll get nothing but a json.errors telling you what you borked.
Neomex has joined #ruby
swex has joined #ruby
<Jdubs> and the modhash
Neomex has quit [Client Quit]
<Jdubs> and with each new action, supply the modhash?
<Jdubs> or i get logged out?
<Jdubs> is that the right understasnding
maletor has quit [Quit: Computer has gone to sleep.]
CodeDroid__ has quit [Ping timeout: 252 seconds]
jrist-afk is now known as jrist
k776 has left #ruby [#ruby]
<Ry> k776: cool potatoes, maybe you can gather some data and slap it in a pastie and someone can look into it perhaps
h4mz1d has quit [Ping timeout: 260 seconds]
<gbchaosmaster> If you're making a client, yeah, you'd want to save that so that the user doesn't have to log in every time. And indeed. Here's the API documentation, it's pretty thorough: http://www.reddit.com/dev/api
fumduq has joined #ruby
itchyouch has joined #ruby
<Jdubs> gbchaomaster: yeah i've been reading through that, but i'm still pretty new to programming so it's not all easy for me to understand
<Jdubs> like i still have to figure out how to actually send a command as well lol
<Jdubs> i'm guessing it's Net::HTTPS to send stuff?
<Ry> Jdubs: have you read their api yet?
<Hanmac> shevy i hope the -ldl was not my fault :D
maletor has joined #ruby
<gbchaosmaster> net/http does a good job, yeah. Here's an API wrapper that my buddy wrote a few months back, you may find some useful code in there to help you on your way. https://github.com/andkerosine/snooby
<gbchaosmaster> Looking through open source code is a great way to get cozy with programming.
<Jdubs> What does api wrapper mean ?
<nmabry> Jdubs: that's the standard library way to do it. but third-party libraries can make it a lot easier. here's a list of those available: https://www.ruby-toolbox.com/categories/http_clients
<Jdubs> Ry: I've browsed it, i'm still trying to figure it out
<Ry> simplified abstraction generally
<Jdubs> nmabry: I feel like i will learn more if i use the standard lib
philcrissman has joined #ruby
<gbchaosmaster> It means that it's a Ruby library that gives a native syntax to the API rather than having to send JSON requests.
<Jdubs> oic
<Jdubs> I think I'd rather build that from the ground up, i'm making the bot as a way to learn and build a portfolio
<Jdubs> another project im working on is an rpg
reinaldob has quit [Remote host closed the connection]
tommyvyo_ has joined #ruby
<Jdubs> and i think i might try to make a webcrawler as well
<nmabry> Jdubs: that makes sense. it's really widely used. i just never got used to the api :)
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<Jdubs> nmabry: what's widely used, sorry?
<gbchaosmaster> An ambitious learner, you are.
<gbchaosmaster> I like it.
<nmabry> Net::HTTP
<shevy> Hanmac: nah, but something is odd with the linker. it does not want to include all glibc components, it also claims that libraries do not exist, but they exist right in /lib or /usr/lib
<Jdubs> @gbchaosmaster: I'm trying to get into the programming field...I'm almost 30 and don't have a real career, trying to change that
<Jdubs> @gbchaosmaster: I don't want to have to rejoin the military to support my fiance when we get married
<Jdubs> @gbchaosmaster and i've always loved programming and computers since iwas little
<gbchaosmaster> Jdubs: It's a great choice, keep it up.
<nmabry> Jdubs: rock on
<gbchaosmaster> Is Ruby your first serious language?
<Ry> Jdubs: I'd suggest investing in some books, theres loads of good free ones that will help ramp you up
tyfighter has joined #ruby
OldOats has quit [Ping timeout: 245 seconds]
<Jdubs> gbchaosmaster: I've done some C, some html and css (im bad at design though lol), and MIRC scripting, and basic
<gbchaosmaster> Also, seeing as you're on reddit, /r/dailyprogrammer is an excellent place to practice.
<nemish> will this work: get /:varable1/:variable2.jpg ?
glyytchy has quit [Quit: glyytchy]
<nemish> or how do i break variable2 away from the .jpg
zaki[] has joined #ruby
<gbchaosmaster> I have a hunch that that should work.
<Jdubs> gbchaosmaster I'll check it out: I'm also trying to do a udacity class, do codeacademy every day, and go through rubymonk
<shevy> Jdubs: old age stinks, but you have one advantage over the young super-fast learning 18 years old - you can make up grand plans and better timelines
<X-Jester> is there a utility that can give you a better absolute path to an installed gem than 'gem query -l -d -n <gemname>' which only gives you the path to the gems root?
<nmabry> gbchaosmaster: oh, cool! i've never heard of /r/dailyprogrammer
linoj has joined #ruby
<Jdubs> @shevy, yeah I'm trying to get into the App Academy in San Fran atm
<gbchaosmaster> nemish: "." isn't a valid character in a symbol, for obvious reasons, so it should be okay. Have you tried it?
banisterfiend has quit [Ping timeout: 256 seconds]
<Jdubs> my main advantage is I know how to work hard, and I'm motivated, I know what I want and I'm going for it
<X-Jester> for example, if the gem is mygem version 1.2.3, is there a way to determine what the path to /usr/lib/ruby/gems/1.9.1/gems/mygem-1.2.3 ?
<Jdubs> I just pray that I make it through the application process
<Jdubs> And I'm spending all my free time atm practicing programming so if i get in, I can make the most of my time there by having a lot of knowledge prior to arriving
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<gbchaosmaster> nmabry: You might also like Project Euler if you haven't heard of it, they're some pretty greuling, more math focused programming problems.
tenmilestereo has quit [Quit: Leaving]
<yxhuvud> gbchaosmaster: . is a perfectly valid character in a symbol. You just have to use quotes when defining the symbol as the normal input method don't handle it
<nemish> gbchaosmaster: i'm getting sinatra "doesn't know this ditty" error so I'm guessing its correct "syntax" wise… but can't figure out why its breaking… is there a debug option on rackup that would help me debug what's wrong?
<nmabry> gbchaosmaster: i've played around with Project Euler in the past, but usually lost interest due to the strictly math focus. I like the variety I'm seeing on dailyprogrammer.
dstywho has quit [Quit: Leaving]
<gbchaosmaster> yxhuvud: Oops, my bad there. Derp.
<Jdubs> Anyone here happen to know any of the guys at App Academy? Help me get in! :D
Guest91808 has quit [Quit: Guest91808]
Hydroxide has joined #ruby
<nemish> gbchaosmaster: the debug flag doesn't seem to get me enough verbose
<nemish> i need something like sh -x where i can see the values of the variables to make sure they are set correctly
<Jdubs> gbchaosmaster: Do you think reading a book is better than my current method of choosing projects and working on them?
<Jdubs> Btw, Apeiros_ is pretty awesome, he's been helping me learn :)
linoj has quit [Client Quit]
pcarrier has joined #ruby
<gbchaosmaster> Jdubs: Por que no los dos?
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
<Hydroxide> I have a Range of objects which themselves are Comparable and support .succ but are not Enumerable (presumably my Range is). I'm trying to Set.merge them into an empty Set. Set is complaining that it can't iterate from my Comparable+succ object
bluOxigen has quit [Ping timeout: 252 seconds]
<Hydroxide> shouldn't the Range be handling the iteration?
RandyInLA has joined #ruby
<gbchaosmaster> Doing projects and making things is very important, but don't reject reading material. I never dug into any books, but I've spent plenty of time on blog posts/tutorials/articles on the web.
<Hydroxide> in case it's relevant, this is Ruby 1.9.2 and it's a custom subclass of Time that does other stuff plus also implements .succ
<Jdubs> gbchaosmaster: I'm going to guess that says, why not both?
<Jdubs> or something similar
<Jdubs> lol
<Hydroxide> adding "require 'date'" doesn't fix it, so it doesn't look like a limitation in the barebones Time class
<gbchaosmaster> Must be an older reddit joke, that Old El Paso taco commercial started it some time back when haha
<gbchaosmaster> But yeah, it just depends how you learn.
<gbchaosmaster> Everyone picks things up differently.
<Jdubs> i'm more of a hands on learner
<gbchaosmaster> Same.
<Jdubs> that's why uni didn't work out for me
<Jdubs> lol
ffranz1 has quit [Ping timeout: 245 seconds]
<Jdubs> well, that's not really true
<Jdubs> it mostly didn't work out because of all the classes that have NOTHING to do with the major...
<Hydroxide> if my question isn't clear I can try to make a stripped down version that behaves the same way and paste a link. the exact context has too much other stuff in it
<Jdubs> i did great in comp sci classes and math, but horrible in other classes like writing and speaking lol
<Hydroxide> Jdubs: european unis don't work that way. US ones do.
<Jdubs> i'm from the US
<Jdubs> lol
<Hydroxide> Jdubs: so am I :)
<Ry> Hydroxide: any example code would be great
<Jdubs> @hydroxide, oh then why did you bring that up?
<gbchaosmaster> Here's somethin' for you to tinker with, don't give me credit for coming up with it-
<Hydroxide> just saying, international studying is an option :) btw, I did a CS degree and am in the tech industry. I wish my speaking skills were better, and a lot of my recent self-improvement in terms of job skills has been in the area of documentation
<Ry> he's saying you'd have had no problems in european universities
<gbchaosmaster> "10001".chars.reduce(?) { |?| ? } # => 17
<Hydroxide> so don't count those things out even in our industry
<Hydroxide> Ry: sure, I'll cook some up
<Jdubs> Hydroxide: well, i think the problem was mostly motivation...i felt 0 motivation in those classes
<Jdubs> got A's in comp sci and math though
<Hydroxide> sure. that I sympathize with, definitely. in uni my writing was fine when I made myself do it - it was making myself doing it that was tough :)
<Jdubs> yeah i hated writing...so id put it off and put it off
<Jdubs> but my programming projects id generally finish the same day i got them lol
<Hydroxide> same. except I didn't hate writing, I hated the idea of starting writing :)
<gbchaosmaster> Hydroxide: I share all of your pain.
<Hydroxide> while I was doing it and hadn't get gotten distracted, it was fine...
<Hydroxide> *hadn't yet
<gbchaosmaster> Once you start, you're into it.
<Hydroxide> gbchaosmaster: yup, definitely common.
<Jdubs> Hydroxide me too!!!but the anticipation gave me so much anxiety i would almost have a breakdown lol
<Jdubs> Hydroxide that's how much i hated papers
<Hydroxide> yup. caused me major issues too
<Hydroxide> at some point I got proper professional help and improved coping mechanisms (meds were only a small part of the solution, and not even the most important part)
F1skr has joined #ruby
<Hydroxide> but it never got easy during my time in school
susenbg has quit [Quit: Konversation terminated!]
<shevy> see Hanmac... ./conftest: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
bigmcq77 has joined #ruby
qwerxy has joined #ruby
<Hydroxide> now several years later at work I don't need meds, and I can get it done more easily, but it's still not easy. probably never will be.
<Ry> just get drunk, write a load of whimsical bullshit, correct it the evening after
<nmabry> Ry: that's how Windows ME happened: http://xkcd.com/323/
<Ry> it probably is
<gbchaosmaster> Always a relevant XKCD.
<Ry> When I worked at MS, I wrote on of my test strategies drunk because i couldn't face a blank page..
Juul has joined #ruby
pcarrier has quit []
<Ry> one of*
tbrock has quit [Quit: Computer has gone to sleep.]
<Jdubs> LOL
steg132 has joined #ruby
<Jdubs> Ry: is that why working at MS is past tense?
<Jdubs> :P
<Ry> It would be comical, but nah :P I got bored and moved to china xD
<gbchaosmaster> Did you enjoy that job?
<gbchaosmaster> I haven't touched any MS software in a long time, and I think that it'd only be a hinderance if I had to again.
<Ry> :P
<nmabry> Ry: whoa. big move
<Jdubs> Ry, do you work for a chinese company or telecommute?
arietis has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
<Ry> The job was fun yeah, I worked on Office stuff, which recently has been pretty decent stuff :)
<Hydroxide> Ry: I have an example now. one moment.
<Jdubs> Ry: you should contribute to the Open Office suite XD
<Ry> Jdubs: nah, not working for anyone, doing individual research on random shit for no reason, and going to a load of art exhibitions for no reason.. shrug
mwillhite has joined #ruby
Takehiro has quit [Remote host closed the connection]
<Jdubs> @ry how do you support yourself?
<Ry> Jdubs: never used it
<Ry> caused I used to work?
<mwillhite> im sending a POST request with httparty to a redmine app…but the redmine logs are showing it has a GET request…how and why could that happen?
<Jdubs> Ry: wow how long can you live on your savings? are you retired?
<mwillhite> it works on my local instance of redmine…I'm not sure if its a redmine thing or an httparty thing…
<Ry> not really, I'm just taking a break
<Ry> I've been out of my country for about 15 months so far, could probably last another year or so if I wanted to, but heading back for 2months over the winter to sort some stuff
havenn has joined #ruby
<Hydroxide> Ry: and the main error that gets thrown, in the s.merge(range) line, is "[/path/within/my/rvm/install/to/]set.rb:81:in `each': can't iterate from Time (TypeError)"
<nmabry> mwillhite: Interesting, can you post some httparty example code?
<Hydroxide> this is ruby 1.9.2p290, in case it's relevant
<gbchaosmaster> Alright, I got two problems, one involving a piece of horrible, incredibly hacky code that I want to make a bit less hacky, and another involving some potentially awesome code.
<mwillhite> nmabry I'm just calling .post on a class that I've mixed HTTParty into
<gbchaosmaster> My first problem is apparant in the last comment here: https://gist.github.com/486bd13eb1a6606a68e8
<mwillhite> but the redmine logs show the request (params and all) as a GET
<Jdubs> Gbchaosmaster: I'd help you if i was skilled enough, sorry bro :(
Xeago has joined #ruby
<mwillhite> Processing IssuesController#index to json (for 10.162.54.181 at 2012-11-13 21:31:23) [GET]
<gbchaosmaster> Jdubs: If you want to go on to become a half decent Ruby programmer, I'd avoid that link like the plague. =P
<Jdubs> LOL
<Jdubs> will do
<Jdubs> Hey Xeago o/
<gbchaosmaster> I'm shamelessly breaking just about every good practice there, and will make it prettier later. Don't hate me, #ruby.
<Jdubs> btw, for those who don't know : that's a wave
<gbchaosmaster> What I'm trying to solve there is more or less a math issue, though. Something is slightly off and I can't quite brain up enough to fix it.
<Jdubs> hmmm
Michael__ has joined #ruby
<Jdubs> go to #math?
<nmabry> mwillhite: after a quick experiment, a post request should definitely be sent. this seems like a redmine issue.
<gbchaosmaster> It's pretty programming-specific. =/
<Jdubs> go to #math_programming?
<Jdubs> :P
OmegaX has joined #ruby
<nmabry> mwillhite: and i know nothing about red mine :(
<gbchaosmaster> Jeez, FreeNode, y u have everything?
joshman_ has quit [Ping timeout: 246 seconds]
OmegaX has left #ruby [#ruby]
mwillhite has quit [Ping timeout: 248 seconds]
Cicloid has joined #ruby
<gbchaosmaster> Wouldn't have been surprised if that actually existed.
<gbchaosmaster> Is there any good discussion over at #math, or is it mostly people wanting answers to their homework?
yxhuvud has quit [Ping timeout: 252 seconds]
mwillhite has joined #ruby
linoj has joined #ruby
<shevy> hehe
RudyValencia has quit [Quit: Hacked By Chinese!]
blacktulip has quit [Remote host closed the connection]
bricker has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
jxf has quit [Ping timeout: 240 seconds]
skcin7 has joined #ruby
skcin7 has quit [Max SendQ exceeded]
sailias has quit [Ping timeout: 240 seconds]
gp5st has quit [Quit: Leaving.]
skcin7 has joined #ruby
Virunga has joined #ruby
tbrock has joined #ruby
nkts has joined #ruby
<Ry> Hydroxide: you've got an interesting case caused by the subtraction of integers
<Ry> it's changing the type of the object back to Time
<Ry> rather than your new class
pyx has joined #ruby
<Ry> so such no longer exists
prezioso has quit [Ping timeout: 248 seconds]
<Jdubs> can anyone tell me how to fix /usr/lib/ruby/1.9.1/openssl/ssl-internal.rb:121:in `post_connection_check': hostname does not match the server certificate (OpenSSL::SSL::SSLError)
medik has joined #ruby
medik has quit [Excess Flood]
BrianJ has joined #ruby
medik has joined #ruby
Banistergalaxy has joined #ruby
caleb_io has joined #ruby
bigmcq77 has quit [Quit: Computer has gone to sleep.]
<Hydroxide> Ry: ah... so i need to pass the result to my constructor
<Hydroxide> i.e., to a new object
<Hydroxide> the real initializer handles that okay
<Hydroxide> not the toy one
<Hydroxide> I mean, it should. it calls .to_s on the input and does stuff
<blazes816> Jdubs: what url are you trying to request? it appears to be an ssl misconfiguration
Takehiro has joined #ruby
TheFuzzball has joined #ruby
jds has joined #ruby
<Jdubs> blazes816: http://pastie.org/5374009
<Ry> Hydroxide: you lost me, but I think you get it?
Trioke_ has joined #ruby
Trioke has quit [Ping timeout: 260 seconds]
<blazes816> Jdubs: you probably just want http, not https
<Jdubs> I tried http, gave me a 404
thinkdevcode has quit [Remote host closed the connection]
IrishGringo has joined #ruby
awaage has joined #ruby
<Hydroxide> Ry: I would think I get it, except that doesn't fix it
<blazes816> Jdubs: it looks like perhaps reddit has shit misconfigured
<blazes816> the cert is for akamai, not reddit
<Hydroxide> Ry: I wonder, do I have to re-implement <=> for Comparable?
<blazes816> not quite sure why that happened
<Jdubs> what is akamai? and how do you know about the cert?
<krisfremen> akamai is a cdn
<Jdubs> what is a cdn :P
<blazes816> it's a cdn
<blazes816> content distribution network
<krisfremen> and they host api bridges to their servers I think
<blazes816> Jdubs: go to the url in chrome and it will tell you the details of the cert
postmodern has joined #ruby
mark_locklear has quit [Remote host closed the connection]
dnstbr has quit [Quit: Computer has gone to sleep.]
stkowski has quit [Quit: stkowski]
<Jdubs> hmmm
yuike has quit [Quit: Computer has gone to sleep.]
<Jdubs> how can i get my program to ignore the cert
robustus has quit [Quit: ZNC - http://znc.in]
obryan has quit [Ping timeout: 245 seconds]
dnstbr has joined #ruby
SmoothSage_ has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
jds has quit [Ping timeout: 252 seconds]
jds_ has joined #ruby
dnstbr has quit [Max SendQ exceeded]
IrishGringo has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.2/20121024073032]]
Takehiro has quit [Read error: Connection reset by peer]
AxonetBE has joined #ruby
tothehilt has joined #ruby
jxf has joined #ruby
SmoothSage_ has quit [Max SendQ exceeded]
sieson has joined #ruby
linoj has quit [Quit: linoj]
SmoothSage_ has joined #ruby
SmoothSage__ has quit [Ping timeout: 248 seconds]
<sieson> how do you modify an object within a block and ensure that the object is globally changed?
dmiller has joined #ruby
SmoothSage_ has quit [Max SendQ exceeded]
c0rn has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
<gbchaosmaster> If it's outside of the scope of the block, it will be changed.
<apeiros_> sieson: objects are always globally changed.
SmoothSage_ has joined #ruby
<ner0x> So there's no harm in using '' over "" then?
<apeiros_> if a change is not reflected somewhere where you observe, then you're not looking at the same object.
<Hydroxide> Ry: Revised version which is explicit about what succ returns still fails: https://gist.github.com/4068559
v0n has quit [Quit: Leaving]
<apeiros_> ner0x: '' and "" only have different escaping and interpolation. other than that, no difference. both are Strings.
<gbchaosmaster> I use "" just because I find myself going to use an escape/interpolation and then realising "damn it, gotta change the quotes now".
<Jdubs> can i view the headers chrome is sending somehow?
<ner0x> I got used to '' and am stuck now. I use "" when I know I need interpolation.
<ner0x> Good habit I guess.
alex__c2022 has quit [Quit: alex__c2022]
<dorei> Jdubs: wireshark?
<apeiros_> Jdubs: if it uses the same inspector as webkit, yes. open the dev tools
<gbchaosmaster> Python got me used to ''. Had to break it.
<sieson> apeiros_: that doesnt seem to be the case for me, here is what I am doing: http://pastebin.com/SJuMWA1A
havenn has quit [Remote host closed the connection]
SmoothSage_ has quit [Max SendQ exceeded]
adelcampo has quit [Quit: Linkinus - http://linkinus.com]
dnstbr has joined #ruby
<apeiros_> hurray. code without expected/actual
<gbchaosmaster> Ruby has drawn be far far away from Python, but fully functional single quoted strings are the one thing that I miss.
tommyvyo has quit [Quit: Computer has gone to sleep.]
cam` has joined #ruby
<Jdubs> apeiros: I'm in the dev tools, where do i go now
<gbchaosmaster> That and the slice indexing syntax.
<nmabry> gbchaosmaster: hey, still having trouble with the map generation?
SmoothSage_ has joined #ruby
<apeiros_> Jdubs: to "Resources"
<Ry> Hydroxide: sorry i was away, I'll pm you
<gbchaosmaster> Yeah, it still falls a little short without that hack in place.
<gbchaosmaster> ^ @nmabry
Takehiro has quit [Read error: Connection reset by peer]
baphled has quit [Ping timeout: 255 seconds]
joeycarmello has quit [Remote host closed the connection]
<apeiros_> hm, moment
<apeiros_> stupid redesigns…
Gate_ has joined #ruby
c0rn has joined #ruby
<nmabry> gbchaosmaster: i took a look at the code, mostly because i was curious to see how it worked, and the issue is the (@world[:size] / (total / data[:weight])) calculation.
minijupe has quit [Quit: minijupe]
Takehiro has joined #ruby
SmoothSage_ has quit [Max SendQ exceeded]
jonathanwallace has quit [Remote host closed the connection]
<nmabry> gbchaosmaster: if the @world[:size] isn't evenly divisible by the (total / data[:weight]) calculation, then you're getting a rounded down number of elements.
SmoothSage_ has joined #ruby
Maoz has joined #ruby
<shevy> gbchaosmaster: odd. I use '' most of the time, and "" only when I want to interpolate
Maoz has quit [Client Quit]
<apeiros_> yeah, resources, then change to "source code", and in the right sidebar there's "Request-Header"
awaage has quit [Quit: awaage]
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
bbttxu has quit [Quit: bbttxu]
<gbchaosmaster> nmabry: I figured that it was that calculation. How to most nicely tweak it to fix?
passbe has joined #ruby
dmiller has quit [Remote host closed the connection]
Mkman has quit [Quit: Lost terminal]
Gate has quit [Ping timeout: 256 seconds]
SmoothSage_ has quit [Max SendQ exceeded]
c0rn has quit [Client Quit]
Wildhoney has joined #ruby
SmoothSage_ has joined #ruby
<apeiros_> sieson: I'd need what you do, what you expect to happen and what happens instead. puzzling is fun, but not for things like that.
Gate_ has quit [Ping timeout: 260 seconds]
Gate has joined #ruby
ner0x has quit [Quit: Leaving]
<nmabry> gbchaosmaster: I'm not sure. The approach of generating a percentage of blocks of each type will always lead to a remainder unfilled. We'd still have to fill in some missing spots at the end.
SmoothSage_ has quit [Max SendQ exceeded]
<shevy> long live compiling! long live ruby!
<nmabry> gbchaosmaster: If we inverted the problem, and instead selected a random block type for each available spot in the world, then we wouldn't have to worry about a remainder. But then we'd have to create a method to select a random block taking weight into account.
jenrzzz has joined #ruby
SmoothSage_ has joined #ruby
Michael__ has quit [Remote host closed the connection]
<sieson> apeiros_: Sorry, here it is with the expected behavior at the bottom: http://pastebin.com/LyG4Nqn0
dnstbr has quit [Quit: Computer has gone to sleep.]
SmoothSage_ has quit [Max SendQ exceeded]
Michael_ has joined #ruby
SmoothSage_ has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
c0rn has joined #ruby
<gbchaosmaster> nmabry: How would that compare efficiency-wise?
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Cultofmetatron has joined #ruby
Michael_ has quit [Remote host closed the connection]
c0rn has quit [Client Quit]
SmoothSage_ has quit [Max SendQ exceeded]
t-mart has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.9]
<apeiros_> sieson: I'm fascinated. I have no idea how you think anybody could reproduce what you do by what you just pasted.
greenarrow has quit [Read error: Connection reset by peer]
sieson has left #ruby [#ruby]
SmoothSage_ has joined #ruby
sn0wb1rd has quit [Remote host closed the connection]
<apeiros_> sieson: anyway, the probably correct explanation is: the object where you call metadata.ssh = ssh on is not the same object where ruby complains about @ssh being nil
havenn has joined #ruby
<nmabry> gbchaosmaster: definitely unfavorable. especially because your existing solution could potentially be boiled down to 'generate a single column and shuffle for each row'.
<apeiros_> the alternative explanation is, that ssh - which you assign to metadata.ssh - is indeed nil
jrist is now known as jrist-dogwalk
sn0wb1rd has joined #ruby
<apeiros_> both can be easily tested
Hannes3 has quit [Quit: Konversation terminated!]
d2dchat has quit [Remote host closed the connection]
<apeiros_> use `p metadata: metadata.object_id, ssh: ssh` where you assign it, and get the object id of self where the exception occurs.
SmoothSage_ has quit [Max SendQ exceeded]
iamjarvo has quit [Quit: Computer has gone to sleep.]
cmarques has quit [Ping timeout: 268 seconds]
<nmabry> gbchaosmaster: if you're okay with resolving the missing slots with random elements like you're doing, it doesn't seem like a bad approach. you would just have to replace adding a single element with adding world[:size] - selection.size elements to make it work for all weights and world sizes.
Averna has quit [Quit: Leaving.]
SmoothSage_ has joined #ruby
xorigin has quit [Quit: leaving]
SmoothSage_ has quit [Max SendQ exceeded]
JustinCampbell has quit [Remote host closed the connection]
greenarrow has joined #ruby
koshii_ has joined #ruby
AxonetBE has quit [Quit: Leaving.]
SmoothSage_ has joined #ruby
Trioke_ has quit [Ping timeout: 260 seconds]
SmoothSage_ has quit [Max SendQ exceeded]
jenrzzz has quit [Read error: Connection reset by peer]
Serial_Killer_C has quit [Read error: Connection reset by peer]
<Jdubs> Hmmm
jenrzzz has joined #ruby
<Jdubs> Now my program is hanging
<Jdubs> When i run it
<Jdubs> :/
SmoothSage_ has joined #ruby
Serial_Killer_C has joined #ruby
dnstbr has joined #ruby
rhys has joined #ruby
Debolaz has quit [Ping timeout: 264 seconds]
SmoothSage_ has quit [Max SendQ exceeded]
c0rn has joined #ruby
maesbn has quit [Remote host closed the connection]
Trioke has joined #ruby
<gbchaosmaster> nmabry: I guess I'll go that way. Putting in an " # Hack to keep the selection at the right size. For some reason, it
<gbchaosmaster> # falls one short every time.
<gbchaosmaster> # TODO: Fix the math so that this isn't necessary.
<gbchaosmaster> Well that didn't copy right.
<rhys> a quick question, when I try to set the home environmental for net::ssh within a class, i need to make it an instance variable? @ENV['HOME'] = '/'
<gbchaosmaster> Haha.
<gbchaosmaster> Just ended up using an until block.
banseljaj has quit [Excess Flood]
SmoothSage_ has joined #ruby
<nmabry> gbchaosmaster: sweet. out of curiosity, making a game?
cdt has joined #ruby
prezioso has joined #ruby
joeycarmello has joined #ruby
<Jdubs> Can anyone check this out please? http://pastie.org/5374174
banseljaj has joined #ruby
<rhys> Jdubs, you know you need to point out the error to get someone to help right?
<Jdubs> I did up higher
<Jdubs> it's hanging
SmoothSage_ has quit [Max SendQ exceeded]
<gbchaosmaster> nmabry: A couple friends of mine are doing a simple text-based RPG in Java, I'm trying to evangelize for Ruby, so they're interested in seeing how I'd implement it in Ruby.
<Xeago> Jdubs: that is no error description
<Jdubs> :/
<Xeago> exception/error/stacktrace
<Jdubs> i don't get anything, i have to ctrl c it
<nmabry> gbchaosmaster: cool! good luck!
<Xeago> and code, expected behavior and actual
<gbchaosmaster> nmabry: Thanks!
<Jdubs> and then it gives me errors after interrupting it
SmoothSage_ has joined #ruby
<Xeago> Jdubs: than it is probably an infinite loopt
<Xeago> Jdubs: than paste that
<Jdubs> there are no loops in my program
<apeiros_> gbchaosmaster: just started one https://github.com/apeiros/teaching_rpg
<Jdubs> Xeago: http://pastie.org/5374188 errors are at the bottom
Debolaz has joined #ruby
SmoothSage_ has quit [Max SendQ exceeded]
<Jdubs> Xeago: had to ctrl c cause program wasn't ending
<Xeago> am on phone in bath, sorry can't help :'(
tommyvyo has joined #ruby
SmoothSage_ has joined #ruby
<rhys> Xeago, looolz.
<Jdubs> Xeago: lol...
<Jdubs> gbchaosmaster: you should check out the rpg game im working on : )
<nmabry> apeiros_: awesome!
SmoothSage_ has quit [Max SendQ exceeded]
Cultofmetatron has quit [Remote host closed the connection]
<gbchaosmaster> Jdubs: You on on GitHub? I'd be glad to give input where I can.
SmoothSage_ has joined #ruby
mytec has joined #ruby
RudyValencia has joined #ruby
jonathanwallace has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
SmoothSage_ has quit [Max SendQ exceeded]
<Jdubs> gbchaostmaster: You think you can look at my current problem though? http://pastie.org/5374188
<Jdubs> trying to login to redit via my program
<Jdubs> program is hanging, and only closes on ctrl c
<Jdubs> then the errors i pasted in the bottom of the code pop up
SmoothSage_ has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Client Quit]
fantazo has quit [Ping timeout: 276 seconds]
k610 has joined #ruby
yuike has joined #ruby
SmoothSage_ has quit [Max SendQ exceeded]
Solnse has quit [Ping timeout: 260 seconds]
<apeiros_> nmabry: contributions welcome
headius has quit [Quit: headius]
<apeiros_> especially dungeon designs
ltsstar has quit [Quit: ltsstar]
SmoothSage_ has joined #ruby
xpen has joined #ruby
<nmabry> Jdubs: it looks like you're sending a GET request instead of a POST request that the reddit API is expecting. open-uri doesn't support POST requests, but a stack overflow answer claims that rest-open-uri does: http://stackoverflow.com/questions/242602/how-do-i-make-a-post-request-with-open-uri
vickaita_ has quit [Ping timeout: 248 seconds]
SmoothSage_ has quit [Max SendQ exceeded]
beiter has quit [Quit: beiter]
davidcelis has quit [Quit: K-Lined.]
<gbchaosmaster> nmabry: I think you got it. I'll see if I can get this up on my machine.
cakehero has quit [Quit: Computer has gone to sleep.]
SmoothSage_ has joined #ruby
koshii_ has quit [Read error: Connection reset by peer]
<Jdubs> nmadry haha, i bet that's the problem!
<Jdubs> nmadry: you rock, how did you figure that out?
skcin7 has quit []
<gbchaosmaster> GitHub Gist > all, by the way.
davidcelis has joined #ruby
<gbchaosmaster> Pygments is your master.
pcarrier has joined #ruby
SmoothSage_ has quit [Max SendQ exceeded]
k610 has quit [Ping timeout: 276 seconds]
k610 has joined #ruby
Russell^^ has quit [Quit: Russell^^]
SmoothSage_ has joined #ruby
invisime has quit [Quit: Leaving.]
Takehiro has joined #ruby
<nmabry> Jdubs: i checked the reddit api and noticed that login was a POST method, then looked to see if your code included any terms like POST, and then googled "open-uri post". i'm not sure if that's the answer, but it may be one reason reddit isn't responding correctly to the request.
SmoothSage_ has quit [Max SendQ exceeded]
c0rn has quit [Quit: Computer has gone to sleep.]
<Jdubs> nmabry i'm sure you are right :)
SmoothSage_ has joined #ruby
<havenn> faraday is a really nice option as well for sending POST: https://github.com/technoweenie/faraday
<nmabry> gbchaosmaster: Github Gist FTW. I love `git clone`ing a sample rather than copying and pasting into terminal. The formatting never works right.
seme has joined #ruby
cakehero has joined #ruby
francisfish has quit [Remote host closed the connection]
SmoothSage_ has quit [Max SendQ exceeded]
GoGoGarrett has quit [Remote host closed the connection]
<seme> hey guys I'm on a mac and I'm trying to figure out how to develop a GUI that will run on windows, linux, mac... any suggestions for a toolkit?
k610 has quit [Ping timeout: 252 seconds]
<gbchaosmaster> I usually just curl the raw and pipe that into whatever tool I need.
<blazes816> seme: jruby+swing is pretty tried and true
joeycarmello has quit [Remote host closed the connection]
SmoothSage_ has joined #ruby
<seme> yeah I kind of wanted to do standard ruby
banjara has quit [Read error: Connection reset by peer]
mmitchell has quit [Ping timeout: 240 seconds]
k610 has joined #ruby
banjara has joined #ruby
kirun has quit [Quit: Client exiting]
<gbchaosmaster> gtk2?
<gbchaosmaster> wxRuby would be nice if only it worked.
<apeiros_> seme: so you're going for the worst of all worlds approach?
dakine has quit [Quit: Leaving]
enderx86 has quit [Remote host closed the connection]
SmoothSage_ has quit [Max SendQ exceeded]
<seme> apeiros_: looks like it... I'm selfish and don't want to develop on each platform... I'd rather do it once
<xpen> hi guys. what's a ppyx file ?
tommyvyo has quit [Quit: Computer has gone to sleep.]
<apeiros_> xpen: doesn't sound like something ruby related
<xpen> i saw a file in gevent as core.ppyx
SmoothSage_ has joined #ruby
<gbchaosmaster> Sounds like a compiled Python artifact of sorts.
chussenot has joined #ruby
csaunders has quit [Quit: Computer has gone to sleep.]
<havenn> seme: Qt or Tk maybe?
etehtsea has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<nmabry> seme: i've used ruby/tk, wxruby, and jruby+swing. jruby is definitely the easiest solution. it's easily cross-platform, pretty, and has a lot of support. The other two have very small communities and not a whole lot of documentation.
<xpen> i have no idea
<Virunga> To me looks like a power point file.
asteve has quit [Quit: Computer has gone to sleep.]
<seme> I was looking for Qt but it seems like it isn't looking to be supported yet
<Virunga> To know the answer just google it.
<shevy> qt gets bigger and bigger
<Jdubs> Man...
cdt has quit [Ping timeout: 255 seconds]
<shevy> I like the old days. things used to be small and lean
<Jdubs> I'm starting to think I'm going to have to start from Net::HTTPS and build from there lol
<Jdubs> Apeiros_ HELP MEH! :(
<xpen> googled a lot, only can find .pyx file
SmoothSage_ has quit [Max SendQ exceeded]
<apeiros_> Jdubs: Errno::ETOODRUNK
<nmabry> shevy: qt is freaking amazing in C++ though. SO preferable to the alternatives.
<Jdubs> Apeiros_ loll....it's tuesday dude wtf lol
SmoothSage_ has joined #ruby
<apeiros_> Jdubs: just the right day
k610 has quit [Ping timeout: 260 seconds]
prezioso has quit [Ping timeout: 245 seconds]
<xpen> oh, sorry guys, i think i'm in the wrong channels :/
johnjohnson has quit []
k610 has joined #ruby
<havenn> xpen: Figured you meant to be in Python :P
philcrissman has quit [Remote host closed the connection]
SmoothSage_ has quit [Max SendQ exceeded]
<nmabry> Jdubs: Net::HTTP will work, but I highly encourage you to try out more modern alternatives. Net::HTTP is a great library, but it may make you crazy trying to use it. It was discussed on a recent episode of Ruby Rogues: http://rubyrogues.com/073-rr-apis/
<xpen> havenn: u r right
SmoothSage_ has joined #ruby
geggam has quit [Ping timeout: 240 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
<havenn> Faraday makes Net::HTTP use sane, imho.
<nmabry> havenn: It makes me happy
<Jdubs> nmadry I'm afraid im going to get lost using large libraries..I've only used the standard libs so far
<Jdubs> nmadry and won't i learn more by using less?
peregrine81 has quit [Quit: Computer sleeping.]
<reactormonk> how do I kill all elements in a nokogiri doc that satisfy a criterion?
alanp has quit [Read error: Operation timed out]
mwillhite has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
<nmabry> Jdubs: in this case, maybe not. Faraday or HTTParty are simplifications. They are much smaller, more focused libraries than Net::HTTP.
<apeiros_> reactormonk: with fire!
Zolrath has quit [Ping timeout: 256 seconds]
<joofsh> jdubs: httparty is really easy to use, may be good for what you're looking to do
<reactormonk> apeiros_, blub
nari has joined #ruby
alanp has joined #ruby
<Jdubs> joofsh does it work similar to open-uri but with a get function?
<joofsh> jdubs: yes
jrun has quit [Quit: WeeChat 0.3.7]
k610 has quit [Ping timeout: 260 seconds]
<havenn> nmabry: Oooh, rest-client from that Rogues link looks really nice!
<Jdubs> errr i mean put
jrist-dogwalk is now known as jrist
h4mz1d has joined #ruby
k610 has joined #ruby
<joofsh> you can use get/put/post , has methods for all
<nmabry> Jdubs: and more importantly, it'll have a put function to call
<nmabry> Jdubs: oops *post
jonathanwallace has quit [Remote host closed the connection]
<nmabry> havenn: i haven't used rest-client, but it looks slick
jonathanwallace has joined #ruby
Cultofmetatron has joined #ruby
vlad_starkov has joined #ruby
reinaldob has joined #ruby
sebastianb has quit [Read error: Connection reset by peer]
nuclearblast has joined #ruby
<havenn> nmabry: I like simplistic. :)
joeycarmello has joined #ruby
<gbchaosmaster> Jdubs: What's this supposed to do?
<Jdubs> should i go through the rb files for httparty to try to understand it? or what?
<gbchaosmaster> self.#{item.slot}=item
<reactormonk> apeiros_, unlink apparently
<Jdubs> ummm
<Jdubs> which file are you in
<Jdubs> it might be stuff i was just conceptualizing
<Jdubs> is that Equipment file?
axl_ has quit [Quit: axl_]
<gbchaosmaster> enemy.rb, yeah, looks like some kind of pseudoRuby. =P
<Jdubs> oh enemy.rb lol
<Jdubs> yeah that was like when i first started working ruby
<Jdubs> haven't really worked on enemy file since then
<Jdubs> look at hero file for how enemy should look
k610 has quit [Ping timeout: 245 seconds]
<joofsh> jdubs: on github, httparty has an "examples" dir with 5 or so examples of how to use it. That's what i did to learn it
Edward_ has joined #ruby
dmiller has joined #ruby
<havenn> Jdubs: Or scan over faraday, typhoeus, httparty, and rest-client DSLs and try using a few. Nice to know what they are each capable of. Not sure which makes the best code-read.
Serial_Killer_C has quit [Remote host closed the connection]
k610 has joined #ruby
heruka has quit [Quit: WeeChat 0.3.7]
<joofsh> jdubs: it can be as simple as HTTParty.post(url, options)
Paradox has quit [Ping timeout: 264 seconds]
jonathanwallace has quit [Ping timeout: 240 seconds]
<apeiros_> gbchaosmaster, Jdubs - probably self.send("#{item.slot}=", item)
<Jdubs> joofsh: wow that is simple!
<apeiros_> ah, I remember, that was the point when I noticed that I should introduce hashtables to Jdubs
francisfish has joined #ruby
<Jdubs> apeiros_ you should really go check some of my recent additions, i think i'm doing well xD
<apeiros_> (I think he knows them already, but tried to go a different route for experimentation)
jxf has quit [Ping timeout: 252 seconds]
<apeiros_> Jdubs: will do
<joofsh> so if you need to pass a param "id" => "5" it'd be... HTTParty.post("localhost:3000", body: {'id' => '5'}
<joofsh> )
c0rn has joined #ruby
ipsifendus has quit [Quit: ipsifendus]
Cultofmetatron has quit [Remote host closed the connection]
<havenn> Jdubs: Most have similar DSLs, RestClient.post, HTTParty.post, Faraday.post, etc.
Wildhoney has quit [Ping timeout: 255 seconds]
<Jdubs> havenn, awesome :) I don't have time now to try to implement that today...Looks like that will be for tomorrow...maybe a good future goal would be to write a nice DSL for Net::HTTPS that does similar
jrist is now known as jrist-afk
<Jdubs> would that be something good to have in my coding portfolio?
k610 has quit [Ping timeout: 256 seconds]
<Drewch> I've got a question about what's popular for initializing a class in Ruby, for example, a Client to an API that takes in a consumer key and consumer secret
minijupe has joined #ruby
Paradox has joined #ruby
francisfish has quit [Remote host closed the connection]
<Drewch> Is the popular thing to do Client.new consumer_key: '234', consumer_key_secret: '456'
<Drewch> or just Client.new('234', '456')
k610 has joined #ruby
dangerousdave has quit [Quit: Leaving...]
<joofsh> drwech: are you asking with or without parenthesis, which is more common?
tommyvyo has joined #ruby
<Drewch> no, I'm asking hash or no hash
verto|off is now known as verto
<joofsh> drewch: oh wups, missed that
<Drewch> by Client.new '234', '456 I know it's the same as with brackets
<blazes816> Drewch: I personally like to try and follow the 0, 1, or infinity 'rule' when writing methods. So I prefer it to take a hash of arguments. especially since it's very likely this will need to take other params sometimes
<blazes816> s/sometimes/sometime/
verto is now known as verto|off
<Sou|cutter> hashes for optional params, at least
<joofsh> ^ what blazes said, especially if optional
<Drewch> Okay thanks, but if required, generally don't use hash?
<havenn> Or jump the shark and use Ruby 2.0.0 named arguements. :P
pcarrier has quit []
dnstbr has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Jdubs> Apeiros_ whatcha doin
<Drewch> How do you define the hash for them if you do use a hash, would you name all the arguments and set them to ''?
<Drewch> such as
francisfish has joined #ruby
<Drewch> def initialize( consumer_info = { consumer_key: '', consumer_secret: '' } )
<nmabry> Drewch: I fall on the explicit side of the fence. I prefer Client.new ''234", "456" to the hash alternative. I tend to reserve hashes for more DSL-ish use. Otherwise I prefer to pass in regular parameters or a wrapper object. We'll see if Ruby 2 changes that.
reinaldob has quit [Remote host closed the connection]
<nmabry> Drewch: but this is a total matter of taste area
<Drewch> yeah I figured that
k610 has quit [Ping timeout: 260 seconds]
<Drewch> My company just opened up an API
<Jdubs> nmabry: define wrapper object?
<Drewch> writing libraries for all the languages
<joofsh> drwech: better to use def initialize consumer_info = {} . And then you can use a loop in the initialize method using the send() method to set them
<Sou|cutter> nmabry: when you say DSL-ish, do you mean in the style Foo.new do |config| ... end ?
<Drewch> I don't want to piss off ruby community by writing the client in a distasteful way
<blazes816> Drewch: have a hash with the default arguments. then do something like def initialize(args={}); options = defaults.merge(args); end
<Jdubs> Drewch: that's nice of you :)
k610 has joined #ruby
<havenn> In Refactoring from Good to Great I think Ben Orenstein passed a custom Struct or OpenStruct object instead of Hash for two params, need to re-watch that talk: Refactoring
Michael_ has joined #ruby
riley526 has joined #ruby
<Sou|cutter> ooh, I need to watch that
clj_newb has quit [Ping timeout: 268 seconds]
<blazes816> i much prefer the hash if the goal is to allow expanding parameters without breaking the api
<nmabry> Jdubs: by wrapper object i just meant… if a method begins to accept a bunch of related parameters, then i'll create a new class with those parameters as properties. then i'll pass in that object instead of a bunch of parameters. Ben Orenstein's talk that havenn mentioned above describes the strategy well.
<bricker> What's the most succinct and fastest way to tell if every element in an array is in another array?
<Drewch> blazes816: then how do they know what the symbol's for the hash are?
<Drewch> or they have to look at an example to see how it works?
enderx86 has joined #ruby
hackerdu_ has quit [Remote host closed the connection]
riley526 has left #ruby [#ruby]
<blazes816> Drewch: they'd need to read the documentation. how would you know what params and what order, a method takes otherwise?
dangsos has quit [Ping timeout: 245 seconds]
<Sou|cutter> Drewch: that's definitely a downside of hash-based options
<Sou|cutter> blazes816: if you use a configuration object you can inspect it, at least
<Jdubs> nmabry: do you think i would understand the video?
<blazes816> same with a default arg hash
<Drewch> blazes816: yeah good point, I wasn't arguing I'm just curious, if someone was using Java with eclipse they could see if it's named in the Object itself
<bricker> Like, `(b & a) == b` ? Any better solutions?
vickaita has joined #ruby
<Sou|cutter> blazes816: how do you inspect the default arg hash?
<nmabry> Sou|cutter: By DSL-ish I just meant cases where I'm explicitly designing for use as a third party dependency. Sometimes that seems like a good way to document intended use.
<blazes816> Drewch: for sure, me either. true. I have no issue with using a struct, but only if the params are pretty solid
h4mz1d has quit [Ping timeout: 245 seconds]
Schmidt has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
<Drewch> This is basically just for their API key and API Secret Key
<Drewch> I feel like what would make most people happy is a hash
<nmabry> Jdubs: you'll at least understand a lot of it. and if not, who cares? in that talk you get to see a really efficient ruby developer work. that always inspires me.
<shevy> damn python
<shevy> gobject-introspection requires it...
kpshek has quit []
<Drewch> but I want to make sure if I define the function as def initialize(args={})
<blazes816> Drewch: soon they'll need to add a callback url, specify custom endpoints, etc
<shevy> and all this python version madness isn't making things easier.
k610 has quit [Ping timeout: 268 seconds]
<Drewch> that people will understand to put in: consumer_key: and consumer_key_url:
<Drewch> yeah exactly, I have that in the API, but not yet using it, so that is definitely one reason to use a hash
<blazes816> Drewch: check for their presence and raise an error if they aren't there. just like what would happen if it took explicit args
k610 has joined #ruby
<Sou|cutter> Drewch: if you can't have a Client without a consumer key / url, I would use regular params
<blazes816> there are obviously a large number of opinions on the matter
nemish has quit [Ping timeout: 248 seconds]
<Drewch> yeah of course
RudyValencia has quit [Quit: Hacked By Chinese!]
<Drewch> right now, only one of the 3 parameters is used Consumer_key, and the three are: consumer_key, consumer_key_securet, and callback_url
<Drewch> so from what i've gathered so far
<reactormonk> ARGH. Nokogiri fucks namespaces up.
<Drewch> the most sense thing to do
<Drewch> is
<havenn> Drewch: class ConsumerKey < Struct.new(:consumer_key, consumer_key_secure, :consumer_key_url); end
<Drewch> Client.new '123', consumner_key_securet: '567', callback_url: 'www.mycallback'
<Sou|cutter> reactormonk: the deeper into nokogiri I've gotten, the more I dislike it ;)
swex has quit [Read error: Operation timed out]
RudyValencia has joined #ruby
<Sou|cutter> havenn: I thought it was better practice not to subclass struct classes
<reactormonk> Sou|cutter, found a better one?
jjang has joined #ruby
xpen has quit [Remote host closed the connection]
king313 has joined #ruby
ChampS666 has quit [Ping timeout: 255 seconds]
swex has joined #ruby
k610 has quit [Ping timeout: 265 seconds]
vlad_sta_ has joined #ruby
nitti has quit [Quit: Leaving...]
macabre has quit [Remote host closed the connection]
bpfh has quit [Ping timeout: 245 seconds]
<Drewch> blazes816 how would I define initialize in the case above, where the one is required, and the other 2 are optional hashes
<Drewch> is it
<havenn> Sou|cutter: Does it cause problems? I've no idea.
k610 has joined #ruby
<Drewch> def initailize(consumer_key, optional={})
<blazes816> Drewch: you could, but only do that if nothing else will be required, or you can break the api
<Sou|cutter> reactormonk: Not really, no
dagnachew has joined #ruby
jonathanwallace has joined #ruby
neiko has joined #ruby
<havenn> Sou|cutter: If it is bad, tell Ben Orenstein why so he can make his refactoring talk better!
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<havenn> Sou|cutter: I'm not accustomed to seeing it.
_alejandro has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 245 seconds]
neiko has quit [Client Quit]
bpfh has joined #ruby
Michael_ has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 260 seconds]
k610 has joined #ruby
<Drewch> blazes816 so the most flexible is just def initialize(args={})
LMolr has joined #ruby
LMolr has quit [Client Quit]
<dagnachew> is there a chancen that rubinuius becomes the defacto ruby implementation ?
swex has quit [Read error: Operation timed out]
<blazes816> Drewch: yep, but at the expense of having a less self-documenting api. it's all about tradeoffs and balances. personally, that way is my preference
<Sou|cutter> havenn: http://blog.rubybestpractices.com/posts/rklemme/017-Struct.html speaks to the marginal benefit of passing a block to Struct.new rather than subclassing
<Drewch> blazes816: okay thanks
<Sou|cutter> havenn: it's a nitpick
<havenn> Sou|cutter: Nice, will read. Best practices are best. :)
<Sou|cutter> basically the downside is that an extra class is created
<blazes816> dagnachew: never say never, but probably no
* Sou|cutter shrugs
<gbchaosmaster> So I got an interesting one for ya'll.
swex has joined #ruby
bigmcq77 has joined #ruby
k610 has quit [Ping timeout: 265 seconds]
<gbchaosmaster> I'm keeping a core extension library, and I extended #map, but it appears that Array doesn't inherit Enumerable's. So right now I'm sitting on this: https://github.com/gbchaosmaster/nutella/blob/master/lib/nutella/core_ext/enumerable/map.rb#L17-19
<dagnachew> blazes816, the thing is 5 years or 10 years from know will ruby have a full parallelism mechanisim or it wont never remove the gil thus hindering scaling ?? thus hitting a wall once scaling issues arise hince choosing ruby ofr new projects ????
<gbchaosmaster> How to DRY that up?
k610 has joined #ruby
C0deMaver1ck has quit [Remote host closed the connection]
<havenn> dagnachew: Maybe Celluloid will be moved into the standard library for Ruby 3000.
amacgregor_osx has joined #ruby
<blazes816> dagnachew: I think jruby would become the defacto ruby before rubinious. but regardless, I think mri still has a chance to figure this issue out
<Ry> gbchaosmaster: Module Mappable def map perhaps? code looks the exact same bt that could be my 8am eyes -_-
<havenn> dagnachew: The GIL is already gone (long live the GVL!).
<Ry> perhaps even just define the mappable module inside enumerable and then you've only got the include in array?
<dagnachew> havenn, blazes816 without further bothering , will ruby be fit for the heavy lifting ( big data et all) or will it be sentenced to only do "front end " ??/
k610 has quit [Ping timeout: 246 seconds]
jjang has quit [Ping timeout: 252 seconds]
k610 has joined #ruby
nmabry has left #ruby [#ruby]
Juul has quit [Ping timeout: 264 seconds]
<blazes816> dagnachew: depends on how heavy. you may want to consider c or c++. if that's too much, then ruby would probably work fine for you. especially using celluloid or jruby/rubinious
<havenn> dagnachew: Ruby has a bright future. Crush the snake.
<Sou|cutter> dagnachew: I don't think ruby is going to have robust threading for a long, long time.
<Sou|cutter> but I don't think that is the same as sentencing it to front end
<havenn> MHTSWHT: Matz Hates Threads So We Hate Threads.
<blazes816> many jobs simply don't require threading
<blazes816> haha
baroquebobcat has quit [Quit: baroquebobcat]
qwerxy has quit [Quit: offski]
SCommette has quit [Quit: SCommette]
Michael_ has joined #ruby
vickaita has quit [Ping timeout: 276 seconds]
berserkr has quit [Quit: Leaving.]
<Jdubs> haven: who is matz?
ndrei has quit [Ping timeout: 276 seconds]
<davidcelis> lol
<davidcelis> this guy!
<havenn> Jdubs: Ruby's Benevolent Dictator for Life
k610 has quit [Ping timeout: 260 seconds]
vickaita has joined #ruby
<Jdubs> havenn, glorious leader?!?
Juul has joined #ruby
k610 has joined #ruby
<havenn> We need to get Matz added to the "Programming Language Creator or Serial Killer" quiz: http://www.malevole.com/mv/misc/killerquiz/
<dagnachew> Sou|cutter, you have this great idea for the next "big thing", prototype with ruby , continue with ruby , oups 100 000 users more in one month ! two weeks later 10 fold 1 million clients , months later 50 millions clients will you keep the technology stack with ruby ?
jjang has joined #ruby
<Sou|cutter> not really enough information for me to say
<Sou|cutter> but I'd probably use java if it has a really heavy workload (please don't hurt me)
<Sou|cutter> the thing is you are lucky to have the problem of scaling
<Sou|cutter> most people never really get to that point
jaygen_ has quit [Remote host closed the connection]
<Sou|cutter> unless they write something in a horrendously unscalable fashion
hackerdude has joined #ruby
nari has quit [Ping timeout: 245 seconds]
<blazes816> don't write something with the expectation that millions of users use it because it'll take you forever (probably literally) to finish and there's no reason to be able to handle millions of users if it never even gets 1
<Sou|cutter> so I think it pays to start with using whatever technology you think will get you up and running fastest, and if you begin to hit scaling bottlenecks, measure them and decide a course of action for solving them (it may be changing parts of your stack, it may be optimizing what you have, etc)
hackerdude has quit [Read error: Connection reset by peer]
k610 has quit [Ping timeout: 252 seconds]
hackerdude has joined #ruby
Kyril has joined #ruby
<Sou|cutter> blazes816: certain times you are guaranteed to get slammed immediately. Whenever google rolls out a product for example :P
<joofsh> Isn't that generally the role rails takes? No one argues its the most efficient, its just the fastest getting up and running. most companies seem to eventually switch (particularly to node)
<blazes816> okay, if you're google, you may want to plan for millions of users
x82_nicole has quit [Quit: Computer has gone to sleep.]
<Sou|cutter> joofsh: to node? really? lol, ok
jonathanwallace has quit [Remote host closed the connection]
k610 has joined #ruby
<joofsh> or not? it was more of a question
rellin has joined #ruby
<joofsh> thats just the impression i get
gabrielrotbart has joined #ruby
nat2610 has quit [Quit: Leaving.]
hackerdude has quit [Read error: Connection reset by peer]
<blazes816> from the node community
hackerdu_ has joined #ruby
<joofsh> from hacker news. But its certainly a bias sample
<Sou|cutter> node makes sense for a certain subset of problems, but I would argue it's the same set of problems that EventMachine covers. So I think it's silly to say to scale you are going to want to rewrite your product in eventmachine - that makes no sense.
<blazes816> just kidding. but seriously, node is mostly hype. it's a pretty neat platform but not anywhere near the magical medicine people claim
mmikeym has quit []