apeiros changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blue_deref has joined #ruby
northfurr has quit [Quit: northfurr]
user1138 has joined #ruby
lannonbr has joined #ruby
rubie has joined #ruby
northfurr has joined #ruby
clarkenciel has quit [Ping timeout: 272 seconds]
paulcsmith has quit [Quit: Be back later ...]
jackjackdripper has quit [Quit: Leaving.]
paulcsmith has joined #ruby
frozen3 has joined #ruby
hololeap has quit [Ping timeout: 250 seconds]
Me has joined #ruby
Me is now known as VeganGreg
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
framling has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
mleung has quit [Quit: mleung]
juanpablo__ has joined #ruby
tmtwd has quit [Ping timeout: 245 seconds]
northfurr has quit [Quit: northfurr]
bruno- has joined #ruby
juanpablo__ has quit [Ping timeout: 246 seconds]
renderful has quit [Remote host closed the connection]
zendrix_ has quit []
renderful has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
atomical has joined #ruby
icarus has quit [Quit: Lost terminal]
Vile` has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
iamninja has quit [Ping timeout: 246 seconds]
frozen3 has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
Vile` has joined #ruby
Chau has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
casadei_ has joined #ruby
Nieralyte has quit [Quit: Nieralyte]
Rickmasta has joined #ruby
bodie__ has joined #ruby
_seanc_ has joined #ruby
workmad3 has joined #ruby
Oog has quit []
mondo has quit [Ping timeout: 240 seconds]
bodie_ has quit [Ping timeout: 240 seconds]
bodie__ is now known as bodie_
<baweaver> pontiki - I'll let you know what I find out on it.
Yzguy has quit [Quit: Zzz...]
Torrieri has quit [Quit: Be back later ...]
Oog has joined #ruby
<baweaver> would pm, but you have that turned off.
Oog has quit [Client Quit]
dr3w has joined #ruby
keen____ has joined #ruby
jpfuente_ has quit [Read error: Connection reset by peer]
tubulife- has quit [Ping timeout: 240 seconds]
yh has quit [Ping timeout: 260 seconds]
jpfuentes2 has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
dopamean_ has joined #ruby
marr has quit [Ping timeout: 245 seconds]
rehat has joined #ruby
<hays> hey im trying to use http://www.rubydoc.info/gems/rmodbus/ModBus/TCPClient such that i can have mutiple threads access the connection, but still have the connection itself gracefully fail and try to re-establish. i've no idea how to actually do this.. can someone point me in the right direction
oo_ has joined #ruby
keen___ has quit [Ping timeout: 264 seconds]
Oog has joined #ruby
saddad has quit [Ping timeout: 260 seconds]
dr3w has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
oo_ has joined #ruby
dr3w has joined #ruby
Oog has quit [Client Quit]
jobewan has joined #ruby
<hays> right now if the connection fails it raises an exception
jhack has quit [Ping timeout: 244 seconds]
<hays> so you can write a do loop that catches the connection and re-establishes
<drbrain> hays: to start, you have mutual exclusion around access to the connection, right?
podman has quit [Quit: Connection closed for inactivity]
<drbrain> but for your original question, you'll need to add an accessor that rescues the failure, re-establishes the connection, then retries
<drbrain> ruby has syntax for that part:
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drbrain> begin; try_to_send_a_thing; rescue ConnectionFailure; re_establish_connection; retry; end
<drbrain> you'll want a counter around retries
<hays> drbrain: yeah i think ive figured out the semaphore part
Musashi007 has joined #ruby
timanema has joined #ruby
lucyinthesky has joined #ruby
<hays> so the accessor will be what catches the exception ok
<drbrain> yeah, s/accessor/method that accesses the socket
<hays> is "cl" the socket
lucyinthesky has left #ruby ["Leaving"]
bricker has quit [Quit: leaving]
<drbrain> cl?
<hays> in the example code
_seanc_ has quit [Quit: _seanc_]
<drbrain> oh, yes
<hays> TCPClient.connect('127.0.0.1', 502) do |cl|
_seanc_ has joined #ruby
s2013 has joined #ruby
<hays> so that socket is a private member basically
<drbrain> I suppose they use it as short for "client" in this example
<drbrain> you can usually operate without the block as well
<hays> and i control access by whenever i access it, wrap it in a mutex and catch the exceptions to reattempt connection
<drbrain> but I didn't read the source
<drbrain> yes
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hays> cool. makes sense. i will try that
troyready has quit [Remote host closed the connection]
ivanf has quit [Ping timeout: 256 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lwu has quit [Ping timeout: 245 seconds]
lwu has joined #ruby
RegulationD has joined #ruby
ivanf has joined #ruby
lannonbr has quit [Ping timeout: 246 seconds]
dr3w has quit [Ping timeout: 246 seconds]
cgrieger^away has quit [Ping timeout: 256 seconds]
oo_ has quit [Read error: Connection reset by peer]
oo__ has joined #ruby
crazydiamond has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
speakingcode has quit [Ping timeout: 260 seconds]
speakingcode has joined #ruby
baweaver has quit [Remote host closed the connection]
howdoico1 has joined #ruby
uwa667 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 252 seconds]
j3r0 has quit [Ping timeout: 260 seconds]
Zamyatin has joined #ruby
cgrieger^away has joined #ruby
psayian has joined #ruby
foureight84 has joined #ruby
michaeldeol has joined #ruby
<psayian> Anyone have any books the recommend for a beginner learning ruby.
zanloy has quit [Quit: Leaving]
Feyn has joined #ruby
howdoico1 has quit [Ping timeout: 255 seconds]
lannonbr has joined #ruby
Pupeno has joined #ruby
saddad has joined #ruby
<hays> psayian: shrug i've kinda discovered that books aren't really ruby's thing
<hays> there's the programming ruby book that is online
<psayian> hays: How do you suggestgoing about it, I am a book person. I prefer them over videos
<psayian> hays: Do you have a link for that? I heard eloquent ruby was good.
atomical has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
Pupeno_ has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
Chau has joined #ruby
phutchins has quit [Ping timeout: 250 seconds]
phutchins1 has quit [Ping timeout: 260 seconds]
Chau has quit [Max SendQ exceeded]
rbowlby__ has quit [Remote host closed the connection]
Pupeno_ has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
maletor has quit []
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
atomical has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
Pupeno has joined #ruby
coban2k has joined #ruby
banister has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
rubie has quit [Remote host closed the connection]
scripore has joined #ruby
rubie has joined #ruby
blarghlarghl has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
<blarghlarghl> Hi all. I got a question about rake and tests. I have a heroku app and a scheduled heroku task, 'rake refresh'. My rakefile also includes "RSpec::Core::RakeTask.new(:spec)", with the require 'rspec/core/rake_task' as well. However running this Rakefile dies in production since the require dies - since rspec is not in the production Gemfile group.
<blarghlarghl> So, how do I write my Rakefile so that it doesn't choke on the require?
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
mary5030 has joined #ruby
rubie has quit [Read error: Connection reset by peer]
arta82 has quit [Quit: Textual IRC Client: www.textualapp.com]
rubie has joined #ruby
BrazenBraden has quit [Quit: Leaving]
rubie has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 256 seconds]
<nofxx> blarghlarghl, guess you'll need some sort of env var to check... `if ENV['production']`
juanpablo__ has joined #ruby
pragmatism has joined #ruby
rubie has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pyon has quit [Ping timeout: 260 seconds]
rubie has quit [Read error: Connection reset by peer]
<nofxx> any idea what kinda of voodoo these strings might be encoded if? https://gist.github.com/nofxx/1da8cd45c2fbcb62c194
rubie has joined #ruby
<blarghlarghl> nofxx: So there's no way to create a rake test task using the task :spec do syntax?
<nofxx> with/if
<blarghlarghl> nofxx: Then I could put the require in the task :spec block, and be done ith it
rubie has quit [Read error: Connection reset by peer]
<blarghlarghl> with*
rubie has joined #ruby
dr3w has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
sarkyniin has quit [Remote host closed the connection]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
<hays> im surprised that 1/3 in ruby evaluates to 0
rubie has quit [Read error: Connection reset by peer]
<hays> and not some infinite precistion 1/3 thing
<blarghlarghl> hays: 1/3.0
rubie has joined #ruby
<hays> yeah that feels so C
juanpablo__ has quit [Ping timeout: 265 seconds]
gwendall has quit [Ping timeout: 264 seconds]
rubie has quit [Read error: Connection reset by peer]
<Ox0dea> hays: Why is that bad?
rubie has joined #ruby
<Ox0dea> >> require 'mathn'; 1 / 3 # hays
<Mon_Ouie> 1/3r evaluates to what you want
<ruboto> Ox0dea # => (1/3) (https://eval.in/416516)
pdoherty has joined #ruby
rubie has quit [Read error: Connection reset by peer]
frozen3 has joined #ruby
<Ox0dea> nofxx: Do you promise that these mysterious strings are not of your making?
rubie has joined #ruby
tkuchiki has joined #ruby
framling has joined #ruby
<hays> Ox0dea: not really bad, its a language wart im well used to
rubie has quit [Read error: Connection reset by peer]
<Ox0dea> Why do you consider it a wart, though?
rubie has joined #ruby
pyon has joined #ruby
<hays> it requires awareness of integers vs. floats
<Ox0dea> Onoes!
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
<hays> and its a lot of implicit casting to just get a fraction. but i get it. no real clean solution without swallowing the infinite precision baby whole
<Ox0dea> What casting?
rubie_ has quit [Read error: Connection reset by peer]
<hays> im really just surprised. not in a bad way at all
rubie has joined #ruby
<hays> well ruby's version of casting anyway
rubie has quit [Read error: Connection reset by peer]
swgillespie has joined #ruby
rubie_ has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
<Ox0dea> Ruby provides as complete a numerical tower as any other language; you're bickering about syntax without realizing it, I think.
rubie has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
<hays> im really just surprised
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
northfurr has quit [Client Quit]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
bustrarm has joined #ruby
<Ox0dea> In any case, here's something I think Ruby really does get wrong:
<Ox0dea> >> 'xaxbx'.split('x')
<ruboto> Ox0dea # => ["", "a", "b"] (https://eval.in/416519)
segmond has quit [Disconnected by services]
seggy is now known as segmond
<Ox0dea> Why keep the initial empty string, but not the last?
rubie has quit [Read error: Connection reset by peer]
seggy has joined #ruby
rubie has joined #ruby
Hal_9000_ has joined #ruby
<Ox0dea> >> "a \n b".split(' ') # also "wrong"
<ruboto> Ox0dea # => ["a", "b"] (https://eval.in/416520)
Pupeno has quit [Ping timeout: 256 seconds]
shmilan has joined #ruby
<hays> >>'axbx'.split('x')
<ruboto> hays # => ["a", "b"] (https://eval.in/416521)
rubie has quit [Read error: Connection reset by peer]
bstrarm has joined #ruby
FernandoBasso has quit [Quit: May the force be with you.]
Pupeno has joined #ruby
rubie has joined #ruby
<hays> >>'axbxx'.split('x')
<ruboto> hays # => ["a", "b"] (https://eval.in/416522)
busterarm has quit [Ping timeout: 244 seconds]
<Ox0dea> Wow, this language a shit.
<hays> it seems to chomp it
rubie has quit [Read error: Connection reset by peer]
gwendall has joined #ruby
rubie has joined #ruby
duderonomy has joined #ruby
rubie has quit [Read error: Connection reset by peer]
gambl0re has joined #ruby
rubie has joined #ruby
northfurr has joined #ruby
Pupeno_ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Read error: Connection reset by peer]
bstrrm has joined #ruby
bustrarm has quit [Ping timeout: 265 seconds]
rubie has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 246 seconds]
bstrarm has quit [Ping timeout: 240 seconds]
<hays> >>"xaxbx.split('x',-1)
rubie_ has quit [Read error: Connection reset by peer]
beefcakeba has joined #ruby
<ruboto> hays # => /tmp/execpad-8732af49fe3b/source-8732af49fe3b:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/416523)
<hays> >>"xaxbx".split('x',-1)
<ruboto> hays # => ["", "a", "b", ""] (https://eval.in/416524)
rubie has joined #ruby
Pupeno has joined #ruby
rubie has quit [Read error: Connection reset by peer]
NeverDie has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno_ has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
rubie has quit [Read error: Connection reset by peer]
tmtwd has joined #ruby
rubie has joined #ruby
bstrrm has quit [Ping timeout: 246 seconds]
babyarm has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
NeverDie has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
beefcakeba has quit [Ping timeout: 252 seconds]
tubulife- has joined #ruby
rubie has joined #ruby
godzillaenlacasa has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
<shevy> Ox0dea!
<shevy> you are back
<Ox0dea> I'm back!
nhhagen has quit [Ping timeout: 240 seconds]
rubie_ has quit [Read error: Connection reset by peer]
busterarm has joined #ruby
rubie has joined #ruby
surfs^ has joined #ruby
s2013 has joined #ruby
rubie has quit [Read error: Connection reset by peer]
towski_ has quit [Remote host closed the connection]
rubie has joined #ruby
Pupeno has quit [Ping timeout: 256 seconds]
blarghlarghl has left #ruby [#ruby]
rubie has quit [Read error: Connection reset by peer]
babyarm has quit [Ping timeout: 250 seconds]
rubie has joined #ruby
radgeRayden_ has joined #ruby
Yzguy has joined #ruby
rubie has quit [Read error: Connection reset by peer]
bustrarm has joined #ruby
rubie has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
shmilan has quit [Ping timeout: 244 seconds]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
busterarm has quit [Ping timeout: 246 seconds]
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
shmilan has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
rubie has joined #ruby
bstrarm has joined #ruby
rubie has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
rubie has joined #ruby
bustrarm has quit [Ping timeout: 250 seconds]
rubie has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
rubie has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
scripore has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
rubie has joined #ruby
phutchins has joined #ruby
<Ox0dea> shevy: Did you see this craziness? https://github.com/ruby/ruby/commit/d311b7
bstrarm is now known as busterarm
Rickmasta has joined #ruby
rubie has quit [Read error: Connection reset by peer]
zenspider has joined #ruby
rubie has joined #ruby
phutchins1 has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
northfurr has quit [Quit: northfurr]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubie has joined #ruby
Pupeno has quit [Ping timeout: 256 seconds]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
mleung has joined #ruby
rubie has quit [Read error: Connection reset by peer]
ivanskie has joined #ruby
<miah> interesting
rubie has joined #ruby
ivanskie has quit [Client Quit]
rubie has quit [Read error: Connection reset by peer]
Ox0dea has quit [Read error: No route to host]
rubie has joined #ruby
Cache_Money has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ox0dea has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
basmoura has joined #ruby
busterarm has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
busterarm has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno has quit [Read error: Connection reset by peer]
rubie_ has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
mleung has quit [Client Quit]
rubie has joined #ruby
jtdowney has quit [Remote host closed the connection]
rubie has quit [Read error: Connection reset by peer]
foureight84 has quit [Quit: Be back later ...]
rubie has joined #ruby
jtdowney has joined #ruby
rubie has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
rubie has joined #ruby
carlosoliveira has joined #ruby
postmodern has quit [Quit: Leaving]
rubie has quit [Read error: Connection reset by peer]
gwendall has quit []
rubie has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno_ has joined #ruby
rubie has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 246 seconds]
neruda has joined #ruby
rubie has quit [Read error: Connection reset by peer]
<neruda> hi, any rails gurus that can help with strong_parameters issue would be greatly appreciated: https://gist.github.com/anonymous/6b2211c4fbc1830fa472
rubie has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
avahey has joined #ruby
rubie has joined #ruby
oo__ has quit [Remote host closed the connection]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
<shevy> Ox0dea I don't quite understand this
rubie has quit [Read error: Connection reset by peer]
<Ox0dea> shevy: No, nor I.
rubie has joined #ruby
<shevy> lol
Pupeno_ has quit [Ping timeout: 256 seconds]
<Ox0dea> ~ $ cat wtf.rb && ruby wtf.rb
rubie has quit [Read error: Connection reset by peer]
<Ox0dea> class C D E end
<Ox0dea> wtf.rb:1:in `<class:C>': uninitialized constant C::E (NameError)
<shevy> I don't think I have even found all new things in ruby 2.2.2p95 yet
<Ox0dea> What even?
rubie has joined #ruby
<Ox0dea> I suppose nobu had ample reason to mark it EXPERIMENTAL.
rubie has quit [Read error: Connection reset by peer]
<Ox0dea> Still, I'm not even sure what he's really going for.
rubie has joined #ruby
<shevy> probably something strange
<shevy> the japanese dudes can use the dark side of the brain
<Ox0dea> What does "optional superclass" even mean, though?
rubie has quit [Read error: Connection reset by peer]
<shevy> perhaps it may or may not have one
rubie has joined #ruby
<shevy> sometimes it has one
<shevy> sometimes it don't
<shevy> and you never know beforehand!
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhack has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
rubie has quit [Read error: Connection reset by peer]
jhack has quit [Changing host]
jhack has joined #ruby
VeganGreg has left #ruby ["WeeChat 1.2"]
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rakm has joined #ruby
rubie has joined #ruby
rubie has quit [Remote host closed the connection]
rbennacer has joined #ruby
rubie has joined #ruby
Pupeno has joined #ruby
rubie has quit [Read error: Connection reset by peer]
chouhoulis has quit [Remote host closed the connection]
rubie has joined #ruby
Ropeney has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
tubulife- has quit [Ping timeout: 244 seconds]
rakm has quit [Client Quit]
phutchins1 has quit [Ping timeout: 245 seconds]
rubie_ has quit [Read error: Connection reset by peer]
phutchins has quit [Ping timeout: 260 seconds]
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
<Mon_Ouie> I I think he's just make the semicolon optional, class C something end becomes the same as class C; something; end
Pupeno has quit [Ping timeout: 256 seconds]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
sevenseacat has joined #ruby
rubie has quit [Read error: Connection reset by peer]
frozen3 has quit [Remote host closed the connection]
oo_ has joined #ruby
_seanc_ has quit [Quit: _seanc_]
rubie has joined #ruby
<shevy> aha
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
ivanskie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
<Ox0dea> Mon_Ouie: What do you suppose is the rationale?
<Ox0dea> Why not also do it for `module` and `def`, for instance?
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
iamninja has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
Pupeno has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rideh has joined #ruby
rubie has joined #ruby
workmad3 has joined #ruby
<Mon_Ouie> No idea, maybe there's some related discussion on a mailing list that would clear things up?
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
j4cknewt has quit [Remote host closed the connection]
rubie has quit [Read error: Connection reset by peer]
aldodelgado has joined #ruby
<Ox0dea> Perhaps, but my late realization that `module` already behaves this way was fairly illuminating.
foureight84 has joined #ruby
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
aldodelgado has quit [Client Quit]
frozen3 has joined #ruby
rubie has quit [Read error: Connection reset by peer]
iamninja has quit [Ping timeout: 246 seconds]
rubie has joined #ruby
Pupeno_ has joined #ruby
jobewan has quit [Quit: Leaving]
rubie has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 246 seconds]
rubie has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 240 seconds]
_seanc_ has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
coban2k has quit [Remote host closed the connection]
rubie has joined #ruby
northfurr has joined #ruby
bustrarm has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
frozen3 has quit [Ping timeout: 244 seconds]
rubie has quit [Read error: Connection reset by peer]
rubie_ has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
Pupeno_ has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
busterarm has quit [Ping timeout: 244 seconds]
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Josh has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
rubie has joined #ruby
Josh is now known as Guest94306
devbug has joined #ruby
blue_deref has quit [Quit: bbn]
rubie has quit [Read error: Connection reset by peer]
Chau has joined #ruby
rubie has joined #ruby
Chau has quit [Max SendQ exceeded]
Guest94306 is now known as jtdoncas
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
jhack has quit [Ping timeout: 246 seconds]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
scripore has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
rideh has quit [Quit: peace]
Pupeno has joined #ruby
rbennacer has quit [Remote host closed the connection]
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
umgrosscol has joined #ruby
lwu has quit [Quit: This computer has gone to sleep]
rubie_ has quit [Read error: Connection reset by peer]
Kallis has quit [Read error: Connection reset by peer]
rubie has joined #ruby
TheNet has quit [Remote host closed the connection]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
bootstrappm has left #ruby [#ruby]
rubie has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
jpfuentes2 has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
Pupeno has quit [Ping timeout: 256 seconds]
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
northfurr has quit [Quit: northfurr]
<psayian> hays: The reference you gave me refers to ruby 1.6. Does anyone know of a good ruby book that is more current.
rubie_ has quit [Read error: Connection reset by peer]
rubie has joined #ruby
northfurr has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno has quit [Read error: Connection reset by peer]
rubie has joined #ruby
TheNet has quit [Ping timeout: 260 seconds]
rubie has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
<sevenseacat> psayian: http://manning.com/black3
lannonbr_ has joined #ruby
rubie has joined #ruby
_seanc_ has quit [Quit: _seanc_]
<psayian> sevenseacat: Is this good fro a beginner in ruby?
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
<sevenseacat> psayian: its good for everyone.
Pupeno has joined #ruby
freerobby has joined #ruby
rubie has quit [Read error: Connection reset by peer]
sepp2k has quit [Read error: Connection reset by peer]
chipotle has quit [Quit: cheerio]
rubie has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
lannonbr has quit [Ping timeout: 272 seconds]
c_nick has joined #ruby
pdoherty has quit [Quit: Leaving]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
hydrozen has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
Pupeno_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
c_nick has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 244 seconds]
<Ox0dea> Since when is 1.6 not best Ruby?
fedexo has joined #ruby
northfurr has quit [Quit: northfurr]
Pupeno_ has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
cabreraM516 has joined #ruby
baweaver has joined #ruby
<psayian> Thanks sevenseacat
Hal_9000_ has quit [Quit: Hal_9000_]
Pupeno has quit [Ping timeout: 256 seconds]
c_nick has joined #ruby
<c_nick> I am executing an Excel worksheet through my Ruby Framework using COM, My binaries are 64-bit, my Excel is 64 bit do i need Ruby 64 bit too ?
TheNet has joined #ruby
northfurr has joined #ruby
<RickHull> Ox0dea: i'm guessing 2003
<c_nick> i mean ideally it should but y
<RickHull> 2005 maybe?
<Ox0dea> c_nick: Why not?
<Ox0dea> RickHull: Nonsense.
<Ox0dea> 1.6 has everything you need and nothing you don't.
<sevenseacat> lol
fedexo has quit [Ping timeout: 244 seconds]
<Ox0dea> With the added bonus of compiling in an eyeblink or two.
michael_mbp has quit [Excess Flood]
<jtdoncas> you can say that about assembly!
<RickHull> i need oniguruma and sytactic sugar for hash key symbols
<c_nick> Ox0dea: because ruby is just executing the sheet i mean ofcorse it should but i am not sure why
ascarter has joined #ruby
<Ox0dea> jtdoncas: And I do! :P
<Ox0dea> c_nick: Well, are you on a 64-bit platform?
<c_nick> yes
Pupeno has joined #ruby
<Ox0dea> Case closed, I reckon.
michael_mbp has joined #ruby
dr3w has quit [Ping timeout: 265 seconds]
<nofxx> Ox0dea, I promise... hehe, sorry had to leave. They are supposedly a 44 digit [0-9] key followed by a pipe | followed by some chars that doesn't have use
<RickHull> looks like base64 maybe
<RickHull> that gist is not digits only
<nofxx> RickHull, tryed w/o luck....
iateadonut has joined #ruby
juanpablo__ has joined #ruby
clarkenciel has joined #ruby
<c_nick> Ox0dea: ok thanks will use Rubyx64
milesforrest has joined #ruby
Pupeno has quit [Ping timeout: 256 seconds]
c_nick has left #ruby [#ruby]
milesforrest has quit [Client Quit]
shmilan has quit [Ping timeout: 272 seconds]
j4cknewt has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
nertzy has quit [Quit: This computer has gone to sleep]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo__ has quit [Ping timeout: 260 seconds]
braincrash has quit [Quit: bye bye]
njr has joined #ruby
Pupeno has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
chouhoulis has joined #ruby
LMity has joined #ruby
Pupeno_ has joined #ruby
northfurr has quit [Quit: northfurr]
poguez_ has quit [Quit: Connection closed for inactivity]
basmoura has quit [Remote host closed the connection]
TheNet has quit [Quit: Leaving...]
lannonbr_ has quit [Quit: WeeChat 1.2]
_seanc_ has joined #ruby
lannonbr has joined #ruby
Pupeno has quit [Ping timeout: 246 seconds]
Pupeno_ has quit [Ping timeout: 244 seconds]
braincrash has joined #ruby
code1o6 has quit [Ping timeout: 246 seconds]
code1o6 has joined #ruby
hololeap has joined #ruby
nahtnam has joined #ruby
davedev24 has quit [Remote host closed the connection]
<rehat> is there a difference with hashes between ruby 2.2.1 and 2.1.4? not sure why my script errors out
axl_ has quit [Quit: axl_]
<sevenseacat> rehat: no.
michael_mbp has quit [Excess Flood]
<Ox0dea> nofxx: Why are they both of length 200?
<Ox0dea> rehat: What sort of error are you getting?
Pupeno has joined #ruby
jenrzzz has joined #ruby
arescorpio has joined #ruby
<rehat> I get an error with this hash https://gist.github.com/rehat/b78e40adb1494b6c03d7 on ruby 2.1.4 but not on 2.2.1
michael_mbp has joined #ruby
<rehat> I guess symbols in hashes are different, but idk kinda new with ruby
Musashi007 has quit [Quit: Musashi007]
lannonbr has quit [Quit: WeeChat 1.2]
darkf has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
Pupeno has quit [Ping timeout: 256 seconds]
nofxx has joined #ruby
Pupeno has joined #ruby
Musashi007 has joined #ruby
<monoprotic> particularly: You must use the rocket for symbols that require quoting: :'where.is' => x is valid but 'where.is': x is not. Ruby 2.2 has fixed this problem so you can say 'where.is': x in Ruby 2.2+.
clarkenciel has quit [Ping timeout: 246 seconds]
<rehat> monoprotic: ok cool thanks. I copied that from Programming Collective Intelligence which is in python and I was surprised that still worked in ruby on my work computer but I ran into that error on my personal computer. :)
linuxboytoo has joined #ruby
<RickHull> at work, it works. on personal, it gets personal ;)
<rehat> lol
bweston92 has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 245 seconds]
chipotle has quit [Quit: cheerio]
<toretore> it was not a bug that was fixed; it was an additional feature added in 2.2
<monoprotic> go on?
bweston92 has joined #ruby
<toretore> => is still the main syntax for hash literals; the key: syntax is syntax sugar that translates to `:key =>`
twohlix has quit [Ping timeout: 244 seconds]
fumduq- has quit [Read error: Connection reset by peer]
wheresmyjetpack has joined #ruby
shtirlic has quit [Ping timeout: 246 seconds]
fumduq has joined #ruby
<monoprotic> oh, i thought you had typed "accidental"
<toretore> 2.2 added `'key':` -> `:'key' =>`
LBRapid has quit [Ping timeout: 244 seconds]
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
gregf_ has quit [Ping timeout: 245 seconds]
eam has quit [Ping timeout: 245 seconds]
eam has joined #ruby
<wheresmyjetpack> how would you initialize an array as an instance var that calls a function on all values pushed to it?
tmtwd has quit [Read error: Connection reset by peer]
gregf_ has joined #ruby
hagabaka has joined #ruby
<toretore> wheresmyjetpack: elaborate. what is the purpose?
LBRapid has joined #ruby
twohlix has joined #ruby
shtirlic has joined #ruby
havenwood has joined #ruby
<RickHull> wheresmyjetpack: write a class. probably composition rather than inheritance
<hanmac> wheresmyjetpack: @var = [*inputarray].map { |x| my_method(x) }
<Ox0dea> toretore: I think it was a bug.
<wheresmyjetpack> hanmac: thats exactly what i wanted thank you
jtdoncas has quit [Ping timeout: 252 seconds]
<RickHull> wheresmyjetpack: really? it doesn't match at all
howdoico1 has joined #ruby
<RickHull> that won't do shit if you @var.push(val)
<toretore> Ox0dea: what makes you think that?
<hanmac> wheresmyjetpack: PS: " [*inputarray] " also shows that i meaned an array, inputarray.map also works
<Ox0dea> toretore: The Symbol syntax for Hashes didn't work for all Symbols? Definitely a bug.
<wheresmyjetpack> RickHull: what doesn't match
<toretore> it wasn't meant to work for all symbols
<toretore> i doubt it was an oversight in 2.1
s00pcan has quit [Ping timeout: 272 seconds]
<Ox0dea> wheresmyjetpack: You indicated that you wanted the function called on new elements as well.
<toretore> it would have been very obvious
<Ox0dea> You'd be surprised, I guess.
<hanmac> RickHull: he might only want to do that while initialize the variable for what my thing is enough. if he wants to do it in the future with other elements too, than its not enough
<Ox0dea> > on all values pushed to it
scripore has quit [Quit: This computer has gone to sleep]
<RickHull> hanmac: wheresmyjetpack: sure, not my problem :) but the solution does not match the problem statement imho
s00pcan has joined #ruby
scripore has joined #ruby
<wheresmyjetpack> RickHull no you're right. i am pushing to the array after initialization
<wheresmyjetpack> jumped the gun there
<toretore> wheresmyjetpack: what is this for?
tmtwd has joined #ruby
<Ox0dea> wheresmyjetpack: Define either #push or #<< on the array's singleton class, and define it in terms of the other.
<wheresmyjetpack> toretore i am passing a child class into parent.array, and would like the parent to update the parent reference inside of the child
tmtwd has quit [Remote host closed the connection]
<Ox0dea> wheresmyjetpack: Arrays are already passed by reference.
<toretore> you shouldn't manipulate the parent's internal data structures from the child
<toretore> def add_child
<toretore> or from outside the parent instance, i should say
<RickHull> wheresmyjetpack: here is what i think matches your problem statement https://gist.github.com/rickhull/ecc930aa1ed52adca350
<Ox0dea> > ActiveArray
shmilan has joined #ruby
michaeldeol has joined #ruby
a346 has quit [Quit: a346]
<RickHull> you could also pass a block to your push, though that leaves the func definition to the caller
umgrosscol has quit [Remote host closed the connection]
ascarter has quit [Quit: Textual IRC Client: www.textualapp.com]
<wheresmyjetpack> toretore: RickHull: ok that helps. i was not manipulating the parent from within the child. the child just needed to refer back to the parent
s00pcan has quit [Ping timeout: 260 seconds]
<RickHull> Ox0dea: yeah, i should have named it ActiveResource
<RickHull> no wait...
cabreraM516 has quit [Quit: Textual IRC Client: www.textualapp.com]
_blizzy_ has quit [Ping timeout: 260 seconds]
<toretore> wheresmyjetpack: you shouldn't be manipulating the array from outside the instance is what i should have said
s00pcan has joined #ruby
<wheresmyjetpack> toretore: i see
axl_ has joined #ruby
<toretore> i.e. do `parent.add_child(child)` instead of `parent.children << child`
<toretore> that way, the parent gets to define what "adding a child" means
LMity has quit [Ping timeout: 246 seconds]
<toretore> and you don't have the problem any more
<wheresmyjetpack> toretore: ok thats super helpful. not sure why i didn't come to that on my own.
bigmac has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
<RickHull> it's because you've lost your jet pack
<wheresmyjetpack> clearly
gix has quit [Ping timeout: 245 seconds]
TheNet has joined #ruby
surfs^ has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.2]
tjohnson has quit [Quit: Connection closed for inactivity]
howdoico1 has quit [Ping timeout: 240 seconds]
howdoico1 has joined #ruby
linuxboytoo has quit [Quit: Leaving...]
bronson has joined #ruby
sevvie has joined #ruby
dtscode has joined #ruby
<dtscode> irb(main):050:0* ("1 2 3".split) .each { |s| s.to_i }
<dtscode> => ["1", "2", "3"]
<dtscode> why does this return strings?
Yzguy has quit [Quit: Zzz...]
Meow-J has joined #ruby
chipotle has joined #ruby
<sevenseacat> because the each returns the array you called it in
gix has joined #ruby
<sevenseacat> *on
<pontiki> you used "each" instead of "map"
<sevenseacat> you probably wanted map, not each
<dtscode> alright thanks
slackbotgz has quit [Remote host closed the connection]
<sevenseacat> >> "1 2 3".split.map(&:to_i)
<ruboto> sevenseacat # => [1, 2, 3] (https://eval.in/416543)
gambl0re has quit []
dtscode has left #ruby ["Leaving"]
khebbie has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
khebbie has quit [Remote host closed the connection]
fedexo has joined #ruby
djbkd has joined #ruby
christiandsg has joined #ruby
workmad3 has joined #ruby
tubulife- has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jcdesimp has quit [Quit: Leaving...]
workmad3 has quit [Ping timeout: 240 seconds]
IHaveAIDS has joined #ruby
<IHaveAIDS> I have AIDS!
<IHaveAIDS> Help!
sectionm1 has joined #ruby
<RickHull> here's a BAND-AID
IHaveAIDS has quit [Client Quit]
gambl0re has joined #ruby
wldcordeiro has joined #ruby
Musashi007 has quit [Quit: Musashi007]
jenrzzz has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
j4cknewt has quit [Remote host closed the connection]
sectionme has quit [Ping timeout: 264 seconds]
Rickmasta has joined #ruby
iamninja has joined #ruby
yfeldblu_ has quit [Ping timeout: 246 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jenrzzz has quit [Ping timeout: 252 seconds]
Vile` has quit [Ping timeout: 240 seconds]
iamninja has quit [Ping timeout: 264 seconds]
AccordLTN has quit [Ping timeout: 246 seconds]
AccordsLTN has joined #ruby
Ropeney has joined #ruby
bigmac has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
_seanc_ has quit [Quit: _seanc_]
axl_ has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
arta82 has joined #ruby
Vile` has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
jenrzzz has joined #ruby
axl_ has joined #ruby
hydrozen has quit [Quit: Textual IRC Client: www.textualapp.com]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang65_ has joined #ruby
ruby-lang678 has joined #ruby
foureight84 has quit [Quit: Be back later ...]
foureight84 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<ruby-lang678> is @rob_ around?
<mozzarella> ask him
howdoico1 has quit [Ping timeout: 260 seconds]
Musashi007 has joined #ruby
<RickHull> Ox0dea I have a current example of google not being faithful to quoted terms
<Ox0dea> Yay!
<RickHull> if you are still interested
<Ox0dea> I am.
<RickHull> mac outlook attach "/tmp"
<Ox0dea> Punctuation.
<RickHull> ctrl-f temp
<RickHull> punctuation?
michael_mbp has quit [Excess Flood]
christia_ has joined #ruby
christiandsg has quit [Read error: Connection reset by peer]
yosafbridge has quit [Quit: Leaving]
michael_mbp has joined #ruby
<Ox0dea> Yes, '/' is a "punctuation" character, for which Google makes much less stringent guarantees.
<Ox0dea> You'll note, for instance, that removing the slash prevents "temporary" being considered a literal match.
v0n has quit [Quit: WeeChat 1.0.1]
<RickHull> that's funny
<RickHull> because technical queries are where fuzzy matches suck
tubulife- has quit [Quit: ZNC - http://znc.in]
<RickHull> my previous example was: blah blah "Debian" where it matched (and highlighted / bolded) Linux
ruby-lang678 has quit [Ping timeout: 246 seconds]
<RickHull> but i can't make it do that anymore
neruda has quit [Quit: Page closed]
khebbie has joined #ruby
<RickHull> dunno if i was caught in an A/B treatment at that time
shmilan has quit [Ping timeout: 255 seconds]
<Ox0dea> In any case, you weren't *full* of shit, so I'd like to offer an apology for being so abrasive on the matter.
<RickHull> no worries, fully accepted and not needed :)
<RickHull> I needled you pretty good in response ;)
khebbie has quit [Remote host closed the connection]
Wolland has joined #ruby
Wolland has quit [Client Quit]
juanpablo__ has joined #ruby
Thomas-0725 has joined #ruby
<Aeyrix> High quantity of memes in this sector.
howdoico1 has joined #ruby
<Ox0dea> Aeyrix! <3
fedexo has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
<Aeyrix> Yooooo
<Aeyrix> I'm trying to decide between private IRC net or Slack
<Aeyrix> because my old one got a nice ddos
GnuYawk has joined #ruby
GnuYawk has joined #ruby
<RickHull> free Slack is pretty damn good
<RickHull> we use it at $work
<Ox0dea> Aeyrix: Y U NO ufw?
<Aeyrix> wtf is ufw
<Aeyrix> Slack is p good yeah
<Aeyrix> but the barrier to entry is slightly higher than IRC for my group of people
<Aeyrix> security focussed / conscious
<Ox0dea> ufw is iptables for retards. /s
<RickHull> that's kind of funny
<Aeyrix> In my experience people are less likely to log in to Slack than IRC, because they're probably in other IRC nets
<Aeyrix> :\
<Aeyrix> Ox0dea: oh right
<RickHull> yeah, so the barrier is cultural rather than technical
<RickHull> that is sensible enough
<Aeyrix> also iptables master race
<Aeyrix> yeah
juanpablo__ has quit [Ping timeout: 244 seconds]
<Ox0dea> Confirmed.
<Aeyrix> Also
<Aeyrix> iptables wouldn't help against
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nofxx> Aeyrix, grove?
<Aeyrix> multi-gbit ddos
psayian has quit [Ping timeout: 246 seconds]
<Aeyrix> nofxx: maybe maybe
<Aeyrix> i do have one running
<Aeyrix> irc net, that is
<Aeyrix> i'm torn between how nice Slack is and how much control you have on an IRC net
<Aeyrix> it was about 150 people last time
<nofxx> Aeyrix, yeah, we need a solid good web client irc, but there ain't one
yosafbridge has joined #ruby
<nofxx> isn't*
<Aeyrix> I use IRCCloud for multi-server client.
fedexo has joined #ruby
<RickHull> i say start with IRC. if you run into headaches, either with users or sysadmin, then try Slack
_seanc_ has joined #ruby
<Aeyrix> I'm just conscious of shifting people
<Aeyrix> and them getting irritated
<RickHull> or what about ejabberd?
<Aeyrix> multi user chats with XMPP are hell
RegulationD has quit [Ping timeout: 260 seconds]
<Aeyrix> realistically it's just a (large) group of people trying to reach terminal memelocity
<Aeyrix> but we also talk about software engineering / security a lot
kidoz has quit [Quit: Ухожу я от вас]
<nofxx> also, slack should be rolling out the irc bridge anytime now
<Aeyrix> It's out, it's just
<Aeyrix> t r a s h
<Aeyrix> r
<Aeyrix> a
<Aeyrix> s
<Aeyrix> h
<nofxx> heeh
<Aeyrix> Like if I were to recommend Slack, I'd sufface that by saying "don't use the IRC bridge though"
<Aeyrix> it really is bad
<sevenseacat> yeah I've tried it before. it's quite bad.
<Aeyrix> That's not Slack's fault, that's just how feature-rich Slack is versus IRC>
yardenbar has joined #ruby
saddad has quit [Ping timeout: 272 seconds]
j4cknewt has joined #ruby
_seanc_ has quit [Quit: _seanc_]
fedexo has quit [Quit: No Ping reply in 180 seconds.]
<nofxx> Aeyrix, have some examples?
<Aeyrix> Of what?
<nofxx> features left of on irc
<nofxx> slack*
<Aeyrix> Anything media-rich.
<Aeyrix> Emojis, inline uploads, etc
<Aeyrix> they're just not send by the bridge
fedexo has joined #ruby
<nofxx> damn..irc can do files haha, almost forgot this. I remember ppl using this for porn.
<nofxx> DCD ? DCC DDC .. anyways, not implemented in slack bridge than
<sevenseacat> any integrations, things like reactions, etc.
<nofxx> can irc transfer files behind nat?
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
<Aeyrix> yes
<nofxx> Aeyrix, you are using irccloud? It's possible to get ppl to login directly on it? As in give a link to someone and he's talking in a channel in my private server.
<Aeyrix> Yes, no.
<Aeyrix> You can give people a link that, post-signup, will put them in the channel
<Aeyrix> but there's no direct link a la KiwiIRC or Mibbit.
<Aeyrix> idk what I'll do if I move back to Slack
<Aeyrix> I'll gravitate off IRC most likely.
<nofxx> irccloud signup, email and pass. Hm at least some google fb oauth would be nice than.
<Aeyrix> I wish I knew what Slack's stack was.
<Aeyrix> I know some of it due to selective probing, but not all of it.
axl_ has quit [Quit: axl_]
<Aeyrix> I want to know how their backend functions. They won't tell me. :(
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhjondoh has joined #ruby
dseitz has quit [Ping timeout: 250 seconds]
arescorpio has quit [Quit: Leaving.]
lwu has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 272 seconds]
mpicci has joined #ruby
BigRubyFan has joined #ruby
<BigRubyFan> I have a question. My form is saving this select tag properly, but on page reload, it's not loading the selected option in the select dropdown by default.
<BigRubyFan> The saved option, that is.
<BigRubyFan> That's the code.
<BigRubyFan> I researched :selected =>, but I'm reading that's depreciated. I also tried simply using current_user.profile.choice_1 at the end of the select tag, after options_for_select, and that throws an exception
<BigRubyFan> Anyone familiar? It's because I'm using an options_for_select where a user has a dropdown consisting of "Bread", "Cheese", and "Steak", but the value is an integer, 1, 2, and 3 respectively
frozen3 has joined #ruby
christia_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<Aeyrix> BigRubyFan: Hit up #rubyonrails fam.
<Aeyrix> Much more likely able to help you.
<Aeyrix> The overlap is here but some domain expertise is only in #ror.
<BigRubyFan> Ahh, thank you.
foureight84 has quit [Quit: Be back later ...]
aganov has joined #ruby
j4d has joined #ruby
<mpicci> Aeyrix: hey irccloud is really nice client. Got even inline gists! I'm nofxx
<Aeyrix> Yeah it's pretty good.
<Aeyrix> Some bugs to iron out that I've found but mostly pretty nice.
<mpicci> Aeyrix: how this file upload works? clickable for folks to download?
<Aeyrix> I'll be honest, I'm unsure. Never used.
j4d has quit [Client Quit]
BigRubyFan has quit [Quit: Page closed]
frozen3 has quit [Ping timeout: 256 seconds]
<Aeyrix> BigRubyFan never joined #rubyonrails.
<Aeyrix> I even went to go look for a solution. (:
<Aeyrix> :( *
symm- has joined #ruby
warmonk has joined #ruby
<mpicci> Aeyrix: yeah, only one way if you think of. browser -> irccloud:80 -> irc -> url://
<Aeyrix> mpicci: I just have a domain combined with a small app I wrote to upload images.
<Aeyrix> Deletes the images after 7 days.
<mpicci> very fancy, would even give it a try, but I'll need to login everytime it seems. 2 hours inactivity on free accounts.
<Aeyrix> You get 7 days of free permanent presence.
dseitz has joined #ruby
<Aeyrix> I just pay the $5/mo because I'm on a bunch of networks all the time.
<Aeyrix> Like 8.
oo_ has quit [Remote host closed the connection]
warmonk has quit [Client Quit]
warmonk has joined #ruby
warmonk has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
oo_ has joined #ruby
amclain has quit [Quit: Leaving]
foureight84 has joined #ruby
sectionme has joined #ruby
fedexo has quit [Ping timeout: 244 seconds]
shock_one has joined #ruby
mesamoo has quit [Remote host closed the connection]
sectionm1 has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
rbowlby has joined #ruby
Psi-Jack has joined #ruby
Billias has quit [Read error: Connection reset by peer]
Billias has joined #ruby
<Psi-Jack> Hmm.. What would be the proper way to actually determine if a variable is not defined, in an if statement expecting to be true or false, or similar? So far, I have if (defined?(event[:check][:type])).nil?, but that looks silly, to me.
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Psi-Jack> But, it's the only way, I've found so far, to actually do it, and run the code within that condition result.
freerobby1 has quit [Quit: Leaving.]
rubie has quit [Remote host closed the connection]
sectionm1 has joined #ruby
rubie has joined #ruby
sbhatore has quit [Read error: Connection reset by peer]
skakri has quit [Ping timeout: 245 seconds]
<Psi-Jack> Hmm. Though, unless might work, if I can tack on an elsif in there?
<Ox0dea> Psi-Jack: Never combine `unless` and `elsif`.
sbhatore has joined #ruby
<Ox0dea> Or indeed `unless` and `else`.
sectionme has quit [Ping timeout: 246 seconds]
skakri has joined #ruby
<Psi-Jack> I'm comparing three things, so this is what I have as-is now: http://paste.linux-help.org/view/8ac2c0ac
<Ox0dea> You're keying a Hash, which already returns nil for nonexistent keys, so why do you feel you need to use `defined?`?
<Aeyrix> I'd venture a lack of knowledge pertaining to the intricacies of the Hash object.
<Psi-Jack> Hmm. So, elsif event[:check][:type].nil? would be better for line 5?
<Psi-Jack> Aeyrix: Bingo.
<Aeyrix> Psi-Jack: "line 5"? Did you ever show code?
<Aeyrix> I can't see it. :x
<Psi-Jack> Yes. :)
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Aeyrix> elseif event[:check][:type].nil?
<Aeyrix> should be fine
yfeldblum has joined #ruby
<Aeyrix> So long as event[:check] is always going to exist.
<Psi-Jack> It should, yes. ;)
<Aeyrix> Otherwise you'll field a NoMethodError, because event[:check] would be nil, and NilClass doesn't have `[]` as a function.
<Aeyrix> s/function/method.
<Psi-Jack> Standard sensu event object always has event[:client] and event[:check] at least.
sectionme has joined #ruby
<Psi-Jack> Just that... event[:check][:type] isn't always defined, though it should be, (bug report already filed).
xcesariox has joined #ruby
<Aeyrix> Yeah that's what my code will catch.
<Psi-Jack> Writing Sensu extensions, plugins, and bridges, to better fill my knowledge of ruby. So far my ruby knowledge has only come from Chef, so, still learning.
<Aeyrix> Good on you.
<Aeyrix> :>
<Aeyrix> RickHull Ox0dea
<Ox0dea> Qua?
<Aeyrix> Another thing Slack does well: Inline code.
<Aeyrix> It's lovely tbqh.
postmodern has joined #ruby
<Psi-Jack> So, cool, yeah. just event[:check][:type].nil? is good. Cleaner.
psy_ has quit [Ping timeout: 256 seconds]
<Aeyrix> Yep.
* Ox0dea realizes he should've added syntax highlighting to WeeChat ages ago.
araujo has quit [Quit: Leaving]
<Aeyrix> I had someone tell me irssi was a proper client today.
<Psi-Jack> And covers future cases where event[:check][:type] might actually have something else. ;)
<Aeyrix> Following on from "I can't click this link."
sectionm1 has quit [Ping timeout: 265 seconds]
<Psi-Jack> Heh, in Konsole, even in irssi, a link would be clickable. :)
* Psi-Jack ducks.
<Aeyrix> I can only assume it was cmd irssi
<Aeyrix> :^)
<Psi-Jack> But, I don't use irssi, I use konversation. :)
<Aeyrix> Konversation is great.
<Aeyrix> KDE as a whole is great tbh.
<Ox0dea> Psi-Jack: Are you sure this won't suffice? https://gist.github.com/0x0dea/ee4834e3e57eb0491779
workmad3 has joined #ruby
<Psi-Jack> Ox0dea: Well, not quite. I've got more logic yet to work on, hence why it's in if, elsif, else.
<Psi-Jack> This is all going into a Proc.new for an EventMachine.
khebbie has joined #ruby
<Ox0dea> Sure, but `defined?` is almost certainly overkill.
<hanmac> Psi-Jack: hm if you have more logic, isnt the case when for you too?
<Psi-Jack> I've fixed that with: elsif event[:check][:type].nil?
<Ox0dea> Plus, `defined?` doesn't actually do what you must think it does for nonexistent keys.
coban2k has joined #ruby
TheNet has quit [Ping timeout: 246 seconds]
khebbie has quit [Remote host closed the connection]
khebbie has joined #ruby
<Ox0dea> >> a = {}; defined?(a[:foo])
<ruboto> Ox0dea # => "method" (https://eval.in/416548)
<Ox0dea> `defined?` a shit.
<Psi-Jack> heh
<hanmac> is similar to Ox0dea ones
<Psi-Jack> Hmm
riotjone_ has quit [Quit: Leaving...]
<Ox0dea> hanmac: Single quotes + interpolation = bad time.
<Psi-Jack> Okay, Both have valid points, and could be used more effectively.
foureight84 has quit [Quit: Be back later ...]
<hanmac> Ox0dea: yeah ok i ddint checked that too
<hanmac> is am still sleepy
araujo has joined #ruby
<Psi-Jack> Afterall, my logic changes whether it's "metric" or "standard", for "unknown" I'll be tossing anyway since I won't know how to handle a new check type specifically until it's actually available. :)
bruno- has joined #ruby
<Psi-Jack> IF ever. :)
workmad3 has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
<Psi-Jack> The File.write is pretty much just for debugging.
<Ox0dea> Psi-Jack: In that case, `return unless event[:check][:type]` should make things cleaner.
<Psi-Jack> Seeing the raw json event dump directly so I could see things like,... well, event[:check][:type] not being set for standard checks. :)
<Psi-Jack> Ox0dea: But, I will be handling "metric" /and/ "standard" (but standard is nil)
<Ox0dea> Wat.
foureight84 has joined #ruby
<Psi-Jack> yeah.. I know.. It's stupid.. :)
<Ox0dea> Psi-Jack: I think you want `Hash#has_key?`.
<Psi-Jack> Threw me off when I was trying to get "standard" check types, and not being able to catch it in the hash as expected. But, standard checks are the default checks, in Sensu. metric checks do basically the same thing, but handle the event differently.
<Ox0dea> You can't differentiate between nonexistence and a nil value with Hash#[].
<Ox0dea> >> foo = {a: nil}; foo[:a] == foo[:b] # Psi-Jack
<ruboto> Ox0dea # => true (https://eval.in/416549)
<Psi-Jack> hmmm
oo_ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 256 seconds]
User458764 has joined #ruby
<Psi-Jack> Well, no WONDER people aren't writing good extensions for this thing. So, based on what I said... event[:check][:type] can be "metric", or without a value (standard), or possibly soemthing else in the future but I don't care about those IF they exist, future-proofing.
shock_one has quit [Remote host closed the connection]
fantazo has quit [Quit: Verlassend]
youngbaks has joined #ruby
<hanmac> Psi-Jack: ActiveSupport has something for that ... i think it was called try ... but i dont like ActiveSupport
<Ox0dea> Psi-Jack: So you want `return if event[:check][:type] unless event[:check][:type] == 'metric'`, which is a little crazy.
<Aeyrix> help
<Psi-Jack> Ox0dea: Hmm, but if event[:check][:type] is not a key, I still need to handle it, treating it as "standard".
<Psi-Jack> I want to handle both "metric" and "standard" but not anything else. heh
<Ox0dea> Psi-Jack: But where "standard" is indicated with a nil value for event[:check][:type]?
shock_one has joined #ruby
<Psi-Jack> I guess, technically it's not nil if it's just not defined as a hash key, correct?
<Ox0dea> Well, therein lies the rub.
<Psi-Jack> Heh
<Psi-Jack> I mean, I'm pesturing the sensu devs about why the heck type isn't being defined for "standard" when it should be, since it's in the spec.
<Ox0dea> Psi-Jack: My most recent suggestion will bail early if event[:check][:type] has any value at all *unless* its value is 'metric', which seems to be the behavior you're after.
<Psi-Jack> Well, again, no.. I want to handle both "metric" and if event[:check][:type] doesn't exist, but if event[:check][:type] isn't "metric" and isn't defined (or set, or is a key), to stop processing.
<Psi-Jack> And possibly, if event[:check][:type] is not defined OR is "standard", for in case they fix this. LOL
oo_ has joined #ruby
leat has joined #ruby
TomyLobo has joined #ruby
Philipp__ has joined #ruby
nhhagen has joined #ruby
youngbaks has quit [Quit: WeeChat 1.2]
<Psi-Jack> Hmmm, so, if event[:check].has_key?("type"); type = event[:check][:type]; else type = "standard"
ekleog_ is now known as ekleog
ekleog has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ekleog has joined #ruby
shock_one has quit [Remote host closed the connection]
iamninja has joined #ruby
eGGsha has joined #ruby
<Psi-Jack> There, that works very nicely, and lets me route accordingly.
nhhagen_ has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
Askilada has joined #ruby
demophoon has quit [Quit: :wqall!]
demophoon has joined #ruby
Musashi007 has quit [Quit: Musashi007]
pepperbreath has joined #ruby
<Psi-Jack> Which that File.open... stuff will be changing to functions to handle different types accordingly.
iamninja has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
nhhagen has quit [Ping timeout: 264 seconds]
pepperbreath has quit [Read error: Connection reset by peer]
foureight84 has quit [Quit: Be back later ...]
pepperbreath has joined #ruby
stan has joined #ruby
<Psi-Jack> Hmm... But that's... Not writing to my files. :/
<Ox0dea> Psi-Jack: You may need to flush.
<Psi-Jack> flush?
roolo has joined #ruby
howdoico1 has quit [Ping timeout: 260 seconds]
nhhagen_ has quit []
<Psi-Jack> This is what I've been originally hacking from: https://github.com/sensu/sensu/blob/master/spec/extensions/bridges/file.rb
<[spoiler]> flush the ruby IO buffer into the OS buffer
<[spoiler]> (didn't look at the code)
<Psi-Jack> Oh, no. I restarted sensu with the new code in place which was working until the code change.
framling has quit [Remote host closed the connection]
<Psi-Jack> Heh, with how many things my sensu already monitors, both metrics and standard checks, those files would be flooding with stuff. And hmmm.. Moved my if..else..end into the Proc.new portion of code, and I get a lovely NoMethodError. :/
<Psi-Jack> for has_key.
casadei_ has quit [Remote host closed the connection]
hs366 has joined #ruby
<Ox0dea> Psi-Jack: You forgot the question mark.
<Psi-Jack> D'oh
audiodude has joined #ruby
nhhagen has joined #ruby
<Psi-Jack> Yeah, that was it. Thank you.
<Ox0dea> Sure thing.
audiodude has left #ruby [#ruby]
<Psi-Jack> Hmm, though. now it's just writing everything to /tmp/sensu_standard.json, instead.
swgillespie has joined #ruby
juanpablo__ has joined #ruby
TomyLobo has quit [Ping timeout: 246 seconds]
<RickHull> Aeyrix: i must admit to being happy with slack's markdown features, certainly w.r.t. inline code or `cmdline snippets`
bzf has left #ruby ["WeeChat 1.2"]
<Psi-Jack> if event[:check].has_key?("type") <-- So this isn't ever finding itself to be true. :/
<Psi-Jack> Even when event[:check][:type] == "metric" is true.
<apeiros> Psi-Jack: "type" and :type are not the same key
ChasedSpade has quit [Quit: No reason specified.]
Trynemjoel has quit [Ping timeout: 245 seconds]
<Psi-Jack> Oh..
<apeiros> >> hash = {"x" => "I'm a String"; :x => "I'm a Symbol"}; hash["x"]
<ruboto> apeiros # => /tmp/execpad-c83fbc7e36b8/source-c83fbc7e36b8:2: syntax error, unexpected ';', expecting '}' ...check link for more (https://eval.in/416570)
<apeiros> >> hash = {"x" => "I'm a String", :x => "I'm a Symbol"}; hash["x"]
<ruboto> apeiros # => "I'm a String" (https://eval.in/416571)
<apeiros> (whoopsie)
vondruch has joined #ruby
<Psi-Jack> That should be .has_key?(:type) ?
juanpablo__ has quit [Ping timeout: 244 seconds]
<Ox0dea> Oui.
<apeiros> yes
ChasedSpade has joined #ruby
Trynemjoel has joined #ruby
<Psi-Jack> Well well. Interesting..
chouhoulis has quit [Remote host closed the connection]
<Psi-Jack> And, .has_key? should be just .key? as has_key? is deprecated?
<apeiros> I don't know anything about has_key? being deprecated
<apeiros> no warning on $VERBOSE, nothing in the docs. where do you have that from?
<apeiros> oh, back in ~20min
sectionme has quit [Ping timeout: 250 seconds]
sectionme has joined #ruby
GeissT has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<Psi-Jack> .key?(:type) certainly works. Leading me to believe that .has_key? might actually definitely believe it according to searching has_key deprecated. ;)
GeissT has joined #ruby
<Ox0dea> Psi-Jack: #key? is just an alias for #has_key?, but the latter "reads" better and is unlikely to be removed from the language any time soon.
greenarrow has joined #ruby
djbkd has joined #ruby
<Ox0dea> #include? is yet another alias for #has_key?, and I do believe this is the only standard method with three distinct names, so maybe one of them will go eventually.
<Psi-Jack> heh
<Ox0dea> Make that four! There's also #member?.
<Ox0dea> Utter madness.
<Psi-Jack> heh
<Psi-Jack> Cool. Progress..
<Psi-Jack> Now sleepy time. Thank you all for your help. Have a better understanding of hashes in general from this. :)
<Psi-Jack> I know many languages, just every language has their specifics. :)
GeissT has quit [Ping timeout: 260 seconds]
code1o6 has quit [Ping timeout: 265 seconds]
sectionm1 has joined #ruby
sectionme has quit [Read error: Connection reset by peer]
code1o6 has joined #ruby
AlexRussia has quit [Quit: WeeChat 1.3-dev]
mary5030 has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
jenrzzz has quit [Ping timeout: 255 seconds]
mary5030 has joined #ruby
<Psi-Jack> On a side note. Totally random. I cured myself of some insanity. One of my two monitors kept constantly tripping up and cycling through video inputs. DVI->VGA.. OSD would pop up as if the button to switch was hit, and cycled until it stopped long enough to select, sometimes causing the display to switch to VGA input. Cracked the sucker open and found a little dustball on the circuit board to the buttons.. Problem solved. :D
jack_rabbit has joined #ruby
<[spoiler]> Psi-Jack: damn
AlexRussia has joined #ruby
<RickHull> dustballs can't melt fuel beams
dh64 has joined #ruby
<Psi-Jack> Heh
<Psi-Jack> Hours... And hours... of frustration solved.
<[spoiler]> I'd probably decide the monitor is shit and buy a new one
<[spoiler]> Yours is a much more economically efficient solution :P
lessless has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
_ht has joined #ruby
jack_rabbit has quit [Remote host closed the connection]
dh64 has quit [Client Quit]
jack_rabbit has joined #ruby
Musashi007 has quit [Client Quit]
arooni-mobile has joined #ruby
maletor has joined #ruby
hahuang65_ has quit [Quit: Connection closed for inactivity]
Macaveli has joined #ruby
zeroDivisible has quit [Ping timeout: 252 seconds]
roolo has quit [Remote host closed the connection]
iamninja has joined #ruby
<ljarvis> RickHull: i'd certainly consider it
<Psi-Jack> [spoiler]: LOL. I almost tossed it, but I have these handy dandy tools to gently pry open snapped-together frames, like monitors and tablets tend to use.
arup_r has joined #ruby
<Psi-Jack> Plastic shivs/pries basically. SO I put them to the test. I've also repaired my own monitors before. Capaciters sometimes blow making you think it's an unrepairable issue, but really a $2 fix.
yfeldblum has quit [Ping timeout: 244 seconds]
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
<[spoiler]> Psi-Jack: Hmm, I'd actually be most afraid of breaking stuff while I open it up
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[spoiler]> I tend to overestimate sturdiness of things
<Psi-Jack> heh
cibs has quit [Ping timeout: 272 seconds]
frank_____ has quit [Quit: Connection closed for inactivity]
cibs has joined #ruby
arta82 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dseitz has quit [Read error: Connection reset by peer]
dseitz has joined #ruby
tomphp has joined #ruby
arta82 has joined #ruby
arta82 has quit [Max SendQ exceeded]
bernardio has joined #ruby
DLSteve has joined #ruby
nhhagen has quit [Read error: Connection reset by peer]
<ytti> i got some suggestions yesterday from thermatix and darix on graphing timeseries (x/y, like mrtg) in ruby
arta82 has joined #ruby
<ytti> and grafana were suggested
<ytti> i'm really looking just ruby library, to which I can feed data points, and have it puke PNG
arta82 has quit [Client Quit]
Pathfinder has joined #ruby
curses has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
<[spoiler]> ytti: I am not aware of a gem that does it; you could always make one! :)
<Ox0dea> "Be the change you wish to see in the world."
nhhagen has joined #ruby
<[spoiler]> Ox0dea: that is a nice saying
rbowlby has quit [Remote host closed the connection]
<Ox0dea> [spoiler]: Gandhi was pretty good for that.
<ytti> [spoiler], no way i'd get work hours sanctioned to do that
<Ox0dea> ytti: And shelling out is out of the question?
<RickHull> i'm a big fan of that maxim. particularly in social situations
<ytti> i'll probably do something with gnuplot
<RickHull> be the party you want to see/have
<RickHull> make this party *the* party. it's up to you, and noone else
bernardio has quit [Quit: bernardio]
<Ox0dea> I don't think that survives anything but cursory scrutiny, but I'll hold my tongue beyond that.
<RickHull> wfm :toot:
<Ox0dea> thank mr skeltal
<RickHull> look, nerds can be social and don't you dare deny it
<[spoiler]> RickHull: what does social mean? Sounds like a disease...
<RickHull> you have to watch out for contagions
<RickHull> especially maymays
<Ox0dea> RickHull: That's certainly not the pillar of your theory I would've gone after.
<[spoiler]> ytti: make it a gem
zenspider has quit [Quit: bye]
<[spoiler]> and open-source it, maybe someone else is looking for something similar
terlar has joined #ruby
<RickHull> be the change you're looking for. that's all i'm saying. i agree with Ox
arta82 has joined #ruby
<RickHull> someone has to step up and ringlead the circus. it may as well be you, so long as you can hold their attention
workmad3 has joined #ruby
Musashi007 has joined #ruby
quimrstorres has joined #ruby
<[spoiler]> RickHull: I don't like monkeys
<[spoiler]> or clowns
<RickHull> what about bears on roller skates?
<[spoiler]> they can keep their fucking circus
<RickHull> ice skates, even?
sinkensabe has joined #ruby
<RickHull> what about electric skateboards, or hoverboards, even?
<ytti> [spoiler], i just need the results, i don't have time to productize it
<ytti> [spoiler], i wish i had, i'd be happy to do it, if someone paid me to do it :)
bruno- has joined #ruby
<RickHull> open source =/= productizing
<RickHull> often times you can get a dev boost, i.e. unpaid labor, by open sourcing
nhhagen has quit [Read error: Connection reset by peer]
bronson has joined #ruby
<RickHull> not something to count on -- by far most open source projects have a single developer
nhhagen has joined #ruby
<Ox0dea> > =/= in a programming channel
<RickHull> > quoating meam arrows
jenrzzz has joined #ruby
<Ox0dea> > failing to greentext
maletor has quit [Quit: Computer has gone to sleep.]
<RickHull> > nooooah
cibs has quit [Ping timeout: 272 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
<RickHull> ok, i have to head home. some of us actually sleep, uknow
cibs has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
RickHull has left #ruby [#ruby]
MatthewRock has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
krz has joined #ruby
Musashi007 has quit [Quit: Musashi007]
workmad3 has quit [Ping timeout: 245 seconds]
olistik has joined #ruby
ruby-lang189 has quit [Ping timeout: 246 seconds]
anisha has joined #ruby
<MatthewRock> Hello. I'm new to ruby. I want to do the following: given path /some/path/keyword/rest/of/path/file.extension, I want to get /rest/of/path -> so path after keyword, without file. I know how to use sed to alter string like that, but I don't know how to call sed in Ruby on string.
<MatthewRock> So is there a way to use sed like that, or does ruby has something similar?
vondruch has quit [Quit: Ex-Chat]
conor_ has joined #ruby
<ljarvis> MatthewRock: File.dirname(path).split("keyword").last
shock_one has joined #ruby
<Ox0dea> >> '/some/path/keyword/rest/of/path/file.extension'[%r'keyword(/.+)/', 1] # MatthewRock
<ruboto> Ox0dea # => "/rest/of/path" (https://eval.in/416618)
mikecmpbll has joined #ruby
<MatthewRock> wow, thanks ljarvis
sinkensabe has quit [Read error: Connection reset by peer]
<MatthewRock> It's really simple
<MatthewRock> And thanks Ox0dea, but I think i'll go with split and last
<Ox0dea> Yay, more method calls! :P
baweaver has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
<MatthewRock> If I wanted it to be fast, I wouldn't use ruby anyway :p
<ljarvis> #pwned
vondruch has joined #ruby
rakm has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DLSteve has quit [Ping timeout: 244 seconds]
bascht has quit [Quit: WeeChat 1.2]
bernardio has joined #ruby
bascht has joined #ruby
<adaedra> Bonjour
tomphp has joined #ruby
troulouliou_div2 has joined #ruby
bumbar_ has joined #ruby
troulouliou_divn has joined #ruby
arta82 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has quit [Remote host closed the connection]
troulouliou_divn has quit [Remote host closed the connection]
arta82 has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pathfinder_ has joined #ruby
tomphp has quit [Client Quit]
Musashi007 has joined #ruby
cajone has quit [Read error: Connection reset by peer]
Pathfinder has quit [Ping timeout: 240 seconds]
joonty has joined #ruby
flegercovateam has joined #ruby
cajone has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
j3r0 has joined #ruby
jenrzzz has joined #ruby
charliesome has joined #ruby
<yorickpeterse> morning
xcesario_ has joined #ruby
tomphp has joined #ruby
coban2k has quit [Remote host closed the connection]
Pupeno has joined #ruby
xcesariox has quit [Ping timeout: 264 seconds]
shock_one has quit [Remote host closed the connection]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
olistik has quit [Remote host closed the connection]
shock_one has joined #ruby
j3r0 has quit [Ping timeout: 256 seconds]
juanpablo__ has joined #ruby
lwu has quit [Quit: This computer has gone to sleep]
Oka has quit [Quit: さようなら]
Musashi007 has quit [Quit: Musashi007]
olistik has joined #ruby
rdark has joined #ruby
<[spoiler]> yorickpeterse: yorning
dhjondoh has quit [Remote host closed the connection]
leat has quit [Ping timeout: 264 seconds]
<[spoiler]> Brainfart. I wanted to type "morning, yorick"
<[spoiler]> yorick<tab>* that is
<apeiros> morickpeterse: yorning ?
cibs has quit [Ping timeout: 272 seconds]
djbkd has quit [Read error: Connection reset by peer]
djbkd_ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sectionm1 has quit [Ping timeout: 240 seconds]
skinofstars has joined #ruby
<[spoiler]> apeiros: Lol! :-)
xcesario_ has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
juanpablo__ has quit [Ping timeout: 244 seconds]
djbkd_ has quit [Client Quit]
sectionme has joined #ruby
<apeiros> harrr, friday
cibs has joined #ruby
<apeiros> week-end, anytime soon™
<adaedra> yay
ndrei has quit [Ping timeout: 246 seconds]
<sevenseacat> \o/
<ashleyhindle> ~~~\o/~~~
<[spoiler]> awyis; + I was supposed to work tomorrow, but it's also a holiday, so I don't work, which means I get 2 free weekends in a row! boom
<adaedra> ashleyhindle: maybe it's time to shave your armpits
<adaedra> [spoiler]: your work 6 days a week?
<adaedra> you*
<[spoiler]> adaedra: It's a 5 days + 2 weekends, but those 2 days are about 30 minutes shorter, so I work 7.5 hours instead of 8 ours a day.
<ashleyhindle> adaedra: I'll live my life how I want!!
<adaedra> o_O
rdark has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 264 seconds]
shock_one has quit [Remote host closed the connection]
codecop has joined #ruby
workmad3 has joined #ruby
<[spoiler]> adaedra, ashleyhindle: I thought that was like the force/magic/biotics/whatever
<ashleyhindle> It's water! He's drowning, and you didn't save him
<ashleyhindle> Now who's the bad guy?!
Trynemjoel has quit [Ping timeout: 250 seconds]
<[spoiler]> Oooh, water
duncannz has joined #ruby
<jhass> you for throwing him into the water?
Trynemjoel has joined #ruby
rdark has joined #ruby
<apeiros> oh dear deary me… why do I do this all wrong again…
dionysus69 has joined #ruby
xcesariox has joined #ruby
<apeiros> anybody know how to get the directory of a gem via ruby code?
<apeiros> i.e. similar to how Gem.datadir("gemname") gets you the data directory
shredding has joined #ruby
chichou has joined #ruby
quimrstorres has quit [Remote host closed the connection]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yh has joined #ruby
bodgix has joined #ruby
einarj has joined #ruby
leafybasil has quit [Remote host closed the connection]
f4cl3y has joined #ruby
f4cl3y has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
leafybasil has joined #ruby
MatthewRock has quit [Ping timeout: 246 seconds]
flegercovateam has quit [Quit: Leaving.]
flegercovateam has joined #ruby
quimrstorres has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
user1138 has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
<jhass> datadir is File.join spec.full_gem_path, "data", gem_name
bernardio has quit [Ping timeout: 250 seconds]
user1138 has joined #ruby
yh has quit [Ping timeout: 244 seconds]
leafybasil has quit [Ping timeout: 246 seconds]
face has quit []
<jhass> so Gem.loaded_specs[gem].full_gem_path ?
jenrzzz has quit [Ping timeout: 272 seconds]
krz has quit [Read error: Connection reset by peer]
<apeiros> got distracted
* apeiros tries that
yh has joined #ruby
<apeiros> yupp
<apeiros> that works
<apeiros> great. now on to emulate rails' "lets add all directories under <gem>/app to the load path" (though, rails actually adds it to its own autoloading mechanism)
RegulationD has joined #ruby
<apeiros> rabbit holes… I should learn to recognize them and not go down…
face has joined #ruby
tomphp has joined #ruby
marr has joined #ruby
<apeiros> Ox0dea: that too has the prerequisite of me knowing the path of that stuff ;-)
Kortes has joined #ruby
jenrzzz has joined #ruby
<apeiros> and I can live without autoloading. I find that a bad idea anyway.
* adaedra autoloads apeiros
Kortes has quit [Client Quit]
<apeiros> oh wow, nokogiri segfaults? long time no see…
RegulationD has quit [Ping timeout: 246 seconds]
rdark has quit [Quit: leaving]
rdark has joined #ruby
<apeiros> *requiring* nokogiri segfaults
arta82 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
j4cknewt has quit [Remote host closed the connection]
<apeiros> what. the. fuck.
<ljarvis> :/
<apeiros> just `pry -rnokogiri` doesn't segfault
[k- has joined #ruby
<apeiros> but within the project, when I loaded everything and then require nokogiri, it segfaults.
jenrzzz has quit [Ping timeout: 244 seconds]
bernardio has joined #ruby
<ljarvis> lolruby
lessless has joined #ruby
<apeiros> and unless webrick/rack come with native extensions nowadays, everything is just plain ruby code
dhjondoh has joined #ruby
<ljarvis> rm nokogiri; add oga
<apeiros> if this problem persists, I might even.
<apeiros> ok. reinstalling doesn't help.
<apeiros> and it is the newest version.
<adaedra> let oga fill your dreams
oo_ has quit [Remote host closed the connection]
shock_one has joined #ruby
dhjondoh has quit [Client Quit]
acosonic has joined #ruby
iateadonut has quit [Quit: Leaving.]
<apeiros> random segfaults… trying to isolate it and it goes away.
shock_one has quit [Remote host closed the connection]
<apeiros> fucking heisenbugs
<acosonic> Hi, trying to restart puma with pumactl on windows, but keep getting bad URI(is not URI?): no matter what I do
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
frem has joined #ruby
oo_ has joined #ruby
codecop has quit [Remote host closed the connection]
<apeiros> I'm at the same code again as before which in 100% of all cases produced a segfault. and now it doesn't segfault anymore.
<apeiros> yorickpeterse: oga is 100% ruby?
<yorickpeterse> apeiros: No
bernardio has quit [Quit: bernardio]
<apeiros> :'(
<yorickpeterse> apeiros: about 91% per Github
bernardio has joined #ruby
<yorickpeterse> The other ~10% is C/Java
<yorickpeterse> https://github.com/YorickPeterse/oga/tree/master/ext basically just this
<yorickpeterse> same goes for the ruby-ll dependency
<acosonic> any ideas about what should I do with puma windows, how to restart it?
<[k-> so it uses a lot of memory then
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> yorickpeterse: that's a ragel lexer?
<yorickpeterse> Yes
<yorickpeterse> [k-: eh?
j4cknewt has joined #ruby
<apeiros> I assume the ruby lexer generated from ragel is too slow?
dhjondoh has joined #ruby
<yorickpeterse> Yes, it used to be pure Ruby
<yorickpeterse> But in that case lexing 10MB of XML would take something like 5 seconds
<yorickpeterse> whereas now it takes ~500 ms
<apeiros> ok, was going to ask that
<yorickpeterse> of which ~450 ms is Ruby itself
<yorickpeterse> (Ragel itself is stupid fast)
<apeiros> tbh, I find 50ms for 10MB of data still quite a lot
symm- has quit [Ping timeout: 244 seconds]
<apeiros> that boils down to 200MB/s
leafybasil has joined #ruby
<yorickpeterse> It might've been less, IIRC I calculated it to ~2GB/s
troulouliou_div2 has quit [Quit: Leaving]
<apeiros> ok, that sounds more reasonable
<yorickpeterse> the moment you call a single Ruby method that goes up to around 100ms
<yorickpeterse> :/
troulouliou_div2 has joined #ruby
<apeiros> I know
<apeiros> method call overhead is insane
<apeiros> I still have iso8601 parsing C code
arup_r has quit [Remote host closed the connection]
<apeiros> parses ~3mio datetimes per second
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> the moment you add ruby to it, that number is destroyed.
<jhass> time to move to crystal <3 :P
TheHodge has joined #ruby
<apeiros> jhass: I know.
<jhass> (I'm mostly j/k ;) )
<apeiros> jhass: if you team up with me to write a crystal version of my framework's back-end :D
Karpah has joined #ruby
<jhass> mmmh
<yorickpeterse> maybe once Crystal has a proper GC
sevenseacat has quit [Ping timeout: 260 seconds]
<jhass> that's all there's to it
<yorickpeterse> Boehm is anything but proper
olistik has quit [Remote host closed the connection]
<yorickpeterse> and last I checked doing a concurrent GC of sorts in LLVM is stupid hard
<yorickpeterse> HLVM or w/e it was called did it, but they had to replace a large chunk of the usual LLVM code with their own to support it
joonty has quit [Quit: joonty]
Zackio has quit [Quit: C-x C-c]
banister has joined #ruby
troulouliou_div2 has quit [Client Quit]
olistik has joined #ruby
<yorickpeterse> apeiros: anyway, how come you're interested in Oga being 100% Ruby? Need it in Opal :P
<yorickpeterse> + ?
<yorickpeterse> (it doesn't run in Opal btw, I tried at some point)
<apeiros> yorickpeterse: no. considering dropping nokogiri.
troulouliou_div2 has joined #ruby
<apeiros> and the reason is random segfaults.
<yorickpeterse> Ah
<yorickpeterse> Well, Oga doesn't segfault
<apeiros> but if oga has C code too… :-S
<apeiros> sez u!
<yorickpeterse> https://github.com/YorickPeterse/oga/commit/32b75bf62c0c1770b68e7e1a9918718943d1c04c there's this concurrency issue that I still have to release though, probably should do that this weekend
<yorickpeterse> euh yeah, if Oga segfaults I'll buy you a beer
<apeiros> bro, I work in a company which is 90% sales force. I learned not to trust salesmen ;-p
<yorickpeterse> haha
<yorickpeterse> Well, I don't sell enterprise contracts so you're safe
<yorickpeterse> and my EULA doesn't forbid reverse engineering either
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zackio has joined #ruby
<apeiros> yorickpeterse: no security by oracle?
oo_ has quit [Remote host closed the connection]
charliesome has joined #ruby
charliesome has quit [Client Quit]
<apeiros> I can't trust your software then!
<[k-> desperation
<[k-> Oracle doesn't even write good software
oo_ has joined #ruby
DaniG2k has joined #ruby
<apeiros> [k-: for realsies? :D
<[k-> look how heath.gov turned out
<adaedra> THANKS OBAMA
<yorickpeterse> apeiros: in all seriousness, if it segfaults I'll buy you a beer
<yorickpeterse> Hm, maybe I should put that in the README
<apeiros> [k-: I had experiences like sqlite3 on my local machine outperforming oracle on a 256GB RAM + 16 core machine by a factor of 50
<jhass> lol
<apeiros> yorickpeterse: that's a bad deal. I don't drink beer.
<yorickpeterse> apeiros: fine, tea
frozen3 has joined #ruby
<yorickpeterse> also what's this, a Swiss not drinking beer?
dangerousdave has joined #ruby
<apeiros> [k-: oh, and that was NOT by using an in-memory db. plain normal disk based table.
<yorickpeterse> next you're telling me you don't wear lederhosen too
oo_ has quit [Remote host closed the connection]
<Karpah> hah
Karpah is now known as sevenseacat
<[k-> sounds horrible, those cheats!
<apeiros> yorickpeterse: lederhosen is our northern brethren
<apeiros> munich, that's germany, not switzerland :)
joonty has joined #ruby
<[k-> I'm going to take a nap
<jhass> switzerland is clocks, cheese, chocolate & money
<adaedra> Money ♫
<adaedra> It's a crime ♫
<yorickpeterse> apeiros: thatsthejoke.jpg
<apeiros> aha!
<apeiros> anyway, [k- yes, oracle sucks. hard. fuck them.
leat has joined #ruby
<adaedra> er no
<yorickpeterse> sssh careful now, they might void your contract
<adaedra> think of the stds you can catch :X
<yorickpeterse> Pretty sure the EULA doesn't allow you to insult Oracle
<apeiros> adaedra: lol
<apeiros> *metaphorically* of course!
<apeiros> figuratively?
lessless has joined #ruby
rikkipitt has joined #ruby
<adaedra> There's a guy that tried "I'll fuck you" on Twitter to national train company, one driver responded with "You better prepare, we're 60000."
<apeiros> that'd give a nasty burn
<yorickpeterse> apeiros: so the one thing with Oga, parsing will be slower
<yorickpeterse> but xpath/css querying will soon be faster
<yorickpeterse> so hopefully the two even out nicely
frozen3 has quit [Ping timeout: 244 seconds]
<yorickpeterse> (faster than nokogiri that is)
<yorickpeterse> and much faster than what Oga currently has
<apeiros> last time I tried css/xpath on nokogiri on a large document I had to force-kill ruby :D
<apeiros> *with nokogiri
<apeiros> was a bit disappointed, to say the least.
khebbie_ has joined #ruby
khebbie has quit [Read error: Connection reset by peer]
<yorickpeterse> Right now Oga too will shit itself
<yorickpeterse> but the new setup will be a shit ton better
peterhil has quit [Quit: Must not waste too much time here...]
<apeiros> good to hear. regardless of whether I'll actually use oga. competition is always good :)
<maloik> is that metric, or freedom units?
<yorickpeterse> maloik: both
<apeiros> haha, freedom units
<maloik> you're so inclusive <3
<apeiros> 5 mile* run (*freedom units)
<Diabolik> sup everyone
olistik has quit [Remote host closed the connection]
<yorickpeterse> HAHA, I'm such a dumbass:
<apeiros> Diabolik: lunch
<yorickpeterse> "Why does this script not reduce the amount of reviews without a language"
<yorickpeterse> query: " ... WHERE language IS NOT NULL ... "
<yorickpeterse> yeah no shit
* yorickpeterse bangs head
dhjondoh has quit [Quit: dhjondoh]
<yorickpeterse> that took me...a week to figure out
bernardio has quit [Quit: bernardio]
* apeiros still hates how NULL interacts with comparison operators :-(
<acosonic> Hi, trying to restart puma with pumactl on windows, but keep getting bad URI(is not URI?): no matter what I do
<apeiros> WHERE foo <> "bar" OR foo IS NULL
<yorickpeterse> acosonic: might want to report that as a bug at github.com/puma/puma, probably faster to get an answer
conor_ has quit [Remote host closed the connection]
<yorickpeterse> apeiros: I actually wouldn't mind something like `IS BLANK`
<yorickpeterse> which would basically be `(where X is null OR X = '')`
<acosonic> yorickpeterse, thnx I'll try
<yorickpeterse> though in Pg I could just define a function for that
<apeiros> yorickpeterse: wouldn't help with the <> clause
conor_ has joined #ruby
<yorickpeterse> hm
<apeiros> ora> SELECT CASE WHEN 'foo' <> NULL THEN 'unequal' ELSE 'equal' END x FROM dual; -- >> 'equal'
<apeiros> because that makes so much sense >.<
<apeiros> <me> ( `Д´)=◯)`ν°) <oracle>
<apeiros> well, actually sql in this case.
_blizzy_ has joined #ruby
<yorickpeterse> Allrighty, time to deploy Rails 4 everywhere
<yorickpeterse> this can only go right
chichou has quit [Remote host closed the connection]
<apeiros> good luck.
<adaedra> apeiros: that's not allowed by the EULA
<DaniG2k> has anyone used raspberry pi as a webserver?
<DaniG2k> in this channel, I mean
<DaniG2k> not in the multiverse @_@
<apeiros> jhass: have you?
rdark has quit [Ping timeout: 244 seconds]
<apeiros> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
<apeiros> meh
<jhass> kinda, yes
<DaniG2k> that was my question :P
<DaniG2k> i just want to know if it's good or bad
<jhass> ?anybody
<ruboto> jhass is anybody
<apeiros> DaniG2k: yes, yes, that was not what I was looking for :)
<DaniG2k> :D
<yorickpeterse> DaniG2k: how do you know people in here don't co-exist in multiple universes?
<apeiros> ah, damn. anybody not anyone.
<DaniG2k> seems they're sold out in the UK though...jeez
<jhass> apeiros: you didn't want them equal!
<DaniG2k> yorickpeterse: rubyists can barely multi-thread let alone co-exist in multiple universes
<adaedra> DaniG2k: possible, but don't expect performance.
<jhass> DaniG2k: "webserver" is not particularly well defined
dangerousdave has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> DaniG2k: oooooooh, right in the kisser
<DaniG2k> jhass: good point
<DaniG2k> adaedra: good point
<apeiros> jhass: something which speaks HTTP?
* adaedra gives yorickpeterse some cold water
Pathfinder_ has quit [Remote host closed the connection]
<adaedra> I do
<jhass> apeiros: like curl?
<adaedra> HTTP/1.1 GET /hello
<jhass> or ... wget?
symm- has joined #ruby
<apeiros> jhass: something which speaks HTTP and can read a HTTP request and respond with an HTTP response?
<jhass> adaedra: other way around, no?
<adaedra> indeed
<adaedra> I mixed query and answer
<jhass> apeiros: I tend to use http server as the general term
<jhass> point is people mean all sorts of stuff when they say webserver
<DaniG2k> i meant what aperios said
<apeiros> who?
_blizzy_ has quit [Read error: Connection reset by peer]
<jhass> ?aperios
<ruboto> I don't know anything about aperios
bernardio has joined #ruby
<DaniG2k> apeiros
<jhass> mmh
<DaniG2k> grrr vowels
<apeiros> ?tabnick DaniG2k
<ruboto> DaniG2k, pro-tip - use tab completion for nicks. avoids typos in nicks.
<DaniG2k> ruboto: hi
aperios has joined #ruby
<adaedra> ?justabot
<ruboto> I'm just a bot. You don't need to address me.
<ruboto> hi DaniG2k
<aperios> let's see how that goes
<apeiros> LUNCH! cya
<DaniG2k> :'(
rdark has joined #ruby
<DaniG2k> soon everything will be run by robots
<apeiros> .!kick aperios nooooo!
<aperios> yesss
<DaniG2k> they actually had a documentary on this on Al Jazeera
<adaedra> apeiros: tbf, my tab doesn't work if I put the ? :(
<DaniG2k> scary
<jhass> DaniG2k: so the answer is sure, I bet many did
<`derpy> You have a problem with robots?
_blizzy_ has joined #ruby
<`derpy> <3
iateadonut has joined #ruby
<DaniG2k> i hate people
<DaniG2k> changing our oceans
<DaniG2k> :(
dhjondoh has joined #ruby
rdark has quit [Quit: leaving]
<jhass> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
bernardio has quit [Quit: bernardio]
LMity has joined #ruby
mescalito has quit [Quit: mescalito]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lucyinthesky has joined #ruby
rdark has joined #ruby
bernardio has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
joonty has quit [Ping timeout: 265 seconds]
vrinek has joined #ruby
LMity has quit [Ping timeout: 272 seconds]
<vrinek> hi, I’m trying to debug a timezone-related issue
Trynemjoel has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
olistik has joined #ruby
sbhatore has quit [Ping timeout: 255 seconds]
<vrinek> seems like my ruby 2.2.2 reports Uruguay as observing DST
<vrinek> but on codeship (not 100% sure but looks like it’s 2.2.2) does not
<vrinek> last month Uruguay decided to not observe DST anymore
arup_r has joined #ruby
<vrinek> and ruby 2.2.2 dates back to april
<vrinek> so obviously it could not include this info
spider-mario has joined #ruby
<vrinek> any ideas where ruby sources the timezone info from?
<yorickpeterse> IIRC it uses your system's tzdata database
joonty has joined #ruby
sigurding has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
<vrinek> thanks, I’ll look into it
Trynemjoel has joined #ruby
<sigurding> Hey guys, short question I am adding a gauge (https://github.com/johnewart/ruby-metrics/) to a hash, but instead the value changing the value remains the https://gist.github.com/jhiemer/df46b3880d62d7c1f1d9 the same. Could anyone explain me why?
Pupeno has quit [Quit: Leaving...]
vrinek has quit [Quit: vrinek]
mclee has quit [Ping timeout: 246 seconds]
PaulCapestany has quit [Ping timeout: 264 seconds]
dhjondoh has quit [Remote host closed the connection]
mclee has joined #ruby
DaniG2k has quit [Quit: leaving]
sideshowcoder has joined #ruby
<jhass> scnr
<adaedra> we need a ?random
juanpablo__ has joined #ruby
sdothum has joined #ruby
<ashleyhindle> Change ?ot to ?rot (random off topic)
<ashleyhindle> Also ?rot sounds cool
khebbie_ has quit [Remote host closed the connection]
olistik has quit [Remote host closed the connection]
workmad3 has joined #ruby
<sigurding> jhass: :-)
<sigurding> but that does not help. So any idea?
conor_ has quit [Remote host closed the connection]
lokulin has quit [Changing host]
lokulin has joined #ruby
lele is now known as Guest24
olistik has joined #ruby
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
charliesome has joined #ruby
Rickmasta has joined #ruby
juanpablo__ has quit [Ping timeout: 240 seconds]
charliesome has quit [Client Quit]
charliesome has joined #ruby
conor_ has joined #ruby
DaniG2k has joined #ruby
charliesome has quit [Client Quit]
<DaniG2k> hey guys how can I add some metaprogramming magic to dry up these methods
charliesome has joined #ruby
charliesome has quit [Client Quit]
<arup_r> http://ruby-doc.org/core-2.2.2/IO.html#method-i-lineno gives currnt line number, what is there to get the current file pointer position ?
<DaniG2k> they are basically all the same in that they check if @tknz; do something, else set_tokens and do something
<DaniG2k> I want to basically write one method that can define these on the fly if possible
<yorickpeterse> ?guys
<ruboto> Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<ljarvis> DaniG2k: just set_tokens before you ever call any of those methods
<DaniG2k> ljarvis: I tried that but it turns out that doesnt do what I expected
<jhass> DaniG2k: rename set_tokens to tokens and use only it to access
olistik has quit [Remote host closed the connection]
oo_ has joined #ruby
<ljarvis> also that
<DaniG2k> yorickpeterse girls and boys
<sevenseacat> its not the first time you've been hit with that factoid DaniG2k
terlar has quit [Quit: WeeChat 1.2]
terlar has joined #ruby
Tempesta has joined #ruby
radgeRayden_ has quit [Ping timeout: 265 seconds]
Meow-J has joined #ruby
olistik has joined #ruby
sectionme has quit [Ping timeout: 256 seconds]
cornerma1 has joined #ruby
khebbie has joined #ruby
sectionme has joined #ruby
rdark has quit [Quit: leaving]
terlar has quit [Quit: WeeChat 1.2]
stamina has joined #ruby
<DaniG2k> ok thanks guys
chichou has joined #ruby
<DaniG2k> will try using define_method in a clever way :)
terlar has joined #ruby
duncannz has quit [Ping timeout: 264 seconds]
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
Ropeney has joined #ruby
oo_ has quit [Remote host closed the connection]
terlar has quit [Client Quit]
<sevenseacat> ...
<sevenseacat> no seriously.
<ashleyhindle> hahaha
iamninja has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
_blizzy_ has quit [Ping timeout: 240 seconds]
<ashleyhindle> Some guys never learn :(
<apeiros> that actually marks the first time I ponder a ban based on ?guys.
terlar has joined #ruby
einarj has quit []
mattp- has quit [Quit: WeeChat 1.1.1]
<apeiros> anyway, DaniG2k, you're cutting yourself off of a lot of goodwill by your behavior. at least for me you're one of those people I'll probably not help.
conor_ has quit [Remote host closed the connection]
bruno- has joined #ruby
NightMonkey has quit [Ping timeout: 250 seconds]
abdoudjanifresh has joined #ruby
conor_ has joined #ruby
leat has quit [Ping timeout: 256 seconds]
oo_ has quit [Remote host closed the connection]
Kalov has quit []
sigurding has quit [Quit: sigurding]
<atmosx> aloha
Vile` has quit [Ping timeout: 240 seconds]
vondruch has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
kidoz has joined #ruby
oo_ has joined #ruby
<adaedra> welcome
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
DaniG2k has quit [Quit: leaving]
phutchins1 has joined #ruby
<ekleog> Hi there! Is there a way for object A to modify a variable internal to object B, if both belong to the same class? I'm hurt by the "unexpected tIVAR" syntax error :/
Vile` has joined #ruby
<apeiros> ekleog: only via a method
<apeiros> i.e., provide a method to perform that modification. if only objects from the same class should be able to call that method, mark the method as protected.
guardian has joined #ruby
<guardian> hello I need a quick hand with httparty. I want to issue a post request http://example.com?foo=bar -- should I inject "?foo=bar" myself to the URL or should I use :query ?
jimms has joined #ruby
shazaum_ has quit [Quit: This computer has gone to sleep]
<ekleog> apeiros: Thanks!
njr has quit [Ping timeout: 250 seconds]
shredding has quit [Ping timeout: 260 seconds]
shock_one has joined #ruby
<apeiros> ekleog: yw
chipotle has joined #ruby
<apeiros> guardian: if httparty provides a method to generate the url params, use that
<apeiros> it'll correctly encode it and all
<[spoiler]> guardian: I think when you use the methods, it will encode them
<[spoiler]> what he said ^
bernardio has quit [Quit: bernardio]
rodfersou has joined #ruby
sarkyniin has joined #ruby
<guardian> yep apparently when you use :query it forges a query string
<guardian> damn this gem is so poorly documented :/
<guardian> also it seems setting :query to something and at the same time :body to nil makes it not forge the query string
<adaedra> it's not a party if you don't have FUN!
phutchins has quit [Quit: WeeChat 1.1.1]
phutchins1 has quit [Quit: WeeChat 1.1.1]
<guardian> it's definitely not one :)
robh71 has joined #ruby
joonty has quit [Ping timeout: 265 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest24 has quit [Ping timeout: 240 seconds]
lele has joined #ruby
youngbaks has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
sectionme has quit [Ping timeout: 256 seconds]
Trynemjoel has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
sectionme has joined #ruby
conor_ has quit [Remote host closed the connection]
chichou has quit []
krz has joined #ruby
shock_one has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 250 seconds]
lele is now known as Guest24
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robh71 has joined #ruby
Ropeney has joined #ruby
User458764 has joined #ruby
wedgwood has quit [Ping timeout: 246 seconds]
solars has quit [Quit: WeeChat 0.4.2]
robh71 has quit [Client Quit]
olistik has quit [Remote host closed the connection]
wedgwood has joined #ruby
solars has joined #ruby
phutchins has joined #ruby
mattp_ has joined #ruby
mattp_ has left #ruby [#ruby]
chipotle has quit [Quit: cheerio]
pyon has quit [Quit: fix config]
user1138 has quit [Remote host closed the connection]
VeganGreg has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
j4cknewt has quit [Remote host closed the connection]
user1138 has joined #ruby
pyon has joined #ruby
j4cknewt has joined #ruby
robh71 has joined #ruby
j4cknewt has quit [Remote host closed the connection]
Ropeney has joined #ruby
thiagovsk has joined #ruby
user1138 has quit [Remote host closed the connection]
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
hs366 has quit [Quit: Leaving]
sigurding has joined #ruby
sectionm1 has joined #ruby
rikkipitt has quit [Quit: Leaving...]
frem has quit [Quit: Connection closed for inactivity]
sectionme has quit [Ping timeout: 260 seconds]
Rickmasta has joined #ruby
lucyinthesky has joined #ruby
but3k4 has joined #ruby
youngbaks has quit [Quit: WeeChat 1.2]
lucyinthesky has quit [Quit: Leaving]
<ekleog> Already back: I use assert_output from Minitest to check that a given function outputs something. However, I just changed the function from using puts to print ; and suddenly assert_output finds there is nothing outputted. Do you know why ?
bruno- has quit [Ping timeout: 246 seconds]
monsieurp has quit [Quit: Lost terminal]
<[spoiler]> ekem: did you flush?
<[spoiler]> ekleog: * oops
faces has joined #ruby
faces has quit [Read error: Connection reset by peer]
faces has joined #ruby
iamninja has joined #ruby
face has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
bronson has joined #ruby
tuxero has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timanema has quit [Ping timeout: 272 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
hs366 has joined #ruby
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 246 seconds]
banister has joined #ruby
robh71 has joined #ruby
intuxicated has joined #ruby
sshuff|gone is now known as sshuff
Zackio has quit [Remote host closed the connection]
Jammyhammy|Work has quit [Read error: Connection reset by peer]
skinofstars has quit [Ping timeout: 256 seconds]
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[k-_ has joined #ruby
Zackio has joined #ruby
robh71 has joined #ruby
<atmosx> ekleog: does print add a newline ? \n
<al2o3-cr> atmosx: no
juanpablo__ has joined #ruby
<atmosx> can't recall
<shevy> print just prints without modification
ldnunes has joined #ruby
<atmosx> then this might be the problem (or maybe not, try adding a newline manually and see what happens)
basmoura has joined #ruby
<atmosx> shevy: how's life?
flou has joined #ruby
lannonbr has joined #ruby
oo_ has quit [Remote host closed the connection]
<ekleog> atmosx: Actually that was the point of switching to print ; and assert_output gives me a diff that shows nothing is displayed ; but now debugging I seem to have much deeper problems in my code (eg. a theoretically minor change just made a seemingly trivial test infinite-loop...)
bluOxigen has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
juanpablo__ has quit [Ping timeout: 246 seconds]
<atmosx> ekleog: awesome -P
basmoura_ has joined #ruby
<ekleog> Oh. My. God.
<ekleog> Switching from print to puts just makes the infinite loop go away
VeganGreg has quit [Ping timeout: 240 seconds]
<ekleog> Now I just wonder wtf is going on
<apeiros> well
<apeiros> ?code ekleog
<ruboto> ekleog, We can't help you without your code, please post it to https://gist.github.com
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nveselinov has joined #ruby
skinofstars has joined #ruby
basmoura has quit [Ping timeout: 245 seconds]
quimrstorres has quit [Remote host closed the connection]
nettoweb has joined #ruby
sdwrage has joined #ruby
quimrstorres has joined #ruby
twohlix has quit [Ping timeout: 245 seconds]
Philipp__ has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
yh has quit [Ping timeout: 245 seconds]
quimrstorres has quit [Ping timeout: 250 seconds]
twohlix has joined #ruby
unver has joined #ruby
VeganGreg has joined #ruby
yh has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has quit [Read error: Connection reset by peer]
mujou has joined #ruby
Pumukel has joined #ruby
jimms has quit [Remote host closed the connection]
rbennacer has joined #ruby
leat has joined #ruby
<[k-_> is he goonneeee
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
conor_ has joined #ruby
<ekleog> (no, just trying to find a minimal non-working example)
<[k-_> you can just point us to the part that is causing the error
<[k-_> additional code surrounding it might help, who knows?
uwa667 has joined #ruby
atomical has joined #ruby
olistik has joined #ruby
j3r0 has joined #ruby
<shevy> atmosx it's way too hot here
<shevy> atmosx 34.6°C I can't code at such a temperature
<shevy> and that isn't even peak for today :(
<[k-_> where does you live
<[k-_> i predict northern hemisphere!
<apeiros> shevy: aren't you in austria?
<shevy> central europe - there is an ongoing heatwave
<[k-_> at low altitudes!
<shevy> yeah
<[k-_> far away from the sea!
<apeiros> wow, didn't know it's that much hotter over there
<[k-_> with low cloud cover!
<shevy> Zurich: Temperature 21°C I envy you guys :(
<apeiros> shevy: yeah, that's just today
<shevy> [k-_ I miss Hong Kong
<apeiros> but indeed, I'm happy temperatures finally fell
<[k-_> that is because the sun's ray strikes the earth's surface at an angle
<[k-_> and the earth is tilted on it's axis at 23.5 deg C
<[k-_> its*
sepp2k has joined #ruby
<[k-_> in august, the northern hemisphere will be tilted towards the sun, as the earth revolves around the sun
<ljarvis> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<[k-_> but shevy isnt in ot :(
ishahnaz has joined #ruby
<ekleog> OMG just found why ; stupid mistake...
_blizzy_ has joined #ruby
<ekleog> My lambda was calling print, but located inside a member function called print...
d10n-work has joined #ruby
sgambino has joined #ruby
* ekleog feels stupid
ghoti has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
<[k-_> dont name things things that are used in kernel then
bruno- has joined #ruby
_blizzy_ has joined #ruby
<jhass> >> Kernel.print "Why not?"
<ruboto> jhass # => Why not?nil (https://eval.in/416746)
frozen3 has joined #ruby
RegulationD has joined #ruby
<[k-_> not that anyone would remember unless they are careful
<ljarvis> >> Kernel.loop.to_enum.to_enum.method(:loop).to_enum
<ruboto> ljarvis # => #<Enumerator: #<Method: Enumerator(Kernel)#loop>:each> (https://eval.in/416747)
<ljarvis> k
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
devoldmx has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
dgutierrez1287 has joined #ruby
<ljarvis> >> method(:loop).[]{break}
<ruboto> ljarvis # => nil (https://eval.in/416748)
* ljarvis waiting for shit to compile
nwhirschfeld has quit [Quit: No Ping reply in 180 seconds.]
Guest50 has joined #ruby
rbennacer has quit [Remote host closed the connection]
nwhirschfeld has joined #ruby
<[k-_> wait, you can closure using .[], but not []?
RegulationD has quit [Ping timeout: 260 seconds]
<ljarvis> correct
khebbie has quit [Remote host closed the connection]
Hal_9000_ has joined #ruby
olistik has quit [Remote host closed the connection]
flou has quit [Quit: Textual IRC Client: www.textualapp.com]
bustrarm is now known as busterarm
<maloik> what's the best (easiest?) way to compare memory usage when using %x(), Kernel#system, Kernel#` and a couple Chef-specific things?
<maloik> my colleagues suspect that some of the ones they use completely duplicate the process making the server go out of memory, but I'm actually not sure of how to compare them
sectionm1 has quit [Ping timeout: 245 seconds]
<jhass> launch your script in a memory accounting cgroup and watch that ones memory usage
sectionme has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
<jhass> that's not the easiest way, but the most reliable one to get a significant number
StevenXL has quit [Ping timeout: 240 seconds]
juanpablo__ has joined #ruby
Hal_9000_ has quit [Quit: Hal_9000_]
dorei has joined #ruby
<maloik> sounds somewhat hard, especially considering we're talking about chef runs in this case
<maloik> any other options come to mind?
cabreraM516 has joined #ruby
<jhass> well, it's a couple cgexec calls and then watching /sys/fs/cgroup/.../measure/memory.usage_in_bytes
<[k-_> this sounds like the kind of things people would write in a blogpost hm
juanpablo__ has quit [Ping timeout: 246 seconds]
<[k-_> they probably will be a good resource!
rippa has joined #ruby
<jhass> systemd can make it a bit nicer of course
arta82 has joined #ruby
oo_ has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
Ox0dea has quit [Ping timeout: 246 seconds]
dblessing has joined #ruby
Ropeney has joined #ruby
<unver> Hi, what's a good way to check two arrays for shared values?
christiandsg has joined #ruby
<maloik> [k-_: im not sure what to make of your comment :D
nettoweb has joined #ruby
<[k-_> it wasnt meant to be "do your research" kind of thing
<unver> nm, I just discovered the & operator
allcentury has joined #ruby
cabreraM516 has quit [Quit: Textual IRC Client: www.textualapp.com]
jobewan has joined #ruby
cabreraM516 has joined #ruby
<[k-_> people spell nevermind with just two letters now :(
<unver> just how people don't capitalize or use punctuation for sentences :(
frozen3 has quit [Remote host closed the connection]
<ljarvis> u wot
slawrence00 has quit [Ping timeout: 256 seconds]
devoldmx has quit [Remote host closed the connection]
fgo has joined #ruby
<maloik> [k-_: ha that's what I was wondering :D cause I did try to look around a little but with little luck
cabreraM516 has quit [Client Quit]
<[k-_> so no one wrote blogposts? inconceivable
<[k-_> I *would* expect at least one ¯\_(ツ)_/¯
<maloik> well I suppose people did, just didn't find them (yet)
JoshL has joined #ruby
jerius has joined #ruby
al2o3-cr has joined #ruby
francois_ has joined #ruby
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<maloik> crossposted to the chef channel, it's probably more at home there
francois_ has quit [Client Quit]
Feyn has quit [Quit: Leaving]
DoubleMalt has joined #ruby
Guest50 has joined #ruby
whippythellama has joined #ruby
dblessing has quit [Read error: Connection reset by peer]
aganov has quit [Remote host closed the connection]
Hal_9000_ has joined #ruby
victortyau has joined #ruby
sigurding has joined #ruby
wheresmyjetpack has quit [Quit: Konversation terminated!]
quimrstorres has joined #ruby
decoponio has joined #ruby
hs366 has quit [Quit: Leaving]
lucyinthesky has joined #ruby
devdazed has joined #ruby
lucyinthesky is now known as trollvictim
hs366 has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
hinbody has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
DexterLB has joined #ruby
The_Phoenix has joined #ruby
stamina has quit [Ping timeout: 265 seconds]
frozen3 has joined #ruby
jimms has joined #ruby
trollvictim is now known as yellowbird
yellowbird is now known as lucyinthesky
hashrocket has joined #ruby
gambl0re has quit [Ping timeout: 246 seconds]
kies has quit [Ping timeout: 255 seconds]
godzillaenlacasa has quit [Quit: Peace Out Peeps!]
unver has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
nzst has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
casadei_ has joined #ruby
doodleha_ has joined #ruby
Torrieri has quit [Quit: Be back later ...]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
cpruitt has joined #ruby
chouhoulis has joined #ruby
yalue has joined #ruby
nerdist has joined #ruby
umgrosscol has joined #ruby
socialjackie has joined #ruby
polysics has joined #ruby
fmcgeough has joined #ruby
juanpaucar has joined #ruby
momomomomo has joined #ruby
sevenseacat has quit [Quit: .]
timanema has joined #ruby
freerobby has joined #ruby
timanema has quit [Client Quit]
revoohc has joined #ruby
leat has quit [Ping timeout: 260 seconds]
arup_r has quit []
conor_ has quit [Remote host closed the connection]
jimms has quit [Ping timeout: 246 seconds]
conor_ has joined #ruby
ruby-lang817 has joined #ruby
bodgix has quit [Quit: Leaving.]
<ruby-lang817> hi all,
<ruby-lang817> how do we override, the eql? in a certain class?
platzhirsch has joined #ruby
<DefV> .5
bodgix has joined #ruby
bruno- has joined #ruby
spectra_ has quit [Ping timeout: 255 seconds]
<socialjackie> ruby-lang817, like this?
<socialjackie> class Foo; def eql?(other); ... ; end; end
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang817> ok kool, no aother anotation is needed like java or something
<apeiros> ruby-lang817: don't forget that if you change #eql?, you MUST implement #hash accordingly.
<ruby-lang817> oh,
<apeiros> eql? is used in tandem with hash in many cases. most popular case is when the object is used as a hash key.
<apeiros> but also in things like Array#uniq, or Array#& (which internally use a Hash too)
<ruby-lang817> obejcts will be saved in a set
<apeiros> yepp. Set is backed by Hash.
<apeiros> so it won't work properly if you don't define both methods appropriately
<ruby-lang817> ok, any advice on how to implement the hash
<socialjackie> apeiros, which is why checking if an object is in a set is O(1) ?
<apeiros> socialjackie: yes
hashrocket has quit [Ping timeout: 260 seconds]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sectionm1 has joined #ruby
<apeiros> ruby-lang817: if you do e.g. def eql?(other); self.class == other.class && @foo == other.foo; end
bruno- has quit [Ping timeout: 260 seconds]
<apeiros> then you define hash as: def hash; [self.class, @foo].hash; end
sectionme has quit [Ping timeout: 272 seconds]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
christiandsg has quit [Remote host closed the connection]
<ruby-lang817> that's all?
<ruby-lang817> seems straight forward,
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
<apeiros> yupp, that's all.
symm- has quit [Ping timeout: 244 seconds]
conor_ has quit [Remote host closed the connection]
<ruby-lang817> apeiros: always great help, thank you, socialjackie thank you as well....
<apeiros> just make sure that everything which is checked in eql? is also used in generating #hash
conor_ has joined #ruby
<ruby-lang817> ok, understood
<ruby-lang817> I have few variables, so I will add them all the the hash as well
<apeiros> and the cheap way is to just reuse Array#hash :)
<ruby-lang817> sounds great to me, many thanks
<apeiros> yw
tkuchiki has quit [Remote host closed the connection]
xcesariox has quit [Ping timeout: 260 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
<ljarvis> yay for deleting code
<yorickpeterse> tis the best thing
bruno- has joined #ruby
juanpablo__ has joined #ruby
Askilada has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
nerdist has quit [Ping timeout: 244 seconds]
scripore has joined #ruby
<ruby-lang817> one last question apeiros , the order of overriding these two methods is not important I assume?
christiandsg has joined #ruby
ndrei has joined #ruby
umgrosscol has quit [Remote host closed the connection]
<socialjackie> ruby-lang817, as long as they don't call each other it should be fine :)
nzst has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
iamninja has quit [Quit: WeeChat 1.2]
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
sectionme has joined #ruby
silkfox has joined #ruby
hs366 has quit [Quit: Leaving]
sectionm1 has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
Tempesta has joined #ruby
hashrocket has joined #ruby
saddad has joined #ruby
nhhagen has quit [Remote host closed the connection]
juanpablo__ has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
shock_one has joined #ruby
mrtg9970 has joined #ruby
juanpablo__ has joined #ruby
sectionm1 has joined #ruby
v0n has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
sectionme has quit [Ping timeout: 244 seconds]
mrtg9970 has quit [Client Quit]
mrtg9970 has joined #ruby
mrtg9970 has quit [Client Quit]
doodleha_ has quit [Read error: Connection reset by peer]
juanpablo__ has quit [Ping timeout: 246 seconds]
Coldblackice has quit [Ping timeout: 260 seconds]
sectionme has joined #ruby
shmilan has joined #ruby
poguez_ has joined #ruby
dayatz has joined #ruby
terlar has quit [Ping timeout: 245 seconds]
Uuku has joined #ruby
sectionm1 has quit [Ping timeout: 265 seconds]
gregf has quit [Quit: WeeChat 1.1.1]
dtzitz has joined #ruby
nerdist has joined #ruby
<ruby-lang817> awesome
<ruby-lang817> thanks
Guest50 has joined #ruby
gregf has joined #ruby
basmoura_ has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
Zamyatin has joined #ruby
dtzitz has left #ruby [#ruby]
Zamyatin has quit [Max SendQ exceeded]
dopie has joined #ruby
Zamyatin has joined #ruby
spectra has joined #ruby
khebbie has joined #ruby
<apeiros> ruby-lang817: nope. order of definition doesn't matter.
dblessing has joined #ruby
jack_rabbit has quit [Ping timeout: 244 seconds]
j3r0 has quit [Read error: Connection reset by peer]
The_Phoenix has quit [Read error: Connection reset by peer]
conor_ has quit [Remote host closed the connection]
conor_ has joined #ruby
machinewar has joined #ruby
sigurding has quit [Quit: sigurding]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lessless has joined #ruby
havenwood has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
foureight84 has joined #ruby
banister has joined #ruby
hashrocket has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
banister is now known as banisterfiend
shmilan has quit [Ping timeout: 264 seconds]
Trynemjoel has joined #ruby
ghoti has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
jpfuentes2 has quit [Client Quit]
gard has joined #ruby
MasterPiece has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
joonty has joined #ruby
Kalov has joined #ruby
mrtg9970 has joined #ruby
shmilan has joined #ruby
The_Phoenix has joined #ruby
terlar has quit [Read error: Connection reset by peer]
skinofstars has left #ruby [#ruby]
Pumukel has quit [Ping timeout: 244 seconds]
dayatz has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
kies has joined #ruby
michael_mbp has quit [Excess Flood]
spectra has quit [Quit: ZNC - http://znc.sourceforge.net]
jpfuentes2 has joined #ruby
michael_mbp has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
spectra has joined #ruby
RegulationD has joined #ruby
olistik has joined #ruby
soc42 has joined #ruby
bhorn1 is now known as bhorn1|away
_blizzy_ has quit [Ping timeout: 240 seconds]
coban2k has joined #ruby
chouhoul_ has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
clarkenciel has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
chouhoul_ has quit [Read error: Connection reset by peer]
chouhoul_ has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
mrtg9971 has joined #ruby
mrtg9970 has quit [Remote host closed the connection]
mrtg9971 has quit [Remote host closed the connection]
TheNet has joined #ruby
mrtg9970 has joined #ruby
Thomas-0725 has joined #ruby
coban2k has quit [Ping timeout: 255 seconds]
curses has quit [Quit: leaving]
jgpawletko has joined #ruby
sectionm1 has joined #ruby
sectionme has quit [Ping timeout: 240 seconds]
blackoperat has joined #ruby
<shevy> http://www.trelford.com/blog/post/funsharp.aspx <- do we have something like this in ruby? especially the turtle-move one
khebbie has quit [Remote host closed the connection]
polysics has quit []
umgrosscol has joined #ruby
lwu has joined #ruby
arta82 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
northfurr has joined #ruby
lwu has quit [Client Quit]
rbennacer has quit [Remote host closed the connection]
lwu has joined #ruby
j5s7 has joined #ruby
j5s7 has quit [Client Quit]
anisha has quit [Quit: Leaving]
lucyinthesky has joined #ruby
<[k-_> a turtle would be that hackety thingie
<[k-_> i think
tkuchiki has joined #ruby
jobewan has quit [Ping timeout: 255 seconds]
mrtg9970 has quit [Quit: Leaving]
m8 has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
rbennacer has joined #ruby
<shevy> hehe
<shevy> _why designed like a kid
j5s7 has joined #ruby
<socialjackie> shevy, the drawings?
dgutierrez1287 has quit [Remote host closed the connection]
j5s7 has quit [Client Quit]
northfurr has quit [Quit: northfurr]
northfurr has joined #ruby
jds has joined #ruby
niko has quit [Quit: leaving]
cschneid_ has joined #ruby
<nerdist> hi marvin
blackmesa has joined #ruby
niko has joined #ruby
nerdist has quit [Quit: Leaving]
lwu has quit [Ping timeout: 252 seconds]
<shevy> socialjackie yeah but also the old whycats
lwu has joined #ruby
<socialjackie> i loved the poignant guide.
lsmola has quit [Ping timeout: 246 seconds]
jtdowney has quit [Quit: ZNC]
jtdowney has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
kaikazou has joined #ruby
rbennacer has quit [Remote host closed the connection]
NeverDie has joined #ruby
NeverDie has quit [Remote host closed the connection]
bodgix has left #ruby [#ruby]
rbennacer has joined #ruby
hashrocket has joined #ruby
msnyon has joined #ruby
rubie has quit [Remote host closed the connection]
joonty has quit [Ping timeout: 245 seconds]
CorySimmons has joined #ruby
keen_____ has joined #ruby
<shevy> hehehe
<shmilan> Hello, everyone. I was wondering if there was a way to not return to an "if" statement when iterating through an array during an if/elsif loop once the elsif statement has been reached?
<socialjackie> Can you post an example?
<[k-_> "not to return to an \"if\" statement?"
lucyinthesky has left #ruby ["Leaving"]
jobewan has joined #ruby
<shmilan> Sure. Can I link to github the example I am working with?
keen____ has quit [Ping timeout: 250 seconds]
sectionme has joined #ruby
<socialjackie> Go ahead :)
maletor has joined #ruby
finisherr has joined #ruby
gard has quit [Ping timeout: 260 seconds]
Chau has joined #ruby
sectionm1 has quit [Ping timeout: 265 seconds]
<finisherr> Quick question. When I assign a var to a var, am i copying that value or assining by reference?
<[k-_> by ref
rubie has joined #ruby
<finisherr> so if the value of one var changes, both change correct?
blackmesa has quit [Quit: WeeChat 1.2]
<machinewar> yep you will indeed update the referenced object if you do that, be careful
<machinewar> might want to clone or dup
<finisherr> just as suspected. Thanks!
lwu has quit [Ping timeout: 256 seconds]
Helheim has quit [Ping timeout: 256 seconds]
_blizzy_ has joined #ruby
finisherr has quit [Client Quit]
<socialjackie> shmilan, do you mean the `break` statement?
soc42 has quit [Remote host closed the connection]
Helheim has joined #ruby
northfurr has quit [Quit: northfurr]
rbennacer has quit [Remote host closed the connection]
ruby-lang817 has quit [Quit: Page closed]
tkuchiki has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
<shmilan> I tried using it but I don't think it works to what I am trying to do.. I think I need to rework the method.
<[k-_> what are you trying to do
christiandsg has quit [Remote host closed the connection]
rcvalle has joined #ruby
khebbie has joined #ruby
Chau has quit [Quit: Leaving]
khebbie has quit [Remote host closed the connection]
nettoweb has joined #ruby
_blizzy_ has joined #ruby
coban2k has joined #ruby
psy has joined #ruby
christiandsg has joined #ruby
coban2k_ has joined #ruby
northfurr has joined #ruby
psy has quit [Max SendQ exceeded]
psy has joined #ruby
blue_deref has joined #ruby
<shmilan> I'm checking to see if one array has the same symbol in the same index as a second array, or if they have the same symbols but different indexes.
Cache_Money has joined #ruby
bruno- has joined #ruby
lwu has joined #ruby
nertzy has joined #ruby
<[k-_> Array.index(object)
<[k-_> &ri Array#index
coban2k has quit [Ping timeout: 260 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dgutierrez1287 has joined #ruby
nertzy has quit [Client Quit]
Aria has quit [Ping timeout: 240 seconds]
northfurr has quit [Quit: northfurr]
carlosoliveira has quit [Quit: Connection closed for inactivity]
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
michaeldeol has joined #ruby
darkf has quit [Quit: Leaving]
TomyLobo has joined #ruby
hobodave has joined #ruby
jeadr has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
<[k-> experiment with it, shmilan
<socialjackie> shmilan, does this help? https://gist.github.com/jackwillis/c2f9d17e570188b5e90b
VeganGreg has quit [Ping timeout: 240 seconds]
dfockler has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k-> interesting solution, socialjackie!
hobodave has quit [Read error: Connection reset by peer]
ghoti has joined #ruby
<[k-> you'd be great in functional!
dblessing has quit [Ping timeout: 260 seconds]
dr3w has joined #ruby
hobodave has joined #ruby
gambl0re has joined #ruby
CorySimmons has quit [Quit: Bye!]
<socialjackie> thanks [k- !
RegulationD has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
ghoti has quit [Read error: Connection reset by peer]
mandarinkin has joined #ruby
<jhass> shmilan: what's your actual problem? Do you want to know if there is a difference? do you want to know what the difference is? where it is?
aredridel has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
UtkarshRay has joined #ruby
DoubleMalt has joined #ruby
<jhass> also that you call your colors numbers is kinda confusing :P
clarkenciel has quit [Read error: Connection reset by peer]
coban2k_ has quit [Remote host closed the connection]
soc42 has joined #ruby
<shevy> shmilan wins the jhass-confusion-day prize!
<shmilan> Thank you for that documentation, [k-_! I'm working through it..
ghoti has joined #ruby
ghoti has quit [Read error: Connection reset by peer]
<[k-> >> a = %i[blue purple green blue red]; b = a.shuffle; a.map.with_index { |item,i| [item,b.index(item) == i] }
rehat_ has joined #ruby
bronson has joined #ruby
<ruboto> [k- # => [[:blue, true], [:purple, false], [:green, false], [:blue, false], [:red, false]] (https://eval.in/416840)
<shmilan> Socialjackie, I am going to be honest and say that that solution is a bit over my head :). I am going to work through it and try to understand it
nonparfumee has joined #ruby
sectionm1 has joined #ruby
<shmilan> Lol jhass, I was working with numbers and switched to colors. That would be my fault.
rsl has joined #ruby
<[k-> >> [(a = %i[blue purple green blue red]; b = a.shuffle; a.map.with_index { |item,i| [item,b.index(item) == i] }), a, b]
<ruboto> [k- # => [[[:blue, false], [:purple, true], [:green, false], [:blue, false], [:red, false]], [:blue, :purple, ...check link for more (https://eval.in/416843)
<jhass> shmilan: you should answer my question nonetheless ;)
<momomomomo> >> 0<1
<ruboto> momomomomo # => true (https://eval.in/416845)
dopie has quit [Quit: This computer has gone to sleep]
senayar has quit []
<momomomomo> 2/3 > .333333333333333333333333333333333
<[k-> yes momomomomo? does your ruby not return true?
<momomomomo> nah just bored
sshuff is now known as sshuff|gone
<momomomomo> ah my cluster is up now :D
pdoherty has joined #ruby
<jhass> momomomomo: we got a hangman game over in #ruby-offtopic for those occasions ;)
<[k-> it's worth noting that index returns the first index
<shmilan> I want to count two main similarities between the two arrays; if they have the same symbol and index, and if they have the same symbols but different indexes.
sectionme has quit [Ping timeout: 252 seconds]
DoubleMalt has quit [Remote host closed the connection]
<shmilan> I am sorry if I am being confusing. I am a beginner, but everyone here is being very tolerable of me and I appreciate that.
<momomomomo> jhass: haha
<[k-> same symbols would be using & and checking the length
bronson has quit [Ping timeout: 244 seconds]
<momomomomo> shmilan: this might help
LMity has joined #ruby
<momomomomo> shmilan: !ask
<[k-> index would require iterating
chouhoul_ has quit [Remote host closed the connection]
blackoperat has quit [Remote host closed the connection]
<jhass> shmilan: try to be precise, what specific answer do you want for what input? eg, compare([:blue, :red], [:blue, :orange]) #=> 1 or #=> false or ...?
ghoti has joined #ruby
<momomomomo> shmilan: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
<jhass> ?help momomomomo
<ruboto> momomomomo, You can find an overview of my commands at http://ruby-community.com/ruboto/commands
<[k-> ?ask jhass
<ruboto> jhass, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<momomomomo> jhass: the ask isn't the same
ghoti has quit [Read error: Connection reset by peer]
<[k-> ?answers jhass
<ruboto> jhass, How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
chouhoulis has joined #ruby
<momomomomo> which IMO is silly
<momomomomo> see that's just silly
<momomomomo> why change the command
<machinewar> checkout that method out could be helpful
<machinewar> prob need to account for multiple instances of that symbol though
blackoperat has joined #ruby
<[k-> its the same method i linked, in a different representation
einarj has quit [Remote host closed the connection]
coban2k has joined #ruby
<[k-> i think rubydocs does aliases well
<[k-> yardoc makes it look crazy
devoldmx has joined #ruby
<machinewar> [k-: sorry didn't see yours, at work and just jumped into this convo lol
Aswebb_ has joined #ruby
bmurt has quit []
lwu has quit [Ping timeout: 246 seconds]
<[k-> machinewar:https://eval.in/416843
<shmilan> jhass: For input I would like an integer for the total number of times it was counted for.
<jhass> shmilan: try again, I don't understand a word
<[k-> output?
<jhass> shmilan: make examples with concrete ruby values for inputs and result
greenarrow has quit [Quit: 500]
<shmilan> Thanks for the article, ruboto and momomomomo.
<jhass> ?justabot
<ruboto> I'm just a bot. You don't need to address me.
dopie has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
RTG` has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 272 seconds]
sectionme has joined #ruby
rsl has quit [Quit: Textual IRC Client: www.textualapp.com]
LMity has quit [Ping timeout: 250 seconds]
scripore has joined #ruby
towski_ has joined #ruby
shock_one has quit [Remote host closed the connection]
RTG` has joined #ruby
JoshL has quit []
sectionm1 has quit [Ping timeout: 250 seconds]
psy has quit [Disconnected by services]
tvw has joined #ruby
troyready has joined #ruby
psy_ has joined #ruby
shock_one has joined #ruby
amclain has joined #ruby
pragmatism has joined #ruby
pauly_oc has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
hanmac has quit [Ping timeout: 246 seconds]
lwu has joined #ruby
sectionme has quit [Ping timeout: 244 seconds]
pothibo has joined #ruby
pothibo has quit [Client Quit]
mleung has joined #ruby
gwendall has joined #ruby
tomphp has quit [Ping timeout: 240 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JoshL has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
rakm has joined #ruby
wldcordeiro has joined #ruby
rakm has quit [Client Quit]
rbennacer has joined #ruby
ramfjord has joined #ruby
Senjai has quit [Changing host]
Senjai has joined #ruby
<greedo> 3
<jhass> 4
darkxploit has joined #ruby
<greedo> yes jhass /win fail
sectionme has joined #ruby
uwa667 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
basmoura has joined #ruby
rbennacer has quit [Ping timeout: 244 seconds]
ghoti_ has joined #ruby
sdwrage has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 240 seconds]
<[k-> 97.32
<Nilium> ruboto is just shy.
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ruby
jeadr has quit [Read error: Connection reset by peer]
soc42 has quit [Remote host closed the connection]
tens0r has joined #ruby
swgillespie has quit [Client Quit]
Seich has quit [Ping timeout: 244 seconds]
hanmac has joined #ruby
flegercovateam has quit [Quit: Leaving.]
ghoti_ has quit [Read error: Connection reset by peer]
leafybasil has quit [Remote host closed the connection]
[Butch] has joined #ruby
wldcordeiro has quit [Ping timeout: 244 seconds]
leafybasil has joined #ruby
tvw has quit []
jeadr has joined #ruby
einarj has joined #ruby
victortyau has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
leafybasil has quit [Ping timeout: 260 seconds]
ishahnaz has quit []
DelDotB has joined #ruby
rubie has quit [Remote host closed the connection]
DelDotB has quit [Client Quit]
rakm has joined #ruby
victortyau has joined #ruby
pietr0 has joined #ruby
symm- has joined #ruby
Lucky__ has joined #ruby
michaeldeol has joined #ruby
momomomomo has quit [Quit: momomomomo]
rubie has joined #ruby
lannonbr has joined #ruby
dseitz has quit [Ping timeout: 252 seconds]
Guest24 has quit [Quit: Coyote finally caught me]
fantazo has joined #ruby
bricker has joined #ruby
VeganGreg has joined #ruby
saddad has quit [Ping timeout: 256 seconds]
juanpaucar has quit [Remote host closed the connection]
RegulationD has joined #ruby
wldcordeiro has joined #ruby
VeganGreg has quit [Ping timeout: 240 seconds]
f4cl3y has quit [Ping timeout: 250 seconds]
juanpaucar has joined #ruby
juanpaucar has quit [Read error: Connection reset by peer]
juanpaucar has joined #ruby
stan has quit [Ping timeout: 244 seconds]
mephistophocles has quit [Remote host closed the connection]
benlieb has joined #ruby
User458764 has quit [Remote host closed the connection]
blackoperat has quit []
Seich has joined #ruby
tens0r has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
bmurt has joined #ruby
clarkenciel has joined #ruby
Jackneill has joined #ruby
DoubleMalt has joined #ruby
Vile` has quit [Ping timeout: 260 seconds]
<shevy> a truly modest bot
<cschneid_> If I make a regex a constant, it'll be only compiled once, and then reused, but if it's a literal in the code path, it'll get recompiled every time?
danieli has joined #ruby
Vile` has joined #ruby
tens0r has joined #ruby
Motoservo has quit [Quit: Over & out.]
frigidcode has quit [Quit: WeeChat 0.4.2]
<shevy> not sure if compile is the right word but I believe it will be set anew when you have it as a variable assignment every time you assign to the variable, whereas if you stored it in a constant, you probably only just refer to the same value lateron again
steven__ has joined #ruby
rbennacer has joined #ruby
arooni-mobile has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cschneid_> shevy: well, regexes get parsed & compiled into the state machine. But I want to use the same regex over and over, so it'd make sense to only do that once
<cschneid_> a constant will probably do it.
<cschneid_> TRAILING_SPACES = /\s+$/.freeze for instance
<cschneid_> I just remember something about new versions of ruby auto-reusing strings or something if you froze them
EllisTAA has joined #ruby
sectionme has quit [Quit: leaving]
j4cknewt has joined #ruby
tvw has joined #ruby
jbw has quit [Ping timeout: 256 seconds]
jbw has joined #ruby
kirun has joined #ruby
lele has joined #ruby
kies has quit [Ping timeout: 250 seconds]
Torrieri has quit [Read error: Connection reset by peer]
arta82 has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Rutix has joined #ruby
Rutix has joined #ruby
conor_ has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
steven__ has quit [Quit: leaving]
nicechap has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
TheNet has quit [Quit: Leaving...]
arta82 has quit [Max SendQ exceeded]
pengin has joined #ruby
baroquebobcat_ has joined #ruby
pengin has quit [Client Quit]
tvw has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
baroquebobcat has quit [Ping timeout: 244 seconds]
baroquebobcat_ is now known as baroquebobcat
dseitz has joined #ruby
shock_one has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
laudo has joined #ruby
juanpaucar has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 244 seconds]
axl_ has joined #ruby
alakra has quit [Quit: WeeChat 0.4.2]
alakra has joined #ruby
carlosoliveira has joined #ruby
sshuff|gone is now known as sshuff
codecop has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
chipotle has joined #ruby
Thomas-0725 has joined #ruby
unver has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeadr has quit [Remote host closed the connection]
tens0r has quit [Quit: tens0r]
christiandsg has joined #ruby
<unver> I really dislike this structure, http://hastebin.com/emalapiwij.rb, is a better way?
<unver> I'd like to prevent any errors from raising, maybe I should just barrel in and use begin / rescues
nuttermb has quit [Ping timeout: 244 seconds]
jackjackdripper has joined #ruby
<BraddPitt> that is why begin/rescue was created
braincrash has quit [Quit: bye bye]
<BraddPitt> but overall, that really isnt /that/ unclean unver
<tubbo> if you didn't break the law of demeter it would be a bit easier
<tubbo> event.try(:venue_name) || Rcms::EventVenue.find_by(event_id: event.id).venue.try(:name)
<tubbo> sorry
<jhass> why would it find something via the join model if the association fails?
<tubbo> event.try(:venue_name) || Rcms::EventVenue.find_by(event_id: event.id).try(:venue_name)
<krz> so @product.small_image_url.include?('/tmp/') returns true. why does [@product.small_image_url, @product.medium_image_url, @product.large_image_url].include?('/tmp/') return false?
hobodave has quit [Quit: Computer has gone to sleep.]
benlieb has quit [Quit: benlieb]
<unver> tubbo: thanks, I'll consider using an || structure
<[k-> unclosed [
<jhass> krz: because Array#include? isn't String#include?
<[k-> oh it's closed
troulouliou_div2 has quit [Quit: Leaving]
<[k-> derp
<jhass> krz: check Array#grep
runinsquares has joined #ruby
platzhirsch has left #ruby [#ruby]
<krz> ok thanks
christiandsg has quit [Remote host closed the connection]
jbw has joined #ruby
vondruch has joined #ruby
tacotaco_ has left #ruby [#ruby]
<krz> jhass: so if i wanted to search form "/temp/", it would look like .grep(/\/tmp\//) right?
<krz> form=for
<jhass> yeah, %r{/tmp/} for some less ugly regex literal
yh has quit [Ping timeout: 246 seconds]
kidoz has quit [Quit: Ухожу я от вас]
jackjackdripper has quit [Quit: Leaving.]
<krz> ah kk ty
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
dr3w has quit [Ping timeout: 240 seconds]
Torrieri has quit [Quit: Be back later ...]
<apeiros> tmp vs. temp
<apeiros> not that you trip over a typo ;-)
Aswebb_ has quit [Remote host closed the connection]
iamse7en has joined #ruby
tvw has joined #ruby
Aswebb_ has joined #ruby
<iamse7en> Is there a way to round to the nearest .5? e.g. 1.1 becomes 1 and 1.3 becomes 1.5?
<Mon_Ouie> Yes, #round
juanpaucar has joined #ruby
<Mon_Ouie> Oh, sorry I misread
<darix> uhm math rules are saying differently though
<iamse7en> i guess I'll just have to make my own method and spell it all out
braincrash has joined #ruby
<shmilan> (x*2.0).round / 2.0, where x is your number
[Butch] has joined #ruby
<gregf_> krz: grep is on an enumerable, not a string :/
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> iamse7en: ^ what shmilan said
<gregf_> krz: like so: ["foo bar /tmp/", "quux" ].grep(%r{/tmp/}) and for a string: "foo bar /tmp/" =~ %r{/tmp/}
jobewan has quit [Ping timeout: 255 seconds]
olistik has quit []
<socialjackie> shmilan, there's also Numeric#fdiv for float division: (x*2).round.fdiv(2)
<iamse7en> shmilan: awesome, working great, thanks!
<socialjackie> wait nvm
symm- has quit [Ping timeout: 240 seconds]
bmurt has quit []
<[k-> since the first number, x, is already a float, the .0 is redundant
<[k-> in the second case, it is not
bmurt has joined #ruby
dr3w has joined #ruby
nettoweb has joined #ruby
axl_ has quit [Quit: axl_]
einarj has quit [Remote host closed the connection]
<shmilan> ^^ you're correct, [k-
<iamse7en> right, thanks
lkba has joined #ruby
baweaver has joined #ruby
Musashi007 has joined #ruby
<shmilan> iamse7en: no problem
scripore has quit [Quit: This computer has gone to sleep]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
DoubleMalt has quit [Ping timeout: 245 seconds]
mpistone has joined #ruby
ascarter has joined #ruby
baweaver has quit [Remote host closed the connection]
juanpaucar has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lwu has quit [Quit: This computer has gone to sleep]
wviana has joined #ruby
jobewan has joined #ruby
<wviana> Hi, could you help me to get what's wrong with it ? <%= l.bandeira.try(:nome) << l.especificidade_loja_hb ? " HB" : ""%>
<jhass> wviana: what do you think << does?
towski_ has quit [Remote host closed the connection]
<wviana> jhass: concatenate strings, doesn't ?
hobodave has joined #ruby
rbennacer has quit [Read error: Connection reset by peer]
<jhass> okay
<jhass> what does .try return?
<socialjackie> what if l.bandeira.try(:nome) is nil?
rbennacer has joined #ruby
<wviana> jhass, socialjackie: It's a string.
<jhass> always?
<[k-> :o try is a monad
djbkd has joined #ruby
<socialjackie> but try sometimes returns nil.
<[k-> well somewhat
<[k-> actually im talking nonsense
thiagovsk has quit [Quit: Connection closed for inactivity]
<jhass> any news captain obvious?
<wviana> socialjackie: What if I do l.bandeira.nome ? It could return nil too.
<socialjackie> If l.bandeira is nil, l.bandeira.try(:nome) would be nil instead of blowing up. That's why try exists
<jhass> wviana: I think that expression doesn't make a whole lot of sense even if we get the errors out
<[k-> yes, it's like maybe
<jhass> wviana: what do you want to do?
<wviana> jhass: concatenate the " HB" if l.especificidade_loja_hb is true
djbkd has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<socialjackie> would this work? l.especificidade_loja_hb ? "#{l.bandeira.nome} HB" : l.bandeira.nome
<[k-> better.
<jhass> wviana: just <%= l.banderia.try(:nome) %><%= "HB" if l.especificidade_loja_hb %>
<wviana> socialjackie: yeap
dopie has quit [Quit: This computer has gone to sleep]
<wviana> socialjackie: Thank you very much
<socialjackie> that works too
benlieb has joined #ruby
cball has quit [Quit: Leaving]
<wviana> jhass: a good one too.
bmurt has quit []
ruby-lang727 has joined #ruby
<wviana> thank you guys
<wviana> :)
<jhass> ?guys wviana
<ruboto> wviana, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
devoldmx has joined #ruby
prudi-ruby has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
<wviana> folks ?
<jhass> folks!
<[k-> not everything has to be written in an overly complex/clever way
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> ((.).(.).(.)) is something you can do in haskell, and it is complex
<bricker> [k-: unless you're a java developer
<jhass> [k-: why don't you join #haskell already
<[k-> java code isnt clever
tens0r has joined #ruby
vondruch has joined #ruby
<[k-> haskell is toomuchtext4me
<jhass> then stop bringing it up?
<[k-> it was just an example
<jhass> no, not just one
<jhass> you're talking about nothing else for days
<jhass> it's nice that you learn haskell
<jhass> but this channel is about ruby
sgambino has joined #ruby
lordkryss has joined #ruby
<[k-> it's the most complex code that is the shortest i know of :/
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
<prudi-ruby> Hi! When do a Task must depend on :enviroment?
<jhass> ?rails prudi-ruby
<ruboto> prudi-ruby, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
basmoura has quit []
thiagovsk has joined #ruby
<prudi-ruby> My mistake! Sorry!
mephistophocles has joined #ruby
symm- has joined #ruby
mephistophocles has quit [Read error: Connection reset by peer]
mephistophocles has joined #ruby
pdoherty has quit [Remote host closed the connection]
knrz has joined #ruby
renanoronfle has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
prudi-ruby has quit [Quit: Page closed]
prudi has joined #ruby
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeadr has joined #ruby
nzst has joined #ruby
prudi has quit [Client Quit]
dopie has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
swgillespie has joined #ruby
lele is now known as Guest24
towski_ has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MasterPiece has quit [Quit: Leaving]
cball has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
postmodern has joined #ruby
baweaver has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
DLSteve has joined #ruby
DLSteve has quit [Remote host closed the connection]
mephistophocles has quit [Remote host closed the connection]
hobodave has quit [Quit: Computer has gone to sleep.]
DLSteve has joined #ruby
ghoti_ has joined #ruby
lessless has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghoti_ has quit [Read error: Connection reset by peer]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
sideshowcoder has quit [Quit: Connection closed for inactivity]
benlieb has joined #ruby
renanoronfle has joined #ruby
Guest24 has quit [Quit: Coyote finally caught me]
lwu_ has joined #ruby
laudo has quit [Quit: Page closed]
towski_ has quit [Remote host closed the connection]
ndrei_ has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
NeverDie has joined #ruby
christiandsg has joined #ruby
quimrstorres has quit [Remote host closed the connection]
hobodave has joined #ruby
wldcordeiro has quit [Ping timeout: 240 seconds]
csmb has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei_ has quit [Remote host closed the connection]
momomomomo has joined #ruby
ndrei has joined #ruby
bumbar_ has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby
RobertBirnie has quit [Ping timeout: 240 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
yalue has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
ta has quit [Quit: Leaving...]
knrz has quit [Quit: Textual IRC Client: www.textualapp.com]
kies has joined #ruby
djbkd has quit [Remote host closed the connection]
s2013 has joined #ruby
rubie has quit [Remote host closed the connection]
Valeness is now known as timebot
timebot is now known as Valeness
s2013 has quit [Client Quit]
kies has quit [Ping timeout: 246 seconds]
Axy has joined #ruby
Axy has joined #ruby
baweaver has quit [Remote host closed the connection]
RobertBirnie has quit [Ping timeout: 250 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbowlby has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
VeganGreg has joined #ruby
Mia has quit [Ping timeout: 246 seconds]
Quandl has joined #ruby
tens0r has quit [Quit: tens0r]
ta has joined #ruby
einarj has joined #ruby
jerius_ has joined #ruby
jerius has quit [Ping timeout: 244 seconds]
Me has joined #ruby
Me is now known as Guest1011
yfeldblu_ has joined #ruby
djbkd has joined #ruby
beef-wellington has joined #ruby
chouhoul_ has joined #ruby
AlphaAtom has joined #ruby
VeganGreg has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
l3ck has joined #ruby
silkfox has quit [Ping timeout: 244 seconds]
einarj has quit [Ping timeout: 265 seconds]
jds has quit [Quit: Connection closed for inactivity]
m8 has quit [Quit: Sto andando via]
swgillespie has joined #ruby
Guest1011 has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
toretore has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
RobertBirnie has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Remote host closed the connection]
mephistophocles has joined #ruby
chouhoulis has joined #ruby
mephistophocles has quit [Read error: Connection reset by peer]
bronson has joined #ruby
mephistophocles has joined #ruby
benlieb has quit [Quit: benlieb]
chipotle has quit [Quit: cheerio]
Trynemjoel has joined #ruby
RobertBirnie has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cabreraM516 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
gwendall has quit [Remote host closed the connection]
vondruch has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
Spami has joined #ruby
gwendall has joined #ruby
kies has joined #ruby
l3ck has quit [Quit: Bye!]
vondruch has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 265 seconds]
mpistone has quit []
yfeldblu_ has quit [Remote host closed the connection]
dEPy has joined #ruby
RobertBirnie has quit [Ping timeout: 252 seconds]
chabil has joined #ruby
benlieb has joined #ruby
Spami has quit [Client Quit]
djbkd has quit [Remote host closed the connection]
jeadr has quit [Remote host closed the connection]
vondruch has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
nhhagen has joined #ruby
<apeiros> oh, wow
vondruch has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
nzst has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
unver has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<apeiros> don't define a method called `color` in toplevel in pry
RobertBirnie has joined #ruby
<apeiros> kills it cold
DoubleMalt has joined #ruby
RobertBirnie has quit [Client Quit]
jeadr has joined #ruby
gwendall has quit [Ping timeout: 260 seconds]
vondruch has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
youngbaks has joined #ruby
iateadonut has quit [Quit: Leaving.]
vondruch has joined #ruby
<havenwood> apeiros: def color; :eek! end; color # :eek!
<havenwood> apeiros: it survived
vondruch has quit [Read error: Connection reset by peer]
<apeiros> havenwood: let me see, maybe it's awesome_print which crashes
coban2k has quit [Quit: Leaving...]
gwendall has joined #ruby
<mozzarella> now do 'test'
<havenwood> apeiros: ah, yeah I don't use
<apeiros> [1] pry(main)> def color(a,b); end
<apeiros> (pry):1:in `color': wrong number of arguments (0 for 2) (ArgumentError)
<apeiros> from /Users/stefan/.rvm/gems/ruby-2.2.2/gems/pry-0.10.1/lib/pry/output.rb:35:in `decolorize_maybe'
<apeiros> seems to be pry itself
scripore has joined #ruby
michaeldeol has joined #ruby
<apeiros> most recent pry version too
kellray has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
<miah> same, i get a crash too: Pry version 0.10.1 on Ruby 2.2.2
<apeiros> havenwood: ah, yours survived because arg count was correct
benlieb has quit [Quit: benlieb]
<mozzarella> it seems to be using a color function… for coloring text
<havenwood> apeiros: ah, yup, reproduced :O
rideh has joined #ruby
ghoti has joined #ruby
nettoweb has joined #ruby
<mozzarella> do "def color; end" and the color is gone
Musashi007 has quit [Quit: Musashi007]
vondruch has joined #ruby
Spami has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
bluOxigen has quit [Remote host closed the connection]
Guest50 has joined #ruby
<jhass> it's a feature!
<apeiros> private def color helps
bluOxigen has joined #ruby
<apeiros> obviously the method is invoked via method missing
Uuku has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<apeiros> another less known trick is to define toplevel methods in the singleton_class of toplevel
diegoviola has joined #ruby
phutchins has quit [Ping timeout: 240 seconds]
<jhass> or do color = Module.new { def color; ...; end; }.method(:color) !
<jhass> er, instance_method
<jhass> you get the idea
shmilan has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Ping timeout: 255 seconds]
lele has joined #ruby
jackjackdripper1 has joined #ruby
<apeiros> ew
<apeiros> also doesn't work
Bobsz has joined #ruby
foureight84 has quit [Read error: Connection reset by peer]
<apeiros> unless I don't get the idea
foureight84 has joined #ruby
<jhass> >> color = Module.new { def self.color; puts "yay!"; end; }.method(:color); color.()
<ruboto> jhass # => yay! ...check link for more (https://eval.in/416896)
<Bobsz> Howdy, I am using optparse, but my system needs to be able to take arbitray options. That is there are so many that we can't predefine them but can assume good use input. Is there anyway to do that?
<apeiros> jhass: yeah, then I got you correctly. can't be used in another method :)
sarkyniin has quit [Ping timeout: 260 seconds]
mwlang has joined #ruby
<apeiros> Bobsz: I don't think optparse can do that
momomomomo has quit [Quit: momomomomo]
<jhass> pff, details
shmilan has joined #ruby
<apeiros> might be that you can trigger the tokenizing yourself, though
<jhass> just use a constant
<apeiros> jhass: then I'd have to rewrite the code which uses the method, so nope :)
<apeiros> I prefer just using private
<miah> ARGV is just an array, parse away =)
<jhass> you know I'm not serious?
NeverDie has quit [Max SendQ exceeded]
<Bobsz> miah: yes but it's nicer to use optparse
<apeiros> jhass: it's friday evening, my non-serious detector is even less functional than normally
arup_r has joined #ruby
tvw has quit []
* aperios slaps apeiros' seriousness detector
<apeiros> why do you break it? :(
<jhass> who? you did it all on your own!
<apeiros> I know it's no good, but it worked at least sometimes
hololeap has quit [Ping timeout: 244 seconds]
<apeiros> jhass: can't fool me. you've colored nicks.
<jhass> same color here
<apeiros> :-p
<apeiros> haha, yeah, sure
youngbaks has quit [Quit: WeeChat 1.2]
<ljarvis> Bobsz: yeah it's not possible, Slop lets you do it though
<apeiros> psssshhh… how bad
<Bobsz> ljarvis: what's that? slop
<jhass> Bobsz: https://rubygems.org
vondruch has joined #ruby
<ljarvis> some ruby option parser, i heard its quite good
<dfockler> lolz
NeverDie has joined #ruby
<jhass> Bobsz: but I mean, consider reading a config file or something
vondruch has quit [Read error: Connection reset by peer]
<ljarvis> yeah you really should just define possibilities
<jhass> doesn't sound like ARGV is the right job if you get tired of enumerating the options
sarkyniin has joined #ruby
<miah> ENV =)
yuung has joined #ruby
<Bobsz> ljarvis: it's close to 150k
<ljarvis> wat
<dfockler> wat!
<ljarvis> yeah you don't want options
axl_ has joined #ruby
<jhass> or ARGV
<apeiros> lolwat?
<ljarvis> yeah srsly
<jhass> more like, a database
<miah> 150k options? how is that even possible.
<Bobsz> the data is in a database, we are writing a script to query the database
<apeiros> aaa..zzz are all valid options? :D
<apeiros> >> 26**5
troyready has quit [Remote host closed the connection]
<yuung> (line 3)
<ruboto> apeiros # => 11881376 (https://eval.in/416902)
maletor has quit []
<ljarvis> close
TheNet has joined #ruby
<Bobsz> apeiros: no
<jhass> miah: 4294967295 since linux 2.6.23
<miah> arg_max goes that hi? neat.
<apeiros> yuung: it's calling a method
<dfockler> yuung: it's using a mix in and calling a method called 'base_uri'
<jhass> yeah
<yuung> ah i see. thanks
<dfockler> with an argument 'google.com'
<Bobsz> There are metrics in a database and then you just give the script the metric and the item you watch to check and it sends the query. It's rather simple
<apeiros> from which we can conclude that HTTParty does evil things on self.included
jackjackdripper1 has quit [Quit: Leaving.]
wviana has quit []
jenrzzz has joined #ruby
vondruch has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
mephistophocles has quit [Remote host closed the connection]
mephistophocles has joined #ruby
rbennacer has quit [Remote host closed the connection]
<jhass> I think bundler ships something to disable that now, at least for bundle install
northfurr has quit [Quit: northfurr]
<miah> oh ya?
yqt has joined #ruby
<miah> oh nice
northfurr has joined #ruby
<jhass> Bobsz: so why bother with complex ARGV parsing, ARGV.each_slice(2) do |metric, item| done
rbennacer has joined #ruby
machinewar has quit []
<Bobsz> ljarvis: do you know what the function is called in slop to get arbitrary options? Having trouble finding it in the manual
frem has joined #ruby
leafybasil has joined #ruby
<ljarvis> Bobsz: you need to use v3 and see the autocreate method. It creates options on the fly. That said, I still think this isn't what you need
cabreraM516 has quit [Quit: Textual IRC Client: www.textualapp.com]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IceyEC has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
tuxero has quit [Quit: tuxero]
<Bobsz> so V4 doesn't have it?
<ljarvis> no I removed it because it's a bad idea
<ljarvis> ;)
vondruch has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
nhhagen has quit []
michaeldeol has joined #ruby
axl_ has quit [Quit: axl_]
dgutierrez1287 has joined #ruby
jackjackdripper has quit [Client Quit]
michaeldeol has quit [Client Quit]
hinbody_ has joined #ruby
michaeldeol has joined #ruby
symbol has joined #ruby
troyready has joined #ruby
hinbody has quit [Ping timeout: 256 seconds]
<Bobsz> ljarvis: any other ideas, I wont be able to install v3
dgutierrez1287 has quit [Ping timeout: 244 seconds]
scripore has quit [Quit: This computer has gone to sleep]
Swappticon has joined #ruby
northfurr has quit [Quit: northfurr]
mephistophocles has quit [Remote host closed the connection]
maletor has joined #ruby
jgpawletko is now known as jgpawletko_away
iamse7en has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> Bobsz: simplify your argument format so you can just iterate over (chunks of) ARGV
Yiota has quit [Ping timeout: 250 seconds]
vondruch has quit [Quit: Ex-Chat]
vondruch has joined #ruby
symbol has quit [Client Quit]
clarkenciel has quit [Ping timeout: 244 seconds]
robh71 has joined #ruby
TheNet has quit [Remote host closed the connection]
yuung has quit [Ping timeout: 246 seconds]
robh71 has quit [Client Quit]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hobodave has quit [Quit: Computer has gone to sleep.]
n_blownapart has joined #ruby
baweaver has joined #ruby
robh71 has joined #ruby
kidoz has joined #ruby
ruby-lang730 has joined #ruby
Torrieri has joined #ruby
nonparfumee has joined #ruby
amclain has quit [Quit: Leaving]
<yorickpeterse> Ah yes, post install messages
einarj has joined #ruby
<yorickpeterse> everybody's #1 feature
<slash_nick> yorickpeterse: there's a gem for that
mesamoo has joined #ruby
danman has joined #ruby
dEPy has quit [Quit: (null)]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> slash_nick: I know, it was a ref to the above
robh71 has quit [Client Quit]
* slash_nick needs to ignore joins/parts/quits
baweaver has quit [Ping timeout: 246 seconds]
<yorickpeterse> :P
pietr0 has quit [Quit: pietr0]
<Bobsz> Thanks jhass
shinnya has joined #ruby
rubie has quit [Remote host closed the connection]
sigurding has joined #ruby
northfurr has joined #ruby
kangarooo has joined #ruby
<kangarooo> shoking video about islamic state, must watch: https://www.youtube.com/watch?v=df4KB30K0UU
kangarooo has left #ruby [#ruby]
<yorickpeterse> it's a video in which they are nice to people?
einarj has quit [Ping timeout: 255 seconds]
michaeldeol has joined #ruby
rubie has joined #ruby
hobodave has joined #ruby
scripore has joined #ruby
michaeldeol has quit [Client Quit]
jpiche has joined #ruby
shmilan has quit [Ping timeout: 240 seconds]
Bobsz has quit [Quit: Page closed]
atomical has joined #ruby
shmilan has joined #ruby
hubcaps has joined #ruby
<bricker> ....
devoldmx has joined #ruby
workmad3 has joined #ruby
mrtg9970 has joined #ruby
gusrub has joined #ruby
freerobby has quit [Quit: Leaving.]
<yorickpeterse> what? That would be shocking no?
Oka has joined #ruby
wldcordeiro has joined #ruby
<yorickpeterse> "Here we see IS handing out cookies at the local homeless shelter"
<yorickpeterse> "and here we see IS helping refugees"
Volsus has joined #ruby
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
hinbody_ is now known as hinbody
chabil has quit [Quit: WeeChat 1.2]
EllisTAA has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 246 seconds]
<banisterfiend> yorickpeterse i got the 30% ruling \o/
<yorickpeterse> you lucky ass mofo
<banisterfiend> oh hells yeah
<banisterfiend> making phat stacks
<banisterfiend> stupidily i oculd have applied 2 years ago, but left it until now..
<yorickpeterse> heh
quimrstorres has joined #ruby
<apeiros> miah: oh, heh, thank :D
<apeiros> *thanks
blackmesa has joined #ruby
swgillespie has joined #ruby
hololeap has joined #ruby
runinsquares has left #ruby ["Leaving"]
davedev2_ has joined #ruby
<yorickpeterse> when you httparty you party hard
<miah> heh
mrtg9972 has joined #ruby
<yorickpeterse> Thank you for installing HAML 4.0, a few things changes: ...
chadwtaylor has joined #ruby
<yorickpeterse> * changed
davedev24 has quit [Ping timeout: 246 seconds]
<miah> but are you only HTT partying then? and what is a HTT?
mrtg9972 has quit [Client Quit]
<yorickpeterse> it's a hyper text transfer party
<dfockler> obvs
<miah> awesome
Kallis has joined #ruby
Uuku has joined #ruby
<yorickpeterse> HTTParty 412: No Bros Allowed
northfurr has quit [Quit: northfurr]
<dfockler> haha
jgpawletko_away has quit [Quit: jgpawletko_away]
n_blownapart has quit []
<dfockler> what should I learn to be a pro ruby grammer?
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby
<yorickpeterse> start with Practical Bro-Oriented Design in Ruby
<yorickpeterse> by Sandy Broz
<yorickpeterse> There's also the Broaxe, but it's a bit dated
<dfockler> I'm reading through the PBOD - peanut butter oriented design, right now
* yorickpeterse is trying to scan something in Linux
<yorickpeterse> needless to say it's a PITA
<jhass> simple-scan <3
psy_ has quit [Remote host closed the connection]
<yorickpeterse> stupid zoom doesn't work reliably in iscan
Iskarlar has joined #ruby
<dfockler> I need to write a gem, but I'm too happy of a person and I can't think of any code that I hate
baweaver has joined #ruby
<yorickpeterse> ᕕ(ᐛ)ᕗ
<dfockler> hey good idea!
Iskarlar has quit [Client Quit]
Kallis has quit [Ping timeout: 255 seconds]
<dfockler> dang github forks got a lot faster
<jhass> dfockler: port oga to Crystal :P
<dfockler> that sounds scary
jackjackdripper has joined #ruby
Kallis has joined #ruby
gwendall has quit [Ping timeout: 260 seconds]
christiandsg has joined #ruby
<yorickpeterse> actually everything but the Ragel code probably isn't too hard to port
<yorickpeterse> though I'm not sure how well the current setup would work in a statically typed language
shock_one has quit [Remote host closed the connection]
<yorickpeterse> would probably involve a crap ton of type casts
benlieb has joined #ruby
gard has joined #ruby
<apeiros> jhass: is there a ragel for crystal?
RTG` has quit [Ping timeout: 256 seconds]
<jhass> nah
<jhass> they like hand written parsers :P
jerius_ has quit [Quit: /quit]
<yorickpeterse> e.g. XML::NodeSet can contain instances of XML::Element, XML::Text, XML::Comment, XML::Attribute, etc
gwendall has joined #ruby
<yorickpeterse> of those all _except_ XML::Attribute inherit from XML::Node
towski_ has joined #ruby
hazelux has joined #ruby
michaeldeol has joined #ruby
RTG` has joined #ruby
thermatix has joined #ruby
<ljarvis> NodeSet can contain an Attribute?
<ljarvis> aren't attributes all inside nodes?
christiandsg has quit [Ping timeout: 265 seconds]
jamesaxl has joined #ruby
imperator has joined #ruby
jerius has joined #ruby
<imperator> heya
<imperator> is there a more idiomatic way to do this json dump? https://gist.github.com/djberg96/914f56018f6b08224353
<yorickpeterse> ljarvis: Nop
<yorickpeterse> in xpath you can query a list of attributes from an element
tvon has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> Attributes are attached to an element, sure, but you can query/use them separately
<yorickpeterse> e.g. foo/@class would get you a list of all "class" attributes of all "foo" nodes
<jhass> imperator: Rails/AS?
<imperator> jhass, nah, sending a request to the azure api
thermatix has quit [Ping timeout: 255 seconds]
<imperator> using rest-client under the hood
psy_ has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
<jhass> data = {location: location}; data[:tags] = tags if tags; data.to_json is what I'd do
diegoviola has quit [Quit: WeeChat 1.2]
psy_ has quit [Max SendQ exceeded]
revoohc has quit [Quit: revoohc]
sigurding has quit [Quit: sigurding]
codecop has quit [Quit: Išeinu]
Torrieri has quit [Quit: Be back later ...]
<ljarvis> yorickpeterse: right yeah i know they can be queried separately but i guess i expected that to do a nested query into the nodes to search for and map attributes, but i guess that makes little sense
psy_ has joined #ruby
Musashi007 has joined #ruby
<imperator> hah, forgot about .to_json
<yorickpeterse> ljarvis: it basically does that
UtkarshRay has quit [Ping timeout: 244 seconds]
<yorickpeterse> it's like `attr_set = NodeSet.new; foo.attributes.each { |attr| ...; attr_set << attr }
<ljarvis> yorickpeterse: is that to make querying attributes easier/faster?
radgeRayden_ has joined #ruby
<yorickpeterse> No, that's "just" how it works
<yorickpeterse> :P
<ljarvis> heh right
<yorickpeterse> There are basically two types of node sets in Oga:
<jhass> but yeah, in Crystal you'd probably do convenience methods that do some casting, node_by_xpath, attribute_by_xpath etc
<yorickpeterse> 1) regular node sets
<yorickpeterse> 2) owned node sets
<yorickpeterse> owned sets are those that belong directly to an XML::Node
<yorickpeterse> e.g. the child elements of another element
<yorickpeterse> in such a case the NodeSet is owned by the parent element
<ljarvis> right yeah
<yorickpeterse> XPath queries produce regular NodeSet instances
<yorickpeterse> that just contain references to the actual objects
<ljarvis> i see
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oxpom has quit [Ping timeout: 264 seconds]
<yorickpeterse> The reason XML::Attribute is not a child of XML::Node is because Node has methods such as "parent", "next", "previous", etc, which make no sense for attributes
tommek has joined #ruby
<apeiros> yorickpeterse: are xml attributes not considered to be ordered?
<apeiros> (parent could be the node owning the attribute)
quimrstorres has quit [Remote host closed the connection]
<yorickpeterse> ordered yes, but they don't have parents for example
gwendall has quit [Remote host closed the connection]
<yorickpeterse> so next/previous would make some sense
<yorickpeterse> but I've yet to see somebody do something like getting attribute 1, then calling "next" on it
hazelux has quit [Remote host closed the connection]
gwendall has joined #ruby
<apeiros> I'd more expect people to rely on something like attributes being reproduced in the same order
<yorickpeterse> There are also a bunch of other methods in Node that don't make sense for Attribute
<yorickpeterse> some don't even belong in Node, such as "children" :/
<yorickpeterse> but can't change that now
shmilan has quit [Ping timeout: 260 seconds]
<yorickpeterse> apeiros: attributes are stored in an array internally
stallmen has joined #ruby
<stallmen> how should i learn ruby
<apeiros> ok, so order is retained
<ljarvis> ?books stallmen
<ruboto> stallmen, I don't know anything about books
<ljarvis> o
<yorickpeterse> IIRC I didn't pick Hash because of some potential caching conflicts
<ljarvis> ?learn
<ruboto> I don't know anything about learn
<yorickpeterse> Ah yes
<yorickpeterse> If you'd update the attribute name you'd also have to update the Hash key
<ljarvis> no botsnack today
<yorickpeterse> which _could_ mess up the order
<yorickpeterse> stallmen: https://rubymonk.com/ is a good start
fmcgeough has quit [Quit: fmcgeough]
jgpawletko has joined #ruby
Iskarlar has joined #ruby
<yorickpeterse> days like these is when I thank past-me for not just writing commit message "use arrays for attributes"
flak has joined #ruby
<yorickpeterse> * messages
<apeiros> ljarvis: you're an op. just !fact add
<yorickpeterse> or "changed stuff"
<ljarvis> apeiros: yes I know but someone add one recently but i dont remember the name of it :(
gwendall has quit [Ping timeout: 260 seconds]
sarkyniin has quit [Read error: No route to host]
avitzurel has joined #ruby
<jhass> ?learning
<ruboto> How learning something works: http://i.imgur.com/l2mInq8.webm
sarkyniin has joined #ruby
<jhass> ?
<ljarvis> lol at that
<ljarvis> but no
lucyinthesky has joined #ruby
<yorickpeterse> haha
rippa has quit [Ping timeout: 250 seconds]
<Mon_Ouie> We have some in ?links
<Mon_Ouie> ?links ljarvis
<yorickpeterse> dfockler: oh fair warning, I'm super fucking pedantic so expect me to even notice extra spaces in any PRs and what not
<ljarvis> Mon_Ouie: ta
<ljarvis> ?links stallmen
<dfockler> yorickpeterse: alright
northfurr has joined #ruby
<ljarvis> dfockler: and use explicit returns or you'll be crucified
<dfockler> whoa!
<yorickpeterse> ljarvis: I moved away from that
<dfockler> are we writing python over here?
<yorickpeterse> stay up to date man
<ljarvis> :O
<ljarvis> no wai
<ljarvis> zomg
<ljarvis> it's a christmas miracle
f0ster has joined #ruby
<yorickpeterse> I mainly stick to certain patterns because breaking away from them is too painful after years
quimrstorres has joined #ruby
<yorickpeterse> the next step will be deciding on cutting down YARD crap
<ljarvis> meh, I poke fun but apart from the insane amount of YARD (which I don't really like anyway), oga is very well written
<yorickpeterse> e.g. I want a way to remind my future self (and others) what input/output types an object can operate on, but YARD tags are starting to annoy me too much
<yorickpeterse> I've yet to find a decent way, hence I'm sticking with YARD atm
howdoico1 has joined #ruby
<yorickpeterse> for some code it's really not obvious what the input is by just looking at the method
<yorickpeterse> https://github.com/YorickPeterse/oga/blob/xpath-compiler/lib/oga/xpath/compiler.rb#L276 e.g. without looking at the YARD tags, try guessing what "input" would be
<yorickpeterse> or "ast" for that matter
ruby-lang730 has quit [Ping timeout: 246 seconds]
NeverDie has joined #ruby
<ljarvis> it's ruby. *anything*!!
<yorickpeterse> well, sadly no :P
<ljarvis> :)
<yorickpeterse> I also really need to cut down the indent levels in the compiler somehow
Me has joined #ruby
<ljarvis> I mean I'd just name it node or input_node or something
<ljarvis> *shrug*
<yorickpeterse> ljarvis: the trick here is that there are different nodes
Me is now known as Guest61636
<yorickpeterse> e.g. there's AST::Node from the "ast" Gem
<yorickpeterse> but there's also Oga::Ruby::Node
<yorickpeterse> both are quite different
<ljarvis> xml_node
quimrstorres has quit [Ping timeout: 250 seconds]
<ljarvis> :D
<ljarvis> ah
<ljarvis> meh
NeverDie has quit [Max SendQ exceeded]
<mwlang> in Jekyll templates, is it possible to include a dynamically constructed path? I’m working on versioned documentation where I generate the documentation for each gem version released. So, instead of {% include toc.html %} I have page.version (on the page’s front-matter) like “v0.4”. and I want to include the toc.html for v0.4, so {% include “v0.4/” + footer.html %} or something along these lines…
Musashi007 has quit [Quit: Musashi007]
ledestin has joined #ruby
<yorickpeterse> if YARD wasn't dumb as a brick I could probably cut down a lot of @return tags
<tubbo> ^
<ljarvis> meh you have some patience, I just flat out refuse to use yard
<tubbo> it would be nice if YARD could somehow evaluate my code as well as statically analyze it
<ljarvis> I *really* dislike it
<yorickpeterse> it should be able to determine that based on what the false() method returns
amclain has joined #ruby
<yorickpeterse> ljarvis: the HTML output is blergh
<tubbo> ljarvis: what do you use to document code? we've been resorting to the Slate middleman template for our APIs and just a regular middleman site for the guides
<yorickpeterse> But I prefer the tags over the freeform style of rdoc/tomdoc
<ljarvis> it's all blergh for me
bougyman has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
hasB4K has left #ruby ["WeeChat 1.2"]
<ljarvis> tubbo: I use tomdoc but I don't care much about the HTML output and have a custom rdoc generator
<tubbo> RABID: Really? A Better and more Informative Documentation
<ljarvis> yeah I really like the freeform style
Guest61636 has quit [Ping timeout: 240 seconds]
sigurding has joined #ruby
<ljarvis> but probably cause I usually read documentation inside the code
<yorickpeterse> ljarvis: the problem I have with it is that one person will write "This method returns XXXX" while somebody else will, somewhere at the bottom of a docblock, write "returns XXXX"
<ljarvis> and not some shitty html template
<yorickpeterse> so scanning for what it actually returns can be hard at times
<tubbo> i'm a huge fan of tomdoc
<ljarvis> yeah I agree there's pitfalls
The_Phoenix has quit [Quit: Leaving.]
* yorickpeterse actually has comments folded by default
<ljarvis> but again I don't conform to it exactly
jpiche has quit [Quit: WeeChat 0.4.2]
<yorickpeterse> something something I'd like for this to be part of the language, aka gradual typing
Pathfinder has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> I also hate how the example tags work in YARD
<yorickpeterse> @example
<yorickpeterse> [one-space] code here
shmilan has joined #ruby
kirun has quit [Quit: Client exiting]
AlphaAtom has joined #ruby
<yorickpeterse> On the other hand, YARD is pretty useful for API docs
<yorickpeterse> http://developer.olery.com/documentation/apis/companies/company_review_ratings/ this for example is all pulled from YARD docs/tags
Musashi007 has quit [Quit: Musashi007]
<yorickpeterse> well, basically YARD DB -> JSON -> nanoc Markdown -> HTML
bougyman has joined #ruby
djcp has quit [Ping timeout: 244 seconds]
<ljarvis> ruboto: ObjectJSON object containing ratings data.
<ljarvis> u
<ljarvis> wtf
<yorickpeterse> paste fail?
<ljarvis> ya
<yorickpeterse> heh
<ljarvis> R Object JSON ....
<ljarvis> wat ^
<yorickpeterse> "In all cases “R” is replaced by a rating topic (e.g. “overall”). There can be multiple rating topics in a single object. Each rating object has the following fields:"
NeverDie has joined #ruby
<yorickpeterse> There's no clear way to describe that sadly. I thought about using JSON schemas, but those are a PITA to read
<ljarvis> ah I didn't get that far
<yorickpeterse> and I've yet to find a good visualization tool for it
NeverDie has quit [Max SendQ exceeded]
<ljarvis> k it's been 13 hours, im getting off the computer
<ljarvis> for a bit..
lagweezle has joined #ruby
<yorickpeterse> hehe
<yorickpeterse> .__.
<yorickpeterse> such
blackmesa has quit [Quit: WeeChat 1.2]
<yorickpeterse> indent
<yorickpeterse> very wow
<yorickpeterse> much ruby
_ht has quit [Quit: Konversation terminated!]
sigurding_ has joined #ruby
<lagweezle> From what I'm reading in the docs, File.open('/file_that_does_not_exist', 'w') should create a new file, but I instead get "Errno::ENOENT: No such file or directory" ... What am I missing? >.<
<ljarvis> probably a directory doesn't exist that you're going into
chabil has joined #ruby
<ljarvis> k actually going
jalcine is now known as jacky
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<mwlang> nevermind, it’s just liquid (didn’t realize that right away!). So setting a toc_file_path variable in the page’s front matter makes it work.
sigurding has quit [Ping timeout: 252 seconds]
sigurding_ is now known as sigurding
s00pcan has quit [Ping timeout: 250 seconds]
blarghlarghl has joined #ruby
benlieb has quit [Quit: benlieb]
<lagweezle> Oh. I feel rather silly now. Thank you, ljarvis ...
benlieb has joined #ruby
phutchins has joined #ruby
s00pcan has joined #ruby
chipotle has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rippa has joined #ruby
<blarghlarghl> I have a lot of rspec files all over the place. Our codebase is rather large. Is there a smart way to have a 'run all tests' rake task?
imperator has left #ruby ["Leaving"]
rodfersou has quit [Quit: leaving]
Spami has quit [Quit: This computer has gone to sleep]
jackjackdripper has quit [Quit: Leaving.]
<yorickpeterse> blarghlarghl: dump them in spec/project-name
<yorickpeterse> then run "rspec spec"
gard has quit [Ping timeout: 260 seconds]
<yorickpeterse> alternatively run "rspec directory1 directory2 directory3"
crankharder has quit [Ping timeout: 240 seconds]
<blarghlarghl> yorickpeterse: yeah, i was thinking of moving them into one 'spec' directory in the root, i.e. /spec/module1, /spec/module2, etc.
phutchins has quit [Ping timeout: 252 seconds]
<blarghlarghl> yorickpeterse: will rspec spec then run all specs in those subdirectories too?
<yorickpeterse> Yes
Yzguy has joined #ruby
<yorickpeterse> It grabs all *_spec.rb files recursively
<blarghlarghl> yorickpeterse: great, i'll go and do that then.
decaff_ has joined #ruby
Ox0dea has joined #ruby
sigurding has quit [Quit: sigurding]
EllisTAA has quit [Quit: EllisTAA]
phutchins has joined #ruby
Iskarlar has joined #ruby
rbennacer has quit [Ping timeout: 272 seconds]
shmilan has quit [Quit: Leaving]
Yzguy has quit [Client Quit]
lucyinthesky has quit [Quit: Leaving]
arup_r has quit [Quit: Leaving]
sarkyniin has quit [Ping timeout: 250 seconds]
Swappticon has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblum has joined #ruby
gard has joined #ruby
JoshL has quit []
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dcarmich has joined #ruby
_blizzy_ has quit [Ping timeout: 260 seconds]
ldnunes has quit [Quit: Leaving]
sshuff is now known as sshuff|gone
rideh has quit [Ping timeout: 240 seconds]
chadwtaylor has quit [Remote host closed the connection]
pothibo has joined #ruby
beef-wellington has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cheerio]
j4cknewt has quit [Remote host closed the connection]
crankharder has joined #ruby
j4cknewt has joined #ruby
Pathfinder_ has joined #ruby
Pathfinder has quit [Ping timeout: 265 seconds]
Kallis has quit [Read error: Connection reset by peer]
j4cknewt has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
Guest50 has joined #ruby
jgpawletko has joined #ruby
juanpablo___ has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
Yzguy has joined #ruby
gambl0re has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
axl_ has joined #ruby
juanpablo__ has quit [Ping timeout: 246 seconds]
roolo has joined #ruby
casadei_ has quit [Remote host closed the connection]
Kallis has joined #ruby
Kallis has quit [Max SendQ exceeded]
Kallis has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
avitzure_ has joined #ruby
decaff_ has quit [Quit: Leaving...]
jerius has quit [Ping timeout: 246 seconds]
FernandoBasso has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
gizmore has joined #ruby
blackmesa has joined #ruby
avitzurel has quit [Ping timeout: 250 seconds]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aswebb_ has quit []
Pathfinder has joined #ruby
kt2 has joined #ruby
kt2 has quit [Client Quit]
ruurd has quit [Quit: ZZZzzz…]
hololeap has quit [Ping timeout: 260 seconds]
Pathfinder_ has quit [Ping timeout: 246 seconds]
avitzure_ has quit []
jgpawletko has quit [Quit: jgpawletko]
Yzguy has quit [Quit: Zzz...]
Pathfinder has quit [Ping timeout: 256 seconds]
danieli has quit [Quit: Leaving]
ruurd has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Remote host closed the connection]
chadwtaylor has joined #ruby
rubie has joined #ruby
northfurr has quit [Quit: northfurr]
einarj has joined #ruby
lucyinthesky has joined #ruby
<rehat_> is there a way to pass a method as an argument
episage has joined #ruby
<darix> why would you need that?
Me has joined #ruby
<darix> and i would probably just use a block
Me is now known as Guest75740
workmad3 has joined #ruby
<rehat_> I have a ranking class with two different ranking method options and I would like to be able to specify what method to use
chills42 has joined #ruby
<darix> pass the name in as a symbol
<darix> and then use send(namesymbol, args )
<rehat_> ahh send I was using call
<rehat_> let me try that
<baweaver> Use an if branch
<baweaver> if you don't need send don't use it, it'll be slower.
einarj has quit [Ping timeout: 240 seconds]
<darix> or that
<baweaver> and chances are you already have a branch there to determine that area so just use that
ruurd_ has joined #ruby
Guest75740 has quit [Ping timeout: 240 seconds]
<baweaver> If there are two distinct cases you need to decide between, that's exactly what conditionals are for.
ruurd has quit [Read error: Connection reset by peer]
hobodave has quit [Quit: Computer has gone to sleep.]
<baweaver> assume that send does not exist until you've used Ruby for a year or two
<rehat_> https://gist.github.com/rehat/84c6a2ccdaba1a14baed sorry for the crap code I'm new, but I would like to call rank_people_by_distance_method(:sim_distance)
chipotle has joined #ruby
<baweaver> and metaprogramming does not exist for at least 3-4 years
lkba has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
<baweaver> you'll save yourself nightmares later.
<baweaver> Too many new people to Ruby jump on those fancy features and blow their foot off.
dfockler has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 250 seconds]
<rehat_> ok so just use a string and a condition on which method to use
<baweaver> First observation, don't use 'string': value
<baweaver> use symbol: value
<baweaver> it's not json, just looks like it.
<baweaver> use two space indentation
<rehat_> oh that was just me copy pasting the hash from this book I am reading in python lol
<baweaver> >> {correct: 1}
<ruboto> baweaver # => {:correct=>1} (https://eval.in/416929)
AbdulRehman has joined #ruby
AbdulRehman has quit [Client Quit]
<rehat_> is there a way to setup sublime so that it uses two spaces for tabs or should I just physically use two spacebars?
<baweaver> notice it's a symbol there.
<baweaver> bottom right
<bougyman> gotta be a way
<baweaver> next to language
<baweaver> then in default settings
<baweaver> which is under the application menu iirc
choke has joined #ruby
<apeiros> rehat_: yes, you can config sublime to convert tab to spaces
s00pcan has quit [Ping timeout: 244 seconds]
<apeiros> don't remember where to set it globally
<rehat_> apeiros: sweet I'll look into it
<apeiros> but for a single file: bottom right where it e.g. says "2 spaces". click on it to get a menu.
<apeiros> there choose at the top "indent using spaces"
rakm has joined #ruby
<apeiros> rehat_: ah, I have it in user config: "translate_tabs_to_spaces": true, and "tab_size": 2,
<rehat_> nice thanks
s00pcan has joined #ruby
chadwtaylor has quit [Remote host closed the connection]
Spami has joined #ruby
frozen3 has quit [Remote host closed the connection]
j4cknewt has joined #ruby
devoldmx has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
LMity has joined #ruby
raucao-cccamp15 has joined #ruby
<baweaver> rehat_: read into Enumerable for Ruby, especially map, reduce, and select
lucyinthesky has joined #ruby
victortyau has quit [Quit: Leaving]
<baweaver> simplified the first method for you a bit: https://gist.github.com/rehat/84c6a2ccdaba1a14baed#gistcomment-1551450
<rehat_> baweaver: ahh, ok. Yeah I had a feeling that I wasn't using the correct ruby way of iteration through those hashes
<baweaver> well each is fine
<rehat_> omg lol
<baweaver> select allows you to select elements that meet a condition
<baweaver> >> (1..10).select { |v| v % 2 == 0 }
<rehat_> thanks
<ruboto> baweaver # => [2, 4, 6, 8, 10] (https://eval.in/416930)
<baweaver> (yes I know shorthand, not the point)
<baweaver> map allows you to transform every element of a list with a block (function)
<rehat_> nah, that helps me thanks
<baweaver> >> (1..10).map { |v| v * 2 }
<ruboto> baweaver # => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] (https://eval.in/416931)
<baweaver> No, that comment was for other people that would nail me for longhanding that
<baweaver> reduce takes a list and reduces it to a single element
<baweaver> >> (1..10).reduce (0) { |accumulator, i| accumulator + i }
<ruboto> baweaver # => 55 (https://eval.in/416932)
decoponio has quit [Ping timeout: 260 seconds]
whippythellama has quit [Quit: WeeChat 1.2]
<Ox0dea> baweaver: Tell him about lazy Enumerators.
<baweaver> so for every run of reduce, the accumulator is the result of the last block
<baweaver> be nice :P
<baweaver> shorthand that I was referring to:
<baweaver> >> (1..10).select(&:even?)
<ruboto> baweaver # => [2, 4, 6, 8, 10] (https://eval.in/416933)
rbowlby has quit [Remote host closed the connection]
<baweaver> >> (1..10).reduce(0, :+)
christiandsg has joined #ruby
<ruboto> baweaver # => 55 (https://eval.in/416934)
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> You know those three at least and you have a lot more power in Ruby to use
devoldmx has quit [Ping timeout: 246 seconds]
<baweaver> reduce will take a bit to get used to though
kies has quit [Ping timeout: 264 seconds]
sarkyniin has joined #ruby
<baweaver> You might look into Haskell or another functional language for a better understanding of the source of those ones
<Ox0dea> I think you meant Lisp.
<baweaver> though reduce is normally called FoldLeft in those ones
jeadr has quit [Remote host closed the connection]
lucyinthesky has left #ruby ["Leaving"]
<baweaver> the pedantics among us would say lisp isn't functional per se
<baweaver> depending on the variant
<Ox0dea> This guy. :P
<baweaver> scheme moreso than others.
<baweaver> I've had that rant before :P
<baweaver> Only with Lisp can I describe myself as a Schemer and a Racketeer
<Ox0dea> This is by design.
<baweaver> or in real life itself, but I digress
jeadr has joined #ruby
<baweaver> anyways, ping @baweaver on github if you want a look over on any code.
Trynemjoel has quit [Ping timeout: 250 seconds]
<baweaver> I probably won't be online much tonight, Rocket League tournament at $WORK :D
<baweaver> rehat_: ^^
<rehat_> baweaver: sweet, thanks dude
<baweaver> the other methods could be shortened down to a few lines as well
<Ox0dea> >> (1234567890..9876543210).lazy.select { |n| n.to_s.chars.uniq.size == 10 }.first(5) # rehat_
<ruboto> Ox0dea # => [1234567890, 1234567908, 1234567980, 1234568079, 1234568097] (https://eval.in/416935)
<Ox0dea> Ruby is magic. <3
<baweaver> Ox0dea can make them into one liners but he lies
<baweaver> don't trust anything he says
<Ox0dea> Ever.
<baweaver> :P
<baweaver> He makes Ruby do...... interesting things
umgrosscol has quit [Remote host closed the connection]
<Ox0dea> "Terrible, but great."
christiandsg has quit [Ping timeout: 265 seconds]
<baweaver> Uncle Ben said something about that
<Ox0dea> baweaver: Did you know that "Ollivander's" is an anagram of "Ronald lives"?
Trynemjoel has joined #ruby
<Ox0dea> Book 7 spoiler in one of the first chapters of the entire series.
sivsushruth has joined #ruby
<baweaver> >> "Ollivanders".downcase.chars.sort == "Ronaldlives".downcase.chars.sort
<ruboto> baweaver # => true (https://eval.in/416936)
<baweaver> huh
<baweaver> (yes there are better ways)
lucyinthesky has joined #ruby
<rehat_> Ox0dea: wow no idea how to read that
<Ox0dea> About that...
<Ox0dea> >> @_,$_,@__=->_,__{_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')+@_[_[$_..-$_],__]},$$/$$,@__=->_{__,___=_[$_-$_],_[$_..-$_];_==''?_:@__[@_[___,->_{_<__}]]+__+@__[@_[___,->_{_>=__}]]};($__=->*_{__=@__[_[$.]];$*[$_-$_]==__ ?_:$*<<__;_[$.+=$_]?$__[*_]:!$*[$_]})['ollivanders', 'ronaldlives']
<ruboto> Ox0dea # => true (https://eval.in/416937)
raucao-cccamp15 has quit [Remote host closed the connection]
<baweaver> there we go
<Ox0dea> rehat_: ^ That's why I'm not to be trusted.
darkxploit has quit [Ping timeout: 265 seconds]
<baweaver> see what you did rehat_? You got him excited again
<baweaver> :P
dudedudeman has quit [Quit: Leaving.]
<Ox0dea> rehat_: It finds the first five pandigital numbers, but lazily so that it doesn't take ages.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> Ox0dea: what's bad is I can read that as a one liner now...
michaeldeol has joined #ruby
<baweaver> gist it and shoot me a tag later
<Ox0dea> rehat_: That 9876543210 could actually have been Float::INFINITY without changing the result.
chills42 has quit [Ping timeout: 265 seconds]
<baweaver> probably disappearing soon
<Ox0dea> baweaver: Huh? You've already Muggled the anagram one, no?
<baweaver> did I?
d5sx43 has joined #ruby
<baweaver> I lose track
<baweaver> I think we might have scared them off O_O
<rehat_> almost
<Ox0dea> Ah, nope, seems you didn't.
<baweaver> Ox0dea: You heard them
<baweaver> still work to do
Coldblackice has joined #ruby
<Ox0dea> FizzBuzz, String#reverse, Caesar cipher, RPN calculator, and Time#new are the ones you've Muggled.
<baweaver> Well down I go, tournament time :D
<Ox0dea> Godspeed.
<baweaver> cheers
d5sx43 has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
rbowlby has joined #ruby
michaeldeol has quit [Client Quit]
valetudo has quit [Read error: Connection reset by peer]
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit []
_blizzy_ has joined #ruby
crazydiamond has joined #ruby
sepp2k has joined #ruby
Encapsulation has quit [Remote host closed the connection]
mephistophocles has joined #ruby
chabil has quit [Quit: WeeChat 1.2]
LMity has quit [Ping timeout: 240 seconds]
Trynemjoel has quit [Ping timeout: 245 seconds]
Trynemjoel has joined #ruby
choke has joined #ruby
michaeldeol has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
j4cknewt has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 264 seconds]
_blizzy_ has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
yfeldblum has quit [Remote host closed the connection]
hololeap has joined #ruby
tvon has quit [Quit: leaving]
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
Zamyatin has joined #ruby
nofxx has quit [Ping timeout: 245 seconds]
j4cknewt has joined #ruby
yfeldblum has joined #ruby
pothibo has quit [Quit: pothibo]
rbowlby has quit [Ping timeout: 265 seconds]
rbowlby has joined #ruby
rubie has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
rubie has joined #ruby
bruno- has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ZeeNoodleyGamer> Anyone here use Passenger?
j4cknewt has quit [Read error: Connection reset by peer]
<sivsushruth> yes
loly0 has joined #ruby
casadei_ has joined #ruby
j4cknewt has joined #ruby
mary5030 has quit [Remote host closed the connection]
skade has joined #ruby
<ZeeNoodleyGamer> I'm having trouble getting anything to show up, I can see the index, but the index file(index.rb) doesn't show, and any file just downloads instead of runs, and they are all executable
mary5030 has joined #ruby
dgutierrez1287 has joined #ruby
<ZeeNoodleyGamer> I have apache, and have tried going through all the docs for passenger, but to no avail
skade has quit [Client Quit]
sparrk has joined #ruby
<sparrk> Quick question. Why does URI report that '/' as relative?
<sparrk> isn't that an absolute uri?
casadei_ has quit [Ping timeout: 260 seconds]
loly0 has left #ruby [#ruby]
<Ox0dea> sparrk: How do you mean?
darwingr has joined #ruby
<ZeeNoodleyGamer> I always thought absolute meant with the domain, and relative, is within the / but without the domain
mary5030 has quit [Ping timeout: 255 seconds]
<Ox0dea> Aye, I believe sparrk has conflated URIs with filesystem paths.
<ZeeNoodleyGamer> ah
<Ox0dea> Yes, the aforementioned conflation has occurred.
dgutierrez1287 has quit [Ping timeout: 246 seconds]
robh71 has joined #ruby
<sparrk> well if I'm going through an HTML document, and someone has an href="/" doesn't that take me to the host?
<ZeeNoodleyGamer> yes
<sparrk> even if I'm on, say, youtube.com/watch/
<Ox0dea> Nope.
<ZeeNoodleyGamer> o_O
wldcordeiro has quit [Remote host closed the connection]
<sparrk> 0_o
<ZeeNoodleyGamer> my whole life is a lie
<sparrk> Mine may be as well.
<Ox0dea> Sorry. It seems I was mistaken. :/
jamesaxl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
wldcordeiro has joined #ruby
<Ox0dea> But I'm almost certain there's some gotcha to beware of with href="/".
<sparrk> Whew. Well I'm happy to learn a gotcha, but now I'm calling into question things like relative and absolute. Writing a web crawler has been very crazy. (did you guys know about the <base> element?!)
<Ox0dea> Fun fun.
<sparrk> Ok, I'll ask one of the URI maintainers for further instructions. Thanks for the help!
<Ox0dea> sparrk: URI#relative? is not behaving incorrectly.
jeadr has quit [Remote host closed the connection]
<ZeeNoodleyGamer> sivsushruth: any input on my perdicament?
<Ox0dea> sparrk: It's returning whether the URI in question is "domain-relative".
<sparrk> ahhh
<sparrk> Thank you
<sivsushruth> ZeeNoodleyGamer: hold on
<Ox0dea> Sure thing.
chills42 has joined #ruby
<sivsushruth> ZeeNoodleyGamer: it should be index.html.erb
darkxploit has joined #ruby
<sivsushruth> and remove the index.html from public/
jeadr has joined #ruby
<Ox0dea> sparrk: More specifically, #relative? is defined as !#absolute?, which returns whether the URI has any scheme at all.
<Ox0dea> >> require 'uri'; URI('http:').relative? # sparrk
<ruboto> Ox0dea # => false (https://eval.in/416984)
mleung has quit [Quit: mleung]
<[spoiler]> sparrk: an absolute URI must contain the scheme, authority (which consist of an optional username, password and a mandatory hostname), and a path;
thiagovsk has quit [Quit: Connection closed for inactivity]
<Ox0dea> [spoiler]: Not according to Ruby's URI library.
<Ox0dea> >> require 'uri'; URI('a:').absolute?
<ruboto> Ox0dea # => true (https://eval.in/416985)
RobertBirnie has joined #ruby
<ZeeNoodleyGamer> almost looks like it just looks for a :
<[spoiler]> so, like this: [scheme:]//[username[:password]]hostname[:port]/path[?=query][#fragment]
<[spoiler]> ZeeNoodleyGamer: scheme:something could be considered an URI, but hmm
<drbrain> data:text/html,hello
<[spoiler]> yes
luksaur has quit [Quit: Leaving]
<drbrain> mailto:drbrain@segment7.net?subject=hello
einarj has joined #ruby
<sparrk> [spoiler] Thanks for the explanation. I assumed that I could treat what "relative" and "absolute" mean in the browser.
workmad3 has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 264 seconds]
<Ox0dea> sparrk: Your assumption was correct?
<Ox0dea> The existence of a scheme is what makes a URI absolute.
symm- has quit [Ping timeout: 250 seconds]
<[spoiler]> sparrk: might be that I am going off from an outdated URI RFC (I read it a long time ago), maybe it was updated; or maybe I just incorrectly remember which parts were mandatory
chills42 has quit [Ping timeout: 272 seconds]
<[spoiler]> (for it to be considered absolute)
gard has quit [Ping timeout: 265 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
<Ox0dea> [spoiler]: A service could register the "a" protocol and consider the empty string to be valid, in which case rejecting "a:" as a valid URI would be incorrect.
dfockler has joined #ruby
<[spoiler]> Ox0dea: good point
<ZeeNoodleyGamer> heck
wldcordeiro has quit [Read error: Connection reset by peer]
<ZeeNoodleyGamer> amazon could do some weird stuff
<ZeeNoodleyGamer> being their getting into different things
einarj has quit [Ping timeout: 264 seconds]
robh71 has joined #ruby
<[spoiler]> Ox0dea: yes you're right, I was talking about the original URI proposal, which is was obsoleted a few times in the past two decades :/
wldcordeiro has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<Mon_Ouie> For some reason I read "past two weeks" and was quite confused
<[spoiler]> Mon_Ouie: that's jsut for websockets :P
<[spoiler]> just*
jobewan has quit [Quit: Leaving]
<[spoiler]> RFC1738 seems to be the latest one (+ updates in RFC3986, RFC6874 and RFC7320)
<[spoiler]> <scheme>:<scheme-specific-part>
nfk has joined #ruby
<[spoiler]> Only the scheme is mandatory for the path to be considered absolute (for a generic URI)
j4cknewt has quit [Remote host closed the connection]
<[spoiler]> what I said is still valid for HTTP URIs
Jackneill has quit [Remote host closed the connection]
wldcordeiro has quit [Ping timeout: 244 seconds]
Motoservo has joined #ruby
spider-mario has quit [Remote host closed the connection]
havenwood has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
Yzguy has joined #ruby
decoponio has joined #ruby
phutchins has quit [Read error: Connection reset by peer]
Thomas-0725 has joined #ruby
foureight84_ has joined #ruby
s00pcan has quit [Ping timeout: 244 seconds]
<shevy> dumdedum
[k- has quit [Ping timeout: 260 seconds]
s00pcan has joined #ruby
tsvenson has joined #ruby
<Ox0dea> >> Errno::EDOOFUS # shevy
<ruboto> Ox0dea # => Errno::NOERROR (https://eval.in/416988)
workmad3 has quit [Ping timeout: 260 seconds]
<Ox0dea> It's a FreeBSD thing, apparently.
sparrk has left #ruby ["Leaving"]
yuung has joined #ruby
foureight84 has quit [Ping timeout: 255 seconds]
<yuung> if my parent class has a mixin, will the child inherit the mixin methods?
<Ox0dea> ?try yuung
<ruboto> yuung, Why don't you try it and see for yourself?
<yuung> .............okay, so it doesn't
<Ox0dea> >> Class.new(Array).include? Enumerable # yuung
<ruboto> Ox0dea # => true (https://eval.in/416989)
<Ox0dea> It does.
<yuung> oh.
<yuung> then i must be doing something wrong
<Ox0dea> Must be.
soulcake has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 244 seconds]
krz has quit [Quit: WeeChat 1.2]
lele is now known as Guest24
Hal_9000_ has quit [Quit: Hal_9000_]
s2013 has joined #ruby
<[spoiler]> yuung: you could show us what you're doing, maybe we can give some insight
matcouto has joined #ruby
workmad3 has joined #ruby
surfs^ has joined #ruby
AccordsLTN has quit []
Torrieri has joined #ruby
AccordLTN has joined #ruby
Vile` has quit [Ping timeout: 240 seconds]
chills42 has joined #ruby
phutchins has joined #ruby
baweaver has joined #ruby
phutchins has quit [Read error: Connection reset by peer]
phutchins has joined #ruby
cornerma1 has joined #ruby
<yuung> [spoiler], https://gist.github.com/johnmarinelli/05881902ddf8f8deaf63. just wondering why i need to call Base.get instead of self.get
benlieb has quit [Quit: benlieb]
Vile` has joined #ruby
devdazed has quit [Ping timeout: 245 seconds]
<shevy> perhaps self.class.get?
jenrzzz has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
workmad3 has quit [Ping timeout: 244 seconds]
<yuung> shevy ah, that worked, heh
<yuung> does self.class look up the inheritance heirarchy where just self doesn't?
dimasg has joined #ruby
<[spoiler]> self.class returns the class of the object
<[spoiler]> >> "thing".class
<ruboto> [spoiler] # => String (https://eval.in/416990)
<Ox0dea> yuung: Module#include brings in instance methods, not class methods.
cornerman has quit [Ping timeout: 255 seconds]
cornerma1 is now known as cornerman
<yuung> i see
<Ox0dea> yuung: This should help clarify a bit: https://gist.github.com/0x0dea/9941d489b540eb8937c1
baweaver has quit [Ping timeout: 240 seconds]
<[spoiler]> yuung: if you want to use a module's instance methods inside a class, use extend
mary5030 has joined #ruby
<yuung> ahh, okay
j4cknewt has joined #ruby
modern has quit [Read error: Connection reset by peer]
<[spoiler]> I kinda phrased that awkwardly, so here's the documentation: http://ruby-doc.org/core-2.2.2/Object.html#method-i-extend
<[spoiler]> yuung: you can use `extend` inside a class body, too
<Ox0dea> You can use #extend anywhere. :)
<yuung> [spoiler], Ox0dea, shevy, thanks
Musashi007 has joined #ruby
<[spoiler]> Erm sorry i linked the wrong thing *sigh*
foureight84_ has quit [Quit: Be back later ...]
Musashi007 has quit [Client Quit]
<[spoiler]> but yes the point still stands
<shevy> it's getting late again
<shevy> [spoiler] may omit some individual characters
<[spoiler]> LOL :D
<[spoiler]> shevy: It's pretty much like being speech impaired in a digital sense.
EllisTAA has joined #ruby
rehat_ has quit [Remote host closed the connection]
<[spoiler]> type-impaired
modern has joined #ruby
modern has joined #ruby
howdoico1 has quit [Ping timeout: 245 seconds]
TheNet has joined #ruby
chills42 has quit [Ping timeout: 244 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Ping timeout: 244 seconds]
XoRoN has joined #ruby
Encapsulation has joined #ruby
jeadr has quit [Remote host closed the connection]
DLSteve has quit [Quit: Leaving]
jeadr has joined #ruby
stardiviner has joined #ruby
ff7f00 has joined #ruby
ruurd_ has quit [Quit: ZZZzzz…]
sivsushruth has quit [Ping timeout: 252 seconds]
lannonbr has quit [Quit: WeeChat 1.2]
hinbody has quit [Quit: leaving]
TomyLobo has quit [Ping timeout: 244 seconds]
lannonbr has joined #ruby
<ff7f00> Hi #ruby, I was wondering if anyone has heard of efforts to implement afl-fuzz instrumentation for Ruby code (similar to python-afl https://bitbucket.org/jwilk/python-afl)?
sivsushruth has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
rcvalle has quit [Quit: rcvalle]
redpants has joined #ruby
pengin has joined #ruby
avitzurel has joined #ruby
howdoico1 has joined #ruby
jtdoncas has joined #ruby
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Changing host]
troulouliou_div2 has joined #ruby
benlieb has joined #ruby
blue_deref has quit [Quit: bbn]
sepp2k has joined #ruby
christiandsg has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Torrieri has quit [Quit: Be back later ...]
blackmesa has joined #ruby
Lucky__ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
redpants has left #ruby [#ruby]
yh has joined #ruby