havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 265 seconds]
aadam21 has joined #ruby
<Ox0dea> s = '123abc456'; [s[/\d+/], s[/\d+$/]] # Diabolik
<Ox0dea> >> s = '123abc456'; [s[/\d+/], s[/\d+$/]]
<ruboto> Ox0dea # => ["123", "456"] (https://eval.in/465102)
zeroDivisible has quit [Quit: WeeChat 1.3]
<Ox0dea> You have to "anchor" the match to the end with '$'.
failedatmath has joined #ruby
<Diabolik> so .sub then '123abc456'; [s[/\d+/], s[/\d+$/]]
<Diabolik> ?
zenguy_pc has joined #ruby
<Ox0dea> Wat.
<Diabolik> ah no i understand
<Diabolik> thanks man
<Ox0dea> Sure thing.
<Ox0dea> Be advised that you don't actually need an explicit conditional if you get a little more clever with the match.
axsuul_ has joined #ruby
Anthony_ has joined #ruby
Anthony_ is now known as _blizzy_
zeroDivisible has joined #ruby
mistermocha has joined #ruby
Pupeno has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 244 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<failedatmath> hey guys
<failedatmath> need help with a math problem
<failedatmath> here's the accompanying diagram
paradisaeidae has joined #ruby
rgrmatt has quit [Remote host closed the connection]
aadam21 has quit [Ping timeout: 255 seconds]
<failedatmath> i am trying to write a little something to randomly generate a coordinate in the dark red space. and i have to make sure it does not give me a coordinate in the lighter red space
fgo has joined #ruby
<Ox0dea> Diabolik: sub(/\d*$/) { $&[0] ? $&.next : 1 } is about as clever as it'll get, I think.
<Ox0dea> failedatmath: This only requires addition and subtraction...
weemsledeux has joined #ruby
<failedatmath> okay, give me a second. i think i've gone full retard
<Diabolik> Ox0dea how did you get so good at this?
banister has joined #ruby
swgillespie has joined #ruby
<Ox0dea> At using Perlvars?
shock_one has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
<Diabolik> at problem solving like this
<Diabolik> the other clever alternative is input.sub(/\d*$/) { |n| n.empty? ? 1 : n.succ }
CloCkWeRX has joined #ruby
<Ox0dea> Diabolik: That's the "obvious" approach, so to speak.
mistermocha has quit [Remote host closed the connection]
shock_one has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
aadam21 has joined #ruby
axsuul_ has quit [Ping timeout: 255 seconds]
trosborn has quit [Quit: trosborn]
fp- has quit [Quit: Lingo: www.lingoirc.com]
odigity has joined #ruby
<odigity> Is there a way to change the source (from rubygems.org to a local mirror) on the command line? In other words, to override the source line in the Gemfile at run-time.
yqt has quit [Ping timeout: 240 seconds]
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
rgrmatt has joined #ruby
aadam21 has quit [Ping timeout: 255 seconds]
axsuul has quit [Ping timeout: 246 seconds]
sapceCase has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby
moeabdol1 has joined #ruby
axsuul has joined #ruby
ledestin has joined #ruby
rgrmatt has quit [Remote host closed the connection]
duckpupp1 has joined #ruby
moeabdol1 has quit [Ping timeout: 252 seconds]
mistermocha has joined #ruby
<odigity> found a sufficient answer in the "MIRRORS OF GEM SOURCES" section near the end: http://bundler.io/man/bundle-config.1.html
tubuliferous_ has joined #ruby
jeffreylevesque has joined #ruby
eminencehc has quit [Remote host closed the connection]
predator217 has joined #ruby
jas02 has joined #ruby
JDiPierro has quit [Remote host closed the connection]
aadam21 has joined #ruby
duckpupp1 has quit [Ping timeout: 264 seconds]
mistermocha has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
tubuliferous_ has quit [Ping timeout: 240 seconds]
predator117 has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
mistermocha has joined #ruby
tkuchiki has quit [Remote host closed the connection]
eminencehc has joined #ruby
jas02 has quit [Ping timeout: 264 seconds]
diegoaguilar has joined #ruby
Blaguvest has quit []
bruno- has joined #ruby
Musashi007 has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
bruno- is now known as Guest10038
aadam21 has quit [Ping timeout: 255 seconds]
mattwildig has quit [Remote host closed the connection]
failedatmath has quit [Ping timeout: 246 seconds]
dtordable has quit [Quit: Lost terminal]
Guest10038 has quit [Ping timeout: 240 seconds]
dtordable has joined #ruby
Rinzlit_ has joined #ruby
marr has quit [Ping timeout: 260 seconds]
Rinzlit has quit [Ping timeout: 255 seconds]
CloCkWeRX has quit [Ping timeout: 260 seconds]
axsuul has quit [Ping timeout: 272 seconds]
mistermocha has quit [Remote host closed the connection]
aadam21 has joined #ruby
rgrmatt has joined #ruby
ss_much has joined #ruby
ESpiney has joined #ruby
TheNet has joined #ruby
Musashi007 has quit [Quit: Musashi007]
rbennacer has joined #ruby
cmoney has joined #ruby
mistermocha has joined #ruby
aadam21_ has joined #ruby
KINGSABRI has quit [Ping timeout: 260 seconds]
aadam21 has quit [Read error: Connection reset by peer]
eminencehc has quit [Remote host closed the connection]
KINGSABRI has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgrmatt has quit [Remote host closed the connection]
ekinmur has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
aadam21_ has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
aadam21 has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
Arkon has joined #ruby
tkuchiki has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
aadam21_ has joined #ruby
aadam21 has quit [Read error: Connection reset by peer]
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
tkuchiki has quit [Remote host closed the connection]
prosodyvVerreabC has quit [Quit: Connection closed for inactivity]
Arkon has quit [Ping timeout: 246 seconds]
rgtk has quit [Read error: Connection reset by peer]
fgo has joined #ruby
d34th4ck3r has joined #ruby
rgtk has joined #ruby
abucha has joined #ruby
aadam21_ has quit [Read error: Connection reset by peer]
rgtk has quit [Read error: No route to host]
aadam21 has joined #ruby
rbennacer has quit [Remote host closed the connection]
rgtk has joined #ruby
mistermocha has quit [Remote host closed the connection]
rgrmatt has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
_stu_ has quit [Quit: _stu_]
rgtk has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
th0m_ has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
aadam21 has quit [Read error: Connection reset by peer]
aadam21_ has joined #ruby
haraoka has joined #ruby
rgtk has joined #ruby
govg has quit [Ping timeout: 240 seconds]
abucha_ has joined #ruby
rgtk has quit [Read error: No route to host]
jdawgaz has joined #ruby
nkts_ has joined #ruby
rgtk has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
aadam21 has joined #ruby
aadam21_ has quit [Read error: Connection reset by peer]
abucha has quit [Ping timeout: 246 seconds]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
favadi has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk_ has joined #ruby
aadam21_ has joined #ruby
aadam21 has quit [Ping timeout: 255 seconds]
rgtk_ has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
aadam21_ has quit [Read error: Connection reset by peer]
aadam21 has joined #ruby
rgtk has quit [Read error: No route to host]
jas02 has joined #ruby
rgtk has joined #ruby
Pupeno has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
duckpupp1 has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
aadam21 has quit [Ping timeout: 255 seconds]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
jas02 has quit [Ping timeout: 250 seconds]
rbennacer has quit [Remote host closed the connection]
duckpupp1 has quit [Ping timeout: 264 seconds]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
bruno- has joined #ruby
bruno- is now known as Guest17611
rgtk has joined #ruby
aadam21 has joined #ruby
blue_deref has quit [Quit: bbn]
howdoicomputer has quit [Ping timeout: 252 seconds]
rgtk has quit [Read error: No route to host]
lidaaa has joined #ruby
rgtk has joined #ruby
shock_one has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
rgtk has quit [Read error: No route to host]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
rgtk has joined #ruby
Guest17611 has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
favadi has joined #ruby
CodingWolf has quit [Ping timeout: 246 seconds]
FailBit has joined #ruby
rgtk has quit [Read error: No route to host]
aadam21 has quit [Ping timeout: 240 seconds]
tvon has joined #ruby
rgtk has joined #ruby
<FailBit> I heard there was ruby going on here
<FailBit> so I came
to_json has quit [Quit: Leaving.]
cyberarm has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
shock_one has quit [Ping timeout: 244 seconds]
* FailBit applies irc_smart_filter
rgtk has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
tvon has joined #ruby
tvon has quit [Client Quit]
rgtk has quit [Read error: No route to host]
agent_white has joined #ruby
skweek has joined #ruby
charliesome has joined #ruby
rgtk has joined #ruby
CodingWolf has joined #ruby
tvon has joined #ruby
Jardayn has quit [Quit: Leaving]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
<Ox0dea> FailBit: Which is the fail bit?
<FailBit> the one in the second highest position
<FailBit> glhf figuring out endianness
rgtk has quit [Read error: Connection reset by peer]
build22_ has quit [Remote host closed the connection]
rgtk has joined #ruby
tkuchiki has joined #ruby
prosodyvVerreabC has joined #ruby
rgtk has quit [Read error: No route to host]
build22_ has joined #ruby
<Ox0dea> >> 'FailBit'.unpack 'b*'
<ruboto> Ox0dea # => ["01100010100001101001011000110110010000101001011000101110"] (https://eval.in/465124)
<Ox0dea> They're both 1. You lose.
<Ox0dea> Good day, sir.
rgtk has joined #ruby
<FailBit> aw
<Ox0dea> I said "good day, sir"!
<FailBit> but I lost
<FailBit> :$-
rgtk has quit [Read error: No route to host]
donske has joined #ruby
<Ox0dea> 20>> :$-
<ruboto> Ox0dea # => :$- (https://eval.in/465126)
codeurge has joined #ruby
donske has quit [Max SendQ exceeded]
mattwildig has joined #ruby
<Ox0dea> I wonder why that was removed in 2.1; I doubt it was hurting anybody.
SREGGINGNIKCUF has joined #ruby
<SREGGINGNIKCUF> hello
rgtk has joined #ruby
<Ox0dea> !ops
<ruboto> apeiros, fflush, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, miah, workmad3, Coraline, zenspider, drbrain, slyphon, rubyhacker1, Aria, baweaver, ljarvis, Adaedra
build22_ has quit [Ping timeout: 246 seconds]
<SREGGINGNIKCUF> ?
<agent_white> Evenin' folks
<FailBit> 0xdefacedbeeffece5
zenguy_pc has joined #ruby
<SREGGINGNIKCUF> evening sir
cdg has joined #ruby
<jhass> SREGGINGNIKCUF: change your nick, 30 seconds
<SREGGINGNIKCUF> ?
<SREGGINGNIKCUF> why?
<SREGGINGNIKCUF> you told me to have this Nick
d34th4ck3r has quit [Quit: zzz]
<jhass> !ban SREGGINGNIKCUF !T 1w bad nick
SREGGINGNIKCUF was kicked from #ruby by ChanServ [Banned: bad nick]
<ja> ¬_¬
<Ox0dea> jhass: Sorry.
rgtk has quit [Read error: No route to host]
<jhass> mh?
Musashi007 has joined #ruby
<Ox0dea> For disturbing you?
<jhass> I wouldn't have reacted when I weren't available
rgtk has joined #ruby
<Ox0dea> >> require 'prime'; n = 0xdefacedbeeffece5; n.bit_length.times.map { |b| n[b] }.reduce(:+).prime? # FailBit
<ruboto> Ox0dea # => true (https://eval.in/465129)
<pontiki> hello, agent_white. what's your report?
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
<Ox0dea> That's not the fastest way to calculate popcount, but it's nice to know 0xdefacedbeeffece5's is prime.
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
donske has joined #ruby
donske has quit [Max SendQ exceeded]
<FailBit> really?
rgtk has quit [Read error: No route to host]
<FailBit> I'm pretty sure it decomposes
<FailBit> *badum psst*
pglombardo has joined #ruby
fgo has joined #ruby
rgtk has joined #ruby
<Ox0dea> FailBit: Its popcount.
platzhirsch has quit [Ping timeout: 265 seconds]
pdoherty has quit [Ping timeout: 240 seconds]
<FailBit> :Y
<Ox0dea> In any case, pelican.jpg.
<FailBit> shall I perhaps introduce myself properly?
<FailBit> since I skipped that
rgtk has quit [Read error: No route to host]
<FailBit> I'm an idiot and I run a website full of freaks. :D
<FailBit> Yes, thank you. *bows*
rgtk has joined #ruby
<Ox0dea> Does it follow then that the primes are inorganic?
rgtk has quit [Read error: No route to host]
<FailBit> is that something you really want to find the answer to?
rgtk has joined #ruby
moeabdol1 has joined #ruby
pglombardo has quit [Ping timeout: 240 seconds]
c355E3B has quit [Quit: Connection closed for inactivity]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fgo has quit [Ping timeout: 250 seconds]
rgrmatt has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
Rinzlit has joined #ruby
rgtk has joined #ruby
Rickmasta has joined #ruby
Yzguy has quit [Quit: Zzz...]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
Rinzlit_ has quit [Ping timeout: 264 seconds]
moeabdol1 has quit [Ping timeout: 260 seconds]
rgtk has quit [Read error: No route to host]
leafybas_ has quit [Remote host closed the connection]
rgtk has joined #ruby
<shevy> do you people only have questions and no answers?
Musashi007 has quit [Quit: Musashi007]
<FailBit> >> !!?==='='
<ruboto> FailBit # => /tmp/execpad-a9091bc0181b/source-a9091bc0181b:2: warning: string literal in condition ...check link for more (https://eval.in/465136)
rgtk has quit [Read error: No route to host]
Rodya_ has joined #ruby
vigintas has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
<dorei> shevy: usually the question is more important that the answer ;-)
<Ox0dea> FailBit: Fixnum.send :undef_method, :even?
jas02 has joined #ruby
rgtk has quit [Read error: No route to host]
<Ox0dea> Also, we can say `?&&.&?&&&?&` in Ruby 2.3, but String#& isn't yet a thing.
rgtk has joined #ruby
<ja> FailBit: what's your site?
asmodlol has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
mistermocha has joined #ruby
<FailBit> now that's a good question isn't it
mistermocha has quit [Remote host closed the connection]
<FailBit> people have guessed right before; hint: it's currently the biggest rails image booru
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
d34th4ck3r has joined #ruby
asmodlol has joined #ruby
<pontiki> better to seek questions than answers.
JDiPierro has joined #ruby
<Ox0dea> Well, that wasn't hard.
jas02 has quit [Ping timeout: 265 seconds]
rgtk has quit [Read error: No route to host]
rgrmatt has joined #ruby
rgtk has joined #ruby
<ja> I had to look up “booru”
mistermocha has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
<ja> kinda ironic when my nickname is the ISO 639 code for Japanese
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
duckpupp1 has joined #ruby
rgrmatt has quit [Ping timeout: 240 seconds]
<shevy> nah
<shevy> it's more ironic that your nick is german now!
rgtk has quit [Read error: No route to host]
<Ox0dea> But we don't know whether "ja" means "yes" or "no".
<Ox0dea> Let's ask three questions of three gods to find out.
rgtk has joined #ruby
<FailBit> "oh Matz, let us..."
mistermocha has quit [Remote host closed the connection]
<shevy> it's yes!
abucha has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<Ox0dea> >> srand File.read($0).size;Object.const_get(Object.constants.sample)[/.{18}$/] # FailBit
<ruboto> Ox0dea # => undefined method `[]' for Gem:Module (NoMethodError) ...check link for more (https://eval.in/465145)
<Ox0dea> >> srand File.read($0).size;Object.const_get(Object.constants.sample)[/.{18}$/]
<ruboto> Ox0dea # => "Yukihiro Matsumoto" (https://eval.in/465146)
<Ox0dea> FailBit: Now explain why highlighting you broke it.
<Ox0dea> Are you a demon?
<FailBit> I'm a freak but I don't think I'm a demon
duckpupp1 has quit [Ping timeout: 255 seconds]
<FailBit> I'm pretty sure anyways
TheNet has quit [Remote host closed the connection]
abucha_ has quit [Ping timeout: 240 seconds]
kp666_ has joined #ruby
<FailBit> :$:
favadi has quit [Quit: Textual IRC Client: www.textualapp.com]
kp666_ has quit [Max SendQ exceeded]
Pupeno has quit [Remote host closed the connection]
<Ox0dea> >> def para m; (9*m**3+1)**3+(9*m**4)**3+(-9*m**4-3*m)**3; end; 10.times.map { para rand 1000 }
<ruboto> Ox0dea # => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] (https://eval.in/465147)
<Ox0dea> Way spooky, yeah?
kp666_ has joined #ruby
<FailBit> isn't that a variation of a classic magic trick?
<Ox0dea> It's a parametric equation.
kp666_ has quit [Max SendQ exceeded]
<FailBit> yeah, it is
<Ox0dea> You're thinking of the really lame "halve your number and add <some even>" trick.
kp666_ has joined #ruby
favadi has joined #ruby
kp666_ has quit [Max SendQ exceeded]
cmoney has quit [Remote host closed the connection]
rgtk has quit [Ping timeout: 260 seconds]
kp666 has quit [Ping timeout: 265 seconds]
devbug_ has joined #ruby
kp666_ has joined #ruby
nkts_ has quit [Read error: Connection reset by peer]
arescorpio has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest20096
<FailBit> what is the strangest ruby syntax you've ever seen?
<FailBit> o_o
dnewkerk has joined #ruby
rgtk has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest20096 has quit [Ping timeout: 252 seconds]
d34th4ck3r has quit [Quit: zzz]
<Ox0dea> Here's a more immediately satisfying one: https://eval.in/464964
<FailBit> a brainfuck compiler?
<Ox0dea> Interpreter.
<FailBit> right
rgtk has quit [Read error: No route to host]
diegoaguilar has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
waxjar has quit [Quit: Connection closed for inactivity]
asmodlol has quit [Ping timeout: 250 seconds]
<Ox0dea> FailBit: This all parses just fine, though, and it really isn't that weird, just different.
<Ox0dea> Things can get pretty strange with heredocs used as arguments.
<FailBit> guh, I bet
rgtk has quit [Ping timeout: 260 seconds]
<FailBit> the interpreter sees instructions, but the human sees logic, and that's why it's gibberish :D
<Ox0dea> Vim completely shits the bed on highlighting that one.
d34th4ck3r has joined #ruby
A124 has quit [Read error: Connection reset by peer]
bayed has quit [Quit: Connection closed for inactivity]
rgtk has joined #ruby
build22_ has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<FailBit> I'm going to go to bed, ooos
fedexo has joined #ruby
diegoaguilar has joined #ruby
nofxx has quit [Ping timeout: 264 seconds]
A124 has joined #ruby
<shevy> stay awake
<shevy> idle with us to power
rgtk_ has joined #ruby
build22_ has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
JDiPierro has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk_ has quit [Read error: No route to host]
rgtk has joined #ruby
favadi has quit [Read error: Connection reset by peer]
abucha_ has joined #ruby
cdg has quit [Remote host closed the connection]
fgo has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
pocketpr1 has joined #ruby
abucha has quit [Ping timeout: 252 seconds]
rgtk has joined #ruby
goodcodeguy has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
jas02 has joined #ruby
<mus> :(\
mghaig has joined #ruby
Rinzlit_ has joined #ruby
vigintas has joined #ruby
mm_ has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rinzlit has quit [Ping timeout: 246 seconds]
rgtk has quit [Read error: No route to host]
_michael has joined #ruby
<Ox0dea> >> [:*, :/, :<, :>, :>=, :^, :|]
<ruboto> Ox0dea # => [:*, :/, :<, :>, :>=, :^, :|] (https://eval.in/465166)
rgtk has joined #ruby
<Ox0dea> Now please stop with the syntax errors.
<_michael> ruby question: how can I get the last N bits of a string as a string?
<Ox0dea> _michael: Huh?
pocketpr1 has quit [Ping timeout: 260 seconds]
infamos has joined #ruby
<Ox0dea> You must not be using "bit" in the technical sense.
<_michael> I am
<_michael> I have a base64 encoded string that I'd like to get an ID from, that ID is the last 64 bits of the string
zeroDivisible has quit [Quit: WeeChat 1.3]
jas02 has quit [Ping timeout: 255 seconds]
blitznuggets has joined #ruby
<blitznuggets> hello, all
<_michael> or rather, can be calculated by turning the last 64 bits into their ascii equivalents (I'm assuming)
<blitznuggets> i am interested in ruby, but don't know where to start
<blitznuggets> i know the basics of c, if that helps
<blitznuggets> i am interested in hacking and security
vigintas has quit [Ping timeout: 265 seconds]
<blitznuggets> i am just learning languages, really; i'm pretty aimless and don't know where to look with my interest
JDiPierro has quit [Remote host closed the connection]
<_michael> Ox0dea: I think I got it, just converting back and forth manually using to_i(2)
<Ox0dea> blitznuggets: In that case, maybe start with Violent Python?
<bnagy> blitznuggets: so I am a diehard rubyist, but if you're interested in coding for hacking then you should learn python
rgtk_ has joined #ruby
<Ox0dea> !next
rgtk has quit [Ping timeout: 260 seconds]
<Ox0dea> _michael: I don't follow? Converting the last 64 bits to binary and back to ASCII is a no-op.
<_michael> as in converint to ascii is pointless because it's going to end up with the same result, right?
<Ox0dea> Right.
<_michael> Hm. That was my first thought too. I am trudging along assuming I'll figure it out.
dorei has quit []
<_michael> I am trying to get the key id from a GPG key (public)
TheHodge has quit [Quit: Connection closed for inactivity]
<bnagy> _michael: ruby strings are just raw, more or less
blitznuggets has quit []
<bnagy> ie once you Decode64 just take the last 8 bytes
<_michael> right
drizzle has joined #ruby
rgrmatt has joined #ruby
cacam9621 has joined #ruby
<bnagy> you might want to look at unpack if you want to turn it into like a uint64?
nateberkopec has quit [Quit: Leaving...]
rgtk_ has quit [Ping timeout: 260 seconds]
mm_ has quit [Remote host closed the connection]
aadam21 has joined #ruby
Rickmasta has joined #ruby
shock_one has joined #ruby
duckpupp1 has joined #ruby
TheNet has joined #ruby
<bnagy> _michael: as an aside, relying on gpg keyids isn't great, since they aren't guaranteed to be present
ss_much has quit [Quit: Connection closed for inactivity]
_blizzy_ has quit [Quit: Leaving]
<bnagy> so make sure you handle that :P
rgrmatt has quit [Ping timeout: 250 seconds]
mghaig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baroquebobcat has joined #ruby
mghaig has joined #ruby
aadam21 has quit [Ping timeout: 272 seconds]
duckpupp1 has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
shock_one has quit [Ping timeout: 265 seconds]
UtkarshRay has quit [Remote host closed the connection]
baroquebobcat has quit [Read error: Connection reset by peer]
roxtrongo has joined #ruby
baroquebobcat has joined #ruby
drizzle has left #ruby ["WeeChat 1.3"]
chipotle has quit [Quit: cheerio]
baroquebobcat has quit [Client Quit]
poguez_ has quit [Quit: Connection closed for inactivity]
krz has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
bruno- has joined #ruby
bruno- is now known as Guest7032
s00pcan has quit [Ping timeout: 265 seconds]
rbennacer has joined #ruby
mghaig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
s00pcan has joined #ruby
mghaig has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola has quit [Quit: WeeChat 1.3]
Guest7032 has quit [Ping timeout: 255 seconds]
zenguy_pc has quit [Ping timeout: 272 seconds]
UtkarshRay has joined #ruby
ahuman has quit [Quit: No Ping reply in 180 seconds.]
mghaig has quit [Client Quit]
mghaig has joined #ruby
ahuman has joined #ruby
ebbflowgo has joined #ruby
h99h9h88 has joined #ruby
Axy has joined #ruby
mghaig has quit [Quit: Textual IRC Client: www.textualapp.com]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mia has quit [Ping timeout: 244 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
build22_ has joined #ruby
cdg has joined #ruby
Axy has quit [Read error: Connection reset by peer]
darkf has joined #ruby
moeabdol1 has joined #ruby
skcin7_ has joined #ruby
paradisaeidae has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 240 seconds]
braincrash has quit [Quit: bye bye]
houhoulis has joined #ruby
blubjr has joined #ruby
build22_ has quit [Ping timeout: 240 seconds]
rbennacer has quit [Remote host closed the connection]
skcin7 has quit [Ping timeout: 255 seconds]
duckpupp1 has joined #ruby
axsuul has joined #ruby
skcin7 has joined #ruby
astrobunny has joined #ruby
kp666 has joined #ruby
kp666_ has quit [Ping timeout: 250 seconds]
gix has quit [Ping timeout: 272 seconds]
moeabdol1 has quit [Ping timeout: 260 seconds]
framling has joined #ruby
skcin7_ has quit [Ping timeout: 244 seconds]
<odigity> geminabox and gemirro are both completely broken. is there no good solution for setting up a caching proxy for rubygems?
opensource_ninja has quit [Quit: opensource_ninja]
<Ox0dea> odigity: It's an unorthodox thing to want to do, for what it's worth.
gix has joined #ruby
jdawgaz has joined #ruby
fgo has joined #ruby
d34th4ck3r has quit [Quit: zzz]
pdoherty has joined #ruby
mattwildig has quit [Remote host closed the connection]
braincras has joined #ruby
minimalism has quit [Quit: leaving]
agentmeerkat has quit [Ping timeout: 244 seconds]
<odigity> Ox0dea, I don't see why. I have plenty of friends that run local caches at home for debian packages because they install things over and over during dev. I'm experiencing the same thing right now with gem installs. It's the slowest part of my docker build.
<odigity> And then there's the case of private gems you don't want to push to rubygems...
<odigity> Plenty of valid and common cases.
psy_ has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
<Ox0dea> odigity: I trust you're aware that you can install locally built gems?
<odigity> Yes, but that requires referencing a local filesystem. Hardly appropriate on a multi-developer project.
<Ox0dea> Aye, fair enough.
<Ox0dea> How's geminabox proving deficient?
<odigity> A caching proxy is the right solution for this situation. Just can't believe there isn't a working one. All the past ones are broken.
<odigity> It doesn't respond with content.
<Ox0dea> Is that just, like, your opinion, man?
h99h9h88 has quit [Remote host closed the connection]
minimalism has joined #ruby
duckpupp1 has quit [Ping timeout: 255 seconds]
h99h9h88 has joined #ruby
vdamewood has quit [Excess Flood]
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
paradisaeidae has joined #ruby
mistermocha has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
h99h9h88 has quit [Ping timeout: 240 seconds]
Oog has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
roxtrongo has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 240 seconds]
northfurr has quit [Quit: northfurr]
to_json has joined #ruby
to_json has joined #ruby
_michael has quit [Ping timeout: 272 seconds]
astrobunny has quit [Remote host closed the connection]
jaredrhine has quit [Ping timeout: 240 seconds]
mburns has quit [Ping timeout: 272 seconds]
vdamewood has joined #ruby
lidaaa has quit [Quit: Leaving]
s00pcan has quit [Ping timeout: 255 seconds]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_michael has joined #ruby
ThatsNotJack has quit [Remote host closed the connection]
sapslaj has joined #ruby
s00pcan has joined #ruby
astrobunny has joined #ruby
ThatsNotJack has joined #ruby
ThatsNotJack has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
<Radar> although that looks like it's a proxy. Damn.
<Radar> But... if I read right, that's what you want?
ThatsNotJack has joined #ruby
<VeryBewitching> gemstash looks pretty cool, haven't seen that before.
<blubjr> dynamic types @_@
bruno- has joined #ruby
<Ox0dea> blubjr: You took a wrong turn somewhere, mate.
bruno- is now known as Guest50656
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iateadonut has joined #ruby
<blubjr> v_v
<blubjr> whats nondestructive push
Guest50656 has quit [Ping timeout: 240 seconds]
blue_deref has joined #ruby
<mus> Hmm.
roxtrongo has joined #ruby
duncannz has joined #ruby
blue_deref has quit [Client Quit]
leafybas_ has joined #ruby
jmonreal has quit [Ping timeout: 252 seconds]
psy_ has quit [Read error: Connection reset by peer]
infamos has quit [Ping timeout: 240 seconds]
wprice has joined #ruby
chipotle has quit [Quit: cheerio]
astrobunny has quit [Remote host closed the connection]
leafybas_ has quit [Ping timeout: 260 seconds]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
s00pcan has quit [Remote host closed the connection]
s00pcan has joined #ruby
infamos has joined #ruby
krz has quit [Ping timeout: 246 seconds]
mburns has joined #ruby
chipotle has joined #ruby
build22_ has joined #ruby
cdg has quit [Remote host closed the connection]
dravine_ has joined #ruby
krz has joined #ruby
moeabdol1 has joined #ruby
dravine has quit [Ping timeout: 265 seconds]
dravine_ is now known as dravine
<djellemah> odigity: gem generate_index; gem server
Trynemjoel has joined #ruby
build22_ has quit [Ping timeout: 240 seconds]
vigintas has joined #ruby
kp666 has quit [Ping timeout: 240 seconds]
to_json has quit [Quit: Leaving.]
<odigity> djellemah, I think that will only serve gems you already have installed locally, not cache new gems as they're requested. however, this ended up working: https://github.com/mumoshu/docker-squid-gem-proxy
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
to_json has quit [Client Quit]
moeabdol1 has quit [Ping timeout: 240 seconds]
kp666 has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
vigintas has quit [Ping timeout: 244 seconds]
tubuliferous_ has joined #ruby
UtkarshRay has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
fgo has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kp666_ has joined #ruby
jmonreal has joined #ruby
Musashi007 has quit [Quit: Musashi007]
fgo has quit [Ping timeout: 246 seconds]
howdoicomputer has joined #ruby
aadam21 has joined #ruby
astrobunny has joined #ruby
vdamewood has quit [Quit: Life beckons.]
jmonreal has quit [Ping timeout: 265 seconds]
Musashi007 has joined #ruby
tubuliferous_ has quit [Ping timeout: 240 seconds]
kp666 has quit [Ping timeout: 255 seconds]
ESpiney has quit [Read error: Connection reset by peer]
aadam21 has quit [Ping timeout: 260 seconds]
Arkon has joined #ruby
trosborn has joined #ruby
joufflu has quit [Quit: Leaving]
UtkarshRay has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
rgrmatt has joined #ruby
vdamewood has joined #ruby
RobertBirnie has joined #ruby
_michael has quit [Ping timeout: 240 seconds]
paradisaeidae has quit [Remote host closed the connection]
rgrmatt has quit [Ping timeout: 252 seconds]
beauby has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
trosborn has quit [Quit: trosborn]
<ja> Radar: What's wrong with you and who the heck gave you any privileges in #rubyonrails?
<Radar> ja: lol
mburns has quit [Ping timeout: 246 seconds]
<Radar> I worked for them. What have you done?
chipotle has quit [Quit: cheerio]
<ja> Now you sound like Steve Jobs. “What have you done that's so great?” I like it. I hope we can become friends, Radar.
<Radar> Great.
RegulationD has quit [Ping timeout: 250 seconds]
_michael has joined #ruby
codecop has joined #ruby
krz has quit [Ping timeout: 240 seconds]
sanjayu has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest24402
eminencehc has joined #ruby
jmonreal has joined #ruby
s00pcan has quit [Remote host closed the connection]
d34th4ck3r has joined #ruby
<Coraline> TIL: the Ruby flip flop operator http://nithinbekal.com/posts/ruby-flip-flop/
Guest24402 has quit [Ping timeout: 260 seconds]
<pontiki> omg, flip flop operator
<Ox0dea> No mention of the trip-flop.
<Coraline> WTAF
shortCircuit___ has joined #ruby
krz has joined #ruby
shortCircuit___ is now known as aceRacer
<Ox0dea> I reckon most people who do know about the flip-flop operator don't realize that it's just the range operator(s) repurposed.
<pontiki> i had one place it was the best solution back in my perl days.
Trynemjoel has joined #ruby
<Ox0dea> It's "great" for a two-state machine, and that's about it.
leafybas_ has joined #ruby
aceRacer has quit [Remote host closed the connection]
<Ox0dea> Oh, the flip-flop FizzBuzz does use a trip-flop.
safe has quit [Quit: Leaving]
desmondh_ has joined #ruby
UtkarshRay has joined #ruby
leafybas_ has quit [Ping timeout: 255 seconds]
arescorpio has quit [Quit: Leaving.]
karapetyan has joined #ruby
<ja> Has anyone _ever_ used the flip flop operator for anything?
<ja> apart from pontiki in their perl days
Trynemjoel has quit [Ping timeout: 250 seconds]
build22_ has joined #ruby
mburns has joined #ruby
dionysus69 has joined #ruby
hxegon has joined #ruby
joufflu has joined #ruby
jim1138 has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
shinenelson has joined #ruby
krz has quit [Ping timeout: 264 seconds]
<hxegon> sometimes I wonder if I was ever that bad...
<pontiki> *once* ja
build22_ has quit [Ping timeout: 246 seconds]
desmondh_ has quit [Ping timeout: 250 seconds]
desmondhume has joined #ruby
kp666 has joined #ruby
eminencehc has quit [Remote host closed the connection]
dhjondoh has joined #ruby
joufflu has quit [Read error: Connection reset by peer]
desmondhume has quit [Ping timeout: 250 seconds]
lubarch has joined #ruby
fgo has joined #ruby
mattwildig has joined #ruby
hxegon has quit [Ping timeout: 240 seconds]
houhoulis has quit [Remote host closed the connection]
chrissonar has joined #ruby
arup_r has joined #ruby
mistermocha has quit [Remote host closed the connection]
desmondhume has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
mattwildig has quit [Ping timeout: 265 seconds]
agilenav has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
Qantourisc has quit [Ping timeout: 250 seconds]
fgo has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CloCkWeRX has joined #ruby
Qantourisc has joined #ruby
krz has joined #ruby
hxegon has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Quit: dionysus69]
desmondhume has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
agilenav has quit []
<Nilium> I am having the hardest time figuring out how to buy Windows
<Ox0dea> Nilium: I'm still trying to install Facebook...
<Nilium> The difference here is that what I'm doing is actually doable, but.. Microsoft doesn't say how
tagrudev has joined #ruby
<pontiki> buy windows?
<Nilium> Yeah. It's all "WANNA UPGRADE!?"
<Nilium> No I want to buy it
<pontiki> i thought you could only get it with a machine or with a dev subscription
<Nilium> I am not going through the upgrade process from Win Vista through to Win 10
<Nilium> I think I found it
hxegon has quit [Ping timeout: 250 seconds]
<Nilium> You have to go to their store. The Windows info page or whatever doesn't take you there.
desmondhume has joined #ruby
lubarch has quit [Quit: leaving]
crystalmaiden has joined #ruby
<Ox0dea> Nilium: Are you high?
<Nilium> I have never been high in my life. Are you done being a dick?
<Ox0dea> Please maintain your composure.
<blubjr> lol
kp666 has quit [Ping timeout: 264 seconds]
aadam21 has joined #ruby
moeabdol1 has joined #ruby
yosiat has joined #ruby
<desmondhume> lulz
<desmondhume> are you all done being high dicks?
<pontiki> that's a tall order
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
norc has joined #ruby
<norc> Hi. Is this a good place to ask questions about YARV, or only when Ox0dea is around? :D
<Ox0dea> norc: Where else would you ask even if I weren't?
<norc> That would have been my next question if you weren't. :)
<Ox0dea> I'm all eyes.
<norc> >> puts RubyVM::InstructionSequence.compile("puts 1 unless false").disasm
<ruboto> norc # => == disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== ...check link for more (https://eval.in/465329)
<norc> So obviously Ruby optimizes the branchunless away, but leaves dead YARV instructions there. Why?
gard_ has joined #ruby
<Ox0dea> That is a little weird.
moeabdol1 has quit [Ping timeout: 255 seconds]
aadam21 has quit [Ping timeout: 240 seconds]
<norc> I mean Im even more confused when I change the conditional to:
<norc> >> puts RubyVM::InstructionSequence.compile("puts 1 if true").disasm
<ruboto> norc # => == disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== ...check link for more (https://eval.in/465330)
<Ox0dea> That's the same program.
abucha_ has quit [Remote host closed the connection]
_michael has quit [Quit: WeeChat 1.3]
<norc> Except it doesn't jump.
yosiat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Unarmed has joined #ruby
Oog has quit []
anisha has joined #ruby
abucha has joined #ruby
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<norc> In the first case you just have dead code in there, the second executes pop/putnil at 7/8 - which I dont get.
<Ox0dea> It does seem to just be a missed optimization in the first case.
shock_one has joined #ruby
abucha has quit [Remote host closed the connection]
shock_one has quit [Read error: Connection reset by peer]
<Ox0dea> The instruction definitions are just as you'd expect to find. :/
abucha has joined #ruby
<norc> Mmm.
shock_one has joined #ruby
yardenbar has joined #ruby
abucha_ has joined #ruby
kimegede has joined #ruby
poguez_ has joined #ruby
abucha__ has joined #ruby
tmtwd has quit [Ping timeout: 250 seconds]
aspiers has joined #ruby
Arkon has quit [Remote host closed the connection]
jim1138 has joined #ruby
Trynemjoel has joined #ruby
Arkon has joined #ruby
abucha has quit [Ping timeout: 272 seconds]
abucha_ has quit [Ping timeout: 244 seconds]
<norc> Ox0dea: Oh Im stupid yeah I get it now. But that too would be a missed optimization, would it not?
vigintas has joined #ruby
<norc> I mean if the compiler is smart enough to leave immediately, instead of branchunless around the code.
desmondhume has quit [Ping timeout: 272 seconds]
<Ox0dea> norc: `1 if true` and `1 unless false` should compile to the exact same bytecode, yes.
fgo has quit [Quit: WeeChat 1.3]
User458764 has joined #ruby
yashinbasement has joined #ruby
<norc> Ox0dea: Alright, thank you.
Rodya_ has quit [Quit: Leaving...]
chipotle has joined #ruby
<Ox0dea> norc: I'm still trying to figure out exactly what's happening.
ta has quit [Remote host closed the connection]
Musashi007 has joined #ruby
Arkon has quit [Remote host closed the connection]
<Ox0dea> The `branchif` and `branchunless` instructions are sane, so it must be something in `trace`, but that doesn't seem to be doing any optimizations for `Qtrue` being the top of the stack.
vigintas has quit [Ping timeout: 272 seconds]
<Ox0dea> Well, actually...
Arkon has joined #ruby
Oog has joined #ruby
<Ox0dea> I can't say with certainty, but I think that line leaves `Qundef` at the top of the stack for `1 unless false`, but YARV can't send that up to Ruby land.
Unarmed has left #ruby [#ruby]
ciampix has joined #ruby
DoubleMalt has joined #ruby
<Ox0dea> That doesn't really hold, though, so I'm sure the problem is in another castle, namely the actual instruction execution code and not just the definitions.
abucha__ has quit [Remote host closed the connection]
abucha has joined #ruby
build22_ has joined #ruby
build22_ has quit [Remote host closed the connection]
lsmola has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Trynemjoel has quit [Ping timeout: 264 seconds]
moeabdol1 has joined #ruby
C0r3 has joined #ruby
mooru has joined #ruby
|K|K|K| has joined #ruby
<C0r3> I just don't understand what is Ruby MRI?? I looked up the Wikipedia page yet have no idea what is it about?? How is it different from Ruby??
d34th4ck3r has quit [Quit: zzz]
jas02 has joined #ruby
timonv has joined #ruby
<Ox0dea> norc: I found it.
<Ox0dea> It's just there as an easy safeguard against stack inconsistency.
vF3hNGxc47h8 has joined #ruby
<norc> Ox0dea: Can you elaborate?
<Ox0dea> norc: Er, sorry, couple lines down: https://github.com/ruby/ruby/blob/trunk/compile.c#L3848-L3850
symm- has joined #ruby
<Ox0dea> If the compiler has reached the end of a label and didn't have to "do anything", a dummy `putnil` gets compiled in.
abucha_ has joined #ruby
<Ox0dea> I can't say how exactly its removal might lead to stack inconsistency, but that's the line that generates the dead code.
Pupp3tm4st3r has joined #ruby
TvL2386 has joined #ruby
vF3hNGxc47h8 has quit [Ping timeout: 260 seconds]
<C0r3> Ox0dea: Can you please help me with my question?
abucha_ has quit [Client Quit]
<Ox0dea> C0r3: What even is Ruby, really?
<C0r3> Ox0dea: If it is the same then why call it Ruby MRI?
<Ox0dea> C0r3: Honest question: what is Ruby?
desmondhume has joined #ruby
<norc> Ox0dea: Ah alright. Thank you for your pointer. :)
abucha has quit [Ping timeout: 272 seconds]
<Ox0dea> norc: Sure thing. Do let me know if you end up getting right to the heart of the thing.
<C0r3> Ox0dea: Ruby is a scripting language, and it's interpreter is written in C.
<Ox0dea> > it's interpreter
<Ox0dea> That phrase is grammatically incorrect and factually ignorant.
Mon_Ouie has quit [Ping timeout: 244 seconds]
jim1138 has quit [Ping timeout: 260 seconds]
Trynemjoel has joined #ruby
<C0r3> Ox0dea: Can you help me understand?
Rickmasta has joined #ruby
<Ox0dea> C0r3: The original implementation was and remains written in C, but there have been many other implementations since; thus, we must differentiate between them, and so we call the canonical C interpreter MRI and/or YARV.
<Ox0dea> MRI != Rubinius != JRuby != IronRuby, and yet they are all Ruby.
<C0r3> Ox0dea: I need to understand what is a reference implementation. Any good links other than Wikipedia?
<Ox0dea> C0r3: The reference implementation is just... the first one.
desmondhume has quit [Ping timeout: 255 seconds]
bigkevmcd has joined #ruby
<certainty> :D
<certainty> moin
<Ox0dea> certainty: Apologies if I woke you.
<Ox0dea> You're very pingable.
astrobunny has quit [Read error: Connection reset by peer]
astrobu__ has joined #ruby
<certainty> Ox0dea: nope you didn't :) no worries
<|K|K|K|> anyone else in a frat?
<Ox0dea> A Twitch troll here in #ruby?!
<|K|K|K|> no
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dnewkerk has quit [Quit: dnewkerk]
<Ox0dea> Wanna bet?
<|K|K|K|> just another rubyist who happens to be in a kick ass frat
<|K|K|K|> tri kap represent!
desmondhume has joined #ruby
devoldmx has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
karapetyan has joined #ruby
aufi has joined #ruby
sinkensabe has joined #ruby
<C0r3> Ox0dea: Thanks.
desmondhume has quit [Ping timeout: 240 seconds]
desmondhume has joined #ruby
sinkensa_ has joined #ruby
rgrmatt has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
krz has quit [Ping timeout: 240 seconds]
scmx has joined #ruby
desmondhume has quit [Remote host closed the connection]
<Ox0dea> C0r3: For most intensive porpoises, "Ruby" really does mean MRI/YARV, but considerable effort goes into JRuby and Rubinius to make the distinction immaterial.
imstar has joined #ruby
linocisco has joined #ruby
krz has joined #ruby
<C0r3> Ox0dea: I see.
<C0r3> Ox0dea: If I plan to code walk the entire ruby source code then where should I start?
rgrmatt has quit [Ping timeout: 244 seconds]
vdamewood has quit [Quit: Life beckons.]
imstar has quit [Client Quit]
yardenbar has quit [Ping timeout: 264 seconds]
d34th4ck3r has joined #ruby
astrobu__ has quit [Remote host closed the connection]
tvw has joined #ruby
bruno- has joined #ruby
<Ox0dea> C0r3: What's your favorite method?
bruno- is now known as Guest19409
d34th4ck3r has left #ruby [#ruby]
<C0r3> Ox0dea: I've never done something like that before.. I'm still learning things.
<Ox0dea> C0r3: Your favorite Ruby method.
User458764 has joined #ruby
<C0r3> select, delete_if
Guest19409 has quit [Ping timeout: 260 seconds]
krz has quit [Read error: Connection reset by peer]
lsmola has quit [Ping timeout: 272 seconds]
<mus> :)
krz has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
malcolmva has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
<Ox0dea> C0r3: Well, why not endeavor to gain a deep understanding of exactly how #select works?
crystalmaiden has quit [Ping timeout: 240 seconds]
<Ox0dea> Starting at the very top of a program as large as MRI is gonna put your hands in too many cookie jars.
<C0r3> Ox0dea: Thank u
yardenbar has joined #ruby
<|K|K|K|> can a self taught beginner programmer get a good job if they have a GED and no college degree but graduated from one of those programming boot camps like hack reactor, bloc, or coding dojo?
<mus> Yup.
agent_white has joined #ruby
<|K|K|K|> what is the criteria?
ibouvousaime has joined #ruby
<mus> Generally just a cpacity for problem solving, data structures, algorithms.
<mus> Four week bootcamps aren't really going to delve into such things.
<mus> A lot more self-study is required.
chipotle has quit [Quit: cheerio]
<mus> So about a year, before you find yourself in a capacity where you're able to find yourself competent enough.
<mus> A lot of these people don't even have any idea what a red-black tree is.
SenpaiSilver has quit [Quit: Leaving]
<mus> So do your best to understand as much as you can, about all that you can.
<mus> Not just bootcamps that teach you how to make a timer in Rails.
<mus> You need to be at your absolute best. So good you cannot be ignored.
<mus> Bootcamps really won't get you that far.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Arkon has quit [Remote host closed the connection]
trosborn has joined #ruby
solars has joined #ruby
Arkon has joined #ruby
krz has quit [Read error: Connection reset by peer]
adac has joined #ruby
krz has joined #ruby
trosborn has quit [Client Quit]
Arkon has quit [Ping timeout: 240 seconds]
lsmola has joined #ruby
malcolmva has joined #ruby
C0r3 has quit [Quit: leaving]
Arkon has joined #ruby
vigintas has joined #ruby
davedev24 has quit []
<daxroc> Anyone know of a pure ruby library for generating ISO image files ?
zeroDivisible has joined #ruby
pard has joined #ruby
build22_ has joined #ruby
<pard> greet ye all nobles
vigintas has quit [Ping timeout: 240 seconds]
htmldrum has quit [Ping timeout: 272 seconds]
<apeiros> |K|K|K|: please change your nick
<mus> daxroc: It shouldn't be too difficult to write, should it?
<|K|K|K|> why a period
<|K|K|K|> apeiros
<|K|K|K|> kkk is tri kap
<mus> No, I'm not currently aware of such a project being in existence, but feh.
<apeiros> |K|K|K|: I don't care. change your nick.
<mus> apeiros: Lover. Where've you been all weekend?
<apeiros> mus: busy spreading love.
<|K|K|K|> by you saying you don't care means you are willfully ignorant
<apeiros> !kick |K|K|K| last warning.
|K|K|K| was kicked from #ruby by ruboto [last warning.]
|K|K|K| has joined #ruby
<mus> Effective.
<pard> ?
<|K|K|K|> why should I change my name?
<mus> Because you were told to. :)
<|K|K|K|> I haven't broken any rules
<apeiros> !ban |K|K|K| !P you've been warned
|K|K|K| was banned on #ruby by ChanServ [|K|K|K|!*@*]
|K|K|K| was kicked from #ruby by ChanServ [Banned: you've been warned]
astrobunny has joined #ruby
<mus> Perhaps he's a Kardashian, and this is all so terribly innocent of him?
<apeiros> mus: they've been here before and told before
<mus> Ah.
<apeiros> not sure why I even warned. I should have known better and just straight banned.
symm- has quit [Ping timeout: 260 seconds]
<mus> Last time I was around was when I went by "sp_", didn't really pay attention to the trolls.
zeroDivisible has quit [Quit: WeeChat 1.3]
rgtk has joined #ruby
<apeiros> before sp_ you had another nick iirc?
<mus> Da.
TomyWork has joined #ruby
<mus> Which is why you re-vouched for me. :)
<apeiros> faint memories. I'm getting old :(
<pard> is it a correct claim: calling a lmbda recursivly is faster than calling a meth in that manner?
shock_one has quit [Remote host closed the connection]
<mus> Is pro active yet?
<apeiros> nope
<pard> in ruby?
<apeiros> pard: just benchmark?
<mus> pard: Hash recursion is usually faster than lambda recursion, …
Xeago has quit [Read error: Connection reset by peer]
<mus> But premature optimzation is the devil.
SCHAAP137 has joined #ruby
<apeiros> fastest in ruby is usually to reimplement the recursion as a loop. ruby is quite bad wrt recursion :-/
<apeiros> and +1 @ premature opt
<pard> apeiros, thanks; i was postulating that, if i've not been mistaken, calling a lmbda won't involve a name lookup, recursiveny calling it might be faster
blaxter has joined #ruby
<pard> *because
mattwildig has joined #ruby
Oog has quit [Read error: Connection reset by peer]
<apeiros> pard: method calls are optimized in ruby
<apeiros> and calling a lambda is an additional method call
<apeiros> since in order to execute the lambda, you do Proc#call
<pard> thanks a lot; did not know it :\
<mus> Understand that hash recursions keep the calculated values on memory, and lambda recursion doesn't. Try a testcase for something like a fibonacci sequence against a number like 100. With lambda recursion, you're inherently creating a huge tree of calls before you meet your edge conditions. Tail recursion may circumvent, or ultimately avoid this, but that's not very optimized in Ruby as far as I'm aware.
<apeiros> so I'm not quite so certain using lambdas would be faster. as said: benchmark.
rgtk has quit [Ping timeout: 260 seconds]
<apeiros> ruby doesn't have TCO by default
<apeiros> it's there, you can enable it at compile time. but by default it's off.
mark2 has joined #ruby
desmondhume has joined #ruby
bayed has joined #ruby
<mus> But yeah, for the purpose of exercising this, test against a hash and a lambda using Benchmark against a big number, just to see the variances.
<pard> could i maybe ask you for a benchmark lib?
<Ox0dea> pard: benchmark-ips
<apeiros> ^
<pard> thanks a lot
<Ox0dea> apeiros: At *either* compile time, to be precise.
<apeiros> Ox0dea: hm?
<Ox0dea> That is, you can compile Ruby itself with TCO, but also individual RubyVM::InstructionSequences.
<apeiros> ah
<mus> pard: There's a Benchmark module, it's called Benchmark. Benchmark-ips is something different.
<apeiros> RubyVM is still a black box for me. I really should play around with that. seems to be an interesting thing.
<mus> pard: It's like Benchmark on steroids. :P)
mattwildig has quit [Ping timeout: 246 seconds]
shock_one has joined #ruby
<Ox0dea> Not even that, really; it just benchmarks The Right Thing.
<pard> mus, thanks; i was actually going to ask the differece between the libs :)
<mus> pard: It's mostly an iteration-per-second enhancement to the module that exists.
shredding has joined #ruby
<desmondhume> 0c0dea can you give me a quick glimps on the differences between the two libs?
<mus> 3652: Alright.
<apeiros> Ox0dea: you've been promoted to Oc0dea :D
<pard> when doing a benchmark, is it recommended to benchmark a call 12 times, or do it one time on 12 calls?
<desmondhume> lol sry
<Ox0dea> Most benchmarkers run a thing `n` times and tell you how long it took; benchmark-ips runs your thing for `n` seconds and tells you how many times it was able to do so.
ta has joined #ruby
<apeiros> more importantly, it also gives you a stddev
<desmondhume> ok so the .ips vs .bm is just a matter of scale?
<Ox0dea> No.
<pard> Ox0dea, thanks
<mus> Converting hex into decimal in my mind sometimes yields incorrect results, apeiros. :(
<Ox0dea> mus: Who's 3652?
gard_ has quit [Ping timeout: 240 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Ox0dea> mus: apeiros' comment was aimed at desmondhume's typo.
dhjondoh has quit [Remote host closed the connection]
DEA7TH has joined #ruby
<mus> 3652 [3562] was geared at you
<mus> I'll always see you for what you are.
<Ox0dea> I'd've never guessed.
<desmondhume> is there any way to avoid typos when answering somebody? :D
<pard> >> Ox0dea
<ruboto> pard # => uninitialized constant Ox0dea (NameError) ...check link for more (https://eval.in/465370)
<apeiros> desmondhume: tab
<Ox0dea> desmondhume: Use a proper IRC client.
<mus> >> 0x0dea
<ruboto> mus # => 3562 (https://eval.in/465371)
<pard> thanks
<apeiros> >> 0x0dea.to_s(8)
<ruboto> apeiros # => "6752" (https://eval.in/465372)
<mus> desmondhume: Wish I had autocorrect on irssi too.
<heftig> it's not hex, it's an ox
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pard> sorry
<apeiros> 06752: hi there. I'm from another country. excuse my dialect :D
<mus> heftig: What's the genesis of your name?
<desmondhume> oh yeah i see now
<apeiros> oh, actually O6752
<desmondhume> i'm using limechat
<desmondhume> didn't know about the tab thing
duncannz has quit [Ping timeout: 265 seconds]
<heftig> mus: choosing a name to use on battle.net during the warcraft 3 times
User458764 has joined #ruby
<Ox0dea> desmondhume: start = Time.now; 42.times { foo }; elapsed = Time.now - start
<mus> It's very nice, I like it a lot.
User458764 has quit [Client Quit]
<Ox0dea> desmondhume: That's the gist of most approaches to benchmarking, and it's just plain wrong.
<pard> i have mostly suspectd it to be; but why?
<Ox0dea> It's prone to remarkable inconsistency.
<desmondhume> teach me master
<desmondhume> (i'm serious, please teach me :'( )
<Ox0dea> Rather than guessing at how many times you need to iterate in order to obtain a consistent result, just let the thing run as often as it can in a given time frame.
Xeago has joined #ruby
devoldmx has joined #ruby
<pard> how then could the results be reliably collectd?
<Ox0dea> pard: How do you mean?
<pard> i mean, how could i know how many tines has the call run after the time frame expires?
<Ox0dea> pard: benchmark-ips will kindly provide you with all the relevant data points.
<pard> thanks
djbkd_ has quit [Quit: Leaving...]
<desmondhume> i never saw it this way, guessing a n-times number looks so wrong to me now lol
agent_white has quit [Read error: Connection reset by peer]
<Ox0dea> Yay, Ruby! Yay, science! <3
<pard> >> [print print 12, 12]
<ruboto> pard # => /tmp/execpad-5ff92e206747/source-5ff92e206747:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/465373)
<pard> thanks
* pard is going to abscond
pard has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 246 seconds]
<apeiros> Ox0dea: I'm sorry. I'm not convinced that running N times is worse than running N seconds.
<apeiros> Ox0dea: if your problem is CPU bound, you measure CPU time anyway (if you don't, you're bound to measure other load on your machine)
<Ox0dea> apeiros: Are you suggesting benchmarking should be done in as isolated an environment as is feasible?
agent_white has joined #ruby
arup_r has quit [Quit: Leaving]
<apeiros> additionally, if you measure a loop which runs N times, you a) only have an overhead of measuring time once, and b) have an easier time to subtract the cost of the loop itself
<mus> I hope I get some good news this week.
VeryBewitching has quit [Quit: Konversation terminated!]
rgrmatt has joined #ruby
<apeiros> Ox0dea: CPU time can be measured without isolation. Benchmark (the stdlib) provides that.
drizzle has joined #ruby
<apeiros> IO bound problems OTOH are quite difficult to properly measure, regardless of running it N times or N seconds.
<Ox0dea> apeiros: How do you reliably subtract the (time) cost of the loop itself?
<apeiros> the "run problem N seconds" of IPS is more a convenience thing than a precision thing. the value is added by stddev.
<heftig> my using cpu time, not real time
<heftig> by
<apeiros> by measuring CPU time of the empty loop
solenoids has quit [Ping timeout: 240 seconds]
<Ox0dea> But `GC.disable` makes things melt.
rgrmatt has quit [Ping timeout: 246 seconds]
Hounddog has joined #ruby
build22_ has quit [Ping timeout: 265 seconds]
skade has joined #ruby
<Ox0dea> I suppose GC shouldn't really factor into it if you've properly minimized what you're benchmarking, but guessing still feels weird, and IPS feels more like a high score board than elapsed time.
<apeiros> I guess that's one of the reasons why bmbm runs things twice. and I hope IPS does something similar.
<Ox0dea> IPS does do a warmup, yes.
sjums has joined #ruby
<sjums> is there a kind of "StringBuilder" like in C# for concatenating large ammounts of strings?
<heftig> you can concat to a string using <<
<sjums> is that faster than var += "string"
<heftig> it mutates the existing string, which may or may not be faster
<sjums> :b may or may not
<heftig> there's no such thing as a string builder because strings are mutable
<mus> Wonder why the speed of such a thing even matters.
bruno- has joined #ruby
<sjums> mus because I have 32MB file I (stupidly) load into memory
bruno- is now known as Guest15388
<Ox0dea> sjums: Well, stop doing that?
<sjums> :3
<Ox0dea> >> :<
<ruboto> Ox0dea # => :< (https://eval.in/465375)
rapidjammer has joined #ruby
<rapidjammer> hey ruby
<sjums> Ox0dea, I'll consider refactor my code a bit
<sjums> It works.. I just want it to work faster !
<Ox0dea> sjums: I mean, it's just highly unlikely you need the whole thing all at once.
ohaibbq has quit [Quit: Leaving...]
<sjums> that's very true :) Also for my case
<heftig> sjums: might want to profile it before blinding optimizing, if you didn't
<heftig> blindly
<apeiros> sjums: 32MB? and what's the problem? doesn't sound like much…
haxrbyte has joined #ruby
haxrbyte has quit [Client Quit]
<apeiros> sjums: remember that working with lots of small strings causes more GC pressure which may be slower than just using larger strings.
Guest15388 has quit [Ping timeout: 244 seconds]
<sjums> apeiros, 32MB XML into a single variable is much
<apeiros> um, no?
<apeiros> that's like 0.1% of my main memory…
<sjums> Ox0dea, according to this (http://greyblake.com/blog/2012/09/02/ruby-perfomance-tricks/) << is way faster
Musashi007 has joined #ruby
<apeiros> and the 20bytes object overhead for the 32MB string object doesn't matter much either :)
<Ox0dea> sjums: Yeah, you should always be using #<< for string building.
<sjums> apeiros, it's like 1.5% of mine :)
<apeiros> sjums: so… still nothing?
<desmondhume> isn't it better to keep it away from the memory for better scalability (just asking)?
<apeiros> there's no silver bullets in performance
<sjums> hush apeiros :P Stop being reasonable.
<desmondhume> (I'm going to keep asking noob questions, this channel is so full of knowledge and wisdom D:)
<sjums> desmondhume, no doubt. It's just for fun, nothing that runs near any production environment :)
<sjums> And the file size will remain pretty static
<apeiros> sjums: whether you can get any performance out of what you do depends entirely on how you process the data anyway.
solenoids has joined #ruby
stamina has joined #ruby
kp666_ has quit [Ping timeout: 240 seconds]
<apeiros> if you ask for a stringbuilder because you want to read the file in chunks and build the 32MB string, then that's utterly pointless and definitively a lot slower than just File.read(path)
<apeiros> if you construct a dom object from it, then same thing again
<desmondhume> apeiros: sometimes you sound like the most balanced, sane and polite full-of-knowledge bot
<sjums> the probability that it's my disk being the bottleneck is probably higher than it's += not performing
<apeiros> if you use a sax or pull parser to process it, then it might make sense.
<desmondhume> talking about tech stuff lol
Juanchito has joined #ruby
<apeiros> but then again - it depends on a) what you do in that, and b) whether you expect the file to become bigger over time
<mus> :(
<apeiros> desmondhume: I… take that as a compliment? :)
<mus> I feel so old.
<desmondhume> apeiros: yes lol
kp666_ has joined #ruby
<apeiros> desmondhume: 10y ago it was me asking noob questions ;-)
Musashi007 has quit [Quit: Musashi007]
<sjums> guys.. just stop >.< I'm convinced.. I'll stop being a dirty script hacking machine and start being logical in my file-parsing code
<sjums> It just feels so good doing dirty things and see them work :D
<desmondhume> sjums: I agree w/ you on that
minimalism has quit [Quit: leaving]
Kabal has joined #ruby
<desmondhume> "I'll eventually rewrite that" -> never happened
Kabal has quit []
<apeiros> sjums: in all likeliness whatever you do with that xml after reading it will consume much more memory than the string itself
Kabal has joined #ruby
<apeiros> at least iirc Nokogiri.XML for a 32MB xml string would result in ~150-200MB of ram usage
<sjums> I can tell you that's pretty precice
<apeiros> and since the dom needs the full xml, building it from chunks wouldn't help.
dhjondoh has joined #ruby
<sjums> well, one line in the file corresponds to one full object, so potentially I could read a line, wrap it in a root element and parse it with nokogiri
<apeiros> sjums: stahp
<sjums> Hammertime?!
<apeiros> you're reinventing sax/pull parsing. just use nokogiri's
<apeiros> can't touch this.
lipoqil has joined #ruby
<apeiros> (or oga's or whatever other xml library you want to use)
<sjums> my terms are a bit rusty here. Pull parsing is pulling a bit of file and parsing it?
<apeiros> essentially. a sax parser will invoke a callback whenever a tag opens or closes.
<sjums> does nokogiri (my library of choise) support that kind of magic?
<apeiros> so you don't have to read the full file at once, you never have a full object tree.
<apeiros> yes.
<sjums> ...
<sjums> <3
joonty has joined #ruby
<apeiros> I keep forgetting the precise differences between pull and sax parsers. but they do mostly the same.
<apeiros> nokogiri has both
ibouvousaime has quit [Ping timeout: 246 seconds]
nfk|laptop has joined #ruby
<sjums> I'll read on it
<bougyman> sax parser doesn't have to read the whole document. I thought that was the main difference?
karapetyan has quit [Remote host closed the connection]
<sjums> seems like a much more feasable way of attacking it
<apeiros> bougyman: other way round, as it seems
<apeiros> so I guess the sax parser I once wrote was really a pull parser. at least I don't remember maintaining any state (well, I *did* maintain the stack, but that was for analytic purposes and purely optional)
<bougyman> apeiros: sax and pull both scan it incrementally.
xcesariox has joined #ruby
<bougyman> I was thinking sax vs dom
<bougyman> dom parser has to read the whole doc.
<bougyman> pull parser is non-validating.
<apeiros> I didn't even know sax parsers where validating :D
<desmondhume> I didn't even know about sax/pull parsing
<apeiros> and I didn't expect you to confuse dom/pull as that's from where the discussion came ;-)
ibouvousaime has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
<sjums> I too just learned something new and very useful!
<apeiros> bougyman: though IMO in that answer, the "[SAX] Once it starts parsing, it parses from starting node to ending node." is not really a property of it being a sax parser, but the property of one particular implementation.
<bougyman> apeiros: true that.
dhjondoh has joined #ruby
stan has joined #ruby
marr has joined #ruby
mooru has quit [Ping timeout: 260 seconds]
exadeci has joined #ruby
<desmondhume> anyone has resources on configuring watchdog + systemd with rails (frameworks/libs)? I'd like to have some sort of daily report (maybe an html) on the health status of the rails app and the services like sidekiq and redis...
andikr has joined #ruby
stamina has quit [Ping timeout: 240 seconds]
<desmondhume> watchdog + systemd are just fine for restarting and managing crashes
<j416> Ox0dea:
moeabdol1 has quit [Ping timeout: 244 seconds]
agent_white is now known as agent_poop
<FailBit> good morning
agent_poop is now known as agent_white
<desmondhume> nobody? :(
moeabdol1 has joined #ruby
* apeiros not in devops
<apeiros> or just ops
trosborn has joined #ruby
<desmondhume> right :D
trosborn has quit [Client Quit]
Xeago has quit [Read error: Connection reset by peer]
Xeago_ has joined #ruby
platzhirsch has joined #ruby
astrobunny has quit [Remote host closed the connection]
agent_white is now known as agent_poop
agent_poop is now known as agent_white
subscope has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
trosborn has joined #ruby
Arkon has quit [Remote host closed the connection]
ibouvousaime has quit [Ping timeout: 240 seconds]
trosborn has quit [Client Quit]
ibouvousaime has joined #ruby
Xeago_ has quit [Remote host closed the connection]
dhjondoh has joined #ruby
leafybas_ has joined #ruby
bonemind has joined #ruby
platzhirsch has quit [Ping timeout: 260 seconds]
yaw has joined #ruby
yaw has quit [Client Quit]
Xeago has joined #ruby
vigintas has joined #ruby
leafybas_ has quit [Ping timeout: 255 seconds]
trosborn has joined #ruby
aganov has joined #ruby
Tempesta has joined #ruby
tomphp has joined #ruby
* mus sleeps, wide-awake.
trosborn has quit [Ping timeout: 250 seconds]
weckl has joined #ruby
lukaszes has joined #ruby
yes`r has joined #ruby
linocisco has quit [Ping timeout: 255 seconds]
platzhirsch has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
araujo_ has joined #ruby
araujo_ has quit [Max SendQ exceeded]
RegulationD has joined #ruby
araujo_ has joined #ruby
araujo_ has quit [Max SendQ exceeded]
araujo has quit [Ping timeout: 260 seconds]
araujo_ has joined #ruby
araujo_ has quit [Max SendQ exceeded]
araujo_ has joined #ruby
linocisco has joined #ruby
araujo_ has quit [Max SendQ exceeded]
RegulationD has quit [Ping timeout: 272 seconds]
araujo_ has joined #ruby
Musashi007 has joined #ruby
bruno- has joined #ruby
araujo_ has quit [Max SendQ exceeded]
bruno- is now known as Guest45583
araujo_ has joined #ruby
Peg-leg has joined #ruby
vigintas has quit [Remote host closed the connection]
vigintas has joined #ruby
chriscoffee has joined #ruby
chriscoffee has quit [Client Quit]
chriscoffee has joined #ruby
tvw has quit [Remote host closed the connection]
<yorickpeterse> morning
<desmondhume> yo
Guest45583 has quit [Ping timeout: 250 seconds]
krz has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
krz has joined #ruby
ibouvousaime has quit [Ping timeout: 246 seconds]
Scymex has joined #ruby
haraoka has quit [Ping timeout: 240 seconds]
scmx has quit [Ping timeout: 260 seconds]
trosborn has joined #ruby
trosborn has quit [Client Quit]
build22_ has joined #ruby
rodfersou has joined #ruby
moeabdol1 has quit [Ping timeout: 260 seconds]
skcin7 has quit [Quit: Textual IRC Client: www.textualapp.com]
sameerynho has joined #ruby
build22_ has quit [Ping timeout: 246 seconds]
build22_ has joined #ruby
karapetyan has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
troulouliou_div2 has joined #ruby
Spami has joined #ruby
JanPeter has joined #ruby
nfk|laptop has quit [Ping timeout: 240 seconds]
Pupp3tm4_ has joined #ruby
Pupp3tm4st3r has quit [Ping timeout: 246 seconds]
linocisco has quit [Ping timeout: 244 seconds]
lubarch has joined #ruby
voodo has joined #ruby
lubarch has quit [Client Quit]
lubarch has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
TheHodge has joined #ruby
gguggi has quit [Ping timeout: 250 seconds]
DEA7TH has joined #ruby
bodik has left #ruby [#ruby]
Pupp3tm4st3r has joined #ruby
mehakkahlon has joined #ruby
Pupp3tm4_ has quit [Ping timeout: 244 seconds]
akem has joined #ruby
shredding has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
mattwildig has joined #ruby
<yorickpeterse> calleerlandsson: ?
<calleerlandsson> Sorry, wrong #ruby!
M-Kodo has quit [Ping timeout: 250 seconds]
M-mistake has quit [Ping timeout: 246 seconds]
krz has quit [Quit: WeeChat 1.2]
DEA7TH has quit [Ping timeout: 260 seconds]
M-prosodyContext has quit [Ping timeout: 272 seconds]
leafybas_ has joined #ruby
leafybas_ has quit [Remote host closed the connection]
mattwildig has quit [Ping timeout: 240 seconds]
leafybas_ has joined #ruby
step1step22 is now known as step1step2
ldnunes has joined #ruby
bubbys has joined #ruby
mooru has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
AxonetBE has joined #ruby
Pupp3tm4st3r has joined #ruby
moeabdol1 has joined #ruby
devoldmx has joined #ruby
<AxonetBE> How can I format date of '10/26/2015 11:48:02' to date that will work with to_datetime?
<apeiros> AxonetBE: DateTime/Time.strptime
<AxonetBE> '10/26/2015 11:48:02'.to_datetime give me invalid Date
araujo_ has quit [Quit: Leaving]
nfk|laptop has joined #ruby
<apeiros> I can repeat what I said, but I'm not sure why I should do that…
diesel has quit [Ping timeout: 246 seconds]
Pupeno has joined #ruby
<yorickpeterse> >> require 'date'; Date.strptime('10/26/2015 11:48:02', '%m/%d/%Y %H:%M:%S')
<ruboto> yorickpeterse # => #<Date: 2015-10-26 ((2457322j,0s,0n),+0s,2299161j)> (https://eval.in/465409)
moeabdol1 has quit [Ping timeout: 252 seconds]
diesel has joined #ruby
<apeiros> yorickpeterse: that'll drop the time part :)
<apeiros> DateTime
<yorickpeterse> errr yeah
<yorickpeterse> I hate how there's both Time and DateTime
ldnunes_ has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
<apeiros> indeed. nowdays they could merge. the difference from older days has mostly gone (performance vs. valid range)
last_staff has joined #ruby
rgrmatt has joined #ruby
ldnunes_ has quit [Client Quit]
dionysus69 has joined #ruby
rgrmatt has quit [Ping timeout: 264 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
d0lph1n98 has joined #ruby
Pupp3tm4st3r has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
senayar has joined #ruby
agent_white has joined #ruby
stamina has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
araujo has joined #ruby
araujo has joined #ruby
arne_ has joined #ruby
<arne_> howdy, is parsing parsing json of users considered unsafe?
shredding has joined #ruby
axsuul has quit [Ping timeout: 250 seconds]
<yorickpeterse> arne_: possibly, depends on the method you'd use
<yorickpeterse> Though I think JSON.load already limits the amount of nested objects
subscope has joined #ruby
User has joined #ruby
User is now known as Guest95369
bubbys has quit [Ping timeout: 252 seconds]
JanPeter has quit [Ping timeout: 250 seconds]
bubbys has joined #ruby
Ox0dea has quit [Ping timeout: 260 seconds]
Rovanion has joined #ruby
<arne_> JSOn.parse is what i use
<arne_> > parsing parsing im stuttering while chatting :O
bruno- has joined #ruby
<yorickpeterse> IIRC just JSON.parse behaves a bit different from JSON.ooad
<yorickpeterse> * load
<yorickpeterse> e.g. JSON.load('10') gives back 10
<yorickpeterse> but JSON.parse('10') raises an error
bruno- is now known as Guest77083
<yorickpeterse> also JSON.load uses JSON.parse under the hood, so I _think_ it should be OK
araujo has quit [Quit: Leaving]
<yorickpeterse> though the rdoc states to not use it for untrusted input for some reason
<Rovanion> Hi, does anyone recognise this error, probably related to bundler or rake: "Error: Could not parse application options: can't activate json_pure-1.8.2, already activated json_pure-1.8.3". I get it when I run puppet module generate which executes some sort of ruby procram.
skade has quit [Quit: Computer has gone to sleep.]
<arne_> yeah i never came to my mind, i just discovered some old security issues of rails, where parsing user-json was a problem
<arne_> not using rails, though.
gambl0re has quit [Ping timeout: 255 seconds]
sinkensa_ has quit [Remote host closed the connection]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
desmondhume has quit [Read error: Connection reset by peer]
d0lph1n98 has quit [Quit: leaving]
desmondhume has joined #ruby
last_staff has quit [Quit: last_staff]
lubarch has quit [Ping timeout: 265 seconds]
DEA7TH has joined #ruby
lubarch has joined #ruby
step1step2 has quit [Quit: Leaving]
guest9000 has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
jeffreylevesque_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<atmosx> Rovanion: that's a dependency problem. Try removing 'json_pure-1.8.3' from your gems and see if that works.
Scymex has quit [Ping timeout: 250 seconds]
jeffreylevesque has quit [Ping timeout: 246 seconds]
<atmosx> e.g. gem uninstall json_pure-1.8.3
Outlastsheep has joined #ruby
prestorium has joined #ruby
adac has quit [Ping timeout: 250 seconds]
leafyba__ has joined #ruby
leafybas_ has quit [Read error: Connection reset by peer]
guest9000 has left #ruby ["Leaving"]
jeffreylevesque_ has quit [Ping timeout: 250 seconds]
al2o3-cr has quit [Ping timeout: 264 seconds]
devbug_ has quit [Read error: Connection reset by peer]
drizzle has quit [Quit: WeeChat 1.3]
Rickmasta has joined #ruby
al2o3-cr has joined #ruby
akem has quit [Quit: Bye]
bMalum has joined #ruby
lubarch has quit [Quit: leaving]
yashinbasement has quit [Quit: Leaving]
CloCkWeRX has joined #ruby
mooru has quit [Ping timeout: 265 seconds]
_blizzy_ has joined #ruby
Guest95369 has quit [Read error: Connection reset by peer]
<tsunamie> Hi guys, trying to learn troubleshoorting and debugging - require 'rubygems'
<tsunamie> require 'nokogiri'
<tsunamie> require 'open-uri'
<tsunamie> require 'open_uri_redirections'
<tsunamie> BASE_WIKIPEDIA_URL = "http://en.wikipedia.org"
<tsunamie> LIST_URL = "#{BASE_WIKIPEDIA_URL}/wiki/List_of_Nobel_laureates"
<tsunamie> page = Nokogiri::HTML(open(LIST_URL, :allow_redirections => :safe))
<tsunamie> rows = page.css('div.mw-content-ltr table.wikitable tr')
<tsunamie> rows[1..-2].each do |row|
<tsunamie>
<tsunamie> hrefs = row.css("td a").map{ |a|
<tsunamie> a['href'] if a['href'] =~ /^\/wiki\//
<tsunamie> }.compact.uniq
<tsunamie>
<tsunamie> hrefs.each do |href|
<tsunamie> remote_url = BASE_WIKIPEDIA_URL + href
<tsunamie> puts remote_url
<tsunamie> end # done: hrefs.each
<tsunamie> end # done: rows.each
<tsunamie> crap
<tsunamie> wrong one
<tsunamie> sorry - I put the script and error into that link
<tsunamie> for some reason it did'nt actaully ctr+c
<tsunamie> does anyone know how I can debug this or walk me throught how to troubleshoot it?
<gregf_> o_O
shredding has quit [Remote host closed the connection]
<gregf_> for a moment i felt as though i was struck by a tsunamies
<tsunamie> gregf, hehe yea sorry my bad
<gregf_> tsunamie: please use gist ;)
<tsunamie> gregf_, ahh yes sorry again
trosborn has joined #ruby
trosborn has quit [Client Quit]
<gregf> gregf_: mortal enemies?
<FailBit> :%
<tsunamie> :(
trosborn has joined #ruby
<gregf_> heh
Pupeno has quit [Remote host closed the connection]
bMalum has quit [Quit: bMalum]
devgiant has joined #ruby
trosborn has quit [Client Quit]
weihan has joined #ruby
<gregf> gregf_: sorry i'm always stealing your highlights
vigintas has quit [Quit: vigintas]
devgiant has quit [Client Quit]
desmondhume has quit [Remote host closed the connection]
desmondhume has joined #ruby
voodo has quit [Quit: Leaving...]
shredding has joined #ruby
Kelzier has joined #ruby
sinkensabe has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tsunamie> gregf, gregf_ I think I ahve a solution as the issue was the fact I use cigwin
vigintas has joined #ruby
JohnBat26 has joined #ruby
tvw has joined #ruby
bMalum has joined #ruby
<gregf_> tsunamie: presumably you;re on windows, so, try and download virtualbox and use a ubuntu image with it. its better than cygwin
moeabdol1 has joined #ruby
desmondhume has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
anisha has quit [Quit: Leaving]
zenguy_pc has joined #ruby
zenguy_pc has quit [Max SendQ exceeded]
Xeago has quit [Remote host closed the connection]
scmx has joined #ruby
Mon_Ouie has joined #ruby
acke_ has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
kp666_ has quit [Remote host closed the connection]
kp666_ has joined #ruby
htmldrum has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
agent_white has quit [Read error: Connection reset by peer]
sameerynho has quit [Quit: Leaving]
sdothum has joined #ruby
<sjums> gregf_, IIRC nokogiri doesn't run on windows
rapidjammer has quit [Ping timeout: 265 seconds]
millerti has joined #ruby
agent_white has joined #ruby
rapidjammer has joined #ruby
millerti has quit [Client Quit]
<shevy> too many gregs
bMalum has quit [Quit: bMalum]
Mia has quit [Read error: Connection reset by peer]
build22_ has quit [Remote host closed the connection]
subscope has joined #ruby
<gregf_> >> Array.new(10) { "shevy! " }
<ruboto> gregf_ # => ["shevy! ", "shevy! ", "shevy! ", "shevy! ", "shevy! ", "shevy! ", "shevy! ", "shevy! ", "shevy! ", ...check link for more (https://eval.in/465503)
rapidjammer is now known as show
show is now known as rapidjammer
shredding has quit [Ping timeout: 260 seconds]
kp666_ has quit [Quit: Leaving]
adac has joined #ruby
kp666_ has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
<norc> se
<norc> shevy!#
bMalum has joined #ruby
<rapidjammer> on channel
mattwildig has joined #ruby
suchness has joined #ruby
<rapidjammer> can anyone give me some info on learning mirc.... more than tuts
kp666_ has quit [Read error: Connection reset by peer]
<suchness> Has anyone here used the elasticsearch model gem and mapped one model to multiple indexes or types?
<FailBit> chebyshev, gregf_
<FailBit> :D
<FailBit> suchness: um
<FailBit> uh
<FailBit> I don't think that's supported
<suchness> FailBit: I don't either.
millerti has joined #ruby
<suchness> :/
<FailBit> my question is
leafyba__ has quit [Read error: Connection reset by peer]
<FailBit> why would you
<FailBit> it's a complete waste of index space
<suchness> Well, funny you should ask, I have been asking myself that question as well.
leafybas_ has joined #ruby
<suchness> But it basically comes down to context of where these models are used
<suchness> So I have a people index, that's mainly for autocompletes and the like.
<suchness> I have a screener index, which is basically an in depth search that considers a lot more things.
<FailBit> why not do both on the same index?
mattwildig has quit [Ping timeout: 255 seconds]
<suchness> And then there is the situation where I need to have multiple parents, which elasticsearch doesn't support, so I need two indexes.
millerti has quit [Client Quit]
hanmac has quit [Ping timeout: 246 seconds]
<suchness> FailBit: That will work for the first situation, not the last I said, that I know of.
<suchness> When it comes to a child having multiple parents, elasticsearch just fails me.
<FailBit> so then I guess your best option
<FailBit> if you need to have everything available to search
<FailBit> is to aggressively denormalize
<suchness> How do you mean?
CloCkWeRX has joined #ruby
JanPeter has joined #ruby
JanPeter is now known as TPBallbag
<suchness> Actually, I think I know what you mean.
kp666_ has joined #ruby
<suchness> Basically get the app model relationships out of the equation.
<FailBit> exactly
<suchness> So here is the thing, and why I am struggling to do that.
<FailBit> in your as_json method, include a copy of both parents.
<suchness> Won't that lead to a hell of a lot of duplication?
<FailBit> yes, but it's not a bad option
<FailBit> we do it for 1 million 'parent' docs, that often have 500-1000 'children'
build22_ has joined #ruby
<suchness> Unfortunately I have about 3 million new documents a week, at that rate things would grow much too much.
<FailBit> all fits in 5GB
craigp has joined #ruby
<FailBit> okay, maybe not then
<FailBit> your architecture diagram is fucked, basically
<suchness> Yeah, I am getting that feeling. It's external data that's coming in though, so not a hell of a lot I can do about it. Well, I could reorganize it...
<suchness> Well.
<suchness> That at least gives me some things to think about.
<suchness> Just to be clear, you are talking one big index with different types, each type relating to a model?
<suchness> I just don't see how I could get document.children if the parents are just right on the child.
devoldmx has joined #ruby
<FailBit> I would only assume you have a parent/child relationship because you need to query on fields on both, right?
kerunaru has joined #ruby
build22_ has quit [Ping timeout: 250 seconds]
<suchness> correct
<suchness> well
<suchness> not exactly
<suchness> I need my search results to be parent containers with children
tk__ has joined #ruby
otiasogirdor has joined #ruby
<suchness> And I can't have the top level parents duplicated
<suchness> For my specific app:
<suchness> I am searching for users, each user belongs to a company
<suchness> The search results display companies that can be expanded to show all the users
<suchness> But there can never be a duplicate company row.
mooru has joined #ruby
<suchness> If I had no parent child, I would have duplicates everywhere, as some documents would get left out of the pagination and found later.
calleerlandsson has left #ruby ["WeeChat 1.0.1"]
otiasogirdor has quit [Remote host closed the connection]
* FailBit looks to see if elastic has something like SQL distinct
devoldmx has quit [Ping timeout: 250 seconds]
ciampix has quit [Ping timeout: 250 seconds]
hanmac has joined #ruby
<FailBit> so if you used a terms aggregation you could get away with storing ids
<FailBit> as long as you don't need to query on specifically _nested_ fields
ruurd has joined #ruby
skade has joined #ruby
alexherbo2 has joined #ruby
chipotle has joined #ruby
<shevy> Array dig!
<shevy> dig for gold my precious
kp666_ has quit [Remote host closed the connection]
Xzanron has joined #ruby
<suchness> FailBit: Unfortunately, it's essential we search the nested fields. I think though, that ultimately I could get away with one parent, I am just worried about needing another parent in the future.
millerti has joined #ruby
<apeiros> wonder how it's implemented
* apeiros assumes it'll just call [] iteratively
craigp has quit []
CloCkWeRX has quit [Quit: Leaving.]
craigp has joined #ruby
<FailBit> suchness: which ones?
craigp has quit [Client Quit]
<FailBit> you can just trim it down to very specific fields
<FailBit> and store that as a hash
karapetyan has joined #ruby
darklight03 has joined #ruby
karapetyan has quit [Remote host closed the connection]
dhjondoh has quit [Quit: dhjondoh]
Icey has joined #ruby
dorei has joined #ruby
<FailBit> for us (images <=> tags), we have images map tags like this: [{name: "safe", id: 1}, {name: "vulgar", id: 2}, ...]
yqt has joined #ruby
rapidjammer has quit []
tkuchiki has joined #ruby
karapetyan has joined #ruby
_blizzy_ has quit [Quit: Leaving]
teclator has joined #ruby
<FailBit> then we can search on "tags.name" or "tags.id"
karapetyan has quit [Remote host closed the connection]
craigp has joined #ruby
Jardayn has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
sanjayu has quit [Ping timeout: 244 seconds]
agent_white has joined #ruby
p0wn3d__ has joined #ruby
howdoicomputer has quit [Ping timeout: 264 seconds]
leat has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 265 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leat has joined #ruby
weihan has quit [Ping timeout: 244 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest77083 has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Remote host closed the connection]
s00pcan has joined #ruby
dhjondoh has joined #ruby
HayesHimself has joined #ruby
chriscoffee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joonty has quit [Quit: joonty]
moeabdol1 has quit [Quit: WeeChat 1.3]
gagrio_ has quit [Ping timeout: 250 seconds]
roxtrongo has quit [Remote host closed the connection]
<suchness> Hmm
<shevy> somehow I seem to end up rewriting ruby code a lot :(
<suchness> But what if you had 100,000 tags
<suchness> You would get duplicates in pagination
Scymex has joined #ruby
gagrio has joined #ruby
desmondhume has joined #ruby
karapetyan has joined #ruby
scmx has quit [Ping timeout: 255 seconds]
TheNet has quit [Remote host closed the connection]
<dorei> shevy: overengineering?
Coldblackice_ has quit [Ping timeout: 240 seconds]
k3asd` has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
agent_white has quit [Read error: Connection reset by peer]
subscope has joined #ruby
nateberkopec has joined #ruby
pglombardo has joined #ruby
pglombardo has quit [Client Quit]
moeabdol has joined #ruby
AxonetBE has quit [Quit: AxonetBE]
arne_ has quit [Ping timeout: 260 seconds]
<FailBit> we have 200000 tags in fact
<FailBit> but those are condensed for specifically queries related to images
sankaber has joined #ruby
agent_white has joined #ruby
mark2 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :orwell.freenode.net"]
<FailBit> the tags themselves have many, many more fields and are also stored in a separate index
sankaber has quit [Remote host closed the connection]
Pupeno has joined #ruby
sankaber has joined #ruby
<suchness> FailBit: I meant if you had 100,000 tags on one image.
<shevy> dorei it very often is bad original ruby code that I wrote in the past :(
<suchness> Which at that point I suppose they would be unique, but imagine they aren't. That would be my case with indexing two parents on each document.
<FailBit> then use a terms aggregation
<FailBit> that is the point :V
dhjondoh has joined #ruby
robbyoconnor has joined #ruby
<suchness> Hmm, maybe I am just not familair enough with it, I'll check out the ocs.
<suchness> docs
<FailBit> terms aggregation is like SELECT DISTINCT
sankaber has quit [Client Quit]
chriscoffee has joined #ruby
adac has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
syath has joined #ruby
<suchness> Ah, that makes sense then...
atomical has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<agent_white> Is Cinch a decent bot to look at for 'example code'? Writing a irc bot in ruby from scratch and shittin' the bed when it comes to design.
s00pcan has quit [Remote host closed the connection]
<agent_white> (just looking at how to organize classes, what methods go where... etc.)
s00pcan has joined #ruby
<Papierkorb> agent_white: Wrote a bot with it some months ago. I'd maybe put some things somewhere else, but overall, i think it has a solid architecture.
dhjondoh has quit [Quit: dhjondoh]
<Papierkorb> agent_white: maybe a little too much with the plugin stuff.
<agent_white> Papierkorb: Good deal. I'm avoiding using it entirely... just going "from scratch" for learning purposes.
Scymex has quit [Ping timeout: 246 seconds]
<agent_white> Papierkorb: Yeah that's another thing I was looking into... writing a basic "factoid bot" right now, but I've been thinking about how to integrate plugins (for little things like games, user quotes, etc.)
[ddmp] has quit [Quit: WeeChat 1.3]
<Papierkorb> agent_white: that's fine! Just keep this in mind: Architecture is hard. What is convenient is not always what others would consider 'good' architecture. Good code is testable, but testable code isn't necessarily good. And so on. But try yourself at it, it's the only way to learn that stuff :)
diegoaguilar has joined #ruby
[ddmp] has joined #ruby
cyberarm has joined #ruby
<zwdr> agent_white: cinch is good, but really complicated
<zwdr> I ended up building my own bot from scratch because it was too overengineered for my taste :s
dhjondoh has joined #ruby
mehakkahlon has quit [Remote host closed the connection]
<agent_white> Papierkorb: Good deal! That's what I'm struggling with since I'm very new to coding, and don't have much practice besides scripts. https://github.com/jakenotjacob/vapebot -- that's what I have. Things just seem... very disorganized.
chriscoffee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white> zwdr: Ah! :P Yeah it definitely seems nice for fleshing out a nice bot! And maybe i'll kick myself later for not using it, but I'd rather learn and build myself, too :)
<zwdr> yea, and it's pretty fun and easy to implement IRC
<zwdr> (at least the subset you need for a bot right)
<Papierkorb> and IRC is easy enough and overall a reasonable choice for learning network programming
adac has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
<Papierkorb> agent_white: first things are stuff like the directory structure does not reflect the module::class structure of the files. constants, like in db.rb, should be in a module, and not in the 'global' scope of the file. config.rb wanted to use a CONSTANT too.
<Papierkorb> or rather, i'd go with a self.config over a constant, also for easier testability
a-109-107 has joined #ruby
diegoaguilar has quit [Ping timeout: 272 seconds]
htmldrum has quit [Ping timeout: 272 seconds]
shock_one has quit [Remote host closed the connection]
<agent_white> Papierkorb: Ahhh ok!
<Papierkorb> https://github.com/jakenotjacob/vapebot/blob/master/lib/vapebot/message.rb#L27 and using rubies globals like $; in a program is not a good idea. I make an exception for $1-9 for regex's, but that's about it.
rbennacer has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
joonty has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<agent_white> Papierkorb: I was curious about that... I just saw that it seemed like a simple way to split the string how I wanted.
<Papierkorb> agent_white: if you're looking for a SQL driver btw, check out the Sequel gem. Easy to set up, and even better than ActiveRecord to query stuff
Xeago has joined #ruby
<agent_white> Papierkorb: Aye I was looking at that, too! Was using sdbm since I figured I just needed a simple key-value store but I think I need to move to a sql-esque db.
<Papierkorb> agent_white: Yeah but its value may change unexpected to you. You can of initialize the splitter value with it if you prefer that as fallback. But really, I'd just say that the splitter is e.g. ',', and be done with it.
<Papierkorb> At this point, I've no idea if the separator is , or ; or w/e
<agent_white> Ah alrighty
<zwdr> agent_white: and with plugins you'll want to have an interface on your bot where plugins can register commands
Xeago has quit [Remote host closed the connection]
<zwdr> for my bot, for example, its pretty easy. a function that takes a regex and a callable
<zwdr> then the callable gets called whenever the privmsg matches the regex
sinkensabe has joined #ruby
davedev24 has joined #ruby
<desmondhume> also the telegram bot for ruby works the same way iirc
<desmondhume> isn't it unsafe? Having just the regex?
<zwdr> why's that?
<Papierkorb> I OTOH would have something like a small parser, which looks for a command sign at the beginning of the message (exclamation mark or so), take the first word behind it and then have a Hash{String => Proc} and look it up that way without using regexes. Just an ide
<Papierkorb> a
<desmondhume> i don't know, maybe namespace collisions
<zwdr> yea, true
<zwdr> if you want every plugin to have a seperate namespace
<Papierkorb> sounds overkill for an *IRC* bot though
<desmondhume> a big issue i see with bots is keeping text commands short and expressive while avoiding name collisions
shock_one has joined #ruby
<agent_white> zwdr: Hmmm... alrighty :D
The_Phoenix has joined #ruby
jas02 has quit [Quit: jas02]
arne has joined #ruby
[ddmp] has quit [Quit: WeeChat 1.3]
<desmondhume> the text as interface is a strong idea, but it's hard to keep every command unique and predictable
[ddmp] has joined #ruby
<zwdr> Papierkorb: Well, I have regexes with command sign and without command sign. for the ones with sign I build a regex from sign + regex
<agent_white> Papierkorb: Ahhh I never thought to just use a hash instead of dickin' around with all these array indices.
goodcodeguy has joined #ruby
<agent_white> Hm.
RegulationD has joined #ruby
<Papierkorb> agent_white: well, with say a Struct.new(:command, ...) and an array out of those, it'd just be an commands.find{|cmd| cmd.command == the_command} to find an command. Depends on what you exactly want
a-109-107 has left #ruby ["WeeChat 1.3"]
<zwdr> registering callbacks is on another layer of abstraction than the whole plugin logic and all that
The_Phoenix has quit [Client Quit]
shredding has joined #ruby
nibbo has quit [Ping timeout: 246 seconds]
mag42c has joined #ruby
Some-body_ has joined #ruby
<zwdr> I got a minimal IRC bot lib and then built a "real" bot on top
Hounddog_ has joined #ruby
<bougyman> why are you inventing this wheel again?
<zwdr> me?
eggoez has quit [Ping timeout: 264 seconds]
<agent_white> bougyman: For learning purposes :)
<agent_white> Papierkorb: Ahhh I see... zwdr is that what you're talking about then?
<dorei> i think the only way to actually learn is to reinvent the wheel
<Papierkorb> ^^^
<desmondhume> dorei: tj holowaychuk agrees on that
<bougyman> that attitude leads to shitty wheels.
<zwdr> well I got the code online
<norc> dorei: Hardly.
<zwdr> sec
chriscoffee has joined #ruby
scmx has joined #ruby
yitsushi has joined #ruby
<norc> I mean if you want, you can reinvent all the technology from the past 4,000 years if you think it makes you a better engineer.
leafybas_ has quit [Read error: Connection reset by peer]
leafyba__ has joined #ruby
<Papierkorb> norc: you can't understand something until you built it yourself. you may be able to USE something without it, but not entirely understand it.
RegulationD has quit [Ping timeout: 246 seconds]
<zwdr> this it the base lib: https://github.com/2-3/imouto
<zwdr> and here's the bot: https://github.com/2-3/laura
<norc> Papierkorb: So what you are saying is that you cannot understand Ruby until you write your own lexer/parser/compiler/virtual machine implementation stack?
<agent_white> bougyman: I'm learning so, all the wheels, pre-built or not, will be shitty. ;)
bruno-_ has joined #ruby
diegoaguilar has joined #ruby
<Papierkorb> norc: you didn't read what I said. you're USING ruby, right? For that you don't have to build a lexer and so on.
arne has quit [Ping timeout: 240 seconds]
eggoez has joined #ruby
karapetyan has quit [Remote host closed the connection]
<norc> Papierkorb: No Im in the process of understanding Ruby. But thanks for trying to correct me.
<Papierkorb> norc: do you however understand why this GC is better than that GC for this specific load or constraints? Nope, not until you tried building that part of the solution. No one's saying to build everything yourself.
Hounddog_ has quit [Ping timeout: 240 seconds]
<shevy> I still have difficulties believing norc really uses ruby :)
terlar has joined #ruby
<norc> shevy: I just dissect Ruby.
stannard has joined #ruby
macdaddy has quit [Ping timeout: 264 seconds]
Hounddog has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
Some-body_ is now known as DarthGandalf
howdoicomputer has joined #ruby
macdaddy has joined #ruby
dmitch has joined #ruby
rgtk has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
BrunoSaboia has joined #ruby
<shevy> I did that a lot when I was a tinkerer
ckrailo has quit [Ping timeout: 264 seconds]
agent_white has joined #ruby
<shevy> these days I beat down complexity with a stick
<agent_white> Thank you guys for the advice :) I appreciate it!
yitsushi is now known as Piredex
agent_white has quit [Client Quit]
Piredex is now known as Piredez
stannard has quit [Remote host closed the connection]
Piredez is now known as yitsushi
lokulin has quit [Ping timeout: 264 seconds]
Trieste has quit [Ping timeout: 264 seconds]
ckrailo has joined #ruby
diegoaguilar has quit [Ping timeout: 250 seconds]
BSaboia has quit [Ping timeout: 264 seconds]
howdoicomputer has quit [Ping timeout: 260 seconds]
Hounddog has joined #ruby
mooru has quit [Ping timeout: 240 seconds]
bb010g has quit [Ping timeout: 264 seconds]
blaxter has quit [Quit: foo]
yitsushi_ has joined #ruby
yitsushi has quit [Quit: Textual IRC Client: www.textualapp.com]
yitsushi_ has quit [Client Quit]
arne has joined #ruby
yes`r has quit [Ping timeout: 252 seconds]
lokulin has joined #ruby
mattwildig has joined #ruby
JDiPierro has joined #ruby
eggoez has quit [Ping timeout: 264 seconds]
Trieste has joined #ruby
bb010g has joined #ruby
BrunoSaboia has quit [Quit: Leaving]
JDiPierro has quit [Remote host closed the connection]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
roxtrongo has joined #ruby
<blubjr> is there a built in way to split a list into two according to a predicate
JDiPierro has joined #ruby
<blubjr> something like um l.inject([[],[]]) {|acc,x| (block.call(x) ? acc[0] : acc[1]) << x; acc}
<apeiros> blubjr: partition
s00pcan_ has joined #ruby
diegoaguilar has joined #ruby
solocshaw has joined #ruby
<blubjr> thank you
gagrio has quit [Ping timeout: 252 seconds]
The_Phoenix has joined #ruby
suffice has quit [Ping timeout: 264 seconds]
suffice has joined #ruby
eggoez has joined #ruby
voodo has joined #ruby
cdg has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
vayan has quit [Ping timeout: 264 seconds]
yitsushi has joined #ruby
yitsushi has quit [Client Quit]
yeticry has joined #ruby
TheNet has joined #ruby
rbennacer has quit [Remote host closed the connection]
benjwadams has quit [Quit: WeeChat 1.0.1]
vayan has joined #ruby
adac has quit [Ping timeout: 246 seconds]
Guest53 has joined #ruby
roxtrongo has quit [Ping timeout: 244 seconds]
gamache has joined #ruby
s00pcan_ has quit [Ping timeout: 250 seconds]
ekinmur has joined #ruby
bMalum has quit [Quit: bMalum]
ESpiney has joined #ruby
nibbo has joined #ruby
TheNet has quit [Ping timeout: 240 seconds]
TomPeed has joined #ruby
diegoaguilar has quit [Ping timeout: 260 seconds]
jdawgaz has joined #ruby
adac has joined #ruby
diegoaguilar has joined #ruby
rodfersou is now known as rodfersou|lunch
nertzy has joined #ruby
infamos has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Ping timeout: 255 seconds]
GarethAdams has quit [Ping timeout: 252 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djcp has joined #ruby
yitsushi has joined #ruby
gagrio has joined #ruby
Amnez777 has quit [Changing host]
Amnez777 has joined #ruby
<norc> shevy: I prefer beating down my opponents with a stick.
cacam9621 has quit [Read error: Connection reset by peer]
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
<norc> However, they wont let me do that at work. I gotta go to the gym for that. :(
solocshaw has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
[ddmp] has quit [Quit: WeeChat 1.3]
solenoids has quit [Ping timeout: 264 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
[ddmp] has joined #ruby
solocshaw has joined #ruby
scmx has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
Voker57 has joined #ruby
Zarthus has joined #ruby
GarethAdams has joined #ruby
malconis has joined #ruby
skade has joined #ruby
<yorickpeterse> norc: you should check out Rumblr
<yorickpeterse> it lets you 1v1 scrubs
KervyN has quit [Ping timeout: 265 seconds]
<yorickpeterse> http://getrumblr.com/
<yorickpeterse> :D
cmoney has joined #ruby
aadam21 has joined #ruby
<yorickpeterse> (it can't get much more bro than that)
DoubleMalt has quit [Remote host closed the connection]
KervyN has joined #ruby
aadam21 has quit [Read error: Connection reset by peer]
nateberkopec has quit [Ping timeout: 240 seconds]
<norc> yorickpeterse: That is hilarious.
uri has joined #ruby
Guest47571 has quit [Ping timeout: 252 seconds]
dhjondoh has quit [Quit: dhjondoh]
* arne wants to see that app actually getting released
kies has quit [Ping timeout: 265 seconds]
<yorickpeterse> I wonder if they were part of YC '15
nateberkopec has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bubbys has quit [Ping timeout: 246 seconds]
<eam> ah, "bro." The pejorative for an internet generation
cmoney has quit [Remote host closed the connection]
decoponio has joined #ruby
chipotle has quit [Quit: cheerio]
devoldmx has joined #ruby
<adaedra> I'm not your bro, pal
<yorickpeterse> First came the baby boomers, then the millenials, now we have the bros
<apeiros> I'm not your pal, buddy
<yorickpeterse> bro lets go to the gym and get ripped
<desmondhume> i'm not a buddy, mate
<adaedra> bruh
<yorickpeterse> bro lemme drink my shake first
<yorickpeterse> bro I'm totally getting ripped
<eam> baby boomer and millennial are neutral terms, "bro" is more akin to "yuppie" or "wasp"
<eam> or, perhaps more aptly "fucker"
<yorickpeterse> bro check out Soylent, it's totally cool
<apeiros> I'm not a mate, friendo
<yorickpeterse> eam: baby boomer sure as hell isn't neutral
<eam> I just do the substitution in my head whenever someone says "bro" I just think "ah, they mean 'fucker'"
* apeiros considers "bro" as an insult too
<apeiros> or at least as belittling
<eam> and when someone says tech bro I think "ah, they mean motherfucker"
tvon has quit [Ping timeout: 264 seconds]
<yorickpeterse> I want to go back to when it just meant "brother" in the friendly sense
<yorickpeterse> instead of the wearing-cap-backwards-douchebag sense
<adaedra> ^
<eam> well it's all fabricated outrage in any case
<yorickpeterse> eam: you're a fabricated outrage
troulouliou_div2 has joined #ruby
<eam> you're more right than you realize
bubbys has joined #ruby
<adaedra> your face is...
yqt has quit [Ping timeout: 246 seconds]
<eam> and with that I'm off to commute to SF and ruin the city for all the folks who moved out from the midwest in the last 5 years or so
<apeiros> please, my outrage is homegrown, not fabricated
<eam> brb gentrifying
dmitch has joined #ruby
<apeiros> cya
symbol has joined #ruby
xaxisx has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
subscope has quit [Quit: Textual IRC Client: www.textualapp.com]
<darix> yorickpeterse: or just "bro" in the HIMYM way
devoldmx has quit [Remote host closed the connection]
rwilcox has joined #ruby
<yorickpeterse> HIMYM?
yitsushi is now known as yitsushi^away
JDiPierro has quit [Remote host closed the connection]
solenoids has joined #ruby
<yorickpeterse> Ah
svkurowski has quit [Ping timeout: 260 seconds]
yitsushi^away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<darix> and now to see what yorickpeterse broke in my gitlab package
<desmondhume> lolwut
whippythellama has joined #ruby
bubbys has quit [Ping timeout: 240 seconds]
<yorickpeterse> :<
User458764 has joined #ruby
<yorickpeterse> I'm actually fixing a query that's taking fkn 20 minutes to run
ciampix has joined #ruby
JDiPierro has joined #ruby
ta has quit [Remote host closed the connection]
Xeago has joined #ruby
mooru has joined #ruby
bubbys has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
Ilyes512 has joined #ruby
karapetyan has joined #ruby
yqt has joined #ruby
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
svkurowski has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
Hounddog has quit [Ping timeout: 246 seconds]
lkba_ has joined #ruby
Zarthus has joined #ruby
Hounddog has joined #ruby
blaxter has joined #ruby
musou has joined #ruby
mattwildig has quit [Remote host closed the connection]
Meeh has quit [Ping timeout: 260 seconds]
<norc> yorickpeterse: I know some people who would love to have them, just for the sake of having an excuse to take a nap.
<norc> You should feel lucky.
malconis_ has joined #ruby
malconis has quit [Ping timeout: 265 seconds]
skade has quit [Quit: Computer has gone to sleep.]
rippa has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
Meeh has joined #ruby
bMalum has joined #ruby
Hounddog has quit [Excess Flood]
<yorickpeterse> heh
Hounddog has joined #ruby
malconis_ has quit [Client Quit]
lkba has quit [Ping timeout: 240 seconds]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yitsushi has joined #ruby
tvon has joined #ruby
yitsushi is now known as yitsushi^away
malconis has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yes`r has joined #ruby
yitsushi^away is now known as yitsushi
Ilyes512 has joined #ruby
tvon has quit [Client Quit]
howdoicomputer has joined #ruby
vondruch_ is now known as vondruch
HayesHimself has quit [Quit: Textual IRC Client: www.textualapp.com]
Hounddog has quit [Ping timeout: 246 seconds]
podman has joined #ruby
_blizzy_ has joined #ruby
favadi has joined #ruby
teclator has quit [Ping timeout: 240 seconds]
rbennacer has joined #ruby
AlexW2611 has joined #ruby
dhollinger has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
cmoney has joined #ruby
rbennacer has quit [Remote host closed the connection]
Hounddog has joined #ruby
rbennacer has joined #ruby
mission712 has joined #ruby
norc has quit [Ping timeout: 246 seconds]
Hounddog has quit [Excess Flood]
nfk|laptop has quit [Quit: yawn]
Hounddog has joined #ruby
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tk__ has quit [Quit: ばいばい]
Hounddog has quit [Excess Flood]
Hounddog has joined #ruby
Pupeno_ has joined #ruby
Pupeno has quit [Ping timeout: 250 seconds]
Xzanron has quit [Quit: Leaving]
dionysus69 has joined #ruby
desmondhume has quit [Remote host closed the connection]
mhi^ has joined #ruby
svkurowski has quit [Remote host closed the connection]
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has quit [Ping timeout: 246 seconds]
PlasmaStar has quit [Ping timeout: 250 seconds]
TheNet has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
Pupeno_ has quit [Ping timeout: 240 seconds]
tubuliferous_ has joined #ruby
kimegede has quit [Quit: Leaving...]
KervyN has quit [Ping timeout: 240 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fluchtreflex has quit [Ping timeout: 272 seconds]
Hounddog has quit [Ping timeout: 240 seconds]
crayfishx has quit [Ping timeout: 252 seconds]
PlasmaStar has joined #ruby
dellavg has quit [Ping timeout: 246 seconds]
favadi has joined #ruby
k3asd` has quit [Ping timeout: 250 seconds]
eminencehc has joined #ruby
infamos has joined #ruby
Zarthus has quit [Ping timeout: 255 seconds]
dopie has quit [Ping timeout: 246 seconds]
TheNet has quit [Ping timeout: 240 seconds]
to_json has joined #ruby
to_json has joined #ruby
mattwildig has joined #ruby
scmx has joined #ruby
omegahm has quit [Ping timeout: 240 seconds]
inteq has quit [Quit: Leaving]
Hounddog has joined #ruby
mhenrixon has quit [Ping timeout: 255 seconds]
RegulationD has joined #ruby
izzol has quit [Ping timeout: 250 seconds]
DylanJ has quit [Ping timeout: 260 seconds]
Spami has quit [Quit: This computer has gone to sleep]
sankaber has joined #ruby
tubuliferous_ has quit [Ping timeout: 240 seconds]
bubbys has quit [Ping timeout: 264 seconds]
Hounddog has quit [Excess Flood]
RobertBirnie has joined #ruby
fluchtreflex has joined #ruby
fluchtreflex has quit [Changing host]
fluchtreflex has joined #ruby
Hounddog has joined #ruby
izzol has joined #ruby
ta has joined #ruby
infamos has quit [Ping timeout: 260 seconds]
cmoney has quit [Remote host closed the connection]
dravine has quit [Quit: dravine]
omegahm has joined #ruby
xcesariox has joined #ruby
AlexW2611 has quit [Quit: Lingo: www.lingoirc.com]
chrissonar has quit [Remote host closed the connection]
teclator has joined #ruby
mooru has quit [Ping timeout: 260 seconds]
tagrudev has quit [Remote host closed the connection]
izzol has quit [Ping timeout: 240 seconds]
KervyN has joined #ruby
mooru has joined #ruby
wprice has quit [Quit: wprice]
dravine has joined #ruby
cmoney has joined #ruby
Zarthus has joined #ruby
Spami has joined #ruby
wprice has joined #ruby
axl_ has joined #ruby
chipotle has joined #ruby
haylon has joined #ruby
SenpaiSilver has joined #ruby
dzejrou has joined #ruby
dzejrou has quit [Client Quit]
dzejrou has joined #ruby
cmoney has quit [Remote host closed the connection]
psy_ has joined #ruby
axsuul has joined #ruby
psy_ has quit [Max SendQ exceeded]
Pupeno has joined #ruby
polysics has joined #ruby
skade has joined #ruby
psy_ has joined #ruby
DylanJ has joined #ruby
izzol has joined #ruby
mhenrixon has joined #ruby
Rickmasta has joined #ruby
svkurowski has joined #ruby
dellavg has joined #ruby
bubbys has joined #ruby
gregf_ has quit [Read error: No route to host]
crayfishx has joined #ruby
davedev2_ has joined #ruby
desmondhume has joined #ruby
jgpawletko has joined #ruby
marahin has left #ruby ["Leaving"]
roxtrongo has joined #ruby
davedev24 has quit [Ping timeout: 246 seconds]
gregf_ has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has joined #ruby
mooru has quit [Max SendQ exceeded]
Pupeno has quit [Quit: Leaving...]
mooru has joined #ruby
diegoaguilar has quit [Ping timeout: 250 seconds]
roxtrongo has quit [Ping timeout: 240 seconds]
polysics has quit []
devoldmx has joined #ruby
omegahm has quit [Ping timeout: 260 seconds]
arthurix_ has quit [Read error: Connection reset by peer]
arthurix has joined #ruby
blue_deref has joined #ruby
roger_rabbit has quit [Ping timeout: 255 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
terlar has quit [Quit: WeeChat 1.3]
ta has quit [Ping timeout: 240 seconds]
_blizzy_ has quit [Quit: Leaving]
ta has joined #ruby
davedev24 has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
_stu_ has joined #ruby
devoldmx has quit [Ping timeout: 244 seconds]
User458764 has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
DoubleMalt has joined #ruby
omegahm has joined #ruby
umgrosscol has joined #ruby
davedev2_ has quit [Ping timeout: 246 seconds]
infamos has joined #ruby
User458764 has joined #ruby
newdan has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
Yzguy has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has joined #ruby
araujo has joined #ruby
blue_deref has quit [Quit: bbn]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
mooru has quit [Max SendQ exceeded]
mattwildig has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
infamos has quit [Ping timeout: 250 seconds]
skade has joined #ruby
acke_ has quit [Quit: Leaving...]
roxtrongo has joined #ruby
mooru has joined #ruby
infamos has joined #ruby
kobain has joined #ruby
yitsushi is now known as yitsushi^away
mhenrixon has quit [Ping timeout: 265 seconds]
_blizzy_ has joined #ruby
yitsushi^away is now known as yitsushi
howdoicomputer has joined #ruby
rodfersou|lunch is now known as rodfersou
yitsushi is now known as yitsushi^away
iamvery_ has quit [Read error: Connection reset by peer]
yitsushi^away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
mhenrixon has joined #ruby
SleepySensei has joined #ruby
infamos has quit [Ping timeout: 255 seconds]
howdoicomputer has quit [Ping timeout: 250 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
iamvery has joined #ruby
_stu_ has quit [Quit: _stu_]
roger_rabbit has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
chriscoffee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sinkensabe has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 252 seconds]
griffindy has joined #ruby
chriscoffee has joined #ruby
arthurix has quit [Ping timeout: 255 seconds]
chouhoulis has joined #ruby
TomPeed has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
arthurix has joined #ruby
TPBallbag has quit [Read error: Connection reset by peer]
slawrence00 has joined #ruby
TPBallbag has joined #ruby
step1step2 has joined #ruby
TheNet has joined #ruby
I has joined #ruby
I is now known as Guest75208
solocshaw has quit [Ping timeout: 246 seconds]
TheNet has quit [Read error: Connection reset by peer]
luca768 has quit [Read error: Connection reset by peer]
_luca_ has joined #ruby
baroquebobcat has joined #ruby
DoubleMalt has quit [Ping timeout: 250 seconds]
TheNet has joined #ruby
TheNet has quit [Read error: Connection reset by peer]
mattwildig has joined #ruby
TheNet has joined #ruby
_stu_ has joined #ruby
nofxx has quit [Ping timeout: 272 seconds]
nofxx has joined #ruby
TheNet_ has joined #ruby
yardenbar has quit [Ping timeout: 252 seconds]
TPBallbag has quit [Remote host closed the connection]
sanjayu has joined #ruby
hxegon has joined #ruby
TheNet__ has joined #ruby
yqt has joined #ruby
kies has joined #ruby
yitsushi has joined #ruby
infamos has joined #ruby
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dravine_ has joined #ruby
Xeago has quit [Remote host closed the connection]
TheNet has quit [Ping timeout: 240 seconds]
dravine has quit [Ping timeout: 265 seconds]
dravine_ is now known as dravine
TPBallbag has joined #ruby
yitsushi is now known as yitsushi^away
TheNet has joined #ruby
yitsushi^away has quit [Client Quit]
TheNet_ has quit [Ping timeout: 240 seconds]
[ddmp] is now known as [dmp]
TheNet__ has quit [Ping timeout: 250 seconds]
yitsushi has joined #ruby
aganov has quit [Remote host closed the connection]
baweaver has joined #ruby
TheNet has quit [Ping timeout: 255 seconds]
bMalum_ has joined #ruby
Guest35761 is now known as C0deMAver1ck
C0deMAver1ck is now known as C0deMaver1ck
rcvalle has joined #ruby
mooru has quit [Read error: Connection reset by peer]
DoubleMalt has joined #ruby
mooru has joined #ruby
shadeslayer has quit [Ping timeout: 252 seconds]
shadeslayer has joined #ruby
bMalum has quit [Ping timeout: 255 seconds]
bMalum_ is now known as bMalum
karapetyan has joined #ruby
mg^weekend is now known as mg^
TheNet has joined #ruby
arne has quit [Ping timeout: 240 seconds]
hs366 has joined #ruby
TheNet_ has joined #ruby
nertzy has joined #ruby
chinmay_dd is now known as cdd
TPBallbag has quit [Remote host closed the connection]
TheNet__ has joined #ruby
scmx has quit [Ping timeout: 246 seconds]
skweek has joined #ruby
TheNet__ has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheNet has quit [Ping timeout: 265 seconds]
TheNet__ has joined #ruby
kerunaru has joined #ruby
darkf has quit [Quit: Leaving]
Perl6_is_dead has joined #ruby
TheNet_ has quit [Ping timeout: 264 seconds]
<Perl6_is_dead> Hello everyone!
brendan- is now known as bmurt
SCHAAP137 has quit [Remote host closed the connection]
<Perl6_is_dead> :)
<mh_laaks1> How does ruby fair outside of rails/webdev?
<adaedra> I smell a troll.
TheNet has joined #ruby
<blubjr> hi perl 6 is dead
<mh_laaks1> I'm really interested in tinkering with the language but I'm also concerned about job prospects.
rehat_ has joined #ruby
TheNet__ has quit [Ping timeout: 240 seconds]
synthroid has quit [Remote host closed the connection]
<Perl6_is_dead> mh_laaks1: ruby is really good in wed dev.
<apeiros> mh_laaks1: wrt jobs, rails is indeed the easiest to get a ruby related job
<adaedra> Perl6_is_dead: web dev or weed dev?
mfoo has joined #ruby
<mh_laaks1> I'm canadian, so weed dev is legit.
<Perl6_is_dead> blubjr: :)
<apeiros> the other strong sector is probably devops
<mh_laaks1> ty Trudeau
<rwilcox> From my perspective the two killer apps for Ruby are Rails and Chef. So web development and DevOps
<Perl6_is_dead> adaedra: web dev
<mh_laaks1> Okay, neat, I haven't checked out Chef.
TheNet_ has joined #ruby
<mh_laaks1> I'm working two jobs right now, doing sys admin tasks and writing a web app.
<mh_laaks1> Ruby seems perfect then.
<Perl6_is_dead> Ruby killer app is twitter :)
<mfoo> hello - could I enquire as to how exception handling happens in ruby? I am used to begin/rescue but I see code here rescueing from a NameError outside a begin block. Why is line 456 evaluated in Ruby? https://github.com/rails-api/active_model_serializers/blob/0-8-stable/lib/active_model/serializer.rb#L454
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
yitsushi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<blubjr> theres an implicit begin wrapping a def body
<adaedra> mfoo: def/end is an implicit begin/end block, so you can rescue directly
tubuliferous_ has joined #ruby
<mfoo> ah, thanks adaedra, blubjr
<mh_laaks1> thank you everyone :)
<adaedra> also, what an horrible code
lukaszk has quit [Remote host closed the connection]
<mh_laaks1> I'll write a simple todo app to dip my toes.
<mfoo> adaedra, yes, indeed.
<mfoo> it's essentially loop unrolling
<mfoo> to generate a hash of attribute: value for serialization.
<mfoo> and define a method for that class so we don't have to iterate for every object of that class
<Perl6_is_dead> Is there Japanese here?
TheNet has quit [Ping timeout: 264 seconds]
<adaedra> I mean, you don't have to use *eval methods, there are other ways of defining methods dynamically
ThatsNotJack has quit [Remote host closed the connection]
TheNet_ has quit [Ping timeout: 246 seconds]
<apeiros> and if they use eval, they could use a single hash literal instead of invoking []= multiple times
<mus> Evening.
<mfoo> luckily this code has died in the next version
<apeiros> I mean, if they're calling it fast_attributes after all, then it should be fast…
<apeiros> ?ugt mus ;-p
ThatsNotJack has joined #ruby
`based_pdev` has quit [Read error: Connection reset by peer]
<blubjr> hi mus
lsmola has quit [Ping timeout: 240 seconds]
<apeiros> & hi ofc :)
based_pdev has joined #ruby
<adaedra> bonjour
<`derpy> moin
mattwildig has quit [Remote host closed the connection]
devoldmx has joined #ruby
ThatsNotJack has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
karapetyan has quit [Remote host closed the connection]
ThatsNotJack has joined #ruby
karapetyan has joined #ruby
Xeago has joined #ruby
freerobby has joined #ruby
chipotle has quit [Ping timeout: 250 seconds]
freerobby has left #ruby [#ruby]
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Perl6_is_dead has left #ruby [#ruby]
guillaume-rb has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
joonty has joined #ruby
karapetyan has quit [Remote host closed the connection]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
andikr has quit [Remote host closed the connection]
<sjums> apeiros, I have been hacking with my script I asked about earlier today
TheHodge has quit [Quit: Connection closed for inactivity]
<sjums> doing a File.Open and then go file.each_line and add each line to a variable with += takes 4m50s
<sjums> doing the same but with << instead of += takes 2.7s
Spami has quit [Quit: This computer has gone to sleep]
<sjums> just throwing the File.Open into the nokogiri XML constructor takes 1.8s
troyready has joined #ruby
Yzguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sjums> Today was the day I learned something new and optimized my script to run 160 times faster!
<blubjr> does ruby have something like lisp's ~& directive that prints a newline unless you're already at the start of a line
Ilyes512 has joined #ruby
solars has quit [Ping timeout: 240 seconds]
jim1138 has joined #ruby
howdoicomputer has joined #ruby
Xeago has quit [Remote host closed the connection]
[Butch] has joined #ruby
Spami has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
<apeiros> sjums: yay? :)
_blizzy_ has quit [Ping timeout: 240 seconds]
Ox0dea has joined #ruby
<gregf_> sjums: whats your script look like?
<apeiros> sjums: and next try sax?
hxegon has quit [Quit: leaving]
govg has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
aufi has quit [Ping timeout: 240 seconds]
<sjums> gregf_, boiled down to this http://pastebin.com/ciFtb1wM
<ruboto> sjums, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5becfef8427c6722543f
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<sjums> sorry, ruboto :(
synthroid has joined #ruby
<apeiros> ?justabot sjums
<ruboto> sjums, I'm just a bot. You don't need to address me.
<apeiros> ;-)
<sjums> A polite one even :3
Kelzier has quit []
chriscoffee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
<apeiros> already detected the slowest part in your code: `mongo.collection.insert_many(restaurants.map(&:to_h))` ;-p
<sjums> I sense sarcasm and hate D:
wldcordeiro has quit [Ping timeout: 246 seconds]
<apeiros> mongo is not important enough for me to have hate for it
<yorickpeterse> Regardless you should hate it
sabram has joined #ruby
SCHAAP137 has joined #ruby
amclain has joined #ruby
<apeiros> I just fail to see the point of mongo in most scenarios, to the degree of thinking it's the inferior tool.
symm- has joined #ruby
joonty has quit [Quit: joonty]
SleepySensei has joined #ruby
symm- has quit [Client Quit]
null_ref has joined #ruby
symm- has joined #ruby
codeurge has joined #ruby
tomphp has quit [Ping timeout: 255 seconds]
solocshaw has joined #ruby
sinkensabe has joined #ruby
freerobby has joined #ruby
shredding has quit [Ping timeout: 255 seconds]
leafybas_ has joined #ruby
Fredrich010 has quit [Read error: Connection reset by peer]
Fredrich010 has joined #ruby
yalue has joined #ruby
yitsushi has joined #ruby
yitsushi has quit [Client Quit]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
verdoc has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
leafyba__ has quit [Ping timeout: 244 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
leafybas_ has quit [Ping timeout: 246 seconds]
nfk has joined #ruby
roxtrongo has quit [Remote host closed the connection]
craigp has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
solocshaw has quit [Ping timeout: 265 seconds]
NeverDie has joined #ruby
<gregf_> haha, that bot is funny ;)
<gregf_> oh - well
bruno-_ has quit [Ping timeout: 252 seconds]
RobertBirnie has joined #ruby
DEA7TH has joined #ruby
<gregf_> sjums: thanks. but that code took 4 1/2 minutes to run and load into mongo?
darklight03 has quit [Ping timeout: 240 seconds]
TomyWork has quit [Ping timeout: 260 seconds]
RegulationD has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 240 seconds]
bonemind has quit [Quit: WeeChat 1.0]
maletor has joined #ruby
towski_ has joined #ruby
<purplexed-> Question: I'm writing some code right now to kill a process. I'm doing this on Linux. Can I expect it to work on Windows, or will I need another implementation of it for Windows?
craigp has quit [Remote host closed the connection]
<eam> windows is fairly different
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Arkon has joined #ruby
voodo has quit [Quit: Leaving...]
stannard has joined #ruby
RobertBirnie has quit [Ping timeout: 250 seconds]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pandaant has joined #ruby
RobertBirnie has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
desmondhume has quit [Remote host closed the connection]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
desmondhume has joined #ruby
craigp has joined #ruby
kerunaru has joined #ruby
wldcordeiro has joined #ruby
desmondhume has quit [Read error: Connection reset by peer]
desmondh_ has joined #ruby
TheNet has joined #ruby
<purplexed-> eam: so, yes ?
senayar has quit []
guillaume-rb has quit [Quit: guillaume-rb]
<purplexed-> it's not a big deal, just something to be aware of
<purplexed-> and certainly when testing
_kfpratt has joined #ruby
craigp has quit [Remote host closed the connection]
desmondh_ has quit [Remote host closed the connection]
<sjums> gregf_, no no ! That's the fast code :)
<shevy> purplexed- I think Process.kill also works on windows; you can try it perhaps, loop { Process.kill :QUIT, $PROCESS_ID } should instantly terminate I think
<shevy> or perhaps :SIGKILL
craigp has joined #ruby
<purplexed-> oh well, time will tell I guess
kfpratt has quit [Ping timeout: 246 seconds]
kerunaru has quit [Client Quit]
<Ox0dea> "Time" hear meaning ten seconds if you actually wanted your question answered.
benlieb has joined #ruby
<Ox0dea> *here
<sjums> shevy, on windows I have a vibe that there's "please close" and "JUST GO AWAY"
<Ox0dea> sjums: Same for Unix.
<sjums> all the different terms and kills linux has is not there
dhollinger has quit [Ping timeout: 244 seconds]
<Ox0dea> Oh, I see how you meant.
TheNet has quit [Ping timeout: 265 seconds]
<shevy> the last windows I seriously used was win xp; i have a win 7 machine downstairs but I don't really need windows
skweek has joined #ruby
<shevy> ruby itself happily works on windows too though, even my ruby-gnome things run there
<shevy> they became totally insane with win 10 though
<sjums> gnomes are not to be trusted
<shevy> hehe
<shevy> back then qtruby did not have any real documentation :(
stan has quit [Ping timeout: 240 seconds]
<shevy> the usual comment was "read the C++ API of qt and kde"
sanjayu has quit [Ping timeout: 240 seconds]
<Ox0dea> shevy: Do you pronounce it "cute" or "cutie"?
<shevy> I pronounce it chhuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuutttt(silent e)
<shevy> I would not know why an "i" is there
Nick_ZWG has joined #ruby
_stu_ has quit [Quit: _stu_]
Xeago has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
waxjar has joined #ruby
<Ox0dea> Whoa! They accepted Hash#dig.
scmx has joined #ruby
ESpiney_ has joined #ruby
voodo has joined #ruby
Arkon has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 240 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
jhowarth_ has joined #ruby
ESpiney has quit [Ping timeout: 260 seconds]
jhowarth_ is now known as jhowarth
h99h9h88 has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
h99h9h88 has joined #ruby
<shevy> did you suggest it?
rakm has joined #ruby
<waxjar> what does it do?
charliesome has joined #ruby
Peg-leg has quit [Quit: Leaving.]
guillaume-rb has joined #ruby
<Ox0dea> It went on Array too, and the current implementation supports mixed collections. That's not gonna bite anybody ever.
TomPeed has joined #ruby
<newdan> Ox0dea: like this? https://gist.github.com/re5et/1954628
TomPeed has quit [Client Quit]
<Ox0dea> newdan: Yeah, more or less.
Arkon has joined #ruby
stannard has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> I suppose the JSON use case does make mixed support seem saner.
benlieb has quit [Quit: benlieb]
snockerton has joined #ruby
howdoicomputer has quit [Ping timeout: 264 seconds]
<newdan> What's the advantage over just having `container[a][b][c][d]`?
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<waxjar> no NoMethodErrors on nil
codecop has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
hastd has joined #ruby
benlieb has joined #ruby
haylon has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
<waxjar> I thought the (slightly weird) .? was gonna fix this already, though.
<shevy> hah
<shevy> slightly weird
<shevy> :)
ekinmur has joined #ruby
<Ox0dea> waxjar: It's &. now.
<apeiros> you're out of date, waxjar. it's…
<apeiros> ^
<shevy> wtf...
<shevy> params.traverse_nested_hashes_and_return_nil_if_a_key_isnt_found
<waxjar> 2.0 in production, woooo
kerunaru has joined #ruby
<Ox0dea> [{a: [{b: 42}]}].dig(0, :a, 0, :b) # => 42
<Ox0dea> Sharp teeth, this pup.
h99h9h88 has quit [Remote host closed the connection]
mghaig has joined #ruby
<waxjar> hmm, so how would that work with #[], hash&[foo]&[bar] ?
h99h9h88 has joined #ruby
djbkd has joined #ruby
<shevy> why the 0 there
<Ox0dea> shevy: Look again?
<shevy> ah yeah it's a stupidly nested datastructure
<Ox0dea> It's a Hash inside an Array inside a Hash inside an Array.
erbesharat has joined #ruby
<shevy> a matroshka puppet
<Ox0dea> Which is a perfectly normal structure, to be honest.
<shevy> clever people use elegant, simple and concise datasets!
podman has quit [Quit: Connection closed for inactivity]
_stu_ has joined #ruby
djbkd has quit [Remote host closed the connection]
<Ox0dea> GitHub shits everything it knows at you.
djbkd has joined #ruby
yosiat has joined #ruby
<shevy> GitHub shits?
<Ox0dea> The API.
<Ox0dea> It needs a "less verbose" parameter.
Guest53 has joined #ruby
mghaig has left #ruby [#ruby]
dfockler has joined #ruby
h99h9h88 has quit [Ping timeout: 250 seconds]
colegatron has joined #ruby
<nofxx> whoooat.... where #dig comes from?
<Ox0dea> Coming to you this Christmas, like as not.
<nofxx> that's fancy
<Ox0dea> apeiros: Would you mind if my trunk evaluator triggered on "23>>"?
<nofxx> kinda liking... the maybe monad built in
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> nofxx: Except we don't have Just, we just have nil. :/
momomomomo has joined #ruby
freerobby has joined #ruby
<nofxx> Ox0dea, not sure I'm following. I like the 'black cape' only on nil and false
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fantazo has joined #ruby
lxsameer has joined #ruby
Uranio has joined #ruby
bricker has joined #ruby
hastd has quit [Quit: Page closed]
Uranio has quit [Read error: Connection reset by peer]
roxtrongo has joined #ruby
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
Emmanuel_Chanel has joined #ruby
<Ox0dea> nofxx: Is "black cape" the new burrito?
<nofxx> Ox0dea, why's way of explaning what's false in ruby
<Ox0dea> I guess I should've remembered that.
<Ox0dea> In any case, null coalescence isn't quite the same as the Maybe monad.
_stu_ has quit [Quit: _stu_]
<Ox0dea> The latter permits you to make a distinction between `nil` as an accident and as an intended result.
shock_one has quit [Remote host closed the connection]
shadoi has joined #ruby
h99h9h88 has joined #ruby
roxtrongo has quit [Ping timeout: 255 seconds]
<nofxx> Ox0dea, you mean in theory? Or am I confusing names? the #try for instance is a 'maybe monad' no?
Uranio has joined #ruby
<Ox0dea> nofxx: No, it's null coalescence.
EllisTAA has joined #ruby
freerobby has quit [Quit: Leaving.]
Emmanuel_Chanel has quit [Quit: Leaving]
weckl has quit [Remote host closed the connection]
RegulationD has joined #ruby
freerobby has joined #ruby
fantazo has quit [Ping timeout: 260 seconds]
Xeago has quit [Ping timeout: 272 seconds]
shadoi has quit [Ping timeout: 240 seconds]
h99h9h88 has quit [Ping timeout: 240 seconds]
desmondhume has joined #ruby
shadoi has joined #ruby
pandaant has joined #ruby
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
RegulationD has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spider-mario has joined #ruby
TheNet has joined #ruby
mallu has joined #ruby
sepp2k has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
_stu_ has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
cornerma1 has joined #ruby
yqt has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
<mallu> I have an array ["bob", "NewYork", 1, 2, "tom", "Miami", 2, 2 ....] I want to create a html table with headers Name, City, Number1, Number2
<mallu> any help would be appreciated
pietr0 has joined #ruby
User458764 has joined #ruby
adac has quit [Ping timeout: 260 seconds]
framling has quit [Remote host closed the connection]
shum has joined #ruby
TheNet has quit [Ping timeout: 264 seconds]
sdothum has quit [Ping timeout: 260 seconds]
kerunaru has joined #ruby
kerunaru has quit [Client Quit]
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
h99h9h88 has joined #ruby
sebstrax has quit [Quit: Connection closed for inactivity]
framling has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
Yzguy has joined #ruby
h99h9h88 has joined #ruby
jackjackdripper has joined #ruby
howdoicomputer has quit [Ping timeout: 264 seconds]
Arkon has quit [Remote host closed the connection]
mattwildig has joined #ruby
devoldmx has joined #ruby
anisha has joined #ruby
xcesariox has joined #ruby
kerunaru has joined #ruby
h99h9h88 has quit [Ping timeout: 265 seconds]
eminencehc has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 246 seconds]
mattwildig has quit [Ping timeout: 252 seconds]
skweek has quit [Ping timeout: 250 seconds]
kerunaru has quit [Client Quit]
Uranio has quit [Quit: Leaving]
hs366 has quit [Quit: Leaving]
desmondhume has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
scmx has quit [Ping timeout: 246 seconds]
erbesharat has quit [Quit: erbesharat]
vigintas has quit [Ping timeout: 260 seconds]
desmondhume has joined #ruby
podman has joined #ruby
eminencehc has joined #ruby
xcesariox has quit [Remote host closed the connection]
dzejrou has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
kerunaru has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
peppers has joined #ruby
to_json has left #ruby [#ruby]
guillaume-rb has quit [Quit: guillaume-rb]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shafire has joined #ruby
guillaume-rb has joined #ruby
yosiat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 240 seconds]
kerunaru has quit [Client Quit]
Guest53 has joined #ruby
blaxter has quit [Quit: foo]
h99h9h88 has joined #ruby
jhowarth has left #ruby [#ruby]
h99h9h88 has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
hxegon has joined #ruby
Xeago has joined #ruby
djbkd has quit [Remote host closed the connection]
ESpiney__ has joined #ruby
toto has joined #ruby
<toto> pastie: hi!
yosiat has joined #ruby
blue_deref has joined #ruby
toto is now known as Guest40159
Arkon has joined #ruby
<Guest40159> pastie: hi!
* apeiros is tempted to add a "/me smacks X" auto-response to that silly "pastie!"
Blaguvest has joined #ruby
Nick_ZWG has left #ruby ["Textual IRC Client: www.textualapp.com"]
yosiat has quit [Client Quit]
djbkd has joined #ruby
dhollinger has joined #ruby
yosiat has joined #ruby
ESpiney_ has quit [Ping timeout: 255 seconds]
kerunaru has joined #ruby
<Guest40159> @pastie: hi!
sivoais has quit [Ping timeout: 255 seconds]
h99h9h88 has quit [Ping timeout: 276 seconds]
<apeiros> Guest40159: seriously?
<newdan> I don't get it, what's pastie?
<apeiros> newdan: pastie.org
pandaant has quit [Remote host closed the connection]
<newdan> Why are people saying hi to it?
<Guest40159> I have read this page: http://pastie.org/help/
<Guest40159> I search the way to create a new pastie
opensource_ninja has joined #ruby
TPBallbag has joined #ruby
<shevy> lol
<shevy> pastie: hi!!!
<Guest40159> ok ok it's my first IRC session
<newdan> Does it actually work? Wouldn't there need to be a pastie bot in this channel or something?
<shafire> Guest40159: welcome to Neuland!
<Ox0dea> newdan: It wouldn't need to be named pastie.
<apeiros> Guest40159: click new on the website, paste text, copy url here
benlieb has quit [Quit: benlieb]
<newdan> Ox0dea: Does that mean there is one with a different name here? Does it actually work?
<Ox0dea> ?try newdan
<ruboto> newdan, Why don't you try it and see for yourself?
<desmondhume> i think newdan is right
<desmondhume> lol
<desmondhume> we should write to the bot
<newdan> pastie sup
<newdan> Experiment has failed
<desmondhume> > The pastie bot can be found on freenode in #rubyonrails or #ruby-lang. Obtaining a paste URL is easy.
<shevy> ruboto > pastie
<Ox0dea> Wait, this isn't #ruby-lang?
yqt has joined #ruby
<Ox0dea> >> RUBY_VERSION # shevy: But still..
<ruboto> Ox0dea # => "2.2.0" (https://eval.in/465719)
yosiat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<desmondhume> this is just #ruby right?
<Ox0dea> We need #dig support!
<Guest40159> ok I have found the way
codecop has joined #ruby
h99h9h88 has joined #ruby
<apeiros> desmondhume: #ruby-lang got merged into #ruby
<Ox0dea> Guest40159: Are you going to show us some code, then?
<Guest40159> past text and clic on create
<Ox0dea> apeiros: So no 2.3 bot?
<Guest40159> not for you
voodo has quit [Quit: Leaving...]
<apeiros> Ox0dea: hu? what?
<Guest40159> for another IRC
<Guest40159> sorry for conveniance
<desmondhume> pastie: hi!
<Ox0dea> apeiros: Is it okay if my bot responds to ">>23"?
<Ox0dea> *23>>
<Guest40159> bye
<desmondhume> nothing happens lol
<Guest40159> thank you for your help
h99h9h88 has quit [Remote host closed the connection]
Guest40159 has quit [Quit: Page closed]
Mon_Ouie has joined #ruby
<apeiros> Ox0dea: I'd prefer not. I'd rather you talk to charlie and let him add 23 to eval.in
pu22l3r has joined #ruby
<Ox0dea> He's already said he'd rather not.
<Ox0dea> It "moves too fast".
Uranio has joined #ruby
Uranio has quit [Client Quit]
sivoais has joined #ruby
howdoicomputer has joined #ruby
<apeiros> Ox0dea: does your bot use an API to evaluate the code? i.e. one which you can make public?
skweek has joined #ruby
<Ox0dea> Well, no, there are no public 2.3 evaluators I'm aware of.
blackmesa has joined #ruby
<adaedra> Ox0dea: time for github-writes-a-ruby-evaluator ?
<apeiros> Ox0dea: then I'm sorry. I'd prefer you don't. ruboto will soon restrict >> usage to registered people, with the ability to blacklist
<Ox0dea> Oh, I see.
<Ox0dea> adaedra: On it.
Xeago has quit [Remote host closed the connection]
<apeiros> Ox0dea: if we can integrate it in that new version of ruboto, I'm willing to lend a hand. I've got a couple of tasks to clear before, though :D
<Ox0dea> adaedra: We're, like, 99% of the way there, by the way: http://git.io/v8wfp
benlieb has joined #ruby
<adaedra> Ox0dea: I'm so tempted throwing some emoji in it.
<shevy> does ruboto already have unicode snowman support
<adaedra> ?snowman
<ruboto> Here's a snowman for you: ☃
<adaedra> magic!
<shevy> ok
<adaedra> You're not safe here, shevy
<shevy> the snowman is fine
<shevy> I can't see him :)
<Ox0dea> What year is it?
<shevy> 2016
swgillespie has joined #ruby
<adaedra> That's alright, Ox0dea, shevy is in UTC-87600.
SHyx0rmZ has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 276 seconds]
opensource_ninja has quit [Quit: opensource_ninja]
platzhirsch has left #ruby [#ruby]
SHyx0rmZ has joined #ruby
adac has joined #ruby
zeroDivisible has joined #ruby
solocshaw has joined #ruby
diegoaguilar has quit [Ping timeout: 252 seconds]
skweek has quit [Ping timeout: 246 seconds]
<desmondhume> dying lol
sivoais has quit [Ping timeout: 276 seconds]
sankaber has quit [Remote host closed the connection]
sivoais has joined #ruby
sivoais has quit [Read error: Connection reset by peer]
sankaber has joined #ruby
Fire-Dragon-DoL has joined #ruby
sivoais has joined #ruby
TurbinGoatFuker has joined #ruby
<TurbinGoatFuker> why are all the brown niggers in IT
kstuart has quit [Quit: WeeChat 1.3]
Spami has quit [Read error: Connection reset by peer]
Spami_ has joined #ruby
<adaedra> !mute TurbinGoatFuker
<apeiros> their achievement to discredit racists by being incredibly stupid was successful IMO
<apeiros> uh, not achievement… I guess I shouldn't irc while doing other stuff…
<adaedra> yeah, you should just irc.
iateadonut has quit [Quit: Leaving.]
TheNet has joined #ruby
DEA7TH has joined #ruby
djbkd has quit [Remote host closed the connection]
desmondhume has quit [Ping timeout: 244 seconds]
Pupp3tm4st3r has joined #ruby
<shevy> if only you could idle to power in reallife as well
rakm has joined #ruby
cjbottaro has joined #ruby
h99h9h88 has joined #ruby
yosiat has joined #ruby
charany1 has joined #ruby
SleepySensei has joined #ruby
TurbinGoatFuker has quit [Remote host closed the connection]
Yzguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<charany1> hi I am getting undefined method `downcase' for nil:NilClass
Yzguy has joined #ruby
<charany1> I have form field in which I expect user to enter a single character
<shevy> so your code letter = params[:guess].to_s[0] must return a nil
Hounddog has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
govg has quit [Ping timeout: 240 seconds]
<charany1> shevy , yes , you're right
h99h9h88 has quit [Remote host closed the connection]
<charany1> shevy , I checked only for nil.to_s which was giving ""
<shevy> ok... so empty string ''[0] # yields => nil
<shevy> \o/
diegoaguilar has joined #ruby
craigp_ has joined #ruby
duncannz has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
djbkd has joined #ruby
cdg has quit [Remote host closed the connection]
Eiam has joined #ruby
<FailBit> >> ''[0]
<ruboto> FailBit # => nil (https://eval.in/465733)
speakingcode has joined #ruby
<Ox0dea> >> ''[0, 42]
<ruboto> Ox0dea # => "" (https://eval.in/465736)
shafire has quit [Quit: Page closed]
yardenbar has joined #ruby
_stu_ has quit [Quit: _stu_]
FernandoBasso has joined #ruby
mattwildig has joined #ruby
desmondhume has joined #ruby
ruby-lang713 has joined #ruby
Guest75208 has quit [Quit: This computer has gone to sleep]
Guest75208 has joined #ruby
rgtk has quit [Remote host closed the connection]
<shevy> when I found out that Array responds to .first I sort of switched to .first rather than [0] for arrays
djbkd has quit [Remote host closed the connection]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam> String should have .first too
sameerynho has quit [Quit: Leaving]
swgillespie has joined #ruby
kadoppe has quit [Ping timeout: 250 seconds]
<Ox0dea> String should just include Enumerable.
<FailBit> you should make a pull request and make that happen brah
Guest53 has joined #ruby
vigintas has joined #ruby
<eam> it's true I should
<Ox0dea> FailBit: It doesn't actually work. :/ You get back an Array.
kadoppe has joined #ruby
<Ox0dea> I mean, it'd work for #first, but not all of Enumerable.
<shevy> >> "abc".first
<Ox0dea> >> String.include(Enumerable).send :alias_method, :each, :each_char; 'foo'.map &:next
<ruboto> shevy # => undefined method `first' for "abc":String (NoMethodError) ...check link for more (https://eval.in/465753)
<ruboto> Ox0dea # => ["g", "p", "p"] (https://eval.in/465754)
<shevy> !
<Ox0dea> >> String.include(Enumerable).send :alias_method, :each, :each_char; 'foo'.first
<ruboto> Ox0dea # => "f" (https://eval.in/465755)
arthurix_ has joined #ruby
Croves has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scmx has joined #ruby
Yzguy has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
simplyaubs has joined #ruby
symm- has quit [Ping timeout: 246 seconds]
tomphp has joined #ruby
<Croves> Are simbols (:) like constants in Ruby?
ruby-lang713 has quit [Quit: Page closed]
decoponio has quit [Quit: Leaving...]
_luca_ has quit [Remote host closed the connection]
kirun has joined #ruby
arthurix has quit [Ping timeout: 264 seconds]
cfinley has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<djellemah> Croves: no. Constants start with [A-Z]. symbols are kinda immutable strings.
luca768 has joined #ruby
momomomomo has quit [Quit: momomomomo]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pkrueger has joined #ruby
<Croves> djellemah So, what's the purpose of symbols?
<Ox0dea> djellemah: Not always, on both counts. ^_^
<djellemah> Ox0dea: No, but close enough for Croves ;-)
<Ox0dea> Croves: They save time and space when it's only the "identity" of the string that matters, not so much its contents.
<Croves> Besides for hash keys
<Ox0dea> Croves: Well, why are they good as Hash keys?
<shevy> Croves symbols are sort of like a static ruby way to give things a name that will always have the same object_id
<Croves> Well, they're imutable
<desmondhume> unique keys? :(
<Croves> They are also uniques...
<shevy> a constant in ruby can be changed, a symbol will always be what it is
hxegon_ has joined #ruby
<Ox0dea> Unless I'm involved.
<shevy> you should write your own language
<Ox0dea> I've done so.
<shevy> what is the name?
<Ox0dea> It's just Forth with slightly nicer blocks, though.
<Ox0dea> Stack languages are dead-simple.
<shevy> and the name?
<Ox0dea> I won't say.
<shevy> remember, picking the name is the hardest part
luca768 has quit [Remote host closed the connection]
<shevy> apeiros named it halsbe but I have noticed that in the last ~10 mentions or so here on #ruby, he has not used that name and instead referred to it as "toy language" :D
luca768 has joined #ruby
<shevy> there was a crazy guy on #gobolinux who loved forth. I never understood why
<Ox0dea> It's just very clean.
ekinmur has joined #ruby
hxegon has quit [Ping timeout: 272 seconds]
<Ox0dea> Concatenation = composition is remarkably elegant.
<Ox0dea> Take a dive some time: http://concatenative.org/
<shevy> that is its name?
<Ox0dea> No, "concatenative" is a kind of programming like "imperative" and "functional".
<shevy> hmm... that language's name is "Factor"... I think I read that before
<Ox0dea> Yeah, Factor is the dominant concatenative language.
<Ox0dea> Slava is very committed to his precious.
desmondhume has quit [Ping timeout: 240 seconds]
NeverDie has quit [Quit: http://radiux.io/]
<shevy> people are!
yosiat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> guido... matz... larry, if he were a young man again too
<shevy> his presentation was about hobbits
DoubleMalt has joined #ruby
<shevy> his presentation was about hobbits
<Ox0dea> Larry's quite a character.
<Ox0dea> > do it(*everyone***must***participate***in***forbidden**s*e*x*).
<shevy> damn lisp
NeverDie has joined #ruby
<Ox0dea> That's Perl.
howdoicomputer has quit [Ping timeout: 250 seconds]
lazyatom has joined #ruby
RobertBirnie has quit [Ping timeout: 272 seconds]
<lazyatom> Got a hopefully-quick question about lexical scope, if anyone is around: is the inside of a method body a new lexical scope nested within the class/module that method is defined, or does it share the same lexical scope as the surrounding class/module?
<Ox0dea> lazyatom: The latter.
<Ox0dea> But not for local variables.
yardenbar has quit [Ping timeout: 252 seconds]
<shevy> I swear this exact question has been asked before some days ago
anisha has quit [Quit: Leaving]
RobertBirnie has joined #ruby
maletor_ has joined #ruby
ldnunes has quit [Quit: Leaving]
solocshaw has quit [Ping timeout: 240 seconds]
atomical_ has joined #ruby
<lazyatom> Ox0dea: thanks!
synthroid has quit [Ping timeout: 244 seconds]
<lazyatom> I wonder if there's a compelling way of demonstrating that via code examples
<Ox0dea> lazyatom: https://eval.in/465758
solocshaw has joined #ruby
momomomomo has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<lazyatom> Ox0dea: right, but I'm not sure that actually concretely rules out that the method doesn't have its own, nested lexical scope
rgtk has joined #ruby
<Ox0dea> lazyatom: Well, you can't define constants in methods.
<lazyatom> Since if it did, the constant lookup algorithm would still be able to resolve `FOO`
maletor has quit [Ping timeout: 240 seconds]
infamos has quit [Ping timeout: 240 seconds]
simplyaubs has quit [Quit: simplyaubs]
atomical has quit [Ping timeout: 255 seconds]
<djellemah> Ox0dea: Is it possible to create a constant without a value? Using normal ruby that is :-p
<Ox0dea> lazyatom: It doesn't make sense to speak of method-local constants, since they cannot be defined therein, and a method's locals are entirely its own.
jessemcgilallen has joined #ruby
<Ox0dea> djellemah: As in getting `defined?(FOO)` to return `nil`?
<lazyatom> Ox0dea: agreed; lexical scope isn't just about constants though. I do appreciate that this is a somewhat abstract question though
<djellemah> Ox0dea: OK, with that definition.
axsuul has quit [Remote host closed the connection]
<Ox0dea> djellemah: Well, that's what they do if they've not been defined, otherwise they've got to have some value, even if it's just `nil`.
<lazyatom> djellemah: I would serious doubt it (assuming you would consider even nil to be a value)
atomical has joined #ruby
<Ox0dea> djellemah: #const_set can't be coerced into taking just one argument, so I suspect it can't be done from Ruby land.
alem0lars has quit [Remote host closed the connection]
Klumben has quit [Remote host closed the connection]
johnhamelink has quit [Remote host closed the connection]
symm- has joined #ruby
hardcampa has joined #ruby
<Ox0dea> You could certainly stick `Qundef` in a constant from within a C extension, but that wouldn't go well for very long.
atomical_ has quit [Ping timeout: 255 seconds]
<djellemah> Never thought about it like this before, but for questions like Croves' the difference is that a constant is lvalue and a symbol is rvalue. Although I'm probably using those terms loosely.
djbkd has joined #ruby
symbol has quit [Quit: WeeChat 1.1]
<Ox0dea> No, that's about the size of it; I didn't know they'd asked about the difference.
<Ox0dea> >> Complex.constants nil
<ruboto> Ox0dea # => [:compatible, :I] (https://eval.in/465761)
<Ox0dea> djellemah: There's an uncapitalized "constant", by the way.
Pupp3tm4st3r has quit [Remote host closed the connection]
dfockler has quit [Ping timeout: 260 seconds]
<djellemah> Ox0dea: Yeah, but lets keep at least some of the mindblowing stuff for later. Just to stretch out the fun ;-)
ngscheurich has joined #ruby
<Ox0dea> >> [(Complex::compatible rescue $!), (Complex.const_get :compatible rescue $!)]
<ruboto> Ox0dea # => [#<NoMethodError: undefined method `compatible' for Complex:Class>, #<NameError: wrong constant name ...check link for more (https://eval.in/465764)
<Ox0dea> I'm sure there's a way to get hold of it with Fiddle.
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
<Ox0dea> lazyatom: How's this? https://eval.in/465767
cyberarm has quit [Ping timeout: 250 seconds]
speakingcode has quit [Ping timeout: 252 seconds]
Croves has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
<djellemah> Ox0dea <3 Fiddle :-D
<Ox0dea> It is known.
adac has quit [Ping timeout: 276 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
<Ox0dea> lazyatom: Even better: https://eval.in/465768
TheNet has quit [Quit: Leaving...]
sanjayu has joined #ruby
h99h9h88 has joined #ruby
prestorium has quit [Quit: Leaving]
Arkon has quit [Remote host closed the connection]
mikamika has joined #ruby
Arkon has joined #ruby
diegoaguilar has quit [Ping timeout: 240 seconds]
<lazyatom> Ox0dea: interesting! let me think...
minimalism has joined #ruby
<Ox0dea> lazyatom: The trick is to realize that not all $vars are actually "global".
<Ox0dea> $~ and all of its descendants, for instance.
<Ox0dea> 100 10 1, right?
symm- has quit [Quit: Leaving...]
vF3hNGxc47h8 has joined #ruby
<shevy> yeah
alem0lars has joined #ruby
shock_one has joined #ruby
<shevy> "A nice benefit of working on 10 concurrent projects is that when I feel that one has stagnated I can simply move on to another that motivates me more."
h99h9h88 has quit [Ping timeout: 240 seconds]
<lazyatom> Ox0dea: are the $~ vars actually part of the lexical scope though, or are they stored in the environment along with local variables?
rbennacer has joined #ruby
<lazyatom> (I realise that's a little bit of a fuzzy distinction)
<Ox0dea> And indeed I can't see the line.
devoldmx has joined #ruby
maxz_ has joined #ruby
Croves has joined #ruby
vF3hNGxc47h8 has quit [Read error: Connection reset by peer]
Arkon has quit [Ping timeout: 244 seconds]
gard_ has joined #ruby
J4D has joined #ruby
<Ox0dea> lazyatom: These are called "virtual" or "hooked" variables, but they're an implementation detail.
<Ox0dea> For YARV, they're all stored in the same variable table, but they have little tags saying to which object they belong.
Arkon has joined #ruby
slash_part is now known as slash_nick
Coldblackice_ has joined #ruby
syath has quit [Quit: WeeChat 1.2]
devoldmx has quit [Ping timeout: 260 seconds]
Croves has quit [Client Quit]
johnhamelink has joined #ruby
adac has joined #ruby
RobertBirnie has quit [Ping timeout: 240 seconds]
mattwildig has quit [Remote host closed the connection]
<lazyatom> Doesn't https://eval.in/465768 demonstrate that methods have their own lexical scope/environment then?
chouhoulis has quit [Remote host closed the connection]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
RobertBirnie has joined #ruby
mikamika has quit [Quit: Page closed]
dikaio has joined #ruby
<lazyatom> Ox0dea: I suppose what I find difficult about the example - and indeed maybe any example - is that it doesn't demonstrate any kind of lookup that would be using the lexical scope hierarchy. https://eval.in/465783 seems to indicate that there's effectively no relationship between $1 between the class and the method scopes
<Ox0dea> lazyatom: Methods do have their own scopes; my initial answer was poorly worded.
yardenbar has joined #ruby
<Ox0dea> Using $1 as an example is a bad idea, since that's a very magical variable.
TPBallbag has quit [Remote host closed the connection]
<Ox0dea> Methods don't have *independent* scopes; they can't, for instance, define their own constants, and are instead subject to constant resolution starting from the starting class.
<Ox0dea> *surrounding class
Blaguvest has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
arthurix has joined #ruby
J4D has quit [Quit: Textual IRC Client: www.textualapp.com]
NeverTired has quit [Quit: Connection closed for inactivity]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
dstarh has joined #ruby
xet7 has joined #ruby
momomomomo has quit [Quit: momomomomo]
dmitch has joined #ruby
arthurix_ has quit [Ping timeout: 255 seconds]
craysiii has joined #ruby
cdg has joined #ruby
sanjayu has quit [Ping timeout: 240 seconds]
cdg has quit [Read error: Connection reset by peer]
<Ox0dea> It seems matz wants Comparable on Hash: https://bugs.ruby-lang.org/issues/10984#note-7
cdg has joined #ruby
p0wn3d__ has quit [Ping timeout: 255 seconds]
rbennacer has quit []
<shevy> Ox0dea have you given up on your $1 versus $11 campaign?
<Ox0dea> If you mean $10 instead of $11, yeah. :/
symm- has joined #ruby
avahey has joined #ruby
<shevy> we shall not need more than 10 magic variables
htmldrum has joined #ruby
<Ox0dea> ~ $ ps au | head -1
<Ox0dea> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
<Ox0dea> I beg to differ.
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> (That's eleven columns.)
uri has quit [Ping timeout: 240 seconds]
<Ox0dea> Ruby couldn't replace awk if we only had $1-9.
<eam> fun fact: ps from coreutils will replace the unix username with the uid if the username is over 8 chars
<eam> however, with 32bit pids often the pid replacing it is longer than the username!
<eam> it's insanity
<shevy> haha
<shevy> 11 columns
<eam> sorry 32bit uids
<shevy> I was usually looking at ps ax
roxtrongo has joined #ruby
tomphp has joined #ruby
leafybas_ has joined #ruby
ekleog has quit [Read error: Connection reset by peer]
Guest53 has joined #ruby
skade has joined #ruby
ekleog has joined #ruby
skade has quit [Client Quit]
cicloid has joined #ruby
skade has joined #ruby
yfeldblum has quit [Remote host closed the connection]
ReK2 has joined #ruby
momomomomo has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
<Diabolik> how can i get rspec to check if my stdout includes a specific line?
Klumben has joined #ruby
<Diabolik> not if it matches it precisel
<Diabolik> y
subscope has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
Azure has quit [Ping timeout: 244 seconds]
<Diabolik> adaedra output checks the output directly against each other
desmondhume has joined #ruby
<adaedra> Use a regex?
<Diabolik> as in?
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
<shevy> wakey wakey adaedra!
<adaedra> wat
shock_one has quit [Remote host closed the connection]
leafybas_ has quit [Read error: Connection reset by peer]
leafybas_ has joined #ruby
<Ox0dea> adaedra: You have been elected Chief Regular Expression Supplier for the duration of this session.
bMalum has quit [Quit: bMalum]
mike_bueti has joined #ruby
<shevy> yeah!
<shevy> regexes out of hell
<shevy> fight Diabolik, fire with fire
<Ox0dea> You can use a regular expression to check divisibility by 7.
<Diabolik> shevy do you have any advice for me
<adaedra> Should be possible for 3, too.
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> Wait, maybe not.
<Ox0dea> The 3-divisibility rule is very easy to implement, just not as a state machine.
<adaedra> Yeah, I was not thinking correctly on this one.
davedev24 has joined #ruby
htmldrum has quit [Ping timeout: 244 seconds]
SleepySensei has quit [Ping timeout: 246 seconds]
diegoaguilar has joined #ruby
<shevy> Diabolik no idea about rspec
DanKnox[away] is now known as DanKnox
<adaedra> Diabolik: the documentation shows you you can use a regexp to match output. So you can match a part of your output.
mike_bueti has quit [Client Quit]
framlinqp has joined #ruby
davedev2_ has quit [Ping timeout: 240 seconds]
zenguy_pc has joined #ruby
mattwildig has joined #ruby
freerobby has quit [Quit: Leaving.]
swgillespie has joined #ruby
adac has quit [Ping timeout: 255 seconds]
framling has quit [Ping timeout: 276 seconds]
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
momomomomo has quit [Quit: momomomomo]
swgillespie has quit [Client Quit]
sinkensabe has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
DanKnox is now known as DanKnox[away]
trosborn has joined #ruby
swgillespie has joined #ruby
davedev2_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ilyes512 has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest53 has joined #ruby
charliesome has joined #ruby
cicloid has quit [Disconnected by services]
jdawgaz has joined #ruby
cicloid has joined #ruby
h99h9h88 has quit [Ping timeout: 255 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
DanKnox[away] is now known as DanKnox
jdawgaz has quit [Max SendQ exceeded]
nathanhiggers has joined #ruby
<nathanhiggers> did you hear the president of Missouri uni resigned?
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Dimik has joined #ruby
<adaedra> !mute nathanhiggers
shock_one has joined #ruby
rgtk has quit [Remote host closed the connection]
JDiPierro has joined #ruby
ValicekB has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
synthroid has quit []
x-light has joined #ruby
haylon has joined #ruby
JDiPierro has quit [Remote host closed the connection]
nathanhiggers has quit [Remote host closed the connection]
VeryBewitching has joined #ruby
<VeryBewitching> G'day folks.
diegoaguilar has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
colegatron has quit [Remote host closed the connection]
Atr3Yu has joined #ruby
h99h9h88 has joined #ruby
cicloid has quit [Ping timeout: 250 seconds]
h99h9h88 has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
cicloid has joined #ruby
sperant has joined #ruby
monod has joined #ruby
colegatron has joined #ruby
<mallu> can someone please tell me what I am doing wrong here? getting "undefined local variable" https://gist.github.com/anonymous/76b3703364472df074bb
xaxisx has left #ruby [#ruby]
<ericwood> mallu: first things first, line 7 has an extra period
shadoi has quit [Ping timeout: 240 seconds]
umgrosscol has quit [Remote host closed the connection]
h99h9h88 has quit [Ping timeout: 250 seconds]
<ericwood> mallu: sorry, I mean you put a space before the .each
<shevy> mallu you don't have a variable called stack_name
<ericwood> line 9 sets it
shock_one has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<mallu> ericwood: I fixed each
<havenwood> mallu: Line 9 hasn't happened yet on line 1.
rwilcox has quit [Ping timeout: 272 seconds]
<ericwood> mallu: also, the tags.each could just be stack_name = tags['Name']
codeurge has quit [Ping timeout: 250 seconds]
<ericwood> no need to iterate over every single one just to do a lookup
momomomomo has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
<mallu> ericwood: ok
mary5030 has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving]
sepp2k1 has quit [Read error: Connection reset by peer]
<ericwood> where is binding defined?
<danneu> havenwood: i believe the failure doesn't happen til you call #result, i.e. `ERB.(str).result(params)`
<danneu> i mean ERB.new(str).result(params)
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has joined #ruby
<newdan> mallu: I'm not strong on ERB but shouldn't raw_template just be e.g. '<%= autoscale_name %>' instead of '<%= #{autoscale_name} %>' ?
azure32 has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
trosborn has quit [Quit: trosborn]
<mallu> newdan: I tried removing that then I get "undefined local variable or method `stack_name' for main:Object"
<mallu> ericwood: you don't need to define 'binding' it is part of 'require erb' class
cicloid_ has joined #ruby
cicloid has quit [Read error: Connection reset by peer]
Voker57 has quit [Read error: Connection reset by peer]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
infamos has joined #ruby
Xeago has joined #ruby
ta has joined #ruby
kstuart has joined #ruby
<danneu> mallu: rusty with ruby, but i'm pretty sure stack_name is not in scope once you pass in `binding`
<mallu> here is the entire script and error so you can see the line where it is complaining about https://gist.github.com/anonymous/661fc03b596862e00f5c
<Ox0dea> >> method(:binding) # ericwood mallu
<ruboto> Ox0dea # => #<Method: Object(Kernel)#binding> (https://eval.in/465822)
gard_ has quit [Ping timeout: 276 seconds]
CodingWolf has quit [Quit: Leaving]
sperant has quit [Quit: Textual IRC Client: www.textualapp.com]
platzhirsch has joined #ruby
kirun has quit [Remote host closed the connection]
Guest53 has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest20167
jdawgaz has joined #ruby
<newdan> mallu: Try doing something like stack_name ||= 'NO STACK NAME' before your call to raw_template.result?
<danneu> mallu: if you `puts binding.local_variables.inspect` above raw_template.result(binding), do you see :stack_name?
<danneu> this is some solid group effort guys
yfeldblum has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
CodingWolf has joined #ruby
* Dimik np: The Prodigy - Breathe [05:34m/284kbps/44kHz]
swgillespie has joined #ruby
azure32 has quit [Quit: leaving]
<adaedra> Dimik: that's not the place for that.
yardenbar has quit [Ping timeout: 250 seconds]
<danneu> Dimik: doesn't even tell us the encoding?
pu22l3r has quit [Ping timeout: 255 seconds]
leafybas_ has quit [Remote host closed the connection]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Atr3Yu has quit [Quit: Saliendo]
freerobby has joined #ruby
shadoi has joined #ruby
rgb-one has joined #ruby
<rgb-one> Hey
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mallu> danneu: I'm getting <main>': private method `local_variables' called for #<Binding:0x00000001469ff0> (NoMethodError)
codeurge has joined #ruby
<Ox0dea> mallu: Use #send to invoke private methods.
moeabdol has quit [Ping timeout: 244 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> there's no point
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
cicloid has joined #ruby
<apeiros> it's irrelevant on which object you call local_variables
<Ox0dea> But he has a Binding?
<apeiros> the result will always be the same as it's lexically scoped
<apeiros> doesn't matter
<rgb-one> How can I reference the first argument for an application commandline. In this case the argument is an file. I would like to abort with a File not found message to the command line and I would like to mention the file name in the message.
<Ox0dea> No, I suppose not.
<rgb-one> How would I achieve this?
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> rgb-one: The command line arguments are in ARGV.
rehat_ has quit [Read error: Connection reset by peer]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> oh, actually it seems Binding is an exception
DoubleMalt has quit [Remote host closed the connection]
<Ox0dea> &ri File.exists? @rgb-one
<`derpy> No results
<havenwood> rgb-one: From your terminal try: ruby -e "p ARGV.first" hi there
snockerton has quit [Quit: Leaving.]
<apeiros> and for binding, it's not private either
<Ox0dea> adaedra: ?
<adaedra> wut.
cicloid_ has quit [Ping timeout: 240 seconds]
<Ox0dea> No results for `File.exists?`?
<havenwood> &ri File#exist?
<`derpy> No results
<havenwood> &ri File.exist?
<`derpy> No results
<havenwood> Oh
<adaedra> That's weird.
<havenwood> Thought maybe because exists? plural is deprecated, but that doesn't really make sense anyways.
<Ox0dea> shame x 3 + *bell*
<Ox0dea> havenwood: Plural?
<havenwood> Ox0dea: File::exists? # Deprecated method. Don’t use.
<adaedra> It doesn't seem to be picked up by yard, it doesn't show on rubydoc.info
<Ox0dea> Sure, but there's no plurality there. :P
<havenwood> Ox0dea: Hehe.
snockerton has joined #ruby
<eam> why is exists? deprecated?
<havenwood> Ox0dea: One exist. Two exists!
<Ox0dea> havenwood: Silly me.
<havenwood> >.>
<Ox0dea> eam: Because this is matz's ranguage.
<adaedra> >> File.method(:exist?).source_location
<ruboto> adaedra # => nil (https://eval.in/465832)
<adaedra> that helps.
<havenwood> eam: Object, do you exists? <- how Matz looks at it
<Ox0dea> adaedra: Well, yeah, it's a core method?
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> Ox0dea: it was worth a try.
<eam> it should just destructively set itself to nil
<adaedra> I wonder why yard didn't pick it up.
<havenwood> yardoc *.c
<rgb-one> havenwood: The result is nil
EllisTAA has joined #ruby
<havenwood> rgb-one: It is? :O
<havenwood> rgb-one: You did verbatim?: ruby -e "p ARGV.first" hi there
<rgb-one> havenwood: ah
<rgb-one> havenwood: I left out the hi there
<adaedra> havenwood: that's what I did.
<havenwood> rgb-one: Those are the first and second args.
<havenwood> adaedra: hem...
bb010g has quit [Quit: Connection closed for inactivity]
<rgb-one> havenwood: Indeed. Thanks.
<adaedra> havenwood: ?
markao has joined #ruby
<markao> is there an auto indent script
<havenwood> adaedra: And stdlib as well?: yardoc -b .yardoc-stdlib -o doc-stdlib
<markao> i would like to press a key combo and have it indent according to standards
<havenwood> adaedra: I dunno, my yardoc-fu isn't strong.
ss_much has joined #ruby
<adaedra> havenwood: `yardoc -n 'ext/**/*.c' 'ext/**/*.rb' 'lib/**/*.rb' *.c`, according to my notes.
<markao> if it's a js file it will auto indent to js standards, if it's a ruby file it will auto indent to ruby standards, and if it's html it will indent to html standards
<Ox0dea> markao: Just use a decent editor?
<Ox0dea> gg=G
<markao> is there a plugin that does that and what would it be called?
<Ox0dea> It's called Vim and it does it without a plugin.
<adaedra> havenwood: but since rubydoc.info doesn't have it, it seems that it would be more a yard bug.
<havenwood> adaedra: ahhh, interesting
<havenwood> adaedra: oops!
<markao> i mean you write some bad indented code and forget to put items in new lines it will scan your file and fix it :)
<markao> that's what i'm looking for
devoldmx has joined #ruby
<Ox0dea> markao: Well, there's rubyfmt for Ruby: https://github.com/wojtekmach/rubyfmt
<Ox0dea> I suspect there are similar tools for the others.
<markao> is there a universal one
<Ox0dea> But maybe consider writing code like a decent and moral human being.
<markao> i don't wanna
<markao> text editors should handle that not humans
<markao> humans should focus on functionality not readability
<adaedra> markao: they do?
mattwildig has quit [Remote host closed the connection]
<adaedra> well, good ones do.
<markao> that's why they're not great
<havenwood> markao: Does your text editor not handle it?
hxegon has joined #ruby
<Ox0dea> Editors usually don't handle jamming everything on one line.
<adaedra> most of my indenting is done by my editor.
macdaddy has quit [Ping timeout: 250 seconds]
<havenwood> markao: Using the One True Editor?
yqt has quit [Ping timeout: 255 seconds]
mattwildig has joined #ruby
<markao> no i used web storm and i love their auto indent feature
<markao> but it uses too much memory
<markao> i want to use vim or atom that uses less memory and want that feature
<havenwood> markao: "web storm" does not compute. maybe you meant vi or emacs?
<havenwood> :P
<Ox0dea> markao: Why shouldn't the relationship between you and your editor be a symbiotic one?
<Ox0dea> Just don't write code like a total fuckwad and your editor will be there to keep things in shape.
hxegon_ has quit [Ping timeout: 250 seconds]
<Ox0dea> That coming from the guy who wrote this, mind: http://i.imgur.com/94jou4v.png
<markao> wow you're an asshole
<havenwood> Everyone be nice!
<Ox0dea> markao: Please maintain your composure.
<newdan> Ox0dea: That was pretty condescending...
<craysiii> atom is not ready
devoldmx has quit [Ping timeout: 246 seconds]
<drbrain> Ox0dea: haha, amazing
<adaedra> nvim is our savior.
<adaedra> sorry, Our Savior.
<Ox0dea> drbrain: I'm glad you like it. ^_^
<Ox0dea> No joke, it's a Sinatra app.
ngscheurich has quit [Ping timeout: 240 seconds]
<eam> of course it is
ESpiney__ has quit [Quit: Leaving]
<Ox0dea> eam: Cast your doubts elsewhere: https://eval.in/465846#code
<haylon> Anyone decent with Chef stuff?
<haylon> not getting much of a response to my qeustion in #chef
<havenwood> markao: Sublime or Atom are newfangled alternatives you might be more comfortable with than the venerable emacs/vim.
<eam> Ox0dea: oh, no doubts. Read tone as in "what else could it possibly be?"
<craysiii> exited with error status 1
<Ox0dea> eam: Oh, right. :P
<eam> typical of its ilk, etc etc
<Ox0dea> craysiii: Because eval.in doesn't have Sinatra installed.
<haylon> Has anyone seen this error before? Chef::PolicyBuilder::Policyfile::UnsupportedFeature: Policyfile does not support override run lists. Use named run_lists instead. I run into it when using `chef-client -z -o cookbook_name -j cookbook_policy.json`.
<Ox0dea> Note the LoadError.
diegoaguilar has quit [Ping timeout: 240 seconds]
gard_ has joined #ruby
fumk has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
newdan has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
<craysiii> thats obvious
<craysiii> i wanted to see the result of it though
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> craysiii: Run it?
fumk has joined #ruby
imperator has joined #ruby
eminencehc has joined #ruby
Kabal has quit []
<Ox0dea> >> 'landline'.tr 'denial', '-/\ fmr'
<ruboto> Ox0dea # => "rm -rf /" (https://eval.in/465847)
<Ox0dea> On second thought, probably don't trust code you can't read if it came from me.
<eam> as if anyone ever reads code before using a gem
<craysiii> haha
|ifei5g00d has quit [Remote host closed the connection]
<craysiii> yeah i wasn't going to run that.
<adaedra> as if anyone ever reads code before using anything.
haylon has quit [Quit: Leaving]
<markao> !ops
<ruboto> fflush, banisterfiend, apeiros, seanstickle, zzak, Radar, miah, Havenn, workmad3, jhass, Coraline, Mon_Ouie, drbrain, sevenseacat, slyphon, zenspider, rubyhacker1, Adaedra, baweaver, ljarvis, Aria
<adaedra> yes?
<Radar> markao: really?
<Radar> !mute markao
<Radar> markao: 15 min timeout for doing that.
<Radar> Cool off.
<eam> it's totally readable
|ifei5g00d has joined #ruby
<craysiii> what does ?L do
<eam> >> ?l
<ruboto> eam # => "l" (https://eval.in/465848)
<eam> er, same with a capital though - just a quoted character
tubuliferous_ has quit [Ping timeout: 276 seconds]
<craysiii> >> puts [%w{​​​​ ​​​​​ ​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​â€
<ruboto> craysiii # => /tmp/execpad-fdb9c3a42b87/source-fdb9c3a42b87:2: unterminated string meets end of file ...check link for more (https://eval.in/465849)
lemur has joined #ruby
<eam> hahahhaah
<craysiii> lol
gard_ has quit [Ping timeout: 244 seconds]
macdaddy has joined #ruby
<shevy> hmm
<shevy> I managed to madness myself... I have one .cgi where I somehow end up with: (1) US-ASCII (2) ISO-8859-1 and (3) UTF-8
<adaedra> I can't evan.
hkumar has joined #ruby
imperator has quit [Quit: Leaving]
rgb-one has quit [Ping timeout: 240 seconds]
<adaedra> shevy: you mean input?
<craysiii> i madness myself often
htmldrum has joined #ruby
dhollinger has quit [Ping timeout: 252 seconds]
<adaedra> They did good songs.
Azure has joined #ruby
<shevy> adaedra hmm not sure yet ... I need to first find out where and how the other two encodings originate (the middle one is correct, the page itself has # Encoding: ISO-8859-1 so that part is fine)
momomomomo has quit [Quit: momomomomo]
h99h9h88 has joined #ruby
<adaedra> shevy: you're rejecting UTF-8 in your ruby scripts too? yuck.
momomomomo has joined #ruby
<eam> I have a commit check for high bits in my code, to protect against my desktop OS doing stupid things with copy/paste
skade has quit [Quit: Computer has gone to sleep.]
desmondhume has quit []
jessemcgilallen has joined #ruby
<eam> osx has a nasty habit of turning an ending ' into something ... else
momomomomo has quit [Client Quit]
<shevy> adaedra oh the above would be fine if it would only be two different encodings, but it's three which I haven't seen happen before yet
<adaedra> eam: in ’ ?
<adaedra> smart quotes can be disabled, if they bother you.
<shevy> hmm... one part of the code uses Dir.pwd
<shevy> what kind of encoding will that string have?
diegoaguilar has joined #ruby
<Diabolik> is there any way of doing this other than the brute force solution?
<adaedra> Depending on your file system, maybe.
<shevy> hmm
h99h9h88 has quit [Ping timeout: 240 seconds]
<shevy> curious
<adaedra> Dir.pwd.encoding => #<Encoding:UTF-8>
<eam> adaedra: yeah, and I did, but they sneak in (eg, someone sends a snip of code to me)
<shevy> in irb, I get the "ISO-8859-1", in .cgi environments I have "US-ASCII"
<eam> I curse every UX person who thinks it's ok to change characters text strings
<eam> ^in
<shevy> :)
shock_one has joined #ruby
<adaedra> LANG=fr_FR ruby -e 'puts Dir.pwd.encoding' => ASCII-8BIT
<adaedra> For what it's worth.
<shevy> huh
<eam> different filesystems can have different encodings
<adaedra> Even if unicode is pretty standardized nowadays.
kies has quit [Ping timeout: 244 seconds]
<dorei> Diabolik: maybe, since you're only interested in the count of such numbers and not finding which are these numbers
hkumar has quit [Quit: Leaving]
leafybas_ has joined #ruby
<shevy> does one of you have an old school .cgi page and could show the output of puts Dir.pwd.encoding.to_s ?
<adaedra> Ahahah, cgi.
<shevy> the good old 1995s!
<Diabolik> i can't think of a better way of doing it
<Diabolik> dorei there must be a way of knowing that 101 is a palindrome therefore 1001 is and so on
snockerton has quit [Quit: Leaving.]
<eam> shevy: I would, but /usr/bin/ruby on my system is 1.8.7 and doesn't have an "encoding" method ;-)
<dorei> Diabolik: 0-9, all numbers are palindromes ie 10 palindromes, 10-99, only numbers like 11, 22, 33, etc are palindromes, ie 10 palindromes
cicloid has quit [Ping timeout: 260 seconds]
lemur has quit [Read error: Connection reset by peer]
<shevy> eam lol
<dorei> Diabolik: now we have to contemplate about 3 digit numbers
northfurr has joined #ruby
shock_one has quit [Ping timeout: 260 seconds]
<shevy> I think it's US_ASCII by default... really weird
cfinley has quit [Remote host closed the connection]
<Ox0dea> Diabolik: As dorei is hinting, you can do it recursively from the outside in, and memoization will help you avoid doing unnecessary computation.
<dorei> Diabolik: 100-199 only 101, 111, 121, etc are palindromes, ie 10 palindromes
rgtk has quit [Remote host closed the connection]
Ropeney has joined #ruby
<Ox0dea> Oh, right, you're only counting them.
<shevy> weirdness such as
<dorei> Ox0dea: i'm pretty sure mathematicians could come with something like O(1) :p
<shevy> cgi/util.rb: case $1.encode(Encoding::US_ASCII)
rgtk has joined #ruby
<dorei> come up
cicloid has joined #ruby
cicloid has quit [Read error: Connection reset by peer]
NeverDie has quit [Quit: http://radiux.io/]
<Ox0dea> dorei: It's possible, but I can't think how not to check all n bits in the general case.
* baweaver wanders in
<Ox0dea> baweaver: How we do determine whether a number is palindromic in constant time?
<dorei> okie, let's cheat then
<Ox0dea> > How we do
<Diabolik> Ox0dea I did a functional solution
zeroDivisible has quit [Quit: WeeChat 1.3]
<Diabolik> which imo is better
cicloid has joined #ruby
molay has joined #ruby
zeroDivisible has joined #ruby
<eam> amazing I still remember how cgi works
<dorei> i cheated :p
axl_ has quit [Quit: axl_]
<molay> how do I remove the asterisks from this string "****Driving School****" ?
<baweaver> >> s=123454321.to_s;s==s.reverse
<ruboto> baweaver # => true (https://eval.in/465852)
<Ox0dea> baweaver: That's O(n).
riotjon__ has joined #ruby
<dorei> Ox0dea: we're just counting, not checking whether it's a palindrome :p
<molay> i'm having a lot of trouble getting it to behave
spider-mario has quit [Read error: Connection reset by peer]
<Ox0dea> >> '***molay***'.delete '*'
<ruboto> Ox0dea # => "molay" (https://eval.in/465853)
<shevy> eam interesting
<Ox0dea> molay: But I guess you only want to take them from the outside?
Xeago has quit [Remote host closed the connection]
<molay> Ox0dea: no removing all is fine with me
<shevy> eam thanks
<eam> shevy: there's no reason running it under cgi ought to change its behavior
mary5030 has joined #ruby
* baweaver cries in corner
<Diabolik> Ox0dea what is your opinion on the functional solution?
<molay> Ox0dea: thank you
rgb-one has joined #ruby
riotjones has quit [Ping timeout: 246 seconds]
Arkon has quit [Remote host closed the connection]
<shevy> now I got rid of the US-ASCII encoding so now it's only UTF-8 versus ISO-8859-1, which I resolved before in the past :)
<adaedra> by switching to full UTF-8, right?
monod has quit [Quit: Sto andando via]
Arkon has joined #ruby
<shevy> nah
eminencehc has quit [Remote host closed the connection]
step1step2 has quit [Quit: Leaving]
<dorei> is there some shortcut for self.class.new ?
guest9000 has joined #ruby
<shevy> hmm
<shevy> the hardcoded name :D
<Radar> dorei: class.new?
mary5030 has quit [Ping timeout: 240 seconds]
cicloid has quit [Read error: Connection reset by peer]
<adaedra> it takes class as the keyword in this case iirc.
<dorei> does class.new work? :O
<Radar> dorei: try
avahey has quit [Quit: Connection closed for inactivity]
<dorei> it doesn't
guest9000 is now known as step1step2
<Radar> magic
<dorei> i get: SyntaxError: unexpected '.'
snockerton has joined #ruby
<Radar> dorei: Can't reference the class name directly?
<Radar> Why do you want a shorthand anyway? This reeks of XY
<Radar> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<molay> Ox0dea: '***molay***'.delete '*' didn't seem to work
Oatmeal has joined #ruby
h99h9h88 has joined #ruby
Alayde has joined #ruby
<dorei> okie, let me rephrase, i have a class, and from a instance method i want to create a new object from this class, so i use self.class.new from that method, but i wonder if there's a shortcut for that
wldcordeiro has quit [Ping timeout: 246 seconds]
FernandoBasso has quit [Quit: WeeChat 1.3]
<Radar> dorei: Yes yes we know the solution that you've already made yourself.
<Radar> But why do you want to do this?
<dorei> why not?
<shevy> well self.class.new is quite short already
<dorei> i dont want to mutate my object
<dorei> but then OO is about object mutation :p
subscope has quit [Read error: Connection reset by peer]
sevin has quit [Max SendQ exceeded]
hardcampa has quit [Quit: WeeChat 1.3]
<shevy> you have to call "new" anyway so that part will be invariant, unless you use some other initializor such as []
sevin has joined #ruby
tmtwd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> Diabolik: You mostly just reorganized it; you didn't change the algorithm in any meaningful way.
<shevy> he made it prettier!
<Ox0dea> That he did.
charliesome has joined #ruby
<Ox0dea> molay: How do you mean?
h99h9h88 has quit [Remote host closed the connection]
<shevy> >> '***molay***'.delete '*'
<ruboto> shevy # => "molay" (https://eval.in/465858)
mag42c has quit [Ping timeout: 260 seconds]
<shevy> you chopped away all the '*' !
<dorei> Diabolik: https://oeis.org/A070199
cicloid has joined #ruby
missinghandle has joined #ruby
Mon_Ouie has joined #ruby
snockerton has quit [Quit: Leaving.]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snockerton has joined #ruby
CodingWolf has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
dtscode is now known as nchambers
EllisTAA has quit [Quit: EllisTAA]
whippythellama has quit [Quit: WeeChat 1.3]
rgtk has quit [Remote host closed the connection]
Yzguy has joined #ruby
josh has joined #ruby
<josh> hello
<josh> i have a question foir someone who is fluent in the ruby language
josh is now known as Guest16171
gambl0re has joined #ruby
<molay> Ox0dea: here's what i'm trying to do https://eval.in/465861
<molay> perhaps this will give you some context
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<molay> I'm trying to eliminate the asterisks from the item as I add it to the string
symm- has quit [Ping timeout: 250 seconds]
tomphp has joined #ruby
yqt has joined #ruby
northfurr has quit [Quit: northfurr]
EllisTAA has joined #ruby
Yzguy has quit [Client Quit]
<Ox0dea> molay: Use #delete! to modify the string in-place.
<Ox0dea> It only worked here because ruboto displays the result of the last evaluation.
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
<molay> Ox0dea: omg.. duh
Steve_Jobs has joined #ruby
<molay> Ox0dea: perfect. thank you
<Ox0dea> molay: Happy to help.
hxegon has quit [Read error: Connection reset by peer]
Dimik has quit [Ping timeout: 260 seconds]
<molay> Ox0dea: I should have caught that.. i need some food!
<Ox0dea> molay: Drink some water too.
SCHAAP137 has quit [Quit: Leaving]
<molay> haha for sure
<missinghandle> hi everyone - anyone here familiar with the mutant gem?
ni291187 has joined #ruby
<missinghandle> Not sure how to interpret all the output
<missinghandle> specifically the Killtime and Overhead fields, among other things.
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
hxegon has joined #ruby
djbkd has joined #ruby
karapetyan has joined #ruby
<molay> Ox0dea: ok since you've been so helpful, here's one more question.. assuming a similar input, suppose I have a name like "Dharmendra "Dan" Prasad"... how would i replace "Dan" with \"Dan\" ?
raldu_ has joined #ruby
<molay> Ox0dea: to add some context, i'm building this string to use in a sqlite3 INSERT parameter
cicloid_ has joined #ruby
<molay> Ox0dea: so it's being very picky about my string
cicloid_ has quit [Read error: Connection reset by peer]
Rutix has quit []
charliesome has joined #ruby
<dorei> molay: why not use an ORM ?
freerobby has quit [Quit: Leaving.]
cicloid has quit [Ping timeout: 240 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
zeroDivisible has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> molay: Sequel is quite nice: http://sequel.jeremyevans.net
<havenwood> Good gem.
Uranio has joined #ruby
Guest16171 has quit [Ping timeout: 246 seconds]
<Ox0dea> molay: You could do it with #gsub easily enough, but, as just advised, you're reinventing a wheel or two.
cicloid has joined #ruby
charliesome has quit [Client Quit]
Rickmasta has joined #ruby
arthurix_ has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
teclator has quit [Ping timeout: 272 seconds]
djbkd has quit [Read error: Connection reset by peer]
stamina has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
<molay> thanks dorei and havenwood..
sdfgsdfg has joined #ruby
Trieste has quit [Ping timeout: 264 seconds]
<molay> Ox0dea: well I'm new to different methods of data persistence
djbkd has quit [Remote host closed the connection]
freerobby has joined #ruby
eightbellyoct has joined #ruby
<molay> i was trying to securely save client data as it is imported from a CSV file
<molay> some of the csv files can be rather large
arthurix has quit [Ping timeout: 265 seconds]
symm- has joined #ruby
ni291187 has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
Ebok has quit [Quit: Internet is down or Computer is restarting. I'll be back.]
<molay> at least from what I found out there, sqlite3 seemed to have a lot of approval for the type of application I was going for
stannard has quit [Remote host closed the connection]
Guest75208 has quit [Quit: This computer has gone to sleep]
freerobby has quit [Client Quit]