apeiros changed the topic of #ruby to: Ruby 2.1.0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hiall__ has joined #ruby
lfox has quit [Quit: ZZZzzz…]
g0bl1n has quit [Ping timeout: 240 seconds]
lethjakman has quit [Ping timeout: 265 seconds]
popl has quit [Read error: Operation timed out]
<glen> damn this new github skin is too bright
relix has joined #ruby
shadoi has joined #ruby
Spami has joined #ruby
<benzrf> bbl
benzrf has quit [Quit: leaving]
drumusician has quit [Read error: Operation timed out]
octoberry has quit [Ping timeout: 260 seconds]
fedesilva has joined #ruby
kevind has quit [Quit: kevind]
nari has joined #ruby
hobodave has quit [Ping timeout: 252 seconds]
<glen> yeah. thanks and byeall
mojjojo has quit [Quit: mojjojo]
glen has left #ruby [#ruby]
relix has quit [Ping timeout: 264 seconds]
slowcon has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
mansi has joined #ruby
SCommette has quit [Quit: SCommette]
chrisseaton has quit []
doodlehaus has joined #ruby
blackmesa has quit [Ping timeout: 248 seconds]
tauebel has quit [Quit: Leaving.]
standyro2 has joined #ruby
IceyEC has joined #ruby
tauebel has joined #ruby
mlpinit has joined #ruby
Viridisignis_ has joined #ruby
yasushi has quit [Remote host closed the connection]
lethjakm1 is now known as lethjakman
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
IceyEC has quit [Client Quit]
Viridisignis has quit [Ping timeout: 240 seconds]
rezzack1 has quit [Quit: Leaving.]
tauebel has quit [Read error: No route to host]
Chioque has joined #ruby
senj has quit [Quit: Textual IRC Client: www.textualapp.com]
tauebel has joined #ruby
cj3kim has joined #ruby
aryaching has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
Jetchisel has quit [Ping timeout: 256 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
wgosling has joined #ruby
pskosinski has quit [Quit: http://igg.me/p/597505/x/6111010 Resurrect Revenge Of The Cats: Ethernet As Open-Source Project]
cbetta is now known as cbetta_afk
obs_ has quit [Quit: Konversation terminated!]
platzhirsch has joined #ruby
rubyracer has quit [Quit: Konversation terminated!]
<platzhirsch> gumba
maletor has joined #ruby
Txandy|away is now known as Txandy
g0bl1n has joined #ruby
xcv_ has joined #ruby
cj3kim has quit [Ping timeout: 252 seconds]
rezzack has joined #ruby
IceyEC has joined #ruby
aspires has quit [Remote host closed the connection]
pel_daniel has left #ruby [#ruby]
aspires has joined #ruby
xcv_ has quit [Remote host closed the connection]
Chioque has quit [Ping timeout: 272 seconds]
xcv_ has joined #ruby
xcv has quit [Ping timeout: 240 seconds]
skyjumper has joined #ruby
Baluse has quit [Ping timeout: 265 seconds]
<skyjumper> a weird issue just started showing up in irb
Baluse has joined #ruby
ndrei has quit [Read error: Operation timed out]
<skyjumper> if i Ctrl-R to search for something, then Ctrl-C to cancel, arrow keys are then broken
habanany has joined #ruby
<skyjumper> ruby 2.0.0p247
<skyjumper> seems ok in other libreadline stuff - gdb, python
nateberkopec has joined #ruby
<skyjumper> also this is on debian-testing
<skyjumper> sound familiar to anyone?
nanoyak has quit [Quit: Computer has gone to sleep.]
DrShoggoth has joined #ruby
sdwrage has joined #ruby
VTLob has quit [Quit: VTLob]
IceyEC has quit [Quit: IceyEC]
DrShoggoth has quit [Max SendQ exceeded]
<platzhirsch> skyjumper: cannot reproduce, I guess it's a shell/bash/terminal issue?
<skyjumper> dunno, just started happening
DrShoggoth has joined #ruby
|RicharD| has quit [Quit: Sto andando via]
habanany has quit [Ping timeout: 252 seconds]
relix has joined #ruby
<platzhirsch> It's scary
davy_ has joined #ruby
<skyjumper> scary when things break when nothing changes
ohwhoa has quit [Quit: woah!]
relix has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
apeiros has quit [Remote host closed the connection]
relix has joined #ruby
apeiros has joined #ruby
DrShoggoth has quit [Read error: No route to host]
nateberkopec has quit [Quit: Leaving...]
predator217 has joined #ruby
g0bl1n has quit [Ping timeout: 240 seconds]
xcv_ has quit [Ping timeout: 248 seconds]
zz_karupanerura is now known as karupanerura
apeiros has quit [Remote host closed the connection]
Txandy is now known as Txandy|away
apeiros has joined #ruby
slowcon has quit [Read error: Connection reset by peer]
predator117 has quit [Ping timeout: 245 seconds]
relix has quit [Ping timeout: 272 seconds]
slowcon has joined #ruby
ElComradio has joined #ruby
carif has quit [Quit: Ex-Chat]
carif has joined #ruby
[gmi] has quit [Read error: Connection reset by peer]
fedesilva has quit [Remote host closed the connection]
carif has quit [Read error: Connection reset by peer]
carif has joined #ruby
Megtastique has joined #ruby
Es0teric_ has joined #ruby
<platzhirsch> skyjumper: I just ate some mushrooms to calm down
figgleberry has quit [Ping timeout: 260 seconds]
oso96_2000 is now known as oso|away
x77686d has joined #ruby
Es0teric has quit [Ping timeout: 265 seconds]
<waxjar> chestnut mushrooms with shallots and bacon. om nom nom :D
mocfive has joined #ruby
<platzhirsch> right on
dik_dak has joined #ruby
<platzhirsch> I am taking a break of Ruby but at some point in the near future I have to return, otherwise I will get sick
dawkirst has quit [Ping timeout: 252 seconds]
srji_ has joined #ruby
[krisbulman] is now known as krisbulman
srji has quit [Ping timeout: 252 seconds]
Asher has quit [Remote host closed the connection]
pkondzior___ has joined #ruby
Asher has joined #ruby
i_s has joined #ruby
Bowser_jr has joined #ruby
Bowser_jr has left #ruby [#ruby]
oso|away is now known as oso96_2000
Kricir has quit [Ping timeout: 264 seconds]
dx7 has joined #ruby
Amart41 has joined #ruby
davy_ has quit [Remote host closed the connection]
chomskiii has quit [Read error: Connection reset by peer]
chomskiii has joined #ruby
Synthead has joined #ruby
wynyard has joined #ruby
oso96_2000 is now known as oso|away
Es0teric_ has quit [Ping timeout: 252 seconds]
yarou has joined #ruby
dx7 has quit [Ping timeout: 245 seconds]
Amart41 has quit [Ping timeout: 265 seconds]
saarinen has quit [Quit: saarinen]
shinobi_one has joined #ruby
Shidash has quit [Quit: Leaving.]
dawkirst has joined #ruby
<lamba> i'm struggling to do a put request with httparty module, i've got response = apiobj.put("/api/alt/#{altnum}", :query => { :thold => 92 }) but it dosent seem to alter the value thold. i've tried :data and :body also, and giving 92 as '92' also. the debug output shows the call being made but no luck. - i've managed to alter the value with wget -X PUT using -d 'thold=92' though. any ideas ? not seems many examples for httparty put requests (like, one)
<lamba> seen*
Solnse has quit [Ping timeout: 252 seconds]
davy_ has joined #ruby
davy_ has quit [Read error: Connection reset by peer]
gja has joined #ruby
<skyjumper> platzhirsch: special mushrooms?
Synthead has quit [Ping timeout: 240 seconds]
<skyjumper> not sure if that'd calm me down
<lamba> as i understand it, for a put request i should be using :data => { :thold = 92 } ? didnt work though
Es0teric has joined #ruby
wynyard has left #ruby ["Textual IRC Client: www.textualapp.com"]
davy_ has joined #ruby
<Hanmac> maybe you need to JSON encode it yourself?
rootshift has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
araujo has joined #ruby
Solnse has joined #ruby
Megtastique has quit []
binaryhat has quit [Quit: Leaving]
ElComradio has quit [Quit: ElComradio]
robustus has joined #ruby
<lamba> hmm. maybe. - by wget i meant curl, btw.
Jetchisel has joined #ruby
figgleberry has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
davy_ has quit [Ping timeout: 264 seconds]
<platzhirsch> skyjumper: I don't know gumba, I think I got bigger
kitak has joined #ruby
tkuchiki has joined #ruby
ryantm has quit [Ping timeout: 252 seconds]
cashnguns has joined #ruby
senayar_ has joined #ruby
sbos99 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
krisbulman is now known as [krisbulman]
cj3kim has joined #ruby
senayar__ has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
sbos99 has quit [Client Quit]
[krisbulman] is now known as krisbulman
lmickh has quit [Remote host closed the connection]
mikepac__ has joined #ruby
hobodave has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
senayar has quit [Ping timeout: 252 seconds]
mlpinit has quit [Quit: Leaving...]
senayar_ has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
cj3kim has quit [Ping timeout: 240 seconds]
araujo has quit [Remote host closed the connection]
phinfonet has quit [Quit: exitiing]
Xeago has joined #ruby
mikepack has quit [Ping timeout: 252 seconds]
petey has joined #ruby
standyro2 has quit [Ping timeout: 260 seconds]
gja has joined #ruby
mikepac__ has quit [Ping timeout: 265 seconds]
platzhirsch has left #ruby [#ruby]
yfeldblu_ has quit [Remote host closed the connection]
pkondzior___ is now known as pkondzior
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Wulf has joined #ruby
<Wulf> Hi
dawkirst has quit [Ping timeout: 248 seconds]
davy_ has joined #ruby
<Wulf> "Foo\nbar" =~ Regexp.new("^[a-z]+$") matches. Why's that?
cj3kim has joined #ruby
<apeiros> Wulf: ^ is start of line, $ is end of line
blaz3rz has quit [Remote host closed the connection]
Megtastique has joined #ruby
<apeiros> use \A for start of string, and \z for end of string
<Wulf> ah, thanks
<apeiros> also, Regexp.new? seriously? just use /^[a-z]+$/
Lewix has quit [Remote host closed the connection]
<Wulf> apeiros: I didn't write that code :)
<apeiros> k
<Wulf> is some old redmine version
* apeiros afk
apeiros has quit [Remote host closed the connection]
sparrovv has quit [Remote host closed the connection]
apeiros has joined #ruby
mary5030 has joined #ruby
davy_ has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
relix has joined #ruby
iliketur_ has joined #ruby
iliketur_ has quit [Excess Flood]
benzrf has joined #ruby
iliketur_ has joined #ruby
<benzrf> welp it happened
<benzrf> I wrote a method call in another language without parens
<benzrf> *argsless one
<iliketur_> why would one choose to compare against :false rather than false?
krisbulman is now known as [krisbulman]
<iliketur_> >> :false == false
<eval-in> iliketur_ => false (https://eval.in/96275)
cj3kim has quit [Remote host closed the connection]
maletor has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
tauebel1 has joined #ruby
relix has quit [Ping timeout: 248 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
tauebel has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
mocfive has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
top4o has joined #ruby
kpshek has joined #ruby
guyz has quit [Quit: quit]
subbyyy has quit [Ping timeout: 245 seconds]
andredieb has quit [Remote host closed the connection]
senayar__ has quit [Remote host closed the connection]
Jdubs has quit [Remote host closed the connection]
mocfive has joined #ruby
mocfive has quit [Remote host closed the connection]
Virtualize|away has joined #ruby
mocfive has joined #ruby
havenwood has joined #ruby
SCommette has joined #ruby
mocfive has quit [Remote host closed the connection]
angusigu1ss has quit [Ping timeout: 240 seconds]
Jdubs has joined #ruby
ce_afk is now known as cescalante
mikesplain has joined #ruby
troyready has quit [Ping timeout: 272 seconds]
agent_white has quit [Quit: gnight]
wiku5__ has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
64MABFPD1 has joined #ruby
64MABFPD1 has quit [Quit: WeeChat 0.4.1]
maletor has quit [Quit: Computer has gone to sleep.]
snath has quit [Read error: Connection reset by peer]
Kricir has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
qpls has quit [Changing host]
qpls has joined #ruby
bklane has joined #ruby
rljohnsn has quit [Quit: Leaving.]
mikesplain has quit [Ping timeout: 245 seconds]
decoponio has joined #ruby
x77686d has quit [Quit: x77686d]
mlpinit has joined #ruby
andredieb has joined #ruby
ElComradio has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
<wiku5__> /wc
wiku5__ has left #ruby ["WeeChat 0.4.1"]
SCommette has quit [Quit: SCommette]
benzrf has left #ruby [#ruby]
richaroo has joined #ruby
george2 has quit [Remote host closed the connection]
<bklane> I have a model that has attributes for every day of the calander that differ randomly. What would be the best way to set up such type of relationship. Give each model many dates and have a date object for each day for each property or a hash attribute for the property which will just be rather large (365+ days per property)
sambao21 has joined #ruby
<centrx> bklane, Try #rubyonrails
richaroo has quit [Remote host closed the connection]
michael_lee has joined #ruby
bcz1 has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
Xuisce has joined #ruby
REdOG has left #ruby [#ruby]
bcz has quit [Ping timeout: 252 seconds]
snath has joined #ruby
Viridisignis_ has quit [Read error: Connection reset by peer]
RoxasShadowRS has quit [Read error: Connection reset by peer]
kpshek has quit []
Viridisignis_ has joined #ruby
jpstokes has quit [Remote host closed the connection]
axl_ has joined #ruby
angusigu1ss has joined #ruby
freerobby has quit [Quit: Leaving.]
mocfive has joined #ruby
aryaching has quit [Quit: sayonara! ^_^]
freerobby has joined #ruby
yfeldblum has quit [Remote host closed the connection]
cashnguns has quit [Ping timeout: 260 seconds]
link151 has left #ruby [#ruby]
aryaching has joined #ruby
angusigu1ss has quit [Ping timeout: 264 seconds]
nycjv321 has joined #ruby
atraylen has joined #ruby
acl_ has joined #ruby
[krisbulman] is now known as krisbulman
mikepack has joined #ruby
maletor has joined #ruby
nari has joined #ruby
krisbulman is now known as [krisbulman]
davy_ has joined #ruby
dawkirst has joined #ruby
<acl_> is the MRI interpreter the default when you install Ruby for either Linux or Mac OS?
Hanmac1 has joined #ruby
mikesplain has joined #ruby
mikesplain has quit [Client Quit]
mikepack has quit [Ping timeout: 264 seconds]
davy_ has quit [Ping timeout: 240 seconds]
Hanmac2 has joined #ruby
Hobogrammer has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
Jdubs has quit [Remote host closed the connection]
<havenwood> acl_: MRI is the reference implementation that comes preinstalled on OS X an many Linux/BSD distros
cescalante is now known as ce_afk
blaz3rz has joined #ruby
figgleberry has quit [Ping timeout: 252 seconds]
<acl_> havenwood: thanks! I'm still learning the language, but when do you generally consider using other implementations?
Hanmac1 has quit [Ping timeout: 265 seconds]
thesheff17 has joined #ruby
thesheff17 has quit [Client Quit]
thesheff17 has joined #ruby
sdwrage has joined #ruby
<havenwood> acl_: JRuby and Rubinius have done away with the Global VM Lock, so they are the goto for parallel threading.
JGreG has joined #ruby
kenneth has joined #ruby
<havenwood> acl_: If you need JVM access, JRuby is great.
<havenwood> acl_: Ruby is the most-used implementation.
felixjet_ has quit [Quit: Leaving]
<acl_> havenwood: you mean MRI?
felixjet_ has joined #ruby
<havenwood> mruby, topaz and maglev are honorable mentions
<havenwood> acl_: yes
aspires has quit []
<havenwood> mruby is going to be a big thing, maglev and topaz are neat but have yet to prove themselves
dorei has quit []
cashnguns has joined #ruby
mary5030 has joined #ruby
cashnguns has quit [Read error: Connection reset by peer]
<acl_> what are the benefits with mruby, compared to jruby/rubinius?
blaz3rz has quit [Ping timeout: 264 seconds]
<havenwood> acl_: mruby can be embedded without an os, or can be embedded in another lang
Voodoofish430 has quit [Quit: Leaving.]
pietr0 has quit [Quit: pietr0]
JGreG has quit [Client Quit]
<havenwood> acl_: your toaster can run mruby, and it can compete with lua for embedded gaming lang
Kricir has joined #ruby
Spleeze has quit [Ping timeout: 272 seconds]
relix has joined #ruby
<havenwood> mruby in bios
<havenwood> etc
<acl_> that does sound good
<acl_> well, i probably don't have to think about these too much at the moment
<havenwood> it is what Matz (creator of Ruby) is spending his time on
fedesilva has joined #ruby
mikepack_ has quit [Remote host closed the connection]
<acl_> since i'm still learning, i just needed to know what the equivalent of cpython was in ruby. figured it was MRI, but it's better to confirm.
<havenwood> acl_: Learn Ruby proper, and you're in good shape. You can switch to JRuby when the libs demand it.
<acl_> that won't require me to write some java, i hope? i get enough trouble dealing with c# at work
relix has quit [Ping timeout: 248 seconds]
ckinni has joined #ruby
<havenwood> Just focus on MRI 2.0 or 2.1 and you're in good shape.
<acl_> good to know. thanks, havenwood!
Spleeze has joined #ruby
<havenwood> np
Hobogrammer_ has joined #ruby
<havenwood> acl_: What os/distro are you on?
Hobogrammer has quit [Ping timeout: 265 seconds]
<havenwood> acl_: My primary system is OS X with ruby-install/chruby and ruby-2.1.0 (except where bugs make me 2.0 or patch).
<acl_> at work (where i use ruby/python for smallish scripts): Win7 x64; at home: Lubuntu 12.10
alvaro_o has quit [Quit: Ex-Chat]
tauebel1 has quit [Quit: Leaving.]
mikepack has joined #ruby
i_s has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<havenwood> acl_: some folks manage to beat Debian Ruby into shape
<acl_> right now, i'm using ruby as a sort of pseudo-code to prototype things i have to write in c#
dx7 has joined #ruby
<havenwood> if you run into ubuntu ruby-selection probs: update-alternatives --config ruby
<havenwood> or bite the bullet and chruby
wallerdev has quit [Quit: wallerdev]
axl_ has quit [Quit: axl_]
heidi has quit [Quit: Leaving.]
Kricir_ has joined #ruby
<acl_> chruby's for switching between implementations, right?
<havenwood> yup
<havenwood> acl_: as is update-alternatives
Azure has quit [Quit: Textual IRC Client: www.textualapp.com]
<acl_> heard that before, but a friend kept insisting i use rvm
<havenwood> acl_: rvm does some neat stuff for older systems, i'd recommend ruby-install with chruby if you have a few minutes to read readmes
Azure has joined #ruby
<acl_> i'll keep that in mind
<acl_> i'm just relying on MRI for now
p4tux has quit [Read error: Connection reset by peer]
dx7 has quit [Ping timeout: 264 seconds]
<havenwood> most people can get away with latest stable MRI
Kricir has quit [Ping timeout: 248 seconds]
<havenwood> you're in good company
p4tux has joined #ruby
rm__ has joined #ruby
<acl_> yeah, it's pretty fast enough for what i usually need ruby for
Hanmac has joined #ruby
slowcon has quit [Quit: slowcon]
Hanmac2 has quit [Ping timeout: 245 seconds]
rm_ has quit [Ping timeout: 245 seconds]
justsee has joined #ruby
justsee has joined #ruby
octoberry has joined #ruby
<acl_> is there a good site for looking up gems?
<acl_> more specifically, gem info?
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby
DrShoggoth has joined #ruby
incade has quit [Remote host closed the connection]
wallerdev has joined #ruby
Solnse has quit [Ping timeout: 252 seconds]
figgleberry has joined #ruby
mary5030 has joined #ruby
w4pm has quit [Ping timeout: 265 seconds]
cj3kim has joined #ruby
<acl_> btw, why did you say "bite the bullet" when using chruby? how is update-alternatives better?
nfk has quit [Quit: yawn]
Fire-Dragon-DoL has joined #ruby
<havenwood> acl_: Better only for being available by default. I think chruby is a better solution.
Viridisignis_ has quit [Quit: Computer has gone to sleep.]
<acl_> ah, thought it was worse
tylersmith has joined #ruby
Viridisignis_ has joined #ruby
cj3kim has quit [Ping timeout: 272 seconds]
v10energy has quit [Ping timeout: 272 seconds]
Viridisignis_ has quit [Client Quit]
slowcon has joined #ruby
browndawg has joined #ruby
phipes has joined #ruby
iMe has quit [Ping timeout: 240 seconds]
justsee has left #ruby ["Linkinus - http://linkinus.com"]
lfox has joined #ruby
lfox has quit [Client Quit]
tylersmith has quit [Ping timeout: 240 seconds]
lfox has joined #ruby
octoberry has quit [Ping timeout: 260 seconds]
mary5030 has quit [Remote host closed the connection]
george2 has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
wtfitsme has quit [Ping timeout: 264 seconds]
phipes has quit [Client Quit]
phipes has joined #ruby
marr has quit []
binaryhat has joined #ruby
iMe has joined #ruby
shinobi_one has quit [Quit: shinobi_one]
angusigu1ss has joined #ruby
shinobi_one has joined #ruby
Jetchisel has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
i_s has joined #ruby
petey has quit [Remote host closed the connection]
danshultz has joined #ruby
petey has joined #ruby
<pragmatism> Unrelated to Ruby, but how are peole running email on sites without a google apps account?
davy_ has joined #ruby
fedesilva has quit [Remote host closed the connection]
jaybe has joined #ruby
carif has quit [Ping timeout: 264 seconds]
angusigu1ss has quit [Ping timeout: 252 seconds]
<jaybe> hi. i have a `rake` task which requires a gem. that gem is installed. i install gems with "--user-install --bindir=~/bin". when i execute my rake task... it fails with: cannot load such file -- my-gem
blaz3rz has joined #ruby
<nycjv321> Hi I have a file in my load path but when including the module in that file. Ruby says its an unknown constant
yfeldblum has joined #ruby
<havenwood> nycjv321: have you required it?
davy_ has quit [Ping timeout: 240 seconds]
seich- is now known as seich
<havenwood> jaybe: is ~/bin in your load path?
<havenwood> pragmatism: dovecot, exim and courier are the ones most common to me
i_s has quit [Ping timeout: 245 seconds]
Evenix has joined #ruby
fedesilva has joined #ruby
<nycjv321> havenwood: thank you for pointing out how much of a noob I am :)
<nycjv321> havenwood: thank you that fixed it :)
<jaybe> havenwood, i do not believe so. i am unaware of that. odd thing is - this same rake task was working last month. unmodified since. can/should i specify a load path within my ~/.gemrc?
<havenwood> nycjv321: :)
Jonah11_ has joined #ruby
<nycjv321> anyone here familiar with Sinatra? Can you terminate it programmatically?
blaz3rz has quit [Ping timeout: 252 seconds]
<Jonah11_> what are the reasons, if any, to prefer module over class when creating a container namespace for utility functions? https://eval.in/96292
<Jonah11_> nycjv321, do you mean terminate the web server or the request?
<nycjv321> the web server
<nycjv321> so I am using it for testing and after I'm finished testing I want to terminate it.
<havenwood> nycjv321: send a unix signal
estebistec has joined #ruby
<Jonah11_> nycjv321, you can accomplish havenwood's suggestion with the system() command
<havenwood> nycjv321: one nice thing about using Ruby webservers like Unicorn is being able to send standard unix signals
<nycjv321> since the server is in the same process wouldn't that kill the entire process?
<nycjv321> hmmm I guess I can just late the process terminate
<nycjv321> doesn't feel clean though :(
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
michael_lee has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
<Jonah11_> nycjv321, you could send the system comman to stop the server with "thin stop" or similar
havenwood has quit []
Jdubs has joined #ruby
w4pm has joined #ruby
doodlehaus has quit []
kate_r has joined #ruby
mansi has joined #ruby
ixti has quit [Ping timeout: 240 seconds]
binaryhat has quit [Quit: Leaving]
iliketur_ has quit [Quit: zzzzz…..]
wiku5_ has quit [Quit: WeeChat 0.3.8]
wiku5_ has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
v0n has joined #ruby
relix has joined #ruby
Virtualize|away has quit [Quit: Leaving...]
relix has quit [Ping timeout: 252 seconds]
Virtualize|away has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
lpvb is now known as Nyyx
michael_lee has joined #ruby
Lewix has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
bklane has quit [Quit: Leaving...]
m104 has joined #ruby
Wulf has quit [Ping timeout: 252 seconds]
mikepack has quit [Ping timeout: 264 seconds]
Wulf has joined #ruby
Mattx has quit [Ping timeout: 260 seconds]
pskosinski has joined #ruby
dik_dak has quit [Quit: Leaving]
Txandy|away has quit [Read error: Connection reset by peer]
Txandy has joined #ruby
dik_dak has joined #ruby
mikepack has joined #ruby
yacks has joined #ruby
<ElComradio> What’s the current received wisdon for the ‘I need to redefine this constant X for testing purposes’ problem?
fedesilva has quit [Remote host closed the connection]
lukec has joined #ruby
Shidash has joined #ruby
v0n has quit [Ping timeout: 272 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Remote host closed the connection]
Megtastique has quit []
yfeldblum has joined #ruby
cj3kim has joined #ruby
gener1c has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Read error: Connection reset by peer]
Noldorin has quit []
Mattx has joined #ruby
Mattx has joined #ruby
Mattx has quit [Changing host]
yfeldblum has joined #ruby
gener1c_ has quit [Ping timeout: 265 seconds]
cj3kim has quit [Ping timeout: 272 seconds]
SCommette has joined #ruby
kenneth has quit [Quit: kenneth]
krz has joined #ruby
mocfive has quit [Remote host closed the connection]
Fezzler has joined #ruby
duggiefresh has joined #ruby
braincrash has quit [Quit: bye bye]
vpretzel has quit [Remote host closed the connection]
Fezzler has quit [Client Quit]
shinobi_one has quit [Quit: shinobi_one]
mocfive has joined #ruby
mocfive has quit [Remote host closed the connection]
vpretzel has joined #ruby
mikepack has quit [Remote host closed the connection]
vpretzel has quit [Read error: Connection reset by peer]
kevinykchan has quit [Quit: Computer has gone to sleep.]
braincrash has joined #ruby
rickruby has joined #ruby
m104 has quit [Quit: brb]
gja has joined #ruby
slowcon has quit [Quit: slowcon]
axl_ has joined #ruby
tyl has joined #ruby
angusigu1ss has joined #ruby
vpretzel has joined #ruby
<bricker`LA> ElComradio: rspec has stub_const
freezey has joined #ruby
<ElComradio> Mm minitest :) thx though
duggiefresh has quit [Remote host closed the connection]
freezey has quit [Read error: Connection reset by peer]
freezey has joined #ruby
slowcon has joined #ruby
figglebe_ has joined #ruby
Evenix has quit [Remote host closed the connection]
Evenix has joined #ruby
angusigu1ss has quit [Ping timeout: 252 seconds]
vpretzel has quit [Ping timeout: 245 seconds]
aspires has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
axl_ has quit [Quit: axl_]
blaz3rz has joined #ruby
figgleberry has quit [Ping timeout: 248 seconds]
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
figglebe_ has quit [Ping timeout: 252 seconds]
ewnd9_ has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
Evenix has quit [Ping timeout: 272 seconds]
axl_ has joined #ruby
standyro2 has joined #ruby
mikepack has quit [Ping timeout: 252 seconds]
iamsean has joined #ruby
mary5030 has joined #ruby
phipes has quit [Remote host closed the connection]
pietr0 has joined #ruby
Evenix has joined #ruby
zz_anildigital is now known as anildigital
m104 has joined #ruby
LexicalScope has quit [Ping timeout: 252 seconds]
axl_ has quit [Quit: axl_]
yasushi has joined #ruby
Amart41 has joined #ruby
minion- has joined #ruby
dx7 has joined #ruby
bricker`LA has quit [Ping timeout: 241 seconds]
anildigital is now known as zz_anildigital
relix has joined #ruby
rickruby has quit [Remote host closed the connection]
vpretzel has joined #ruby
Amart41 has quit [Ping timeout: 272 seconds]
dx7 has quit [Ping timeout: 264 seconds]
slowcon has quit [Quit: slowcon]
freerobby has quit [Quit: Leaving.]
shadoi has quit [Quit: Leaving.]
relix has quit [Ping timeout: 260 seconds]
phipes has joined #ruby
minion- is now known as ciwolsey
pskosinski has quit [Remote host closed the connection]
CaptainJet has quit []
Deele has joined #ruby
danshultz has quit [Remote host closed the connection]
fgo has joined #ruby
TripTastic has joined #ruby
yfeldblum has quit [Remote host closed the connection]
rickruby has joined #ruby
JBreit has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
ElComradio has quit [Quit: ElComradio]
TripTastic is now known as JBreit
pietr0 has quit [Quit: pietr0]
yfeldblum has quit [Ping timeout: 248 seconds]
mocfive has joined #ruby
thesheff17 has quit [Ping timeout: 245 seconds]
vpretzel has quit [Ping timeout: 252 seconds]
gja has joined #ruby
yarou has quit [Remote host closed the connection]
KevinSjoberg has quit [Ping timeout: 252 seconds]
mnemon has quit [Quit: No Ping reply in 180 seconds.]
mnemon has joined #ruby
mnemon has quit [Changing host]
mnemon has joined #ruby
KevinSjoberg has joined #ruby
Virtualize|away has quit [Quit: Leaving...]
bluepojo_ has joined #ruby
rezzack has quit [Ping timeout: 248 seconds]
m104 has quit [Quit: brb]
bluepojo has quit [Ping timeout: 272 seconds]
m104 has joined #ruby
rickruby has quit [Remote host closed the connection]
hobodave has quit [Quit: Computer has gone to sleep.]
rickruby has joined #ruby
lfox has quit [Quit: ZZZzzz…]
baggypants has joined #ruby
browndawg has quit [Quit: Leaving.]
fedesilva has joined #ruby
mocfive has quit [Remote host closed the connection]
binw has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
rickruby has quit [Ping timeout: 240 seconds]
CJD14 has joined #ruby
Virtualize|away has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
w4pm has quit [Ping timeout: 245 seconds]
slowcon has joined #ruby
gregf has quit [Quit: WeeChat 0.4.2]
fedesilva has quit [Ping timeout: 248 seconds]
mocfive has quit [Ping timeout: 260 seconds]
IceDragon has quit [Quit: Space~~~]
binw has joined #ruby
pietr0 has joined #ruby
ewnd9_ has quit [Ping timeout: 245 seconds]
bluepojo_ has quit [Remote host closed the connection]
angusigu1ss has joined #ruby
noop has joined #ruby
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
angusigu1ss has quit [Ping timeout: 252 seconds]
standyro2 has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby
mikepack has joined #ruby
noop has quit [Ping timeout: 260 seconds]
Vivekananda has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
tonni has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
sparrovv has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
yasushi has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
speakingcode has joined #ruby
sparrovv has quit [Ping timeout: 252 seconds]
pietr0 has quit [Quit: pietr0]
relix has joined #ruby
fgo has quit [Remote host closed the connection]
blaz3rz has quit [Remote host closed the connection]
blaz3rz has joined #ruby
zz_jrhorn424 is now known as jrhorn424
aspires has quit []
phansch has joined #ruby
relix has quit [Ping timeout: 248 seconds]
lukec has quit [Quit: lukec]
<lethjakman> hmmm, what does it mean when I make a class like this: class part1::part2 ?
standyro2 has joined #ruby
octoberry has joined #ruby
chippie has joined #ruby
fgo has joined #ruby
chippie has left #ruby [#ruby]
Jdubs has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
petey has joined #ruby
_maes_ has joined #ruby
vpretzel has joined #ruby
Guest12576 has quit [Ping timeout: 264 seconds]
Jdubs has joined #ruby
octoberry has quit [Ping timeout: 272 seconds]
<bnagy> syntax error?
petey has quit [Ping timeout: 272 seconds]
<bnagy> but assuming the names were constants, it would be namespacing
browndawg has joined #ruby
vpretzel has quit [Ping timeout: 264 seconds]
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
danshultz has joined #ruby
mikepack has joined #ruby
JasmeetQA has joined #ruby
<shevy> lethjakman you scope to something nested somewhere else. module Foo; class Bar -> Foo::Bar
JasmeetQA has quit [Client Quit]
hetre85 has joined #ruby
sdwrage has joined #ruby
icantbecool has joined #ruby
Evenix has quit [Remote host closed the connection]
shadoi has joined #ruby
danshultz has quit [Ping timeout: 264 seconds]
Evenix has joined #ruby
mikepack has quit [Ping timeout: 260 seconds]
cj3kim has joined #ruby
sethen has quit [Remote host closed the connection]
shadoi has quit [Ping timeout: 245 seconds]
Evenix has quit [Ping timeout: 260 seconds]
cj3kim has quit [Ping timeout: 264 seconds]
freezey has quit [Remote host closed the connection]
PPH has joined #ruby
<PPH> heya
<PPH> what's the difference between proc and lambda?
<PPH> and is it a bad Idea to create one if it's gonna be called only once?
slowcon has quit [Quit: slowcon]
fgo has quit [Remote host closed the connection]
<PPH> I have a huge line of code and I'd like to make it shorter with a lambda but i'm not sure it's a good Idea
<centrx> PPH, There is probably a better way
iamsean has quit [Quit: iamsean]
timonv has joined #ruby
<bnagy> there are a few differences between proc block and lambda, but they're very, very seldom important
<bnagy> not sure I've ever seen one make code shorter though :)
<PPH> lol ok
<PPH> here's the line expect{ public_send(method, action, id: FactoryGirl.create(:product)) }.to raise_error(CanCan::AccessDenied)
<PPH> I feel it's too long but I might be wrong :P
<PPH> I read lines shouldn't be more that 80 characters long lol
<bnagy> looks ok to me?
<bnagy> why not just add some linebreaks?
robbyoconnor has quit [Ping timeout: 272 seconds]
<PPH> bleh you are right and I'm stupid
speakingcode has quit [Quit: leaving]
<PPH> :P
<PPH> lol
Virtualize|away has quit [Quit: Leaving...]
<centrx> no don't add line breaks!!
snuffeluffegus has joined #ruby
<PPH> centrx, huh? lol
Virtualize|away has joined #ruby
robbyoconnor has joined #ruby
<Senjai> PPH: Thats kind of messy
<PPH> I feel it's not an important matter, but I still feel it's wrong to keep it on one line... lol
<Senjai> Readability trumps all
sergicles has joined #ruby
<Senjai> when you have to maintain 50k lines of code every day that someone else wrote you'll understand
Kricir_ has quit [Remote host closed the connection]
<Senjai> if your instinct says split it up, its best to do that
ace_striker has joined #ruby
m104 has quit [Quit: brb]
phipes has quit [Remote host closed the connection]
<PPH> that's not my instinct, that's the 80 characters max rule:P
<bnagy> nah no such rule
ace_striker is now known as Guest78426
<bnagy> although I try really hard to not go > 100, but I won't contort code just to make 80
<bnagy> but I don't see how splitting that makes it less readable, looks _more_ readable, to me
<bnagy> *shrug*
<bnagy> some people don't like method chaining on multi-line blocks
Kricir has joined #ruby
Virtualize|away has quit [Ping timeout: 245 seconds]
<centrx> There is usually no need
phipes has joined #ruby
<PPH> well I kinda agree it's more readable on 1 line, since it's how rspec is builded...
icantbecool has quit [Quit: Computer has gone to sleep.]
<centrx> 109 characters is not horribly bad
ktosiek_ has joined #ruby
mikepack has joined #ruby
snuffeluffegus has quit [Read error: Connection reset by peer]
<PPH> aight I'll try to make the lines stay in the left half of my screen and remove vim's highlight when lines are larger than 80 char, it's making me crazy... lol
ktosiek has quit [Ping timeout: 264 seconds]
standyro2 has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
zipper has joined #ruby
dx7 has joined #ruby
GAurav- has joined #ruby
<PPH> It's making me waste precious time, and by precious time i mean yours... not mine... lol
mikepack has quit [Ping timeout: 248 seconds]
<centrx> Thanks a LOT
Guest78426 has quit [Ping timeout: 245 seconds]
<Senjai> PPH: TBH, 80 characters is a dying breed. That was when terminals were only 80 characters wide by 24.
ce_afk is now known as cescalante
senayar has joined #ruby
<Senjai> PPH: Readability should trump your desire to keep it to 80 characters, we all have bigger screens now.
Gaurav__ has joined #ruby
<PPH> So I guess I only go with my feeling and it's gonna be ok
dx7 has quit [Ping timeout: 252 seconds]
nathancahill has quit [Quit: nathancahill]
GAurav- has quit [Ping timeout: 245 seconds]
cescalante is now known as ce_afk
saarinen has joined #ruby
nathancahill has joined #ruby
speakingcode has joined #ruby
vlad_starkov has joined #ruby
phipes has quit [Remote host closed the connection]
<Senjai> PPH: if you think its odd, someone else will
phansch has quit [Quit: Leaving]
<Senjai> most likely
<Senjai> more than not
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<PPH> k
relix has joined #ruby
saarinen has quit [Quit: saarinen]
makara has joined #ruby
m104 has joined #ruby
heftig has quit [Quit: Quitting]
zipper_ has joined #ruby
zipper_ is now known as zipper{-_-}
francisfish has joined #ruby
zipper has quit [Quit: leaving]
relix has quit [Ping timeout: 264 seconds]
gja has quit [Quit: This computer has gone to sleep]
dawkirst has quit [Read error: Operation timed out]
standyro2 has joined #ruby
SCommette has quit [Quit: SCommette]
Macaveli has joined #ruby
bluOxigen has joined #ruby
lethjakman has quit [Ping timeout: 245 seconds]
vpretzel has joined #ruby
saarinen has joined #ruby
kemmotar has joined #ruby
noop has joined #ruby
standyro2 has quit [Ping timeout: 272 seconds]
vpretzel has quit [Ping timeout: 252 seconds]
halida_ has joined #ruby
JBreit has quit [Read error: Connection reset by peer]
yacks has quit [Quit: Leaving]
dawkirst has joined #ruby
nism has joined #ruby
OdNairy has joined #ruby
senayar has quit [Remote host closed the connection]
w4pm has joined #ruby
saarinen has quit [Quit: saarinen]
francisfish has quit [Remote host closed the connection]
cj3kim has joined #ruby
Txandy is now known as Txandy|away
JBreit has joined #ruby
kemmotar has left #ruby [#ruby]
yfeldblum has quit [Ping timeout: 245 seconds]
yfeldblu_ has joined #ruby
francisfish has joined #ruby
standyro2 has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
w4pm has quit [Ping timeout: 264 seconds]
DanBoy has quit [Ping timeout: 240 seconds]
kenneth has joined #ruby
<nycjv321> Why can I run this via ruby and it will create an instance of the Sinatra server but when I try requiring the file in another file Ruby doesn't load sinatra? https://gist.github.com/nycjv321/8703905
baggypants has quit [Quit: Textual IRC Client: www.textualapp.com]
<centrx> nycjv321, Probably require does not run any statements, it may only load classes and modules
<nycjv321> I've tried creating an instance of the class and that doesn't work either.
<nycjv321> I've tried changing the scope of the variables, making the class into a factory and nothing works
<centrx> What do you mean "doesn't load Sinatra"?
<centrx> It should load that class and the require 'sinatra'
<nycjv321> create an instance of the Sinatra server.
phipes has joined #ruby
<centrx> nycjv321, Try using load
<nycjv321> If I run the file I provide in ruby even without the object instantiation it creates an instance of the server.
<nycjv321> okay I'll try
<centrx> nycjv321, I think require won't run any statement in the class
<centrx> in the file rather
phipes has quit [Read error: Connection reset by peer]
goganchic has joined #ruby
<nycjv321> yea it just exits
<nycjv321> "Process finished with exit code 0"
<nycjv321> this defies all my understanding of programming and OO
* nycjv321 brain explodes
wallerdev has quit [Quit: wallerdev]
<nycjv321> centrx: are you taking a look at it?
<centrx> What are you trying to do exactly, just run Sinatra?
<centrx> What are you running require for?
<nycjv321> centrx: basically
<nycjv321> I am doing some testing and want a mock server running
<nycjv321> so I want to spawn an instance of Sinatra from another class
<centrx> Whichever file is calling require, it needs to either spawn the Sinatra instance itself
browndawg has quit [Quit: Leaving.]
<centrx> Or call a class or module that does it
<centrx> Not just require a file with a dangling Sinatra.new
<nycjv321> lol
<nycjv321> I've already tried that
slowcon has joined #ruby
<nycjv321> in the other file I do require_relative ... and then SinatraServer.new
<nycjv321> and it terminates anyway
lyanchih_ has joined #ruby
francisfish has quit [Remote host closed the connection]
<nycjv321> i've made a method that encapsulates the logic of the server and I've tried invoking that and it doesn't do anything
* nycjv321 thought he understood OO. what I am observing here tells me I must not know what I am doing..
bsdguru has joined #ruby
Gaurav__ has quit [Ping timeout: 245 seconds]
dik_dak has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
ace_striker has joined #ruby
nathancahill has quit [Quit: nathancahill]
ace_striker is now known as Guest41076
Guest41076 is now known as ace_striker__
wildroman2 has joined #ruby
m104 has quit [Quit: brb]
<centrx> nycjv321, I haven't used Sinatra, but all the docs seem to show no classes or setting up Sinatra::Base..
ndrei has joined #ruby
browndawg has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
<PPH> Since a lot of elements in my interface are not displayed when the user isn't an admin, I have a lot of scenario testing that these elements are not displayed...
hukl has joined #ruby
apeiros has joined #ruby
<PPH> Is there an easy way to manage that?
<centrx> nycjv321, Hey here is the problem
<centrx> nycjv321, All that code in SinatraServer needs to be in a def initialize method
yacks has joined #ruby
<centrx> nycjv321, SinatraServer.new is doing nothing
<nycjv321> I've tried that also
<nycjv321> I've tried making a custom method also
ndrei has quit [Client Quit]
ndrei has joined #ruby
phansch has joined #ruby
hukl has quit [Client Quit]
m104 has joined #ruby
crus` has joined #ruby
bluOxigen has quit [Read error: No route to host]
bluOxigen has joined #ruby
kiri has quit [Remote host closed the connection]
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
<nycjv321> centrx: thank you
<nycjv321> I made a method to invoke run! from within the composing class
hobodave has joined #ruby
crus has quit [Ping timeout: 264 seconds]
larsam has joined #ruby
oso|away is now known as oso96_2000
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
clamstar has joined #ruby
tylersmith has quit [Remote host closed the connection]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 252 seconds]
jprovazn has joined #ruby
ktosiek_ has quit [Quit: No Ping reply in 180 seconds.]
parzo has joined #ruby
ktosiek has joined #ruby
Txandy|away is now known as Txandy
dawkirst has quit [Ping timeout: 248 seconds]
LexicalScope has quit [Ping timeout: 252 seconds]
relix has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
apeiros has quit [Ping timeout: 240 seconds]
kiri has joined #ruby
dagobah has joined #ruby
<parzo> Radar: I am just working through your multitenancy book at the moment. Had a quick question about it if you had a spare minute.
ktosiek has quit [Ping timeout: 260 seconds]
kobain_ has quit []
arietis has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
cj3kim has quit [Remote host closed the connection]
mikepack has joined #ruby
gja has joined #ruby
S0da has quit [Read error: Connection reset by peer]
bsdguru has quit [Quit: bsdguru]
dawkirst has joined #ruby
CJD14 has quit [Ping timeout: 240 seconds]
petey has joined #ruby
Txandy is now known as Txandy|away
Kricir has joined #ruby
shadoi has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
mikepack has quit [Ping timeout: 264 seconds]
Txandy|away is now known as Txandy
vpretzel has joined #ruby
estebistec has quit [Remote host closed the connection]
Kricir_ has joined #ruby
teddyp1cker has joined #ruby
speakingcode has quit [Ping timeout: 252 seconds]
octoberry has joined #ruby
petey has quit [Ping timeout: 240 seconds]
shadoi has quit [Ping timeout: 264 seconds]
Kricir has quit [Ping timeout: 264 seconds]
phansch has quit [Quit: Leaving]
vpretzel has quit [Ping timeout: 245 seconds]
ahawkins has joined #ruby
Kricir_ has quit [Ping timeout: 252 seconds]
ktosiek has joined #ruby
octoberry has quit [Ping timeout: 252 seconds]
blaz3rz has quit [Remote host closed the connection]
Azure has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
Azure has joined #ruby
acl_ has quit [Quit: ChatZilla 0.9.90.1 [Pale Moon 24.3.0/20140125202921]]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
clamstar has quit [Quit: Computer has gone to sleep.]
parzo has quit [Remote host closed the connection]
_Andres has joined #ruby
parzo has joined #ruby
jamto11 has joined #ruby
AxonetBE has joined #ruby
nycjv321 has quit [Quit: leaving]
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
slowcon has quit [Quit: slowcon]
OdNairy has joined #ruby
parduse has quit [Remote host closed the connection]
parduse has joined #ruby
aganov has joined #ruby
Txandy is now known as Txandy|away
parzo has quit [Ping timeout: 252 seconds]
tagrudev has joined #ruby
gja has joined #ruby
halida_ has left #ruby [#ruby]
bsdguru has joined #ruby
wildroman2 has quit [Remote host closed the connection]
m104 has quit [Quit: brb]
Amart41 has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
sbos99 has joined #ruby
andikr has joined #ruby
CJD14 has joined #ruby
apeiros has joined #ruby
dx7 has joined #ruby
noname001__ has joined #ruby
parzo has joined #ruby
Amart41 has quit [Ping timeout: 272 seconds]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
ndrei has joined #ruby
dx7 has quit [Ping timeout: 245 seconds]
clamstar has joined #ruby
sambreed has quit [Read error: Operation timed out]
nism has quit [Quit: This computer has gone to sleep]
wookiehangover has joined #ruby
TejasDinkar has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
gja has quit [Ping timeout: 252 seconds]
standyro2 has quit [Ping timeout: 272 seconds]
mikepack has joined #ruby
zigomir has joined #ruby
zigomir_ has joined #ruby
zigomir has quit [Read error: Connection reset by peer]
mikepack has quit [Ping timeout: 260 seconds]
blaxter_ has joined #ruby
workmad3 has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
kenneth has quit [Quit: kenneth]
aryaching_ has joined #ruby
centrx has quit [Quit: Leaving]
tkuchiki_ has joined #ruby
vlad_starkov has joined #ruby
standyro2 has joined #ruby
tkuchiki has quit [Ping timeout: 245 seconds]
withnale has quit [Ping timeout: 248 seconds]
aryaching has quit [Ping timeout: 272 seconds]
drumusician has joined #ruby
aryaching has joined #ruby
popl has joined #ruby
popl has joined #ruby
einarj has joined #ruby
shredding has joined #ruby
nism has joined #ruby
aryaching_ has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
troessner has joined #ruby
withnale has joined #ruby
srji_ has quit [Quit: leaving]
sdwrage has joined #ruby
tylersmith has joined #ruby
rdark has joined #ruby
srji has joined #ruby
daxroc has joined #ruby
nism has quit [Quit: Leaving]
ndrei has quit [Read error: Operation timed out]
ndrei has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
MrSamuel has joined #ruby
oso96_2000 is now known as oso|away
teddyp1cker has quit [Remote host closed the connection]
claymore has joined #ruby
tylersmith has quit [Ping timeout: 241 seconds]
jamto11 has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
Txandy|away is now known as Txandy
eka has joined #ruby
sdwrage has quit [Quit: Leaving]
OdNairy has quit [Remote host closed the connection]
OdNairy has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
eka has quit [Client Quit]
raar has joined #ruby
raar is now known as Guest64258
skaflem has joined #ruby
Kricir has joined #ruby
nvrch has joined #ruby
amritanshu_RnD has joined #ruby
amritanshu_RnD is now known as Guest31820
vpretzel has joined #ruby
bricker`LA has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
phansch has joined #ruby
TMM has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
Guest31820 has quit [Client Quit]
amrit_ has joined #ruby
cj3kim has joined #ruby
vpretzel has quit [Read error: Operation timed out]
predator117 has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
greenarrow has joined #ruby
ndrei has joined #ruby
bricker`LA has quit [Ping timeout: 240 seconds]
yfeldblu_ has quit [Ping timeout: 252 seconds]
cj3kim has quit [Ping timeout: 252 seconds]
tesuji has joined #ruby
predator217 has quit [Ping timeout: 252 seconds]
predator117 has quit [Ping timeout: 260 seconds]
predator117 has joined #ruby
dawkirst has joined #ruby
kenneth has joined #ruby
SHyx0rmZ has joined #ruby
hetre85 has quit [Ping timeout: 253 seconds]
heftig has joined #ruby
Kricir has quit [Remote host closed the connection]
ace_striker has joined #ruby
ace_striker is now known as Guest98076
olivier_bk has joined #ruby
obs has joined #ruby
Naoe-Kanno has quit [Ping timeout: 240 seconds]
zeroXten has joined #ruby
nism has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
RoxasShadowRS has joined #ruby
wildroman2 has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
sski has joined #ruby
DouweM_ has quit [Ping timeout: 252 seconds]
zigomir has joined #ruby
zigomir_ has quit [Read error: Connection reset by peer]
<jokke> hi
<jokke> why does "foo:" match URI.regexp
<jokke> ?
DouweM has joined #ruby
<workmad3> jokke: it's a valid URI scheme
mailo_ has joined #ruby
<jokke> hm
Deejay_ has joined #ruby
<workmad3> >> require 'uri'; URI.parse("foo:")
<eval-in> workmad3 => bad URI(absolute but no path): foo: (URI::InvalidURIError) ... (https://eval.in/96334)
DouweM has quit [Client Quit]
<workmad3> :)
<jokke> is there a workaround for "foo:" not to be matched?
<jokke> :)
standyro2 has quit [Ping timeout: 245 seconds]
<jokke> check the size of the match?
<jokke> here's what i want to do: i want to parse a string for URLs (not URIs in general), extract them and replace them with an index (0 for first URL, 1 for second etc.) and store the URLs in an array in the found order.
DaniG2k has joined #ruby
mailo_ has quit [Quit: Linkinus - http://linkinus.com]
mailo_ has joined #ruby
jamto11 has joined #ruby
<jokke> ooh i see
ghr has joined #ruby
<jokke> URI.regexp takes an argument
<jokke> of schemes it should match
<jokke> perfect
vlad_starkov has quit [Remote host closed the connection]
Guest98076 has quit [Quit: Page closed]
dawkirst has joined #ruby
shvelo has joined #ruby
jamto11 has quit [Ping timeout: 248 seconds]
thedonvaughn has quit [Ping timeout: 245 seconds]
roolo has quit [Quit: Linkinus - http://linkinus.com]
vlad_starkov has joined #ruby
mailo_ is now known as roolo
alex88 has joined #ruby
yfeldblum has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
Sammael has quit [Ping timeout: 252 seconds]
ace_striker__ has quit [Quit: Page closed]
hello_world has joined #ruby
yfeldblu_ has joined #ruby
francisfish has joined #ruby
snapcase has quit [Ping timeout: 245 seconds]
arietis has joined #ruby
hello_world is now known as forger
unstable has quit [Ping timeout: 248 seconds]
thedonvaughn has joined #ruby
unstable has joined #ruby
SHyx0rmZ has quit [Ping timeout: 272 seconds]
Shidash has quit [Ping timeout: 245 seconds]
ephemerian has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
<DaniG2k> im trying to make a is_relative? method in my class that does the following
alex88 has quit [Quit: Leaving...]
alex88 has joined #ruby
<DaniG2k> (self =~ /^\//).nil? ? false : true
yfeldblu_ has quit [Ping timeout: 240 seconds]
<DaniG2k> so that for example, a url that starts with a /something
<DaniG2k> is seen as relative
<DaniG2k> but it doesnt work
<DaniG2k> I get this error message
<DaniG2k> NoMethodError: private method `is_relative?' called for "/":String
RubyPanther has joined #ruby
<apeiros> DaniG2k: sounds like you put the method at top-level.
<apeiros> if you want to call it on strings, you have to add the method to the string class
<DaniG2k> oic
<DaniG2k> it's in my crawler class
monkegjinni has joined #ruby
karupanerura is now known as zz_karupanerura
mikepack has joined #ruby
<apeiros> the .nil? part is superfluous btw.
<DaniG2k> ok
<apeiros> just `self =~ /^\// ? true : false`
daxroc1 has joined #ruby
<apeiros> and if you don't care that your method only returns a truthy value, but not true/false specifically, you can even drop the ternary part
<DaniG2k> so that needs to be inside of class String
<DaniG2k> i see
<DaniG2k> nah the truthy stuff is cool
daxroc has quit [Ping timeout: 252 seconds]
<DaniG2k> apeiros: thanks it works now
dawkirst has quit [Ping timeout: 272 seconds]
Bumptious has quit [Remote host closed the connection]
shadoi has joined #ruby
<ghr> So, Thursday morning, what's the attitude on EventMachine these days? I seem to remember that being "the Thing", but then https://twitter.com/tenderlove/status/427887632199073792
Bumptious has joined #ruby
daxroc1 has quit [Client Quit]
rylev has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
daxroc has joined #ruby
shaunbaker has joined #ruby
<DaniG2k> apeiros: what if I have a Crawler class
<DaniG2k> apeiros: and that is_relative? method only needs to work on the urls that the Crawler class finds
<DaniG2k> apeiros: should the is_relative? method still go inside the string class? I think it makes more sense for it to be a property of Crawler, no?
bigkevmcd has quit [Ping timeout: 240 seconds]
<workmad3> DaniG2k: yes, but it means that you wouldn't call it on a string
ohwhoa has joined #ruby
shadoi has quit [Ping timeout: 245 seconds]
<DaniG2k> workmad3: is it common to extend the string class with all sorts of junk like this?
<workmad3> DaniG2k: no
<DaniG2k> right
<workmad3> DaniG2k: if it's specific to a certain thing in your system, make a class for that thing
<workmad3> DaniG2k: and the method goes on that
<DaniG2k> workmad3: thats what im trying to do. But I think the problem is that I'm calling the method with self
<workmad3> DaniG2k: e.g. a Crawler::URL class that gets initialized with a string, then you call is_relative? on instances of Crawler::URL
TejasDinkar has quit [Quit: This computer has gone to sleep]
<workmad3> DaniG2k: and then your method becomes '@url =~ '
<DaniG2k> wow I suck at ruby
<DaniG2k> ok ok
<DaniG2k> practice makes perfect :P
<workmad3> (assuming you're storing the url in @url inside this fictional Crawler::URL class :) )
<DaniG2k> workmad3: I just have a simple Crawler class for now
monkegji_ has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
francisfish has quit [Ping timeout: 264 seconds]
D4v33 has left #ruby ["Leaving"]
forger has quit [Ping timeout: 245 seconds]
tvw has joined #ruby
visof has joined #ruby
atraylen has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
monkegji_ has quit [Client Quit]
petey has joined #ruby
<workmad3> DaniG2k: right, so you need to decide if it's worth introducing another class for this ;)
<DaniG2k> workmad3: preferably not
<DaniG2k> workmad3: I think it's overkill
<DaniG2k> workmad3: so instead of calling self it's better to just pass it in as an argument, which would solve the issue I suppose
<workmad3> DaniG2k: it would solve the issue, but would look ugly :)
<DaniG2k> workmad3: what is more elegant?
<workmad3> DaniG2k: creating a class
<DaniG2k> workmad3: create a URL struct?
<workmad3> crawler.is_relative?("some_string") vs crawler_url.is_relative?
nism has quit [Quit: This computer has gone to sleep]
vpretzel has joined #ruby
x77686d has joined #ruby
<workmad3> DaniG2k: you may also want to consider SOLID principles for OO :)
<DaniG2k> workmad3: so the second is the better option
mikecmpbll has joined #ruby
<DaniG2k> workmad3: is it cleaner to create a struct or a whole class?
<workmad3> a struct is a class in ruby, just helps with the accessors and initializer
<DaniG2k> workmad3: ok
petey has quit [Ping timeout: 260 seconds]
dawkirst has quit [Ping timeout: 272 seconds]
<workmad3> time for coffee :)
<DaniG2k> workmad3: enjoy!
dawkirst has joined #ruby
lyanchih has joined #ruby
nism has joined #ruby
vpretzel has quit [Ping timeout: 252 seconds]
x77686d has quit [Ping timeout: 253 seconds]
Amart41 has joined #ruby
klaut has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
shvelo has quit [Ping timeout: 252 seconds]
shaunbaker has quit [Remote host closed the connection]
dx7 has joined #ruby
nism_ has joined #ruby
nism has quit [Ping timeout: 245 seconds]
Amart41 has quit [Ping timeout: 240 seconds]
wildroman2 has quit [Remote host closed the connection]
<DaniG2k> workmad3: so class Crawler needs to inherit from class URL?
<DaniG2k> workmad3: or are they separate entities
mojjojo has joined #ruby
francisfish has joined #ruby
shaunbaker has joined #ruby
kenneth has quit [Quit: kenneth]
enzo has joined #ruby
<enzo> hello
dx7 has quit [Ping timeout: 252 seconds]
daharon has joined #ruby
<enzo> I've installed ruby and rubygems thanks to apt-get on my Ubuntu, is it safe to autoupdate afterwards gem with gem update --system ? (I need to get a clean ubuntu install)
mojjojo has quit [Client Quit]
shvelo has joined #ruby
echevemaster has quit [Ping timeout: 240 seconds]
urtokk has joined #ruby
mojjojo has joined #ruby
<workmad3> DaniG2k: consider SRP ;)
goganchic1 has joined #ruby
echevemaster has joined #ruby
nism_ has quit [Ping timeout: 272 seconds]
<DaniG2k> workmad3: whats that
<workmad3> DaniG2k: one of the SOLID principles
<workmad3> (the S to be precise)
dawkirst has joined #ruby
phansch has quit [Quit: Leaving]
aep has quit [Ping timeout: 240 seconds]
shvelo has quit [Ping timeout: 245 seconds]
zeeraw has joined #ruby
goganchic has quit [Ping timeout: 272 seconds]
dawkirst_ has joined #ruby
aep has joined #ruby
ndrei has quit [Quit: Lost terminal]
ndrei has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
fella6s has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 248 seconds]
nism has joined #ruby
zeeraw has quit [Client Quit]
banister has joined #ruby
amrit_ has quit [Quit: Leaving]
Al__ has joined #ruby
<DaniG2k> workmad3: when you wrote Crawler::URL does that mean Crawler inherits from URL? or URL is a module of Crawler?
<workmad3> DaniG2k: I was just using Crawler as a namespace in that situation
_Andres has quit [Read error: Connection reset by peer]
lyanchih has quit [Quit: lyanchih]
<DaniG2k> workmad3: aha
<DaniG2k> workmad3: i need to invest in a ruby programming book
dawkirst_ has quit [Ping timeout: 265 seconds]
fella5s has joined #ruby
lyanchih_ has joined #ruby
lyanchih_ has quit [Client Quit]
nari has quit [Ping timeout: 245 seconds]
cjsarette has joined #ruby
Industrial has joined #ruby
Txandy is now known as Txandy|away
Txandy|away is now known as Txandy
mojjojo has quit [Quit: mojjojo]
_Andres has joined #ruby
RubyPanther has quit [Ping timeout: 260 seconds]
mojjojo has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
eka has joined #ruby
wildroman2 has joined #ruby
zeeraw has joined #ruby
daharon has quit [Quit: Leaving]
[gmi] has joined #ruby
gja has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bigkevmcd has joined #ruby
banister has joined #ruby
canton7-mac has joined #ruby
phansch has joined #ruby
diegoviola has joined #ruby
dseitz has joined #ruby
Mekkis has quit [Quit: ZNC - http://znc.in]
tasty has joined #ruby
vlad_starkov has joined #ruby
e-dard has joined #ruby
bubbajones has quit [Ping timeout: 265 seconds]
<tasty> Hello. I'm trying to write a client/server in ruby with command execution support for *nix shell. Anyone knows a code that I could start from ?
<e-dard> Hi, we need to use pg, and some raw SQL queries. Is it still worth using Active Record, for its connection pool, or are there alternatives?
Txandy is now known as Txandy|away
bubbajones has joined #ruby
<pontiki> e-dard: you could look at Sequel
<e-dard> does Sequel have a connection pool?
Elhu has joined #ruby
<pontiki> not 100% sure, but i think so
<e-dard> ah so it does. Great!
Mekkis has joined #ruby
<pontiki> isn't the connection pooling actully part of the adapter anyway?
<apeiros> tasty: Kernel#spawn for shell exec, TCPServer/TCPSocket for server/client
<e-dard> pontiki: wasn't sure.
<pontiki> e-dard: i'm not either :$
dangerousdave has joined #ruby
<pontiki> e-dard: still, even if it is in the adaptor, the wrapper would have to support it
<tasty> apeiros, thanks, its a combination of each ?
<e-dard> pontiki: I'm not sure it would be in the adapter. I mean, seems like it would be an extra layer
craigp has joined #ruby
<apeiros> tasty: what?
jackneill has joined #ruby
<tasty> apeiros, nothing, doing research thanks for the hint
asmodlol has quit [Remote host closed the connection]
marr has joined #ruby
Mekkis has quit [Quit: ZNC - http://znc.in]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
Kricir has joined #ruby
mengu has quit [Remote host closed the connection]
MrSamuel has quit [Quit: MrSamuel]
ndrei has quit [Quit: Lost terminal]
diegoviola has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
phansch has quit [Ping timeout: 245 seconds]
m8 has joined #ruby
mojjojo has quit [Quit: mojjojo]
vpretzel has joined #ruby
tasty has left #ruby ["Leaving"]
<Industrial> Hi. What do I do with https://gist.github.com/anonymous/2cc1726158bb8706cce6 ? Im not sure which system lib I need.
Kricir has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
lxsameer has quit [Quit: Leaving]
vpretzel has quit [Ping timeout: 240 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user258467 has quit [Quit: Quitte]
marcgg_ has quit [Ping timeout: 260 seconds]
shaunbaker has quit [Remote host closed the connection]
marcgg has joined #ruby
w4pm has joined #ruby
SiliconG has joined #ruby
x77686d has joined #ruby
rylev has quit [Remote host closed the connection]
rylev has joined #ruby
SiliconG_ has quit [Ping timeout: 252 seconds]
w4pm has quit [Ping timeout: 272 seconds]
tfelippe has joined #ruby
SiliconG has quit [Ping timeout: 248 seconds]
Advocation has joined #ruby
heftig_ has joined #ruby
tfelippe is now known as arvory
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
lkba has quit [Ping timeout: 245 seconds]
blaxter_ is now known as blaxter
heftig has quit [Disconnected by services]
x77686d has quit [Ping timeout: 272 seconds]
heftig_ is now known as heftig
mikecmpbll has joined #ruby
arvory has left #ruby [#ruby]
Mekkis has joined #ruby
rylev_ has joined #ruby
rylev has quit [Read error: Connection reset by peer]
phansch has joined #ruby
DouweM has joined #ruby
<workmad3> Industrial: really? 'icu required (brew install icu4c or apt-get install libicu-dev)' doesn't give a hint? :P
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
top4o has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
goganchic1 has quit [Read error: Connection reset by peer]
goganchic has joined #ruby
bigkevmcd has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
zeeraw has joined #ruby
greenarrow has quit [Quit: 500]
arvorie has joined #ruby
goganchic1 has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
goganchic has quit [Ping timeout: 240 seconds]
bigkevmcd has joined #ruby
bleak2 has joined #ruby
jamto11 has joined #ruby
Mekkis has quit [Quit: ZNC - http://znc.in]
dkamioka has joined #ruby
CJD14 has quit [Ping timeout: 240 seconds]
dkamioka has quit [Remote host closed the connection]
tacos1de has joined #ruby
<DaniG2k> workmad3: I'm still really confused. It should be so simple...hold on I'll paste the code
mikepack has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
<DaniG2k> workmad3: http://pastie.org/8681844
<DaniG2k> workmad3: the make_absolute method still complains about this not being a string
<apeiros> DaniG2k: you define is_relative? on the class URL
Wolland has quit [Remote host closed the connection]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> yet you call it on @url (which presumably is a String, not an instance of URL)
bleak has quit [Ping timeout: 265 seconds]
<tobiasvl> yeah you want to call self.is_relative? don't you
<apeiros> you want to call it on the current URL instance. that's self. so line 25 should be `self.is_relative? ? @base_url + @url : @url`
<DaniG2k> apeiros: what would be the correct way to do this then?
<apeiros> and since self is implicit, you can reduce that to just `is_relative? ? @base_url + @url : @url`
mikepack_ has joined #ruby
<workmad3> DaniG2k: you also need to wrap your urls in your URL class
jamto11 has quit [Ping timeout: 265 seconds]
Lewix has quit [Ping timeout: 272 seconds]
<DaniG2k> apeiros: ah ok, i see
<apeiros> line 12 or 13, yes
<workmad3> DaniG2k: line 12, you'd add something like .map{|u| URL.new(u)} on the end
<apeiros> that too
<workmad3> DaniG2k: which is the cause of you getting 'make_absolute' not being defined on String ;)
mikepack has quit [Ping timeout: 240 seconds]
<Hanmac> DaniG2k: you can short line 11 into doc.xpath("//a/@href").map(&:text).uniq
goganchic1 has left #ruby [#ruby]
blackmesa has quit [Ping timeout: 245 seconds]
<workmad3> DaniG2k: as another note... if the URL is a relative URL, where are you going to get the host and scheme from?
<DaniG2k> workmad3: the seed
<workmad3> DaniG2k: because you're currently grabbing them using URI.parse(url)... but a relative url isn't going to have a host and scheme from that
shadoi has joined #ruby
<DaniG2k> workmad3: ah good point
<DaniG2k> workmad3: so that base url should probably be inside the Crawlewr class
<DaniG2k> I mean, Ryouken, as I've called it :P
mikepack_ has quit [Ping timeout: 248 seconds]
poulson has joined #ruby
|RicharD| has joined #ruby
<|RicharD|> hi to all
<|RicharD|> I have a problem with a parsing file very big
<|RicharD|> I want parse a file(about 50mb) and replace all \ characters with nothing
<|RicharD|> but it crash
wildroman2 has quit [Remote host closed the connection]
shadoi has quit [Ping timeout: 245 seconds]
<|RicharD|> i'm doing a simple script like this: https://gist.github.com/anonymous/8f1cd2c5b38e4047abc5
<workmad3> DaniG2k: I'd probably do it along these lines: https://gist.github.com/workmad3/6f70ecc5a0b0862761b1
<|RicharD|> how I can improve for avoid that crash ?(the file is around 50mb)
max96at has joined #ruby
ace_striker has joined #ruby
shaunbaker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
jlebrech has joined #ruby
postmodern has quit [Quit: Leaving]
SiliconG has joined #ruby
Mekkis has joined #ruby
futureshocked has joined #ruby
rylev_ has quit [Remote host closed the connection]
rylev has joined #ruby
peterd has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
Squarepy has joined #ruby
shredding has quit [Quit: shredding]
amritanshu_RnD has joined #ruby
shredding has joined #ruby
amritanshu_RnD is now known as Guest45771
Beoran has quit [Ping timeout: 272 seconds]
peterd has quit [Client Quit]
SiliconG has quit [Ping timeout: 272 seconds]
rylev has quit [Ping timeout: 252 seconds]
<dseitz> `line.gsub!('\', '')` <- find the bug
zoscoy has joined #ruby
<workmad3> dseitz: \'
<|RicharD|> yes
<|RicharD|> I put \\
<|RicharD|> should works now(i'm testing)
mercwithamouth has joined #ruby
<Nowaker> why does sinatra or rails on mri perform so weak in this benchmark? it's slower even than symfony php crap. that's unbelievable. http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=query
Thanatermesis has joined #ruby
<dseitz> If this code becomes important; you should do some more error handling [file IO is... ick, as we know]
<Nowaker> maybe someone has a time to dig into it, and fix it eventually...
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
<dseitz> where do they keep the source again?
<|RicharD|> I have done
<|RicharD|> I have put the script on digital ocean
<dseitz> I mean look at the 'error count' on the tests
drumusician has quit [Ping timeout: 252 seconds]
<|RicharD|> with 12gb of ram :)
<dseitz> The run-time is basically worthless with those many exceptions, that would be the root of the performance failure there
futureshocked has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
dx7 has joined #ruby
petey has joined #ruby
octoberry has joined #ruby
DouweM has quit [Quit: Leaving...]
Speed has joined #ruby
Beoran has joined #ruby
vpretzel has joined #ruby
ewnd9_ has joined #ruby
Kricir has quit [Ping timeout: 252 seconds]
krz has quit [Quit: WeeChat 0.4.2]
petey has quit [Ping timeout: 245 seconds]
dx7 has quit [Ping timeout: 252 seconds]
wyan has quit [Quit: ZNC - http://znc.sourceforge.net]
octoberry has quit [Ping timeout: 272 seconds]
obs has quit [Quit: Konversation terminated!]
nomenkun has joined #ruby
vlad_starkov has joined #ruby
vpretzel has quit [Ping timeout: 245 seconds]
<DaniG2k> workmad3: u still there?
Thanatermesis has quit [Ping timeout: 240 seconds]
<DaniG2k> workmad3: my url class now looks like this
<DaniG2k> workmad3: but im still having a hard time wrapping my head around this....the base_url is returning a string as opposed to the modified url
<DaniG2k> workmad3: so then if absolute is called, it messes up
maasha has joined #ruby
Evenix has joined #ruby
<maasha> If I add a task in a Rakefile, how do I make it show up with rake -T ?
RaCx has quit [Ping timeout: 245 seconds]
<dseitz> DaniG2k: That is what you are returning from base_url
<workmad3> ^^
<DaniG2k> dseitz: yes
<workmad3> DaniG2k: which means that you messed up what I originally gave you
<DaniG2k> @_@
<DaniG2k> OO programming is so damn hard
Jdubs has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 245 seconds]
<workmad3> DaniG2k: also, that has the original problem from your older code still
rylev has joined #ruby
marr123 has joined #ruby
<workmad3> DaniG2k: namely that if the url is relative, you're trying to get a host and scheme from it to make it absolute... the exact things that are lacking that make it relative in the first place
<DaniG2k> right
RaCx has joined #ruby
marr has quit [Ping timeout: 264 seconds]
<workmad3> DaniG2k: I'd defined a + method so you could add two URL objects sensibly
Evenix has quit [Ping timeout: 264 seconds]
<workmad3> DaniG2k: and then made sure that things were always dealing with URL objects by wrapping where necessary
Mekkis has quit [Quit: ZNC - http://znc.in]
marr123 has quit [Client Quit]
<workmad3> DaniG2k: your base_url returns a string... which means you lose that and would need to do something like 'URL.new(base_url + to_s)' in order to recover that in your 'absolute' method
x77686d has joined #ruby
x77686d has quit [Client Quit]
diegoviola has joined #ruby
banister has joined #ruby
<workmad3> DaniG2k: oh, I'd also made a mistake in my original gist for you... I'd left 'absolute' trying to add to @base_url rather than using the 'base' parameter
<maasha> Gotit, desc was missing.
Thanatermesis has joined #ruby
Thanatermesis has quit [Changing host]
Thanatermesis has joined #ruby
fedesilva has joined #ruby
<workmad3> DaniG2k: the general idea of introducing something like that URL class (a value object) is that once you've wrapped a primitive in it, you then only ever deal with the value object
nari has joined #ruby
<workmad3> DaniG2k: which is why in the example I gave, I'd introduced a + method, so that you didn't need to write code that uses URLs that looked like 'URL.new(base_url.to_s + path_url.to_s)' ;)
<DaniG2k> workmad3: aaah i see
wildroman2 has quit [Remote host closed the connection]
RaCx has quit [Quit: Computer has gone to sleep.]
ohwhoa has quit [Quit: woah!]
RaCx has joined #ruby
<workmad3> DaniG2k: doing stuff like that also means you get to keep your code encapsulated and hide the implementation... so you could, for example, change your URL class to store @url = URI.parse(url) internally, rewrite things like to_s, + and == to work, and the change should be invisible outside of the URL class
<DaniG2k> workmad3: but then a new URL object gets created anyway
michael_lee has quit [Ping timeout: 252 seconds]
<workmad3> DaniG2k: yes, I treated it as a value object, which means it's immutable once created
<workmad3> DaniG2k: just leads to easier to understand code, I tend to find ;)
RaCx has quit [Client Quit]
michael_lee has joined #ruby
Mekkis has joined #ruby
IceyEC has joined #ruby
<workmad3> DaniG2k: so yes, url1 + url2 does mean you get a new URL object... in the same way that str1 + str2 ends up with a new string object... but you don't need to worry about the specifics of that when using URLs
intuxicated has joined #ruby
DouweM has joined #ruby
<DaniG2k> workmad3: I see
mojjojo has joined #ruby
<DaniG2k> workmad3: wouldnt it be better ot modify the URL object directly?
<DaniG2k> workmad3: the original one
<workmad3> DaniG2k: not normally, no
vlad_starkov has quit [Remote host closed the connection]
<workmad3> DaniG2k: makes it much harder to pass the original around your system and have it behave sensibly
<DaniG2k> workmad3: ok
jamto11 has joined #ruby
mojjojo has quit [Client Quit]
<workmad3> DaniG2k: as I said, I treated it as a value object... value objects are immutable once created :)
wildroman2 has joined #ruby
IceyEC has quit [Client Quit]
wildroman2 has quit [Remote host closed the connection]
phansch has quit [Remote host closed the connection]
mojjojo has joined #ruby
<workmad3> DaniG2k: if it wasn't immutable, that would mean you'd need to be much more careful using the object in e.g. a threaded context
wildroman2 has joined #ruby
phansch has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
asmodlol has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<maasha> So is there a way to make a pre-cooked rake build task depend on another task?
torzech has joined #ruby
tacos1de has joined #ruby
jamto11 has quit [Ping timeout: 245 seconds]
RaCx has joined #ruby
vlad_starkov has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
<apeiros> maasha: task :foo => :depends_on_bar
RaCx has quit [Client Quit]
<apeiros> will run :depends_on_bar before running :foo
<maasha> apeiros: excellent. thanks
RaCx has joined #ruby
jkamenik has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
yfeldblum has joined #ruby
teddyp1cker has joined #ruby
bsdguru has quit [Ping timeout: 240 seconds]
RaCx has quit [Ping timeout: 264 seconds]
popl has quit [Quit: Touch the frog.]
angusigu1ss has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 260 seconds]
SiliconG has joined #ruby
obs has joined #ruby
m4rcu5 has quit [Ping timeout: 276 seconds]
shredding has quit [Quit: shredding]
griffindy has joined #ruby
banister has quit [Ping timeout: 265 seconds]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
freerobby has joined #ruby
intuxicated has quit [Read error: No route to host]
SiliconG has quit [Ping timeout: 248 seconds]
bsdguru has joined #ruby
rylev has quit [Remote host closed the connection]
tyl has quit [Quit: Computer has gone to sleep.]
xcv has joined #ruby
ohwhoa has joined #ruby
mojjojo has quit [Quit: mojjojo]
rylev has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
ohwhoa has quit [Client Quit]
francisfish has quit [Remote host closed the connection]
e^0 has joined #ruby
RaCx has joined #ruby
banister has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
RaCx has quit [Client Quit]
nateberkopec has joined #ruby
ndrei has joined #ruby
nszceta has joined #ruby
dx7 has joined #ruby
Industrial has left #ruby ["WeeChat 0.4.0"]
Kricir has quit [Ping timeout: 245 seconds]
LadyRainicorn has joined #ruby
RaCx has joined #ruby
teddyp1cker has joined #ruby
alex88 has quit [Quit: Leaving...]
ewnd9_ has quit [Ping timeout: 260 seconds]
Amart41 has joined #ruby
drumusician has joined #ruby
ma4rco has joined #ruby
<ma4rco> hello
<ma4rco> if i go per http.get method of angular to a .html file, it works - but if i jump to a sinatra/webrick url i get status 404, but i see on webrick, that the javarequest was there, why is that?
IceyEC has joined #ruby
parzo has quit [Remote host closed the connection]
parzo has joined #ruby
nszceta has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
RaCx has quit [Quit: Computer has gone to sleep.]
DouweM_ has joined #ruby
dblessing has joined #ruby
DouweM has quit [Read error: Connection reset by peer]
gja has quit [Quit: This computer has gone to sleep]
_Andres has quit [Read error: Connection reset by peer]
browndawg has quit [Quit: Leaving.]
ckinni has joined #ruby
nszceta has joined #ruby
<shevy> hmmm
<shevy> I have lots of small .rb files that may or may not exist on a target computer
bleak2 has quit [Ping timeout: 245 seconds]
<shevy> they are spread out over different .rb files as well
parzo has quit [Ping timeout: 240 seconds]
<shevy> do I really have to do begin;rescue LoadError; end over all of them, just to ensure that the larger main program can still run and function? (all these .rb files are optional and only enhance the project with certain functionality)
gja has joined #ruby
SHyx0rmZ has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
mojjojo has joined #ruby
figgleberry has joined #ruby
RaCx has joined #ruby
Sleepee has joined #ruby
francisfish has joined #ruby
freerobby has quit [Quit: Leaving.]
tonni has joined #ruby
RaCx has quit [Client Quit]
bigkevmcd has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
jmurray has joined #ruby
chopmo has joined #ruby
shadoi has joined #ruby
MrZYX|off is now known as MrZYX
clamstar has joined #ruby
shredding has joined #ruby
mikepack has quit [Ping timeout: 265 seconds]
bigkevmcd has joined #ruby
caustic has joined #ruby
<Nowaker> shevy: traverse the directory and require files that exist?
yasushi has joined #ruby
shadoi has quit [Ping timeout: 264 seconds]
yacks has quit [Quit: Leaving]
user258467 has joined #ruby
ace_striker has quit [Ping timeout: 245 seconds]
<shevy> hmm
<shevy> perhaps I could use a custom require
lkba has joined #ruby
mikepack has joined #ruby
jamto11 has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<mikecmpbll> ..
mikepack has quit [Ping timeout: 245 seconds]
TheLarkInn has joined #ruby
<TheLarkInn> Good morning Rubyists
jamto11 has quit [Ping timeout: 252 seconds]
mark_locklear has joined #ruby
<TheLarkInn> I have 3 objects which could all be a key to different values, is it appropriate to make an array a key for a hash
<TheLarkInn> I was leaning towards no
phansch has quit [Quit: Leaving]
<banister> TheLarkInn depends on the use-case, for memoization sure
Columcille has quit [Read error: Operation timed out]
<apeiros> TheLarkInn: (almost) every object can serve as a hash key
phansch has joined #ruby
<apeiros> requirement is a proper implementation of the methods #hash and #eql?, Array provides them
<TheLarkInn> okay, so I have a list of South Carolina cities, and they map to some counties, and a county code,
tt1187 has joined #ruby
<TheLarkInn> I'd prefer to have the Cities the key because I'm wanting to return the county/county code
visof has quit [Quit: Lost terminal]
<TheLarkInn> in the case that a city can have two counties
v0n has joined #ruby
<TheLarkInn> what would be the recommendation, should it be an array as the key?
<apeiros> eh?
<apeiros> you look up by city, right?
<TheLarkInn> I want to look up counties by city
<TheLarkInn> but sometimes a city can have two counties
<MrZYX> what about city.country_code ?
<MrZYX> or city.country.code
<apeiros> TheLarkInn: unclear answer, I try again
yfeldblum has joined #ruby
<TheLarkInn> okay I'll just give you an example
<TheLarkInn> sec
<apeiros> TheLarkInn: you want to input a city and get one or more counties as answer?
<TheLarkInn> yes potentially
<apeiros> elaborate "potentially"
<TheLarkInn> yes
<TheLarkInn> lol
parzo has joined #ruby
<TheLarkInn> yeah thats good enough for me is "potentially"
<apeiros> great. be precise. it matters.
<apeiros> in that case, it makes no sense to have the county as part of the key
<apeiros> you lose the ability to look up by city if you do that
<TheLarkInn> yeah, city would be the key, and then if the city has two county it would return an array as the value
<apeiros> you should always return an array
<apeiros> even if it's only one
<apeiros> normalize your output. otherwise you have to check whether you got an array or not all the time.
<TheLarkInn> I see what you are saying
<TheLarkInn> more sanitary and normal
<apeiros> also an unsuspecting user will try a couple, notice he gets a county back and wonder when stuff suddenly breaks when he gets an array instead
ewnd9_ has joined #ruby
linojon has joined #ruby
nszceta has quit [Quit: out]
danshultz has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ewnd9_ has quit [Max SendQ exceeded]
yfeldblum has quit [Ping timeout: 260 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
ewnd9_ has joined #ruby
tvw has joined #ruby
avril14th has joined #ruby
nszceta has joined #ruby
parzo has quit [Ping timeout: 245 seconds]
<avril14th> Hello, what's the rspec matcher to check that two classes are equal?
SiliconG has joined #ruby
<MrZYX> equal on what level?
Guest36874 has quit [Ping timeout: 272 seconds]
<MrZYX> that an object is a class? that they contain the same methods? ...?
<banister> avril14th .should == ?
RaCx has joined #ruby
* apeiros wonders about the point of equal classes…
<MrZYX> exactly
teddyp1cker has joined #ruby
<apeiros> if two classes are equal, why not have just one?
<MrZYX> avril14th: so what you really testing here?
gja has quit [Quit: This computer has gone to sleep]
<avril14th> I have a factory method that spits classes
<avril14th> so I check what it returns
DPRK_Kim_Jong_Un has joined #ruby
<MrZYX> what can be different about those classes?
RealMarc has joined #ruby
<avril14th> the factory could spit the wrong class
<apeiros> avril14th: then define what makes a class "wrong"
<avril14th> its name
<apeiros> and define what makes a class "right"
<apeiros> and test against those
<avril14th> same name
<avril14th> got it
zegerjan has joined #ruby
freerobby has joined #ruby
<MrZYX> so you don't build classes in your factory? you just select them? that's not a factory for classes then
<tobiasvl> obj1.class == obj2.class
<avril14th> MrZYX: true
<avril14th> tobiasvl: I have no instance
octoberry has joined #ruby
DPRK_Kim_Jong_Un has left #ruby [#ruby]
ewnd9_ has quit [Ping timeout: 272 seconds]
<tobiasvl> okay, then class1 == class2 then
<tobiasvl> or class1.name == class2.name
SiliconG has quit [Ping timeout: 245 seconds]
<MrZYX> avril14th: realize that classes are just obects, in most cases assigned to a constant.
<avril14th> tried
<tobiasvl> avril14th: and?
<tobiasvl> perhaps you can provide us with an actual use case
<apeiros> I think Class#== is just Class#equal?
<apeiros> i.e., object identity
wildroman2 has quit [Read error: Connection reset by peer]
<avril14th> expect(TestFactoryClass.send(:factory, 'SomeClass', organization, Date.today)).to eq(c) returns expected: SomeClass_FR_2014_1_1 got: SomeClass_FR_2014_1_1 when the test runs
<apeiros> send?
RaCx has quit [Quit: Computer has gone to sleep.]
<avril14th> yes
Fire-Dragon-DoL has joined #ruby
<MrZYX> tbh. that looks like a horrible design
wildroman2 has joined #ruby
<avril14th> MrZYX: I'm all ears
<MrZYX> why do you need new versions of SomeClass, why don't instances with the attributes set suffice?
<avril14th> cause they have different implementations
<MrZYX> and those implementations are completely dynamic? what's so different about them?
ndrei has quit [Read error: Operation timed out]
<avril14th> everything
<avril14th> they could have complete different logic
<MrZYX> how does a date and a "organization" define a whole class implementation?
rmorello has joined #ruby
<avril14th> organization contains a country
<avril14th> so I get the implementation i need
<avril14th> for fiscal taxes
<avril14th> at a given time
<avril14th> in a given country
ffranz has joined #ruby
<avril14th> and this changes all the time :)
RaCx has joined #ruby
tonni has quit [Read error: Connection reset by peer]
<avril14th> and you can't just overwrite values since you need past calculations to remain true
mlpinit has quit [Remote host closed the connection]
skaflem has quit [Quit: Leaving]
mlpinit has joined #ruby
<tobiasvl> and why are you using a factory to create classes, instead of objects?
<tobiasvl> i suppose the classes are singleton?
<avril14th> teh factory spits a class
nateberkopec has quit [Quit: Leaving...]
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<avril14th> then I instantiate it
<maasha> what is the most efficient way of converting all hash keys to from strings to symbols for a given hash?
<apeiros> dunno, I'd use Hash[hash.map { |k,v| [k.to_sym, v] }]
<apeiros> @ maasha
<apeiros> check AS' Hash#symbolize
<MrZYX> avril14th: how many times do you instantiate it?
Hanmac1 has joined #ruby
<apeiros> symbolize_keys ?
<tobiasvl> avril14th: I realize that, but why do you need a class at all?
<avril14th> maasha: hash.inject(Hash.new) { |hash, (key, val)| hash[key.to_i] = val; hash }
<maasha> apeiros: and what is that ? :o)
Kricir has joined #ruby
<tobiasvl> why not fr_2014_1_1 = Country_Date.new(Date.today) or something more complex
<avril14th> replace to_i with to_sym
<apeiros> maasha: AS = activesupport. part of rails. it provides that functionality.
jerius has joined #ruby
<apeiros> avril14th: inject with `; expr` at the end is misused inject
<avril14th> tobiasvl: cause I can't override new since they are AR objects
marr has joined #ruby
Hamburglr has joined #ruby
nszceta has quit [Read error: Connection reset by peer]
mojjojo has quit [Quit: mojjojo]
Hanmac has quit [Ping timeout: 260 seconds]
<MrZYX> avril14th: isn't your problem the classic example for the strategy pattern?
nszceta has joined #ruby
mojjojo has joined #ruby
<maasha> apeiros: ah, but no rails here.
<avril14th> MrZYX: looks like it, so?
parzo has joined #ruby
SHyx0rmZ has quit [Ping timeout: 265 seconds]
<apeiros> maasha: I told you to check the source. not to use it.
<MrZYX> avril14th: use it? ;)
<apeiros> maasha: you know github, right?
<maasha> apeiros: sure
<apeiros> though, if you don't know your way around rails' source, it's probably easier to just install it, start a console in pry and do `$ Hash#symbolize_keys`
<MrZYX> maasha: apeiros: I tend to just go to http://api.rubyonrails.org and click on view source :P
Kricir has quit [Ping timeout: 245 seconds]
<apeiros> ah, that's an option too
ctp has joined #ruby
<apeiros> funny implementation… `self[(key.to_sym rescue key) || key] = …`
<shevy> ewww
<apeiros> why on earth `|| key`?
<apeiros> do some to_sym impls return nil?
vpretzel has joined #ruby
<avril14th> MrZYX: choosing strategy at runtime is one thing, storing which is used in a db is another
<MrZYX> I bet some in AS' do :D
<avril14th> (I guess)
ndrei has joined #ruby
kaldrenon has joined #ruby
mary5030 has joined #ruby
jerius has quit []
<MrZYX> avril14th: so your country defines your strategy, right? and your Whatever has an organization which has a country? right? if you fetch all the associations you can just access the strategy through that, no?
fedesilva has quit [Remote host closed the connection]
tonni has joined #ruby
mary5030 has quit [Remote host closed the connection]
SHyx0rmZ has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
gregf has joined #ruby
<avril14th> MrZYX: I don't store the creation time in the database
<avril14th> so when I pull the class back from the db
<avril14th> I can find the country through organization
clamstar has joined #ruby
<avril14th> but not the rule that applies (the strategy)
g0bl1n has joined #ruby
ckinni has joined #ruby
<MrZYX> so you infer the date from the class name...?
<apeiros> MrZYX: aaaahaha
<MrZYX> or where does it come from?
<apeiros> 4 classes define to_sym
v0n has quit [Ping timeout: 248 seconds]
<avril14th> MrZYX: yes
<apeiros> and one indeed can return nil - Mime::Type
vpretzel has quit [Ping timeout: 265 seconds]
cid404 has quit [Ping timeout: 252 seconds]
AlSquire has joined #ruby
<MrZYX> avril14th: I'd rather store the date then (in a sane format)
sergicles has quit [Quit: sergicles]
vlad_starkov has joined #ruby
<avril14th> and then switch the date?
<avril14th> that's what I want to avoid
<avril14th> having a code that goes if elsiif elsif elsif elsif
<avril14th> for every method
<avril14th> implemented by the class
<avril14th> so th idea is yes
<avril14th> define new class
<avril14th> write it fully properly
<avril14th> and that's all :)
<avril14th> but I may not see the downside of it. any hint?
xcv has quit [Remote host closed the connection]
isec has joined #ruby
<MrZYX> how do you recreate it after your program is restarted and you want to fetch a record using that class?
<avril14th> Myclasses all inherit from a fixed one
octoberry has quit [Ping timeout: 240 seconds]
<avril14th> so I just do Parent.all
<avril14th> in my mongodb
<avril14th> and I get them all
<avril14th> whatever their types
<avril14th> and then I can just call the interface
<MrZYX> but if they are created at runtime, how do you recreate them in a second process?
<avril14th> and each class with do its own stuff
<avril14th> they are not created at runtime
<avril14th> when you need to change, you write a new one, add it to the project
<avril14th> and the factory (my code above) will pick it and start instantiating from it
<avril14th> and storing
michael_lee has quit [Quit: Ex-Chat]
<avril14th> it looks not so bad to me
<avril14th> but again I may not see all the downsizes
<MrZYX> so it's really not a factory but rather a ... complicated hash
<avril14th> (yet)
<avril14th> yes it's a hash
<avril14th> that use Class.descendants
kpshek has joined #ruby
<avril14th> to see what's available
<avril14th> parse that
<avril14th> and act
<avril14th> no? :))
<MrZYX> I guess I wouldn't name it factory then, but StrategyPicker or something and oh boom, you just need to store the date and pick the class when you need to run the algorithm instead of when you instantiate it
havenwood has joined #ruby
Kricir has joined #ruby
dideler_work has joined #ruby
rdark has quit [Ping timeout: 272 seconds]
<MrZYX> but I guess we're drifting a bit into the philosophical debate
Kricir has quit [Remote host closed the connection]
tonni has quit [Read error: Connection reset by peer]
<MrZYX> I got confused by you calling it a factory
<MrZYX> it sounded a lot like you're dynamically _creating_ classes
eka has joined #ruby
<avril14th> I need to store the instantiate time, not the runtime
<avril14th> since the instantiate time
<avril14th> is when the tax ruels change
<avril14th> but the conversation was good
<avril14th> thx
<avril14th> and I still don't know how to write my rspec matcher :))
rdark has joined #ruby
<avril14th> I do generate classes dynamically
<avril14th> in my test
zz_anildigital is now known as anildigital
<MrZYX> and your picker can catch that exact object?
<avril14th> yes
g0bl1n has quit [Ping timeout: 245 seconds]
<MrZYX> then .should == ThatClass should work
Advocation has quit [Quit: Advocation]
v0n has joined #ruby
<MrZYX> if it doesn't they're just looking the same, but are different objects
<MrZYX> if you have multiple tests make sure to either clean them up or create just one for the entire set of tests
LadyRainicorn has quit [Ping timeout: 245 seconds]
<avril14th> yes I clean them up
enebo has joined #ruby
snath has quit [Ping timeout: 240 seconds]
<avril14th> I tried .should == c
<avril14th> and I get
<avril14th> expected: SomeClass_FR_2014_1_1 got: SomeClass_FR_2014_1_1 (using ==)
<avril14th> ...
<MrZYX> try tracking the object_ids through your program
<MrZYX> i.e. create the class, log the object_id, log the object_ids you get in your picker, compare that
<MrZYX> might yield something
<avril14th> hmm
<MrZYX> but it's hard to tell more without seeing overall implementation
anildigital is now known as zz_anildigital
browndawg has joined #ruby
vpretzel has joined #ruby
ma4rco has quit [Quit: Lost terminal]
zz_anildigital is now known as anildigital
wildroman2 has quit [Remote host closed the connection]
marcgg_ has joined #ruby
Megtastique has joined #ruby
blaxter is now known as neru_
ndrei has quit [Ping timeout: 245 seconds]
<kaffeebohne> Hi, I want to get the full link out of a t.co-link, what would be the best way to do that?
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<apeiros> kaffeebohne: click on it!
<apeiros> *scnr*
anildigital is now known as zz_anildigital
marcgg has quit [Ping timeout: 264 seconds]
<kaffeebohne> xD
<shevy> :\
tonni has joined #ruby
browndawg has quit [Client Quit]
wildroman2 has joined #ruby
<MrZYX> avril14th: superficial things first: I think your let(:some_class) wants to be a before
nfk has joined #ruby
browndawg has joined #ruby
zz_anildigital is now known as anildigital
intuxicated has joined #ruby
Bish has quit [Read error: Operation timed out]
Vivekananda has joined #ruby
poulson has quit [Read error: Connection reset by peer]
jpstokes has joined #ruby
iaj_ has quit [Read error: Operation timed out]
x77686d has joined #ruby
soahccc has quit [Remote host closed the connection]
x77686d has quit [Client Quit]
rlvm has quit [Read error: Operation timed out]
eval-in has quit [Ping timeout: 264 seconds]
eval-in has joined #ruby
germanstudent has quit [Ping timeout: 252 seconds]
contradictioned has quit [Read error: Connection reset by peer]
g0bl1n has joined #ruby
chiel has quit [Ping timeout: 245 seconds]
CalimeroTeknik has quit [Ping timeout: 272 seconds]
magbeat has quit [Ping timeout: 248 seconds]
wereHamster has quit [Ping timeout: 248 seconds]
z has quit [Ping timeout: 276 seconds]
_br_ has quit [Ping timeout: 252 seconds]
PaulePanter has quit [Ping timeout: 252 seconds]
torzech has quit [Ping timeout: 252 seconds]
MrZYX has quit [Ping timeout: 252 seconds]
contradictioned has joined #ruby
netf has quit [Ping timeout: 260 seconds]
parus has quit [Ping timeout: 248 seconds]
wereHamster has joined #ruby
joelio has quit [Ping timeout: 252 seconds]
PaulePanter has joined #ruby
rlvm has joined #ruby
MrZYX has joined #ruby
_br_ has joined #ruby
Bira has joined #ruby
tt1187 has quit []
clamstar has quit [Quit: Textual IRC Client: www.textualapp.com]
netf has joined #ruby
bigkevmcd has quit [Ping timeout: 260 seconds]
magbeat has joined #ruby
z has joined #ruby
clamstar has joined #ruby
chiel has joined #ruby
LadyRainicorn has joined #ruby
Guest010011 has joined #ruby
bigkevmcd has joined #ruby
<MrZYX> replay, got disconnected :/ :
<MrZYX> (15:19:49) MrZYX: And I don't think your cleanup code makes sure that your classes fall out of scope
<MrZYX> (15:20:18) MrZYX: apeiros: do you know if Class objects fall out of scope at all? or are they like symbols?
<MrZYX> (15:23:34) MrZYX: avril14th: I'd say don't bother about all that dynamic class creation, do a before(:all) on the top, define the half dozen classes you need for your tests and use them
Bish has joined #ruby
ww26 has joined #ruby
iaj has joined #ruby
<avril14th> agreed
<avril14th> and then ? :D
LastWhisper has quit [Ping timeout: 245 seconds]
CalimeroTeknik has joined #ruby
fedesilva has joined #ruby
LookingForMopman has joined #ruby
<MrZYX> you don't have multiple classes with the same name ;)
<apeiros> MrZYX: classes are ordinary objects
<apeiros> (apart from the #allocate jizz)
<MrZYX> symbols are too! :P
germanstudent has joined #ruby
<apeiros> MrZYX: ok, granted
<MrZYX> so they are GC'd?
phinfonet has joined #ruby
LookingForMopman has left #ruby [#ruby]
nomenkun has quit [Remote host closed the connection]
xcv has joined #ruby
<apeiros> I'll put it another way: symbols are the only objects you can get the same object again without holding a reference to it
<apeiros> (Ignoring ObjectSpace._id2ref, which is always a horrible idea)
torzech has joined #ruby
joelio has joined #ruby
parus has joined #ruby
Advocation has joined #ruby
LadyRainicorn has quit [Ping timeout: 272 seconds]
<apeiros> also worth of note: what people generally understand as "the class" is actually "a constant with a name, happening to reference a class"
<MrZYX> I know I know, just thought that Class object have the same exemption that Symbol object have might be possible
<MrZYX> thanks
yfeldblum has joined #ruby
<apeiros> nope
sethen has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<avril14th> MrZYX: agreed, I suspect the cleanup code is the problem
<apeiros> I think 1.8 didn't GC code. i.e. generating classes with evaled code, and throwing them away would leak memory
<apeiros> not sure whether that changed
<apeiros> but that's unrelated to your problem (hence I hesitated to reply to "are classes GCed").
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> They may or may not be GCed, but they become unreachable.
<avril14th> MrZYX: I'm curious as what makes classes fall out of scope :)
<MrZYX> avril14th: doing a GC.start in your cleanup code would probably work, but it just gets dirtier IMO :P
<Cork> anyone know where to find configuration for the thin config file?
ckinni has joined #ruby
<apeiros> avril14th: def foo; x = Class.new; nil; end
<Cork> i can't find it anywhere...
gittish has joined #ruby
<apeiros> that class is only available within the method foo
<apeiros> running foo multiple times will create multiple classes
<avril14th> :)
<apeiros> just like any other object
<avril14th> I like to be dirty in tests
<avril14th> :D
petey has joined #ruby
figgleberry has quit [Ping timeout: 265 seconds]
caveat- has quit [Ping timeout: 264 seconds]
<apeiros> and now we mix the question with a bit of closures and have fun figuring out what's never going to be GCed because some closure keeps a hold of it…
neru_ is now known as blaxter
sailias has joined #ruby
axl_ has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
tonni has quit [Remote host closed the connection]
sambao21 has joined #ruby
SiliconG has joined #ruby
noop has quit [Ping timeout: 260 seconds]
xcv has quit [Remote host closed the connection]
lukec has joined #ruby
xcv has joined #ruby
wildroman2 has quit [Remote host closed the connection]
clamstar has quit [Quit: Textual IRC Client: www.textualapp.com]
blandflakes has joined #ruby
xcv_ has joined #ruby
xcv has quit [Read error: Connection reset by peer]
intuxicated has quit [Ping timeout: 252 seconds]
Wolland has joined #ruby
freerobby has quit [Quit: Leaving.]
chopmo has quit []
SiliconG has quit [Ping timeout: 272 seconds]
shaunbaker has quit [Remote host closed the connection]
tyl has joined #ruby
tyl has quit [Changing host]
tyl has joined #ruby
burlyscudd has joined #ruby
Advocation has quit [Quit: Advocation]
duggiefresh has joined #ruby
snapcase has joined #ruby
snath has joined #ruby
clamstar_ has joined #ruby
clamstar_ has quit [Client Quit]
rdark has quit [Ping timeout: 260 seconds]
m104 has joined #ruby
mansi has joined #ruby
mlpinit has quit [Quit: Leaving...]
Advocation has joined #ruby
shaunbaker has joined #ruby
clamstar has joined #ruby
rdark has joined #ruby
m104 has quit [Client Quit]
mercwithamouth has quit [Ping timeout: 252 seconds]
mmcclimon has joined #ruby
arctaruz has joined #ruby
wildroman2 has joined #ruby
nszceta has quit [Remote host closed the connection]
wildroman2 has quit [Read error: Connection reset by peer]
<avril14th> MrZYX: I did a before :all each as you proposed. Now everything passes
<avril14th> thanks guys
LadyRainicorn has joined #ruby
wildroman2 has joined #ruby
yalue has quit [Quit: Leaving]
clamstar is now known as rx
blackmesa has joined #ruby
brunops has joined #ruby
mlpinit has joined #ruby
intuxicated has joined #ruby
boboc has joined #ruby
ElComradio has joined #ruby
tesuji has joined #ruby
axl_ has quit [Ping timeout: 245 seconds]
failshell has joined #ruby
jlebrech has quit [Read error: Connection reset by peer]
tjad has joined #ruby
parzo has quit [Remote host closed the connection]
bsdguru has quit [Quit: bsdguru]
parzo has joined #ruby
Davey has joined #ruby
mikepack has joined #ruby
<shevy> ANGRY
<MrZYX> good
<MrZYX> turn your anger into ruby code!
axl_ has joined #ruby
banister has quit [Ping timeout: 240 seconds]
figgleberry has joined #ruby
shaunbaker has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
shadoi has joined #ruby
shaunbaker has joined #ruby
Advocation has quit [Quit: Advocation]
parzo has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
nateberkopec has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
Gonzih has joined #ruby
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
yalue has joined #ruby
andikr has quit [Read error: Connection reset by peer]
tjad has quit [Remote host closed the connection]
<havenwood> sith!
patrickv has joined #ruby
nszceta has joined #ruby
<patrickv> yo. I'm trying to figure some stuff out about EventMachine. I'd like it to stop when it has nothing left to do !
shadoi has quit [Ping timeout: 276 seconds]
<patrickv> like nodejs
S0da has joined #ruby
jlebrech has joined #ruby
lukec has quit [Quit: lukec]
<shevy> is the javascript this like self in ruby?
interactionjaxsn has joined #ruby
<apeiros> shevy: yes
<apeiros> but functions called on an object won't set `this`
shaunbaker has quit [Read error: Connection reset by peer]
rippa has joined #ruby
<apeiros> e.g. obj.foo = function() { return this }; obj.foo !== this
shaunbaker has joined #ruby
<apeiros> err, obj.foo() !== this
figgleberry has quit [Ping timeout: 252 seconds]
<apeiros> required parens…
rubynab has joined #ruby
danshultz has quit [Remote host closed the connection]
<rubynab> i have an array like ['a', 'b', 'c'] and want to turn it into a hash map like { 'a': true, 'b': true, 'c': true } – what’s the most elegant way to do this?
danshultz has joined #ruby
<MrZYX> hmm Hash[array.zip(Array.new(array.size, true))] ?
<rubynab> i currently do this: hash = Hash.new; array.each{ |item| t[item] = true }
kpshek has quit [Ping timeout: 245 seconds]
<apeiros> array.map { |k| [k, true] }
<rubynab> sorry
<rubynab> hash = Hash.new array.each{ |item| hash[item] = true }
pedda has joined #ruby
<apeiros> rubynab: Hash.new doesn't work this way
<patrickv> dirty trick
<patrickv> %w[a b c].map { |v| ["v",true] }.flatten
<rubynab> after Hash.new is a newline
<havenwood> ['a', 'b', 'c'].each_with_object(true).to_h
<apeiros> with the ; it'd work
<MrZYX> havenwood: nice one :D
<patrickv> the flatten one is also nicely ugly haha
<apeiros> to_h is 2.0 or 2.1?
<patrickv> mine works in 1.9.3
<patrickv> probs with older ruby too
<apeiros> patrickv: it's also unecessary
<havenwood> apeiros: 2.1
<apeiros> Hash[] accepts the unflattened
banister has joined #ruby
wildroman2 has quit [Ping timeout: 248 seconds]
<patrickv> pry(main)> Hash.new(%w[a b c].map { |v| ["v",true] })
<patrickv> => {}
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<apeiros> anyway, Set.new(ary).instance_variable_get(:@hash) # just because, whatever, fuck.
<havenwood> >> RUBY_VERSION
<eval-in> havenwood => "2.1.0" (https://eval.in/96420)
Thanatermesis has joined #ruby
ebetancourt has joined #ruby
<rubynab> thanks all, i think i'll go with MrZYX’s solution
shaunbaker has quit [Read error: Connection reset by peer]
Evenix has joined #ruby
shaunbak_ has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
mmcclimon has quit [Quit: mmcclimon]
interactionjaxsn has quit [Remote host closed the connection]
<MrZYX> hm, we didn't have hash = array.each_with_object({}) {|v, h| h[v] = true } yet
bean has joined #ruby
danshultz has joined #ruby
ndrei has joined #ruby
<apeiros> MrZYX: because he asked for elegant solutions :-p
yalue has quit [Read error: Operation timed out]
sski has quit [Remote host closed the connection]
<MrZYX> but then he goes with mine! oO
<apeiros> trudat
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asteve has joined #ruby
DrShoggoth has quit [Quit: Leaving]
sski has joined #ruby
<patrickv> (image is office safe)
<apeiros> SFW
Wolland has quit [Remote host closed the connection]
voglster has quit [Ping timeout: 260 seconds]
kevind has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
LastWhisper has joined #ruby
mikepack has joined #ruby
yalue has joined #ruby
jobewan has joined #ruby
sski has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Ping timeout: 245 seconds]
chipotle has quit [Quit: cya]
figgleberry has joined #ruby
petey has quit [Remote host closed the connection]
breakingthings has joined #ruby
petey has joined #ruby
jlast has quit [Remote host closed the connection]
Txandy|away is now known as Txandy
Hobogrammer_ has quit [Ping timeout: 252 seconds]
Neomex has joined #ruby
mikepack has quit [Ping timeout: 272 seconds]
jrunning__ has quit []
Hanmac has joined #ruby
jrunning__ has joined #ruby
rljohnsn has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
lfox has joined #ruby
bsdguru has joined #ruby
mary5030 has joined #ruby
mikepack has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
petey has quit [Ping timeout: 272 seconds]
mary5030 has quit [Remote host closed the connection]
petey_ has joined #ruby
phipes has joined #ruby
Jdubs has joined #ruby
tkuchiki has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
Neomex has quit [Quit: Neomex]
boboc has quit []
Jdubs has quit [Remote host closed the connection]
cherrypeel has joined #ruby
cherrypeel has left #ruby [#ruby]
yfeldblum has joined #ruby
tesuji has quit [Ping timeout: 240 seconds]
mengu has quit [Remote host closed the connection]
Gonzih has quit [Quit: IRC is just multiplayer vim.]
vlad_starkov has quit [Remote host closed the connection]
b00stfr31k has joined #ruby
mary5030 has joined #ruby
nism has quit [Quit: Leaving]
ciwolsey has quit [Read error: Connection reset by peer]
jlebrech has quit [Ping timeout: 245 seconds]
banister has quit [Ping timeout: 264 seconds]
chipotle has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 248 seconds]
speakingcode has joined #ruby
wildroman2 has joined #ruby
pietr0 has joined #ruby
jlebrech has joined #ruby
SCommette has joined #ruby
jlast has joined #ruby
SiliconG has joined #ruby
zeeraw has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
banister has joined #ruby
jamto11 has joined #ruby
Spami has joined #ruby
makara has quit [Ping timeout: 240 seconds]
SCommette has quit [Read error: Connection reset by peer]
SiliconG has quit [Ping timeout: 260 seconds]
yekta has joined #ruby
jprovazn has quit [Quit: Leaving]
speakingcode has quit [Ping timeout: 248 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
sbos99 has quit [Quit: Leaving]
[krisbulman] is now known as krisbulman
rljohnsn has quit [Quit: Leaving.]
rmorello is now known as rmorello_iphone
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danshultz has quit [Read error: Connection reset by peer]
danshult_ has joined #ruby
IceDragon has joined #ruby
lmickh has joined #ruby
Macaveli has quit [Quit: Leaving]
kpshek has joined #ruby
<apeiros> Enumerable#each_with_index would be even nicer if we could provide a start-value
einarj has quit [Remote host closed the connection]
TheLarkInn has left #ruby [#ruby]
sambao21 has joined #ruby
ckinni has joined #ruby
SiliconG has joined #ruby
ner0x has joined #ruby
b00stfr31k has quit [Quit: leaving]
shaunbak_ has quit [Remote host closed the connection]
krisbulman is now known as krisbulman|oOo
Czupa has joined #ruby
Mattx has quit [Ping timeout: 252 seconds]
danshult_ has quit [Read error: Connection reset by peer]
gmci has quit [Quit: Textual IRC Client: www.textualapp.com]
danshultz has joined #ruby
teddyp1cker has joined #ruby
_maes_ has joined #ruby
jlast_ has joined #ruby
jlast_ has quit [Remote host closed the connection]
agilevic has joined #ruby
<havenwood> apeiros: aye, would make sense to take of offset as an argument like #with_index: #each.with_index(start_value)
jlast_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<agilevic> czesc jest ktos z Polski?
jlast_ has quit [Read error: Connection reset by peer]
jlast_ has joined #ruby
yasushi has quit [Remote host closed the connection]
sambao21 has joined #ruby
<shevy> wtf
<shevy> agilevic english dude
geggam has joined #ruby
jlast has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Remote host closed the connection]
<apeiros> havenwood: what? with_index does that?
Squarepy has quit [Quit: Leaving]
* apeiros checks
<havenwood> apeiros: yup :)
<apeiros> dayumm!
ndrei has quit [Ping timeout: 272 seconds]
<apeiros> .each.with_index is good enough
<apeiros> thx havenwood, TIL
e-dard has left #ruby [#ruby]
shaunbaker has joined #ruby
shredding has quit [Quit: shredding]
gmci has joined #ruby
Advocation has joined #ruby
Kricir has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
teddyp1cker has quit [Remote host closed the connection]
hobodave has joined #ruby
brunops has quit [Ping timeout: 252 seconds]
Mattx has joined #ruby
Mattx has joined #ruby
Mattx has quit [Changing host]
yasushi has joined #ruby
<agilevic> shevy: chill, just trying to see if there is anyone from Poland around
teddyp1c_ has joined #ruby
<shevy> you speak english! :)
ndrei has joined #ruby
maasha has quit [Quit: Page closed]
petey_ has quit [Remote host closed the connection]
sickweezle has quit [Ping timeout: 245 seconds]
brunops has joined #ruby
yasushi has quit [Ping timeout: 272 seconds]
petey has joined #ruby
sickweezle has joined #ruby
thesheff17 has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
robbyoconnor has joined #ruby
wildroman2 has quit [Remote host closed the connection]
petey has quit [Ping timeout: 245 seconds]
zeade has quit [Quit: Leaving.]
gianlucadv has joined #ruby
petey has joined #ruby
Es0teric has joined #ruby
tylersmith has joined #ruby
bigkevmcd has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
burlyscudd has quit [Quit: Leaving.]
griffindy has joined #ruby
madrax has joined #ruby
madrax has left #ruby ["Saliendo"]
blackmesa has quit [Ping timeout: 265 seconds]
arietis has quit [Ping timeout: 264 seconds]
digifiv5e has joined #ruby
bean has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 272 seconds]
Kricir_ has joined #ruby
heftig has quit [Quit: Quitting]
DaniG2k has quit [Quit: leaving]
gja has joined #ruby
DouweM_ has quit [Quit: Leaving...]
lethjakman has joined #ruby
tagrudev has quit [Read error: Connection reset by peer]
sickweezle has quit [Ping timeout: 248 seconds]
<LastWhisper> agilevic: kurwa
<LastWhisper> that's my finest polish
aganov has quit [Remote host closed the connection]
Wolland has joined #ruby
Kricir has quit [Ping timeout: 252 seconds]
jlast_ has quit [Remote host closed the connection]
kevind_ has joined #ruby
ElComradio has quit [Ping timeout: 245 seconds]
jlast has joined #ruby
jlast has quit [Read error: Connection reset by peer]
jlast has joined #ruby
nszceta has quit [Read error: Connection reset by peer]
jprovazn has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
kevind has quit [Ping timeout: 252 seconds]
ElComradio has joined #ruby
kevind_ is now known as kevind
zigomir has quit [Remote host closed the connection]
yfeldblum has joined #ruby
zigomir has joined #ruby
Wolland has quit [Ping timeout: 248 seconds]
x77686d has joined #ruby
x77686d has quit [Client Quit]
ahawkins has quit [Quit: leaving]
lsmola_ has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
mikepack has quit [Remote host closed the connection]
zigomir has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
parzo has joined #ruby
senj has joined #ruby
DaniG2k has joined #ruby
Guest45771 has quit [Remote host closed the connection]
freezey has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<DaniG2k> guys if I have these two nearly identical methods: https://gist.github.com/DaniG2k/8712785
DouweM has joined #ruby
Xeago has quit [Remote host closed the connection]
brennanMKE has joined #ruby
<DaniG2k> how can I rewrite with currying?
_maes_ has joined #ruby
noname001__ has quit [Ping timeout: 264 seconds]
<shevy> DaniG2k can't you make one method instead
parzo has quit [Ping timeout: 265 seconds]
<shevy> pass two arguments
lukec has joined #ruby
interactionjaxsn has joined #ruby
<MrZYX> (I ignore the currying part because in ruby you can't curry methods, only lambda's (and maybe procs, I forgot)). IMO these are fine as they are, they are different enough and not complex enough to unify them
saarinen has joined #ruby
AxonetBE has quit [Quit: AxonetBE]
zachallett has joined #ruby
aryaching has joined #ruby
x77686d has joined #ruby
<DaniG2k> yeah they arent complex but
<DaniG2k> i suppose thats one really nice feature of functional languages
<DaniG2k> 1 method
<terrellt> You could always make url_array an object, then write url_array.without_urls, with the default being including them.
<terrellt> An object that isn't just an array*
<mikecmpbll> :/
maletor has joined #ruby
Kricir_ has quit [Remote host closed the connection]
<MrZYX> shevy: not equivalent
<MrZYX> shevy: he's rejecting the exclude patterns, not selecting them
<mikecmpbll> shevy: how does it exclude?
<apeiros> stop talking about curry!
<DaniG2k> shevy: reject and select are opposite mehotds
* apeiros hungry
<mikecmpbll> yeah.
<mikecmpbll> :)
Kricir has joined #ruby
jack_rabbit has quit [Ping timeout: 260 seconds]
ElComradio has quit [Quit: ElComradio]
<shevy> DaniG2k can't you change it to select in both cases?
Czupa has quit [Ping timeout: 260 seconds]
<DaniG2k> shevy: the exclude ones are the ones I want to prune
<DaniG2k> not select
<DaniG2k> the include ones I want to keep
<DaniG2k> with currying in SML i can pass in two separate methods
<DaniG2k> very nice
adayzdone has joined #ruby
Hobogrammer has joined #ruby
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
caustic has joined #ruby
shadoi has joined #ruby
phipes has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
sickweezle has joined #ruby
phipes has joined #ruby
jamto11 has quit [Remote host closed the connection]
zxq9 has joined #ruby
<anildigital> Can't I create instance of NilClass with .new or .instance
<anildigital> how do I create instance of NilClass
<shevy> >> NilClass.allocate
<eval-in> shevy => allocator undefined for NilClass (TypeError) ... (https://eval.in/96434)
jamto11 has joined #ruby
shadoi has quit [Ping timeout: 245 seconds]
senj has quit [Quit: Sleep Now]
havenwood has quit [Remote host closed the connection]
Sawbones has joined #ruby
<Sawbones> I'm noticing people have such strong opinions about Ruby
nomenkun has joined #ruby
<pietr0> anildigital: nil
<apeiros> anildigital: you can't
<shevy> Sawbones all based on specific factual statements
mikepack has joined #ruby
<shevy> ruby has less line noise than perl
obs_ has joined #ruby
mikepack has quit [Remote host closed the connection]
senj has joined #ruby
obs has quit [Read error: Connection reset by peer]
jamto11 has quit [Ping timeout: 269 seconds]
<Sawbones> shevy: Yeah, but I mean they either want everything rubified or they wish satan would murder it's family
mikepack has joined #ruby
<Sawbones> Ugh I hated PERL
rootshift has joined #ruby
<Sawbones> It makes your eyes bleed
hobodave has quit [Read error: Connection reset by peer]
<shevy> I wouldn't mind if some older languages go extinct, if the same functionality could be achieved with other languages
<shevy> did you see that recent blog post about pascal
axl_ has quit [Quit: axl_]
<apeiros> I liked perl
hobodave has joined #ruby
<apeiros> still do
philcrissman has joined #ruby
<shevy> while ( k <> ln ) and ( ct [ name ] <> chr ( eos ) ) do begin
<apeiros> however, I far prefer ruby
<shevy> begin writeln; writeln ( ' ******toyprolog aborted******'); goto 1 end;
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<anildigital> apeiros, pietr0 why.. I want to create one instance
<anildigital> as Ruby is fully object oriented.. I should be somehow be able to create instance of NilClass
<Sawbones> hehe
nszceta has joined #ruby
<shevy> anildigital only if you can instantiate a class
ace_striker has joined #ruby
bsdguru has quit [Ping timeout: 272 seconds]
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
<shevy> anildigital in this case you can not instantiate from that class
<apeiros> anildigital: object oriented doesn't mean you can do whatever
<apeiros> anildigital: NilClass has an instance: nil
<Sawbones> Do you guy have any resources on extending Ruby with C or C++?
<apeiros> and nil is the only instance of NilClass
<apeiros> you can't create additional ones.
<Senjai> NilClass isa singleton
Hobogrammer has quit [Read error: Operation timed out]
<anildigital> shevy: how can instantiate a NilClass
<shevy> hmm
<shevy> quite mean
<anildigital> if it was singleton... I would have called .instance method on it
gittish has quit [Quit: gittish]
<Senjai> Sawbones: I know someone wrote a book on ruby internals, that is on the core team, I would try finding that
<Senjai> Sawbones: I heard it was good
<Sawbones> Senjai: thanks
<Senjai> anildigital: No, a singleton doesn't have to have ".instance", the design of it is a singleton
<apeiros> anildigital: you asked, you got an answer. you are free to reject the answer. doesn't change that it's correct.
<Senjai> the implimentation can be different
<Sawbones> Also just writting a Ruby wrapper for C++ code would be cool. I have some C++ libs I want to use for a project
<MrZYX> anildigital: def NilClass.instance; end; # there you go
<Senjai> Sawbones: Ruby is written in C
<Sawbones> Senjai: Yeah I saw, but how do I call it in Ruby?
w4pm has joined #ruby
<Senjai> Sawbones: Rubinius is written in C++
<Senjai> Sawbones: Ruby won't interface with C++ libraries
<apeiros> Senjai: of course
<anildigital> MrZYX: I want to create a real instance
<apeiros> Sawbones: you write an extension for ruby
bsdguru has joined #ruby
<Senjai> anildigital: Then you're doing it wrong
<MrZYX> anildigital: you can't because it's a singleton and ruby creates an instance before you have the chance to
shaunbaker has quit [Remote host closed the connection]
<Senjai> anildigital: If someone has made it hard for you to do x, maybe you shouldnt be doing x
saarinen has quit [Quit: saarinen]
<shevy> I never noticed that Singletons can be so unfair :(
<apeiros> anildigital: are you a troll? or what about "No, you can't" don't you understand?
sickweezle is now known as lagweezle
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
nszceta has quit [Ping timeout: 248 seconds]
<Sawbones> shevy: Reading it now
gnumarcelo has joined #ruby
<anildigital> apeiros: nope.. I actually wanted to know what kind of class NilClass is .. it's not singleton.. it's not regular
<anildigital> what is it
<apeiros> anildigital: it is a singleton.
<anildigital> apeiros: I was demoing this in one of my talk
<Senjai> anildigital: NilClass.class = Class
<apeiros> you demoed wrong then.
<anildigital> apeiros: but then why there is no .instance method on it
dx7 has quit [Remote host closed the connection]
<anildigital> I should be able to get the same instance.. using .instance right?
maletor has quit [Read error: Connection reset by peer]
<apeiros> anildigital: because as Senjai already correctly stated - that's not a requirement of the pattern
<anildigital> It might be singleton ... but very custom singleton
<Senjai> anildigital: A signleton isn't defined by its implimentation, this has been stated before.
dagobah has quit [Quit: Leaving...]
<MrZYX> anildigital: a singleton isn't defined by it's interface but by the fact that there's only one instance
<Senjai> anildigital: It is defined by the constraint there is meant to be only one instance of the class
dx7 has joined #ruby
nszceta has joined #ruby
<Senjai> however that is implimented doesn't matter
<apeiros> anildigital: the only requirement for singleton pattern is that there must always only exist 0 or 1 instance of the class
<anildigital> it's not fully object oriented then.. somehow
abra has joined #ruby
Deejay_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<Senjai> Singleton in stdlib handles things differently, that doesnt mean its the only way to do it
abra has quit [Max SendQ exceeded]
<MrZYX> anildigital: it is
octoberry has joined #ruby
<anildigital> I should be able to use .instance on NilClass to get nil
<apeiros> anildigital: you're talking nonsense.
<MrZYX> anildigital: you're not listening
<Senjai> anildigital: No, in object orientated languages, you should be able to call ".class" on anything and get a non nil result
abra has joined #ruby
<apeiros> s/anything/any object/
<anildigital> if it is singleton as we know .. method .instance should be there... MrZYX, apeiros..
<shevy> >> class << 'cat'; self; end.new
<eval-in> shevy => can't create instance of singleton class (TypeError) ... (https://eval.in/96435)
<Senjai> apeiros: in which case in ruby, everything is
<apeiros> (which in ruby is mostly equivalent, of course)
w4pm has quit [Ping timeout: 245 seconds]
<shevy> >> NilClass.new
<eval-in> shevy => undefined method `new' for NilClass:Class (NoMethodError) ... (https://eval.in/96436)
<MrZYX> anildigital: you're not listening. Again interface != behavior
rmorello_iphone is now known as rmorello
user258467 has quit [Quit: Quitte]
<Senjai> >> NilClass.class
<eval-in> Senjai => Class (https://eval.in/96437)
<anildigital> >> NilClass.instance
<eval-in> anildigital => undefined method `instance' for NilClass:Class (NoMethodError) ... (https://eval.in/96438)
<anildigital> :(
<Senjai> >>NilClass.superclass
<eval-in> Senjai => Object (https://eval.in/96439)
<Senjai> :O
<anildigital> that's what makes NilClass special class.. not regular class.. I hate it
<Senjai> anildigital: Then don't use ruby
<anildigital> >> NilClass.ancestors
<eval-in> anildigital => [NilClass, Object, Kernel, BasicObject] (https://eval.in/96440)
nathancahill has joined #ruby
<apeiros> anildigital: why do you ask questions if you don't listen to the answers?
<MrZYX> anildigital: we understood that it's not there. we explained you that it doesn't matter to be a singleton, what didn't you understand about that?
troessner has quit [Quit: Leaving]
<anildigital> >> Object.new
<eval-in> anildigital => #<Object:0x41f2e5a4> (https://eval.in/96441)
CalimeroTeknik has quit [Read error: Connection reset by peer]
<apeiros> anildigital: you'll hate TrueClass and FalseClass too then
<apeiros> anildigital: also Fixnum
<anildigital> >> NilClass.methods.grep(/new/)
<eval-in> anildigital => [] (https://eval.in/96442)
<anildigital> >> NilClass.methods.grep(/instance/)
<eval-in> anildigital => [:instance_methods, :public_instance_methods, :protected_instance_methods, :private_instance_methods, :instance_method, :public_instance_method, :instance_variables, :instance_variable_get, :instance_v ... (https://eval.in/96443)
SiliconG has quit [Ping timeout: 248 seconds]
kenneth has joined #ruby
<apeiros> anildigital: use irb or pry. the bot is only for demonstration purposes.
jack_rabbit has joined #ruby
* Senjai personally runs everything through irb first before using the bot to demonstrate to avoid making a fool of myself.
<Senjai> anildigital: You should do the same ;)
jlast_ has joined #ruby
francisfish has quit [Remote host closed the connection]
<lagweezle> I tried pry last night... The earth moved. O.O;
<Senjai> lagweezle: did it explode?
<Senjai> :P
jlast__ has joined #ruby
<lagweezle> Senjai: hah
jlast_ has quit [Read error: Connection reset by peer]
<apeiros> lagweezle: thank god. It'd be horrible if it stopped!
daxroc has quit [Quit: Leaving.]
<apeiros> s/god/FSM/
* lagweezle facepalms.
<Senjai> apeiros: haha
centrx has joined #ruby
<Senjai> Sawbones: Try looking at the wrapper around libxml
blaxter has quit [Quit: foo]
<Senjai> IIRC it's well implimented
zachallett has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 252 seconds]
mikepack_ has joined #ruby
Hobogrammer has joined #ruby
<shevy> ugh
<shevy> XML
ElComradio has joined #ruby
<shevy> Sawbones you have my deepest comforts man
Txandy is now known as Txandy|away
<Sawbones> shevy: What? Why?
<shevy> XML
<Sawbones> Oh god, no thank you
aspires has joined #ruby
petey has quit [Remote host closed the connection]
<shevy> Sawbones btw you can also look at Hanmac's bindings to rwx, it is in C++ -> https://github.com/Hanmac/rwx
petey has joined #ruby
b00stfr3ak has joined #ruby
<shevy> Look at all this beauty https://github.com/Hanmac/rwx/blob/master/ext/rwx.cpp and Hanmac is also on IRC!
<shevy> Init_WXColor(rb_mWX);
<shevy> Init_WXPalette(rb_mWX);
<shevy> isn't that pretty?
<mikecmpbll> :/
<shevy> wat!
<Sawbones> whoa
<shevy> it's actually somewhat readable, look:
<shevy> rb_define_const(rb_mWX,"WXVERSION",wrap(wxString(wxVERSION_NUM_DOT_STRING)));
<shevy> that should be a constant
<shevy> WXVERSION
mikepack has quit [Ping timeout: 269 seconds]
mikepack_ has quit [Read error: Operation timed out]
wildroman2 has joined #ruby
<Sawbones> is that a Ruby wrapper for C++?
wildroman2 has quit [Remote host closed the connection]
<shevy> rb_define_method() for a method definition
<shevy> for some C++ code, yeah
<shevy> apparently Hanmac knows C++
zachallett has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
wildroman2 has joined #ruby
<shevy> string object: rb_str_new2("Hello, World !"));
<shevy> #to_sym should be something like ID2SYM( rb_intern( "bla" ) );
<shevy> and so on and so forth
<Senjai> Sawbones: No, its C, as I mentioned you cannot use a C++ library with ruby. Or not that I know of
petey_ has joined #ruby
davy_ has joined #ruby
carlyle has joined #ruby
<Sawbones> Senjai: but it's .cpp
maletor has joined #ruby
<shevy> yeah you can use C++
maletor has quit [Read error: Connection reset by peer]
ner0x has quit [Ping timeout: 272 seconds]
juco has joined #ruby
<Senjai> shevy: then I stand corrected!
<shevy> but people who go that route often lose their sanity
petey has quit [Read error: Connection reset by peer]
<shevy> like the qtruby bindings
<shevy> the guy disappeared :(
<Senjai> Sawbones: ^^^
<Sawbones> haha
<Sawbones> I'll just use C I've written more using just plain C
<Senjai> Sawbones: may I ask what the library is
<shevy> I am not kidding btw, he was on IRC like 5 years ago... dunno what he is doing nowadays
maletor has joined #ruby
arctaruz has quit [Remote host closed the connection]
<Sawbones> Just still need to find a wrapper for the code
<Sawbones> I feel like SWIG would be cheating
<shevy> Hanmac can you recommend SWIG
<shevy> (*expect standard answer from Hanmac here*)
krisbulman|oOo is now known as [krisbulman|oOo]
<shevy> hmm I guess Hanmac is sleeping...
pel_daniel has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
DaniG2k has quit [Quit: leaving]
lukec has quit [Quit: lukec]
magoo has joined #ruby
nvrch has quit [Quit: nvrch]
Noldorin has joined #ruby
deception has joined #ruby
apeiros has quit [Remote host closed the connection]
Voodoofish430 has joined #ruby
<chipotle> newbie question, why is there no space between this variable x = say_moo *3 ?
<chipotle> it doesn't look pretty
<chipotle> it would seem to make sense that it needs a space?
apeiros has joined #ruby
<Sawbones> It can have space
<Morrolan> Ruby is rather forgiving when it comes to whitespace.
zeeraw has joined #ruby
<Morrolan> But most programmers would put one there, for the sake of readability, you're right.
<chipotle> i get this error with a space: chapter9.rb:1:in `say_moo': wrong number of arguments (0 for 1) (ArgumentError)
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
duggiefresh has quit [Remote host closed the connection]
bleak has joined #ruby
<chipotle> and i'm using ruby 2.1.0p0
<Sawbones> Forgiving? If a language told me how much whitespace I should have in my arithmetic I'd uninstall it
<Morrolan> In this case, say_moo is a method rather than a variable, chipotle.
<chipotle> so methods don't allow whitespaces?
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Solnse has joined #ruby
<Morrolan> Though passing '*3' as an argument would blow up, too. oO
<MrZYX> they do, but you're doing say_moo(*3) which is calling the splat operator
robbyoconnor has quit [Ping timeout: 264 seconds]
<Morrolan> Splat is defined for numbers?
<LadyRainicorn> uhm... what language do you use where methods can have whitespace?
<MrZYX> anything
<chipotle> this is the full text, btw https://gist.github.com/cmejo/1f546a383e5b58178217
mikepack has joined #ruby
<chipotle> full code, i mean
<MrZYX> Morrolan: which makes it handy for stuff like [*array_or_object].each
<LadyRainicorn> (well, technically speaking you could use non-breaking space or something, but that is psycho)
nomenkun has quit [Ping timeout: 252 seconds]
<Sawbones> It should be say_moo 3
<Sawbones> not say_moo * 3
<chipotle> oooh
<Morrolan> MrZYX: Oh, I see, nice.
<chipotle> oops!
<chipotle> my mistake, i read it wrong
mikecmpbll has quit [Ping timeout: 264 seconds]
RubyPanther has joined #ruby
<Sawbones> I love the lack of parends
Txandy|away is now known as Txandy
<Sawbones> command arg1, arg2
<Sawbones> so sexy
<Morrolan> Ew.
<Sawbones> Don't you ew
<Sawbones> Don't do that
Czupa has joined #ruby
<Morrolan> I sure do ew.
apeiros has quit [Ping timeout: 252 seconds]
nomenkun has joined #ruby
m4rcu5 has joined #ruby
roolo has quit [Quit: Linkinus - http://linkinus.com]
parzo has joined #ruby
jack_rabbit has quit [Ping timeout: 240 seconds]
zachallett has quit [Remote host closed the connection]
daxroc has joined #ruby
lfox has quit [Quit: ZZZzzz…]
forced_request has joined #ruby
axl_ has joined #ruby
benlieb has joined #ruby
bleak2 has joined #ruby
avril14th has quit [Quit: Page closed]
timonv has quit [Remote host closed the connection]
canton7-mac has quit [Remote host closed the connection]
<shevy> ewwww
nism has joined #ruby
<Sawbones> Why do you guys hate non parends?
<shevy> no
sepp2k has joined #ruby
parzo has quit [Ping timeout: 260 seconds]
Spami has joined #ruby
<shevy> def foo bar, bla, ble, :lala => :hoho
alekst has joined #ruby
rootshift has joined #ruby
<shevy> cat.meow()
<shevy> cat.meow
<shevy> cat.jump_to :tree
<shevy> cat.jump_to(:tree)
bleak has quit [Ping timeout: 248 seconds]
<Morrolan> I like leaving away parentheses, but within reason.
caustic has joined #ruby
olivier_bk has quit [Ping timeout: 252 seconds]
mocfive has joined #ruby
<shevy> I always use parens for definitions
<Morrolan> Which narrows down to "methods without arguments" and "DSL".
troyready has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<shevy> define DSL :)
mikepack has quit [Remote host closed the connection]
<MrZYX> so how much do you hate me for doing expect(some_method arg).to whatever ? :P
<Sawbones> I like Object.task :run_file
Czupa has quit [Quit: Wychodzi]
<Morrolan> RSpec, Sinatra, ...
<Morrolan> Rake
Czupa has joined #ruby
<Morrolan> MrZYX: I do that too.
lethjakman has quit [Ping timeout: 265 seconds]
bleak2 has quit [Ping timeout: 269 seconds]
<shevy> MrZYX yeah that is quite awful
nomenkun has quit [Ping timeout: 245 seconds]
mark_locklear has quit [Ping timeout: 252 seconds]
<MrZYX> shevy: how'd you write it?
<shevy> I would not use expect()
<Morrolan> But rather?
<MrZYX> forget that it's rspec for a moment
<shevy> I would not use rspec either
<Senjai> shevy: why not?
<shevy> Senjai dunno, never liked it
<Senjai> shevy: fair enough :P
<MrZYX> shevy: okay, how would you write foo(some_method arg).another_method another arg
chipotle has quit [Quit: cya]
<MrZYX> s/another arg/another_arg/
<shevy> foo.bla.should lalala(42)
<shevy> MrZYX I don't approve of any of this
lukec has joined #ruby
blackmesa has joined #ruby
<shevy> MrZYX in my latest attempts I am trying to use only [] class methods
rdark has quit [Quit: leaving]
noop has joined #ruby
<shevy> Foo[]
<shevy> Bar[]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast__ has quit [Remote host closed the connection]
<centrx> I have replaced all of my variables with class variables? What now?
<shevy> it frees me from having to give names to methods (these classes only have had one method, otherwise I would give proper names of course)
<shevy> ack
<shevy> class variables like @@foo ???
phansch has quit [Quit: Leaving]
akeem has joined #ruby
<shevy> centrx!
<centrx> Yes, now if you want to call a method on my class, all you have to do is: my_class.class_variable_get(:@@meth)
<shevy> :(
<centrx> This is new Ruby, no methods, no instance variables
<centrx> We are the future
<shevy> every time you use a @@var, a kitten dies
hobodave has quit [Quit: Computer has gone to sleep.]
<shevy> no methods would be fun
nomenkun has joined #ruby
jack_rabbit has joined #ruby
<shevy> centrx that is cumbersome syntax though
<shevy> why not:
Txandy is now known as Txandy|away
<shevy> class@@name
<shevy> I mean that would be quite short
s2013 has joined #ruby
<shevy> hmm
<centrx> shevy, If it is too short, it is easy to make a mistake
<shevy> object@var
wald0 has joined #ruby
<shevy> that makes no sense
<s2013> if i want to iterate through every file in a directory, what is the ideal way of doing it? use Dir.glob to get list of files and iterate through them or directly iterate through them by using Dir.foreach ?
<centrx> While you are typing class_variable_get, you have the time to think about what you are doing
<shevy> but foo@var would be nice
<shevy> default readers for all ivars :)
<centrx> s2013, Dir.glob is for regular expressions I believe
<MrZYX> s2013: no sense in globbing if you don't cut down the list or go recursive, foreach is better here
standyro2 has joined #ruby
bleak has joined #ruby
<shevy> s2013 use Dir['bla'].each {|entry| puts ' -> '+entry }
<centrx> or "pattern, which is an Array of patterns or a pattern String"
<MrZYX> centrx: no, for globbing syntax ;)
<shevy> well I forgot a *
silentpost has joined #ruby
<s2013> how do i get the filename then using dir.each/foreach ?
<shevy> look! even ruby core uses the beautiful []!
<shevy> what do you mean
<shevy> it's an array
<s2013> oh
<shevy> Dir['/*']
<shevy> try it!
<shevy> and when you have an array, you can use .each
<shevy> "/srv"
<shevy> ewww
<shevy> what stupid directory that is...
<s2013> gotcha
ace_striker__ has joined #ruby
<s2013> so i need to still do File.open right?
petey_ has quit [Remote host closed the connection]
<shevy> is that a new question :)
<s2013> Dir['mydir/*'].each |file| { File.open(file)... } ?
ace_striker has quit [Ping timeout: 245 seconds]
zachallett has joined #ruby
ace_striker__ is now known as ace_striker
gja has quit [Quit: This computer has gone to sleep]
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
<shevy> why do you want to do File.open? in your first question you did not say that you want to read the file?
petey has joined #ruby
<shevy> you forgot a { btw
<shevy> Dir['mydir/*'].each { |file| File.open(file) }
<s2013> i said i want to iterate through all the files.. and then do upload them to s3 based on their filename
<shevy> still not sure why you want File.open
petey has quit [Read error: Connection reset by peer]
Solnse has quit [Quit: Leaving.]
duggiefresh has joined #ruby
havenwood has joined #ruby
<shevy> you want to "iterate", well you already iterate via .each yes?
saarinen has joined #ruby
enebo has quit [Quit: enebo]
<s2013> anyways ok.
<s2013> thanks
<shevy> in the {}, just pipe them into the method that does the uploading to s3
<lagweezle> Yeah. You aren't wanting to open them. Although there is probably an s3 gem for uploading once you know the file name+path
<shevy> def upload_this_file_to_s3(i)
<shevy> # here that S3 thingy
petey has joined #ruby
<MrZYX> (don't really name the parameter i)
<shevy> (really name the parameter i)
<MrZYX> (no)
<s2013> i dont have an issue with uploading it
<shevy> (don't listen to evil MrXYZ)
<s2013> i just wanted to know best way to go through every file
<s2013> thanks
terrellt has quit [Ping timeout: 265 seconds]
<MrZYX> (don't listen to probably drunk shevy)
mikepack has joined #ruby
banister has joined #ruby
danshultz has quit [Remote host closed the connection]
jamto11 has joined #ruby
<shevy> s2013 you can't say your problem is solved already, what else can we do now here? we get bored with no tasks... feed us please! :(
<lagweezle> You totally want the parameter to be current_file_to_be_uploaded_to_s3_holder ;)
<shevy> longer names are good for indication
<shevy> short names are for lazy people
danshultz has joined #ruby
<MrZYX> s/file/filepath/
<s2013> i will
<shevy> lagweezle what if it is not a file but a directory
<shevy> in the code he gave, perhaps he will also pass in directories as well
<lagweezle> Then your method name has to change, too. ;)
<shevy> or symlinks
<shevy> or symlinks to non-existing files!
<shevy> or symlinks to non-existing directories!!!
<MrZYX> or named pipes!
chrisseaton has joined #ruby
<shevy> OMG
<shevy> lagweezle hehe
<MrZYX> or sockets!
yourmysin has joined #ruby
<lagweezle> mmm. pipes.
<RubyPanther> symlinks to nonexistent files, I have lots of those
<shevy> I hate these
<shevy> File.readlink does not like them either
<MrZYX> or symlinks to /dev/zero
<MrZYX> try uploading /dev/zero to S3! take that amazon!
<RubyPanther> I just hate the flashing red in my terminal
<shevy> hehe
gja has joined #ruby
<shevy> it's always that little red thing
<shevy> be it flashing or a button
<shevy> red indicates something bad
klaut has quit [Remote host closed the connection]
<shevy> ruby's logo is red btw ...
<RubyPanther> if you want to protect your eyes and just peak really quick in a dir with those, you can do like: reset ; ls -l ; sleep 1 ; reset
petey has quit [Ping timeout: 272 seconds]
forced_request has quit [Ping timeout: 248 seconds]
<RubyPanther> I hated the color red before I switched to Ruby
kenneth has quit [Quit: kenneth]
<shevy> perl has a black camel
deric_skibotn has joined #ruby
davy_ has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
<RubyPanther> I thought it was camelhair colored
kenneth has joined #ruby
subbyyy has joined #ruby
zxq9 has quit [Ping timeout: 260 seconds]
<shevy> like two pythons making love
rylev has quit [Remote host closed the connection]
<RubyPanther> perl doesn't have the camel, Perl does
<shevy> who writes Perl anyway
danshultz has quit [Ping timeout: 248 seconds]
<shevy> that extra keystroke for P is so hard
<RubyPanther> old linguists. oh yeah, the NSA.
Sawbones has quit []
octoberry has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
Lewix has joined #ruby
apeiros has joined #ruby
pushpak has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
figgleberry has quit [Remote host closed the connection]
Txandy|away is now known as Txandy
kenneth has quit [Client Quit]
i_s has joined #ruby
tauebel has joined #ruby
RaCx has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
jlast has joined #ruby
sebouboubou has joined #ruby
ma4rco has joined #ruby
<ma4rco> hello
<centrx> Ahoy
<dx7> olá
spider-mario has joined #ruby
<ma4rco> i need help with sinatra and angular
shvelo has joined #ruby
<ma4rco> i wanna read a sinatra site via http.get of angular, but its not working, getting 404
<ma4rco> if i read a local html file it works, does someone know why this happens?
<dx7> ma4rco: can you access your sinatra app via browser?
Bumptious has quit [Remote host closed the connection]
<ma4rco> yeah sure
<ma4rco> thats the problem that i dont understand
Bumptious has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
gigetoo has quit [Remote host closed the connection]
<ma4rco> and if i do a puts "teststring" in the / route
<dx7> i cannot help you with angular. sorry.
<ma4rco> i see that sinatra is doing something when i make the http java call
<ma4rco> okay
gigetoo has joined #ruby
<sebouboubou> hi folks. I started learning ruby a day ago, so just a beginner’s question: when declaring a var in a class or one of its methods, is it exactly the same to write @var=blabla and self.var=blabla? I find it confusing
tongcx has joined #ruby
<tongcx> hi, guys, where do you keep web server script which is running?
<tongcx> or /usr/local/bin?
<tongcx> is it /var?
<tongcx> or somewhere else
mikecmpbll has joined #ruby
standyro2 has quit [Ping timeout: 264 seconds]
breakingthings has quit []
davy_ has joined #ruby
kaldreno_ has joined #ruby
<centrx> sebastianb, @var is an instance variable
breakingthings has joined #ruby
<dx7> sebouboubou: @var=blablabla is a instace variable. self.var=blablabla is a method to acces that instance variable
kaldrenon has quit [Read error: Connection reset by peer]
<centrx> sebastianb, self.var is a method call (def var=)
breakingthings has quit [Client Quit]
figgleberry has joined #ruby
zxq9 has joined #ruby
intuxicated has quit [Ping timeout: 264 seconds]
<dx7> sebouboubou: self.var=blablabla works if you use attr_accessor or when you create a method called var= in your code
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rickruby has joined #ruby
<sebouboubou> oh, I get it, thanks. But in practise it’s usually almost the same, right?
<shevy> tongcx for my local stuff, all my scripts are runnable everywhere
Rylee has joined #ruby
gnumarcelo has quit [Quit: gnumarcelo]
<sebouboubou> yeah ok I understand
<sebouboubou> Thanks!
nycjv321 has joined #ruby
zachallett has quit [Remote host closed the connection]
<nycjv321> anyone ever run into a "undefined method `new' on an instance of SomeClass" ?
nonnatus has joined #ruby
<tongcx> shevy: but for production sever?
<tongcx> shevy: where do people usually put the running web sever?
<shevy> tongcx dunno, I dont really use ruby much at all for a "production" server - all my things assume that they can run everywhere, all the time
<lagweezle> What do you mean by web server script? The code that is run, or the thing that starts and stops the server?
adayzdone has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
akeem has quit [Quit: akeem]
<shevy> tongcx on gobolinux, the schemata is /Programs/NAME_OF_PROGRAM/VERSION so if it would be apache's httpd, it would be /Programs/Apache/2.2.1/ and inside that the required subdir structure, like etc/ conf/ etc..
<shevy> sorry
<dx7> nycjv321: Object.new.new => NoMethodError: undefined method `new' for #<Object:0x007feae9902a78> :)
<shevy> /Programs/Httpd
daxroc has quit [Quit: Leaving.]
ckinni has joined #ruby
<lagweezle> Right. Remind me to stay away from gobolinux ... Too much reminder of Windows. :/
SiliconG has joined #ruby
<shevy> windows has no consistent naming scheme
<nycjv321> lagweezle: "gobolinux"? sounds bad
<lagweezle> The /Programs thing.
<shevy> it is awesome
subbyyy_ has joined #ruby
<nycjv321> dx7: this is the code " @test = Story.new(name, description, steps)
<lagweezle> I'd like it more if it were named goblinlinux ;)
<shevy> :\
<shevy> you did not use it!
<nycjv321> shevy: me?
centrx has quit [Quit: Leaving]
<dx7> nycjv321: Story is a class or a module?
<shevy> nah, lagweezle
anildigital is now known as zz_anildigital
<shevy> but you probably didn't use it either nycjv321 :>
<nycjv321> dx7: Story is a class and the issue does not occur if instantiated from within the same file.
zeeraw has joined #ruby
Asher has quit [Quit: Leaving.]
<nycjv321> shevy: nope. I don't use distros that do severe modification of the Linux file system standard ;)
<lagweezle> /usr/local/www or something like that is where I'd expect to have non-system stuff.
jlebrech has quit [Quit: Konversation terminated!]
subbyyy has quit [Ping timeout: 264 seconds]
<shevy> nycjv321 oh so you are saying that other distributions like debian adhere to the FHS
<nycjv321> dx7: I'm using cucumber.
yfeldblum has joined #ruby
<nycjv321> shevy: lol atleast alot more ;)
<shevy> nycjv321 just shows that you are clueless
heidi has joined #ruby
zxq9 has quit [Read error: Connection reset by peer]
<shevy> nycjv321 else why does "stat /var/lib" work on gobolinux?
<nycjv321> woah
<lagweezle> O.o
<lagweezle> I'm confused as to what you're implying, shevy.
<nycjv321> shevy: no need for the slap in the face
carraroj has joined #ruby
<shevy> lagweezle what part? he claimed "severe modifications". If these would be "severe modifications" as he implied, why does it all work?
iamsean has joined #ruby
DrShoggoth has joined #ruby
arvorie has quit [Remote host closed the connection]
wgosling has left #ruby ["Konversation terminated!"]
<nycjv321> shevy: wikipedia must be lying then
gittish has joined #ruby
<shevy> nycjv321 what part
SiliconG has quit [Ping timeout: 252 seconds]
<lagweezle> shevy can't help it. He hails from tribe slapaho. He just slaps things al ot. ;)
<lagweezle> shevy: OH! Gotcha. More the /Programs isn't something that 'should' exist.
<dx7> nycjv321: strange
<lagweezle> Still keeping dirs that are necessary isn't really the opposite. :/
<nycjv321> lagweezle: exactly
<shevy> lagweezle well it is one additional layer compared to FHS layouts
Txandy is now known as Txandy|away
RaCx has quit [Quit: Computer has gone to sleep.]
<nycjv321> I don't use distro's that promote fragmentation
<shevy> nycjv321 what distribution do you use?
<nycjv321> anyways I am noticing that 'Story' isn't in the $LOAD_PATH. Is it possible that another instance of Story exists natively in Ruby?
rljohnsn has joined #ruby
<lagweezle> I think nycjv321 and I would rather it just stick with the standards rather than adding things not necessary.
<nycjv321> shevy: Slackware (l33t), Archlinux (Too unstable), and Fedora (Awesomesause)
<shevy> 3 all in one?! :D
nszceta has quit [Remote host closed the connection]
<nycjv321> Those are the ones I switch between. I have been using fedora lately.
rljohnsn has quit [Client Quit]
<dx7> nycjv321: No, it isn't. Ruby have no Story class natively.
freezey has quit [Remote host closed the connection]
cyrus_mc has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 252 seconds]
<nycjv321> hmmm maybe Cucumber does
<nycjv321> time for a module
gja has quit [Quit: This computer has gone to sleep]
RaCx has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
gja has joined #ruby
<dx7> nycjv321: but if you try call Story.new and Story doesn't exists you have a uninitialized constant error.
<lagweezle> Ubuntu/Devian and CentOS/RHEL here.
<nycjv321> its a no Method error.
<nycjv321> so I'm guessing Cucumber has a story class somewhere.
hobodave has joined #ruby
<dx7> nycjv321: maybe
zachallett has joined #ruby
danman has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
<Hanmac> shevy: sorry i was away reading ... and about SWIG ... not even its own creator likes it
<shevy> haha
tongcx has left #ruby [#ruby]
xcv_ has quit [Remote host closed the connection]
rljohnsn has joined #ruby
xcv has joined #ruby
devinus has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
nomenkun has quit [Remote host closed the connection]
danshultz has joined #ruby
obs_ has quit [Quit: Konversation terminated!]
nomenkun has joined #ruby
havenwood has quit []
freezey has joined #ruby
lethjakman has joined #ruby
<RubyPanther> "why are you writing bindings by hand? why don't you just use swig?" "0.o"
browndawg has quit [Quit: Leaving.]
rootshift has joined #ruby
asmodlol has quit [Remote host closed the connection]
<Hanmac> Senjai: i am binding c++ against ruby since years without problem
<RubyPanther> it is worth the 1000 hours, just to not have to look at the ugly
jso has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
Celm has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
sparrovv has joined #ruby
rylev has joined #ruby
<Pixels> How would I break from a do end block?
bleak has quit [Ping timeout: 245 seconds]
ndrei has joined #ruby
parzo has joined #ruby
<nycjv321> still isn't working wow
<lagweezle> 'break'
<nycjv321> Pixels: break?
sparrovv has quit [Remote host closed the connection]
<nycjv321> or exit? :P
<Pixels> tried break, gave me Error: break from proc-closure
kenneth has joined #ruby
<Pixels> wait, nvm, i got it
<Pixels> thanks though
<nycjv321> Pixels: what worked?
phipes has quit [Remote host closed the connection]
gja has quit [Quit: This computer has gone to sleep]
zxq9 has joined #ruby
fedesilv_ has joined #ruby
<banister> Pixels "next"
<nycjv321> omg I am soo stupid
<Pixels> yeah, that
<banister> "break" is slightly more intense, and wont just break from teh block, it'll break from the called method
fedesilva has quit [Ping timeout: 252 seconds]
<nycjv321> dx7: your were right :) I was calling .new twice
* nycjv321 is stupid
OdNairy has joined #ruby
<dx7> nycjv321: :)
aryaching_ has joined #ruby
<apeiros> I suggest ruby adds a keyword, `voodoo`. whenever you don't know how to do something, you use that keyword and ruby will automagically do "the right thing!"
RaCx has joined #ruby
<dx7> mykeus: problem solved! cool.
parzo has quit [Ping timeout: 265 seconds]
magoo_ has joined #ruby
<Pixels> Just make a program with the only word being voodoo
nanoyak has joined #ruby
<dx7> mykeus: wrong recipient. sorry.
<dx7> nycjv321: problem solved! cool.
<lagweezle> next? isn't that 'end this cycle and jump to the next'?
<shevy> voodoo sounds awesome
<nycjv321> lagweezle: makes sense as there is only one iteration?
aryaching has quit [Ping timeout: 260 seconds]
senj has quit [Quit: Sleep Now]
Kilo`byte has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
nobitanobi has joined #ruby
<lagweezle> Oh. If there is only one iteration, then yeah ...
bleak has joined #ruby
magoo has quit [Ping timeout: 272 seconds]
<Hanmac> shevy: https://i.chzbgr.com/maxW500/8028700416/h18B1D590/ << about the Anime Movie Maker Miyazaki
<nycjv321> Hanmac: lol
gittish has quit [Quit: gittish]
hl has quit [Ping timeout: 276 seconds]
<shevy> Hanmac this just scares me
<nycjv321> Hanmac: kiki's delivery service = great movie
<Hanmac> nycjv321: every single one of them he made was a great movie ;P
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
<nycjv321> I've only seen Ponyo and Kiki's Delivery Service :(
nobitanobi has quit [Read error: Connection reset by peer]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<Hanmac> nycjv321: oO thats blasphemy!!! you need to watch all of them!
<LadyRainicorn> Ponyo was so awesome.
obs has joined #ruby
kate_r has joined #ruby
davy_ has quit [Remote host closed the connection]
obs has quit [Client Quit]
<apeiros> lagweezle: `next` returns to the yielding method
<apeiros> lagweezle: `break` returns *from* the yielding method (not handing control back to it)
dkamioka has joined #ruby
CJD14 has joined #ruby
e^0_ has joined #ruby
terrellt has joined #ruby
e^0 has quit [Read error: Connection reset by peer]
w4pm has joined #ruby
<lagweezle> Ooooooh. Okay. Not just a loop, but a yielding method working on a block, then?
TMM has quit [Quit: Ex-Chat]
ace_striker has quit [Ping timeout: 245 seconds]
<lagweezle> hamakn: bwahahaha re: Miyazaki
Celm has quit [Remote host closed the connection]
<apeiros> lagweezle: ary.each do … end # this is just a method which yields to a block
phipes has joined #ruby
<apeiros> you consider it a loop because that's what it functionality wise does
<lagweezle> yah :3
zeade has joined #ruby
<Hanmac> "if you liked the last link you will like that too: https://i.chzbgr.com/maxW500/8025629696/h8BD24293/ "
hl has joined #ruby
mojjojo has quit [Quit: mojjojo]
<RubyPanther> apeiros: doing "the right thing" isn't at all what I would expect voodoo to do! http://www.retrologic.com/jargon/V/voodoo-programming.html "The implication is that the technique may not work, and if it doesn't, one will never know why. Almost synonymous with black magic, except that black magic typically isn't documented and nobody understands it."
Al__ has quit [Quit: Al__]
<nycjv321> Hanmac: hehehe
maletor has quit [Read error: Connection reset by peer]
phansch has joined #ruby
maletor has joined #ruby
philsturgeon has joined #ruby
<apeiros> RubyPanther: ok, rename it to fairy_grandparents?
<RubyPanther> I guess the black magic becomes voodoo when it is semi-documented on a wiki
<apeiros> oh, fairly_oddparents
adayzdone has joined #ruby
<philsturgeon> How can I split rake tasks into multiple files, just using plain old ruby? If I push to heroku without a Rakefile then heroku complains, but i dont want all jobs in the same file
mojjojo has joined #ruby
craigp has quit []
duggiefresh has quit [Read error: Connection reset by peer]
Celm has joined #ruby
duggiefresh has joined #ruby
<apeiros> philsturgeon: you can use require in Rakefile just fine
<philsturgeon> Dir.glob('tasks/*.rake').each { |r| import r }
<philsturgeon> durp
<philsturgeon> thanks
Virtualize|away has joined #ruby
philsturgeon has left #ruby [#ruby]
<RubyPanther> apeiros: how about lemonaid! or lazy! Gnome.new.lemonaid! "project finished"
<apeiros> koolaid?
<apeiros> I don't really care, it can have umphteen aliases
<RubyPanther> koolaid you only think it worked until you get the code review back
chipotle has joined #ruby
freezey has quit [Remote host closed the connection]
davy_ has joined #ruby
nism has quit [Quit: Leaving]
<terrellt> Gnome.new.koolaid.drink! #=> SIGTERM.
decoponio has quit [Quit: Leaving...]
heftig has joined #ruby
<RubyPanther> It might have been the first Pragmatic book that talked about building things so that they can easily be extended to add expected future features, so that instead of a big rewrite, you can just tack on the new feature and be drinking lemonade in the shade
jmurray has quit [Quit: jmurray]
CaptainJet has joined #ruby
<RubyPanther> Their future books take a different tack, of course
jmurray has joined #ruby
freezey has joined #ruby
jmurray has quit [Client Quit]
maletor_ has joined #ruby
jmurray has joined #ruby
<shevy> RubyPanther writes epically long sentences
Wolland has joined #ruby
IceDragon has quit [Ping timeout: 252 seconds]
jmurray has quit [Client Quit]
<LadyRainicorn> Bet
<LadyRainicorn> ter to write short.
dangerousdave has joined #ruby
xcv has quit [Read error: Connection reset by peer]
<LadyRainicorn> Too many words. No periods.
jlast has quit [Remote host closed the connection]
<LadyRainicorn> Small is beautiful.
Asher has joined #ruby
<LadyRainicorn> Brevity is bold.
jmurray has joined #ruby
jmurray has quit [Client Quit]
jlast has joined #ruby
maletor has quit [Ping timeout: 260 seconds]
jmurray has joined #ruby
<shevy> Ponicorns are drunk!
benlieb has quit [Quit: benlieb]
<RubyPanther> 99th percentile in comprehension, only 62nd in writing. I can parse it, why can't anybody else?!
jmurray has quit [Client Quit]
<shevy> laziness
<shevy> or an increase of processing cost
<RubyPanther> what do you mean a sentence can't have 12 commas?!
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Davey has joined #ruby
stkowski has joined #ruby
<shevy> sentences should not even have a .
<shevy> look at IRC!
<shevy> there are some people who punctuate and some who don't
sambao21 has quit [Quit: Computer has gone to sleep.]
<RubyPanther> I dated an English major, we'd chat online... I'd write 300 words, and she'd say, "you mean ____ ____?" "yeah"
<shevy> very understandable actually ;)
<RubyPanther> hers usually had more content, somehow
<shevy> hehe
jlast has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
mocfive has quit [Remote host closed the connection]
<banister> RubyPanther you recently married a chinese right?
jlast has joined #ruby
IceDragon has joined #ruby
mocfive has joined #ruby
Azure has quit [Ping timeout: 260 seconds]
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
devinus_ has joined #ruby
Nyyx has quit [Ping timeout: 272 seconds]
devinus has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
mark_locklear has joined #ruby
<lagweezle> Hanmac: Where can I acquire such 'monsters'?
Azure has joined #ruby
petey has joined #ruby
interactionjaxsn has joined #ruby
devinus_ is now known as devinus
benlieb has joined #ruby
tonni has joined #ruby
mikepack has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 248 seconds]
dkamioka has quit [Remote host closed the connection]
intuxicated has joined #ruby
caustic has joined #ruby
standyro2 has joined #ruby
senj has joined #ruby
Jdubs has joined #ruby
lfox has joined #ruby
benlieb has quit [Quit: benlieb]
agjacome has joined #ruby
duggiefr_ has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
tonni has quit [Remote host closed the connection]
dkamioka has joined #ruby
tonni has joined #ruby
yarou has joined #ruby
dkamioka has quit [Remote host closed the connection]
tyl has quit [Quit: Computer has gone to sleep.]
dkamioka has joined #ruby
<snkcld> is it possible to have multiple types of data in one csv file? like, if i exported 3 different types of data, is there any way i can just place them all in the same csv file, and have ruby CSV recognize it?
<lagweezle> CSV is only text.
<shevy> I could embed dancing pigs in a CSV file!
<lagweezle> So there is no actual data type other than strings, sort of.
<snkcld> i realize that
<lagweezle> So long as you handle conversion, yes, you can put anything in it.
rezzack has joined #ruby
<shevy> even dancing pigs?!
shadoi has quit [Quit: Leaving.]
ElComradio has quit [Quit: ElComradio]
g0bl1n has quit [Quit: Ex-Chat]
<lagweezle> I suppose so...
<apeiros> snkcld: no, csv is single table in a file
<snkcld> apeiros: thanks
<apeiros> snkcld: you could wrap your csv data in some container format
<RubyPanther> CSV isn't just a string, it has escaping conventions so you can stuff all sorts of data in there
<apeiros> but then only you can parse it
Shidash has joined #ruby
<snkcld> i realize i can use hacks to get it to work in this way, i was just curious if there was some elegant solution provided by CSV which allowed me to do have just one csv file
<RubyPanther> of course, half the tools are not compliant and will break unless it is strings...
Advocation has quit [Quit: Advocation]
kirun has joined #ruby
dorei has joined #ruby
jack_rabbit has joined #ruby
Advocation has joined #ruby
<shevy> somehow RubyPanther does not cheer people up :(
shadoi has joined #ruby
dkamioka has quit [Ping timeout: 265 seconds]
<RubyPanther> snkcld: The first thing you do with a CSV file is convert it to some better format. You don't want to mix data types because CSV headers are only for giving field names, not types
jbueza has joined #ruby
xiphias_ has joined #ruby
xiphias has quit [Read error: Connection reset by peer]
<apeiros> reminds me that I'm not having as much time as I hoped for https://github.com/apeiros/ept
breakingthings has joined #ruby
Kricir has quit [Remote host closed the connection]
<RubyPanther> shevy: if they're using CSV they need to be optimists! The glass isn't empty, it is over 2% full!
sparrovv has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> well, soon holidays… will take some time to work on it during those.
<shevy> yeah, ever you went the rails route, you had less and less time apeiros
maletor_ has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
<apeiros> shevy: not rails route. working for corporate.
<shevy> with rails!!!
<RubyPanther> rails: a working blog in 14 minutes. Or a broken app in 3 years.
mojjojo has quit [Quit: mojjojo]
<shevy> or "doing rails for the rest of my life"
<snkcld> RubyPanther: what would you suggest other than csv?
<snkcld> json?
Bira has quit [Remote host closed the connection]
<RubyPanther> snkcld: I generally insist on keeping data in databases, and/or behind APIs
<snkcld> oh yea yea, im exporting to be taken in by another database though. csv is working quite well for this actually
reset has joined #ruby
<RubyPanther> but I'm probably just scarred from... weekly 200MB excel imports... via email
<snkcld> oh ha. luckily i dont need to work with excelt
<RubyPanther> snkcld: Just use postgres dblink!
<snkcld> im exporting from postgres
<snkcld> and importing to neo4j
<snkcld> dblink?
<snkcld> interesting
<RubyPanther> dblink lets you make the foreign database a view, and you can move the data inside postgres
<snkcld> whoa
momomomomo has joined #ruby
<RubyPanther> there is a dbi-link (the original) in Perl which lets you connect any db with dbi support, and even lets you make custom data types for them
figgleberry has quit [Ping timeout: 248 seconds]
timonv has quit [Ping timeout: 265 seconds]
nari has quit [Read error: Operation timed out]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
dkamioka has joined #ruby
Guest010011 has quit [Quit: Leaving]
ckinni has joined #ruby
<snkcld> ah, so dbi is the interface by which the two databases would communicate?
drumusician has quit [Ping timeout: 265 seconds]
mojjojo has joined #ruby
parzo has joined #ruby
mikepack has joined #ruby
havenwood has joined #ruby
davy_ has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
rylev has quit []
aryaching_ has quit [Ping timeout: 240 seconds]
<RubyPanther> snkcld: with dbi-link, yeah, dbi is the low level driver interface, so you can use any db that Perl can use. That's an addon, but the dblink version that is included I think has native support for a bunch. I'm not sure how many. I've used it with oracle and ODBC.
Yahkob has joined #ruby
_Andres has joined #ruby
<RubyPanther> it is really great for taming legacy monsters, because you can leave the old stuff on the old db, and put the new stuff on postgres, and migrate in stages
axl_ has quit [Ping timeout: 260 seconds]
momomomomo has quit [Quit: momomomomo]
parzo has quit [Ping timeout: 272 seconds]
<shevy> oh man
<shevy> RubyPanther has had a painful life :(
<shevy> snkcld but obviously the pain has built his character
fenicks has joined #ruby
<snkcld> ha
<hfp> Hey guys, I am going through the Ruby Koans and I was wondering if there were the answers anywhere to the "THINK ABOUT IT" questions from the comments? i.e. http://pastie.org/8683241
<RubyPanther> lol your legacy nightmare is my weekend entertainment
<snkcld> im coming from ruby, im not seeing a dbi link for neo4j. i guess the dbi link would implement logic to convert the postgres database tables and relationships to the foreign database's representation
<snkcld> unfortunately im interfacing with the foreign db via an embedded mode, not over a network connection by which i could send queries
xcv has joined #ruby
noop has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
<RubyPanther> Perl DBI can use anything with a DBD driver, so it should be good
burlyscudd has joined #ruby
<RubyPanther> That does rely also on having PL/Perl support, but that is standard these days I think
<shevy> hfp I go with object.nil?
<shevy> hfp less characters
nycjv321 has quit [Read error: Operation timed out]
<snkcld> ah, nice. thats pretty cool. unfortunately this would mean i would interface with the database over rest, as opposed to embedded mode, which would be much slower than exporting the postgres as csv and importing in embedded
teddyp1c_ has quit []
<shevy> hfp perhaps other reasons, not sure. equality checks can be overriden I think
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sparrovv has quit [Remote host closed the connection]
kedibasi has joined #ruby
<snkcld> btw im using jruby to interface with the database in embedded mode (the database is written in java)
<shevy> java!
<RubyPanther> snkcld: in that case, JSON is probably your best bet
<RubyPanther> but you'll have to write code that knows about your stuff
mikepack has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ckinni has joined #ruby
<snkcld> RubyPanther: exactly. thats exactly what im doing
<RubyPanther> or use one of these new open document formats, like the office packages use
<snkcld> the logic about what the relationships are is in my importing code
Loaft has joined #ruby
<snkcld> which is working great. why do you think json would be better ,though?
<RubyPanther> it kinda sucks when there is data that can't describe itself
<snkcld> csv is nice becuase postgres can export everything i need in a matter of ~15 sec
<snkcld> (550k clients)
ElComradio has joined #ruby
<snkcld> and a ton of products, etc
<snkcld> i imagine that json is more to parse, too, though
dkamioka has quit [Remote host closed the connection]
<snkcld> more clocks to parse it
<havenwood> shevy: a method with an argument versus just a method
<RubyPanther> json is better than CSV because it has less tricky escaping rules, tools are more compliant, and you can include metadata as needed
<shevy> havenwood hmm
<snkcld> RubyPanther: i agree that the json format is better, definitely
<shevy> havenwood I like methods
<snkcld> but does postgres export to json?
<RubyPanther> snkcld: if you build it with PL/Ruby support, it would only be a few lines of code...
zigomir has joined #ruby
Advocation has quit [Quit: Advocation]
figgleberry has joined #ruby
<snkcld> ah, actually it looks like postgres has a record to json function
<RubyPanther> Of course, most people would NOT do that step in the database. But you can. I would.
<snkcld> PL?
Cooler_ has joined #ruby
<RubyPanther> Procedural Language
ckinni has quit [Ping timeout: 264 seconds]
ctp has quit [Quit: Linkinus - http://linkinus.com]
<RubyPanther> Like if you write a database function in SQL, it is usually really in the PL/SQL language
<RubyPanther> I actually had to edit the source to get the current PL/Ruby working with the current Ruby and current Postgres, so using the built-in JSON conversion is highly recommended if it can do what you want
Hobogrammer has quit [Ping timeout: 265 seconds]
<snkcld> RubyPanther: it sounds like a good idea and all, however, considering that my import script has all the logic for what format the fields are, etc, i dont think this would benefit me. though it does sound like an interesting project
<RubyPanther> it does build with the right compile options if you want untrusted version (for single-developer use)
Bira has joined #ruby
<RubyPanther> snkcld: Yeah, you're better off just leaving it brittle and documenting it
danman has quit [Ping timeout: 272 seconds]
adayzdone has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<RubyPanther> unless you can get away with billing a month of db programming ;)
<snkcld> its definitely a million times better than what i was doing before... which was using ActiveRecord find_each to generate the csv manually...
Kricir has joined #ruby
Celm has quit [Remote host closed the connection]
<snkcld> literally atleast a thousand times slower
<snkcld> i was just being lazy, until i decided to figure out the SQL to get what i wanted exactly
danman has joined #ruby
kewjo has joined #ruby
CalimeroTeknik has joined #ruby
Jdubs has quit [Remote host closed the connection]
danman has quit [Client Quit]
drumusician has joined #ruby
Bira has quit [Ping timeout: 265 seconds]
davy__ has joined #ruby
asmodlol has joined #ruby
maletor has joined #ruby
v0n has quit [Read error: Operation timed out]
onewheelskyward has quit [Ping timeout: 245 seconds]
tongcx has joined #ruby
<tongcx> hi guys, i'm trying to use sinatra to serve static file
duggiefr_ has quit [Remote host closed the connection]
maletor has quit [Read error: Connection reset by peer]
<tongcx> there is one confusion
chuck54 has joined #ruby
maletor_ has joined #ruby
<tongcx> so i use Rack::static for it
<tongcx> but sinatra also set the default root as 'public'
<tongcx> why there is a conflict
notjohn has joined #ruby
CJD14 has quit [Ping timeout: 248 seconds]
octoberry has joined #ruby
gmci has quit [Quit: Textual IRC Client: www.textualapp.com]
standyro2 has quit [Ping timeout: 248 seconds]
nowthatsamatt has joined #ruby
<tongcx> also, in ruby what does 'set :public true' come from
<tongcx> is 'set' a keyword?
<dorei> NameError: undefined local variable or method `set' for main:Object
<hfp> shevy: Well I put that it's because nil is not a boolean in Ruby and so == nil will not evaluate as expected whereas object.nil? will evaluate to true or false. But I would like to check my answers to make sure I got it right.
<dorei> nop, it's not a keyword :p
<shevy> hfp yeah no idea. I go with .nil? always myself, it feels much better than == nil
<tongcx> dorei: so it's a method of SinatraBase?
<dorei> tongcx: no idea, maybe
havenwood has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
zegerjan has quit [Ping timeout: 260 seconds]
<apeiros> tongcx: depends on what `self` is where you have that line
RaCx_ has joined #ruby
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<tongcx> by default, does sinatra serve static file?
<apeiros> though that line you just pasted is a syntax error
<apeiros> I assume you miss a ","
caustic has joined #ruby
RaCx has quit [Read error: Connection reset by peer]
RaCx_ is now known as RaCx
mojjojo has quit [Quit: mojjojo]
<apeiros> tongcx: `set :public, true` is (almost) the same as `self.set(:public, true)`
duggiefresh has joined #ruby
<apeiros> only almost as it differs for private methods
adayzdone has joined #ruby
<tongcx> apeiros: thanks
chrisseaton has quit []
Advocation has joined #ruby
wildroman2 has quit [Remote host closed the connection]
ma4rco has quit [Quit: Lost terminal]
maletor_ has quit [Ping timeout: 245 seconds]
venkat has joined #ruby
mojjojo has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
intuxicated has quit [Read error: No route to host]
wildroman2 has joined #ruby
wallerdev has quit [Ping timeout: 248 seconds]
Celm has joined #ruby
maletor has joined #ruby
venkat has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 252 seconds]
venkat has joined #ruby
venkat has quit [Read error: No route to host]
enebo has joined #ruby
dachi_ has left #ruby [#ruby]
dachi_ has joined #ruby
figgleberry has quit [Ping timeout: 272 seconds]
petey has quit [Remote host closed the connection]
Notte has joined #ruby
davy__ has quit [Read error: Connection reset by peer]
petey has joined #ruby
davy__ has joined #ruby
nonnatus has quit [Ping timeout: 264 seconds]
robbyoconnor has joined #ruby
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
banister is now known as banisterfiend
heidi is now known as heidi-ramen
<snkcld> i notice that JavaUtilities.get_package_module_dot_format is taking a significant amount of time in my import script... if i dont use "dot format" when referencing java packages, would it be faster?
petey has quit [Ping timeout: 240 seconds]
Alina-malina has quit [Read error: Connection reset by peer]
<snkcld> i figured itd be faster -with- dot format, since it doesnt need to convert the camel case format to dot format for java (since java packages are in dot format
<TTilus> have you profiled?
adayzdone has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
lmg_ has joined #ruby
<snkcld> i have
<snkcld> 24.51 24.51 0.00 11014435 JavaUtilities.get_package_module_dot_format
phipes has quit [Remote host closed the connection]
mark_locklear has quit [Ping timeout: 248 seconds]
rickruby has quit [Remote host closed the connection]
chrisseaton has joined #ruby
<lmg_> Hey there, stupid question: I can't remember nor find information about they way you configure apache to use ruby the way you would normally use php, so like with <% %> if my memory serves me well
Wolland has quit [Remote host closed the connection]
<lmg_> Sorry for the stupidness of that question
<shevy> lmg_ erb
<TTilus> snkcld: pretty beefy amount of calls
rickruby has joined #ruby
<lmg_> shevy: thanks!
<lmg_> that must be it
phipes has joined #ruby
figgleberry has joined #ruby
<TTilus> snkcld: maybe there are spots missing caching?
Wolland has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
wallerdev has joined #ruby
Wolland has quit [Remote host closed the connection]
v0n has joined #ruby
rootshift has joined #ruby
IceyEC has quit [Quit: IceyEC]
<TTilus> snkcld: or i could be totally wrong and all those calls were unique and needed
burlyscudd has quit [Quit: Leaving.]
sparrovv has joined #ruby
octoberry has quit [Ping timeout: 240 seconds]
<snkcld> yes, a lot of calls. i am iteratiing over a lot of rows of data
<snkcld> but regardless, is it faster to use dot format or camel case for referring to java packages, from jruby?
rickruby has quit [Ping timeout: 248 seconds]
<TTilus> ive never benchmarked and dont know jruby internals enough to tell
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TTilus> i would fist just plain benchmark
Lewix_ has joined #ruby
jmurray has joined #ruby
mojjojo has quit [Quit: mojjojo]
_Andres has quit [Ping timeout: 264 seconds]
shadoi has quit [Quit: Leaving.]
<TTilus> if you have an expensive call, first try to throw some caching at it
_Andres has joined #ruby
Jdubs has joined #ruby
standyro2 has joined #ruby
Lewix has quit [Ping timeout: 240 seconds]
shadoi has joined #ruby
petey has joined #ruby
<TTilus> and of course try #jruby
tauebel has quit [Quit: Leaving.]
parzo has joined #ruby
<TTilus> should have remembered that earlier
Kricir has quit [Read error: Connection reset by peer]
freezey has quit [Remote host closed the connection]
<snkcld> throw some caching at including a java package?
Kricir has joined #ruby
_Andres has quit [Client Quit]
<waxjar> i dont think itll make much of a difference in that case, but yea, benchmark :)
caustic has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
parzo has quit [Ping timeout: 252 seconds]
<snkcld> well isnt that what my profiling did?
<snkcld> what do you mean by benchmark? like, try out the profiles in both cases, right?
alvaro_o has joined #ruby
punkrawkR has joined #ruby
vlad_starkov has joined #ruby
mojjojo has joined #ruby
Davey_ has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mercwithamouth has joined #ruby
alvaro_o has quit [Remote host closed the connection]
nobitanobi has joined #ruby
Davey has quit [Ping timeout: 245 seconds]
venkat has joined #ruby
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
davy__ has quit [Remote host closed the connection]
w4pm has quit [Ping timeout: 245 seconds]
benzrf has joined #ruby
<snkcld> is there a good indexing framework for ruby?
<benzrf> sup
<benzrf> snkcld: indexing?
<snkcld> eh
<snkcld> sort of like lucene for java, but for ruby
<snkcld> im indexing data in ruby using its hashes, which works
<snkcld> but im curious if theres a faster mechanism
<snkcld> or if hashes are pretty quick
dkamioka has joined #ruby
Wolland has joined #ruby
<snkcld> what is the algorithm for accessing a hash key? is it O(log n) ?
<benzrf> snkcld: hash tables are O(1) average iirc
drumusician has quit [Ping timeout: 264 seconds]
<benzrf> worst case is something like n log n I think?
<DouweM> snkcld: check this out: https://en.wikipedia.org/wiki/Hash_table
<snkcld> oh yea, of course
<snkcld> it is a 'hash' after all
<snkcld> haha
<snkcld> my bad.
<DouweM> snkcld: yup, just a regular hash table
blackmesa has quit [Ping timeout: 264 seconds]
<snkcld> so it would work pretty well then for indexing
<benzrf> that's what they're for ;)
<snkcld> in fact, that makes me wonder, why would one use a log n search instead of just hashing to find?
Czupa has quit [Remote host closed the connection]
<RubyPanther> snkcld: http://lucene.apache.org/solr/
jack_rabbit has quit [Quit: SIGSEGV (core dumped)]
jack_rabbit has joined #ruby
<benzrf> snkcld: because array to hash is O(n) average?
<RubyPanther> There is a Ruby port of lucene called Ferret, but it is many many years old
<benzrf> given O(1) insertion of n elements...
<snkcld> RubyPanther: well, i am in jruby, and i actuially have lucene available to me
<DouweM> If you want to use Lucene, there's libraries for both elasticsearch and solr
jack_rabbit has quit [Client Quit]
notjohn has quit [Quit: notjohn]
senayar_ has joined #ruby
<snkcld> im doing the hashing in ruby-space though so that i dont have to enter into java code and convert objects back and forth
<RubyPanther> snkcld: If you only need the features that hashes have, they're faster
jack_rabbit has joined #ruby
<snkcld> yea, im using it very basically
<snkcld> i have the key for each lookup
lethjakman has quit [Quit: WeeChat 0.4.0]
<snkcld> i dont need ot do ranges or anything like that
Xuisce has left #ruby [#ruby]
wildroman2 has quit [Remote host closed the connection]
<RubyPanther> I don't know about in JRuby, but in MRI the base types are in quality C, and just the time to interface with something else will make it slower
deric_skibotn has quit [Ping timeout: 240 seconds]
kpshek has quit []
pothibo has joined #ruby
<apeiros> snkcld: log n search is used in scenarios where hard upper limits exist. e.g. where hash worst case is a no-go
<RubyPanther> Presumably JRuby is similarly optimized for the base types
klaut has joined #ruby
<snkcld> apeiros: not sure i understand, does hash have a worst case?
<apeiros> alternatively in scenarios where the constant overhead of hash search is higher for the expected values of N than log N serach
<apeiros> snkcld: collisions
<snkcld> ahhhh
<snkcld> OH
<benzrf> snkcld: worst case lookup is O(n)
<apeiros> hash is amortized O(1), not "true" O(1)
<benzrf> definitely worse than O(log n) ;)
<snkcld> didnt think about that. hashes are computationally expensive, and i guess if you have really large keys it may be quicker to just do a search
venkat_ has joined #ruby
isec has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 252 seconds]
<snkcld> is it possible to enable rubys hashes to use log(1) or log(n) ?
<benzrf> apeiros: what exactly does amortized mean in that context?
Hobogrammer has joined #ruby
brian___ has joined #ruby
flori has quit [Ping timeout: 260 seconds]
<apeiros> I'd refer you to WP, as that probably gives a more accurate description than I
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
venkat has quit [Ping timeout: 272 seconds]
wildroman2 has joined #ruby
jlast has joined #ruby
oso|away is now known as oso96_2000
klaut has quit [Ping timeout: 264 seconds]
punkrawkR has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<snkcld> apeiros: WP?
<apeiros> wikipedia
<RubyPanther> Ruby hashes are generally cheap though. The more common slow cases like dynamic resizing are partially mitigated, for example by pre-allocating extra buckets
Nyyx has joined #ruby
tauebel has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nobitanobi has quit [Read error: Connection reset by peer]
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<RubyPanther> I've never even heard of a real case where hashes are too slow, but Ruby is fast enough ;)
<apeiros> allocating only happens on insertion, and we were discussing lookup ;-)
blackmesa has joined #ruby
fedesilv_ has quit [Remote host closed the connection]
<apeiros> in ruby you'll hardly ever be in a situation where you have to choose between hash and a "faster" datastructure. simply because rubys own overheads usually offset any difference already.
<RubyPanther> Right, lookup isn't where the common slow cases are clustered
<apeiros> (can still happen, though)
fedesilva has joined #ruby
timonv has joined #ruby
relix has joined #ruby
<snkcld> my usage of hashes are like this: indexes["indexname"]["string"][integer]
<snkcld> so i may just be overthinking it, because the first 2 are cheap hashes and the 3rd a simple offset
<snkcld> indexes["indexname"]["string"] would be an array actually...
<pontiki> i'm looking for something that will properly case-fold strings with UTF-8 characters
mojjojo has quit [Quit: mojjojo]
sebouboubou has quit [Quit: ChatZilla 0.9.90.1 [Firefox 29.0a1/20140130030202]]
venkat_ has quit [Read error: Connection reset by peer]
<apeiros> pontiki: use one of the unicode gems
burlyscudd has joined #ruby
<RubyPanther> snkcld: in my experience, laying out the data in a logical way is more important than worrying about the underlying implementation, because a structured, OO-ish approach will be readily optimizable later
<DouweM> snkcld: what range will that integer key be?
<apeiros> pontiki: or activesupport - I think it has support for that
<snkcld> well the key can be from 0 - anything ,really
<pontiki> i can't find anything for that in AS
<snkcld> RubyPanther: i feel you on that, but what im using this for is meant to be as quick as possible
<RubyPanther> And the interface to Hash is very easy to drop into something else
<snkcld> the project is laid out pretty nicely and OO, but as far as the indexing goes, im really trying to be fast
<snkcld> for what its worth, this is the index code: https://github.com/karabijavad/cadet/blob/master/lib/cadet/cadet_index/index.rb
<RubyPanther> snkcld: in my experience putting that cart in front of the horse slows things down more often than speeds things up
freezey has joined #ruby
<snkcld> yea
<snkcld> honestly, its mostly morbid curiousity.
<RubyPanther> Especially where duck typing should let you drop in a replacement without changing your business logic
<snkcld> ruby is working very well for me as it is
<snkcld> RubyPanther: yea, thats exactly what im doing
wildroman2 has quit [Remote host closed the connection]
<snkcld> its a drop in replacement to the lucene index
<snkcld> ;P
<snkcld> kinda
<snkcld> from my apps perspective atleast
<RubyPanther> snkcld: Right, but instead you could wrap lucene to be the drop-in replacement for Hash :) You might even only need two methods #[] and #[]=
flori has joined #ruby
Bira has joined #ruby
kirun has quit [Quit: Client exiting]
Notte has quit [Remote host closed the connection]
<snkcld> ha
brennanMKE has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 245 seconds]
<snkcld> honestly i think that rubys hashing may be better, unless doing the hashing in java is faster? because i imagine that all the stuff lucene would add may add extra logic where i dont need it
gittish has joined #ruby
<snkcld> lucene is available to me by default, but with the way this database indexing is setup... i would need to flush every so often to make srue everything is consistent
blackmes1 has joined #ruby
<snkcld> but with my simple jruby hash, i dont need to worry about htat at all. then, in the end, when my indexprovider is shutdown, i flush it all out to lucene
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
burlyscudd has quit [Ping timeout: 264 seconds]
mojjojo has joined #ruby
blackmesa has quit [Ping timeout: 248 seconds]
adayzdone has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Ping timeout: 272 seconds]
deric_skibotn has joined #ruby
notjohn has joined #ruby
chipotle has joined #ruby
nonnatus has joined #ruby
timonv has quit [Remote host closed the connection]
figgleberry has quit [Ping timeout: 252 seconds]
drumusician has joined #ruby
timonv has joined #ruby
agent_white has joined #ruby
centrx has joined #ruby
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
chrisseaton has quit []
heidi-ramen is now known as heidi
w4pm has joined #ruby
postmodern has joined #ruby
Evenix has quit [Remote host closed the connection]
rm__ has quit [Remote host closed the connection]
dkamioka has quit [Remote host closed the connection]
diegoviola has joined #ruby
chrisseaton has joined #ruby
F1skr has joined #ruby
rickruby has joined #ruby
Jdubs has quit [Remote host closed the connection]
tvw has quit []
Neomex1 has joined #ruby
rubynab has quit [Ping timeout: 245 seconds]
davy__ has joined #ruby
venkat has joined #ruby
agent_white has quit [Quit: brb]
venkat has quit [Read error: No route to host]
Azulinho has joined #ruby
phipes has quit [Remote host closed the connection]
davy__ has quit [Remote host closed the connection]
<Azulinho> whats your favourite gem for command line parsing these days ? looking for lean and feature full
jenskarlsen has joined #ruby
rm_ has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chomskiii has quit [Read error: Connection reset by peer]
diegoviola has quit [Quit: WeeChat 0.4.2]
brunops has quit [Ping timeout: 245 seconds]
jenskarlsen has left #ruby [#ruby]
phipes has joined #ruby
<centrx> Azulinho, I think OptionParser is the standard
<benzrf> i kinda wanna write an obfuscated jarh
Oog has joined #ruby
<benzrf> but my only real idea seems kinda infeasible
chomskiii has joined #ruby
Txandy|away is now known as Txandy
<Oog> if my function does yield in a begin/rescue blog the rescue should capture an exception in the yield right?
agent_white has joined #ruby
breakingthings has quit []
<Azulinho> yeah, I keep generating more lines of code with OptionParser than the app code itself.
<Azulinho> that annoys me
chuck54 has quit [Remote host closed the connection]
tongcx has left #ruby [#ruby]
boboc has joined #ruby
F1skr has quit [Ping timeout: 248 seconds]
<bnagy> Azulinho: I switched to trollop years ago and never switched off
vlad_starkov has quit [Remote host closed the connection]
RoxasShadowRS has quit [Read error: Connection reset by peer]
<Azulinho> going to look into it
tauebel has quit [Quit: Leaving.]
RoxasShadowRS has joined #ruby
<bnagy> Oog: yes
max96at has quit [Quit: Textual IRC Client: www.textualapp.com]
SiliconG has joined #ruby
shadoi has quit [Quit: Leaving.]
SiliconG has quit [Max SendQ exceeded]
zachallett has quit [Remote host closed the connection]
linojon has quit [Quit: linojon]
SiliconG has joined #ruby
SiliconG has quit [Max SendQ exceeded]
krz has joined #ruby
SiliconG has joined #ruby
SiliconG has quit [Max SendQ exceeded]
shadoi has joined #ruby
jackneill has quit [Quit: WeeChat 0.4.1]
boboc has quit [Ping timeout: 252 seconds]
bricker_ has joined #ruby
RichardRaseley has joined #ruby
charliesome has joined #ruby
DaniG2k has joined #ruby
bricker_ has quit [Client Quit]
roolo has joined #ruby
bklane has joined #ruby
tauebel has joined #ruby
<RichardRaseley> I downloaded and installed Ruby 1.9.3p484, but my system (CentOS 6.5 x86_64) already had Ruby 1.8.7 installed. The former is in /usr/local/bin while the later is in /usr/bin. When I sudo something it refers to the /usr/bin (old) version, but when I don't it doesn't. What is the proper way to remove the old Ruby version and remove all references to it?
alvaro_o has joined #ruby
<shevy> RichardRaseley can you also do echo $PATH and show which one comes first
<DaniG2k> RichardRaseley: you should install it with RVM or something
<RichardRaseley> shevy: /usr/local/bin
bricker has quit [Ping timeout: 252 seconds]
<shevy> RichardRaseley that one comes first?
<RichardRaseley> shevy: Yes.
<shevy> hmm
mojjojo has quit [Quit: mojjojo]
<shevy> on my system /usr/bin is arranged before /usr/local/bin
Shidash has quit [Ping timeout: 245 seconds]
alvaro_o has quit [Read error: Connection reset by peer]
<shevy> RichardRaseley you could try to reshuffle $PATH and run again, "ruby -v" should at least tell you that it changed. also run "gem env"
<shevy> in both cases and compare the output
<shevy> you can remove the old version and put a symlink to the removed bin/ruby to the still existing one btw
magoo_ has quit [Quit: WeeChat 0.4.2]
Jonah11_ has quit [Read error: Connection reset by peer]
<shevy> some distributions are crazy though
F1skr has joined #ruby
alvaro_o has joined #ruby
<shevy> like put stuff into /usr/lib/ruby, and /usr/local/bin/ruby (!!!)
venkat has joined #ruby
<RichardRaseley> shevy: So, just modify my user's path to ensure that /usr/local/bin/ruby comes first (the new version)?
Jonah11_ has joined #ruby
<RichardRaseley> Well, that seems to be the case here - on CentOS.
<bklane> If I'm trying to store data where it each date has a unique value would a hash be alright? Just unsure how they deal at larger sizes, (hundreds of keys)?
<shevy> RichardRaseley yes that should work from my experience
<RichardRaseley> shevy: But /usr/local/bin already comes first. =X
Jdubs has joined #ruby
<shevy> RichardRaseley why does sudo pick up /usr/bin first then?
<RichardRaseley> Can I just delete the old version from /usr/bin and symlink to the new one like you suggested?
<bnagy> RichardRaseley: user path is not the same as root path
Neomex1 has quit [Quit: Neomex1]
<RichardRaseley> Yes - sudo echo $PATH shows the same layout
<bnagy> that is not the same thing
Txandy has quit [Quit: Leaving...]
zigomir has quit []
<RichardRaseley> Regular: /usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/user/bin
<shevy> RichardRaseley yes, the symlink should work fine. you could make a directory /Backup/ and move the old ruby there
<shevy> RichardRaseley perhaps the superuser has /usr/bin first
<bnagy> anyway, you can symlink it in, but if you're going to do that why not just build from source and install with a --prefix
mikecmpbll has quit [Quit: i've nodded off.]
<RichardRaseley> I did built it from source. I am not sure which --prefix you are referring to...
<bnagy> with eg perl that would be horribly dangerous, but I doubt centos has any vital system scripts that require ruby, let alone ruby 1.8
<shevy> there is always a --prefix. if you omit it, it simply defaults to --prefix=/usr/local
Davey_ is now known as Davey
<RichardRaseley> Ah
<bnagy> cause otherwise you risk getting mismatched versions of other stuff, like gem, and then you'll go crazy
<shevy> you will go crazy RichardRaseley!!!
lkba has quit [Ping timeout: 245 seconds]
<RichardRaseley> Not a long trip
<shevy> RichardRaseley do "gem --version" too btw
<bnagy> bklane: if you need fast lookup use a Hash, if you don't care then use an Array
<RichardRaseley> It usr/local/lib/ruby/1.9.1/yaml.rb:84:in `<top (required)>': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. 1.8.23
<shevy> my gem version is 2.1.11
<shevy> RichardRaseley yeah, annoying libyaml
aryaching has joined #ruby
<shevy> RichardRaseley, it is a tiny library. wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz, extract, compile with --prefix=/usr
tvw has joined #ruby
e^0_ has quit [Quit: WeeChat 0.4.1]
jmurray has quit [Quit: jmurray]
venkat has quit [Read error: Connection reset by peer]
danshultz has quit [Remote host closed the connection]
chomskiii has quit [Read error: Connection reset by peer]
<shevy> latest download of rubygems can be found: https://rubygems.org/pages/download
venkat has joined #ruby
<RichardRaseley> OK. Thank you.
danshultz has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.2]
chomskiii has joined #ruby
<shevy> the switch to 1.9.x was quite painful
ckinni has joined #ruby
agjacome has quit [Ping timeout: 248 seconds]
<shevy> encoding issues for all non-UTFers
linojon has joined #ruby
yalue has quit [Quit: Leaving]
mansi has quit [Remote host closed the connection]
pasties has joined #ruby
breakingthings has joined #ruby
mikepack_ has joined #ruby
jprovazn is now known as jprovazn_afk
jgrevich has joined #ruby
<shevy> I wonder why ruby has to be compiled when libyaml is missing
mansi has joined #ruby
<shevy> can't they put it into ext/yaml or something?
caveat- has joined #ruby
DaniG2k has quit [Quit: leaving]
<shevy> *recompiled
<bnagy> where do you draw the line?
<apeiros> shevy: can't you just install the gem?
<shevy> apeiros hmm
lmg_ has quit [Read error: No route to host]
danshultz has quit [Ping timeout: 272 seconds]
lmg_ has joined #ruby
<shevy> aaah
mikepack has quit [Ping timeout: 248 seconds]
adayzdone has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<shevy> it's in ext/psych I suppose
<shevy> and there is a gem for psych https://rubygems.org/gems/psych
francisfish has joined #ruby
<bklane> bnagy: someone said to look into binery trees?
mikepack_ has quit [Remote host closed the connection]
<shevy> Psych::VERSION # => "1.3.4"
<bklane> or nodes? unsure exactly how to implement and why one or the other?
sdwrage has joined #ruby
du3nd3 has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
figgleberry has joined #ruby
aryaching has quit [Ping timeout: 248 seconds]
blackmes1 has quit [Ping timeout: 245 seconds]
notjohn has quit [Quit: notjohn]
mojjojo has joined #ruby
burlyscudd has joined #ruby
<shevy> RichardRaseley so if my theory is right, you would not have to recompile ruby. after you installed libyaml, you should be able to go into ext/psych and run the extconf.rb file there to generate the Makefile
Bira has quit [Remote host closed the connection]
fedesilva has quit [Remote host closed the connection]
<shevy> where ext/psych should be in the extracted ruby tarball
<bnagy> bklane: 80% of the use of btree I have seen was in CS assignments, and 15% was overkill
<bnagy> what's the actual use case here?
<bklane> I have properties that have a different rate/availability per date
mojjojo has quit [Client Quit]
<bklane> and I track past dates so would break it down year/month/day maybe for a tree
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spider-mario has quit [Ping timeout: 245 seconds]
<bnagy> why not just have somedate => [property, property...
<bnagy> dates aren't very big, and the properties would all presumably be refs to some property obj
mikecmpbll has joined #ruby
<RichardRaseley> shevy: Here is what I did - removed the old ruby, symlinked to the new one installed libyaml-devel, redid the /.configure, make, make install. I still keep getting the error: It seems your ruby installation is missing psych (for YAML output).
<bnagy> I don't see how a tree does anything but make it slower
<bklane> bnagy: unsure how Hash's perform with hundreds of keys?
vlad_starkov has joined #ruby
<shevy> RichardRaseley libyaml-devel is a package from your distro right? that's not what I recommended. :) anyway, if you are sure you have installed libyaml, go into ext/psych and run the extconf.rb there
<bnagy> ...
du3nd3 has quit [Ping timeout: 272 seconds]
<bnagy> hundreds? Srsly. Lol.
<bklane> oh I'm doing thousands of properties and each date for them
mojjojo has joined #ruby
mengu has quit [Remote host closed the connection]
<LadyRainicorn> By hundreds, do you mean hundreds of millions?
<RichardRaseley> shevy: Sorry, just wanted to use my package manager as much as possible. =X
<shevy> a million rainbows LadyRainicorn, a million of them
<RichardRaseley> shevy: OK, makefile created.
<shevy> RichardRaseley right - why don't you let your package manager give you the latest ruby ;-)
<RichardRaseley> shevy: It gives me 1.8.7
<shevy> RichardRaseley yeah, your package manager sucks! try to run "make" now?
<RichardRaseley> shevy: :: shrugs ::
<bnagy> centos does actually have a package for nonretarded ruby
onewheelskyward has joined #ruby
<bklane> LadyRainicorn: bnagy: so I guess just keep it simple and work with the Hash. Only 8 months into coding so still learning around
<bnagy> it's just fiddly, afair
jkamenik has quit [Quit: Leaving.]
benzrf has left #ruby [#ruby]
<shevy> and then "make install" and it should work
intuxicated has joined #ruby
<shevy> do you guys prefer VERSION or Version?
<bnagy> VERSION
<apeiros> Version
<bnagy> ^5
<LadyRainicorn> VERSION
<agent_white> vERsIon
sparrovv has quit [Remote host closed the connection]
<apeiros> ^5
<centrx> vErSiOn
<shevy> hmmmmm
<shevy> no please
blackmes1 has joined #ruby
<shevy> centrx you are out!
<apeiros> I never use FULL_CAP constant names
<RichardRaseley> shevy: OK, the psych error is now gone. =]
vpretzel has quit [Quit: Adios!]
<LadyRainicorn> Ruby uses RUBY_VERSION.
<centrx> SERIOUS
<shevy> RichardRaseley \o\
ElComradio has quit [Quit: ElComradio]
<agent_white> centrx: i AgReE wItH yoU
<shevy> psych uses VERSION
mojjojo has quit [Client Quit]
<bnagy> constants should be SCREAMING_SNAKE, module names are Constants
<centrx> agent_white, I aM gLaD! WE wiLL ShoW thEse FOoLs!
<shevy> agent_white missed you before ... you are out together with centrx!
<RichardRaseley> shevy: Now if I could remember what I was doing before getting detoured... =P
<bnagy> so unless Version is a module, VERSION is the one true way and heretics will be burned
<LadyRainicorn> SCREAMING_SNAKE is an awesome constant.
<agent_white> centrx: :}
mojjojo has joined #ruby
<shevy> RichardRaseley pfft ruby works now, you can go back to watching youtube or idle on IRC
avo has joined #ruby
<bnagy> imvho
<LadyRainicorn> def VeRsIoN() "1.2.3"; end
avo has quit [Client Quit]
<shevy> apeiros, I found a dark secret! -> lib/butler/irc/socket.rb: VERSION = "1.0.0"
<shevy> LadyRainicorn ok it hurts me :( ... but you are out as well now!
phansch has quit [Quit: Leaving]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
<shevy> actually that is the worst so far... a mixed-case method...
lmg_ has quit [Ping timeout: 264 seconds]
<LadyRainicorn> NOOOOOOOOO
<bnagy> capitalized method names are the Future()
<shevy> right... Integer() ...
adayzdone has joined #ruby
<LadyRainicorn> VeRsIoN = "1.0.0"; def VeRsIoN() "1.2.3"; end
w4pm has quit [Ping timeout: 240 seconds]
frank____ has quit [Quit: Connection closed for inactivity]
<bnagy> >> VeRsIoN = "1.0.0"; def VeRsIoN() "1.2.3"; end; [VeRsIoN, VeRsIoN()] #rubby
<eval-in> bnagy => ["1.0.0", "1.2.3"] (https://eval.in/96521)
kaldreno_ has quit [Remote host closed the connection]
kedibasi has left #ruby [#ruby]
<Rylee> I leave for five minutes and come back to my favorite language being molested.
Soliah has quit [Quit: Soliah]
<bnagy> she started it
* LadyRainicorn fondles Ruby.
standyro2 has quit [Ping timeout: 272 seconds]
<Rylee> hot.
<Rylee> LadyRainicorn x Ruby.avi should be published soon.
maletor has quit [Quit: Computer has gone to sleep.]
matchaw_ has joined #ruby
Jdubs has quit [Remote host closed the connection]
failshel_ has joined #ruby
wildroman2 has joined #ruby
spider-mario has joined #ruby
maletor has joined #ruby
matchaw has quit [Ping timeout: 272 seconds]
deric_skibotn has quit [Ping timeout: 240 seconds]
chuck54 has joined #ruby
<shevy> Rylee I think it is a function of how many people are there
<shevy> the more people, the crazier :(
DaniG2k has joined #ruby
spider-mario has quit [Remote host closed the connection]
<DaniG2k> I am getting this weird error on my mac: dyld: lazy symbol binding failed: Symbol not found: _rb_ary_new_from_args
dkamioka has joined #ruby
chuck54 has left #ruby [#ruby]
mikecmpbll has quit [Quit: i've nodded off.]
<DaniG2k> I think it has to do with the fact that the ruby verison in the system (/usr/bin/ruby) is 2.0 but
Deele has quit [Ping timeout: 260 seconds]
<DaniG2k> I also have 2.1 which I got through RVM
Jdubs has joined #ruby
<DaniG2k> what's the correct way of using RVM's version?
failshell has quit [Ping timeout: 260 seconds]
<bnagy> luck?
havenwood has joined #ruby
zachallett has joined #ruby
<LadyRainicorn> Load RVM and use Ruby.
failshel_ has quit [Ping timeout: 245 seconds]
adayzdone has quit [Ping timeout: 245 seconds]
figglebe_ has joined #ruby
deric_skibotn has joined #ruby
gmci has joined #ruby
wildroman2 has quit [Ping timeout: 272 seconds]
figgleberry has quit [Ping timeout: 248 seconds]
<DaniG2k> rvm gemset list
<DaniG2k> oops
mansi has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
Virtualize|away has quit [Quit: Leaving...]
Vitor_ has quit [Remote host closed the connection]
jgrevich has quit [Quit: jgrevich]
yfeldblum has joined #ruby
mikecmpbll has joined #ruby
nateberkopec has quit [Quit: Leaving...]
mary5030 has quit [Ping timeout: 245 seconds]
jgrevich has joined #ruby
Advocation has quit [Quit: Advocation]
breakingthings has quit []
<centrx> rVm
Bira has joined #ruby
<ddd> rvm use 2.1.0-p0@gemsetname #as the site shows. Replace what i showed with what you named your gemset
yfeldblu_ has joined #ruby
<ddd> if you want to make it the default just add the --default flag
ozzloy has quit [Ping timeout: 248 seconds]
Bira has quit [Client Quit]
<ddd> if the gemset does not already exist add --create, if the ruby is not already installed add --install
<ddd> see rvm help for a lot more info
nanoyak has quit [Quit: Computer has gone to sleep.]
<apeiros> shevy: nothing dark about it
deric_skibotn has left #ruby [#ruby]
<apeiros> shevy: I think in butler I also still used tabs for indent
hiall__ has quit [Quit: hiall__]
ebetancourt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matchaw has joined #ruby
petey has quit [Remote host closed the connection]
breakingthings has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
sparrovv has joined #ruby
petey has joined #ruby
matchaw_ has quit [Ping timeout: 260 seconds]
hobodave has quit [Ping timeout: 272 seconds]
lfox has quit [Quit: ZZZzzz…]
fenicks has quit [Remote host closed the connection]
yekta has quit [Quit: yekta]
petey_ has joined #ruby
petey has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
francisfish has quit [Remote host closed the connection]
thesheff17 has quit [Ping timeout: 245 seconds]
shadoi has quit [Quit: Leaving.]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
EngierkO has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bigkevmcd has joined #ruby
carlyle has quit [Remote host closed the connection]
Megtastique has quit []
<shevy> hehe
w4pm has joined #ruby
dblessing has quit [Quit: dblessing]
vlad_starkov has quit [Read error: Connection reset by peer]
rootshift has joined #ruby
momomomomo has joined #ruby
nanoyak has joined #ruby
xcv has quit [Remote host closed the connection]
meatherl_ has quit [Remote host closed the connection]
ozzloy has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
rootshift has quit [Client Quit]
meatherly has joined #ruby
Azulinho has quit [Quit: Leaving]
ndrei has quit [Ping timeout: 248 seconds]
rm_ has quit [Remote host closed the connection]
danshultz has joined #ruby
momomomomo has quit [Client Quit]
senj has quit [Quit: Sleep Now]
Mattx has quit [Ping timeout: 272 seconds]
octoberry has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 252 seconds]
digifiv5e has quit [Quit: quit]
musl has quit [Quit: WeeChat 0.4.1]
LuvLinuxOS has joined #ruby
musl has joined #ruby
Celm has quit [Remote host closed the connection]
musl has quit [Client Quit]
habhooB has quit [Remote host closed the connection]
rm_ has joined #ruby
senayar_ has quit []
|RicharD| has quit [Quit: Sto andando via]
danshult_ has joined #ruby
petey_ has quit [Remote host closed the connection]
brian___ has quit [Quit: brian___]
davy_ has joined #ruby
standyro2 has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
nanoyak has quit [Quit: Computer has gone to sleep.]
petey has joined #ruby
nanoyak has joined #ruby
wald0 has quit [Quit: leaving]
thesheff17 has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
nycjv321 has joined #ruby
<nycjv321> anyone use Roo?
<nycjv321> It doesn't seem to be reading values past row 1.
<nycjv321> nvm
MrZYX is now known as MrZYX|off
shvelo has quit [Ping timeout: 252 seconds]
Kruppe has quit [Max SendQ exceeded]
m8 has quit [Quit: Sto andando via]
Sami345 has quit [Remote host closed the connection]
breakingthings has quit []
davy_ has quit [Remote host closed the connection]
petey_ has joined #ruby
havenwood has quit [Remote host closed the connection]
petey has quit [Read error: Connection reset by peer]
recurrence has joined #ruby
Kruppe has joined #ruby
dx7 has quit [Remote host closed the connection]
jprovazn_afk has quit [Quit: Odcházím]
burlyscudd has quit [Quit: Leaving.]
dkamioka has quit [Remote host closed the connection]
VesQ has quit [Ping timeout: 246 seconds]
jgrevich has quit [Quit: jgrevich]
koaps has quit [Quit: leaving]
freerobby has quit [Quit: Leaving.]
F1skr has joined #ruby
chomskiii has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
chomskiii has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
deception has quit [Quit: Goodbye]
mansi has joined #ruby
mlpinit has quit [Quit: Leaving...]
aryaching has joined #ruby
danshult_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
danshultz has joined #ruby
nobitanobi has joined #ruby
yfeldblum has quit [Remote host closed the connection]
snath has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
linojon has quit [Quit: linojon]
mansi has quit [Remote host closed the connection]
charliesome has joined #ruby
roolo has quit [Quit: Leaving...]
s2013 has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Remote host closed the connection]
nonnatus has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sailias has quit [Quit: Leaving.]
claymore has quit [Quit: Leaving]
Celm has joined #ruby
RaCx_ has joined #ruby
danshultz has quit [Ping timeout: 252 seconds]
RaCx has quit [Ping timeout: 240 seconds]
RaCx_ is now known as RaCx
Mattx has joined #ruby
xiphias_ has quit [Ping timeout: 265 seconds]
Mattx has quit [Changing host]
Mattx has joined #ruby
yasushi_ has joined #ruby
workmad3 has joined #ruby
xiphias has joined #ruby
xiphias has quit [Changing host]
xiphias has joined #ruby
ffranz has quit [Quit: Leaving]
mansi has quit [Ping timeout: 252 seconds]
chomskiii has quit [Read error: Connection reset by peer]
no0code has joined #ruby
<no0code> hello
snath has joined #ruby
chomskiii has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has quit [Quit: Quitting]
havenwood has joined #ruby
Wolland has quit [Remote host closed the connection]
maletor_ has joined #ruby
maletor has quit [Ping timeout: 248 seconds]
recurrence has quit [Ping timeout: 272 seconds]
v0n has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
duggiefresh has quit [Remote host closed the connection]
octoberry has quit [Ping timeout: 240 seconds]
<centrx> Ahoy
heftig has joined #ruby
DaniG2k has quit [Ping timeout: 245 seconds]
<nycjv321> hmm after changing my code Roo still is not working :/
geggam has quit [Remote host closed the connection]
iceden has quit [Read error: Connection reset by peer]
mojjojo has quit [Quit: mojjojo]
figglebe_ has quit [Ping timeout: 252 seconds]
fveillette has quit [Ping timeout: 240 seconds]
mojjojo has joined #ruby
duggiefresh has joined #ruby
joshu_ has joined #ruby
maletor has joined #ruby
ctp has joined #ruby
<shevy> nycjv321 it's broken!
<shevy> bug ridden! a sign of not using it!
<shevy> ROTTEN RUBY SOFTWARE
joshu has quit [Ping timeout: 245 seconds]
<nycjv321> shevy: really?
<shevy> nycjv321 not sure, it has been a few years since I last tried to use spreadsheet related things with ruby
<shevy> I was more of a noob back then
joshu_ has quit [Client Quit]
<shevy> and it did not work back then either
<shevy> so now as I am less of a noob, perhaps I would have more chances to succeed
<shevy> or, I would have to go down your path and Roo would not work still
resno has joined #ruby
<shevy> which would reveal that it STINKS
* resno yawns
maletor_ has quit [Ping timeout: 265 seconds]
mikeg has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
ElComradio has joined #ruby
nonnatus has joined #ruby
duggiefresh has quit [Ping timeout: 248 seconds]
silentpost has quit [Quit: silentpost]
digifiv5e has joined #ruby
bricker has joined #ruby
nanoyak has joined #ruby
Amart41 has quit [Remote host closed the connection]
digifiv5e is now known as Guest16097
musl has joined #ruby
musl has quit [Client Quit]
Hanmac1 has joined #ruby
Amart41 has joined #ruby
mikeg has quit [Client Quit]
aryaching_ has joined #ruby
musl has joined #ruby
musl has quit [Remote host closed the connection]
wald0 has joined #ruby
musl has joined #ruby
<nycjv321> shevy: I think I got it working
<shevy> how
<nycjv321> nvm
* nycjv321 is sad Roo doesn't work as a library.
lifestream has joined #ruby
<shevy> hehe
<shevy> well
<shevy> last update December 2013
SHyx0rmZ has joined #ruby
<shevy> so it is still active
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
Hanmac has quit [Ping timeout: 260 seconds]
rootshift has joined #ruby
duggiefresh has joined #ruby
burlyscudd has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
figgleberry has joined #ruby
brunops has joined #ruby
lifestream has left #ruby [#ruby]
Amart41 has quit [Ping timeout: 252 seconds]
chrisramon has joined #ruby
Oog has quit [Read error: Connection reset by peer]
nateberkopec has quit [Quit: Leaving...]
musl has quit [Quit: WeeChat 0.4.3-dev]
mansi has joined #ruby
Jetchisel has joined #ruby
Jdubs has quit [Remote host closed the connection]
Naoe-Kanno has joined #ruby
nobitanobi has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
mklappst_ has joined #ruby
iceden has joined #ruby
nobitanobi has joined #ruby
SHyx0rmZ has quit [Ping timeout: 272 seconds]
yfeldblu_ has joined #ruby
Jdubs has joined #ruby
petey_ has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 272 seconds]
petey has joined #ruby
[gmi] has quit [Read error: Connection reset by peer]
musl has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
cbetta_afk is now known as cbetta
Astralum has quit [Quit: Leaving]
pskosinski has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
Kricir_ has joined #ruby
zachallett has quit [Remote host closed the connection]
Kricir_ has quit [Remote host closed the connection]
rm_ has quit [Read error: Connection reset by peer]
Solnse has joined #ruby
rm_ has joined #ruby
petey has quit [Ping timeout: 252 seconds]
robbyoconnor has quit [Quit: Konversation terminated!]
jgrevich has joined #ruby
silentpost has joined #ruby
<nycjv321> shevy: I switched to another library and it works
Kricir has quit [Ping timeout: 248 seconds]
<nycjv321> shevy: funny enough is that other gem supposedly uses this library that I'm now using.. but it doesn't work.. :(
Eiam has quit [Ping timeout: 260 seconds]
daxroc has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
zipper{-_-} has quit [Read error: Operation timed out]
joshu has joined #ruby
duggiefresh has joined #ruby
lkba has joined #ruby
duggiefr_ has joined #ruby
DaniG2k has joined #ruby
Pixels_ has joined #ruby
Pixels has quit [Quit: :tiuQ]
Pixels_ is now known as Pixels
<RichardRaseley> I am writing a basic app with sinatra, when I run this code: https://gist.github.com/richardraseley/8722665 the server starts up and is queryable at the /images route, but the output I get is just a string, not the json that I am expecting. Am I not able to convert a hash to json in the way I am attempting?
mary5030 has joined #ruby
parzo has joined #ruby
Celm has quit [Remote host closed the connection]
<dorei> json is string
<dorei> what string does it output?
duggiefresh has quit [Ping timeout: 265 seconds]
<dorei> hmm
<dorei> and i dont think you should use print
<dorei> u should return the whole string at the end of your method
DaniG2k has quit [Ping timeout: 252 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
chrisramon has quit [Quit: chrisramon]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<RichardRaseley> "/home/user/packer-resources/images/centos-65-minimal-x86_64.iso" is the string it returns, which is the one file in the directory. I am expecting {"images": "/home/user/packer-resources/images/centos-65-minimal-x86_64.iso"}
xcv has joined #ruby
blandflakes has quit [Quit: Page closed]
b00stfr3ak has quit [Quit: leaving]
zipper{-_-} has joined #ruby
<RichardRaseley> Or "{"images": ["/home/user/packer-resources/images/centos-65-minimal-x86_64.iso" ] }" rather.
<havenwood> RichardRaseley: puts `content_type :json` at the top of the method, and call #to_json on what you're returning from the method
<dorei> RichardRaseley: okie, try returning the string you wish
<havenwood> put*
Celm has joined #ruby
tauebel has quit [Quit: Leaving.]
<dorei> RichardRaseley: i think print, puts, etc will print messages to your console/system, not on the web page
cbetta is now known as cbetta_afk