jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
n_blownapart has quit []
RegulationD has quit [Remote host closed the connection]
sarkyniin has quit [Ping timeout: 276 seconds]
drewvans1one has joined #ruby
eggoez has joined #ruby
drewvanstone has quit [Ping timeout: 252 seconds]
GnuYawk has joined #ruby
GnuYawk has joined #ruby
cb_ has quit [Remote host closed the connection]
cb_ has joined #ruby
cb_ has quit [Remote host closed the connection]
cb__ has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
jackjackdripper has quit [Quit: Leaving.]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
frem has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jeanlinux has quit [Remote host closed the connection]
dseitz has joined #ruby
icarus_ has quit [Ping timeout: 246 seconds]
zacstewa_ has quit [Ping timeout: 246 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
zacstewart has joined #ruby
<kinduff> trying to reduce this as much as I can
bjornar has quit [Ping timeout: 252 seconds]
bjornar has joined #ruby
<kinduff> it's a solving math game by timer
sarkyniin has joined #ruby
Akagi201 has joined #ruby
Ox0dea has joined #ruby
<Ox0dea> kinduff: To be clear, you're golfing, right?
<kinduff> yes
<kinduff> any tips? new to this
Indian has quit [Ping timeout: 265 seconds]
<mozzarella> { } instead of do end
<kinduff> right, ty
<al2o3-cr> kinduff: that could possibly be half that
cb__ has quit [Remote host closed the connection]
symm- has joined #ruby
<kinduff> how?
startupality has quit [Quit: startupality]
<al2o3-cr> with practice
<kinduff> oh thanks
dgutierrez1287 has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
<al2o3-cr> kinduff: hackers don't hack into banks by giving up do they?
snowkidind has joined #ruby
<snowkidind> poll: to SASS or not to SASS?
<kinduff> al2o3-cr: i wish i was a banker
drewvans1one has quit [Ping timeout: 252 seconds]
bradleyprice has joined #ruby
<al2o3-cr> kinduff: don't we all
zacstewart has quit [Ping timeout: 255 seconds]
sevenseacat has joined #ruby
CloCkWeRX has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
bradleyp_ has quit [Ping timeout: 248 seconds]
<al2o3-cr> kinduff: perseverence :)
grey_beards has joined #ruby
marr has quit []
grey_beard has quit [Ping timeout: 265 seconds]
snockerton has quit [Quit: Leaving.]
snowkidind has left #ruby [#ruby]
vikaton has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
serivichi has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
zacstewart has joined #ruby
EllisTAA has joined #ruby
celly has quit []
sharpmachine has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
isxek has joined #ruby
serivich has quit [Ping timeout: 248 seconds]
yayfoxes_ is now known as yayfoxes
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoicomputer has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 255 seconds]
EllisTAA has quit [Quit: EllisTAA]
bullcitydev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Akagi201 has quit [Ping timeout: 276 seconds]
kinduff has quit [Quit: leaving]
podman has quit [Quit: Connection closed for inactivity]
cb__ has joined #ruby
cb__ has quit [Remote host closed the connection]
Akagi201 has joined #ruby
mrmargolis has quit [Remote host closed the connection]
stardiviner has joined #ruby
gigetoo has joined #ruby
axl_ has quit [Quit: axl_]
roolo_ has joined #ruby
j4cknewt has quit [Remote host closed the connection]
sankaber has joined #ruby
cb__ has joined #ruby
cb__ has joined #ruby
jbourassa has joined #ruby
lolmaus has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
roolo has quit [Ping timeout: 264 seconds]
Musashi007 has quit [Ping timeout: 265 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
scripore has joined #ruby
rcvalle has quit [Quit: rcvalle]
zacstewart has quit [Ping timeout: 252 seconds]
Lucky___ has joined #ruby
Spami has joined #ruby
zacstewart has joined #ruby
zemmihates has joined #ruby
jlast has joined #ruby
bruno- has joined #ruby
Guest84827 has quit [Remote host closed the connection]
<Ox0dea> al2o3-cr: I got it down to 167.
jbourassa has quit [Read error: Connection reset by peer]
Guest16735 has joined #ruby
cb__ has quit [Remote host closed the connection]
ghormoon has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jpfuentes2 has joined #ruby
bricker has quit [Quit: leaving]
Muhannad has quit [Ping timeout: 265 seconds]
jlast has quit [Ping timeout: 276 seconds]
<al2o3-cr> Ox0dea: awesome, what was it from?
dgutierrez1287 has joined #ruby
revoohc has quit [Quit: revoohc]
<baweaver> I smell shenanigans afoot
<Ox0dea> al2o3-cr: It was 350-something when he first posted the link, but he's revised it down to 305 at the moment.
<Ox0dea> baweaver: I solemnly swear that I am up to no good: https://gist.github.com/kinduff/a86471d2740e7be08980
lictor36 has quit [Read error: Connection reset by peer]
<Ox0dea> Also, I did another one. ^_^
icarus_ has joined #ruby
* Radar loves this recurring theme so much
<Ox0dea> Do you reckon you could still decipher these if I didn't first show an example invocation?
zacstewart has quit [Ping timeout: 256 seconds]
mrmargolis has joined #ruby
JDiPierro has joined #ruby
<al2o3-cr> Ox0dea: decipher, give over
Guest16735 has quit [Ping timeout: 265 seconds]
<baweaver> Probably
chouhoulis has quit [Ping timeout: 246 seconds]
<baweaver> gimme
s2013 has joined #ruby
<baweaver> I won't eval it at all
zacstewart has joined #ruby
<Ox0dea> al2o3-cr: Hm? I was referring to the little non-alphanumeric snippets I've been doing as of late.
<Ox0dea> baweaver: @_=[*?/...?:][(_=$$/$$)..-_]*'';(@__=->__{$_=__[_-_];@_[$_]?$*<<(@_=~/#$_/):(___,$__=$*[-_-_,_+_];$*[-_-_,_+_]=$_[?+]?___+$__:$_[?-]?___-$__:$_[?*]?___*$__:$_[?/]?___/$__:_);__[_]?@__[__[_..-_]]:$*})
<Ox0dea> baweaver: One clue: it takes a string argument.
RegulationD has joined #ruby
<al2o3-cr> Ox0dea: you've been doing a lot of them lately
<Ox0dea> This is the fourth.
<al2o3-cr> yeeesh
shadoi has quit [Quit: Leaving.]
Deele has quit [Ping timeout: 256 seconds]
Akagi201 has quit [Ping timeout: 246 seconds]
icarus_ has quit [Ping timeout: 255 seconds]
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> easy peasy
<Ox0dea> al2o3-cr: Really? It is actually kind of obvious if you happen to spot a certain pattern.
<al2o3-cr> well, you stated the obvious :p
RegulationD has quit [Ping timeout: 255 seconds]
GitGud is now known as IntelligentBot
IntelligentBot is now known as GitGud
<Ox0dea> Nah, none of the others were as "formulaic" as this one.
bruno- has quit [Ping timeout: 246 seconds]
<al2o3-cr> so how long did it take you to come up with this one?
j4cknewt has joined #ruby
<al2o3-cr> must of took a bit of time considering you are not a computer :P
ghormoon has joined #ruby
<Ox0dea> The original took about five minutes, but I knew I was going to give it to baweaver without providing an example, so I spent some time making it more confusing than necessary. :)
<baweaver> bugger
<al2o3-cr> :P
<baweaver> already halfway through anyways
Akagi201 has joined #ruby
<Ox0dea> baweaver: Do you already know what it does?
<baweaver> Not sure what $* is but it starts as an empty array at least.
<baweaver> Not quite
<Ox0dea> It's a synonym for ARGV.
<al2o3-cr> baweaver: argv
<baweaver> ah
<Ox0dea> I'm glad it didn't prove to be read-only. :)
<al2o3-cr> $$ current process
lolmaus has joined #ruby
<baweaver> I know
<al2o3-cr> k
<al2o3-cr> baweaver: what $@
<baweaver> I'm not playing quiz show while solving this
<al2o3-cr> pfft...
zacstewart has quit [Ping timeout: 265 seconds]
JDiPierro has quit [Remote host closed the connection]
<baweaver> Trying to figure out what ?+ is achieving with its friends there
jlast has joined #ruby
sphex has quit [Ping timeout: 252 seconds]
<Radar> That could be the literal character "+"
<baweaver> I want to say it just reverses the string and those are there to be a pain and return nil
<baweaver> yeah, though tha....
<baweaver> son of a gun
<baweaver> did you just make a stack calculator?
sphex has joined #ruby
<sevenseacat> rpn or something?
Akagi201 has quit [Ping timeout: 265 seconds]
n008f4g_ has quit [Ping timeout: 256 seconds]
<Ox0dea> Nice!
<Ox0dea> It is indeed an RPN calculator.
<Ox0dea> >> @_=[*?/...?:][(_=$$/$$)..-_]*'';(@__=->__{$_=__[_-_];@_[$_]?$*<<(@_=~/#$_/):(___,$__=$*[-_-_,_+_];$*[-_-_,_+_]=$_[?+]?___+$__:$_[?-]?___-$__:$_[?*]?___*$__:$_[?/]?___/$__:_);__[_]?@__[__[_..-_]]:$*})['24+3/3*52+*']
<ruboto> Ox0dea # => [42] (https://eval.in/390719)
<Ox0dea> It's limited to single-digit operands, though. :/
<baweaver> took until I hit the ternary to be able to tell that's what you did
<Ox0dea> I know how to implement #to_i, of course, but handling operator padding made it really ugly.
<baweaver> I was thinking in alpha context
<Ox0dea> It's more of a "quinary", really.
jtdoncas has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
j416_ has joined #ruby
Musashi007 has joined #ruby
<Ox0dea> There's *got* to be some way to invoke `eval` or even #send without alphanumerics, but I can't see it. :(
tuelz has quit [Ping timeout: 276 seconds]
<sevenseacat> I hope you're making a GitHub repo of all of these things Ox0dea, or at least saving them somewhere for people to marvel at
<al2o3-cr> another yusuke endoh, hey
yqt has quit [Ping timeout: 250 seconds]
<al2o3-cr> Ox0dea: my got boy, you got talent
<al2o3-cr> *god
pgatt has joined #ruby
nettoweb_ has joined #ruby
djbkd has quit [Remote host closed the connection]
j416 has quit [Ping timeout: 256 seconds]
j416_ is now known as j416
<baweaver> I'll have to clean it up when I get home though
kerrizor has quit [Quit: Textual IRC Client: www.textualapp.com]
jeramyRR has joined #ruby
Akagi201 has joined #ruby
serivichi has quit [Ping timeout: 244 seconds]
<al2o3-cr> baweaver: massive applaud (honestly)
<baweaver> I think he's trying to give me a headache now :P
sharpmachine has joined #ruby
<Ox0dea> al2o3-cr: No, certainly not. I bow humbly before the likes of Endoh-san.
<al2o3-cr> baweaver: seriously, well done on that
CloCkWeRX has quit [Ping timeout: 256 seconds]
jeramy_s has quit [Ping timeout: 252 seconds]
<Radar> baweaver for prex
<Ox0dea> I only used "quinary" to indicate that the branch has five possible targets.
<al2o3-cr> Ox0dea: :P
<Radar> prez*
<baweaver> it'll need some cleanup, forgot a ternary on there :D
<Ox0dea> baweaver: Your explanation is not entirely correct. :/
<baweaver> it's not
<baweaver> hence the cleanup comment
<Ox0dea> It's not characters that are being pushed into the $* array.
<sevenseacat> *vice-prez
djbkd has joined #ruby
<baweaver> that was a quick "I'm at work" lookover.
nettoweb has quit [Ping timeout: 256 seconds]
<Ox0dea> >> d = '8'; '0123456789' =~ /#{d}/
<ruboto> Ox0dea # => 8 (https://eval.in/390732)
<Ox0dea> I'm using that trick to turn digit characters into their actual values.
<baweaver> yeah, position of the chara...
<baweaver> cripes
<baweaver> that's one way to do it
i8igmac has joined #ruby
<Ox0dea> Isn't it the only way?
Agoldfish has quit [Quit: G'Bye]
freerobby has joined #ruby
<Ox0dea> I mean, I could build an actual lookup table, but that'd be much more verbose.
<baweaver> indeed
momomomomo has quit [Quit: momomomomo]
<Ox0dea> > the last two characters of the array $*
cb__ has joined #ruby
cb__ has quit [Changing host]
cb__ has joined #ruby
<Ox0dea> $* never contains characters, was the point I meant to make.
<baweaver> yeah, I caught it.
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> Ox0dea: and that took 5 minutes?
<baweaver> nth fibbonaci would be a bit easy, trying to think of a more interesting one.
sharpmachine has quit [Ping timeout: 252 seconds]
<Ox0dea> I think I'll give your DL suggestion a go.
<baweaver> DL?
<Ox0dea> Damerau-Levenshtein?
<baweaver> Ah
<baweaver> god speed, that'll be hard.
<baweaver> and requires a wordlist
<baweaver> well, no
<sevenseacat> levenshtein doesnt require a wordlist
<baweaver> the DL algorithm just gets the distance between two words
tuelz has joined #ruby
<sevenseacat> just comparing each char of two words
<sevenseacat> (dont know what the damerau part is)
<baweaver> transposition
<sevenseacat> well sheet
<sevenseacat> that makes it harder
<baweaver> the original didn't have it
<Ox0dea> I won't be able to demonstrate it via ruboto, since it'll need to receive the word list as an argument.
<baweaver> it won't need it
<baweaver> only needs to find distance between two words
<baweaver> such as lev_distance('foo', 'moo') -> 1
Eiam has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
<Ox0dea> Yeah, I was wondering why you'd mentioned requiring a word list, actually.
j4cknewt has quit [Remote host closed the connection]
<baweaver> half asleep
<baweaver> >> require 'levenshtein'
<ruboto> baweaver # => cannot load such file -- levenshtein (LoadError) ...check link for more (https://eval.in/390734)
jamesaxl has quit [Remote host closed the connection]
<baweaver> didn't think so
<Radar> it's available here https://rubygems.org/gems/text
oo_ has joined #ruby
<baweaver> levenshtein-ffi as well
<baweaver> I thought there might have been a built in
<sevenseacat> i thought there was
<Ox0dea> Well, there's one in RubyGems.
<sevenseacat> it appears its not, but theres lots of gems for it
<baweaver> require 'text'
<baweaver> >> require 'text'
<ruboto> baweaver # => cannot load such file -- text (LoadError) ...check link for more (https://eval.in/390735)
<baweaver> nope
<Ox0dea> >> require 'rubygems/text'
<ruboto> Ox0dea # => true (https://eval.in/390736)
<baweaver> son of a
Eiam has joined #ruby
<baweaver> >> require 'rubygems/text'; Text::Levenshtein.distance('test', 'test')
<ruboto> baweaver # => uninitialized constant Text (NameError) ...check link for more (https://eval.in/390737)
* baweaver shrugs
<Ox0dea> >> require 'rubygems/text'; include Gem::Text; levenshtein_distance('foo', 'moo')
<ruboto> Ox0dea # => 1 (https://eval.in/390738)
<baweaver> well, time for me to head home and get some food stuffs
<baweaver> I swear you know black magic
<Ox0dea> ^_^
<Ox0dea> Enjoy your foodstuffs.
<baweaver> 'night
baweaver has quit [Remote host closed the connection]
Eiam has quit [Client Quit]
Musashi007 has quit [Quit: Musashi007]
phutchins1 has joined #ruby
auzty has joined #ruby
_kfpratt has joined #ruby
kfpratt has quit [Read error: Connection reset by peer]
FernandoBasso has quit [Quit: WeeChat 1.2]
lolmaus has quit [Remote host closed the connection]
lolmaus has joined #ruby
Eiam has joined #ruby
howdoicomputer has quit [Ping timeout: 265 seconds]
phutchins1 has quit [Ping timeout: 246 seconds]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
tkuchiki_ has joined #ruby
Musashi007 has joined #ruby
cb__ has quit [Remote host closed the connection]
jeramyRR has quit [Quit: Peace out!]
wallerdev_ has quit [Quit: wallerdev_]
momomomomo has joined #ruby
<nofxx> is there some way to run all tasks in a namespace? in their order
<Radar> nofxx: not without defining another task that explicitly calls them afaik
msnyon has quit [Ping timeout: 246 seconds]
<nofxx> Radar, boring... I'm using a not so beautiful trick: an :all task inside, so I dont need to namespace each task from outside
<nofxx> I mean, outside: 'namespace:task' , inside: :task , way better
<nofxx> all that so rake -T looks good... foo foo:a foo:b instead of foo:all foo:a foo:b
<nofxx> well, and the actual USE too.. hehe
chihhsin_ has quit [Quit: leaving]
<Ox0dea> >> "#{1.0/9899}".scan(/\d\d/).map(&:to_i)
<ruboto> Ox0dea # => [0, 1, 1, 2, 3, 5, 8, 13, 21, 35] (https://eval.in/390739)
chihhsin has joined #ruby
<Ox0dea> I think that's neat.
<sevenseacat> o.o
CloCkWeRX has joined #ruby
serivichi has joined #ruby
<Radar> Too bad the last number is wrong.
<Ox0dea> God-damned floating point.
<Ox0dea> Essentially, you can just keep adding a 9 at either end of the divisor to get more and more Fibonacci numbers.
<sevenseacat> thats..... I am amazed.
<sevenseacat> who *finds* this shit?
<sevenseacat> and *how*?
<Ox0dea> Math is frighteningly elegant.
bruno- has joined #ruby
nfk has quit [Quit: yawn]
Jarboe has joined #ruby
auzty has quit [Quit: Leaving]
<Ox0dea> I can't make BigDecimal do the big one. :/
<Ox0dea> >> require 'bigdecimal'; (BigDecimal.new('1', 10000) / 999999999999999999999998999999999999999999999999).to_s('F').size
<ruboto> Ox0dea # => 146 (https://eval.in/390751)
Aryasam has joined #ruby
jeanlinux has joined #ruby
<Ox0dea> > A limit of 0, the default, means no upper limit.
aphprentice_ has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
pengin has quit [Remote host closed the connection]
cb__ has joined #ruby
cb__ has joined #ruby
jeanlinux has quit [Ping timeout: 246 seconds]
<Ox0dea> >> require 'bigdecimal'; BigDecimal.new('1').div(('9'*47).tap{|s|s[23,0]='8'}.to_i, 1000).to_s('F').scan(/\d{24}/).map(&:to_i)
AHMED- has joined #ruby
<ruboto> Ox0dea # => [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17 ...check link for more (https://eval.in/390752)
maletor has quit [Quit: Computer has gone to sleep.]
AHMED- has left #ruby [#ruby]
cb__ has quit [Remote host closed the connection]
<sevenseacat> cripes.
Musashi007 has quit [Quit: Musashi007]
<Nilium> Oh dear, is Ox0dea doing it again
<Ox0dea> Nilium: You missed it.
<Nilium> I se
<Nilium> e
<Aeyrix> Nilium: You say that like it's a bad thing.
<Nilium> RPN...
<Aeyrix> I think it's hilarious.
<Nilium> At this point, I think this might be what I look forward to when I come home from work.
dgutierrez1287 has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
oo_ has quit [Remote host closed the connection]
grey_beards has quit [Ping timeout: 244 seconds]
grey_beard has joined #ruby
jtdoncas has joined #ruby
casadei has quit [Remote host closed the connection]
<gambl0re> is ruby similar to python?
<gambl0re> did they copy python?
charliesome has joined #ruby
bf4 has joined #ruby
<Aeyrix> yes
<Nilium> Yes. Obviously.
<Aeyrix> it copied python p hard
<sevenseacat> yes and no.
<Aeyrix> sevenseacat: lol it's 100% python
<Aeyrix> obviously
<Nilium> Ruby is actually implemented in PHP.
<Aeyrix> self.selfselfselfself(self)
<Aeyrix> Nilium: Everyone I know uses the variant implemented in Erlang though.
<Aeyrix> It's faster.
<Nilium> I know a few people using the runtime that was implemented in asm.php
<Aeyrix> Wow really?
<Aeyrix> I should get on that.
<Nilium> Supposedly it's web scale.
<Aeyrix> Pure assembly, wow.
<gambl0re> why did ruby decide to copy pyhthon?
<gambl0re> for what reason specifically?
<sevenseacat> sigh
<Aeyrix> Python was a dumb name.
chouhoulis has joined #ruby
<sevenseacat> let's not be too stupid. Ruby did not 'copy python'.
<Nilium> They decided that calling themselves pythonistas was really stuck and honestly insane, so they renamed it and changed the syntax.
<Nilium> *stuck up
<Aeyrix> Nilium: kek
cashnguns has joined #ruby
<Aeyrix> So now we call ourselves Rubyists.
<Aeyrix> :>
<gambl0re> they syntax is very simialr i noticed...
<Nilium> That's why Go copied Ruby and started calling themselves gophers, just to be ironic.
<sevenseacat> it's not.
<Aeyrix> gambl0re: Somewhat, but that's a side effect of being easy to read.
<Nilium> And then PHP copied Go.
<Aeyrix> It's not super similar, you'd be surprised.
_kfpratt has quit [Read error: Connection reset by peer]
<Nilium> I just assume anyone saying Ruby copied something is not sincere in their questioning.
<Aeyrix> Same.
<Nilium> Oh, for the first time today someone saw my left leg and asked what happened to it
<Nilium> I've been waiting 26 years for someone to do that
oo_ has joined #ruby
<Aeyrix> What happened to it?
<sevenseacat> err, whats with your left leg?
<Nilium> Well, I was born, and that happened to it
<Aeyrix> You don't have a left leg?
<Aeyrix> Are you all right now?
<Aeyrix> :^)
<Nilium> The skin color on it is different from the rest of my body.
<Aeyrix> o
<Aeyrix> I got nothing.
<Nilium> Not like drastically different, but it's either all red or all purple most of the time.
<Aeyrix> Birthmark
<Aeyrix> ye?
<Nilium> Yes.
<Nilium> Port-wine stain or whatever.
chouhoulis has quit [Ping timeout: 255 seconds]
kfpratt has joined #ruby
<Aeyrix> ye
<Nilium> I rarely wear shorts, so most people never see it.
<Aeyrix> I don't wear shorts either, but just because I prefer longer pants.
<Nilium> But it's too freakin' hot lately
<Aeyrix> Despite the fact that shorts are
<Aeyrix> comfy
<Aeyrix> and easy to wear
jbw has quit [Ping timeout: 244 seconds]
<Nilium> ಠ_ಠ
<Aeyrix> I still prefer longer pants.
<Aeyrix> :^)
<Aeyrix> Python vs Ruby.
<Aeyrix> Just a very, very simple example.
drewvanstone has joined #ruby
<Nilium> Needs more generators
<Aeyrix> I picked literally the simplest example I can think of that didn't involve memes.
ooesili has joined #ruby
sharpmachine has joined #ruby
bmurt has joined #ruby
jbw has joined #ruby
sankaber has quit [Quit: Textual IRC Client: www.textualapp.com]
<Nilium> >> puts %w[ banana apple mango ].map { |f| "Current fruit: #{f}" }
<ruboto> Nilium # => Current fruit: banana ...check link for more (https://eval.in/390754)
dgutierrez1287 has quit [Remote host closed the connection]
<Aeyrix> >> 10.times do |That's a fucking mess though.
<ruboto> Aeyrix # => /tmp/execpad-a9b6f85c95d5/source-a9b6f85c95d5:2: formal argument cannot be a constant ...check link for more (https://eval.in/390755)
<Aeyrix> Wow what
<Aeyrix> lmao
<Aeyrix> thanks clipboard
<Aeyrix> >> 10.times {|i| puts i }
<ruboto> Aeyrix # => 0 ...check link for more (https://eval.in/390756)
<Aeyrix> nothing like that in Python. :^)
<Nilium> I think you could do print("\n".join("Current fruit: %s" % f for f in ['banana', 'apple', 'mango'])) in python
<sevenseacat> jesus wtf is that
<Nilium> I don't remember what the not-politically-volatile string formatting thing in Python is
<Aeyrix> absolutelydisgusting.jpg
<Ox0dea> ^
<Aeyrix> We need a bot that takes those and turns them into images.
<Ox0dea> The keyboard I use doesn't have any numbers or letters on it, so I have to go to great lengths to copy the characters I need when programming in Python.
<Ox0dea> Ruby, of course does not give me that problem.
<Aeyrix> lmao
<sevenseacat> lol
<Nilium> I see you follow the _why school of keyboarding.
sharpmachine has quit [Ping timeout: 264 seconds]
<Aeyrix> When Ox does a oneliner it's awesome, when anyone does a Python oneliner it's horrendous.
<Aeyrix> Also lol mandatory whitespace
<sevenseacat> i dont mind mandatory whitespace.
<Nilium> I do, but that's just because I prefer curly braces
<Aeyrix> Encouraged but not mandatory.
chipotle has quit [Quit: cheerio]
<Aeyrix> I can also see why tabs are a good idea.
<Nilium> I think Python has a flag that lets you use curly braces
<Aeyrix> It means you can allow people to set their own indentation width.
<Ox0dea> Nilium: It's a joke.
<Aeyrix> If someone wants to read a codebase with indentation set to eight spaces, more power to them.
<Nilium> Ox0dea: Nothing is a joke if I can turn it on
<sevenseacat> but then people inevitably mix tabs and spaces, and shit goes to hell.
<Ox0dea> >>> from __future__ import braces
<ruboto> Ox0dea # => /tmp/execpad-f17f2045b445/source-f17f2045b445:2: syntax error, unexpected '>' ...check link for more (https://eval.in/390757)
chipotle has joined #ruby
<Ox0dea> File "<stdin>", line 1
<Ox0dea> SyntaxError: not a chance
chipotle has quit [Client Quit]
<Ox0dea> Sorry.
<Nilium> Can you catch it?
<Aeyrix> sevenseacat: There's a git flag for that.
ejnahc_ has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
<Aeyrix> sevenseacat: Which imo should be default.
<slash_nick> Aeyrix: can you point me to that?
<Nilium> Insert my usual praise for gofmt here
sdothum has quit [Ping timeout: 264 seconds]
<Ox0dea> Nilium: It doesn't actually import anything...
<Nilium> Ox0dea: I'll make it ಠ_ಠ
<Nilium> If I can give Python people nightmares, it's worth it.
symm- has quit [Ping timeout: 248 seconds]
<Aeyrix> slash_nick: Courtesy of a friend - https://gist.github.com/eevee/6721177
ejnahc has joined #ruby
<Ox0dea> Aeyrix: Do you know Alex well?
<Aeyrix> They're pretty cool, I wish I knew them better.
<Aeyrix> But unfortunately I don't use Python enough to interact beyond Twitter. :P
<Aeyrix> Other than the Pokemon stuff.
<slash_nick> Aeyrix: neat... i don't have any real need for it right now, but it piqued my curiousity
<Aeyrix> I used to idle on Veekun IRC a lot but I had little in way of contribution.
bmurt has quit []
<Aeyrix> Ox0dea: You?
<Ox0dea> I've spoken with him on occasion.
<Ox0dea> We got into a spat about Ruby vs. Python many moons ago.
<Aeyrix> I can imagine you would.
<Aeyrix> Alex is a major python fan.
<Ox0dea> It seems he doesn't hate Ruby, but Python just "fits his brain" better.
<Aeyrix> Pretty much.
towski_ has quit [Remote host closed the connection]
<Ox0dea> Aeyrix: Dat love pentagon doe.
<Aeyrix> I think that uh
<Aeyrix> cleaned up a bit
<Aeyrix> i'm not sure
<Ox0dea> Ah.
* Aeyrix checks
<Ox0dea> I have no idea how such a thing could be sustained.
lessless has joined #ruby
<Aeyrix> Ox0dea: Nope, still there.
<Aeyrix> Neither, but props for making it work.
TheHodge has quit [Quit: Connection closed for inactivity]
<sevenseacat> "I live in Las Vegas with my ridiculous cat, my partner, her three cats, her husband, his dog, and our boyfriend." wow
bradleyp_ has joined #ruby
<sevenseacat> I got nothin.
bradleyprice has quit [Ping timeout: 265 seconds]
Musashi007 has joined #ruby
ivanskie has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
<Ox0dea> sevenseacat: Heh, I forgot that it was a graph.
<Ox0dea> So, five nodes, but not exactly a pentagon.
darkf has joined #ruby
dopie has joined #ruby
<Ox0dea> Five edges, rather.
bradleyprice has joined #ruby
SpikeMaster has joined #ruby
* sevenseacat trying to wrap brain around that
<Ox0dea> Well, there are four people involved, but one of them ("our boyfriend") is connected twice.
<sevenseacat> the husband must be a hell of a voyeur.
SpikeMaster has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
bonhoeffer has quit [Quit: bonhoeffer]
ramfjord has quit [Ping timeout: 255 seconds]
eggoez has joined #ruby
<Ox0dea> However you cut it, Eevee's an interesting fella.
<sevenseacat> sounds like it
bradleyp_ has quit [Ping timeout: 265 seconds]
jack_rabbit has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
sarkyniin has quit [Ping timeout: 244 seconds]
ryba has joined #ruby
baweaver has joined #ruby
sankaber has joined #ruby
RegulationD has joined #ruby
scx_ has joined #ruby
ravensky987 has joined #ruby
Aryasam has quit [Ping timeout: 256 seconds]
ooesili has quit [Quit: leaving]
Trynemjoel has quit [Quit: Quitting]
konsolebox has joined #ruby
cb_ has joined #ruby
cb_ has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
isxek has quit [Ping timeout: 246 seconds]
bf4 has quit [Ping timeout: 276 seconds]
vdamewood has joined #ruby
isxek has joined #ruby
scx has quit [Ping timeout: 244 seconds]
braincrash has quit [Quit: bye bye]
RegulationD has quit [Ping timeout: 248 seconds]
northfurr has joined #ruby
zacstewart has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeanlinux has joined #ruby
Trynemjoel has joined #ruby
mrmargolis has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 276 seconds]
cb_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
braincrash has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Atomic has quit [Ping timeout: 264 seconds]
Musashi007 has joined #ruby
jeanlinux has quit [Ping timeout: 244 seconds]
s2013 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 265 seconds]
cb__ has joined #ruby
cb__ has quit [Changing host]
cb__ has joined #ruby
freerobby has quit [Quit: Leaving.]
cb__ has quit [Remote host closed the connection]
zacstewart has joined #ruby
yayfoxes has quit [Quit: WeeChat 1.0.1]
serivichi has quit [Quit: Leaving]
sarkyniin has joined #ruby
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pdoherty has quit [Quit: Leaving]
<nofxx> there this sign cmd tool that asks for password, I'm calling it via rake sh('command...) It's possible to send something to the command STDIN?
j4cknewt has joined #ruby
benlieb_ has quit [Quit: benlieb_]
ravensky987 has left #ruby ["Leaving"]
<nofxx> using #sh... or I'm going to need popen
<meatchicken> is there a performance difference between a method and a stored proc?
<Ox0dea> nofxx: Are you opposed to just using a pipe in the #sh call?
<nofxx> meatchicken, benchmark a million and let us now. bmbm {}
vikaton has quit []
<meatchicken> nofxx, good call
ramfjord has joined #ruby
<nofxx> Ox0dea, I admit, my dark side shell skills are rusty. Thank, think I got the idea.
hahuang65 has joined #ruby
gix has quit [Ping timeout: 256 seconds]
benlieb has quit [Ping timeout: 256 seconds]
<Ox0dea> nofxx: It's not the greatest, but sh("#{input} | command") should do in a pinch.
kfpratt has quit [Read error: Connection reset by peer]
gix has joined #ruby
<Ox0dea> meatchicken: It's unclear what exactly you might've meant by "stored proc", but this should be informative either way: https://gist.github.com/0x0dea/1fb2ef1796ce4a3e8dc5
yfeldblum has joined #ruby
dgutierrez1287 has joined #ruby
jhooker has joined #ruby
zacstewart has quit [Ping timeout: 248 seconds]
kfpratt has joined #ruby
sharpmachine has joined #ruby
isxek has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: zzz]
sharpmachine has quit [Ping timeout: 248 seconds]
zacstewart has joined #ruby
d0lph1n98 has joined #ruby
Lucky___ has joined #ruby
bmurt has joined #ruby
<meatchicken> nofxx, thanks. Proc is almost double slower
zacstewart has quit [Ping timeout: 244 seconds]
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
Eiam_ has joined #ruby
santana has joined #ruby
ponga has joined #ruby
<jfarmer> meatchicken Why do you think Proc.call is so much slower than calling a method directly?
<jfarmer> Assuming that's what you're benchmarking.
<meatchicken> jfarmer, there's probably interpreter optimizations for calling a method
<meatchicken> vs an object-based proc?
<meatchicken> :P that would be my guess
<jfarmer> e.g., "def test1; return nil; end" and "test1()" vs. "test2 = Proc.new { nil }" and "test2.call()"
<jfarmer> Sure.
danielpclark has quit [Ping timeout: 246 seconds]
<meatchicken> Wait
<meatchicken> jfarmer,
<meatchicken> I don't instantiate the proc
<Ox0dea> meatchicken: You really should use benchmark/ips.
<jfarmer> Yes you do.
<meatchicken> in the benchmark
<meatchicken> what is ips?
<Ox0dea> Instructions per second.
hahuang65 has quit [Quit: WeeChat 1.2]
bruno- has joined #ruby
<meatchicken> Ox0dea, I'll take a look at it - is it in the benchmark module?
<Ox0dea> No, it's a gem.
<meatchicken> jfarmer, for my use-case -> the proc will be pre-declared
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jfarmer> meatchicken Yes, that's what I was assuming you meant.
<meatchicken> thanks guys
<meatchicken> I'll take a look at ips
pontiki is now known as tamouse__
Musashi007 has quit [Quit: Musashi007]
Marisa_ has joined #ruby
jtdoncas has quit [Ping timeout: 276 seconds]
hahuang65 has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Client Quit]
Marisa_ has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby
RegulationD has joined #ruby
djbkd has quit [Quit: My people need me...]
Spami has joined #ruby
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
hahuang65 has joined #ruby
drewvanstone has quit [Ping timeout: 255 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
m3_del has joined #ruby
jpfuentes2 has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
danielpclark has joined #ruby
shadoi has joined #ruby
icosa1 has joined #ruby
shadoi has quit [Client Quit]
hahuang65 has quit [Ping timeout: 256 seconds]
futilegames has joined #ruby
jpfuentes2 has quit [Ping timeout: 244 seconds]
swgillespie has joined #ruby
qiukun has joined #ruby
zacstewart has joined #ruby
frem has joined #ruby
EllisTAA has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
braincra- has joined #ruby
MatthewsFace has joined #ruby
towski_ has joined #ruby
braincrash has quit [Ping timeout: 246 seconds]
Deele has joined #ruby
chinmay_dd has joined #ruby
drefined has joined #ruby
tamouse__ has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
chinmay_dd has quit [Remote host closed the connection]
EllisTAA has quit [Quit: EllisTAA]
bmurt has quit []
stoodfarback has joined #ruby
msgodf has quit [Ping timeout: 256 seconds]
kfpratt has quit [Read error: Connection reset by peer]
kfpratt has joined #ruby
qiukun has quit [Quit: qiukun]
jenrzzz has joined #ruby
ledestin has joined #ruby
sharpmachine has joined #ruby
EllisTAA has joined #ruby
zacstewart has quit [Ping timeout: 246 seconds]
northfurr has quit [Quit: northfurr]
sharpmachine has quit [Ping timeout: 256 seconds]
peter_paule has joined #ruby
MrJiks has joined #ruby
<MrJiks> Is there a pastebin like too for this channel? I saw something similar in nginx channel
<sevenseacat> see the channel topic
<momomomomo> use gist.github.com
<momomomomo> !topic
fella6s has quit [Ping timeout: 250 seconds]
peter_paule has quit [Ping timeout: 256 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
kfpratt has quit [Read error: Connection reset by peer]
kfpratt has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sembei has joined #ruby
eggoez has quit [Ping timeout: 246 seconds]
MatthewsFace has quit [Ping timeout: 248 seconds]
Pisuke has quit [Ping timeout: 276 seconds]
EllisTAA has quit [Quit: EllisTAA]
Xeago has joined #ruby
klaas_ is now known as klaas
<havenwood> ?gist
<ruboto> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
yosafbridge has quit [Quit: Leaving]
eggoez has joined #ruby
v0n has quit [Quit: WeeChat 1.0.1]
m3_del has quit [Remote host closed the connection]
<konsolebox> quick question: in irb, main is an instance of Object correct? just need verification
mrmargolis has joined #ruby
jeanlinux has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> >> self.instance_of? Object
<ruboto> havenwood # => true (https://eval.in/390780)
Xeago has quit [Ping timeout: 252 seconds]
jaygen_ has joined #ruby
<havenwood> >> self
<ruboto> havenwood # => main (https://eval.in/390781)
<konsolebox> havenwood: thanks. no need for the link self.instance_of? or even just self was all i needed to remember :) lol pretty obvious :)
keen___________9 has joined #ruby
kies^ has joined #ruby
<jfarmer> konsolebox Virtually every object in Ruby is an instance of Object
<havenwood> konsolebox: I thought maybe you didn't know how to check yourself since you're asking.
<Ox0dea> jfarmer: "Virtually"?
<Ox0dea> Everything you can call a method on is an instance of Object.
jaygen has quit [Ping timeout: 244 seconds]
<havenwood> >> BasicObject.instance_of? Object
<ruboto> havenwood # => false (https://eval.in/390782)
<jfarmer> BasicObject
<jfarmer> Yeah
<Ox0dea> >> BasicObject.is_a?(Object)
jeanlinux has quit [Ping timeout: 252 seconds]
<ruboto> Ox0dea # => true (https://eval.in/390783)
<jfarmer> An instance of BasicObject wouldn't be descended from Object
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
mrmargolis has quit [Ping timeout: 256 seconds]
keen___________8 has quit [Ping timeout: 256 seconds]
<jfarmer> In fact, there wouldn't even be an is_a? method
<jfarmer> >> BasicObject.new.is_a?(Object)
<ruboto> jfarmer # => undefined method `is_a?' for #<BasicObject:0x421b4350> (NoMethodError) ...check link for more (https://eval.in/390784)
zacstewart has joined #ruby
bluOxigen has joined #ruby
ponga has quit []
<Ox0dea> Well, 2.3 provides BasicObject.instance, which is_a? Object.
yosafbridge has joined #ruby
sarkyniin has quit [Ping timeout: 276 seconds]
<jfarmer> what the what
<Ox0dea> Hm?
* jfarmer shrugs.
workmad3 has joined #ruby
qiukun has joined #ruby
ferr has joined #ruby
<jfarmer> konsolebox Net of it is: every referenceable thing you'll deal with in practice is an instance of Object
<jfarmer> I feel like if I said "Every object in Ruby is an instance of Object" someone else would've just piped up and said, "Nut uh! What about BasicObject?!?" Haha.
<konsolebox> jfarmer: i know the deep concepts of Objects and Classes. just forgot about self :)
skade has joined #ruby
<Ox0dea> konsolebox: That sounds oxymoronic.
<konsolebox> >> self.class
<ruboto> konsolebox # => Object (https://eval.in/390787)
<jfarmer> konsolebox Yeah, when you're in irb you're in a sort of Object-shaped snow globe.
penzur has joined #ruby
ponga has joined #ruby
<jfarmer> Pretty literally, since irb is evaluating what you type in the context of some ad hoc Object it creates (I don't know the details).
<Ox0dea> self is main at the top level whether or not you're in irb.
<konsolebox> jfarmer: i actually just need to base it for evaluating user-input code
<jfarmer> Oh, huh. Not sure why I never realized that.
krz has joined #ruby
txdv has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Ping timeout: 248 seconds]
psyprus has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
<konsolebox> Ox0dea, jfarmer: now i'm looking for a default global reference to main, and see if i wouldn't need to have $main = self in ::
EasyCo has joined #ruby
jhooker has quit [Ping timeout: 248 seconds]
<jfarmer> (spidey sense is tingling)
<jfarmer> (on high alert)
zacstewart has quit [Ping timeout: 276 seconds]
<konsolebox> because the "evaluator" is in a module
psyprus has joined #ruby
futilegames has quit [Quit: futilegames]
<Ox0dea> Oh, boy.
<Ox0dea> You shouldn't need that, but of course I'm going to help you find a way.
<baweaver> naturally
<jfarmer> hahaha
Musashi007 has joined #ruby
<Ox0dea> >> class<<self;undef to_s end;def method_missing(m,*a)a.shift.send(m,*a)end; to_i(reverse(to_s(123, 13)))
<ruboto> Ox0dea # => 69 (https://eval.in/390788)
* baweaver couldn't help it
<Ox0dea> We Lisp yet?
<sevenseacat> lol
<jfarmer> konsolebox Waving security and sandboxing issues aside, when you're evaluating dynamically generated code you want to use something like module_eval
<konsolebox> jfarmer: i thought so
<jfarmer> (that's a big wave, too)
snockerton has joined #ruby
<konsolebox> jfarmer: first, the application has same level as common userland applications. second it doesn't escalate privileges.
<Ox0dea> konsolebox: That means it can nerf $HOME.
MatthewsFace has joined #ruby
<baweaver> well that killed pry
dseitz has joined #ruby
<konsolebox> Ox0dea: well, the user has access to $HOME anyway
<jfarmer> konsolebox Yeah, if you're "serious" about this you need isolation at other levels, too.
<jfarmer> As an example...
<konsolebox> i don't believe much in application-level security
<jfarmer> For a long time on Heroku, you could do "console.log(system('ps aux'))"
haraoka has joined #ruby
<jfarmer> And see a list of other running processes, go ferret around in their code, and so on
frenda has joined #ruby
<ruboto> baweaver # => (https://eval.in/390789)
<konsolebox> guys i'm just porting this software :) http://sourceforge.net/projects/playshell/
<baweaver> hm
<konsolebox> security is not essential to it
<Ox0dea> baweaver: It doesn't network.
<baweaver> drat
<jfarmer> it's a regular wall flower
<baweaver> I was going to shim a microlisp into gist and load it
<Ox0dea> Methinks we could use a few more evaluators around here.
<konsolebox> irb does eval, should you hate it?
<baweaver> yes
<baweaver> pry is better :D
<frenda> http://stackoverflow.com/a/1665023/2871967 --> Here is told to link /var/lib/gem/1.8/... to the PATH. but in my machin I think gems are installed in ~/.gem folder. How can I add it? It's because I get this error when I'm gong to run `rake db:create db:migrate db:seed`
<frenda> bash: rake: command not found
<Ox0dea> frenda: export PATH=~/.gem:$PATH
<Ox0dea> Put that in your .bash_profile, then logout and log back in.
<jfarmer> frenda Any time you're reading an answer on the web be sensitive to the date / timestamp
<frenda> bash_profile or .bashrc! my bash_profile is empty?!
arescorpio has quit [Quit: Leaving.]
<jfarmer> That answer was posted in 2009 and that alone means the risk of the information being wildly incorrect or out of date is very high.
jenrzzz has quit [Ping timeout: 252 seconds]
<Ox0dea> frenda: You get to un-empty it, then! :)
<snockerton> in irb, how can I see what objects are instantiated in memory?
<Ox0dea> frenda: You'll need to go into ~/.gem and figure out the exact path to its bin/ directory, though.
<Ox0dea> That's the one you'll want to prepend to your $PATH.
<jfarmer> snockerton There are a lot, so you likely are looking to ask a more specific question. But broadly the ObjectSpace module gives you access to that sort of thing.
<frenda> So you mean : <package manager> install rake? @lfarmer
<jfarmer> frenda "gem install rake"
jeanlinux has joined #ruby
<jfarmer> If your development environment is set up correctly, that's all that should be necessary.
jeanlinux has quit [Read error: Connection reset by peer]
jeanlinux has joined #ruby
<jfarmer> frenda But more broadly, just saying: if you're reading some blog post or SA answer pay close attention to the date.
niemcu has joined #ruby
<jfarmer> It's almost always the first thing I look at.
<frenda> By "gem install rake" it solvesd. @jfarmer. tnx
<jfarmer> well that's a pleasant surprise haha
Xzanron has joined #ruby
djbkd has joined #ruby
<frenda> And 'rails server'! Is it somthing install-able by `gem install`?
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<snockerton> jfarmer: exactly what i'm looking for, thanks
MikeGib has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<jfarmer> frenda Actually, start here: http://guides.rubygems.org/
<jfarmer> Oh, that's a weird order.
<frenda> yes, ok
frenda has left #ruby [#ruby]
<jfarmer> Having "RubyGems Basics" before "What is a Gem?" haha
revath has joined #ruby
jeanlinu_ has joined #ruby
jeanlinux has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
astrobunny has joined #ruby
futilegames has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
cb__ has joined #ruby
fsvehla has joined #ruby
sharpmachine has joined #ruby
jfarmer has quit []
fella5s has joined #ruby
tlarevo has joined #ruby
abuzze has joined #ruby
tlarevo has quit [Client Quit]
SOLDIERz has joined #ruby
<konsolebox> so elementary concepts aside, there's no other way to refer to main from a module or another object's context other than by saving it on a global variable or constant?
Channel6 has quit [Quit: Leaving]
<baweaver> binding
drefined has quit [Quit: Textual IRC Client: www.textualapp.com]
sharpmachine has quit [Ping timeout: 252 seconds]
jlast has quit [Ping timeout: 246 seconds]
niemcu has quit [Ping timeout: 246 seconds]
j4cknewt has quit [Remote host closed the connection]
towski_ has quit [Remote host closed the connection]
<Ox0dea> >> ObjectSpace.each_object.find { |x| !x.is_a?(String) && x.to_s == 'main' rescue next }
<ruboto> Ox0dea # => main (https://eval.in/390798)
<Ox0dea> konsolebox: ^
tagrudev has joined #ruby
ahmetkapikiran has joined #ruby
<konsolebox> Ox0dea: that's a pretty good one thanks.
j4cknewt has joined #ruby
<flughafen> morning everybody
<konsolebox> Ox0dea: so it's official that main.to_s is 'main'?
<Ox0dea> konsolebox: Yes.
<Ox0dea> >> self.to_s
<ruboto> Ox0dea # => "main" (https://eval.in/390801)
<konsolebox> Ox0dea: ok that's one i need. thank you for helping again :)
<Ox0dea> 18>> self.to_s
<ruboto> Ox0dea # => "main" (https://eval.in/390802)
<Ox0dea> konsolebox: My pleasure.
<Ox0dea> konsolebox: You may want to reverse the order of the condition if you'll be calling this a lot.
revath has quit [Read error: Connection reset by peer]
<Ox0dea> There are fewer things which #to_s to 'main' than there are Strings, I'm sure.
MrJiks has quit [Ping timeout: 244 seconds]
revath has joined #ruby
havenwood has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> Nah, I guess it doesn't matter all that much; main is bound to appear quite early in the list.
qiukun has quit [Quit: qiukun]
<konsolebox> Ox0dea: no i'll just need to call it once. i could save it on a class variable. i just don't like running the code somewhere globally, or passing it as an argument to main()
MatthewsFace has quit [Remote host closed the connection]
cb__ has quit []
Jarboe has quit []
yardenbar has joined #ruby
revath has quit [Quit: Leaving.]
eGGsha has joined #ruby
revath has joined #ruby
davedev2_ has quit [Remote host closed the connection]
davedev24_ has joined #ruby
chinmay_dd has joined #ruby
qiukun has joined #ruby
duncannz has quit [Ping timeout: 250 seconds]
olistik has joined #ruby
speaking1ode has joined #ruby
davedev24_ has quit [Ping timeout: 248 seconds]
<konsolebox> >> ObjectSpace.each_object.find{ |o| o.class == ::Object and o.to_s == 'main' }.object_id == self.object_id
<ruboto> konsolebox # => true (https://eval.in/390805)
jeanlinu_ has quit [Remote host closed the connection]
jeanlinux has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
jeanlinux has quit [Remote host closed the connection]
jeanlinux has joined #ruby
<Ox0dea> >> TOPLEVEL_BINDING.receiver
<ruboto> Ox0dea # => main (https://eval.in/390807)
<Ox0dea> konsolebox: ^
<Ox0dea> Now I feel silly.
snockerton has quit [Quit: Leaving.]
jeanlinux has quit [Ping timeout: 256 seconds]
<Ox0dea> >> class Foo; def bar; TOPLEVEL_BINDING.receiver end end; Foo.new.bar.object_id == object_id
<ruboto> Ox0dea # => true (https://eval.in/390808)
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
solars has joined #ruby
oo_ has quit [Remote host closed the connection]
pen has joined #ruby
AlexAltea has quit [Ping timeout: 252 seconds]
roolo_ has quit [Remote host closed the connection]
sigurding has joined #ruby
psyprus has quit [Read error: Connection reset by peer]
Xiti has quit [Quit: Xiti]
yfeldblum has joined #ruby
psyprus has joined #ruby
Xiti has joined #ruby
_ht has joined #ruby
cb_ has joined #ruby
<SOLDIERz> hello everyone is somebody using chruby from postmodern?
<konsolebox> Ox0dea: i get undefined method `receiver' for #<Binding:0x000000023fbc48> (NoMethodError). is there anything i should 'require'?
isxek has joined #ruby
<tbuehlmann> SOLDIERz, yup!
<Ox0dea> konsolebox: You're using an old version of Ruby. :/
<havenwood> SOLDIERz: Have a chruby question?
riotjones has joined #ruby
oliver_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
<konsolebox> Ox0dea: needs ruby 22 :) my minimum is 2.0 :) i think i'll just use the former
howdoi has joined #ruby
<Ox0dea> konsolebox: You could do `TOPLEVEL_BINDING.eval('self')`.
Xeago has joined #ruby
<havenwood> >> TOPLEVEL_BINDING.receiver
<ruboto> havenwood # => main (https://eval.in/390828)
<SOLDIERz> tbuehlmann havenwood Yes. I got the following problem. Got a system where I installed multiple ruby version via RPM (CentOS-System) after updating from one ruby tiny version to another so let's say in my example from 2.2.1 to 2.2.2. I got a really weird issue all the time
Asher has joined #ruby
<SOLDIERz> after changing the version with chruby it is bothering me with error while loading shared libraries: libruby.so.2.2 cannot open shared object file: No such file or directory
GnuYawk has quit [Quit: WeeChat 1.0]
GnuYawk has joined #ruby
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
<SOLDIERz> and I don't know why but for some reason chruby is not setting paths correctly
mike___1234 has joined #ruby
sandstrom has joined #ruby
<konsolebox> Ox0dea: yes i could use it too, and perhaps use the former method as fall back if it turns out to be still needed
ivanskie has joined #ruby
kies^ has quit [Ping timeout: 265 seconds]
psyprus has quit [Ping timeout: 248 seconds]
msgodf has joined #ruby
psyprus has joined #ruby
tonini_ is now known as tonini
Xeago has quit [Remote host closed the connection]
<Ox0dea> konsolebox: Either way, I'm happy to have discovered so many alternate ways of obtaining main. :)
<isxek> I'm using this script to filter for email addresses to include in our blacklist: http://pastebin.com/KPcV75gM . However, after running uniq! on the matches array, the output still shows duplicate values. Any suggestions?
<ruboto> isxek, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/4e0eede703ee67bff478
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<isxek> well, that was fast
<isxek> first time posting to #ruby, sorry
arup_r has joined #ruby
djbkd has quit [Quit: Leaving...]
<Ox0dea> isxek: Are you sure you want #uniq!? It returns nil if the array was already unique.
sharpmachine has joined #ruby
<Ox0dea> >> [[1,2,1].uniq, [1,2].uniq!] #=> [[1, 2], nil]
<ruboto> Ox0dea # => [[1, 2], nil] (https://eval.in/390843)
<isxek> 0x0dea: I've tried just plain uniq, but I'm getting the same results.
<stoodfarback> I got curios from earlier conversation, so I looked up where `main` is defined. Might be interesting for someone else as well: https://github.com/ruby/ruby/blob/ruby_2_2/vm.c#L2820
<stoodfarback> *curious
<shevy> isxek .uniq! will modify in place; in your example, .uniq should be what you may want to have
jlast has joined #ruby
oo_ has joined #ruby
<shevy> btw if you try to obtain all matches, perhaps you want .scan ?
ylluminarious has quit [Ping timeout: 250 seconds]
pithagora has joined #ruby
rhg135 has quit [Ping timeout: 255 seconds]
dopie has quit [Quit: This computer has gone to sleep]
arup_r_ has joined #ruby
* isxek takes a look at ruby docs
Xeago has joined #ruby
<Ox0dea> isxek: The problem is that you're storing the MatchData objects into the matches array.
<Ox0dea> These are going to be different even if they matched the same string.
sharpmachine has quit [Ping timeout: 264 seconds]
futilegames has quit [Quit: futilegames]
skade has joined #ruby
<Ox0dea> As shevy suggested, you'd probably be fine just doing `ARGF.read.scan(pattern).uniq`.
penzur has quit [Read error: Connection reset by peer]
<isxek> 0x0dea: looks like #scan was exactly what I needed. thanks to you both!
arup_r has quit [Ping timeout: 255 seconds]
lessless has joined #ruby
<pithagora> hey all. how can i extract the host port from array entries in such a format https://gist.github.com/vbrinza/d8f285cc1c187b9a3f1d ?
<havenwood> SOLDIERz: You're getting that error with gems you installed on the Ruby before upgrading?
haraoka has quit [Ping timeout: 264 seconds]
wookiehangover has quit [Ping timeout: 248 seconds]
<shevy> sphex huh, they have no underscore?
<shevy> ah no
<SOLDIERz> havenwood no after upgrading
<shevy> it's just shift free
<havenwood> SOLDIERz: Show the full error? The command you're running and all?
<shevy> the traditional keyboards are indeed not really the most intelligent thing... caps lock... how useful is it
<sphex> shevy: they have easier to type underscores. supposedly the key layout of japanese keyboards matches ruby really well.
dopie has joined #ruby
<apeiros> sphex: got a twitter handle?
<sphex> nope
<SOLDIERz> havenwood I'm running: chruby ruby-<%version%> and then it's returning me error while loading shared libraries: libruby.so.2.2 cannot open shared object file: No such file or directory
Xeago has quit [Read error: Connection reset by peer]
<apeiros> well then, "via sphex on freenode IRC"
<shevy> sphex yeah that is also good
<sphex> hehe, alright!
<havenwood> SOLDIERz: So?: chruby ruby-2.2
<SOLDIERz> yeap
ndrei has joined #ruby
allomov has joined #ruby
mrmargolis has joined #ruby
<isxek> 0x0dea: holy crap, that reduced my script to ~6 lines
fabrice31 has joined #ruby
<Ox0dea> isxek: Erm... not 2?
abuzze has quit [Ping timeout: 246 seconds]
<havenwood> SOLDIERz: Once Ruby 2.2. is selected, same error with: ruby -e "0"
<Ox0dea> Ah, never mind. Forgot you're printing the results.
<Ox0dea> isxek: Yes, Ruby is quite expressive. :)
<SOLDIERz> havenwood correct
wookiehangover has joined #ruby
<Ox0dea> isxek: Hm... it should just be 4 lines, no?
<havenwood> SOLDIERz: So if you don't source chruby same error?
Tarkers34 has quit [Ping timeout: 264 seconds]
<havenwood> SOLDIERz: If you: /path/to/the/ruby -e "0"
pandaant has joined #ruby
<SOLDIERz> same
<havenwood> SOLDIERz: Seems like an upstream issue with the Ruby package you're using.
<isxek> 0x0dea: reduced to 4 :)
<havenwood> SOLDIERz: How are you installing Ruby? Where are the packages from?
<Ox0dea> isxek: Nice! Probably don't try to go below that, though. :)
pandaant has quit [Remote host closed the connection]
<SOLDIERz> own build rpms with ruby source
mrmargolis has quit [Ping timeout: 264 seconds]
<havenwood> SOLDIERz: Yeah, seems not chruby-related.
msgodf has quit [Ping timeout: 244 seconds]
<SOLDIERz> It also worked before just fine but everytime I update RPMs it doesn't work
<isxek> 0x0dea: does ruby still compile that regex, or is there no need for that?
<SOLDIERz> but the files are there so I don't get it
<isxek> docs says #new is the same as #compile
baweaver has quit [Remote host closed the connection]
wildroman2 has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
<havenwood> SOLDIERz: I think I recall folk running into issues with Rubies being moved as part of the RPM process. Look into the `--enable-shared` flag if you're not already using it.
fabrice31 has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
<havenwood> SOLDIERz: ^ should create libruby.so and work.
fabrice31 has joined #ruby
workmad3 has joined #ruby
<havenwood> CONFIGURE_OPTS=--enable-shared
<Ox0dea> >> [/foo/, Regexp.new('foo'), Regexp.compile('foo')].uniq
<ruboto> Ox0dea # => [/foo/] (https://eval.in/390863)
kfpratt has quit [Read error: Connection reset by peer]
<Ox0dea> isxek: ^ Regexp literals are more idiomatic.
sigurding has joined #ruby
<shevy> :)
kfpratt has joined #ruby
<isxek> certainly looks easier to read
<Ox0dea> isxek: I can't tell if that was sarcasm. :P
Xeago has joined #ruby
eGGsha has joined #ruby
<Ox0dea> Regexes of any significant size tend to be supremely illegible; how you instantiate them will be the least of your worries.
codecop has joined #ruby
abuzze has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
<Ox0dea> Editors tend (or can be made) to highlight regex literals differently than other things, which helps for quickly picking them out.
dgutierrez1287 has joined #ruby
<isxek> Ox0dea: it wasn't sarcasm
<Ox0dea> Then you are becoming one with The Ruby Way.
fabrice31_ has joined #ruby
Kneecaps has joined #ruby
<Ox0dea> The only time you *might* want to resort to Regexp.new is if you're creating a regex from a dynamically constructed string; even then, interpolating (/#{str}/) is probably more common.
<Ox0dea> Alas, the style guide has nothing to say on this matter.
santana has quit [Ping timeout: 264 seconds]
dgutierrez1287 has quit [Ping timeout: 252 seconds]
blue_deref has joined #ruby
niemcu has joined #ruby
gagrio_ has joined #ruby
fabrice31 has quit [Ping timeout: 265 seconds]
<isxek> at any rate, thanks for the leg up - i'm off
<SOLDIERz> havenwood Yeah got that also in my RPM SPEC FILE
dopie has quit [Quit: This computer has gone to sleep]
zacstewart has joined #ruby
alex88 has joined #ruby
isxek has quit [Quit: Page closed]
sandstrom has quit [Quit: My computer has gone to sleep.]
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
cb_ has quit [Remote host closed the connection]
jeanlinux has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
Xeago has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
sigurding has quit [Quit: sigurding]
zacstewart has quit [Ping timeout: 256 seconds]
jeanlinu_ has joined #ruby
sandstrom has quit [Client Quit]
jeanlinux has quit [Read error: Connection reset by peer]
stan has joined #ruby
i8igmac has quit [Ping timeout: 246 seconds]
ahmetkapikiran has joined #ruby
Timba-as has joined #ruby
msgodf has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
jenrzzz has joined #ruby
MrJiks has joined #ruby
ebbflowgo_ has joined #ruby
ebbflowgo has quit [Ping timeout: 265 seconds]
ebbflowgo_ is now known as ebbflowgo
vdamewood has quit [Quit: Life beckons.]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blue_deref has quit [Quit: bbn]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
railsraider has joined #ruby
ryez has joined #ruby
<apeiros> yay! new rubies finally provide a way to figure out where a constant was defined
<apeiros> simply assign a new value and it'll complain and note where the previous definition was :D
<ljarvis> noice
<apeiros> would be nicer if we could programmatically access that information
<Ox0dea> apeiros: This is new?
* apeiros still waiting for ::Introspection
<apeiros> Ox0dea: yes, 2.1 or 2.2+ iirc
<Ox0dea> Huh.
<apeiros> before it only complained
<apeiros> but didn't reveal info about prior definition
dhjondoh has joined #ruby
sandelius has joined #ruby
<shevy> hmm
sigurding has joined #ruby
bruno- has joined #ruby
TinkerTyper has quit [Quit: ZNC restarting...]
revdan has joined #ruby
KC9YDN has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sandstrom has joined #ruby
renderfu_ has joined #ruby
sharpmachine has joined #ruby
KC9YDN has joined #ruby
KC9YDN has quit [Changing host]
KC9YDN has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
zacts has quit [Quit: leaving]
revdan has quit [Read error: Connection reset by peer]
krz has quit [Read error: Connection reset by peer]
anisha has joined #ruby
futilegames has joined #ruby
TinkerTyper has joined #ruby
rdark has joined #ruby
CloCkWeRX has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
Contigi has quit [Read error: Connection reset by peer]
sharpmachine has quit [Ping timeout: 255 seconds]
renderfu_ has quit [Ping timeout: 276 seconds]
nodeworm has joined #ruby
nodeworm has quit [Client Quit]
Contigi has joined #ruby
allomov has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has joined #ruby
nodeworm has joined #ruby
nodeworm has quit [Client Quit]
krz has joined #ruby
revath has left #ruby [#ruby]
Scroff has joined #ruby
Scroff has quit [Remote host closed the connection]
_whitelogger has joined #ruby
<Ox0dea> apeiros: Thanks. As for introspection, is there really anything we can't peek into using one or more of ObjectSpace, RubyVM, or the plethora of metaprogramming methods?
<Ox0dea> But of course.
<apeiros> RubyVM is not portable
<apeiros> ObjectSpace is slow
dumdedum has quit [Ping timeout: 264 seconds]
abyss has joined #ruby
<apeiros> BasicObject is a huge issue
<apeiros> potential method redefinition is a smaller issue
mister_solo has joined #ruby
judofyr has joined #ruby
Zai00 has joined #ruby
ferr has quit [Read error: Connection reset by peer]
chthon has joined #ruby
<zenspider> you're trying to figure out where a const is defined?
<apeiros> yes
<apeiros> wrt Introspection, that's only one thing I'd want, though
chouhoulis has quit [Ping timeout: 264 seconds]
<zenspider> as in, WHO defines it? or where? or?
<apeiros> source_location equivalent
<apeiros> re Introspection: afaik emulating e.g. BasicObject#instance_variables is impossible :-/
arup_r_ has quit [Remote host closed the connection]
penzur has joined #ruby
<Ox0dea> Well, Fiddle probably makes it technically possible, but I wouldn't even know where to begin.
futilegames has quit [Quit: futilegames]
MrJiks has quit [Ping timeout: 248 seconds]
<apeiros> RubyVM probably too
<apeiros> else a native extension might do
speaking1ode has quit [Ping timeout: 255 seconds]
<apeiros> also I'd love a universal_eval, allowing you to set all the scopes individually (binding, self, constant lookup - and I always forget the 4th, got something to do with how `def` works…)
<Ox0dea> It'd be interesting if we could assemble RubyVM::InstructionSequences.
<Ox0dea> zenspider: Is there some way to determine who defines a constant other than ObjectSpace?
aphprentice_ has quit [Ping timeout: 276 seconds]
txdv has joined #ruby
anisha_ has joined #ruby
aphprentice_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
nofxx has quit [Ping timeout: 255 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Quit: Leaving.]
dumdedum has joined #ruby
arquebus has joined #ruby
A205B064 has quit [Ping timeout: 276 seconds]
axl_ has joined #ruby
<Ox0dea> >> Complex.constants(false)
<ruboto> Ox0dea # => [:compatible, :I] (https://eval.in/390994)
<Ox0dea> ^ Huh?
<apeiros> compatible is a nice constant
<apeiros> also fatal
<apeiros> (lowercase first letter too)
<Ox0dea> How?
<apeiros> they cheat
<apeiros> C
speaking1ode has joined #ruby
phutchins1 has joined #ruby
MrJiks has joined #ruby
arquebus has quit [Client Quit]
<yorickpeterse> morning
white_bear has joined #ruby
Scrofff has joined #ruby
wallerdev has quit [Quit: wallerdev]
shoutsid has quit []
mandarinkin has joined #ruby
unshadow has joined #ruby
<zenspider> nope. I got nothing. why do you guys want it?
<Ox0dea> apeiros: I should perhaps clarify that "but of course" conveys the exact opposite of what I meant to say back there.
rikkipitt has joined #ruby
<Ox0dea> zenspider: For introspecting all the things?
Scroff has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
<Ox0dea> apeiros: Oh, never mind; I thought you'd asked if I minded. As you were.
<zenspider> "introspecting" is a tad vague. obviously you can walk all constants all the way down and know their names and values. that IS introspecting.
<zenspider> I really thought that tracepoint might have something for this, but apparently not
arup_r has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
<Ox0dea> zenspider: We can't walk constants, though. We have to walk modules.
<zenspider> modules (and classes) are (usually) bound to a name via a constant
<zenspider> constants + const_get + recusion == walk
<MrJiks> Anybody know whats the seed stage of a starup is? Is it when the product is ready or during the idea inception stage?
lessless has joined #ruby
bruno- has joined #ruby
<zenspider> MrJiks: I thought it was once there was enough mass to start nuclear fission & fusion
<Ox0dea> "They tried to bury us. They didn't know we were seeds."
arup_r_ has joined #ruby
Renich has joined #ruby
sigurding has quit [Quit: sigurding]
<zenspider> no?
mrmargolis has joined #ruby
oo_ has quit [Remote host closed the connection]
<Ox0dea> I admit the quotation was neither timely nor entirely pertinent, but you've got to grant it's pretty Zen.
railsraider_ has joined #ruby
sharpmachine has joined #ruby
railsraider has quit [Read error: Connection reset by peer]
railsraider_ is now known as railsraider
arup_r has quit [Ping timeout: 264 seconds]
bruno- has quit [Ping timeout: 248 seconds]
oo_ has joined #ruby
rikkipitt has quit [Quit: Leaving...]
<MrJiks> zenspider: :p
tvw has joined #ruby
mrmargolis has quit [Ping timeout: 246 seconds]
sharpmachine has quit [Ping timeout: 265 seconds]
revath has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
howdoicomputer has joined #ruby
sigurding has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
workmad3 has joined #ruby
zacts has joined #ruby
phutchins1 has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
<yorickpeterse> apparently it's going to be 39C today
<yorickpeterse> if so that would be a new record since 1944
<yorickpeterse> D:
<sevenseacat> really?
<sevenseacat> are you in siberia or something? >_>
<tbuehlmann> going up to 40°C at the weekend
<yorickpeterse> sevenseacat: .nl
<ljarvis> (•_•) / ( •_•)>⌐■-■ / (⌐■_■)
<sevenseacat> ah hah
<sevenseacat> sounds like a normal summer's day :P
ramfjord has quit [Ping timeout: 246 seconds]
<yorickpeterse> ヽ(´ー`)ノ
workmad3 has quit [Ping timeout: 250 seconds]
<yorickpeterse> it's super warm for around here
<wasamasa> still don't know what to do for my birthday
bigkevmcd has quit [Quit: Outta here...]
<tbuehlmann> cake?
Dopagod has joined #ruby
Dopagod has joined #ruby
<yorickpeterse> get hammered
<wasamasa> suddenly sitting at home sounds pretty great to me considering these insane heat waves
<wasamasa> why must it be on the warmest day of the week, damnit
ahmetkapikiran has joined #ruby
bigkevmcd has joined #ruby
<yorickpeterse> ._.
abdulsattar has joined #ruby
n008f4g_ has joined #ruby
lkba_ has quit [Ping timeout: 276 seconds]
<theahindle> Far too hot
RegulationD has joined #ruby
allomov has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
senayar has quit [Remote host closed the connection]
zacstewart has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
howdoicomputer has quit [Ping timeout: 256 seconds]
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality has joined #ruby
cjk101010 has quit [Quit: ZNC - http://znc.sourceforge.net]
khebbie has joined #ruby
troulouliou_dev has joined #ruby
zacstewart has quit [Ping timeout: 255 seconds]
Ox0dea has quit [Ping timeout: 250 seconds]
frenda has joined #ruby
<frenda> https://gist.github.com/diff-/d1d92f6d0250fa4b874f --> Is this kind of an error?!
xrlabs has joined #ruby
<sevenseacat> yes.
bonhoeffer has quit [Quit: bonhoeffer]
<frenda> Is it a dependency problem?!
<sevenseacat> why on earth are they requiring capybara in development?
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
lkba has joined #ruby
dseitz has joined #ruby
howdoicomputer has joined #ruby
<sevenseacat> that doesnt even make sense, given they only include capybara in the test env
abuzze has quit [Remote host closed the connection]
<frenda> I've installed it by this code: `bundle install --deployment --without development test`
<sevenseacat> well that definitely wont work
<sevenseacat> becase you're running it in development
chouhoulis has joined #ruby
sbhatore has quit [Quit: sbhatore]
<sevenseacat> so you need the development gems
<sevenseacat> remove the `--without development test` part
howdoicomputer has quit [Read error: Connection reset by peer]
abuzze has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
jeanlinu_ has quit [Remote host closed the connection]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 264 seconds]
<yorickpeterse> gah, I hate customers that just don't read my support replies
<yorickpeterse> email #23236514: why do we not have all sources?
<yorickpeterse> me: because we can only set up those on which a company actually has a profie
<yorickpeterse> 15 emails later: why do we not have all sources?
<yorickpeterse> (╯°□°)╯︵ ┻━┻
abuzze has quit [Ping timeout: 264 seconds]
marr has joined #ruby
frenda has left #ruby [#ruby]
allomov has joined #ruby
allomov_ has joined #ruby
allomov has quit [Read error: Connection reset by peer]
timonv has joined #ruby
d0lph1n98 has quit [Ping timeout: 252 seconds]
arup_r_ has quit []
lavros has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
abuzze has joined #ruby
Renich has quit [Ping timeout: 276 seconds]
Renich has joined #ruby
abuzze has quit [Ping timeout: 252 seconds]
anisha_ has quit [Ping timeout: 264 seconds]
anisha has quit [Ping timeout: 264 seconds]
abuzze has joined #ruby
oliver_ has quit []
abuzze has quit [Remote host closed the connection]
bruno- has joined #ruby
abuzze has joined #ruby
<zenspider> hrm... I've got a binding.pry in a module method and when it triggers I'm apparently not in that method. I can't access the locals the way I normally can
<zenspider> any clue what to do?
workmad3 has joined #ruby
<bhaak> have you an older version of pry and is your binding.pry on the last line of a block/method?
qiukun has quit [Quit: qiukun]
<bhaak> there was a bug when pry stopped _after_ the method returned
anjen has joined #ruby
<bhaak> so you were out of the scope you were expecting. a quick workaround was to add a dummy line after the binding.pry, e.g. a=1
<zenspider> pry.... umm.... 0.9.12.6
<zenspider> not in the end of the method. it's right in the middle
sharpmachine has joined #ruby
<zenspider> one of the locals was named step, which caused problems :)
Guest22119 has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
<bhaak> ah, yeah, that'll do, too :)
<zenspider> guess I could update it to 0.10.1
sevenseacat has quit [Quit: Me dun like you no more.]
<zenspider> still can't see any of the locals
<zenspider> my prompt is the object's class
<zenspider> god rails 4 is soooooo slow
Aryasam has joined #ruby
Xeago has quit [Remote host closed the connection]
sharpmachine has quit [Ping timeout: 276 seconds]
lolmaus has quit [Ping timeout: 256 seconds]
lolmaus has joined #ruby
[spoiler] has joined #ruby
anisha has joined #ruby
eGGsha has joined #ruby
axisys has quit [Ping timeout: 248 seconds]
axisys has joined #ruby
<zenspider> I'm tired
<zenspider> binding.pry, not pry.binding. :P
pengin has joined #ruby
khebbie has quit [Quit: Textual IRC Client: www.textualapp.com]
khebbie has joined #ruby
Guest22119 has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
sross07 has quit [Read error: Connection reset by peer]
sross07 has joined #ruby
User458764 has quit [Ping timeout: 264 seconds]
dhjondoh has quit [Ping timeout: 252 seconds]
dhjondoh has joined #ruby
speaking1ode has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
alex88 has quit [Ping timeout: 252 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
alex88 has joined #ruby
tvw has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
lkba_ has joined #ruby
tvw has joined #ruby
zotherstupidguy has quit [Ping timeout: 265 seconds]
Renich has quit [Ping timeout: 252 seconds]
sigurding has quit [Quit: sigurding]
<musty> Sounds pythonish.
User458764 has joined #ruby
<musty> Oh, pry, not py.
<musty> I should sleep.
railsraider_ has joined #ruby
zotherstupidguy has joined #ruby
pengin has quit [Remote host closed the connection]
revdan has quit [Quit: Textual IRC Client: www.textualapp.com]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dgutierrez1287 has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
railsraider has quit [Ping timeout: 256 seconds]
railsraider_ is now known as railsraider
revdan has joined #ruby
sepp2k has joined #ruby
bonhoeffer has quit [Client Quit]
fabrice3_ has quit [Remote host closed the connection]
stamina has joined #ruby
fabrice31 has joined #ruby
anisha_ has joined #ruby
oo_ has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scroff has joined #ruby
Renich has joined #ruby
dgutierrez1287 has quit [Ping timeout: 276 seconds]
Scrofff has quit [Ping timeout: 246 seconds]
fabrice31 has quit [Remote host closed the connection]
chouhoulis has joined #ruby
icosa1 has quit [Read error: Connection reset by peer]
unshadow_ has joined #ruby
ryez has quit [Ping timeout: 246 seconds]
eGGsha has joined #ruby
ndrei_ has quit [Ping timeout: 256 seconds]
sdothum has joined #ruby
xrlabs has quit [Quit: This computer has gone to sleep]
chouhoulis has quit [Ping timeout: 276 seconds]
Oka has joined #ruby
pithagora has quit [Quit: Leaving]
unshadow has quit [Ping timeout: 256 seconds]
<apeiros> zenspider: I'll draft up an example API of what I'd want an `Introspection` module to do
kfpratt has quit [Read error: Connection reset by peer]
chinmay_dd has quit [Remote host closed the connection]
kfpratt has joined #ruby
Dopagod has quit [Ping timeout: 276 seconds]
chinmay_dd has joined #ruby
unshadow has joined #ruby
Rickmasta has joined #ruby
mrmargolis has joined #ruby
danielpclark has quit [Ping timeout: 256 seconds]
unshadow_ has quit [Ping timeout: 256 seconds]
shredding has joined #ruby
bonhoeffer has joined #ruby
startupality has quit [Quit: startupality]
lxsameer has quit [Ping timeout: 246 seconds]
speaking1ode has joined #ruby
zacstewart has joined #ruby
mrmargolis has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
zacstewart has quit [Remote host closed the connection]
zacstewart has joined #ruby
northfurr has joined #ruby
Ropeney has joined #ruby
khebbie has joined #ruby
bruno- has joined #ruby
oo_ has quit [Remote host closed the connection]
Timba-as has quit [Quit: Be back later ...]
Timba-as has joined #ruby
danielpclark has joined #ruby
oo_ has joined #ruby
olistik has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
stamina has quit [Quit: WeeChat 1.2]
sharpmachine has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
railsraider_ has joined #ruby
claw_ has quit [Ping timeout: 256 seconds]
RegulationD has joined #ruby
claw has joined #ruby
railsraider has quit [Ping timeout: 255 seconds]
railsraider_ is now known as railsraider
jeanlinux has joined #ruby
lxsameer has joined #ruby
qiukun has joined #ruby
sharpmachine has quit [Ping timeout: 264 seconds]
[gmi] has joined #ruby
oo_ has quit [Remote host closed the connection]
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
RegulationD has quit [Ping timeout: 256 seconds]
Aryasam has quit [Read error: Connection reset by peer]
sankaber has joined #ruby
jeanlinux has quit [Ping timeout: 255 seconds]
_blizzy_ has joined #ruby
oo_ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
astrobunny has quit [Remote host closed the connection]
konsolebox has quit [Quit: Leaving]
sigurding has joined #ruby
thelastinuit has joined #ruby
TTilus has quit [Ping timeout: 256 seconds]
Soda has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
frem has quit [Quit: Connection closed for inactivity]
leeyaa has joined #ruby
TTilus has joined #ruby
<leeyaa> hello
kfpratt has quit [Read error: Connection reset by peer]
<leeyaa> trying to build eventmachine on ubuntu 14.04 lts is giving me this error https://bpaste.net/show/f82a7e0009ec any tips what could be the problem ?
kfpratt has joined #ruby
_blizzy_ has joined #ruby
<apeiros> oh, Ox0dea is offline :(
<apeiros> zenspider: actually seems to be quite simple to just implement what I want. I guess I'll open an issue this WE on bugs.ruby-lang.org, asking to add that…
<apeiros> zenspider: https://gist.github.com/apeiros/95ea9d25dbe47ab8abc8 first step :)
<apeiros> allows this: `class Foo < BasicObject; include ::Introspectable; def initialize; @a = 1; @b = 2; end; end; Foo.new.instance_variables` => [:@a, :@b]
chinmay_dd has quit [Remote host closed the connection]
devyn has quit [Quit: leaving]
devyn has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
eGGsha has joined #ruby
nettoweb has joined #ruby
[gmi] has quit [Read error: Connection reset by peer]
mattarse has joined #ruby
rodfersou has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
bullcitydev has joined #ruby
MrJiks has quit [Quit: WeeChat 1.2]
<apeiros> this tab/space indent mix is still horrible :-S
<apeiros> (talking about ruby's C source)
sandstrom has quit [Max SendQ exceeded]
abdulsattar has left #ruby [#ruby]
sandstrom has joined #ruby
Xeago has joined #ruby
bullcitydev has quit [Ping timeout: 264 seconds]
Scrofff has joined #ruby
xrlabs has joined #ruby
startupality has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Scroff has quit [Ping timeout: 244 seconds]
nettoweb has quit [Quit: Textual IRC Client: www.textualapp.com]
j4cknewt has quit [Remote host closed the connection]
Aryasam has joined #ruby
dumdedum has quit [Ping timeout: 265 seconds]
Scrofff has quit [Ping timeout: 252 seconds]
zotherstupidguy has quit [Ping timeout: 276 seconds]
ndrei has joined #ruby
fgo has joined #ruby
mikecmpbll has joined #ruby
ahmetkapikiran has joined #ruby
qiukun has quit [Quit: qiukun]
Zai00 has quit [Quit: Zai00]
tkuchiki_ has quit [Remote host closed the connection]
jamo__ has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
Hounddog has quit [Quit: No Ping reply in 180 seconds.]
doertedev has joined #ruby
Hounddog has joined #ruby
Renich has quit [Quit: leaving]
tkuchiki has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
Scroff has joined #ruby
Akagi201 has quit [Remote host closed the connection]
jamo__ has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
Voker57 has quit [Read error: Connection reset by peer]
cajone has joined #ruby
d0lph1n98 has joined #ruby
momomomomo has joined #ruby
unshadow has quit [Quit: leaving]
ryba has quit [Ping timeout: 248 seconds]
dumdedum has joined #ruby
msnyon has joined #ruby
Voker57 has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
diegoviola has joined #ruby
msnyon has quit [Client Quit]
nettoweb has joined #ruby
<bonhoeffer> i’m having a hard time getting this to work: echo '| workout_done | foo |' | sed -n 's/^\| \(\w+\) .*/\1/p'
<bonhoeffer> is there a way to have ruby run on each line via a pipe?
Scroff has quit [Ping timeout: 246 seconds]
<xrlabs> Can you please make PHP die forever
msnyon has joined #ruby
Zai00 has joined #ruby
<jhass> xrlabs: k, one sec.... aaand done
zacstewart has quit [Remote host closed the connection]
msnyon has quit [Client Quit]
<xrlabs> thanks jhass, now I can finally come back to the promised land of shiny red stones
<jhass> bonhoeffer: check popen or the open3 stdlib
<xrlabs> bonhoeffer, is everything in your string a unix command?
msnyon has joined #ruby
<bonhoeffer> xrlabs: ?
<xrlabs> what are you trying to do
<bonhoeffer> echo '| workout_done | foo |' | sed -n 's/^\| \(\w+\) .*/\1/p' -> want workout_done
<bonhoeffer> too much trouble with bre — i want to use ruby regex
<bonhoeffer> really — cat a file and run a ruby command on each line to get the bits i want
<jhass> bonhoeffer: why not let the ruby script open the file
<xrlabs> well then just find the pattern and run a reggae over it
lessless has joined #ruby
<bonhoeffer> jhass: yeah — so i could write the script easy enough — but wanted to learn how to use ruby like sed
<bonhoeffer> or like awk — so i don’t have to learn bre and different regex implementations
<bonhoeffer> and can generally do more with ruby
<jhass> $stdout.sync = true; ARGF.each_line do |line| puts line if line.match /foo/ end
<bonhoeffer> cool
speaking1ode has quit [Ping timeout: 276 seconds]
<jhass> there's things like ruby -ne but meh
<jhass> and -pe
zacstewart has joined #ruby
Ox0dea has joined #ruby
<bonhoeffer> ok — thanks
Indian has joined #ruby
<Ox0dea> bonhoeffer: For what it's worth, `cut -d\| -f2` would have been the saner approach at the shell.
olistik has joined #ruby
Rickmasta has joined #ruby
<bonhoeffer> good grief — never heard of cut
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
<Ox0dea> You really ought to familiarize yourself with the coreutils.
sharpmachine has joined #ruby
<Ox0dea> Or don't, of course; Ruby is an amazing scripting language.
<Darkwater> still learn coreutils
Musashi007 has quit [Quit: Musashi007]
<jhass> mmh, coreutils hangman...
<Darkwater> ...
<Darkwater> guess a letter
<jhass> a
<Darkwater> ...
bayed has joined #ruby
<jhass> e
<apeiros> ok, so my Introspectable module patch needs rb_str_quote_unprintable - any sane way to get access to that function? it's defined in string.c and copying over the function and all it needs seems insance…
sonOfRa has quit [Quit: Bye!]
<apeiros> but it doesn't seem to be exposed via a header
<Darkwater> ...
<jhass> i
jeanlinux has joined #ruby
<bonhoeffer> yeah — i want to be able to use ruby instead of coreutils
<Ox0dea> apeiros: You should just be able to use the QUOTE() macro.
bruno- has joined #ruby
<jhass> bonhoeffer: I'm sure shevy has the appropriate aliases to do so
<apeiros> Ox0dea: oh, you're back
sharpmachine has quit [Ping timeout: 255 seconds]
<apeiros> Ox0dea: ok, but then I have to modify the functions which atm I only copied over
sonOfRa has joined #ruby
<Ox0dea> Juse use QUOTE() everywhere?
<apeiros> hm, and I don't actually see where it is invoked? wtf?
<Ox0dea> It's defined in "internal.h".
<Ox0dea> jhass: Do you reckon Ruby is powerful enough that coreutils implementations would be short enough to include in aliases?
<jhass> I reckon that shevy wouldn't care
<Ox0dea> Ha.
<apeiros> Ox0dea: so do I copy over internal.h?
<Ox0dea> apeiros: Just #include it.
serivich has joined #ruby
DoubleMalt has joined #ruby
<apeiros> doesn't find it
shredding has quit [Ping timeout: 252 seconds]
<Ox0dea> Uh-oh.
<apeiros> isn't quoted include paths relative?
jeanlinux has quit [Ping timeout: 246 seconds]
<Ox0dea> They try to be.
* apeiros has weak C foo…
<apeiros> *fu?
<jhass> Ox0dea: also -run and -rshell I guess
meatchicken has quit [Ping timeout: 244 seconds]
<Ox0dea> apeiros: <foo.h> is used as a fallback in the event "foo.h" can't be found nearby.
<apeiros> doesn't find it as <internal.h> either
<apeiros> it does find ruby.h
<apeiros> well, <ruby.h>
meatchicken has joined #ruby
<Ox0dea> No, you definitely want the quoted one.
kaspernj has joined #ruby
kaspernj has quit [Remote host closed the connection]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> and from the makefile, it seems it correctly finds the rvm ruby-2.2.2
<apeiros> maybe ruby/intern.h ?
<Ox0dea> Nah, that's a different thing.
JoshL has joined #ruby
<Ox0dea> It seems "internal.h" only exists in the source tree; it doesn't get installed as a header. :/
<apeiros> yupp
<apeiros> copying it over worked
<apeiros> but at the point of rb_str_quote_unprintable, I get stuck
<apeiros> and I think it's actually invoked via QUOTE :)
northfurr has quit [Quit: northfurr]
<Ox0dea> They're literally synonymous.
<Darkwater> is there a shorter way to write array.map{ |n| n[:foobar] } ?
<Ox0dea> Darkwater: No. :(
<Darkwater> aw
<Darkwater> but ok
<Ox0dea> Wait, I misread.
pontiki has joined #ruby
<jhass> Darkwater: you could make your array items e.g. Struct's
<ljarvis> array.map{|n|n[:foobar]}
<ljarvis> ^ shorter
ahmetkapikiran has quit [Quit: ahmetkapikiran]
radialneon has joined #ruby
ksjdflsjldf has joined #ruby
<Darkwater> lol
<Ox0dea> Darkwater: An array of Hashes, then, right?
<Darkwater> yeah
izzol_ is now known as izzol
<Ox0dea> Well, if you made them OpenStructs, you could do array.map(&:foobar).
<Ox0dea> Overkill, though.
<pontiki> morning-ish
<Darkwater> yeah that's not really worth it
haxrbyte has joined #ruby
<Darkwater> oh well
<Ox0dea> No, it's not.
<ksjdflsjldf> newbie for ruby, anybody knows how to install shuttle written by square without buying sidekiq pro?
<apeiros> Ox0dea: https://gist.github.com/apeiros/95ea9d25dbe47ab8abc8 that's my current code
Mon_Ouie has joined #ruby
<apeiros> all works except remove_instance_variable with an inexistant variable
<apeiros> then it calls the QUOTE macro which fails
unsymbol_ has quit [Quit: cheerio]
unsymbol has joined #ruby
<apeiros> I mean, alternatively I compile my own ruby. after all, it's supposed to be a patch for ruby itself, not an external lib
<Ox0dea> apeiros: The calls to QUOTE() work fine in all the other methods?
<apeiros> maybe I don't trigger them
<Ox0dea> That's gotta be it.
ldnunes has joined #ruby
Indian has quit [Ping timeout: 244 seconds]
<apeiros> that's the full source. just arrange it in ext/ and test/
<Ox0dea> It would certainly be much less of a headache to define Introspectable as a sort of "selective alias" for Kernel.
<apeiros> that fails with dyld: lazy symbol binding failed: Symbol not found: _rb_id_quote_unprintable
ledestin has quit [Read error: Connection reset by peer]
<apeiros> well, the point is that it should work for BasicObject
ndrei has quit [Ping timeout: 256 seconds]
<jhass> ksjdflsjldf: looks like a hard dependency
<apeiros> preferably with a variant which does not require including
<apeiros> i.e. by having class methods on Introspectable which accept the target object as first arg
<apeiros> hrmpf, gotta get back to work :(
ksjdflsj_ has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ledestin has joined #ruby
<ksjdflsj_> :(
ahmetkapikiran has joined #ruby
ksjdflsjldf has quit [Ping timeout: 265 seconds]
<ksjdflsj_> oh, really appreciate your reply
lee-jon has joined #ruby
dgutierrez1287 has joined #ruby
haxrbyte_ has joined #ruby
<lee-jon> Can anyone explain why this binds to nil?
<Ox0dea> >> a = a
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
<lee-jon> NameError: undefined local variable or method `var1’ for main:Object
<lee-jon> 2.2.2 :033 > var1
<ruboto> Ox0dea # => nil (https://eval.in/391054)
haxrbyte_ has joined #ruby
<Ox0dea> lee-jon: It's little more than an unfortunate quirk of how Ruby works.
<lee-jon> 2.2.2 :032 > (true) ? var1 = “true” : var2=“false”
<lee-jon> That’s what I thought.
eGGsha has joined #ruby
<Mon_Ouie> !fact flood
krz has quit [Quit: WeeChat 1.0.1]
<lee-jon> 2.2.2 :034 > var2
<Ox0dea> It would be more work for the interpreter to "forget" that it's seen a new variable.
chouhoulis has joined #ruby
<lee-jon> => nil
<lee-jon> 2.2.2 :031 > var2
<lee-jon> => “true”
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lee-jon> Yep my bad - not enough coffee
<lee-jon> => “true”
<lee-jon> NameError: undefined local variable or method `var2’ for main:Object
<Mon_Ouie> Also, this is because the ternary operator doesn't create its own scope, so variables you create inside them still appear in the next statements
<lee-jon> 2.2.2 :030> var1
<ruboto> Please use https://gist.github.com for more than three lines of text!
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has quit [Ping timeout: 248 seconds]
mister_solo has quit [Ping timeout: 248 seconds]
troulouliou_dev has quit [Remote host closed the connection]
elektronaut has quit [Ping timeout: 252 seconds]
drPoggs has quit [Ping timeout: 252 seconds]
<lee-jon> Makes sense. And I’m not too sure we’re actually write that. But it surprised me.
<Ox0dea> Mon_Ouie: Are you sure it's anything to do with scope and not just a byproduct of how much is going on in Ruby's parser?
mrmargolis has joined #ruby
<Mon_Ouie> Yes, constructs that do create their own scope will not "leak" variables like this
<Mon_Ouie> >> def let; yield; end; let { |x| x = 3 }; x
<ruboto> Mon_Ouie # => undefined local variable or method `x' for main:Object (NameError) ...check link for more (https://eval.in/391056)
elektronaut has joined #ruby
drPoggs has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
startupality has quit [Quit: startupality]
Scrofff has joined #ruby
<Ox0dea> Mon_Ouie: How does that square with the fact that the untaken branch isn't executed?
mrmargolis has quit [Ping timeout: 265 seconds]
<Ox0dea> You can put all kinds of (syntactically valid) nonsense in the untaken branch, and Ruby will completely ignore it.
<Ox0dea> So how come the variable definition in the untaken branch there doesn't get the same treatment?
<Mon_Ouie> What do you mean "doesn't get the same treatment"? Both variables got defined
<Ox0dea> But the latter shouldn't have been.
<Mon_Ouie> All the variables that you declare in some scope start existing as soon as you enter that scope
<Ox0dea> >> 1 ? a = 1 : b; b
<ruboto> Ox0dea # => undefined local variable or method `b' for main:Object (NameError) ...check link for more (https://eval.in/391057)
<jhass> yes, nothing defines it there
<Mon_Ouie> You need to assign to a variable for it to be declared
<Ox0dea> Mon_Ouie: That's definition, not declaration.
<Mon_Ouie> Otherwise b is parsed as a method call
lolmaus has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> Ox0dea: in ruby it's declaration when the code is parsed and definition when it's executed, so both
lolmaus has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
DEA7TH has joined #ruby
GitGud has quit [Ping timeout: 244 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.2]
<lee-jon> Makes total sense. Thanks all.
choke has joined #ruby
Mon_Ouie has joined #ruby
lessless has joined #ruby
dblessing has joined #ruby
ramfjord has joined #ruby
Zai00 has quit [Quit: Zai00]
fantazo has joined #ruby
haxrbyte_ has quit [Ping timeout: 244 seconds]
AlexAltea has joined #ruby
but3k4 has joined #ruby
RegulationD has joined #ruby
<DEA7TH> A thread initializes something and pauses until someone tells it to proceed (they also need to pass extra arguments). How do I implement that in Ruby? I've looked up mutexes, but this needs to work globally / across applications, if possible.
allomov_ has quit [Remote host closed the connection]
<DEA7TH> maybe I'll try File.flock
bonhoeffer has quit [Ping timeout: 264 seconds]
allomov_ has joined #ruby
ryba has joined #ruby
senayar has quit [Remote host closed the connection]
<jhass> that's a bit vague
RegulationD has quit [Ping timeout: 248 seconds]
<jhass> what's the something, what's the arguments and what are the applications?
allomov_ has quit [Remote host closed the connection]
<DEA7TH> I have a lot of client applications behind internal IPs and I want to be able to *send* them data, that's why I have them connect to the server and constantly listen for data. There is a thread which receives the connection from the client application, and it must be notified when it's time to reply.
thiagovsk has quit [Quit: Connection closed for inactivity]
<jhass> and who does the notify?
cajone has left #ruby [#ruby]
<DEA7TH> Some other processes, for example if they want to send something to the client application.
<jhass> how does that other process input the data to the "server" (or more appropriately "reverse proxy" from what I've gathered)
MuffinPimp has quit [Ping timeout: 248 seconds]
sharpmachine has joined #ruby
<DEA7TH> they're part of the Rails application. It's an unnecessary detail, but: the purpose of this is to enable someone from the Internet to send commands to an internal IP. When that person connects to the server, it will want to send something to the internal IP, and it will do it by telling my thread to reply. Replying is easy, it's just that those are two separate threads.
fantasti` has quit [Ping timeout: 252 seconds]
micmus has joined #ruby
<DEA7TH> My problem is in telling the other thread to stop waiting and do its work, while also sending it a string.
<DEA7TH> It must wait until I do that, and I feel that while(true) sleep(1) is not the right thing.
<jhass> well, there's an important detail not clear from your description
<DEA7TH> yes?
<jhass> you're mixing threads and processes
<DEA7TH> oh. I'm not sure which is which, they are separately started then they must be processes, I think
<jhass> in one moment you say "other process" in the other you say essentially "thread inside my rails app"
drewvanstone has joined #ruby
<jhass> yes
<DEA7TH> also neither process is a child of the other, they're independent
senayar has joined #ruby
Kully3xf has joined #ruby
<jhass> for inter process communication popular communication channels are named pipes, unix sockets or things like Redis
ndrei has joined #ruby
<jhass> e.g. the popular Rails background workers Resque & Sidekiq use Redis since that makes it easy to listen to queues
<DEA7TH> I was hoping I would get away without that. Oh well.
doertedev has quit [Ping timeout: 255 seconds]
eggoez has quit [Ping timeout: 248 seconds]
sharpmachine has quit [Ping timeout: 250 seconds]
Soda has quit [Remote host closed the connection]
<workmad3> DEA7TH: the general term is a communication Channel... and your problem will be that you don't have one :)
<workmad3> ah, jhass did mention that... but yeah you can't do interprocess communication without a channel...
revdan has left #ruby ["Textual IRC Client: www.textualapp.com"]
brettnem has quit [Quit: brettnem]
mattarse has quit [Ping timeout: 244 seconds]
<DEA7TH> oh well, then I'll research and implement it.
StephenOTT has joined #ruby
<DEA7TH> Could that work if both processes are activated by web requests to the same Rails application?
eggoez has joined #ruby
drewvanstone has quit [Ping timeout: 246 seconds]
<jhass> oh, I should highlight the Redis approach has the benefit of being able to have multiple processes consume and push to the queue
bullcitydev has joined #ruby
<jhass> "that"?
guillaume-rb has joined #ruby
<DEA7TH> i.e. first request happens, Rails application pauses (first requester waits for response), second request happens and then the first request is responded to.
<jhass> ah
SylarRuby has joined #ruby
<jhass> you'll run into timeouts and scaling issues with the common rails application servers there
<DEA7TH> I mean the response waits, the app is still running
<workmad3> DEA7TH: you could do that... but it would be much easier conceptually and problem implementation-wise to just use a message queue to have a proper communication channel
<workmad3> s/problem/probably
<DEA7TH> would that require an additional application, other than Rails?
anisha_ has quit [Quit: Leaving]
<jhass> DEA7TH: though sounds like you want something that's commonly solved via web sockets these days, a permanent two way communication channel between the browser and the backend
<DEA7TH> I'm using AWS, and setting up multiple things might require some work
<DEA7TH> well I did use sockets
Scrofff has quit [Remote host closed the connection]
<jhass> if that's the case a google for "Rails websockets" should get you some premade solutions and designs
<DEA7TH> alongside my Rails app? awesome
<workmad3> DEA7TH: tbh, looking back at your original statement of what you're doing, it sounds like you're trying to re-implement socket tunnels
* DEA7TH thought it would be harder than that
<Kully3xf> what should I use if I want to make a list of valid choices
Zai00 has joined #ruby
Scroff has joined #ruby
<Kully3xf> I have it in python but IDK in ruby
<DEA7TH> workmad3: I'm not sure what is that, but does it transmit an unprocessed message to the internal IP, from the external user? I don't want that; I want to process it first.
<wasamasa> Kully3xf: you want a set?
<Kully3xf> yes
<wasamasa> require 'set'
<Kully3xf> cool thanks
<workmad3> DEA7TH: fair enough... there are probably many solutions out there that handle that particular aspect as well, but I don't know what they are :)
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
deviantony has joined #ruby
JDiPierro has joined #ruby
<deviantony> plop
jerius has joined #ruby
<jhass> DEA7TH: I have to agree with workmad3, you're most likely reinventing something here, not sure what it is exactly though
<jhass> perhaps AMQP though I think that sucks as actual data transport
Scrofff has joined #ruby
eGGsha has joined #ruby
chipotles has joined #ruby
chinmay_dd has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
platzhirsch has joined #ruby
symm- has joined #ruby
Scroff has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
chipotles has quit [Max SendQ exceeded]
<deviantony> is there an easy way to extract the first elements of an IP address?
Oka has quit [Remote host closed the connection]
<Ox0dea> deviantony: ip.split('.').first(2)
arup_r has joined #ruby
<deviantony> such as extract 10.10.10. from 10.10.10.124
<Ox0dea> deviantony: ip.split('.').first(3)
Oka has joined #ruby
<jhass> IPAddr from ipaddr stdlib for some more complete handling
chipotles has joined #ruby
arup_r has quit [Remote host closed the connection]
<deviantony> Ox0dea: thanks
braidn has joined #ruby
<slash_nick> >> "2001:db8::ff00:42:8329".split(".").first(3)
<ruboto> slash_nick # => ["2001:db8::ff00:42:8329"] (https://eval.in/391076)
arup_r has joined #ruby
<jhass> >> "::ffff:10.10.10.124".split(".").first(3)
<ruboto> jhass # => ["::ffff:10", "10", "10"] (https://eval.in/391077)
Oka has quit [Ping timeout: 255 seconds]
lxsameer has quit [Quit: Leaving]
ksjdflsj_ has quit [Remote host closed the connection]
ksjdflsjldf has joined #ruby
platzhirsch has left #ruby [#ruby]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mister_solo has joined #ruby
bmurt has joined #ruby
allomov has joined #ruby
zacstewa_ has joined #ruby
gambl0re has quit [Ping timeout: 264 seconds]
ramfjord has quit [Ping timeout: 276 seconds]
zacstewart has quit [Read error: Connection reset by peer]
malconis has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<izzol> is it possible to compile ruby to the binary ?
<izzol> I'm looking on the mruby but it doens't work for me :(
<jhass> pure ruby, not really
<jhass> you may want to look into stuff like traveling ruby
<jhass> or even crystal
griffindy has joined #ruby
zacstewa_ has quit [Remote host closed the connection]
drewvanstone has joined #ruby
startupality has joined #ruby
fsvehla has quit [Quit: fsvehla]
<izzol> jhass: is it difficult to change the ruby code to the crystal?
victortyau has joined #ruby
<jhass> it's anything from just works to basically impossible, depends on the code
doertedev has joined #ruby
cb__ has joined #ruby
chouhoulis has joined #ruby
drewvanstone has quit [Ping timeout: 265 seconds]
drewvanstone has joined #ruby
nettoweb has joined #ruby
zacstewart has joined #ruby
davedev24_ has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
Rickmasta has joined #ruby
allomov has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 248 seconds]
roshanavand has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
whippythellama has joined #ruby
rbennacer has joined #ruby
platzhirsch has joined #ruby
druznek has joined #ruby
Juanchito has joined #ruby
drewvans1one has joined #ruby
last_staff has joined #ruby
doertedev has quit [Ping timeout: 256 seconds]
i8igmac has joined #ruby
drewvanstone has quit [Ping timeout: 250 seconds]
dhjondoh has quit [Quit: dhjondoh]
kobain has joined #ruby
atom3 has quit [Ping timeout: 276 seconds]
nateberkopec has joined #ruby
polysics has joined #ruby
atom3 has joined #ruby
scripore has joined #ruby
Toska has joined #ruby
<Toska> can anyone explain to me how to get this working: http://pastie.org/private/tquvxg1qifc1hsmkda (very simple example)
bf4 has joined #ruby
allomov has joined #ruby
<momomomomo> Toska: !ask
dhjondoh has joined #ruby
<momomomomo> Toska: Read this: http://www.mikeash.com/getting_answers.html
dhjondoh has quit [Client Quit]
Rickmasta has quit [Read error: Connection reset by peer]
<slash_nick> jhass: were you saying "convert it to ipv4 then split it?
renderfu_ has joined #ruby
platzhirsch has quit [Ping timeout: 276 seconds]
Rickmasta has joined #ruby
Toska has left #ruby [#ruby]
Toska has joined #ruby
<Toska> momomomomo: Did you even look at the pastie?
<jhass> slash_nick: no, that's a ipv6 mapped v4 address
xrlabs has quit [Quit: This computer has gone to sleep]
<momomomomo> Toska: of course not, you didn't ask your question or explain your situation here
xrlabs has joined #ruby
JDiPierro has quit [Remote host closed the connection]
dhjondoh has joined #ruby
iamninja has quit [Ping timeout: 264 seconds]
yqt has joined #ruby
<shevy> jhass hmm, aliases alone wouldn't help much, one would need to have the equivalent functionality via ruby tools available as well, and that's quite hard to do. I don't know of any project that, for instance, copies all options of "ls"
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
revath has quit [Ping timeout: 265 seconds]
jobewan has joined #ruby
sharpmachine has joined #ruby
JDiPierro has joined #ruby
platzhirsch has joined #ruby
<Toska> Would anyone besides momomomomo be able to explain the best approach for the problem here: http://pastie.org/10269984 ?
<canton7> Toska, not if you don't explain what you're trying to do
<momomomomo> Toska: You might consider checking out the link I sent you
sevenseacat has joined #ruby
<shevy> Toska you are using a class var there though right?
ksjdflsj_ has joined #ruby
<slash_nick> Toska: i'm with momomomomo ... i see your code, but what do you expect?
Indian has joined #ruby
<canton7> "subclass class instance" - nowhere do you assign any subclass instances
renderfu_ has quit [Ping timeout: 265 seconds]
<momomomomo> *and these are people who actually looked at the pastie*
Akagi201 has joined #ruby
<Toska> The question is right in the pastie.
ksjdflsj_ has quit [Client Quit]
<canton7> it may be "right", but that doesn't mean it makes any sense to someone who's not in your head
<shevy> "subclass class instance"
chinmay_dd has joined #ruby
<Toska> All of the sudden I remember why I hate IRC. Have fun high up on your horses. Sorry it's so much work to click a link with like 6 lines of code.
<canton7> just because you can understand your own question, doesn't mean that a few token words are enough to convey that information to anyone else..
Toska has left #ruby [#ruby]
<shevy> a powerleaver!
<canton7> he really didn't get the point, did he?
Toska has joined #ruby
sharpmachine has quit [Ping timeout: 255 seconds]
<Toska> canton7: It's not about the question, it's about the shitty attitudes in general.
<Ox0dea> /ignore add Toska
<Ox0dea> Whoops.
<Toska> I mispoke in the patie, that's my bad.
arup_r has quit [Remote host closed the connection]
<canton7> Toska, we're simply telling you that you haven't explained yourself well enough
<Toska> I want to be able to access the class variable in the subclass from the parent class.
ksjdflsjldf has quit [Ping timeout: 265 seconds]
<Toska> Or the subclass rather.
<Toska> So TestB.get_attr
k3asd` has quit [Ping timeout: 252 seconds]
<Toska> Should return 'testb'
<Toska> Ox0dea: Please do.
<canton7> oh! nowhere did it say that in your pastie
<jhass> Toska: don't use class variables, use class level instance variables then
<manveru> the best way to use class variables: don't
<canton7> you said Base.get_attr
Mon_Ouie has joined #ruby
<Toska> canton7: I said I mispoke
<Toska> The only way I can see, is to replace the class variable with a method that returns 'testb'
<Toska> But it seems hacky.
<sevenseacat> but instead of apologizing for insulting everyone when it was actually you misspeaking
* canton7 resists the temptation to make a snide comment about high horses :P
<jhass> Toska: if you could do that, it's a CONSTANT
<jhass> self.class::CONSTANT
<Toska> Hmmm
<jhass> which kinda leads to
<shevy> Toska yeah, a constant; or a variable like @foo on your class, and a method to access that; class Foo; @foo = 5; def self.foo?; @foo; end; end; Foo.foo?
<jhass> ?fake
<ruboto> Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[H]unt3r has joined #ruby
<Toska> ruboto: This isn't a problem I am unable to solve, I was just curious what others though.
<Toska> I think jhass is correct, it's better served at a constant.
<shevy> ruboto is a bot
<jhass> ?ruboto
<ruboto> I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<Toska> ffs
<shevy> haha
chouhoulis has joined #ruby
<Toska> Anyway, thanks for taking a brief moment to look at the pastie.
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
<Toska> I know it's really hard.
failshell has joined #ruby
<sevenseacat> lol
<jhass> Toska: I could only make my suggestion after your explanation
<momomomomo> Still, check out http://www.mikeash.com/getting_answers.html
<momomomomo> it's not about being on a high horse
<jhass> no idea what the heck you were getting at from the code
chinmay_dd has quit [Remote host closed the connection]
<momomomomo> it's about trying to help you ask a question that let's us help you
<canton7> Toska, I looked at the pastie, and I didn't understand it. That's why I asked you further questions
<shevy> yeah, we have to differ
<shevy> some were riding on the high horses, others looked at the pastie!
<Toska> momomomomo: You didn't even click on it, for all you know I had ever bit documented with a thesis at the top. You assumed. I have read your cod many times before, I suggest you click a link before jumping to conclusions about how little information is given.
<canton7> Toska, everyone who talked to you did so after looking at the pastie, and not understanding what you were getting at
doertedev has joined #ruby
<canton7> Toska, I'm willing to bet he did
doertedev has quit [Client Quit]
sandstrom has joined #ruby
<momomomomo> no, I didn't assume. I refuse to click on something without you asking the channel (i.e. people) directly your question first
<sevenseacat> Toska: let's turn down the entitlement a little
doertedev has joined #ruby
<Toska> canton7: he literally said he didn't I don't mind follow up questions on those who did.
<sevenseacat> just a little, please.
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Toska> canton7: In fact they are very expected.
<momomomomo> "Hey, I'm wondering how to do this, and I have this code which does X. I think the Z part is doing Y and I'm wondering how to get it to do B. Code is here with comments and explanation: "
<momomomomo> that's a good question
<sevenseacat> we're all here to help each other.
<shevy> momomomomo I could not answer that question you just asked
<momomomomo> shevy: that's because you haven't had your coffee yet
paulcsmith has joined #ruby
AlexRussia has quit [Ping timeout: 246 seconds]
<shevy> the next pastie that Toska will do, will be a better one
<failshell> in a long running process, i want to stop execution of methods down the chain. exit/abort will make the process exit. return doesn't work. how should i go about doing that/
Rickmasta has joined #ruby
zacstewart has quit [Read error: Connection reset by peer]
zacstewa_ has joined #ruby
<judofyr> failshell: raise an exception and catch it somewhere else.
<judofyr> manveru: one does not simply class variables
abuzze has quit [Remote host closed the connection]
<failshell> judofyr: thanks
<jhass> ^ but smells like control flow, maybe there's a way to restructure your code
<judofyr> the smell of control flow!
<sevenseacat> exceptions are not for control flow
<Ox0dea> Watch me.
<shevy> judofyr huh, manveru?
thiagovsk has joined #ruby
<shevy> oh wait now I see it
<shevy> he was awake!
<manveru> i'm always awake
<failshell> in my case, it makes sense though. its commands that run with mixlib/shellout. so raising an error does make sense
<sevenseacat> context is a wonderful thing
cashnguns has joined #ruby
<judofyr> shevy: I'm just a slow replyer
<shevy> this is one wise cat
<manveru> but hey, who can resist making snide remarks about class variables... they're probably the least useful feature in ruby next to flip flops
<judofyr> I love flip flops
<jhass> failshell: so it's not the common case? your program or infrastructure is broken if it enters that case?
<shevy> are flip flops like sandals?
Papierkorb has joined #ruby
<sevenseacat> i like wearing flipflops.
* judofyr looks for the fizzbuzz flip flop
<Ox0dea> That was pretty impressive.
<failshell> jhass: its a chatbot handling deployments. if one of the commands sent to system() fail i just want the execution to stop. there's no poing in going further. so raising sounds like a good idea
<judofyr> modifying variables inside a flip-flop is crazy
<judofyr> it's like a state hidden inside a state hidden inside a cookie
Rickmasta has quit [Ping timeout: 250 seconds]
<shevy> cool
<shevy> a cookie
<jhass> mmh, but we all like cookies
<shevy> a monad cookie
<shevy> with stuff hidden inside - maybe
jeanlinux has joined #ruby
<Ox0dea> Just Maybe?
ferr has joined #ruby
<judofyr> >> a=(1..30).select{|x|true unless (a = !a) .. (a = !a)}
<ruboto> judofyr # => [3, 6, 9, 12, 15, 18, 21, 24, 27, 30] (https://eval.in/391095)
<Toska> shevy: Actually this constant doesn't make sense now that I look at it, TESTVAR isn't assigned in Base, so the subclass can't see it: http://pastie.org/private/yysaux6djugdvfxi3higbq And I am back to how it would normally work: http://pastie.org/private/esf4jg9a3qd0ndclrymw I just feel like this is really the wrong way of doing it. Basically I want a shared method in Base to access non-shared 'settings' in the subclass.
mrmargolis has joined #ruby
<shevy> well, if it is a constant, you can scope to it anyway through NameOfConstantOne::NAME_OF_THAT_OTHER_CONSTANT_HERE
<jhass> Toska: self.class::FOO
RegulationD has joined #ruby
<shevy> jhass also used the :: there as you can see Toska
<jhass> or actually just self::FOO in the class var case
<Toska> But then wouldn't I need to explicitly say in baseclass TestA::TESTVAR
<Toska> I want it to know which constant based on the subclass it is called from
<jhass> Toska: but let me repeat: you're making a generalization where there's none. The best solution depends on the case at hand
<Toska> Alright hold on.
<shevy> well in your current example, you have two different constants anyway; one in TestA, the other in TestB
<izzol> Hmm, my code is doing the job really slow :( Basicialy it's parsing e-mail and looks for encrypted or password protected files. It works ok but slow. When I send 100 e-mails the load is going really high. There is anything that I can improve? (https://gist.github.com/wolfedale/cb670d99d1df97d6da77) :(
cochise has joined #ruby
enebo has joined #ruby
<judofyr> constant inheritance is really tricky
<judofyr> s/really/surprisingly/
howardg has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<howardg> good day. does anyone know how to compare two hashes, disregard the order of keys?
jeanlinux has quit [Ping timeout: 246 seconds]
<judofyr> >> {a:1,b:2} == {b:2,a:1}
<ruboto> judofyr # => true (https://eval.in/391096)
olistik has quit [Remote host closed the connection]
<jhass> howardg: Hash#==
<ljarvis> howardg: hashes aren't ordered, hence ^
<howardg> oh that's weird
<ljarvis> and if anyone mentions 1.9 I will kick
Kully3xf_ has joined #ruby
<Toska> jhass: I have this class: http://pastie.org/private/7gzvlnnrlcg26oua5unsg and this class: http://pastie.org/private/riptpsuoj41hghslorg6q They do nearly identical things, I want to have a base class they inherit from to share functionality. The main thing, is I want to define the @@stop_key in the two subclasses, and have a method in the base class for self.stop that knows the subclasses stop key.
<judofyr> fair point inkjet
<shevy> Toska also when subclassing, I think you'll only subclass for the instance methods or? e. g. the class variable variant that you use in your code, class Base; def self.get_attr, won't be automatically available via TestB.get_attr
mike___1234 has quit [Read error: Connection reset by peer]
<shevy> at least I get an error with the current code
RegulationD has quit [Ping timeout: 246 seconds]
mrmargolis has quit [Ping timeout: 248 seconds]
<judofyr> my favorite class variable "feature":
<judofyr> >> class F; @a = 1; end; class Object; @a = 2; end; class F; p @a; end
<ruboto> judofyr # => 1 ...check link for more (https://eval.in/391097)
Kully3xf has quit [Ping timeout: 255 seconds]
<ljarvis> heh
<judofyr> look, I can't even write class variables
<judofyr> >> class F; @@a = 1; end; class Object; @@a = 2; end; class F; p @@a; end
<ruboto> judofyr # => 2 ...check link for more (https://eval.in/391098)
<judofyr> there!
<Kully3xf_> kully3xf
<slash_nick> I'm back! sorry, fell off my high horse
maletor has joined #ruby
hinbody has joined #ruby
<Kully3xf_> can someone explain these variable types real quick - :hn => 'hostname'
<shevy> yeah judofyr
<Toska> slash_nick: Oh you are so funny.
olistik has joined #ruby
<Kully3xf_> what kind of variable is that
<shevy> I was wondering... you were hiding the class variable there
<shevy> then I realized... there was no class variable!!!
NeverDie has joined #ruby
<slash_nick> oh hey Toska... did you get all sorted out?
<judofyr> Kully3xf_: it's not a variable. it's a Hash.
<Kully3xf_> oh
<Toska> slash_nick: Yeah I just did.
<jhass> Toska: my guts tell me there's a way to make the whole thing proper classes and instances, so you'd have import = StoppableImport.new(FactSet::Import::Tracker::Company, 'company'), import.queue, import.stop etc
KrzaQ has quit [Disconnected by services]
<Kully3xf_> why would I use that instead of a variable
<judofyr> Kully3xf_: foo(:bar => 123) is the same as foo({:bar => 123})
<shevy> huh
<shevy> StoppableImport ...
KrzaQ has joined #ruby
<jhass> Toska: but given your examples are modules that inherit...
<judofyr> Kully3xf_: it's often used when you have many (optional) parameters.
<jhass> (= invalid ruby)
<judofyr> Kully3xf_: also, many Rubyists like them because it makes code easier to read
<Toska> slash_nick: I hope you broke your neck. jhass, shevy, thanks you guys, I am just going to refactor the whole thing, I think it needs attention anyway.
tagrudev has quit [Remote host closed the connection]
<judofyr> Kully3xf_: e.g: render :file => "foo"
Toska has left #ruby [#ruby]
<judofyr> Toska: you can't really use class variables in this case. they should be called "class hierarchy variables". in a single hierarchy there is only one variable with a given name.
mrmargolis has joined #ruby
<judofyr> oh
KrzaQ has quit [Disconnected by services]
<judofyr> bye bye
KrzaQ has joined #ruby
<judofyr> guess you'll never know the secrets of the class variable :(
eGGsha has joined #ruby
<judofyr> it's better this way anyway
tkuchiki has joined #ruby
niko has quit [Quit: leaving]
<shevy> class variables are just weird
kaleido has joined #ruby
<judofyr> not classy at all
yqt has quit [Ping timeout: 265 seconds]
howardg has left #ruby [#ruby]
<shevy> I once had a bug because of a class variable; when I discovered the bug eventually, I wondered why I was using them in the first place
<jhass> well if you look at the last couple of pasties, that must be a horrible system to work with
<jhass> hidden global state everywhere
KrzaQ has quit [Disconnected by services]
<sevenseacat> if Toska comes back, I'd like to propose kicking them out for telling someone to go break their neck
jamesaxl has joined #ruby
KrzaQ has joined #ruby
niko has joined #ruby
<judofyr> "jhass: hidden global state everywhere" <- you just described Rails (hence 95% of all Ruby applications)
Xzanron has quit [Quit: Leaving]
<jhass> heh
<jhass> I guess, but still
last_staff has quit [Quit: last_staff]
KrzaQ has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
Aryasam has quit [Quit: Bye]
atom3 has quit [Ping timeout: 276 seconds]
KrzaQ has joined #ruby
<shevy> where is the @@ I can't see it
mrmargolis has quit [Read error: Connection reset by peer]
atom3 has joined #ruby
* slash_nick facepalms
<shevy> ok
<shevy> first judofyr now slash_nick
doertedev has quit [Quit: Lost terminal]
<shevy> PEOPLE CAN NOT SEE THE INVISIBLE @@!
mrmargolis has joined #ruby
<judofyr> see what?
<shevy> lol
dopie has joined #ruby
charliesome has joined #ruby
<judofyr> hi charliesome
withnale_ has joined #ruby
<shevy> ohhh charlie!
<jhass> slash_nick: include NormalCreditBalance I guess
a346 has joined #ruby
mrmargolis has quit [Read error: No route to host]
mrmargolis has joined #ruby
poguez_ has joined #ruby
<slash_nick> shevy: so that's not a class variable... what is that called?
<jhass> and if that's really a @@class_var behind the scenes it's not doing what you want anyway
<shevy> well a class method that one is I would say
deviantony has quit [Remote host closed the connection]
<shevy> but apeiros calls them differently
<jhass> slash_nick: I usually call it class level instance variable
<shevy> so I am confused
<judofyr> I hope it's backed by a instance variable
bullcitydev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
KrzaQ has quit [Read error: Connection reset by peer]
<judofyr> (at the class level)
riotjones has quit [Quit: Leaving...]
<shevy> the ultimate answer can always be provided by looking at how the C source calls those things :)
<slash_nick> ... i think it *is* a class method...
<shevy> wait with the final verdict until apeiros comments!
<jhass> slash_nick: well, technically there isn't even such a thing as class methods, that's something purely conceptual in Ruby
<shevy> see? things just become more complicated
<slash_nick> "it works, it's magic, leave it!"
<judofyr> there's actually not a concept of "methods" in Ruby
<shevy> classes are objects, aren't they?
KrzaQ has joined #ruby
<judofyr> Ruby just is
<judofyr> floating around
<jhass> like hot air
<shevy> well, we have module_function right? so ... these aren't methods, they are functions!
<judofyr> classes are objects. objects are instances of classes. everything is just fine.
<shevy> the circle is a square
<jhass> let's make chunky bacon
<shevy> the schroedinger cat is alive
<judofyr> and it inherits from a rectangle
DexterLB has quit [Ping timeout: 252 seconds]
<shevy> jhass what about the vegetarians
KrzaQ has quit [Disconnected by services]
* slash_nick sticks the cat back in pandora's box
<slash_nick> not sure what's what anymore
KrzaQ has joined #ruby
vondruch has quit [Quit: Ex-Chat]
<jhass> shevy: don't be so caught in your definition of bacon
brettnem has joined #ruby
<ljarvis> mm bacon
revath has joined #ruby
bullcitydev has joined #ruby
KrzaQ has quit [Disconnected by services]
<judofyr> you could *kinda* say that class methods are a specific thing. I mean, actually it's just because singleton classes of classes are tied up in a specific way, but the reason they are structured like that is because of class methods.
radialneon has quit [Read error: Connection reset by peer]
<charliesome> hey judofyr
<judofyr> long time no IRC (mostly for me I guess)
<shevy> singletons mhmhmh
<shevy> slash_nick now there is another concept now!
CloCkWeRX has joined #ruby
KrzaQ has joined #ruby
<charliesome> judofyr: yeah! I've mostly just been idling myself
bf4 has quit [Ping timeout: 276 seconds]
gambl0re has joined #ruby
<judofyr> charliesome: doing anything interesting these days? enjoying the summer in front of a bright screen? :)
decoponio has joined #ruby
doertedev has joined #ruby
xrlabs has quit [Quit: This computer has gone to sleep]
<sevenseacat> sum...mer?
<charliesome> judofyr: just the usual same old :)
jamesaxl|2 has joined #ruby
<judofyr> :)
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
kies^ has joined #ruby
Timba-as has quit [Quit: Lingo: www.lingoirc.com]
DexterLB has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
patronus_ has quit [Ping timeout: 246 seconds]
bullcitydev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> >> _,(_,_,((_,(foo,_)),_)) = [1, [2, [3, 4], [[5, [:target], 6], [7], 8, [9], 10]]]; foo
darkf has quit [Quit: Leaving]
<ruboto> Ox0dea # => :target (https://eval.in/391144)
radialneon has joined #ruby
jeanlinux has joined #ruby
<apeiros> Ox0dea: use *
jamesaxl has quit [Ping timeout: 246 seconds]
KrzaQ has quit [Disconnected by services]
<apeiros> oh, no, that doesn't work with specific lengths
KrzaQ has joined #ruby
<apeiros> but for ignoring rest:
<apeiros> >> foo,* = [1,2,3,4]; foo
<ruboto> apeiros # => 1 (https://eval.in/391147)
Igorshp has joined #ruby
<Ox0dea> apeiros: And the * isn't even necessary.
yardenbar has quit [Quit: Leaving]
<judofyr> >> foo, = [1,2,3,4]; foo
bullcitydev has joined #ruby
<ruboto> judofyr # => 1 (https://eval.in/391148)
<apeiros> mhm, sadly. I'd prefer the syntax to be explicit.
patronus has joined #ruby
judofyr has quit [Remote host closed the connection]
<Ox0dea> Fair enough. I wonder if Ruby'll ever get destructuring for anything but arrays.
bullcitydev has quit [Read error: Connection reset by peer]
<apeiros> Ox0dea: btw., do you have any idea on my Introspectable issue?
Kully3xf_ has quit [Ping timeout: 276 seconds]
coderhs has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> I think compiling your own Ruby would make for significantly fewer headaches. :/
KrzaQ has quit [Disconnected by services]
findaway has joined #ruby
<apeiros> hrm. lets see then.
coderhs has quit [Client Quit]
KrzaQ has joined #ruby
Kully3xf has joined #ruby
NickSpeare has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
<apeiros> cp -R rvm ruby, then ./configure, then make - that should be it, right?
<Ox0dea> It's weird that they didn't figure extensions would ever need to include "internal.h".
<apeiros> probably considered it bad
KrzaQ has joined #ruby
<apeiros> i.e. "use the proper ways"
jlast has quit [Remote host closed the connection]
<NickSpeare> hey everybody, i'm trying to figure out how to use classes properly. anybody willing to look at a simple error and help me fix ? http://pastebin.com/ieGdaydB
<ruboto> NickSpeare, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/43fee9c370274bb07173
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
i8igmac has quit [Ping timeout: 265 seconds]
<apeiros> NickSpeare: Project < Redmine does not make it Redmine::Project
<apeiros> it's still just Project, on the toplevel
brain_shim has joined #ruby
<apeiros> class Redmine; class Project; end; end # this makes it Redmine::Project
jpfuentes2 has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
<apeiros> (modules are more common as namespaces, though)
krz has joined #ruby
havenwood has joined #ruby
Sou|cutter has joined #ruby
<apeiros> and `def create` defines an instance method. i.e. you need an instance to call it: a_project = Project.new; a_project.create
maletor has joined #ruby
jlast has joined #ruby
dstarh has joined #ruby
<NickSpeare> apeiros: can I nest the classes?
fgo has quit [Ping timeout: 256 seconds]
<apeiros> yes, just as shown.
<Ox0dea> NickSpeare: Classes are not birds; why are you trying to put them in nests?
bullcitydev has joined #ruby
KrzaQ has joined #ruby
<apeiros> in the code of yours, I don't see why you inherit and namespace in the first place, though
<apeiros> you should have a single toplevel namespace for your whole project. within that, only namespace if necessary.
<NickSpeare> To answer both Ox0dea and apeiros : because I don't know what I am doing...
AlexRussia has joined #ruby
<Ox0dea> NickSpeare: Well, that's far from the worst possible answer.
niemcu has quit [Ping timeout: 246 seconds]
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
<Ox0dea> NickSpeare: Redmine should almost certainly be a module, but then you'll need to reconsider how you're using HTTParty.
<shevy> party! let's party
<NickSpeare> Ox0dea: yeah, i was/am not clear on when to use a module vs a class
<DEA7TH> Using Rails, I'm trying to create a webpage which renders whatever another process in the server sends it, via DRb. My code doesn't work: https://gist.github.com/anonymous/020cb386ffa481a3b46e
<DEA7TH> I get DRb::DRbConnError: connection closed when I try to call a method on the object I get via DRb
<Ox0dea> NickSpeare: You create a Thing class when you're going to be making several Things. Modules are just umbrellas under which to put closely related code.
StephenOTT has quit [Quit: StephenOTT]
sharpmachine has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<Ox0dea> NickSpeare: Enlightenment is knowing when the two should be used in conjunction.
_ixti_ has quit [Ping timeout: 248 seconds]
JDiPierro has joined #ruby
jenrzzz has joined #ruby
lordkryss has joined #ruby
<NickSpeare> Ox0dea: thanks for the advice. I will rework what I'm doing...
<DEA7TH> I can read the parameter, but can't call the method. Also I changed the code a bit: https://gist.github.com/anonymous/4beae2b1410282fe3c79
EagleDelta has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<DEA7TH> (I removed the first render call actually)
scripore has quit [Quit: This computer has gone to sleep]
mary5030 has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
revath has quit [Ping timeout: 264 seconds]
nfk has joined #ruby
chipotles has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
aryaching has joined #ruby
revath has joined #ruby
hostess_ is now known as hostess
EasyCo has quit [Quit: Connection closed for inactivity]
dhjondoh has quit [Quit: dhjondoh]
Soda has joined #ruby
rippa has joined #ruby
KrzaQ has quit [Ping timeout: 265 seconds]
tkuchiki has quit [Remote host closed the connection]
KrzaQ has joined #ruby
k3asd` has joined #ruby
startupality has quit [Quit: startupality]
railsraider has quit [Quit: railsraider]
v0n has joined #ruby
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
senayar has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
Kully3xf has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
revath has quit [Read error: Connection reset by peer]
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
ylluminarious has joined #ruby
Kully3xf has joined #ruby
BTRE has quit [Quit: Leaving]
KrzaQ has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 265 seconds]
kfpratt has quit [Ping timeout: 265 seconds]
KrzaQ has joined #ruby
sharpmachine has joined #ruby
dhjondoh has joined #ruby
kfpratt has joined #ruby
aphprentice_ has quit [Remote host closed the connection]
startupality has joined #ruby
BTRE has joined #ruby
tkuchiki has joined #ruby
SylarRub_ has joined #ruby
revath has joined #ruby
dhjondoh has quit [Client Quit]
dhjondoh has joined #ruby
dhjondoh has quit [Remote host closed the connection]
KrzaQ has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
KrzaQ has joined #ruby
sivoais has quit [Ping timeout: 255 seconds]
SylarRuby has quit [Ping timeout: 265 seconds]
aryaching has joined #ruby
ylluminarious has quit [Ping timeout: 248 seconds]
KrzaQ has quit [Disconnected by services]
casadei has joined #ruby
KrzaQ has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
jlast has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
startupality has quit [Quit: startupality]
KrzaQ has joined #ruby
giuseppesolinas has joined #ruby
fgo has joined #ruby
fabrice31 has quit [Remote host closed the connection]
CatMartyn has quit [Quit: Textual IRC Client: www.textualapp.com]
CatMartyn has joined #ruby
ixti has joined #ruby
mandarinkin has quit [Ping timeout: 246 seconds]
stan has quit [Ping timeout: 256 seconds]
chthon has quit [Remote host closed the connection]
<Kully3xf> why does printing --tags 'Name=#{instance[:hn].upcase}#{instance[:iter]}, put the hash "instance[:iter] on a new line
zacstewa_ has quit []
sivoais has joined #ruby
<Kully3xf> --tags 'Name=TEST 2,Apps=IDR
<Kully3xf> is the output
scripore has joined #ruby
axilla has joined #ruby
ayonkhan has joined #ruby
KrzaQ has quit [Disconnected by services]
aryaching has quit [Ping timeout: 264 seconds]
mandarinkin has joined #ruby
KrzaQ has joined #ruby
snockerton has joined #ruby
aryaching has joined #ruby
fantazo has quit [Quit: Verlassend]
chinmay_dd has joined #ruby
chipotles has quit [Quit: Textual IRC Client: www.textualapp.com]
KrzaQ has quit [Read error: Connection reset by peer]
KrzaQ has joined #ruby
<apeiros> Kully3xf: um, what?
<apeiros> ?context Kully3xf
<ruboto> Kully3xf, Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
<Kully3xf> I am threading the creation of EC2 instances - each instance needs a name. the name was originally store in a hash called :hn as such :hn => 'hostname'
KrzaQ has quit [Read error: Connection reset by peer]
<Kully3xf> now I have a prompt so it's a variable, name and :hn => name,
<Kully3xf> then when the command runs to create the ec2 - it should be name + i.to_s
chouhoulis has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
<Kully3xf> and it works if it's a string, i.e. :hn => 'hostname'+i.to_s and print #{instance[:hn] will print hostname1 hostname2 hostname 3 etc
kfpratt has quit []
chouhoulis has joined #ruby
<Kully3xf> but if I do it as a passed variable it prints hostname *new line 1 hostname *new line 2 etc
KrzaQ has joined #ruby
Soda has quit [Remote host closed the connection]
_blizzy_ has quit [Ping timeout: 265 seconds]
allomov has quit [Ping timeout: 248 seconds]
sevenseacat has quit [Quit: Me dun like you no more.]
tomaz_b has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
<Kully3xf> like that
<Kully3xf> doesn't work
KrzaQ has joined #ruby
<shevy> jhass we are almost at 1100 folks!
<Kully3xf> but that will - but it won't be dynamic. user input is ignored
dfockler has joined #ruby
momomomomo has quit [Quit: momomomomo]
tuelz has quit [Ping timeout: 252 seconds]
KrzaQ has quit [Read error: Connection reset by peer]
KrzaQ has joined #ruby
claw_ has joined #ruby
claw has quit [Ping timeout: 256 seconds]
slumos has joined #ruby
drewvans1one has quit [Quit: leaving]
<apeiros> ok, definitively too hot to make sense of all that
punkerplunk has joined #ruby
<apeiros> it *seems* to me like you're asking a question which has absolutely nothing to do with EC2, and only with how puts & string literals work
allomov has joined #ruby
<Kully3xf> yea the ec2 is just what's being done w/in the code
<Kully3xf> I just don't understand why :hn => 'string'+i.to_s works and :hn = variable+i.to_s doesn't
KrzaQ has quit [Disconnected by services]
<Takumo> Hi all, I'm building an API with Grape, but some some reason my request is being rejected as invalid and I can't actually work out why... because its on an optional String parameter....
IanV0rn2341 has joined #ruby
KrzaQ has joined #ruby
rcvalle has joined #ruby
<jhass> Kully3xf: gets.chomp
polly_wog has joined #ruby
A205B064 has joined #ruby
<Kully3xf> omg
<Kully3xf> lol thank you
<Kully3xf> works! that was frustrating
<Kully3xf> very appreciated!
Soda has joined #ruby
<jhass> Kully3xf: now read up on what chomp does and tell me why you need it
<Takumo> chomp chomp chomp
allomov has quit [Read error: Connection reset by peer]
<Kully3xf> ah it reads the
cashnguns has quit [Ping timeout: 248 seconds]
<Kully3xf> "enter" as a char
allomov has joined #ruby
<Takumo> gotta love those pesky control characters
<jhass> well, enter produces a newline and you get that returned
<Kully3xf> interesting.
<Kully3xf> only second day with ruby so still so much to learn
anjen has quit [Quit: anjen]
gwendall has joined #ruby
Spami has joined #ruby
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
<Takumo> It's also a programming thing, happens in all languages :)
KrzaQ has quit [Read error: Connection reset by peer]
<yorickpeterse> You'll never stop learning
sandstrom has quit [Quit: My computer has gone to sleep.]
<yorickpeterse> If you do something is wrong
tuelz has joined #ruby
KrzaQ has joined #ruby
MuffinPimp has joined #ruby
ayonkhan has quit []
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
tuelz1 has joined #ruby
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
ddarkpassenger has joined #ruby
KrzaQ has joined #ruby
bullcitydev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sharpmachine has quit [Remote host closed the connection]
tuelz has quit [Ping timeout: 252 seconds]
<Takumo> or you've managed to memorise wikipedia.
ferr has quit [Ping timeout: 256 seconds]
KrzaQ has quit [Disconnected by services]
bullcitydev has joined #ruby
KrzaQ has joined #ruby
Igorshp has quit [Remote host closed the connection]
ralku has joined #ruby
platzhirsch has quit [Remote host closed the connection]
bullcitydev has quit [Client Quit]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaines has joined #ruby
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
KrzaQ has quit [Disconnected by services]
senayar has quit [Remote host closed the connection]
KrzaQ has joined #ruby
phutchins1 has joined #ruby
blackmesa has joined #ruby
blaines_ has joined #ruby
Palmer11 has joined #ruby
pfish has joined #ruby
platzhirsch has joined #ruby
nolic has joined #ruby
senayar has joined #ruby
MikeGib has joined #ruby
sharpmachine has joined #ruby
blaines has quit [Ping timeout: 250 seconds]
<pfish> So I am building ruby from source to add in some support for a library and whenever I add a line into init.c tcltk give me an error saying it cant find rubysig.h
rhg135 has joined #ruby
cashnguns has joined #ruby
MikeGib has quit [Client Quit]
blackoperat has joined #ruby
<pfish> is tcltk needed?
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MikeGib has joined #ruby
<shevy> pfish it is an add-on so you don't need it
symm- has quit [Ping timeout: 256 seconds]
punkerplunk has quit [Ping timeout: 246 seconds]
blackoperat has quit [Client Quit]
JDiPierro has quit [Remote host closed the connection]
platzhirsch has quit [Read error: Connection reset by peer]
KrzaQ has quit [Read error: Connection reset by peer]
cb__ has quit [Remote host closed the connection]
<pfish> ok
fgo has quit [Ping timeout: 256 seconds]
<pfish> the worst part is if i build wihtout the line and then rebuild without cleaning it works perfectly fine'
KrzaQ has joined #ruby
MikeGib has quit [Client Quit]
<pfish> but thanks
SylarRub_ has quit [Remote host closed the connection]
drewo has joined #ruby
malconis has quit [Read error: Connection reset by peer]
tomaz_b has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
sharpmachine has quit [Remote host closed the connection]
Lucky___ has joined #ruby
sharpmachine has joined #ruby
towski_ has joined #ruby
revath has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Ping timeout: 252 seconds]
revath has joined #ruby
paulcsmith has joined #ruby
<shevy> pfish yeah, the extensions are sometimes a bit strange, I have the very same problem you describe here for openssl
<shevy> the extensions are typically in ext/ subdirectory, so in case of tk, in ext/tk - there you can rebuild the addon lateron, usually it works (for readline for instance; did not work for me with openssl)
maletor has quit [Read error: Connection reset by peer]
<shevy> I have not tried tk in ages though, I am using ruby-gnome :)
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
spider-mario has joined #ruby
Indian has quit [Ping timeout: 265 seconds]
einarj has quit [Remote host closed the connection]
malconis has joined #ruby
baweaver has joined #ruby
KrzaQ has quit [Disconnected by services]
ddarkpassenger has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has joined #ruby
dseitz has joined #ruby
KrzaQ has joined #ruby
mrmargolis has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
radialneon has quit [Remote host closed the connection]
radialneon has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
<pfish> im seriously considering just deleting it lol. this is the weirdest error.
KrzaQ has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
DEA7TH has quit [Quit: DEA7TH]
mister_solo has quit [Ping timeout: 256 seconds]
KrzaQ has quit [Disconnected by services]
paulcsmith has quit [Quit: Lingo: www.lingoirc.com]
mandarinkin has quit [Ping timeout: 250 seconds]
KrzaQ has joined #ruby
NickSpeare has quit [Ping timeout: 246 seconds]
_blizzy_ has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
radialneon has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
radialneon has joined #ruby
mandarinkin has joined #ruby
polysics has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
KrzaQ has quit [Disconnected by services]
thiagovsk has quit [Quit: Connection closed for inactivity]
ddarkpassenger has joined #ruby
KrzaQ has joined #ruby
yxhuvud has quit [Remote host closed the connection]
tvw has joined #ruby
white_bear has quit [Quit: leaving]
radialneon has quit [Quit: Leaving]
a346 has quit [Quit: a346]
bricker has joined #ruby
dionysus69 has joined #ruby
yxhuvud has joined #ruby
swgillespie has joined #ruby
<dudedudeman> so I have a if/elsif/else statement that is looking for the words yes or no, and it goes through my statements like expected and puts out a result for me based off of whether or not yes or no is the given input. how would i make it continue to loop until i get a yes or no answer?
a346 has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
zendrix has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
<dudedudeman> would that just be thrown in to a for loop?
KrzaQ has joined #ruby
jpfuentes2 has joined #ruby
wallerdev has joined #ruby
serivich has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Client Quit]
peter_paule has joined #ruby
<eam> while input != "yes"; input = STDIN.gets.chomp; if ....; end
KrzaQ has quit [Read error: Connection reset by peer]
<dudedudeman> hmm
ralku has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest1094 has quit [Changing host]
Guest1094 has joined #ruby
Guest1094 is now known as guyz
arup_r has joined #ruby
S_Walker has quit [Ping timeout: 256 seconds]
chinmay_dd has joined #ruby
KrzaQ has joined #ruby
<dudedudeman> putting that in to my code makes it where you have to press enter twice on the command line to return my gets.chomp
xrlabs has joined #ruby
lessless has joined #ruby
<Ox0dea> while input = gets.chomp; break if input[/yes|no/]; end
<dudedudeman> let me gist it
<shevy> dudedudeman loop { } and break out of it inside the condition; your example sounds like case/when
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
Alayde has joined #ruby
DEA7TH has joined #ruby
<Ox0dea> dudedudeman: This program never terminates.
<dudedudeman> yeah i just noticed that...
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
<dudedudeman> hmm
<Ox0dea> Rather, it has the potential to not if the user never says "yes".
<dudedudeman> that's where the break comes in
terlar has quit [Ping timeout: 264 seconds]
MatthewsFace has joined #ruby
Scroff has joined #ruby
eggoez has joined #ruby
KrzaQ has quit [Disconnected by services]
<dudedudeman> rather, i'd think that's where a break would come in
KrzaQ has joined #ruby
<havenwood> This is the code that never ends 'cause it goes on and on my friend... some people started coding it not knowing what it was. And not it goes forever just because. This is the code that never ends.
yourabi has joined #ruby
<Ox0dea> dudedudeman: Well, you'll need one for both the "yes" and the "no" clause given the current structure of the code.
Scrofff has quit [Ping timeout: 256 seconds]
msnyon has quit [Ping timeout: 256 seconds]
pengin has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
<slash_nick> Ox0dea: what are the odds the user never says "yes" ;)
KrzaQ has joined #ruby
<Ox0dea> slash_nick: I see what you did there.
<dudedudeman> those odds could be high
<dudedudeman> lol
yourabi has quit [Client Quit]
andikr has quit [Remote host closed the connection]
<Kully3xf> how can I make a very long set in ruby on more than one line
<slash_nick> captive audience
yeticry has quit [Ping timeout: 264 seconds]
<Ox0dea> Kully3xf: Just put a newline after a comma.
<Kully3xf> ok thanks
peter_paule has quit [Ping timeout: 264 seconds]
<Ox0dea> Kully3xf: Can't you also do that in Python?
ddarkpassenger has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Ping timeout: 252 seconds]
sgt_yellow has joined #ruby
yeticry has joined #ruby
<Kully3xf> nah in python just put the , and go to new line
s2013 has joined #ruby
jack_rabbit has joined #ruby
<Ox0dea> ...
<havenwood> Kully3xf: So you have one line you want to break out into many?
<havenwood> Kully3xf: Show the code?
<dudedudeman> shevy: it's true. a case statement might be better here
<dudedudeman> i just want to ask him for yes or no and the program not terminate until he answers one way or the other
<Ox0dea> dudedudeman: You only have three branches; that's a little early to switch to case, in my opinion.
<dudedudeman> he could type in a;sdlkjf;asdk and it would just keep asking for yes or no
B1n4r10 has joined #ruby
ddarkpassenger has joined #ruby
<dudedudeman> Ox0dea: that makes sense
jenrzzz has quit [Ping timeout: 252 seconds]
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
<Ox0dea> dudedudeman: The main problem with your loop is that you're not updating the value of `here`.
dblessing has quit [Ping timeout: 246 seconds]
<Ox0dea> You only ever obtain input at the very start of the program.
_blizzy_ has quit [Ping timeout: 248 seconds]
Hounddog has quit [Remote host closed the connection]
penzur has quit [Quit: Leaving]
chinmay_dd has quit [Remote host closed the connection]
ddarkpassenger has quit [Client Quit]
fantazo has joined #ruby
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
allomov has quit [Remote host closed the connection]
<dudedudeman> ok. let me go pluck around with that
<dudedudeman> Ox0dea: thank you for getting my brain turning a different way
druznek has quit [Quit: Leaving]
KrzaQ has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 252 seconds]
KrzaQ has joined #ruby
xrlabs has quit [Quit: Verlassend]
dopie has quit [Quit: This computer has gone to sleep]
RobertBirnie has joined #ruby
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
tuelz1 has quit [Read error: Connection reset by peer]
DEA7TH has quit [Quit: DEA7TH]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tuelz1 has joined #ruby
senayar has quit []
dopie has joined #ruby
kaleido has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leeyaa has quit [Ping timeout: 246 seconds]
KrzaQ has quit [Read error: Connection reset by peer]
KrzaQ has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<Ox0dea> dudedudeman: My pleasure. Keep me posted on your progress.
swgillespie has joined #ruby
jack_rabbit has quit [Ping timeout: 250 seconds]
Soda has quit [Remote host closed the connection]
<dudedudeman> i'm plucking away at it now!
fgo has joined #ruby
platzhirsch has quit [Remote host closed the connection]
blackmesa has joined #ruby
kerrizor has joined #ruby
DEA7TH has joined #ruby
drewo has quit [Ping timeout: 264 seconds]
KrzaQ has quit [Ping timeout: 264 seconds]
Rollabunna has joined #ruby
j4cknewt has joined #ruby
rikkipitt has joined #ruby
<diegoviola> Ruby is great, JS is not
drewo has joined #ruby
last_staff has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
<Senjai> Morning ruby
k3asd`_ has joined #ruby
<shevy> dudedudeman, remember, this is the way of the dude
jack_rabbit has joined #ruby
<shevy> simple code for laziness erm I mean efficience!
<dudedudeman> shevy: i'm trying man. sometimes i don't even know how to dude hard enough
snockerton has quit [Quit: Leaving.]
withnale_ has quit [Ping timeout: 276 seconds]
anisha has quit [Quit: Leaving]
DEA7TH has quit [Client Quit]
<Ox0dea> "Rubyists" who think they think JavaScript sucks don't know either language well enough to speak on the matter.
ChasedSpade has quit [Quit: No reason specified.]
shinnya has joined #ruby
ChasedSpade has joined #ruby
JDiPierro has joined #ruby
<shevy> dudedudeman I dudetted the code dude http://pastie.org/10270301
<dudedudeman> ewww pastie
<shevy> :D
railsraider has joined #ruby
baweaver has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 276 seconds]
<shevy> enjoy those simple things dudedudeman ... I am looking at ruby-gnome and it's nooooooot so much fun
thiagovsk has joined #ruby
<havenwood> Ox0dea: Who said that?
shadoi has joined #ruby
roolo has joined #ruby
jobewan has quit [Quit: Leaving]
<Ox0dea> havenwood: I am willing to defend my statement. :P
<shevy> JavaScript sucks
<havenwood> hehe
cb__ has joined #ruby
cb__ has joined #ruby
sandstrom has quit [Read error: Connection reset by peer]
<dudedudeman> shevy, that is quite nice code. i added in the breaks to get it to jump out of the program afer successful yes/nos
<havenwood> Ox0dea: :P What would you fill in the blank?: JavaScript errors are _.
<Ox0dea> potentially unpleasant
tuelz1 has quit [Ping timeout: 252 seconds]
<havenwood> Ox0dea: Google says "bad" with autocomplete. Another option might be "incomprehensible."
allomov has joined #ruby
<shevy> dudedudeman \o/ - if you find yourself to use that a lot, consider using Readline; you get cursor support + history through arrow keys
<dudedudeman> i like it!
<shevy> and tab completion
<shevy> so you could type y<TAB> and it completes to yes
peter_paule has joined #ruby
wallerdev_ has joined #ruby
<dudedudeman> for this case, i was just trying to ask the guy that's been mentoring me here at work if he could meet today. lol. when i could havej ust gone, hey, you free? lol
<dudedudeman> Ox0dea: now THAT is pretty
<Ox0dea> ^_^
davedev24_ has quit [Ping timeout: 248 seconds]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gloscombe has quit [Ping timeout: 246 seconds]
davedev24_ has joined #ruby
<Ox0dea> It's just a skeleton, of course, but I think it demonstrates the beginnings of "separation of concerns" quite well.
rikkipit_ has joined #ruby
towski_ has quit [Remote host closed the connection]
lkba has joined #ruby
rikkipitt has quit [Ping timeout: 246 seconds]
bullcitydev has joined #ruby
guillaume-rb has quit [Quit: guillaume-rb]
glenab has joined #ruby
MatthewsFace has quit []
skyrocker has joined #ruby
lkba_ has quit [Ping timeout: 250 seconds]
skyrocker has left #ruby [#ruby]
cubicool has joined #ruby
anjen has joined #ruby
nofxx has joined #ruby
gloscombe has joined #ruby
<cubicool> Is there a way for me to use eval() and have any variables declared therein appear in the surrounding scope?
<cubicool> eval('x = 10') and then reference the symbol 'x' later?
KrzaQ has joined #ruby
<shevy> cubicool hmm; I think you can somehow attach a binding object
<Ox0dea> But... why?
<cubicool> Lets call it academic. :)
peter_paule has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
<Ox0dea> cubicool: Well, you do indeed have to do all the evaluation inside a separate binding.
<shevy> \o/
scripore has quit [Quit: This computer has gone to sleep]
<Ox0dea> >> b = binding; b.eval('foo = 1'); b.eval('foo')
<ruboto> Ox0dea # => 1 (https://eval.in/391215)
<shevy> cubicles will be happy
<eam> I think it's not possible to pass the current binding though, correct?
<Ox0dea> That's correct.
djellemah has quit [Quit: Leaving]
<Ox0dea> >> TOPLEVEL_BINDING.eval('foo = 1'); foo
<shevy> there must be a way!
<ruboto> Ox0dea # => undefined local variable or method `foo' for main:Object (NameError) ...check link for more (https://eval.in/391216)
<eam> you could walk the binding, find new variables, and create them with instance_variable_set
<dudedudeman> Ox0dea: i took the skeleton and this is my result. thoughts? https://gist.github.com/anonymous/ec56f7061269f7f54e7e
benlieb has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
KrzaQ has joined #ruby
zzor has joined #ruby
kies^ has quit [Ping timeout: 244 seconds]
Spami has quit [Quit: This computer has gone to sleep]
bradleyprice has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<Ox0dea> dudedudeman: I think it looks great! Did you notice, though, that shevy's approach handled variation in the responses?
Tarkers34 has joined #ruby
<dudedudeman> i did
bradleyprice has joined #ruby
<dudedudeman> "yes", "y"
<dudedudeman> "q"
<havenwood> dudedudeman: If you haven't tried it yet you could capture a keypress of 'y' / 'Y' or 'n' / 'N' with: require 'io/console'; STDIN.getch
nodeworm has quit [Quit: Switching to subconscious.]
<shevy> lazy one letter typing!
towski_ has joined #ruby
KrzaQ has quit [Disconnected by services]
<shevy> havenwood is even lazier
dblessing has joined #ruby
<Ox0dea> dudedudeman: Do you reckon you'd be able to add that feature?
<shevy> he optimized the return-key away
KrzaQ has joined #ruby
<dudedudeman> Ox0dea: i reckon!
nodeworm has joined #ruby
<dudedudeman> i leave for lunch in 9 minutes! lemme pluck away at that
<Ox0dea> Godspeed!
iateadonut has joined #ruby
allomov has quit [Remote host closed the connection]
<dudedudeman> berfore i start, i will ask this. can i implement the above without touching the handle_yes/no methods?
<iateadonut> when you're in irb from rails, is there a way to reload so that you can use your new methods but not exit the irb so you still have you history?
<Ox0dea> Absolutely.
Mon_Ouie has quit [Ping timeout: 256 seconds]
nodeworm has quit [Client Quit]
<shevy> dudedudeman your methods stay safe as they are; you can think of your loop as an empty plugin-handler, you push in your methods to handle the plugin
Palmer11 has quit [Quit: Palmer11]
nodeworm has joined #ruby
<havenwood> iateadonut: Like `reload!`? The best place for Rails console questions is the #RubyOnRails channel.
<dudedudeman> mmmm. my mind hurts. but i like it. it hurts so good
<shevy> the dudedudeman ateadonut
bradleyprice has quit [Remote host closed the connection]
uri__ has joined #ruby
<shevy> iateadonut I'd also like to know if there is a simple way for that in irb, I don't know if there is one myself
bradleyprice has joined #ruby
<dudedudeman> no! no donuts for me. i'm down like 32 pounds!
<Ox0dea> dudedudeman: Think about it, though. It would be quite easy to add a response to "maybe", would it not?
scripore has joined #ruby
<dudedudeman> i would htink so
<shevy> dudedudeman wow, no kidding? 32 pounds? that's damn impressive... I keep on falling back to what I manage to cut down
<dudedudeman> shevy: yeah! started this journey at 300pounds
<dudedudeman> i'm 6'2 ish, so no one really believed me that i was that much, but i stepped on a scale and was like, "it is time"
railsraider has quit [Quit: railsraider]
<dudedudeman> and Ox0dea, i'm going to chew on that. i'm headed to lunch with the mentor here at work! i'll get to pick his brain about this, too :)
gloscombe has quit [Ping timeout: 276 seconds]
_blizzy_ has joined #ruby
rikkipitt has joined #ruby
Palmer11 has joined #ruby
cashnguns has quit [Remote host closed the connection]
k3asd`_ has quit [Ping timeout: 256 seconds]
aryaching has quit [Ping timeout: 252 seconds]
brettnem has quit [Quit: brettnem]
nodeworm has quit [Quit: Switching to subconscious.]
nodeworm has joined #ruby
gloscombe has joined #ruby
KrzaQ has quit [Ping timeout: 256 seconds]
rikkipit_ has quit [Ping timeout: 248 seconds]
balazs has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
rikkipitt has quit [Remote host closed the connection]
cb___ has joined #ruby
langland_ has quit [Ping timeout: 252 seconds]
kirun has joined #ruby
_blizzy_ has joined #ruby
Spami has joined #ruby
cb___ has quit [Remote host closed the connection]
alex88 has quit [Read error: Connection reset by peer]
freeze has joined #ruby
alex88 has joined #ruby
Spami has quit [Client Quit]
Mon_Ouie has joined #ruby
cb__ has quit [Ping timeout: 244 seconds]
Spami has joined #ruby
KrzaQ has joined #ruby
sgt_yellow has quit [Ping timeout: 246 seconds]
benlieb has quit [Quit: benlieb]
renderfu_ has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
balazs has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
lkba has joined #ruby
devdazed has joined #ruby
gloscombe has quit [Ping timeout: 250 seconds]
glenab has quit [Remote host closed the connection]
KrzaQ has quit [Disconnected by services]
bluOxigen has joined #ruby
KrzaQ has joined #ruby
snockerton has joined #ruby
swgillespie has joined #ruby
renderfu_ has quit [Ping timeout: 276 seconds]
cb__ has joined #ruby
cb__ has joined #ruby
jmhmccr has joined #ruby
Jackneill has joined #ruby
KrzaQ has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
cb____ has joined #ruby
cb____ has joined #ruby
cb____ has quit [Changing host]
<xxneolithicxx> shevy: theres always a way! now what are we talking about? lol
cb__ has quit [Read error: Connection reset by peer]
<shevy> xxneolithicxx cubicool wondered how to pass around eval-ed data
stoodfarback has quit [Ping timeout: 252 seconds]
pengin has quit [Remote host closed the connection]
gambl0re has quit [Remote host closed the connection]
<xxneolithicxx> err ya got me, i only used bindings in a few places and havent bothered to gone back to read its magic
chouhoul_ has joined #ruby
<shevy> same here actually
<xxneolithicxx> if you want to see some really interesting use of it, read through vagrant codebase. the whole thing is basically nested binding hell lol
zendrix has quit [Remote host closed the connection]
benlieb has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
benlieb has quit [Client Quit]
<xxneolithicxx> or at least i think it was binding, havent read it in a while
benlieb has joined #ruby
<shevy> that scares me
railsraider has joined #ruby
gambl0re has joined #ruby
Voker57 has quit [Read error: No route to host]
jack_rabbit has quit [Ping timeout: 246 seconds]
Voker57 has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
djbkd has joined #ruby
alex88 has quit [Remote host closed the connection]
revath has quit [Ping timeout: 246 seconds]
momomomomo has joined #ruby
Dopagod has joined #ruby
pengin has joined #ruby
revath has joined #ruby
zendrix has joined #ruby
drewo has quit [Ping timeout: 252 seconds]
msgodf has quit [Ping timeout: 248 seconds]
railsraider has quit [Quit: railsraider]
bf4 has joined #ruby
momomomomo_ has joined #ruby
momomomomo has quit [Read error: Connection reset by peer]
momomomomo_ is now known as momomomomo
balazs has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
swills has quit [Quit: leaving]
j4cknewt has quit [Remote host closed the connection]
bullcitydev has quit [Read error: Connection reset by peer]
<benlieb> At work I’ve been doing ruby / rails / ember projects exclusively, but am now being encouraged to take on some Java-related things. I love ruby / rails and frontend, but java is really unpleasant for me to work with. What’s the general sense of where java is with respect to future “value” in a developer’s career?
blackmesa has quit [Ping timeout: 248 seconds]
polly_wog has quit []
corecode has joined #ruby
<corecode> hi
snockerton has quit [Quit: Leaving.]
<eam> benlieb: it's hugely entrenched in application middleware, and android
<corecode> what would be the quickest way to display some pixel data on X? use some ruby sdl layer?
<Senjai> benlieb: Just stick to waht you enjoy
sharpmachine has quit [Remote host closed the connection]
<Senjai> corecode: Not related to ruby
iateadonut has left #ruby [#ruby]
revath has quit [Ping timeout: 276 seconds]
mleung has joined #ruby
bffff_ has joined #ruby
cb____ has quit [Remote host closed the connection]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> corecode: yeah. Last time I wanted to do some graphics gosu worked the best
Dopagod has quit [Ping timeout: 264 seconds]
<benlieb> Senjai: I would prefer that, but that might create a bit of team tension. Part of my resistance is feeling that java is on its way “out”, at least for web app dev. But I could be wrong. It’s hard to feel the pulse of that kind of thing.
a346 has quit [Quit: a346]
<benlieb> I would rather be a ruby dev
<benlieb> I guess my “ruby
<benlieb> oops
<Senjai> benlieb: Your team is adopting java FROM ruby?
<bricker> benlieb: java is alive and well, let me assure you
<Senjai> benlieb: ^, it's also pointless to use it unless you need to use it
serivich has joined #ruby
<benlieb> I guess my “ruby-related” question is, is it reasonable to greatly prefer ruby over java in terms of future-proofing my career?
jackjackdripper has joined #ruby
<Senjai> benlieb: You future proof your career by not being dumb, and learning how to solve problems
<Senjai> benlieb: Languages can be picked up in a week
<Senjai> benlieb: Knowing a language != software engineering
snockerton has joined #ruby
fmcgeough has joined #ruby
psyprus has quit [Changing host]
psyprus has joined #ruby
sarkyniin has joined #ruby
<Senjai> benlieb: You need to know enough to pick the right tool, and the right tool may not be a language you currently know, and that shouldn't matter
<jhass> the more languages and toolkits you know, the quicker you can adapt to new ones and the more your general work benefits. Doesn't get more future proof than that
<shevy> I used it in the past to write randomly coloured text anywhere on the screen
unshadow has joined #ruby
Palmer11 has quit [Quit: Palmer11]
blackmesa has joined #ruby
<shevy> anyone can recommend a specific library for this: "given a colour x, such as "slateblue", find a slightly lighter colour" - I need it for on-hover effects in a GUI
charliesome has quit [Read error: Connection reset by peer]
blackmes1 has joined #ruby
charliesome has joined #ruby
<ytti> shevy, wouldn't it be sufficient just to add 1 to every number in hex code?
mrmargolis has joined #ruby
VictorBjelkholm has joined #ruby
<shevy> ytti dunno, probably
bf4 has quit [Read error: Connection reset by peer]
doertedev has quit [Quit: Lost terminal]
<shevy> I guess I should just write exactly a gem that does that and nothing more :)
serivich has quit [Ping timeout: 255 seconds]
bhorn1 has joined #ruby
revath has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Ping timeout: 264 seconds]
<bhorn1> hey guys quick question about gtk3 in ruby. Is there any built in functions similar to the card layout in java swing that will allow me to easily hide one widget while displaying another at the push of a button?
<Mon_Ouie> If you have something that's just half-red, adding to all components will also make it somewhat blue and somewhat red, i.e. change the hue
<Mon_Ouie> You probably want to change luminance alone
momomomomo has quit [Ping timeout: 256 seconds]
Kully3xf_ has joined #ruby
<ytti> shevy, ummm
zendrix has quit [Remote host closed the connection]
<ytti> shevy, 0xabcdef + 0x111111
momomomomo has joined #ruby
<ytti> shevy, bit short code for gem
<shevy> hmm
<shevy> so my red becomes bluish
Kully3xf has quit [Ping timeout: 250 seconds]
roshanavand has quit [Ping timeout: 252 seconds]
<ytti> why?
<Mon_Ouie> somewhat blue and somewhat green (and still mostly red)* is what I meant to say
<ytti> each of the colour gets up the same amount
<ytti> i.e. it becomes 'lighter'
<Mon_Ouie> #7F0000 + #010101 => you used to have 0 green and 0 blue, now you have some green and some blue
axl_ has quit [Ping timeout: 245 seconds]
<Mon_Ouie> Multiplying all components by something that's greater than 1 one would work
<Mon_Ouie> https://github.com/jfairbank/chroma apparently has lighten, brighten, etc.
<shevy> aha!
baweaver has joined #ruby
a346 has joined #ruby
<shevy> 'red'.paint.lighten(30) \o/
Musashi007 has joined #ruby
wikus has joined #ruby
j4cknewt has joined #ruby
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
sharpmachine has joined #ruby
cmisenas has joined #ruby
sarkyniin has quit [Read error: Connection reset by peer]
sarkyniin has joined #ruby
Scroff has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pgatt has quit [Quit: Connection closed for inactivity]
Kully3xf has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
allomov has joined #ruby
Muhannad has joined #ruby
Kully3xf_ has quit [Ping timeout: 276 seconds]
MasterPiece has joined #ruby
guillaume-rb has joined #ruby
choke has joined #ruby
a346 has quit [Quit: a346]
Juanchito has quit [Quit: Connection closed for inactivity]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
guillaume-rb has quit [Client Quit]
balazs has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
hahuang65 has quit [Quit: WeeChat 1.2]
<Tarkers34> hey all...how do I extend a class if it's extendor is inside a module? http://pastebin.com/wmRt0bdG
<ruboto> Tarkers34, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/346b57171ced0877a7c3
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
codecop has joined #ruby
wikus has left #ruby ["WeeChat 1.3-dev"]
momomomomo has quit [Quit: momomomomo]
<Tarkers34> hey all...how do I extend a class if it's extendor is inside a module? https://gist.github.com/anonymous/346b57171ced0877a7c3 I'm feeling I need to run "MyModule.run", something like that?
<Tarkers34> excite() works perfectly if we're not in a module of course :P
workmad3 has joined #ruby
hahuang65 has joined #ruby
njs126 has quit [Quit: Leaving]
zachrab has joined #ruby
IanV0rn2341 has quit []
revath has quit [Ping timeout: 264 seconds]
<zachrab> trying to hit an api endpoint but server uses windows integrated authentication. how can i pass AD creds with ruby?
a346 has joined #ruby
zachrab has quit [Client Quit]
rubynewbie123 has joined #ruby
zendrix has joined #ruby
<rubynewbie123> im trying to hit an api endpoint which uses windows integrated authentication. How do I pass AD creds with Ruby gem?
<havenwood> Tarkers34: class ::String
<havenwood> Tarkers34: You might want to look into refinements.
last_staff has quit [Quit: last_staff]
GPrime has joined #ruby
senayar has joined #ruby
multi_io has quit [Ping timeout: 256 seconds]
peter_paule has joined #ruby
nateberkopec has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
CatMartyn has quit [Quit: Textual IRC Client: www.textualapp.com]
zendrix has quit [Remote host closed the connection]
<rubynewbie123> im trying to hit an api endpoint which uses windows integrated authentication. How do I pass AD creds with Ruby gem?
multi_io has joined #ruby
CatMartyn has joined #ruby
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cb____ has joined #ruby
bf4 has joined #ruby
<pfish> Does anyone know how to add a test to the tests ruby does when make test is executed?
Palmer11 has joined #ruby
CatMartyn has quit [Client Quit]
nichtdiebohne has joined #ruby
cb_ has quit [Ping timeout: 256 seconds]
postmodern has joined #ruby
nichtdiebohne has quit [Client Quit]
Zai00 has joined #ruby
CatMartyn has joined #ruby
KrzaQ has joined #ruby
andikr has joined #ruby
Rollabunna has quit [Quit: Leaving...]
<rubynewbie123> im trying to hit an api endpoint which uses windows integrated authentication. How do I pass AD creds with Ruby gem?\
guillaume-rb has joined #ruby
<ddv> rubynewbie123, stop repeating yourself
Muhannad has quit [Ping timeout: 265 seconds]
sinkensabe has joined #ruby
Lucky___ has joined #ruby
peter_paule has quit [Ping timeout: 255 seconds]
<rubynewbie123> ddv: no one is responding
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
<ddv> rubynewbie123, so?
mcclurmc has joined #ruby
hotpancakes has joined #ruby
<shevy> lol
yqt has joined #ruby
<ljarvis> rubynewbie123: repeating yourself isn't going to make people respond quicker. It's spamming and you'll be kicked from the channel if you continue. Please wait for a response
<shevy> rubynewbie123 not many here do use windows
kies^ has joined #ruby
giuseppesolinas has quit [Quit: Leaving]
allomov has quit [Remote host closed the connection]
lkba_ has joined #ruby
ivanskie has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
rodfersou has quit [Ping timeout: 256 seconds]
gambl0re has quit [Remote host closed the connection]
<rubynewbie123> havenwood: do you know how i would go about using ruby to hit an endpoint?
lkba has quit [Ping timeout: 264 seconds]
<rubynewbie123> which uses WIA
<shevy> lol
<havenwood> rubynewbie123: I don't know what WIA is.
rodfersou has joined #ruby
<rubynewbie123> havenwood: windows integrated authentication
<havenwood> I still don't know what it is.
<rubynewbie123> shevy: you know?
gambl0re has joined #ruby
<shevy> rubynewbie123 no, nobody knows man
<havenwood> Is that different than IWA?
<rubynewbie123> havenwood: thats the acronym sorry
bf4 has quit [Read error: Connection reset by peer]
<rubynewbie123> IWA
<Ox0dea> rubynewbie123: How do you pronounce it?
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rubynewbie123> Ox0dea: ?
<Ox0dea> Acronyms are pronounceable; if you just say the letters, it's an initialism.
chouhoul_ has joined #ruby
<hotpancakes> quick question. how do I find the potential errors a method might raise?
<rubynewbie123> Ox0dea: touche
<Ox0dea> Well met.
<rubynewbie123> Ox0dea: do you have any idea how id send an authorized request to an IWA api
<Ox0dea> rubynewbie123: I'm afraid I touch Windows as little as I can, mate.
sinkensabe has quit [Remote host closed the connection]
GitGud has joined #ruby
bf4 has joined #ruby
zendrix has joined #ruby
<Ox0dea> rubynewbie123: Would you like me to Google it for you? :P
Pupeno has joined #ruby
bf4 has quit [Read error: Connection reset by peer]
brain_shim has quit [Ping timeout: 252 seconds]
Pupeno has quit [Changing host]
Pupeno has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
Voker57|2 has joined #ruby
Scroff has joined #ruby
<Ox0dea> hotpancakes: By its very nature, Ruby resists the sort of static analysis that would provide such information.
ChasedSpade has quit [Changing host]
ChasedSpade has joined #ruby
Voker57 has quit [Ping timeout: 264 seconds]
revath has joined #ruby
symm- has joined #ruby
brain_shim has joined #ruby
<Tarkers34> havenwood: what do you mean by class ::String
<havenwood> Tarkers34: Try changing where you have `class String` to `class ::String`.
sharpmachine has quit [Remote host closed the connection]
<Tarkers34> yeah tried that, stack level too deep :/
gambl0re has quit [Remote host closed the connection]
<havenwood> uh
yardenbar has joined #ruby
<havenwood> Tarkers34: Can't call the method in the method.
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmes1 has quit [Ping timeout: 246 seconds]
<Tarkers34> shhot
<Tarkers34> what a stupid error not thinking :P
tflat_ is now known as tflat
tflat has quit []
<Ox0dea> Tarkers34: You got triple sixes in your Gist hash.
gambl0re has joined #ruby
<Ox0dea> I'd like to talk to you about our lord and savior, Beelzebub.
tflat has joined #ruby
<havenwood> 10032 levels... of excite
<Tarkers34> ox0dea haha. I bought some snacks the other day, came to £6.66
<cout> and e1e1d is _almost_ e i e i o
<cout> er, e131d
rdark has quit [Quit: leaving]
gambl0re has quit [Client Quit]
<Tarkers34> shop clerk was like "hail satan" under his breath :P
<Tarkers34> havenwood: welcome to the house of fun
kies^ has quit [Ping timeout: 256 seconds]
uri__ has quit [Quit: Textual IRC Client: www.textualapp.com]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has joined #ruby
Scroff has quit [Remote host closed the connection]
gambl0re has joined #ruby
<shevy> haha
KrzaQ has quit [Disconnected by services]
Scroff has joined #ruby
KrzaQ has joined #ruby
knikolov has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
senayar has quit [Remote host closed the connection]
podman has joined #ruby
Scroff has quit [Remote host closed the connection]
gambl0re has quit [Remote host closed the connection]
brain_shim has quit [Ping timeout: 264 seconds]
bradleyprice has quit [Ping timeout: 265 seconds]
khebbie has joined #ruby
atom3 has quit [Ping timeout: 276 seconds]
j4cknewt has quit [Remote host closed the connection]
atom3 has joined #ruby
khebbie has quit [Client Quit]
AlphaAtom has joined #ruby
Scroff has joined #ruby
peter_paule has joined #ruby
gambl0re has joined #ruby
Palmer11 has quit [Remote host closed the connection]
guillaume-rb has quit [Ping timeout: 248 seconds]
guillaume-rb_ has joined #ruby
benlieb has quit [Quit: benlieb]
guillaume-rb_ has quit [Remote host closed the connection]
revdan has joined #ruby
DoubleMalt has joined #ruby
Agoldfish has joined #ruby
codecop has quit [Remote host closed the connection]
CorySimmons has joined #ruby
jack_rabbit has joined #ruby
allomov has joined #ruby
ta has quit [Remote host closed the connection]
mikecmpbll has quit [Remote host closed the connection]
blackmes1 has joined #ruby
ta has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
mikecmpbll has joined #ruby
kies^ has joined #ruby
sharpmachine has joined #ruby
ta has quit [Remote host closed the connection]
mister_solo has joined #ruby
brain_shim has joined #ruby
blue_deref has joined #ruby
rikkipitt has joined #ruby
frem has joined #ruby
wallerdev_ has quit [Quit: wallerdev_]
jack_rabbit has quit [Ping timeout: 248 seconds]
rikkipit_ has joined #ruby
jeanlinux has quit [Ping timeout: 264 seconds]
polysics has joined #ruby
bradleyprice has joined #ruby
sarkyniin has quit [Quit: Quit]
ringarin has joined #ruby
baweaver has joined #ruby
peter_paule has quit [Ping timeout: 252 seconds]
rikkipitt has quit [Ping timeout: 264 seconds]
jeanlinux has joined #ruby
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby
apofis has joined #ruby
bradleyprice has quit [Ping timeout: 252 seconds]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
nym has joined #ruby
pengin has quit [Remote host closed the connection]
wildroman2 has quit [Ping timeout: 264 seconds]
gambl0re has quit [Ping timeout: 246 seconds]
peter_paule has joined #ruby
rikkipit_ has quit [Ping timeout: 248 seconds]
gwendall has quit [Ping timeout: 250 seconds]
bradleyprice has joined #ruby
apofis has quit [Read error: Connection reset by peer]
sigurding has joined #ruby
chinmay_dd has joined #ruby
djbkd has quit [Remote host closed the connection]
apofis has joined #ruby
ringarin has quit [Ping timeout: 244 seconds]
mleung has quit [Quit: mleung]
cb____ has quit []
gianlucadv has joined #ruby
peter_paule has quit [Ping timeout: 252 seconds]
saadq has joined #ruby
bradleyp_ has joined #ruby
toretore has joined #ruby
CorySimmons has quit [Quit: Bye!]
chinmay_dd has quit [Ping timeout: 256 seconds]
lys has joined #ruby
lys has quit [Remote host closed the connection]
lolmaus has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
CaptainCibai has quit [Ping timeout: 276 seconds]
chouhoul_ has quit [Remote host closed the connection]
bradleyprice has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
pepperbreath has joined #ruby
k3asd` has joined #ruby
mister_solo has quit [Ping timeout: 248 seconds]
Scroff has quit [Remote host closed the connection]
CaptainCibai has joined #ruby
framling has joined #ruby
blackmes1 has quit [Ping timeout: 244 seconds]
revath has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
revdan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
howdoicomputer has joined #ruby
Scroff has joined #ruby
dblessing has joined #ruby
revath has joined #ruby
benlieb has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
blackmes1 has joined #ruby
zendrix has quit [Remote host closed the connection]
djbkd has joined #ruby
gambl0re has quit [Remote host closed the connection]
gambl0re has joined #ruby
revath has quit [Ping timeout: 248 seconds]
msnyon has joined #ruby
dfockler has quit [Remote host closed the connection]
Pwnna has left #ruby ["Leaving"]
zendrix has joined #ruby
stoodfarback has joined #ruby
failshell has quit [Remote host closed the connection]
warreng has quit [Changing host]
warreng has joined #ruby
findaway has quit [Ping timeout: 256 seconds]
findaway has joined #ruby
revath has joined #ruby
izzol has quit [Ping timeout: 256 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
danman has joined #ruby
izzol has joined #ruby
<shevy> hmm
<shevy> I am looking at this code:
<shevy> def init; puts "","",""
<shevy> does anyone happen to know why the author used that?
brettnem has joined #ruby
rubynewbie123 has quit [Ping timeout: 246 seconds]
<Ox0dea> shevy: Is there a better way to output three blank lines?
<yorickpeterse> shevy: because they drunk
<Ox0dea> Derp. "\n\n\n"
<shevy> well "better"
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
<shevy> I think it is the first time that I see puts "","",""
sigurding has quit [Quit: sigurding]
<shevy> you know how things are when you look at something for the first time in your life
<shevy> like perl code!
scx_ has quit [Quit: Lost terminal]
_whitelogger has joined #ruby
bklane has joined #ruby
yfeldblum has joined #ruby
solocsha1 has left #ruby [#ruby]
WillAmes has quit [Remote host closed the connection]
wallerdev_ has joined #ruby
scylla has joined #ruby
momomomomo has joined #ruby
Musashi007 has quit [Quit: Musashi007]
WillAmes has joined #ruby
revath has joined #ruby
nateberkopec has joined #ruby
workmad3 has joined #ruby
nateberkopec has quit [Client Quit]
choke has joined #ruby
NeverDie has quit [Ping timeout: 256 seconds]
bradleyprice has joined #ruby
<sphex> TTY box-drawing is a mess. some programs assume the encoding is CP437-like. some use the Unicode code points. and some use the ACS (alternate character set) feature of curses (which looks like a good idea, but doesn't seem to work quite right with all terminals).
<Tarkers34> so are string the only data classes that can have bang methods? And do they use the .replace() method to make their inplace change? Because it seems to me like it it's impossible to extend the symbol class with a bang methof :)
bklane has quit [Remote host closed the connection]
<Tarkers34> :hello.to_s! # impossible! (right)
apofis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> it's pretty cool... this here is a checkbox: puts "\e[32m\342\234\224\e[0m"
scylla has left #ruby [#ruby]
<apeiros> no, strings are not the only
eGGsha has joined #ruby
<apeiros> Tarkers34: bang methods (usually) are methods which mutate the object
<apeiros> so usually only mutable objects have bang methods
NeverDie has joined #ruby
<Ox0dea> Tarkers34: There are many ways other than #replace to mutate a String.
<apeiros> nothing actually stops you from adding a method called to_s! to Symbol. but it'd just be misleading as it can't ever do what its name implies.
<Ox0dea> apeiros: Fiddle. ^_^
Zai00 has quit [Quit: Zai00]
bklane has joined #ruby
bradleyp_ has quit [Ping timeout: 248 seconds]
<shevy> how can I find out that "\342\234\224" is a checkbox though? or rather, it's more an arrow
Zai00 has joined #ruby
<Ox0dea> shevy: Those are just characters encoded in octal.
<shevy> hmm
zendrix has quit [Remote host closed the connection]
sharpmachine has joined #ruby
<Ox0dea> >> "✔".bytes == "\342\234\224".bytes
<ruboto> Ox0dea # => true (https://eval.in/391277)
scylla has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
<Tarkers34> apeiros: mutable objects are objects whose instance's contents can change? Strings are the only mutable objects? What other native ruby data classes are mutable, out of interest? Integers aren't.
<apeiros> arrays, hashes
<apeiros> sets
<apeiros> queues
<Ox0dea> shevy: "\e[32m" makes the foreground green, and "\e[0m" resets it to the original.
Jackneill has quit [Quit: Leaving]
fgo has joined #ruby
workmad3 has joined #ruby
<shevy> yeah, the colour part I could figure out; I am playing around with the symbols, the snowman is working! http://shevegen.square7.ch/screenshot.png
pengin has joined #ruby
kadoppe has quit [Ping timeout: 252 seconds]
<Ox0dea> shevy: Have you considered using Rugen?
drewo has joined #ruby
<shevy> dunno but I should make a minesweeper variant with that snowman alone
<shevy> I never heard about Rugen before
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mon_Ouie has quit [Ping timeout: 250 seconds]
<Ox0dea> I probably should have just called it named_unicode_literals, but I'm quite proud of the pun.
<shevy> hmm
<Ox0dea> Did you know you can actually handle mouse events in most modern terminals?
zendrix has joined #ruby
j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby
jenrzzz has joined #ruby
<shevy> I did not know that
<shevy> that means I could on-click cd into a directory?
kadoppe has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Tarkers34> apeiros I'm trying to find a list of mutable object classes but honestly can't find any. Would you say that it? | String, Array, Hash, Set, Queue | ?
<shevy> ack
workmad3 has quit [Ping timeout: 256 seconds]
fgo has quit [Ping timeout: 265 seconds]
<Ox0dea> shevy: "Code" is a stretch.
<shevy> I seem to get a slight delay when I do require 'rugen'
<Ox0dea> Blame the Unicode Consortium.
<shevy> I can tell you let the ruby parser do work extra for the beer!
<shevy> GOTHIC LETTER EIS
<yorickpeterse> Meanwhile I'm writing Ruby code to generate Ruby code
<ytti> go deeper
<shevy> why do you use '' << 0x0002f ? does this convert it into a string or something?
hanmac has quit [Ping timeout: 256 seconds]
<Ox0dea> I considered making the maps file dynamically generate the hash and replace itself, but that seemed like a naughty thing to do.
mrmargolis has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
<apeiros> Tarkers34: most classes are mutable. it's the default.
mister_solo has joined #ruby
<shevy> yorickpeterse yeah I don't know what I was doing, I actually wanted to just collect ASCII stuff, somehow I ended up with the unicode snowman....
<yorickpeterse> heh
bricker has quit [Ping timeout: 250 seconds]
anjen has quit [Quit: anjen]
<apeiros> Tarkers34: so no, that list is not "it"
cubicool has left #ruby [#ruby]
Zai00 has quit [Quit: Zai00]
jenrzzz has quit [Ping timeout: 248 seconds]
izzol has quit [Ping timeout: 264 seconds]
<Ox0dea> shevy: It's a way to ensure the data ends up being correct, insofar as it doesn't rely on the file having any particular encoding.
izzol has joined #ruby
SCHAAP137 has joined #ruby
<Ox0dea> String << Fixnum will shovel the character corresponding to the latter's codepoint into the former.
<Ox0dea> >> '' << 97
<ruboto> Ox0dea # => "a" (https://eval.in/391278)
revath has quit [Ping timeout: 246 seconds]
Zai00 has joined #ruby
jhn has joined #ruby
<shevy> hmm
Muhannad has quit [Ping timeout: 265 seconds]
<Ox0dea> Tarkers34: BasicObject, Symbol, and the various numeric classes are the only ones whose instances can't be modified in some way without resorting to shenanigans.
casadei has quit [Ping timeout: 250 seconds]
<Ox0dea> anything.instance_variable_set(:@foo, 1)
maletor has joined #ruby
Kully3xf has quit [Remote host closed the connection]
<Ox0dea> BasicObject because it just doesn't even expose the methods for doing so, and the others because they're little more than pointers under the hood.
Musashi007 has joined #ruby
JDiPierro has quit [Remote host closed the connection]
hololeap has joined #ruby
micmus has quit [Quit: Leaving]
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
j4cknewt has quit []
thiagovsk has quit [Quit: Connection closed for inactivity]
casadei has joined #ruby
fantazo has quit [Quit: Verlassend]
<Ox0dea> shevy: What I like about Rugen is that it takes Ruby from being the anomaly that doesn't support named Unicode literals to (probably) the only language that lets you use them outside of a string literal. :)
brettnem has quit [Quit: brettnem]
scylla has left #ruby [#ruby]
scylla has joined #ruby
brettnem has joined #ruby
scylla has left #ruby [#ruby]
scylla has joined #ruby
mister_solo has quit [Ping timeout: 248 seconds]
_ht has quit [Quit: Konversation terminated!]
Scroff has quit [Remote host closed the connection]
EagleDelta has quit [Read error: Connection reset by peer]
<sphex> Ox0dea: perldoc charnames
kerrizor has quit [Quit: Textual IRC Client: www.textualapp.com]
Mon_Ouie has joined #ruby
<Ox0dea> sphex: Yep. Perl, Python, even LOLCODE.
langlands has joined #ruby
<shevy> hmmmm
Zai00 has quit [Quit: Zai00]
mleung has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
blackmes1 has quit [Ping timeout: 252 seconds]
mozzarella has quit [Quit: WeeChat 1.1.1]
hanmac has joined #ruby
coderhs has joined #ruby
cmisenas has quit [Quit: cmisenas]
coderhs has quit [Client Quit]
mozzarella has joined #ruby
zendrix has quit [Remote host closed the connection]
agent_white has joined #ruby
<sphex> Ox0dea: oh wow.. so lolcode has good unicode support? welp. perl has charnames::vianame and charnames::viacode to look them up at run-time, dunno if that's relevant to your "use outside of string literal" features.
<agent_white> Afternoon!
<dudedudeman> lol lolcode
<adaedra> kek kekcode
<sphex> ruby seems a little bit shy about unicode. by default regexes don't use the broad unicode character categories for its \w, \s, etc. String#upcase/#downcase don't care about unicode, etc. :/
<dudedudeman> random, but how many ors can i have in a if statement?
momomomomo has joined #ruby
<wasamasa> Ox0dea: that should be trivial to implement in CL
<dudedudeman> as in if x || y || z || r?
<toretore> as many as you like
<ytti> sphex, it would be hella slow
<ytti> grep -i takes ages if locales is WTF8
ivanskie has joined #ruby
<adaedra> WTF8
<ytti> huge difference to say locales C
<adaedra> There are also the differences between languages to take into account
<adaedra> i.e. for sort
<toretore> that doesn't have anything to do with encoding
<sphex> yeah, perl (and python AFAIK) don't handle collations by default
<adaedra> C doesn't either iirc
<adaedra> you have to setup it
peter_paule has quit [Ping timeout: 264 seconds]
zendrix has joined #ruby
alexclick has joined #ruby
jenrzzz has joined #ruby
<sphex> ytti: maybe the performance hit wouldn't be as bad with perl/ruby regexp engines? perl's got a lot of optimization for that.
<Ox0dea> sphex: Well, I think lci is the only interpreter that properly implements that part of the spec, but yes.
alexclick has left #ruby [#ruby]
<ytti> sphex, i fear not
<Ox0dea> sphex: Using Rugen, you can say `foo = PILE OF POO`, and it does what you'd expect.
decoponio has quit [Quit: Leaving...]
bradleyp_ has joined #ruby
<Ox0dea> I don't think you can do that in any other language.
<ytti> sphex, if we're anal, perl and ruby regexp isn't even regular, academically speaking
<Ox0dea> wasamasa: CL = Common Lisp?
<ytti> sphex, which means you can construct regexpes which take crazy long to solve
anjen has joined #ruby
tvw has joined #ruby
bmurt has quit []
bradleyprice has quit [Ping timeout: 248 seconds]
momomomomo has quit [Ping timeout: 252 seconds]
danman has quit [Quit: danman]
jeanlinux has quit [Read error: Connection reset by peer]
<ytti> https://swtch.com/~rsc/regexp/regexp1.html - is really good article
peter_paule has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
<sphex> ytti: oh yeah.. but they did speed up the wide characters matching, even with really sparse character classes (such as certain unicode categories). regexp-heavy perl programs did not become crazy slow after they make them fully unicode-aware by default.
<Ox0dea> agent_white: It's always morning (UGT) when you enter the channel.
jevs has joined #ruby
izzol has quit [Ping timeout: 250 seconds]
<adaedra> Do you want your regexp /\w/ to catch a? å? a̾͒ͮͤ́҉̬̼̻̳͕̺͍̕ ?
andikr has quit [Remote host closed the connection]
<agent_white> Ox0dea: I know I know :P
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> adaedra: Sometimes. :P
<sphex> ytti: I think the worst part about these kind of regexp engines is that they don't actually guarantee they will find the longest match. if there's an "alternative" in the regexp and the first branch allows to find a match, it'll sometimes stop there. :/
Wolland has quit [Remote host closed the connection]
jack_rabbit has quit [Read error: Connection reset by peer]
<sphex> adaedra: well.. perl got me used to that and I think it's pretty neat. I guess it doesn't really matter.. IIRC, there are other ways to match full unicode categories with ruby right?
gamename has quit []
dfockler has joined #ruby
<adaedra> ask Ox0dea, he seems to know better about that. His unicode lib is way bigger than mine.
blackmes1 has joined #ruby
<ytti> sphex, but we trade the predictability for convenieint of advanced features like neagtive lookahead etc
<ytti> sphex, which are orthagonal to regular expressions, academically speaking
vondruch has joined #ruby
<ytti> it might be nice, if language would offer per expression choice for engine
<ytti> so that when you don't need advanced features, you could use thompson NFA
<ytti> or perhaps even dynamically switch
Indian has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
<adaedra> Also, what is \w
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> (Regex don't hurt me)
<sphex> adaedra, Ox0dea: ok I just looked it up.. /[[:word:]]/ seems to be it. so, looks simple enough.
jeanlinux has joined #ruby
<hoelzro> ytti: interesting fact - perl allows you to use different RE engines for different regexes, should you choose
izzol has joined #ruby
<ytti> hoelzro, i didn\t know
dblessing has joined #ruby
<hoelzro> a lot of people don't know a lot about Perl =)
<adaedra> "Any word character" – that's again depending on the language. Å is valid in SE, not in FR – as long as it's common nouns, of course
hotpancakes has joined #ruby
<sphex> ytti: hrm. perl allows to switch between its built-in engine and PCRE at run-time. but they are pretty similar I guess.
<sphex> oh
IanV0rn2341 has joined #ruby
<sphex> adaedra: in perl, that is fully specified by unicode and locale-independent, "word characters" include stuff from all languages at all times.
<hoelzro> the Perl RE engine is flexible enough that you can do stuff like this: https://www.youtube.com/watch?v=zcSFIUiMgAs&t=165
cochise has quit [Remote host closed the connection]
<adaedra> sphex: that's a lot of characters to match
baweaver has quit [Remote host closed the connection]
<hoelzro> sphex: I thought that was only if you have the /u flag on?
ta has joined #ruby
ldnunes has quit [Quit: Leaving]
<adaedra> Mh, I took the worst example, we have a word in french with å, fun
peter_paule has quit [Ping timeout: 246 seconds]
<toretore> wouldn't perl's regexes be pcre in any care?
<toretore> case
<sphex> hoelzro: nope, it's by default now. this can be changed with lexical pragmas (in which case /u can become meaningful)
<hoelzro> toretore: PCRE strives to be compatible with Perl, but Perl's RE engine does more than PCRE does now
<hoelzro> sphex: really? you don't need a use $VERSION to activate that by default?
scripore has quit [Quit: This computer has gone to sleep]
dblessing has quit [Ping timeout: 276 seconds]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
Aswebb_ has joined #ruby
ponga has joined #ruby
hotpancakes has quit [Ping timeout: 265 seconds]
<sphex> hoelzro: wait. unless I'm wrong because I mostly only use latin-1 characters. :/
bigkevmcd has quit [Read error: Connection reset by peer]
<adaedra> Throw emojis at it
<noethics> i code with emojis
mary5030 has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
<ponga> wow u do?
bronson has joined #ruby
<noethics> ye
<adaedra> >> def
<ruboto> adaedra # =>
lolmaus has quit [Read error: Connection reset by peer]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hoelzro> sphex: you're right (perl 5.22); I guess you have to use /a to deactivate unicode regexes
<Ox0dea> >> define_method('') { :lol }; send('')
<ruboto> Ox0dea # => :lol (https://eval.in/391295)
lolmaus has joined #ruby
<adaedra> I hope ruboto lets me do this one
eGGsha is now known as eGGshke
<noethics> i didnt even know what an emoji was until a couple months ago
<noethics> they were always called emoticons
<adaedra> >> def  ; "Hello"; end;   #
<ruboto> adaedra # => "Hello" (https://eval.in/391296)
<Ox0dea> adaedra: Rugen is actually a very tiny "library"; it's just defining #method_missing and #const_missing to resolve character names. 99.9% of the "code" is just the map from characters to their names.
<adaedra> Ox0dea: you still map way more characters :>
<Ox0dea> adaedra: All of 'em! :)
jerius has quit [Quit: /quit]
<noethics> has anyone tried implementing isomorphic web app code with ruby/opal yet
<noethics> i cannot find code to steal
<adaedra> >> def  2; 3; end; 2 + 2
<ruboto> adaedra # => 5 (https://eval.in/391297)
<Ox0dea> adaedra: So sneaky!
<adaedra> go home ruboto, you're drunk
but3k4 has joined #ruby
Muhannad has joined #ruby
<sphex> hoelzro: ok yeah, on 5.20 too. but the actual rules seems a bit complicated. :/ "Which character set modifier is in effect?" in perlre(1)
<hoelzro> hehe
choke has joined #ruby
roolo has quit [Quit: Leaving...]
<Senjai> adaedra: That makes sense
<Senjai> kind of
<Senjai> No, not really
<Ox0dea> It doesn't not make unsense.
<Senjai> what
failshell has quit []
<Senjai> adaedra: Where do you find this stuff
choke has quit [Client Quit]
<Ox0dea> >> "def  2; 3; end; 2 + 2" == "def 2; 3; end; 2 + 2"
<ruboto> Ox0dea # => false (https://eval.in/391298)
<Ox0dea> >> '2spooky4me'.gsub(/\d/, &:succ)
<ruboto> Ox0dea # => "3spooky5me" (https://eval.in/391299)
eGGshke is now known as eGGsha
choke has joined #ruby
eGGsha is now known as eGGshke
eGGshke is now known as eGGsha
<adaedra> I like how Senjai went from 'That makes sense' to 'what'
<Senjai> adaedra: <3
<Senjai> at first I thought it would because of Interger#+, and coerce
<Ox0dea> >> Interger
<ruboto> Ox0dea # => uninitialized constant Interger (NameError) ...check link for more (https://eval.in/391300)
<Senjai> Fixnum
<Senjai> whatever
<Senjai> you know what I mean
<adaedra> &ri Interger
<adaedra> wait, it's not here
<Senjai> >> Integer
<ruboto> Senjai # => Integer (https://eval.in/391301)
<Senjai> Ox0dea: You so troll
<Ox0dea> I'm nawt trawlin'!
<Ox0dea> Do you actually pronounce it "interger", though?
<Senjai> I didnt even realize my spelling mistake
echevil has joined #ruby
<Senjai> No, just typing too fast
cochise has joined #ruby
<Ox0dea> Ah, I've heard it said that way is all.
<adaedra> Senjai: and so, you found how it works?
<Senjai> I did not. I had an assumption, but that one doesn't make sense to me
<dudedudeman> ok Ox0dea, after a lovely lunch, and a few hours of work that acutally isn't code(one day), i'm back attacking this thing. here's my most recent gist that I know doesn't work? https://gist.github.com/anonymous/d26f9441bf064648a59a
nofxx has joined #ruby
<dudedudeman> well, anyone for that matter
<dudedudeman> the ors. i want all the or statements in the world
<dudedudeman> but i'm stuck on the proper syntax
<Ox0dea> dudedudeman: Nope, definitely the wrong way to go about it.
<dudedudeman> poop
<adaedra>
SylarRuby has joined #ruby
bradleyprice has joined #ruby
ahmetkapikiran has joined #ruby
<Ox0dea> dudedudeman: Utilizing Array#include? would be an immediate improvement.
Muhannad has quit [Ping timeout: 264 seconds]
<dudedudeman> dang it i knew it
<dudedudeman> i seriously was going that route first
<Ox0dea> dudedudeman: Also, what happens if I say "No"?
<dudedudeman> i mean i'm guessing a regex is appropriate here
<Ox0dea> Nah, that'd be overkill.
<Ox0dea> But think about how you might go about ignoring case entirely.
<dudedudeman> downcase!
izzol has quit [Ping timeout: 255 seconds]
ahmetkapikiran has quit [Client Quit]
<Ox0dea> dudedudeman: Was that excitement, or the bang method?
<dudedudeman> well, the ! there was to show my excitement. lol
<dudedudeman> sorry, ha
<Ox0dea> Cursed ambiguity.
<shevy> I get excited when I type
<shevy> def action!
<adaedra> He banged excitement
<dudedudeman> i get hyped when shevy types
<dudedudeman> bang all the things!
<dudedudeman> how's that for ambiguity?
<Ox0dea> dudedudeman: I asked because String#downcase! does not behave like you might expect.
echevil has left #ruby [#ruby]
<sphex> ytti: thanks for that regexp link BTW. I never quite understood how they worked. it's interesting to have them explained in relation to real, efficient implementations.
<Ox0dea> >> ['foo'.downcase, 'foo'.downcase!]
gambl0re has quit [Read error: Connection reset by peer]
<ruboto> Ox0dea # => ["foo", nil] (https://eval.in/391302)
<dudedudeman> .join?
<Ox0dea> Hm?
<dfockler> it went so far downcase it became nil
<dudedudeman> sorry
rodfersou has quit [Quit: leaving]
yfeldblum has joined #ruby
cochise has quit []
dblessing has joined #ruby
<dudedudeman> i see that. it downcases the 0 position in the arrary, but not anything after
<Ox0dea> dudedudeman: I was demonstrating that String#downcase! returns nil if the string was already all lowercase.
gambl0re has joined #ruby
bradleyp_ has quit [Ping timeout: 248 seconds]
<dudedudeman> oh, that makes even more sense
<Ox0dea> It's a good thing, because it lets you use the result in a conditional, but it's definitely surprising at first.
<dudedudeman> would it just be downcase then?
<dudedudeman> which is what i was thinking before i got excited and put ! everywhere
Musashi007 has quit [Quit: Musashi007]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dudedudeman> which is what you used as well
Exuma has joined #ruby
<Ox0dea> #upcase is best case, because then you can capitalize what you'll be comparing with, and that'll make the values stand out more.
<Ox0dea> Either way, though.
Exuma has quit [Client Quit]
charliesome has quit [Quit: zzz]
<dudedudeman> so in the array that i'm matching against it would be best to have those upcased as well
<Ox0dea> I am of that opinion, but it's certainly not a universal one.
polysics has quit [Remote host closed the connection]
izzol has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[H]unt3r has quit []
polysics has joined #ruby
<Ox0dea> dudedudeman: As for your current code, you've misunderstood how Ruby interprets ||.
<Ox0dea> "x == 1 || 2 || 3" reads as "x equals 1 or 2 or 3" to a human being, but the computer doesn't see it that way.
* dudedudeman raises hand and admits his folly
<Ox0dea> Each "branch" of the conditional needs to be an expression whose "truthiness" you're interested in.
baweaver has joined #ruby
<dudedudeman> you have to separate them out, right? x == 3 || 4, x == 4 || 5, etc?
<Ox0dea> Almost.
<Ox0dea> x == 3 || x == 4 || x == 5
rbennacer has quit [Remote host closed the connection]
<Ox0dea> Each "branch" of the conditional needs to be an expression whose "truthiness" should be taken into account.
<Ox0dea> Everything except nil and false are "true" in Ruby.
MasterPiece has quit [Quit: Leaving]
<dudedudeman> oh! ok that makes sense
blackmes1 has quit [Quit: WeeChat 1.2]
<Ox0dea> dudedudeman: Do you see how to rewrite that unpleasantness above using Array#include??
blackmesa has joined #ruby
hotpancakes has joined #ruby
<dudedudeman> it's just being explicit about what you're asking ruby to do. x = this or that, x = pie or cake, not... x = this or that or pie or cake
unclouded has quit [Quit: Leaving]
scripore has joined #ruby
<dudedudeman> break handle_quit if input.include?['Q', 'QUIT', 'EXIT']
<Ox0dea> Nailed it!
<dudedudeman> that's the route i was taking?
bf4 has quit [Read error: Connection reset by peer]
hackeron has joined #ruby
<Ox0dea> >> %w[Q QUIT EXIT]
<ruboto> Ox0dea # => ["Q", "QUIT", "EXIT"] (https://eval.in/391305)
* dudedudeman hands Ox0dea a slice of pie
<Ox0dea> Perhaps you don't like it, but that's an alternate way to express an array of "words".
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dudedudeman> is that what the w means there?
<Ox0dea> Indeed.
polysics has quit [Ping timeout: 256 seconds]
<dudedudeman> i've definitely read about and used that in random code before, but not realizing it was meant for words and such
<dudedudeman> or, just words. no such
<Ox0dea> I quoted it because, in this case, Ruby considers a "word" to be any sequence of consecutive non-space characters.
s2013 has joined #ruby
GitGud is now known as Gitg
radialneon has joined #ruby
devdazed has quit [Ping timeout: 248 seconds]
Gitg is now known as gi
hackeron_ has quit [Ping timeout: 265 seconds]
gi is now known as GitGud
brain_shim has quit [Ping timeout: 248 seconds]
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phutchins1 has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
<dudedudeman> i get a wrong number of arguments error now
choke has quit [Ping timeout: 252 seconds]
<dudedudeman> but i'm thinking that's because gets.chomp.upcase isn't an array but rather a string?
GitGud is now known as gi
<Ox0dea> No, it's a string.
<Ox0dea> Erm... I think you've done your order backwards?
<dudedudeman> break handle_yes if input.include?%w[YES Y]
gi is now known as GitGud
jlast has joined #ruby
<Ox0dea> Asking a string if it includes an array sounds a little crazy, no?
jhn has quit [Read error: Connection reset by peer]
arooni-mobile has joined #ruby
<dudedudeman> yes :()
<dudedudeman> lol
<Ox0dea> No worries.
choke has joined #ruby
<darix> good thing ruby gives us loops
Scroff has joined #ruby
_blizzy_ has quit [Ping timeout: 244 seconds]
jeanlinux has quit [Remote host closed the connection]
nolic has quit [Ping timeout: 252 seconds]
GitGud is now known as GitGud2000000000
<dudedudeman> yeah i'm stumped here
GitGud2000000000 is now known as GitGud
<dudedudeman> my mind wants to keep going back to an or statement here
spider-mario has quit [Read error: Connection reset by peer]
<dudedudeman> but i don't think that's right
Channel6 has quit [Quit: Leaving]
<Ox0dea> Definitely not.
<Ox0dea> >> [2, 4, 6].include?(2)
<ruboto> Ox0dea # => true (https://eval.in/391306)
<snockerton> so when i'm doing an array.map do |x|, it seems that my local methods are undefined?
AlphaAtom has quit [Quit: Textual IRC Client: www.textualapp.com]
Scroff has quit [Ping timeout: 256 seconds]
<snockerton> pry doesn't seem to allow my map subroutine to inherit other methods i've define?
<Ox0dea> >> def plus_1 n; n + 1; end; [1,2,3].map { |x| plus_1 x }
<ruboto> Ox0dea # => [2, 3, 4] (https://eval.in/391307)
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> snockerton could you provide an example?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cajone has joined #ruby
cajone has left #ruby [#ruby]
<nofxx> dudedudeman, you can check if string contains another, from why's : quit unless 'restaurant'.include? 'aura'
hahuang65 has quit [Ping timeout: 256 seconds]
choke has quit [Ping timeout: 250 seconds]
<Ox0dea> nofxx: But that is not what his code calls for.
tvw has quit []
<nofxx> Ox0dea, couldn't miss an oportunity to mention why
gwendall has joined #ruby
<Ox0dea> ?fake snockerton
<ruboto> snockerton, Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
<nofxx> Ox0dea, where are you from?
<Ox0dea> Over there.
<ljarvis> Ox0dea was born inside the matrix
<dudedudeman> Ox0dea is the matrix
<Ox0dea> ♫ We all live in a yellow submarine. ♫
<dudedudeman> i do love that song
<wasamasa> Ox0dea: sure
Skizu has joined #ruby
<Ox0dea> wasamasa: Is that what you meant by CL, though?
<wasamasa> Ox0dea: yes
radialneon has quit [Remote host closed the connection]
<nofxx> ljarvis, dudedudeman I'm beginning to think so. He never sleeps, or we share the same sleep hours =P
<Skizu> I'm having a bit of issue setting up some relationships, could someone help me define them if I explain them?
<Ox0dea> Yes, metaprogramming is always going to be easiest in homoiconic languages.
radialneon has joined #ruby
<wasamasa> Ox0dea: no, I don't write any
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dudedudeman> nofxx: ha!
<ljarvis> ?ask Skizu
<ruboto> Skizu, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<baweaver> >> def plus(n) -> i { n + i } end; (1..5).map(&plus(5))
<ruboto> baweaver # => [6, 7, 8, 9, 10] (https://eval.in/391308)
<nofxx> Skizu, invite her for a sushi, eat the fish
choke has joined #ruby
<ljarvis> snockerton: https://gist.github.com/adampats/cd142b6d19bce01be8ea#file-pry-rb-L2 what is "value" on this line?
<wasamasa> Ox0dea: it's got reader macros, that's why
<Skizu> nofxx: There's sushi?
<Ox0dea> snockerton: Your reference to `value` on Line 2 is the problem.
tkuchiki has joined #ruby
<wasamasa> Ox0dea: scheme doesn't really, elisp not at all and clojure has some sort of compromise
gwendall has quit [Client Quit]
<snockerton> ljarvis: an unrelated syntax error
brain_shim has joined #ruby
<nofxx> Skizu, I'm kidding, you said 'having a bit of issue setting up some relationships'
<ljarvis> snockerton: no, it's the exact problem
drewo has quit [Ping timeout: 265 seconds]
<Skizu> Basically, I've a user, it has many accounts, I have transactions it has a user a source and a destination, source and destination are accounts, what kind of relationships do I need for this?
<ljarvis> Skizu: rails?
unclouded has joined #ruby
<Skizu> ljarvis: Indeed
<ljarvis> ?rails Skizu
<ruboto> Skizu, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<nofxx> Skizu, which DB?
<nofxx> and ORM
AlphaAtom has joined #ruby
<Skizu> Using the active record associations
RobertBirnie has quit [Read error: Connection reset by peer]
<Ox0dea> wasamasa: Racket is also very good in that regard.
skyrocker1 has joined #ruby
s2013 has joined #ruby
<Ox0dea> Racket is pretty much a "language factory", and it's pretty awesome.
RobertBirnie has joined #ruby
<Ox0dea> dudedudeman: Still at an impasse? :/
<nofxx> Skizu, maybe your question is better on the DB you choose channel. If it's a schematic answer you're after.
<dudedudeman> Ox0dea: yes :(
<dudedudeman> though not without trying things
<ljarvis> so... #rubyonrails
<ljarvis> which was already suggested
<Skizu> nofxx: It's an issue of rails, not the specific DB
_blizzy_ has joined #ruby
<Skizu> ljarvis: Already in there, was just answering when asked :)
<ljarvis> Skizu: yep that wasn't directed at you
<nofxx> Skizu, I see, the schema is ready.
<Ox0dea> dudedudeman: Would you mind having a go at describing what Array#include? does?
<dudedudeman> not at all! let's do it
* Ox0dea twiddles thumbs excitedly.
<dudedudeman> what do i do
<dudedudeman> oh! i describe it
<dudedudeman> ok
<Ox0dea> ^_^
<adaedra> ^_^
radialneon has quit [Read error: Connection reset by peer]
radialneon has joined #ruby
radialneon has quit [Max SendQ exceeded]
thiagovsk has joined #ruby
<dudedudeman> well, this is a public method, yes?
<adaedra> Good night everyone
<Ox0dea> It's an instance method on Array, but never mind all that.
<ljarvis> you tell us, dudedudeman
<Ox0dea> adaedra: Au revoir.
<dudedudeman> night!
radialneon has joined #ruby
<ljarvis> nn adaedra
<adaedra> Have fun Ox0dea
ponga has quit []
AlphaAtom has quit [Ping timeout: 246 seconds]
<ljarvis> I'm off too, later
<dudedudeman> i mean, it basically seems that if it returns true if the object(?) you're looking for is within itself?
<Ox0dea> Yes, that's correct.
jack_rabbit has joined #ruby
<dudedudeman> and false otherwise of course
VictorBjelkholm has quit [Remote host closed the connection]
polysics has joined #ruby
<Skizu> #RubyOnRails is a lot quieter
<wasamasa> Ox0dea: oh right
<wasamasa> Ox0dea: but I'm less interested in that part of programming
Aswebb_ has quit [Remote host closed the connection]
<Ox0dea> You introduced the topic, for what that's worth. :P
blackmesa has quit [Ping timeout: 256 seconds]
<shevy> Skizu because we have cookies here!
GitGud has left #ruby [#ruby]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> dudedudeman: In your case, what should be the array, and what the object?
GitGud has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dudedudeman> the way it's set up now, i'm looking at it that input is the arrary, and i'm looking to see if it includes anything from another array
<wasamasa> Ox0dea: nah, just because I can metaprogram doesn't mean I need to actually use these tools to write other languages with them
<Ox0dea> dudedudeman: How did you end up with two arrays?
choke has quit [Ping timeout: 252 seconds]
radialneon has quit [Client Quit]
<Ox0dea> Your input comes in as a string, and there's no reason to transform it into anything else.
radialneon has joined #ruby
hotpancakes has quit [Remote host closed the connection]
radialneon has quit [Max SendQ exceeded]
_blizzy_ has joined #ruby
<dudedudeman> wait a minute
<dudedudeman> to_a
<dudedudeman> ???
radialneon has joined #ruby
polysics has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
<dudedudeman> because .include? looks through an array for an object, and currently, my input is a string?
wildroman2 has joined #ruby
<bougyman> a string is an object.
wildroman2 has quit [Remote host closed the connection]
choke has joined #ruby
<dudedudeman> right
<dudedudeman> (stepping away from my desk for 2 seconds)
SylarRuby has quit []
jackjackdripper has quit [Quit: Leaving.]
izzol has quit [Ping timeout: 248 seconds]
bklane has quit []
zendrix has quit [Remote host closed the connection]
centrx has joined #ruby
gambl0re has quit [Remote host closed the connection]
zendrix has joined #ruby
hotpancakes has joined #ruby
<dudedudeman> ok
Mon_Ouie has quit [Ping timeout: 246 seconds]
hahuang65 has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
gambl0re has joined #ruby
phutchins1 has joined #ruby
<Ox0dea> dudedudeman: What are some of the things that [1,2,3,4,5] includes?
<Ox0dea> Name two.
drewo has joined #ruby
choke has quit [Ping timeout: 256 seconds]
<dudedudeman> objects and integers
<Ox0dea> Specifically, name two of the things in that array.
<dudedudeman> 1 and 4
<Ox0dea> Now, what are some of the things that 4 includes?
izzol has joined #ruby
Skizu has left #ruby [#ruby]
<dudedudeman> oh damn
<dudedudeman> 4?
<Ox0dea> The question doesn't really make sense, does it?
<dudedudeman> no
<dudedudeman> (you're really good at this btw)
<Ox0dea> ^_^
<Ox0dea> Aiming the question at strings is a little more troublesome, because strings do "contain" characters, but the principle remains.
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<Ox0dea> You don't ask an object whether it is included in an array, you ask the array whether it includes the object.
<dudedudeman> input = 'this be my input"; yes = ['yes', y'
<dudedudeman> dammit
jack_rabbit has quit [Ping timeout: 264 seconds]
<Ox0dea> But yes, I think you've got the idea.
kies^ has quit [Ping timeout: 244 seconds]
<dudedudeman> input = 'this be my input"; yes = ['yes', y']; yes.any? { |y| input[y] }
<dudedudeman> ??
choke has joined #ruby
<Ox0dea> Why not just use #include??
<dudedudeman> i guess i wrote that just based on being able to fully process in my mind what i'm learning here
<Ox0dea> #any? is for when you need more advanced behavior; in this case, you need only perform the very simple operation of asking an array if it contains a certain element.
<dudedudeman> break handle_yes if %w[YES Y].include?(input)
<Ox0dea> YEAH!
victortyau has quit [Quit: Leaving]
<dudedudeman> HOT DAMN
<dudedudeman> now i get exactly what you were saying when you said it was backwards
<al2o3-cr> sup!
dgutierrez1287 has joined #ruby
<dudedudeman> i was over here putting the break handle_ after all that lol
<Radar> MAGICAL
<dudedudeman> ok, lemme go do that to all the lines
* dudedudeman is in awe and wonder
mrmargolis has joined #ruby
<Ox0dea> dudedudeman: Journey > destination.
Azure has joined #ruby
<dudedudeman> mmmmm. gimme that sweet, sweet journey
<al2o3-cr> hmmm... someones got a good memory and it isn't me :P
* Ox0dea rocks out to "Don't Stop Believin'"
<dudedudeman> neil schonn!
<dudedudeman> piddly piddly piddly wheeeee
<dudedudeman> that's my best impression of a guitar solo on the internet
Rickmasta has joined #ruby
mandarinkin has quit [Remote host closed the connection]
sarkyniin has joined #ruby
<shevy> impressive
<dudedudeman> shevy shevy! i learned things!
<dudedudeman> i'm abiding so hard right now
hotpancakes has quit []
<dudedudeman> ok Ox0dea, it does indeed all work now!
Mon_Ouie has joined #ruby
<shevy> excellent!
<shevy> one day you'll pick up a GUI too, and then you can help me out
dgutierrez1287 has quit [Ping timeout: 255 seconds]
<dudedudeman> speaking of gui, one of my favorite tracks right now is by a dude named gui boratto
mrmargolis has quit [Ping timeout: 265 seconds]
<Ox0dea> shevy: You're supposed to be using JavaScript for GUIs. /s-ish
fgo has joined #ruby
<dudedudeman> i mean, at least opal?
<shevy> I could use php as well but who needs these inferior languages when you have ruby
bluOxigen has quit [Ping timeout: 256 seconds]
hinbody has quit [Quit: leaving]
mcclurmc has quit [Remote host closed the connection]
<dudedudeman> not really. now i want to do something else fancy to it
<Ox0dea> shevy: None of the GUI toolkits for Ruby even begin to approach idiomaticity.
<shevy> Ox0dea do you use any GUIs in ruby?
nateberkopec has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
pgatt has joined #ruby
<Ox0dea> I've used gtk2 a few times; it wasn't fun.
<shevy> why are these upcased?
choke has quit [Read error: Connection reset by peer]
<dudedudeman> :'(
<shevy> dudedudeman that looks weird
<Ox0dea> shevy: To ignore case, silly.
nym has quit [Ping timeout: 252 seconds]
B1n4r10 has quit [Ping timeout: 252 seconds]
<shevy> and they are not downcased?
phrozen77 has quit [Ping timeout: 252 seconds]
<Ox0dea> What's the difference?
<centrx> there should be an upyourscase
B1n4r10 has joined #ruby
nym has joined #ruby
<dudedudeman> i do see why you were mentioning that Ox0dea, as i'm staring at the code and my array pops out at me and makes it a wee bit more readable
phrozen77 has joined #ruby
pfish has quit [Quit: Page closed]
MuffinPimp has quit [Ping timeout: 252 seconds]
bartj3 has quit [Ping timeout: 252 seconds]
fgo has quit [Ping timeout: 265 seconds]
<Ox0dea> Aye, I think it's a very sensible decision, aesthetically if nothing else.
<shevy> oh that is true, upcased letters are bigger and thus easier to read
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
<dudedudeman> centrx would that be like a upYOURScase? upcase the middle part of whatever word or phrase you input?
<shevy> i keep my directories UPCASED/
a346 has quit [Quit: a346]
<Ox0dea> That's pretty goofy.
bonhoeffer has joined #ruby
<dudedudeman> see, i can't do that with my directories because I have to press shift and the letter(s) before i can start tabbing through them lol
<dudedudeman> (not asking for the same level of hand holding as previously provided mind you lol)
MuffinPimp has joined #ruby
whippythellama has quit [Quit: WeeChat 1.2]
bartj3 has joined #ruby
<shevy> >> "Ox0dea".upcase
cek has left #ruby [#ruby]
<shevy> true... Drug Enhancements Agency
blackmesa has joined #ruby
<ruboto> shevy # => "OX0DEA" (https://eval.in/391311)
<shevy> now he appears bigger
x3cion has quit [Ping timeout: 252 seconds]
<Ox0dea> But now I'm a three-letter agency. :(
<dudedudeman> what would you guys tell a noob to do next with this? i've got time to kill before i leave work
<shevy> UPCASE ALL THE THINGS
toretore has quit [Quit: Leaving]
Riking has quit [Ping timeout: 252 seconds]
Miron has quit [Ping timeout: 252 seconds]
Zarthus has quit [Ping timeout: 252 seconds]
tkuchiki has quit [Remote host closed the connection]
bhorn1 has quit [Quit: Leaving]
<Ox0dea> dudedudeman: It feels kinda repetitive, doesn't it?
enebo has quit [Quit: enebo]
<dudedudeman> it is not dry, no
<shevy> dudedudeman make it a class!
drPoggs has quit [Ping timeout: 252 seconds]
alxndr has quit [Ping timeout: 252 seconds]
Zarthus has joined #ruby
Centrixx has joined #ruby
jack_rabbit has joined #ruby
Obfuscate has quit [Ping timeout: 252 seconds]
<dudedudeman> would the while loop live inside or outside the class. honest question. i would argue outside
Riking has joined #ruby
snockerton has quit [Quit: Leaving.]
atomi has quit [Ping timeout: 252 seconds]
sevvie has quit [Ping timeout: 252 seconds]
chrisseaton has quit [Ping timeout: 252 seconds]
nym has quit [Ping timeout: 252 seconds]
ChasedSpade has quit [Ping timeout: 252 seconds]
<shevy> everything into the class!
bauruine has quit [Ping timeout: 252 seconds]
soahccc has quit [Ping timeout: 252 seconds]
cbednarski has quit [Ping timeout: 252 seconds]
heftig has quit [Ping timeout: 252 seconds]
kalleth has quit [Ping timeout: 252 seconds]
ccooke has quit [Ping timeout: 252 seconds]
ccooke has joined #ruby
phat4life has quit [Read error: Connection reset by peer]
<dudedudeman> imma put you in a class here in a minute
heftig has joined #ruby
phrozen77 has quit [Ping timeout: 252 seconds]
camilasann has quit [Ping timeout: 252 seconds]
sevvie has joined #ruby
soahccc has joined #ruby
Miron has joined #ruby
kalleth has joined #ruby
Obfuscate has joined #ruby
<centrx> the while loop lives IN the computer
x3cion has joined #ruby
<shevy> yeah
<dudedudeman> ha
_blizzy_ has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
drPoggs has joined #ruby
alxndr has joined #ruby
atomi has joined #ruby
nym has joined #ruby
phrozen77 has joined #ruby
havenwood has joined #ruby
chrisseaton has joined #ruby
Pupeno has quit [Remote host closed the connection]
it_tard has joined #ruby
camilasan has joined #ruby
benlieb has quit [Quit: benlieb]
cbednarski has joined #ruby
bf4 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
scylla has left #ruby [#ruby]
solocsha1 has joined #ruby
bauruine has joined #ruby
nfk has quit [Ping timeout: 252 seconds]
phat4life has joined #ruby
blue_deref has quit [Quit: bbn]
polysics has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
msgodf has joined #ruby
saadq has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
zotherstupidguy has joined #ruby
revdan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 250 seconds]
thelastinuit has quit [Quit: Textual IRC Client: www.textualapp.com]
workmad3 has quit [Ping timeout: 250 seconds]
polysics has quit [Ping timeout: 252 seconds]
nodeworm has quit [Quit: Switching to subconscious.]
mister_solo has joined #ruby
<dudedudeman> man there you go blowing my mind again
<dudedudeman> matchers
nodeworm has joined #ruby
<dudedudeman> there's something i didn't know about
<Ox0dea> dudedudeman: The much more "mind-blowing" part is #send, which is used to dynamically invoke methods.
iamninja has joined #ruby
<dudedudeman> it's like you set up a little database for it
<Ox0dea> I hesitated to show you this approach since #send is not very beginner-friendly, but I think you'll be able to grok the overall picture.
tkuchiki has joined #ruby
<dudedudeman> no definitely
blackmesa has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<dudedudeman> matchers is just a key value hash and you're iterating through that with input to invoke that method using send
Centrixx is now known as ChasedSpade
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> Yep, that's about the size of it. Well done! :)
jfarmer has joined #ruby
<dudedudeman> really!?
mister_solo has quit [Ping timeout: 248 seconds]
<Ox0dea> There are a few very minor details to do with how Hashes behave when enumerated over, but yeah, that was a pretty concise and accurate explanation of what's going on.
tkuchiki has quit [Remote host closed the connection]
Alina-malina has quit [Read error: Connection reset by peer]
<Ox0dea> >> {a: 1, b: 2}.to_a
<ruboto> Ox0dea # => [[:a, 1], [:b, 2]] (https://eval.in/391313)
<dudedudeman> that's trippy
joshbamboo1 has quit [Read error: Connection reset by peer]
mister_solo has joined #ruby
Alina-malina has joined #ruby
<Ox0dea> Well, a hash really is just a bunch of key-value pairs, right?
joshbamboo1 has joined #ruby
dfockler has quit [Remote host closed the connection]
<dudedudeman> right, which would you could look at as like, mini arrays?
<Ox0dea> Nah, totally different.
<dudedudeman> ok ok
<Ox0dea> It's just the reverse, actually; arrays are "dumbed down" hashes whose keys can only be integer indices.
<Ox0dea> That's not actually how they're implemented in Ruby, of course, but it works as a conceptual framework.
Deele has quit [Ping timeout: 256 seconds]
CaptainCibai has quit [Remote host closed the connection]
<dudedudeman> >> x = %w[this is an array]; x[2]
<ruboto> dudedudeman # => "an" (https://eval.in/391314)
CaptainCibai has joined #ruby
<dudedudeman> ^ integers
<dudedudeman> ok that makes sense
jack_rabbit has quit [Ping timeout: 248 seconds]
<Ox0dea> It's a lot easier to see that {name: 'Alice', age: 20} represents a person than ['Alice', 20].
<dudedudeman> class Person; Person.new(name: 'Alice', age: 20)
brain_shim has quit [Ping timeout: 255 seconds]
<Ox0dea> They contain the same data, more or less, but a hash (elsewhere called a "map", not coincidentally) provides a sort of legend for finding what you're looking for.
CaptainCibai has quit [Client Quit]
<jfarmer> dudedudeman If you meant that you could look at a key/value pair as a mini array then I think that's more than fair, it's actually one naïve way to implement hashes.
msgodf has quit [Ping timeout: 245 seconds]
<jfarmer> e.g., [('name', 'Alice'), ('age', 20)] (ignoring syntax)
<jfarmer> (look at a _single_ key/value pair, that is)
<jfarmer> dudedudeman An ordered list of elements of a fixed, pre-determined size is called a tuple (https://en.wikipedia.org/wiki/Tuple)
<dudedudeman> tuples. i guess it's time i start given those a once over and doing some reading. i've been avoiding them for months
<jfarmer> Ruby doesn't have first-order support for tuples, so you often see Ruby using 2-element Arrays where a tuple would (conceptually) be more correct.
<Ox0dea> jfarmer: Ah, sorry about that; I misinterpreted "mini array" to mean something similar to but somehow "less than" an actual array, whereas you just meant a tiny one. :)
<dudedudeman> yes! truly a tiny array
<dudedudeman> lol
<Ox0dea> Yes, key-value pairs are little two-element arrays that, when grouped, represent a hash.
<jfarmer> Some languages (like Python) do have first-order support for tuples and treat them as something distinct from arrays/lists.
ta has quit [Remote host closed the connection]
* Ox0dea hisses.
gamename has joined #ruby
<jfarmer> Whoa, is there a snake in here?
<Sou|cutter> you could probably make a tuple factory like Struct...
bf4 has quit [Read error: Connection reset by peer]
Deele has joined #ruby
<jfarmer> Definitely
<jfarmer> In fact, a struct is to a hash as a tuple is to an array
<jfarmer> (for dudedudeman)
<dudedudeman> i'm following along here. this is great
<zenspider> class Tuple < Array; def initialize(*stuff); super(); self.push(*stuff); self.deepfreeze; end; end
<Ox0dea> dudedudeman: What's that pesky underscore doing on Line 29?
sepp2k has quit [Quit: Leaving.]
<dudedudeman> in yours?
<Ox0dea> Oui.
blackmesa has quit [Ping timeout: 250 seconds]
revdan has joined #ruby
Musashi007 has joined #ruby
<dudedudeman> well, you passed it in as a string, so you're interpolating within to pass the appropriate matchers value in to it, there for building the last part of the method you need to invoke it?
brain_shim has joined #ruby
<Ox0dea> Ah, sorry, I think I've probably jumped ahead.
pengin has quit [Remote host closed the connection]
<dudedudeman> oh, wait. i was looking at line 30
<dudedudeman> sorry
cajone has joined #ruby
<dudedudeman> dang. i was like, i understand that! lol
nym has quit [Quit: Connection closed for inactivity]
<Ox0dea> For the record, your explanation of Line 30 was spot-on! :)
<dudedudeman> LE WOOT
hahuang65 has quit [Ping timeout: 265 seconds]
<dudedudeman> what we're doing here is one of my favorite types of learning. pushing myself ot figure out a new concept, but recognizing ones that i do know as we go along. helps reinforce the new and the old
cajone has left #ruby [#ruby]
<dudedudeman> i'll be honest. i am not under full understanding of what the _ on line 29 does
brain_shim has quit [Ping timeout: 265 seconds]
<dudedudeman> but, i am not thinking that it is pesky
Muhannad has joined #ruby
<dudedudeman> does it have to do with account for the _ in handle and matchers?
<Ox0dea> Nah, that's just to match the underscores in the method names.
<apeiros> zenspider: .concat(stuff) - faster than .push(*stuff) :)
<apeiros> or in this case, actually just .replace
<dudedudeman> Ox0dea: man this has been great
<Ox0dea> dudedudeman: I've quite enjoyed watching things click for you. :)
<dudedudeman> i've got to leave work now, but i'm glad you ended up showing me that last example as it leaves me somethign to walk away with and learn later tonight when i get some time to study
<dudedudeman> Ox0dea: Thanks!!! it's been really encouraging. for many reasons(i don't have a job in code, looking for one, and often feel like i might never get there, etc etc)
<dudedudeman> so it's nice to know some things have stuck along the way. this will be one of those as well!
mleung has quit [Quit: mleung]
<Ox0dea> All in good time (and practice), my friend.
<dudedudeman> yarp. cheers for now!
<Ox0dea> YARP = Yet Another Ruby Preprocessor, anyone?
<Ox0dea> We could use end+, and wouldn't that be just grand?
workmad3 has joined #ruby
rcvalle has quit [Quit: rcvalle]
baweaver has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 264 seconds]
hololeap has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
ecksit has joined #ruby
Musashi007 has quit [Quit: Musashi007]
[H]unt3r has joined #ruby
mark___ has joined #ruby
mark___ has quit [Client Quit]
revdan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mark___ has joined #ruby
mark___ has quit [Client Quit]
fgo has joined #ruby
mark8773955 has joined #ruby
bonhoeffer has quit [Ping timeout: 248 seconds]
Deele has quit [Ping timeout: 256 seconds]
bricker has joined #ruby
Scroff has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mark8773955 has quit [Client Quit]
zendrix has quit [Remote host closed the connection]
findaway has quit [Ping timeout: 244 seconds]
gamename has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 265 seconds]
gamename has joined #ruby
<Senjai> Dear ruby
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
<Senjai> How can I exclude a foldet from a /*/** glob
bricker has quit [Ping timeout: 276 seconds]
Deele has joined #ruby
<Senjai> e.g. I want spec/javascripts/*/**, but not the spec/javascripts/legacy folder
CloCkWeRX has joined #ruby
bradleyp_ has joined #ruby
zacts has joined #ruby
idafyaid has quit [Ping timeout: 252 seconds]
<zenspider> reject
<Senjai> zenspider: Is that the only solution
<zenspider> select
<Senjai> Lol
<havenwood> Senjai: You could look at the Find module: http://ruby-doc.org/stdlib/libdoc/find/rdoc/Find.html
nateberkopec has quit [Quit: Leaving...]
<zenspider> personally, I can't stand the find module and go out of my way to contort globs to avoid it
<Senjai> yeah, but I meant in the glob
Rickmasta has joined #ruby
<zenspider> clearly written in the 90s
bonhoeffer has joined #ruby
bradleyprice has quit [Ping timeout: 248 seconds]
zendrix has joined #ruby
Scroff has quit [Remote host closed the connection]
gamename has quit [Ping timeout: 264 seconds]
woodruffw has quit [Quit: And then he took off.]
IanV0rn2341 has quit []
serivich has joined #ruby
ledestin has joined #ruby
AndyBotwin has joined #ruby
<havenwood> Senjai: You could also glob together multiple globs. Or Rake.
brain_shim has joined #ruby
allomov has quit [Remote host closed the connection]
charliesome has joined #ruby
m3_del has joined #ruby
<Senjai> havenwood: Unfortunately i have to pass in the string that is used as a matcher
<Senjai> Can't pass in raw files
<Senjai> filenames
<havenwood> Senjai: ah
<havenwood> Senjai: Can't just glob it all and toss out the baddies?
Deele has quit [Ping timeout: 256 seconds]
<Senjai> Nope
<Senjai> Has to be a string that is passed in to whatever the lib uses to glob
<Senjai> Considering opening an issue about the fact I cannot manually pass in files
<Senjai> This is Teaspoon btw
shadoi has quit [Quit: Leaving.]
<havenwood> I'd like to be in a code reading group where you pick a gem or part of a gem to read then meet and discuss.
zzor has quit [Ping timeout: 252 seconds]
<Senjai> I would
<Senjai> The meet part is hrd
<havenwood> Senjai: Aye, that's the catch.
blue_deref has joined #ruby
<Senjai> Google hangouts is not terrible
<zacts> Senjai: does google hangouts require you to own a google account?
<zacts> or can you join as a guest?
<havenwood> zacts: Dunno
<Ox0dea> Senjai: 2_224_981 assertions.
<zacts> I assert that that is too many assertions
<Senjai> StatYou cannot
<Senjai> who doesn't have a google account ;)
<Senjai> Ox0dea: dayum
<havenwood> Ox0dea: But are the tests tested? Test all the waaaaaaay down.
Aswebb_ has joined #ruby
<Ox0dea> havenwood: minitest has 868 assertions. I reckon that counts for something.
ponga has joined #ruby
ponga has quit [Client Quit]
anjen has quit [Quit: anjen]
<havenwood> Ox0dea: Hooah!
<Ox0dea> This feckin' globbing problem of Senjai's!
<Ox0dea> It seems Dir uses some slight modification of the shell syntax.
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai> Ox0dea: Right.
* Senjai always bringin dem challenging questions
<Ox0dea> Regardless, it's gonna be ugly as hell.
bonhoeffer has quit [Quit: bonhoeffer]