<pipework>
garyserj: there's a plethora of unsatisfactory answers on this subject.
<baweaver>
garyserj: Simple answer is you need to do some searching as this has been answered quite a few places already.
danoo_ has joined #ruby
NIGerGERmany has joined #ruby
<NIGerGERmany>
hi everyone i love ruby it's a great language
<baweaver>
but in general, I wouldn't
shtirlic has joined #ruby
<sevenseacat>
!ban NIGerGERmany
<NIGerGERmany>
why?
rmoriz has joined #ruby
<sevenseacat>
dammit ruboto
<NIGerGERmany>
i came here to help everyone
RealMarc has joined #ruby
<NIGerGERmany>
i'm an experienced rubyist
<pipework>
We're an exclusive club.
<NIGerGERmany>
what did i do to deserve a ban?
<pipework>
sevenseacat: Can you +b the web gateway for now?
NIGerGERmany was banned on #ruby by sevenseacat [*!6883d781@gateway/web/freenode/ip.104.131.215.129]
NIGerGERmany was kicked from #ruby by sevenseacat [Your behavior is not conducive to the desired environment.]
<baweaver>
pipework: apeiros actually did some stats on that
<pipework>
You shouldn't include the number between the ! and the @, just another asterisk would be preferable, but banning the whole web gateway for a few hours is often best when there's repetitive offenders.
jalcine has quit [K-Lined]
larissa has quit [K-Lined]
sparr has quit [K-Lined]
<baweaver>
Turns out to be something along the lines of 260 unique nicks and 30 some bans
sparr has joined #ruby
larissa has joined #ruby
jalcine has joined #ruby
threh has joined #ruby
kinduff has quit [Quit: brb]
nateberkopec has quit [Quit: Leaving...]
<Radar>
pipework: happy?
<shevy>
:>
zreisman has joined #ruby
<Radar>
wow the #ruby ban list is full of nick bans
<shevy>
garyserj did you try ruby-gnome bindings yet?
yh_ has quit [Ping timeout: 245 seconds]
<pipework>
Radar: Yeah should be fine. But if you see them pop up again from the web gateway, you should just ban *!*@gateway/web/freenode/* I think, but only for a few hours until the spam attack abates.
<sevenseacat>
its probably me doing it wrong.
<shevy>
garyserj there are not that many options ... ruby-gnome/ruby-gtk, ruby-qt, shoes, ruby-tk, ruby-wxwidgets... hmm fxruby in the past... I may have forgotten a few more
northfurr has quit [Quit: northfurr]
<shevy>
cats do not do anything wrong by definition alone
<Radar>
pipework: this is not an hourly thing. This is something that happens nearly every day
<pipework>
They do things precisely as they mean for them to be done.
<Radar>
pipework: banning the gateway means that we ban any regular users who are connected on that too
<pipework>
Radar: No, there's an actual attack going on against a lot of freenode right miaow, that's what I mean.
northfurr has joined #ruby
<shevy>
lol
<shevy>
right miaow - you did that on purporse
<pipework>
A large number of rather large channels are seeing much worse.
yh_ has joined #ruby
<pipework>
4 hours of not being able to access this channel isn't that bad. I bet you could set a ban-forward though.
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wallerdev has quit [Quit: wallerdev]
<Radar>
A ban forward would be fine but I am not allowed to do things without consulting with other ops :)
<Radar>
And it wouldn't completely solve the problem anyway, as those other users can just join whenever
NIG_GERS has joined #ruby
<NIG_GERS>
who's the joker that klined me?
<pipework>
Radar: I don't personally mind if someone just keeps banning these spammers.
<Radar>
!ban NIG_GERS !T 1D
NIG_GERS was banned on #ruby by ChanServ [NIG_GERS!*@*]
NIG_GERS was kicked from #ruby by ChanServ [User is banned from this channel]
<Radar>
I'm fine with banning them as they pop up.
<sevenseacat>
oh thats how to do it.
duderonomy has joined #ruby
<pipework>
That bot should be fixed.
* sevenseacat
writes notes
<pipework>
I could keep the same IP and everything and just change the ident and rejoin.
<Radar>
pipework: Yes.
* Radar
will stay op'd
<pipework>
Good luck and good hunting.
<Radar>
pipework: How do I set a +b ban with a time limit?
kinduff has joined #ruby
<pipework>
Radar: I don't think you can.
<Radar>
Fun.
longfeet has joined #ruby
<pipework>
Radar: Freenode staff sometimes disallows connecting from different gateways anways during these onslaughts.
<sevenseacat>
when i went to ask them, they just told me to add +q ~a.
<sevenseacat>
to the channel.
davedev24_ has quit []
<Radar>
sevenseacat: :) That's right.
<Radar>
That would totally abate these spammers imo
* sevenseacat
shrugs
<sevenseacat>
that got shot down, so
<pipework>
sevenseacat: Quiet all unidentified accounts works, but then you need to make web gateway users auth with nickserv.
<Radar>
notice how #rubyonrails doesn't get those spammers?
<sevenseacat>
pipework: i have no problem with that.
<pipework>
Me neither.
<pipework>
Just raises that bar a little more.
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat>
i would have no problem with disallowing the web gateway entirely.
Hien has joined #ruby
<Radar>
how about we +q the web gateway?
<sevenseacat>
better put it to another vote.
<Radar>
*shrug* I will just ban people as they keep coming in
<Radar>
I can keep it up longer than they can ;)
<pipework>
Y'all might benefit from enlisting a freenode staffer that also likes ruby. There's generally workflows for handling this stuff that's an expected norm, so you don't need to democratize the situation if you want.
<sevenseacat>
people will crack the shits if we dont.
<pipework>
It's mostly just a solved problem on how to handle that stuff.
That1Guy has joined #ruby
<Radar>
sevenseacat: yup :)
<pipework>
sevenseacat: I'd say they'd be amateurs, as there's IRC social protocol for ops that is likely older than the people who would get upset.
<sevenseacat>
lol
<pipework>
But I'm just glad not to be an op. I'd have too much fun.
mistermocha has joined #ruby
pontiki has joined #ruby
<pontiki>
hallo
blazes816 has joined #ruby
afrianska has quit [Ping timeout: 244 seconds]
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
hey pontiki you missed a lot of troll-action today
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
afrianska has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
cleopatra has joined #ruby
<cleopatra>
helloooooooooooo
marsjaninzmarsa has joined #ruby
tcrypt has quit [Ping timeout: 244 seconds]
<marsjaninzmarsa>
yo
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
claptor has joined #ruby
<cleopatra>
hello friend good ruby ebook?
goodcodeguy has joined #ruby
baweaver has quit [Remote host closed the connection]
polysics has quit [Remote host closed the connection]
charliesome has joined #ruby
mello has quit [Ping timeout: 258 seconds]
moretti has quit [Quit: Leaving...]
ohaibbq has joined #ruby
riotjones has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hewenhong has joined #ruby
awwaiid has joined #ruby
riotjones has quit [Ping timeout: 245 seconds]
rkazak has joined #ruby
workmad3 has joined #ruby
rkazak has quit [Remote host closed the connection]
rkazak has joined #ruby
Rickmasta has joined #ruby
afrianska has quit [Ping timeout: 264 seconds]
Brando753 has joined #ruby
afrianska has joined #ruby
nobitanobi has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
<hololeap>
hi everyone. if i have two modules which define a method and i include both, which will get the preference? does one erase the other or can it call the other's through super()?
hewenhong has quit [Remote host closed the connection]
weemsledeux has joined #ruby
<sevenseacat>
the one you include later i believe.
<Radar>
super in the class's method will call the most recently included one, but you can get to the method before that by calling super on that method.
<Radar>
This is because of Cow's ancestors: irb(main):024:0> Cow.ancestors
<Radar>
=> [Cow, B, A, Object, Kernel, BasicObject]
<mozzarella>
Radar: that's what I think of when I see American dates
tesuji has joined #ruby
<Radar>
meatchicken: Use Date.strptime like I showed.
<sevenseacat>
lol american dates
jenrzzz has joined #ruby
<miah>
'murica
casadei has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
Soda has joined #ruby
<miah>
we're also stuck on imperal measurements
awwaiid has joined #ruby
towski_ has quit [Remote host closed the connection]
MatthewsFace has quit [Remote host closed the connection]
Robr3rd has joined #ruby
xxneolithicxx has quit [Ping timeout: 255 seconds]
chinmay_dd has joined #ruby
jack_rabbit has quit [Ping timeout: 252 seconds]
<Robr3rd>
While running `rake test` (learning Ruby) and I'm running across this message from rake: "NoMethodError: undefined method `has_key?` for nil:NilClass" and am unsure of what to make of it. Google has been unhelpful. The method is being called ona hash.
<certainty>
flughafen: it does, but it takes time to cool down
afrianska has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
Alayde has joined #ruby
jmignault has quit [Read error: Connection reset by peer]
Coldblackice has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
Macaveli has joined #ruby
gauke has joined #ruby
kriskropd has quit [Ping timeout: 252 seconds]
gluten_hell has joined #ruby
gusrub has quit [Quit: Leaving]
thiagovsk has quit [Quit: Connection closed for inactivity]
arup_r has joined #ruby
kriskropd has joined #ruby
Hijiri has joined #ruby
afrianska has quit [Ping timeout: 258 seconds]
oo_ has quit [Remote host closed the connection]
ravenreborn_ has joined #ruby
lyuben_ has joined #ruby
oo_ has joined #ruby
threh has quit [Quit: Leaving]
ravenreborn has quit [Ping timeout: 264 seconds]
phutchins has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
<apeiros>
Robr3rd: rails' blank? is pure ruby. you can simply copy the code. alternatively you can depend on the active_support gem and require 'active_support/core_ext'
awwaiid has quit [Ping timeout: 244 seconds]
saadq has quit [Remote host closed the connection]
wallerdev has joined #ruby
lkba has quit [Quit: Bye]
lkba has joined #ruby
msgodf has quit [Ping timeout: 246 seconds]
Ilyes512 has joined #ruby
antgel has joined #ruby
<Radar>
sevenseacat: Yes, it looks like the spammer is paying for the privilege. Looking at the other cases they're also using some VPN services to do the same thing. Whoever it is, they're pretty bored and wasting their time :)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
awwaiid has joined #ruby
saadq has joined #ruby
hanmac has quit [Ping timeout: 265 seconds]
blueOxigen has quit [Ping timeout: 264 seconds]
msgodf has joined #ruby
dcarmich has joined #ruby
User458764 has quit [Ping timeout: 265 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has joined #ruby
gluten_hell_ has joined #ruby
mello has joined #ruby
sinequanon has quit [Remote host closed the connection]
djbkd has quit [Quit: Leaving...]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
gluten_hell has quit [Read error: Connection reset by peer]
Chagel has joined #ruby
User458764 has joined #ruby
jack_rabbit has quit [Ping timeout: 252 seconds]
ebonics has quit [Ping timeout: 246 seconds]
Musashi007 has joined #ruby
baweaver has quit [Remote host closed the connection]
mello has quit [Ping timeout: 276 seconds]
sdwrage has joined #ruby
Takle has quit [Remote host closed the connection]
<KrzaQ>
What if there are two consecutive threes, for example?
<ljarvis>
try it
<KrzaQ>
I'd like them to be kept in the same array, I guess
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat>
oh ho new requirements
lyuben_ has quit [Quit: Leaving]
<ljarvis>
sevenseacat: is that something a pimp would say?
<KrzaQ>
Obviously, you didn't expect my requirements not to change, did you? ;)
<sevenseacat>
ljarvis: lol
<apeiros>
KrzaQ: it would have been a pleasant surprise, though
yeticry has quit [Ping timeout: 258 seconds]
<sevenseacat>
KrzaQ: to be fair, you're a programmer, we have slightly higher expectations
<apeiros>
ljarvis: great. now I picture sevenseacat with fedora, fur coat and a pimp stick
<KrzaQ>
mhm
Takle has quit [Ping timeout: 264 seconds]
granthatcher has joined #ruby
Igorshp has joined #ruby
<KrzaQ>
I'm tired and in hurry :P
<sevenseacat>
now i want a pimp stick
<ljarvis>
hah
dudedudeman has joined #ruby
<adaedra>
You're all weird in here >_>
<ljarvis>
KrzaQ: open irb and play to your heards content
<ljarvis>
heard?
<apeiros>
that said, I actually don't have any cliche on woman pimps. but I think the male pimp cliche is fabulous with women too :D
yh_ has joined #ruby
yeticry has joined #ruby
* sevenseacat
bops noobs and spammers over the head with said pimp stick
<KrzaQ>
:)
<ljarvis>
pimp stick bop
<KrzaQ>
I have pry open
<ljarvis>
that's the name of my band
* apeiros
enjoys waiting for his integration test with external API
<KrzaQ>
someone recommended it over irb
iwishiwerearobot has quit [Quit: >:(]
Takle has joined #ruby
<KrzaQ>
someone here*
<ljarvis>
apeiros: that sounds teeth grindingly awesome
* sevenseacat
is sitting waiting for a deploy to finish
* apeiros
also loves the weakness of those tests because partner devs have no idea about automated tests…
<ljarvis>
KrzaQ: sure, pry is nice too
ghr has joined #ruby
<ljarvis>
is it bad if I'm not waiting for anything?
<apeiros>
maybe?
<ljarvis>
but maybe not? I'll go with that
<ljarvis>
actually I am waiting for an email reply
<ljarvis>
from a week ago..
mikecmpbll has joined #ruby
<ljarvis>
damn if pry vendors slop i will lose all of my delicious download figures
tomphp has joined #ruby
<apeiros>
you know that tests are bad when you have IDs to query for in config files because they might change.
dudedudeman has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
einarj has joined #ruby
skammer is now known as skammer|afk
yh__ has joined #ruby
axwl has joined #ruby
Exponential has joined #ruby
zarubin has joined #ruby
<ljarvis>
i made a plugin for atom that i'm really regretting
<sevenseacat>
hmm what should i work on now
<apeiros>
rm?
yh_ has quit [Ping timeout: 244 seconds]
wildroman2 has quit [Remote host closed the connection]
<ljarvis>
yeah i might, it's mostly because i don't use atom but there's pressure to update it so now i feel like a jerk
dudedudeman has joined #ruby
wildroman2 has joined #ruby
<apeiros>
eh, you don't owe anybody anything
<sevenseacat>
+1 to that
<ljarvis>
true!
<sevenseacat>
put a note saying 'abandoned, free to good home'
dumdedum has joined #ruby
Zai00 has joined #ruby
<apeiros>
yeah, declaring abandonment is IMO good style.
<ljarvis>
yep good idea
<Exponential>
Hey guys, I am a ruby noob. I am getting an undefined method error. Could someone shine some light and also critique my code? http://pastebin.com/mmk9E5z2
<ljarvis>
Exponential: define your method before you use it
neanderslob has joined #ruby
granthatcher has joined #ruby
<ljarvis>
nice filename
granthatcher has quit [Max SendQ exceeded]
<Exponential>
ljarvis: Ah, so its not like java in that you actually have to have the method above the point at which you use it?
granthatcher has joined #ruby
skammer|afk is now known as skammer
granthatcher has quit [Max SendQ exceeded]
<adaedra>
Exponential: Ruby will process your file in one pass, from begin to end. If you use something, you have to have made it before the use.
<ljarvis>
Exponential: Ruby basically runs code line by line, so yeah things must exist before they're used
<Exponential>
ljarvis adaedra : Awesome, thanks :D Any critique on my code?
workmad3 has quit [Ping timeout: 264 seconds]
zel is now known as drzel
hewenhon_ has quit [Remote host closed the connection]
<adaedra>
Ruby guidelines say 2 spaces for indentation
<ljarvis>
Exponential: yeah, a few things
<adaedra>
:set sw=2 sts=2 et
hewenhong has joined #ruby
<adaedra>
Don't use or, use ||
Symphony_Dawn has joined #ruby
granthatcher has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
<ljarvis>
Exponential: the first thing is that you read words.txt on every loop
<ljarvis>
read it once
ndrei has joined #ruby
hewenhon_ has joined #ruby
<adaedra>
The treatment you do in get_guessing word is also made at each loop, I think you could do it only once too
antgel has quit [Ping timeout: 252 seconds]
<ljarvis>
also, you can do all of the string sorting once too
<ljarvis>
heh
<adaedra>
heh
hmnhf_ has joined #ruby
codecop has quit [Quit: Išeinu]
lkba has quit [Ping timeout: 244 seconds]
<ljarvis>
there are other points about considering not slurping in your file and storing words differently but since this is homework, you should investigate those ideas yourself (we can point you in the right direction)
idafyaid has quit [Ping timeout: 244 seconds]
hewenhong has quit [Ping timeout: 256 seconds]
<Exponential>
Okay, I changed things around a bit and got rid of the redundant re-reads. https://gist.github.com/RecursiveDefinition/3a9aefa232d9ea0b15fc. I feel like the whole finding the 2000 most frequency words could be done a lot tidier, any pointers?
<adaedra>
`cat words | uniq -c | sort -n | head -n 2000`
<ljarvis>
nice one that's better. I would store the words in a Hash though, with word => count; this way you're not adding duplicates and having to re-count them.
<adaedra>
:p
<ljarvis>
then I wouldn't even add them if they don't match your criteria (i.e not 5-6 chars long)
<Symphony_Dawn>
nyan cat
<adaedra>
If you're always taking just the 2000 first elements, just remove extra elements
<adaedra>
taking a slice of 2000 elements to do a sample at each loop run is... :s
dudedudeman has quit [Ping timeout: 256 seconds]
edwinvdg_ has joined #ruby
<Exponential>
adaedra: Problem is the words are not sorted or unique in the words.txt
<ljarvis>
you could just use rand where x is guarenteed to be less than 2000
<Exponential>
And I want the 2000 most common
<adaedra>
But you don't resort them at each loop run
krz has quit [Ping timeout: 264 seconds]
<adaedra>
you could slice the [0,2000] range before the loop and don't slice anymore
last_staff has quit [Read error: Connection reset by peer]
<ljarvis>
Exponential: can you explain to me what you think that's doing?
edwinvdg_ has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
hewenhong has joined #ruby
<Exponential>
ljarvis: Creating a HashMap with unique entrys, with key/value word/count
<adaedra>
also, for keeping the words (l6), I would rather use a range with #include? rather than this comparaison. It's a little bit more understandable, and is much easier to change
dudedudeman has joined #ruby
<ljarvis>
Exponential: so you remove duplicates, and then count (presumably, for duplicates)
<ljarvis>
Exponential: fwiw you can create hashes with default values. like; word_count = Hash.new(0); word_count["foo"] += 1; which might be able to help you here?
<ljarvis>
words.count(word) will traverse your entire array for every call; which seems like it could be generally slow
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
<ljarvis>
since you do that for every word.. well, you can probably calculate how many times it happens
<Exponential>
ljarvis: So in your above example, how would I replace "foo" with each word in the array?
<ljarvis>
Exponential: well, you already know how to loop through an array, right?
hmnhf_ has quit [Ping timeout: 265 seconds]
<Exponential>
hash.each { |word| hash[word] += 1}
<Exponential>
?
<ljarvis>
bingo
<Exponential>
Would that be faster than what I had before?
<ljarvis>
much faster
<apeiros>
except it's not hash.each but words.each
GriffinHeart has quit [Remote host closed the connection]
<ljarvis>
^
<adaedra>
much fast
<adaedra>
such performance
<adaedra>
wow
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Exponential>
so to compress this line : words = file.select {|word| word.length == 5 || word.length == 6} I want to use a range, but simply changing it to words = file.select {|word| word.length == (5..6)} doesn't work?
<adaedra>
(5..6).include? word.length
<apeiros>
word.length.between?(5,6)
<ljarvis>
yeah, I actually prefer what you have there; but this is a good example of different peoples styles
doublemalt_ has quit [Ping timeout: 250 seconds]
<adaedra>
actually, I didn't know about #between? :x
<adaedra>
Ruby has so many methods :x
<apeiros>
it's faster and doesn't create temporary range :)
<apeiros>
/nick premature_optimizer
Spami has quit [Quit: This computer has gone to sleep]
banister has joined #ruby
<adaedra>
D:
<ljarvis>
:P
<adaedra>
:D *
Zai00 has quit [Quit: Zai00]
<ljarvis>
you wait, we'll about to discuss each_line
Spami has joined #ruby
<ljarvis>
we're*
<apeiros>
though, that kind of thing is IMO not in the category of premature optimization.
<adaedra>
so optimized, wow
<apeiros>
very adaedra
<adaedra>
:D
<Exponential>
Is this line too much : common_words = words.sort_by { |word| hash[word] }[0..1999], or would it be better to put the slice into a new variable?
<toretore>
premature is fine as long as it's not at the cost of other things
rkazak has quit [Quit: Sleep.....ing....]
<adaedra>
I'd have used #slice!
<apeiros>
.first(2000) :)
spider-mario has quit [Read error: Connection reset by peer]
<ljarvis>
Exponential: it's fine, though I prefer .first(2000) from a style perspective
dudedudeman has quit [Ping timeout: 250 seconds]
edwinvdg_ has joined #ruby
<Exponential>
Wow, ruby has so many handy methods...
edwinvdg_ has quit [Remote host closed the connection]
<adaedra>
Too many, according to some people
edwinvdg_ has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
<ljarvis>
too many aliases
Zai00 has joined #ruby
edwinvdgraaf has joined #ruby
<jhass>
apeiros: Range#include? is optimized for numbers
<ljarvis>
you still have to create the range on every loop
<ljarvis>
(that was his point i think)
<jhass>
mh, true
<apeiros>
jhass: sure. it still has a longer pathway to go through
<ljarvis>
jokke: what does the following return on the command line? ruby -r 'net/http/persistent' -e 'Net::HTTP::Persistent'
<jokke>
ljarvis: nothing
<ljarvis>
then it's working
<ljarvis>
there must be a different issue
<jokke>
hm
workmad3 has joined #ruby
<jokke>
i got the error when running tests
<jokke>
dunno if rspec could have something to do with it
skammer is now known as skammer|afk
<jhass>
check inside the test if $LOADED_FEATURES.include? "/home/jokke/.gem/ruby/2.2.0/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb" is true
yh_ has joined #ruby
<jokke>
alright
<jhass>
also Gem.find_files("net/http/persistent") in there might be interesting
dudedudeman has joined #ruby
<jokke>
jhass: first returns true
<jokke>
second returns ["/home/jokke/.gem/ruby/2.2.0/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb", "/home/jokke/.gem/ruby/2.2.0/gems/net-http-persistent-2.9.4/lib/net/http/persistent"]
<jhass>
uh, wut
<ljarvis>
presumably defined?(Net::HTTP::Persistent) returns false in your test?
skammer|afk is now known as skammer
<jhass>
can you share the complete output of the failing test run?
skammer has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mikecmpbll>
lol
<jokke>
ljarvis: yeah
<jokke>
or nil
<jokke>
also tried ::Net...
<jokke>
but the result is the same
<jokke>
jhass: yeah
unshadow has joined #ruby
<jhass>
spring or anything you can kill?
<jokke>
no spring
<jokke>
simple gem
<mikecmpbll>
error with trace? who knows, might be a clue in there.
<jokke>
mikecmpbll: the error is very weird though
dEPy has joined #ruby
<Exponential>
ljarvis adaedra: Thanks for the help, attended a ruby intro today at campus and they gave us the challenge to make a scrambler word game. This is my implementation https://gist.github.com/RecursiveDefinition/309cb60f64529abfe6ae. Your guys help was great :D Already love the Ruby community
RegulationD has quit [Ping timeout: 255 seconds]
<mikecmpbll>
jokke: the error is happening in the call to .http which is before you even do the .request call :/
<mikecmpbll>
#doesnotunderstand
<jokke>
mikecmpbll: you're right :D
* jokke
doesn't understand either
scripore has joined #ruby
sigurding has quit [Quit: sigurding]
<mikecmpbll>
i could maybe get it if referencing the Net::HTTP::Get constant somehow unloaded Net::HTTP::Persistent
<mikecmpbll>
but you said that even with the reference it works so, meh
<jokke>
aah
<jokke>
aaaaaaah
<mikecmpbll>
..
<jokke>
i do some const stubbing in my tests :P
<mikecmpbll>
-_-
<jokke>
:D
<ljarvis>
eh back
<ljarvis>
well you've basically figured it out so great
<mikecmpbll>
haha
<jokke>
ljarvis: yeah \o/
<ljarvis>
naughty stubbing
<mikecmpbll>
rather stub my toe.
<KrzaQ>
if I have { 1 => [ 2, 3] }, can I easily turn this into [[1,2], [1,3]]? Support for nesting would be nice. I want to flatten my data
<jhass>
.map {|k, v| [k, v.flatten] } ?
<jhass>
oh, nvm
<KrzaQ>
I am nesting maps right not
<jhass>
.each_with_object([]) {|(k, values), pairs| values.flatten.each do |v| pairs << [k, v] end end
<mikecmpbll>
your limited example doesn't give much of an idea what you want to do, but ..
<KrzaQ>
.map{|k,v| v.map{|u,x| [k, u, x] }}
<KrzaQ>
but I'm running out of letters fast
<apeiros>
*sob*, rails magic again…
sevenseacat has quit [Quit: Me dun like you no more.]
<mikecmpbll>
heh
scripore has quit [Quit: This computer has gone to sleep]
<canton7>
just reverse the inner tuples, and done!
<mikecmpbll>
ha
anisha has joined #ruby
scripore has joined #ruby
neanderslob has quit [Remote host closed the connection]
scripore has quit [Client Quit]
fu2ristiq has joined #ruby
<fu2ristiq>
hi everyone
<jhass>
hi
<mikecmpbll>
fu2ristiq: hi
roshanavand has joined #ruby
marr has joined #ruby
phutchins has joined #ruby
_blizzy_ has joined #ruby
<fu2ristiq>
so, what's up/
roshanavand has left #ruby [#ruby]
fu2ristiq has left #ruby ["WeeChat 1.1.1"]
<mikecmpbll>
ruby stuff.
roshanavand has joined #ruby
<mikecmpbll>
well that was congenial.
Musashi007 has quit [Quit: Musashi007]
<apeiros>
trying to add a convenient way to have custom normalized & validated AR attributes. it's annoying, though. and I don't know enough about AR's inner workings. *sobs again*
quimrstorres has quit [Remote host closed the connection]
MafProd has joined #ruby
<mikecmpbll>
custom normalized & validated?
quimrstorres has joined #ruby
bluOxigen has joined #ruby
<apeiros>
f.ex. in your model: `credit_card_number :colname`. adds a validation for colname. and the setter will normalize input. such as strip dashes etc.
phutchins has quit [Ping timeout: 250 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A205B064 has quit [Ping timeout: 258 seconds]
startupality has quit [Quit: startupality]
<apeiros>
and why I always write Valdiator instead of Validator is beyond me :D
<mikecmpbll>
haha
<mikecmpbll>
seems like it should be relatively straight forward, unless I'm misintepreting it?
OrbitalKitten has joined #ruby
MafProd has quit [Client Quit]
withnale_ has joined #ruby
<apeiros>
depends on how much ugly you want to accept.
krz has joined #ruby
<mikecmpbll>
i'd just extend AR::Base with a credit_card_number method which adds a validation and overrides the setter
<apeiros>
see, and I'd prefer to have that stuff in reusable modules. and then the fight with AR's magic begins :)
<apeiros>
such as `validate :col, custom_validator: true` expecting precisely a class named CustomValidatorValidator. which must either be toplevel or in a module you include into the model.
<mikecmpbll>
i see
<apeiros>
well, I guess I just close my eyes and live with the ugly.
<apeiros>
lunch time
<adaedra>
bon ap'
<mikecmpbll>
see validates_with, perhaps.
ndrei has quit [Read error: Connection reset by peer]
n008f4g_ has quit [Ping timeout: 264 seconds]
<mikecmpbll>
or even better, validates :cc, credit_card: true; and then define a CreditCardValidator
<ljarvis>
apeiros: that's the kind of thing I'd just use a model and extend
<mikecmpbll>
works out the box.
<ljarvis>
mikecmpbll: does that allow you to mutate the column?
<ljarvis>
i guess it would
<ljarvis>
module and extend*
<mikecmpbll>
ljarvis: /shrugs, forgot about that bit. probably could get there.
<ljarvis>
but I like keeping things in separate modules
Takle has quit [Remote host closed the connection]
<mikecmpbll>
yep.
fu2ristiq has quit [Quit: WeeChat 1.1.1]
<mikecmpbll>
although .. include not extend
<ljarvis>
I changed it, you were to quick to click
<ljarvis>
too*
<mikecmpbll>
oh :D
<ljarvis>
:P
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
sandelius has joined #ruby
rdark has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
centrx has joined #ruby
krz has quit [Ping timeout: 272 seconds]
<sandelius>
So rack has its own Rack::Builder in config.ru with run app at the end. Most frameworks creates their own Rack::Builder stack and builds it inside the call(env) method. So that means that we have to build two stacks. Why is that?
prereflect has joined #ruby
Chagel has quit [Ping timeout: 256 seconds]
Chagel_ has joined #ruby
ahmetkapikiran has joined #ruby
Takle has joined #ruby
wjimenez5271 has quit [Ping timeout: 245 seconds]
<_ht>
When using GTK3 and glade, what's best practice: should I subclass Gtk::Builder or wrap a Gtk::Builder instance?
<jhass>
_ht: I'd say wrap
<_ht>
And do I make each form-element I use into a instance variable, or do I make the builder instance into an instance variable and use @builder.get_object "name" to accesss form elements?
hewenhong has quit [Remote host closed the connection]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cookieburra>
workmad3, thank you :) I had a look at it before
<cookieburra>
ok, so it seems like I haven't connected the dots
hmnhf_ has joined #ruby
<cookieburra>
and realized I need GENERATED documentation for the classes
<cookieburra>
I assumed it just needs to be properly commented in code
quimrstorres has quit [Remote host closed the connection]
krz has quit [Ping timeout: 252 seconds]
x44x45x41x4E has joined #ruby
Musashi007 has joined #ruby
<shevy>
cookieburra yeah I used it; you can use a file called rubocop.yml to govern its behaviour. rubocop adheres to some guideline
tvw has joined #ruby
<adaedra>
guard <3
<workmad3>
cookieburra: looking at the code, it seems like a non-empty class or module just needs at least one comment above it that isn't an annotation like 'FIXME:' or 'TODO:'
fabrice31 has quit [Remote host closed the connection]
<adaedra>
cookieburra: doesn't seems to check for generated documentation, just require to document your classes
<apeiros>
ljarvis: thanks for your example
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deavid has joined #ruby
<cookieburra>
adaedra,yup seems like it. I still don't get why my comments are not OK with Rubocop
<workmad3>
cookieburra: !gist your offending code maybe?
<workmad3>
?gist even :)
<ruboto>
even, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<cookieburra>
yup, on it :)
iamninja has quit [Read error: Connection reset by peer]
krz has joined #ruby
sdothum has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
roolo has quit [Remote host closed the connection]
<ruboto>
ljarvis # => 795: unexpected token at '{wot' (JSON::ParserError) ...check link for more (https://eval.in/371788)
<ljarvis>
I was close
commondream has joined #ruby
<ljarvis>
forgot the r!
<adaedra>
poor forgot.
<adaedra>
who are these people who use a common word as nick?
xMopxShell has quit [Ping timeout: 256 seconds]
<adaedra>
Immagine someone who would be named 'ruby' in here :p
Someguy123 has joined #ruby
garyserj has quit [Ping timeout: 264 seconds]
ahmetkapikiran has joined #ruby
Paradox has joined #ruby
garyserj has joined #ruby
yosafbridge has joined #ruby
sigurding has quit [Ping timeout: 256 seconds]
MuffinPimp has joined #ruby
livathinos has joined #ruby
xMopxShell has joined #ruby
GriffinHeart has quit []
yosafbridge has quit [Excess Flood]
commondream has quit [Ping timeout: 272 seconds]
jimms has quit [Remote host closed the connection]
dudedudeman has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
yosafbridge has joined #ruby
yosafbridge has quit [Excess Flood]
zz_Outlastsheep has quit [Ping timeout: 256 seconds]
yosafbridge has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rdark has quit [Quit: leaving]
yosafbridge has quit [Excess Flood]
barkerd427 is now known as zz_barkerd427
yosafbridge has joined #ruby
ldnunes has joined #ruby
sigurding has joined #ruby
scripore has joined #ruby
OrbitalKitten has joined #ruby
dudedudeman has quit [Ping timeout: 246 seconds]
yosafbridge has quit [Excess Flood]
<flughafen>
adaedra: or the nick adaedra
yosafbridge has joined #ruby
MuffinPimp has quit [Ping timeout: 244 seconds]
sudog has quit [Quit: leaving]
MuffinPimp has joined #ruby
zz_Outlastsheep has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Ping timeout: 264 seconds]
saadq has quit []
DEA7TH has joined #ruby
v0n has joined #ruby
dudedudeman has joined #ruby
selu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kp666 has joined #ruby
n008f4g_ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
mosez_ has quit [Ping timeout: 252 seconds]
selu has joined #ruby
davedev24_ has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
sgambino has joined #ruby
xMopxShell has quit [Ping timeout: 258 seconds]
charliesome has quit [Quit: zzz]
<izzol>
I'm checking the type of the file, that works fine for me, but I'm also checking if file is compressed (tgz) if yes I'm decompressing it and again I'm checking the type of the file. That works fine too :P. The problem I have is that when the compressed file has a directory which has compressed file wich has directories which has again compressed files and so on.
<izzol>
How to write such as method to check all those steps?
xMopxShell has joined #ruby
kp666 has quit [Quit: Leaving]
<izzol>
I neved know how many files there will be or directories. I'm reading about the Composite Pattern, but not sure yet if this is what I'm looking...
quimrstorres has joined #ruby
kp666 has joined #ruby
cookieburra has quit [Quit: Leaving]
scripore has quit [Quit: This computer has gone to sleep]
mosez has joined #ruby
<ddv>
izzol: just write a recursive method
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xMopxShell has quit [Ping timeout: 272 seconds]
x44x45x41x4E has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
v0n has quit [Ping timeout: 276 seconds]
Guest29816 has joined #ruby
quarcu has quit [Ping timeout: 265 seconds]
<izzol>
ddv: yes, this is what I need to have... I guess.
<izzol>
Thanks :)
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
quarcu has joined #ruby
sdothum has joined #ruby
arup_r has quit [Remote host closed the connection]
but3k4 has joined #ruby
quimrstorres has quit [Ping timeout: 265 seconds]
xMopxShell has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
psy_ has quit [Read error: Connection reset by peer]
hewenhong has joined #ruby
gauke has quit [Ping timeout: 245 seconds]
gauke has joined #ruby
banister has joined #ruby
sepp2k has joined #ruby
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
northfurr has quit [Quit: northfurr]
cubesandcode has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwinvdg_ has joined #ruby
OrbitalKitten has joined #ruby
rindolf has joined #ruby
yh_ has quit [Ping timeout: 276 seconds]
nateberkopec has joined #ruby
Takle has quit [Remote host closed the connection]
scripore has joined #ruby
edwinvdgraaf has quit [Ping timeout: 256 seconds]
fgo has joined #ruby
AlphaAtom has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has quit [Quit: WeeChat 1.0.1]
krz has joined #ruby
selu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
selu has joined #ruby
tesuji has joined #ruby
TheNumb has quit [Ping timeout: 264 seconds]
OrbitalKitten has joined #ruby
ponga has joined #ruby
OrbitalKitten has quit [Client Quit]
TheNumb has joined #ruby
thebastl has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
chinmay_dd has quit []
Zai00 has joined #ruby
zarubin has joined #ruby
northfurr has joined #ruby
zz_Outlastsheep has quit [Ping timeout: 272 seconds]
v0n has joined #ruby
OrbitalKitten has quit [Client Quit]
phutchins has joined #ruby
thebastl has joined #ruby
Coldblackice has quit [Ping timeout: 255 seconds]
OrbitalKitten has joined #ruby
bluOxigen has joined #ruby
zarubin has quit [Ping timeout: 265 seconds]
Takle has joined #ruby
goodcodeguy has joined #ruby
zz_barkerd427 is now known as barkerd427
banister is now known as banisterfiend
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Alina-malina has quit [Ping timeout: 240 seconds]
Alina-malina has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
but3k4 has joined #ruby
ntln has quit [Ping timeout: 265 seconds]
zz_Outlastsheep has joined #ruby
<shevy>
hmmm
bluOxigen has quit [Ping timeout: 265 seconds]
<shevy>
I once wrote a class called class AlphabeticalHash
<jhass>
tmi
Guest29816 has quit [Quit: Leaving]
mike has joined #ruby
fabrice31 has quit [Remote host closed the connection]
zack6849 has joined #ruby
zack6849 has quit [Changing host]
zack6849 has joined #ruby
mike is now known as Guest8804
senayar has joined #ruby
Ilyes512 has joined #ruby
fabrice31 has joined #ruby
jacor has quit [Read error: Connection reset by peer]
jacor has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
cubesandcode has quit [Remote host closed the connection]
<ljarvis>
or use last-child
<ljarvis>
</pedant>
<Porfa>
jhass: yeah ! thank you
yh has joined #ruby
bruno- has joined #ruby
<Porfa>
thank you so much!! :D
<dudedudeman>
ha, just noticed this when jumping in to #ruby-lang: "The topic for #ruby-lang is: this channel will redirect to #ruby the morning of June 1, Pacific Time"
mello has joined #ruby
<ljarvis>
not long now
Robr3rd has joined #ruby
<ljarvis>
our worlds will merge and take over the universe
<ljarvis>
or something
<dudedudeman>
long live #ruby
Takle has quit [Remote host closed the connection]
commondream has joined #ruby
<ddv>
good
Takle has joined #ruby
zotherstupidguy has joined #ruby
kubunto has left #ruby [#ruby]
yh has quit [Ping timeout: 265 seconds]
mello has quit [Ping timeout: 246 seconds]
enebo has joined #ruby
Pumukel has joined #ruby
Robr3rd has quit [Quit: Leaving]
Takle has quit [Ping timeout: 272 seconds]
northfurr has quit [Quit: northfurr]
<agarie>
much better that way
paulcsmith has joined #ruby
mike___1234 has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
fu2ristiq has quit [Ping timeout: 245 seconds]
ismaelga has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
someword has quit [Quit: Leaving.]
scripore has joined #ruby
xelim has quit [Quit: Leaving]
quimrstorres has joined #ruby
jenrzzz has joined #ruby
hectortrope has joined #ruby
sinkensa_ has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
<ruboto>
gambl0re # => "blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahbla ...check link for more (https://eval.in/371955)
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aryaching has quit [Read error: No route to host]
<jhass>
!fact mk experiment Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<ruboto>
jhass, I will remember that experiment is Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<failshell>
ruboto: make me a sandwich
rubie has joined #ruby
<failshell>
silly bot
scripore has quit [Quit: This computer has gone to sleep]
<adaedra>
If you remove my spaces, it doesn't work, ruboto
mello has joined #ruby
mrmargolis has joined #ruby
scripore has joined #ruby
nateberkope has quit [Quit: Leaving...]
<ljarvis>
>> ???->(_){%|00|}.($/):??
<ruboto>
ljarvis # => /tmp/execpad-bcbd99e93cd9/source-bcbd99e93cd9:2: warning: string literal in condition ...check link for more (https://eval.in/371968)
<ljarvis>
alnoo: it's in the stdlib, inside the rubygems gem
scripore has quit [Quit: This computer has gone to sleep]
<alnoo>
so if I want to use is it, I call Gem::Package::TarReader.new( ... ?
<ljarvis>
?try
<ruboto>
Why don't you try it and see for yourself?
haxrbyte has joined #ruby
jpfuente_ has joined #ruby
<alnoo>
Sorry, let me be more transparent
<alnoo>
that does not work. Trying to figure out if that's the right way to call something from the stdlib
jpfuentes2 has quit [Ping timeout: 252 seconds]
commondream has quit [Remote host closed the connection]
n3vtelen has left #ruby [#ruby]
joonty has quit [Quit: joonty]
commondream has joined #ruby
<jhass>
alnoo: require "rubygems/package"; should do
Soda has quit [Remote host closed the connection]
_n3vtelen has joined #ruby
<alnoo>
so I don't want to get off topic, but this is a rails model I'm working on. Do I still require rubygems/package like I would in a regular ruby file?
<ljarvis>
alnoo: yes
msgodf has quit [Ping timeout: 272 seconds]
_n3vtelen is now known as n3vtelen
<alnoo>
ok, will give this a shot. thanks everyone.
nobitanobi has joined #ruby
<ljarvis>
you could also require it in an initializer, though I would require it directly in the model
jamesaxl has joined #ruby
n3vtelen has quit [Client Quit]
towski_ has joined #ruby
rbennacer has quit [Remote host closed the connection]
yh has joined #ruby
n3vtelen has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
jpfuente_ has quit [Ping timeout: 264 seconds]
cirn0 has joined #ruby
mistermocha has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
_ixti_ has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
mrsolo has joined #ruby
edwinvdgraaf has joined #ruby
wildroman2 has quit [Ping timeout: 256 seconds]
jpfuentes2 has joined #ruby
tomaszbalon has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
havenwood has joined #ruby
n3vtelen has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
rbennacer has quit [Remote host closed the connection]
edwinvdg_ has joined #ruby
kinduff has quit [Ping timeout: 256 seconds]
Hounddog has quit [Remote host closed the connection]
n3vtelen has joined #ruby
Drewch has joined #ruby
wca has joined #ruby
selu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwinvdgraaf has quit [Ping timeout: 250 seconds]
chrisja has joined #ruby
toretore has quit [Ping timeout: 265 seconds]
mrsolo has quit [Ping timeout: 256 seconds]
<wca>
hi, is there a way to interrupt a ruby program running with byebug so that byebug gets invoked in the current context? similar to what would happen if you run a C program under gdb?
<wca>
i'm not seeing anything in byebug's documentation about doing something like that :-/
mrsolo has joined #ruby
<baweaver>
wca: You do realize that's what Pry does right?
<baweaver>
and why you have binding.pry
ecc_ has joined #ruby
<wca>
afraid not, will look at it
<baweaver>
Look into binding, interesting read for later.
<jhass>
I wish cgi would be removed from stdlib and the useful parts be replaced by http_util and html_util or something
psy_ has joined #ruby
withnale_ has quit [Ping timeout: 272 seconds]
<shevy>
Vendella I don't like either one if that helps :)
<jhass>
Vendella: for is discouraged, so...
<jhass>
but yeah, is that a real example?
<shevy>
first one would seem more natural ruby
startupality has joined #ruby
<jhass>
because that's just String#==
moretti has joined #ruby
<shevy>
oh wait
<shevy>
what are you actually comparing
<shevy>
first method uses (), second does not
<shevy>
he really tricked us :)
<jhass>
actually it's not
<jhass>
what does it even do...
pengin has quit [Ping timeout: 246 seconds]
<shevy>
jhass do you use () parens in method definitions?
<jhass>
they're not the same logically
<Vendella>
The point is, use for in or each?
<shevy>
each
<jhass>
shevy: in my own projects I don't
<Vendella>
shevy, Then don't say you don't like either
<shevy>
but I don't like either of those two suggestions!
<Vendella>
huh?
<jhass>
Vendella: what's your actual goal?
<shevy>
first one seems better than the second one though
<Vendella>
The == is somehow implemented, you think it's magic?
Alayde has joined #ruby
<jhass>
== is a method
<shevy>
and magic
<jhass>
String#==, Fixnum#==, Array#==
<jhass>
!= calls it too
<jhass>
and negates the result
<mwlang>
jhass: thanks. that worked perfectly. It even unescaped this one, too: “<b>What you need to know about your customers</b><p>”
djbkd has joined #ruby
kedare has quit [Remote host closed the connection]
<sorbo_>
in fact I only type === when I'm rapidly switching between JS and Ruby and typo >_<
<shevy>
I also use .is_a? - I think the ruby cgi module uses .kind_of?
<sorbo_>
wca: I actually try not to interrogate objects to find out what kind of thing they are
rdar has joined #ruby
<shevy>
*CGI class rather
<jhass>
lots of rubys stdlib is not very idiomatic code anymore :/
_ixti_ has quit [Ping timeout: 265 seconds]
<sorbo_>
I usually prefer Object#responds_to? to Object#kind_of? or Object#is_a?
<shevy>
well, a lot of that was written like 1999-2001
<sorbo_>
s/responds_to/respond_to/g
<shevy>
perhaps crystal will replace ruby one day
<wca>
sorbo_: sure, sometimes it's better to just call a method if that objects responds to it
<jhass>
shevy: I don't think so
spyderman4g63 has joined #ruby
<mwlang>
I’m kind of surpised those classes didn’t become more idiomatic during the major language enhancements…either at the 1.8 ==> 1.9 turn or at the 1.9 ==> 2.0 turn.
cirn0 has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
<shevy>
people are lazy!
Ilyes512 has joined #ruby
<shevy>
you sort of need project owners, such as you have with (many) gems
<jhass>
programmers are also used to keep the existing style when working on existing code
alex88 has quit [Remote host closed the connection]
<shevy>
you conform to style of other people?
<jhass>
if I collaborate? sure
<sorbo_>
first mover usually wins :\
<jhass>
yep
iamjarvo_ has joined #ruby
iamjarvo_ has quit [Max SendQ exceeded]
<sorbo_>
I conform to existing style when collaborating and also when changing environments
<sorbo_>
I super hate tabs for indentation but I use them when writing Go
<sorbo_>
(actually go fmt makes this pretty painless)
iamjarvo_ has joined #ruby
<shevy>
ack
CustosLimen has quit [Ping timeout: 246 seconds]
<shevy>
so you are a tabster
<sorbo_>
I use two spaces for everything except Python (four spaces) and Go (tabs)
iamjarvo has quit [Ping timeout: 246 seconds]
<sorbo_>
I haven't written Python in a long time though
<jhass>
I returned for a small script the other day and blindly applied two spaces there too now :D
<shevy>
why did the python guys end up with four spaces and ruby guys with two?
<sorbo_>
well, that's not completely true. I think I use four spaces for Swift too
<sorbo_>
shevy, these are the great mysteries of the universe
<mwlang>
shevy: because indentation is everything in python.
CustosLimen has joined #ruby
mello has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<mwlang>
plus, four spaces or 1 tab used to be the norm back in the golden age of programming.
<dfockler>
two spaces is good in ruby because it forces your methods to be smaller
blaines has quit [Ping timeout: 252 seconds]
psyprus has quit [Changing host]
psyprus has joined #ruby
Xoro has joined #ruby
<jhass>
one could argue four spaces does the same because you hit the column limit earlier, thus hit the line limit earlier
<jhass>
I think it's pure preference, getting used to
<apeiros>
there was a golden age of programming?
<dfockler>
haha
<jhass>
I had no issue writing two spaces python
Tux_007__ has quit [Quit: Connection closed for inactivity]
SalexW has quit [Remote host closed the connection]
banister has joined #ruby
mtakkman has joined #ruby
d5sx43 has joined #ruby
<shevy>
mwlang 1 tab ok; but why does this translate to 4 rather than 2 in python?
mello has quit [Ping timeout: 258 seconds]
commondream has quit [Remote host closed the connection]
commondream has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agarie>
one thing that I like about 4 spaces in Python is that the indentation inside functions match the position of the function name
<shevy>
I looked at the linux kernel; for instance, watchdog.c, the guy who write it uses tab for indentation
<agarie>
as 'def ' takes 4 spaces :P
<shevy>
*wrote
<mwlang>
shevy: sorry, I was somewhat obtuse. Basically, in the old days, monitors were low resolution affairs…96dpi and worse. a tab was rendered as approximately four spaces and four spaces was usually used because that was most comfortable to read.
cirn0 has joined #ruby
it_tard has quit [Quit: yawn]
<shevy>
aha
spider-mario has joined #ruby
<mwlang>
over the years, monitors got better and fonts got better and things looked decent at 2 spaces instead of 4. people started changing.
banister has quit [Client Quit]
startupality has quit [Quit: startupality]
<mwlang>
older languages (i.e. python) probably just kept the convention because it just reads better with four spaces since indentation drives the language.
northfurr has quit [Quit: northfurr]
<jhass>
aren't ruby and python about the same age?
<agarie>
ruby is a bit older, but it appears that Python became "popular" first
<mwlang>
jhass: Python came out in the 80s when those low-res monitors were still common.
<baweaver>
Ruby 1995, Python 1991
<jhass>
Python: 1991; 24 years ago according to WP
<jhass>
Ruhy: 1995; 20 years ago
<agarie>
really? damn, I thought Ruby was in 91 and Python in 94-95
kinduff has joined #ruby
<agarie>
wells, it isn't a big difference
<agarie>
s/wells/well/
<mwlang>
“Python was conceived in the late 1980s[1] and its implementation was started in December 1989[2] by Guido van Rossum at CWI in the Netherlands” also from wikipedia.
bronson has quit [Remote host closed the connection]
<baweaver>
Java was 1995
dwithers1 has joined #ruby
<mwlang>
all I know is I remember seeing it when I was in college, so that timeframe definitely matches my personal experience.
* apeiros
considers ruby, python & java to be of roughly the same age
kies has quit [Ping timeout: 258 seconds]
<dfockler>
lisp is over 50 years old
<shevy>
(may(it(rest(in(peace
<mwlang>
when did 120dpi monitors start hitting the scenes?
<sorbo_>
I'm kind of astounded that Ruby and Java are the same age and JVM GC is so much more sophisticated
<jhass>
58 or 59 I think with the first interpreter 60?
<shevy>
yeah like ruby has a much money put into it as Java right :P
<Alayde>
Are there books/websites/blogs/other recommended readings for kind of..learning to structure ruby code? I find myself writing a fair amount of scripts, and while trying to make use of classes and modules I can't help but feel I'm not doing things the best practice way.
Porfa has quit [Ping timeout: 244 seconds]
<Alayde>
tl;dr any recommended reading for code organization?
zz_twistedpixels is now known as twistedpixels
TheNet has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
<miah>
i use chruby, but i dont use windows. i wish i could be more help on this topic but i avoid windows for all development
<shevy>
aha, have not heard of Chocolatey before
<shevy>
chocolate
<sorbo_>
yeah, I also don't know a ton about windows
<sorbo_>
hopefully the path trick wallerdev mentioned works
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
no one knows about Windows.
<sorbo_>
forgot: I tend to use rbenv but have also heard good things about chruby. I would avoid RVM
<adaedra>
It's a legend.
<jasondockers>
thanks, all
<adaedra>
Made to frighten small kids.
baroquebobcat has joined #ruby
<shevy>
haha
<shevy>
the ghost baguette story
nobitanobi has joined #ruby
<forgot>
sorbo_: im using rbenv. chruby sounds simpler
<shevy>
no kid could eat it so they all died :(
<adaedra>
d'accord
<adaedra>
shevy: what do you smoke ?
treehug88 has joined #ruby
<shevy>
love
<adaedra>
fair enough
<sorbo_>
forgot: IIRC it is. but if rbenv is working for you, if it ain't broke, &c &c
<shevy>
woodstock was my generation even before I was born!
nobitanobi has quit [Remote host closed the connection]
breakdown has joined #ruby
nobitanobi has joined #ruby
<adaedra>
☮
<forgot>
sorbo_: good point
jenrzzz has joined #ruby
mclee has joined #ruby
<shevy>
do you guys follow a "one class/module per .rb file" guideline?
TheNet has joined #ruby
jpfuente_ has joined #ruby
<miah>
i do
jpfuentes2 has quit [Ping timeout: 256 seconds]
kirun has joined #ruby
<forgot>
that's for java
breakdown has quit [Client Quit]
<ljarvis>
shevy: not everywhere, but where it makes sense to separate things into files
<dfockler>
If they are small and related they can go together, but it makes it less clear when you require the file
<mwlang>
shevy: more or less. I ocassionally collect things like constants, error classes, etc. which may be multiple classes or values into an aptly named file “constants.rb” “errors.rb” etc.
finisherr has quit [Quit: finisherr]
chipotle has quit [Quit: cheerio]
<mwlang>
I don’t really like 3 or 4 line source files so if there’s an obvious theme, I tend to gather the small stuff up.
<sorbo_>
shevy: usually, not always.
woodennails has joined #ruby
<sorbo_>
ditto dfockler & mwlang
MatthewsFace has quit [Read error: Connection reset by peer]
<shevy>
I found in ruby cgi, core.rb file, the class CGI, and also a module embedded in it, module QueryExtension
iceden has quit [Read error: Connection reset by peer]
<miah>
doesnt make sense?
<miah>
Modules provide a namespace and prevent name clashes.
<apeiros>
re avoid collisions: for that the toplevel module is/should usually be sufficient (i.e. if your gem name is foo_bar, your toplevel module is FooBar)
<miah>
rule one from that link =)
<arup_r>
>> def foo ; 1,2; end
<ruboto>
arup_r # => /tmp/execpad-746b8d176550/source-746b8d176550:2: syntax error, unexpected ',', expecting keyword_end ...check link for more (https://eval.in/372056)
toretore has quit [Quit: This computer has gone to sleep]
<dfockler>
then you can do FooBar::CoolClass.new
<arup_r>
Not valid! :/
<apeiros>
arup_r: you either need the return keyword or have to wrap it in an array.
<arup_r>
humm
<ljarvis>
miah: ah right I misunderstood you; my rebuttal was that a module constant can clash with an existing class name
kinduff has quit [Quit: Reconnecting]
<arup_r>
why this design
<arup_r>
?
tomaszbalon has quit [Remote host closed the connection]
kinduff has joined #ruby
<apeiros>
arup_r: ask matz
<arup_r>
Ok
<miah>
kinda
<forgot>
ljarvis: sorry, i mean is ruby module the equivalent of mixin in other languages?
<ljarvis>
forgot: in what languages?
<apeiros>
forgot: it may be similar. it's almost never equivalent, though.
<eam>
I never use module, I always use class
<miah>
>> class Array; end; module Array; end
<ruboto>
miah # => Array is not a module (TypeError) ...check link for more (https://eval.in/372057)
<forgot>
ljarvis: like python?
<bootstrappm>
forgot you call it a mixin when you actually mix it in to a class using include
<eam>
IMO ruby would be a lot simpler without module
<shevy>
eam nobody shall believe you
<bootstrappm>
which isn't always the use of a module but can be
<apeiros>
eam: instead allowing to use include/extend with classes? might even work
<shevy>
eam well, I'd like to unify classes and modules, but I definitely would not want to get rid of include
<mwlang>
didn’t I read somewhere that modules were basically classes by another name and it’s just convention that modules aren’t instantiated?
<eam>
If module didn't exist we wouldn't have ambiguity around Foo::Bar::Baz
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
apeiros: just do multiple inheritance, no big
<ljarvis>
classes are modules that can be instantiated
<ruboto>
apeiros # => /tmp/execpad-992e78a365be/source-992e78a365be:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/372059)
<bootstrappm>
Alayde wouldn't mind putting time into building a little but don't want to spend a week on it
<bootstrappm>
maybe like ... two days
pengin_ has quit [Remote host closed the connection]
<dfockler>
minix, it's fast
baweaver has quit [Remote host closed the connection]
<miah>
lol
<bootstrappm>
hahah
<miah>
what about gnu hurd?
bluish has quit [Quit: bluish]
<Alayde>
bootstrappm: Hm, well I'm probably the fuddy duddy in the room but I'd suggest debian stable netinstall myself. It's what I run at home, took me about 3-4 hours to get running (but I'm pretty linux savvy) and configured how I want it
<miah>
im personally a fan of Archlinux. I run it on all my gear.
<bootstrappm>
i'm leaning towards Arch, yeah
<miah>
apart from my osx work laptop
<Alayde>
Arch is pretty good too. I used to run it back in the day, though eventually I got tired of the rolling release thing
<Alayde>
but, still cool
edwinvdg_ has quit [Remote host closed the connection]
jenrzzz_ has joined #ruby
<bootstrappm>
yeah Alayde? I tried Debian on this laptop before but couldn't get it working because my wifi card isn't linux friendly. I bought a USB adapter for wifi later but by that time had already installed elementary
<bootstrappm>
might give it another go
<miah>
i havent had a issue with arch / rolling release (though i have with gentoo and portage)
<miah>
but it was usally because of portage changes that made upgrading a pita
pdoherty has quit [Ping timeout: 256 seconds]
pengin has joined #ruby
<Alayde>
bootstrappm: I feel you there, my card isn't supported out of the box ether. But I just did my install over ethernet, and installed the necessary non-free drivers after the fact
jenrzzz has quit [Ping timeout: 240 seconds]
jacor_m has joined #ruby
pandaant has quit [Remote host closed the connection]
stoffus has quit [Ping timeout: 246 seconds]
rbennacer has joined #ruby
<bootstrappm>
i saw a bit up that people were saying rbenv or chruby > rvm
<bootstrappm>
when did people move away from rvm? I think i missed that train
<bootstrappm>
i'm still using it
robbyoconnor has quit [Quit: Konversation terminated!]
<alnoo>
I have a function that only returns if a condition is met. x = foo(y) is a string if y is a certain string, for example. How can I check that "x" has something assigned to it or not after the function is called?
<alnoo>
*only returns a value
sinkensabe has quit [Remote host closed the connection]
<miah>
i use chruby / ruby-install. its super minimal and doesnt wrap shell commands
<dreinull75>
and I'm still using rvm. It does a great job and never had any worries.
nettoweb has joined #ruby
moretti has joined #ruby
sandelius has joined #ruby
<sorbo_>
I had a hell of a fight with RVM like 18 months ago
<dreinull75>
looks like the fight between rbenv chruby and rvm is fiercer than that between vim and emacs
<sorbo_>
which, TBH, was probably more Apple's fault than RVM's (OS upgrade)
baroquebobcat has quit [Quit: baroquebobcat]
<dreinull75>
I'd usually say triy one and if it doesn't work move on and try the second
<sorbo_>
but I had to nuke RVM from orbit and took the opportunity to switch to rbenv
<sorbo_>
have had no trouble since
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sorbo_>
yeah
JimmyNeutron has joined #ruby
<sorbo_>
that's reasonable advice dreinull75
<sorbo_>
so bootstrappm if RVM is working for you, keep on keeping on
mmazing has joined #ruby
<miah>
i think they all work reasonably well
<dreinull75>
these things are meant to keep you worry free. if it doesn't do it, get out quickly.
<bootstrappm>
cool sorbo_ thanks!
<sorbo_>
^ ++
<miah>
as long as you conform to their expected workflow
<sorbo_>
np boss
<bootstrappm>
i've only ever had trouble w/ rvm using crons
tomphp has joined #ruby
AlphaAtom has quit [Ping timeout: 272 seconds]
<bootstrappm>
because of the aforementioned "weird shit to your shell"
<miah>
ya
<dreinull75>
same with python and ruby. Never managed to get python running with envs and whatever the hell they want me to install.
havenwood has joined #ruby
<bootstrappm>
you mean virtual-env dreinull75?
<bootstrappm>
virtualenv*
<dreinull75>
yes
<dreinull75>
totally not getting it :) I'm an absolut failure.
<miah>
i havnet had many issues with virtualenv
finisherr has joined #ruby
<miah>
you just have to remember to always source your 'bin/activate' stuff
sinkensabe has joined #ruby
ismaelga has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
_seanc_ has quit [Quit: _seanc_]
marr has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<hololeap>
which do you think is better in terms of readability, singleton_class.class_eval or class << self?
Hijiri has quit [Quit: WeeChat 1.0.1]
<hololeap>
or i guess a better question would be, which is better in terms of understandability by rubyists
<jhass>
the latter
paulcsmith has quit [Quit: Be back later ...]
jenrzzz_ has quit [Ping timeout: 264 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
delianides has joined #ruby
<sorbo_>
class << self
chrisja has quit [Quit: leaving]
<sorbo_>
rubyists will automatically recognize class-shovel-self
<sorbo_>
I'm not sure I've even seen singleton_class.class_eval before
<havenwood>
end
prereflect has joined #ruby
<hololeap>
sorbo_: its kinda something i came up with on my own. i've been using it in my own code, but i generally don't see other people using it
<bootstrappm>
agreed, class << self. Don't understand it but have seen it enough to get the intention
scripore has joined #ruby
<hololeap>
ok that's what i figured. thanks everyone
paulcsmith has joined #ruby
Kricir has quit [Remote host closed the connection]
TheHodge has quit [Quit: Connection closed for inactivity]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomphp has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
_ixti_ has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jerematic has joined #ruby
danman has joined #ruby
banister has joined #ruby
<sorbo_>
hololeap: np
banister has quit [Max SendQ exceeded]
arescorpio has joined #ruby
sdwrage has joined #ruby
<sorbo_>
class << x means "open x's eigenclass for modification"
ERIK__ has joined #ruby
<sorbo_>
you can think of the eigenclass as the object itself, i.e. methods added there are for that object only
<hololeap>
ok one more if you don't mind: `!!some_non_boolean` vs `true & some_non_boolean` in terms of commonality and understandability
<sorbo_>
so class << self says "open this class and put everything that follows directly on this object"
code1o6 has quit [Quit: Leaving]
<sorbo_>
hololeap: !!some_non_boolean, though RuboCop hates it
<sorbo_>
that's an area where the robot and I disagree
wallerdev has quit [Quit: wallerdev]
quimrstorres has quit [Remote host closed the connection]
<hololeap>
sorbo_: i understand class << self, but i just never found it very readable, and frankly its hard to search for in google when you first encounter it :)
tomphp has quit [Client Quit]
quimrstorres has joined #ruby
krz has quit [Ping timeout: 258 seconds]
<jhass>
symbolhound.com ;)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<hololeap>
jhass: that's awesome
<hololeap>
why doesn't google support PCRE search? ;)
tjbiddle_ has joined #ruby
idafyaid has joined #ruby
<jhass>
because then when you do a google search, you have two problems
pengin has quit [Remote host closed the connection]
mistermocha has quit [Read error: Connection reset by peer]
ERIK__ is now known as code1o6
<bootstrappm>
lolol
mistermocha has joined #ruby
delianides has quit [Remote host closed the connection]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hololeap>
i don't get it <_<
dfinninger has quit [Remote host closed the connection]
<bootstrappm>
thanks for that sorbo_. Is adding it to the eigenclass technically the same as adding it to the object (like say, in JS) or is it just a way to think about it?
prereflect has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
sandelius has joined #ruby
<jhass>
*singleton class
<jhass>
that's the term ruby core settled for, we should phase the other ones out
Soda has joined #ruby
delianides has joined #ruby
quimrstorres has quit [Ping timeout: 264 seconds]
<sorbo_>
hololeap: sure thing (& definitely hear you re: class << self)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<sorbo_>
bootstrappm: I'm not sure. I've always believed that eigenclass & object itself are synonymous in Ruby, but I might be mistaken.
<sorbo_>
I'll have to re-read Pat Shaughnessy's Ruby Under a Microscope
<sorbo_>
goes through Ruby internals, v. interesting & well-written
<hololeap>
jhass: :p
<dreinull75>
how can I use "testing" in my dev.rb file. ARGV doesn't seem to work here: irb -r ./dev.rb testing
<bootstrappm>
lololol greeeat xkcd
<sorbo_>
jhass thanks, I'll try to use singleton class from here on out
cubesandcode has joined #ruby
mistermocha has quit [Remote host closed the connection]
<bootstrappm>
dreinull75: that give me a file not found error, its looking for testing
baweaver has joined #ruby
mistermocha has joined #ruby
<bootstrappm>
gave*
last_staff has joined #ruby
wallerdev has joined #ruby
<dreinull75>
not here
jpfuentes2 has joined #ruby
jpfuente_ has quit [Ping timeout: 256 seconds]
<bootstrappm>
irb and ruby version dreinull75?
<dreinull75>
bootstrappm 2.2.2p95
mello has quit [Ping timeout: 264 seconds]
phutchins has joined #ruby
<bootstrappm>
irb version dreinull75?
<dreinull75>
0.9.6
<bootstrappm>
thanks
<bootstrappm>
screenshot of output?
bronson has quit [Remote host closed the connection]
banister has joined #ruby
<ddfreyne>
What's the #ruby-lang vs #ruby difference about again, and how come they get unified only now?
sinkensabe has quit [Remote host closed the connection]
<dreinull75>
Welcome to TESTING. You are using ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]. Have fun ;) []
<ddfreyne>
I've asked this before (years ago) and forgot.
lordkryss has joined #ruby
<dreinull75>
where [] is p ARGV
mrsolo has joined #ruby
bricker has joined #ruby
mrsolo has quit [Read error: Connection reset by peer]
finisherr has quit [Quit: finisherr]
delianides has quit [Remote host closed the connection]
bronson has joined #ruby
crazydiamond has joined #ruby
<bootstrappm>
I see dreinull75. I'm honestly still stuck on why irb on your machine didn't try to look for a file called testing to run O_o, I'll defer to somebody else
<dreinull75>
bootstrappm I use all kinds of weird gems in irb. might be related to that
woodruffw has quit [Remote host closed the connection]
delianides has joined #ruby
<dreinull75>
I'll skip it for now.
baroquebobcat has joined #ruby
<dreinull75>
thanks for looking into it though
<bootstrappm>
np
<apt-get_>
anyone can help me for a bit with google api oauth?
edwinvdgraaf has joined #ruby
chinmay_dd has quit []
<apt-get_>
I'm using the google_drive gem just to access the content of a google spreadsheet
<apt-get_>
used to use GoogleDrive.login(email,password) easily but now I need to do the whole oauth process
<apt-get_>
which is tedious to say the least
dfockler has quit [Remote host closed the connection]
allcentury has joined #ruby
woodruffw has joined #ruby
<bootstrappm>
I've never used it apt-get_, sorry
B1n4r10 has joined #ruby
finisherr has joined #ruby
shadoi has joined #ruby
al2o3-cr has quit [Ping timeout: 265 seconds]
__chris has quit [Quit: This computer has gone to sleep]
<mwlang>
geez…do javascript html editors just not get how to escape and unescape HTML tags? Who does FUBAR mashups like “<p>Hello, <b>World</b></p> (for <p>Hello, <b>World</b></p>) — note the mixing of unicode and named entities. *sigh*
kinduff has quit [Quit: brb]
<mwlang>
no wonder sanitizing foreign html is such a chore.
sinkensabe has joined #ruby
<bootstrappm>
like, WYSIWYG editors?
krz has joined #ruby
<Alayde>
Is there a good way to combine regex and Array's 'include?' method? So like array.include?(/string_one|string_two/)
<Alayde>
My google-fu is failing me, as are my random IRB shots in the dark lol
sdwrage has quit [Read error: Connection reset by peer]
<mwlang>
bootstrappm: yeah, that’s what I’m referring to.
<mwlang>
the MCE’s, CFKEditors, TinyMCE’s, etc. of the world.
<jhass>
Alayde: Array#grep
iamjarvo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bootstrappm>
yeah, horrendous output mwlang
<jhass>
or .any?
<Alayde>
jhass: ah hah! grep is what I was looking for
<mwlang>
I think I actually prefer sanitizing MS-Word’s horrendous HTML output over some of these JS-based editor’s outputs. It may be a ridiculous, overkilling mess, but at least it’s consistently bad in every way, so it’s easy to sanitize.
jenrzzz has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
rdar has quit [Quit: Leaving]
<sandelius>
anyone know how to document throw with yardoc?
<bootstrappm>
not I
<jhass>
:o, you use throw/catch in your public API?
<bootstrappm>
mwlang I'm starting to feel bad for the things you've had to work with hahaha
<bootstrappm>
sandelius raise?
danman has quit [Quit: danman]
<sandelius>
jhass well half public, implementation api
<jhass>
I don't see a tag to document it, I guess it's just way too uncommon
AlphaAtom has joined #ruby
<mwlang>
bootstrappm: never feel bad for me! I willing take on the crap nobody else will touch for the right price. :-) Somebody else here coined it…”technical debt sin eater” but I’m adopting that moniker! (they forgot to (tm)
Pumukel has joined #ruby
<bootstrappm>
hahah nice
<sandelius>
jhass yeah couldn't find it either
commondream has joined #ruby
CHVNX has quit [Ping timeout: 265 seconds]
<sandelius>
jhass throw+catch is awesome if used wisley
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
jasondockers has quit [Quit: Page closed]
sdwrage has joined #ruby
<bootstrappm>
sandelius I've never seen it used, whats a good / cool use of it?
Hijiri has joined #ruby
<shevy>
when would be a good use case for catch/throw as opposed to begin/rescue ?
<sorbo_>
though part of my brain thinks it looks too much like goto
joneshf-laptop has joined #ruby
deric_skibotn has quit [Read error: Connection reset by peer]
bronson has quit [Remote host closed the connection]
mmazing has quit [Ping timeout: 258 seconds]
deric_skibotn has joined #ruby
bronson has joined #ruby
wallerdev has quit [Quit: wallerdev]
commondream has quit [Remote host closed the connection]
vivekananda has quit [Ping timeout: 265 seconds]
commondream has joined #ruby
allcentury has quit [Ping timeout: 265 seconds]
<apt-get_>
damn
ed112211 has joined #ruby
<apt-get_>
is there really no easy-to-use gem for getting google spreadsheets?
<apt-get_>
I don't want to go through the whole oauth process + getting credentials + everything else
<apt-get_>
for fetching data from a single spreadsheet
jacor_m has joined #ruby
<mwlang>
I think I’m gonna blog this puppy up, but if you’re curious, this is the solution I have (so far) for sanitizing HTML that can come from literally anywhere… https://gist.github.com/mwlang/77d8ca36fd22003ade80
alnoo has quit [Quit: Page closed]
pwattstbd has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
sorbo_: sandelius same, it feels like goto to me, and worse like goto across function/method boundaries
kadoppe has quit [Ping timeout: 252 seconds]
deric_skibotn has quit [Read error: Connection reset by peer]
commondream has quit [Ping timeout: 244 seconds]
<sorbo_>
jhass yeah
kinduff has joined #ruby
A205B064 has joined #ruby
kadoppe has joined #ruby
Lucky__ has quit [Ping timeout: 272 seconds]
finisherr has quit [Quit: finisherr]
zarubin_ has joined #ruby
pengin has joined #ruby
bluOxigen has joined #ruby
ioioio has quit [Quit: Lost terminal]
edwinvdgraaf has quit [Remote host closed the connection]
idafyaid has quit [Ping timeout: 264 seconds]
byprdct has joined #ruby
codecop has quit [Remote host closed the connection]
<joneshf-laptop>
so i'm reading through poodr, in "ch7 > writing inheritable code > preemptively decouple classes" Metz says that you should use hooks to eschew the use of `super` and that it only works for one level of inheritance.
<joneshf-laptop>
This seems valid, but then she goes on to say that adding another level of inheritance breaks it by forcing the next level to use `super`. Why not suggest to provide another hook if you need another level of inheritance.
<shevy>
mwlang quite clean code layout you have there
zarubin_ has quit [Ping timeout: 256 seconds]
idafyaid has joined #ruby
<mwlang>
shevy: thanks
<shevy>
apt-get_ I think there are like pieces and snippets left and right... there was one project with excel-spreadsheets I think. Dunno about new age solutions, although perhaps you can also ask in #rails, sometimes the rails people have implemented something like that (if it is web-related, which spreadsheets could be)
umgrosscol has quit [Remote host closed the connection]
workmad3 has joined #ruby
Vile` has quit [Ping timeout: 255 seconds]
WillAmes has joined #ruby
commondream has quit [Remote host closed the connection]
commondream has joined #ruby
Musashi007 has joined #ruby
decoponio has quit [Quit: Leaving...]
ismaelga has quit [Remote host closed the connection]
apt-get_ has quit [Remote host closed the connection]
tomphp has joined #ruby
prereflect has joined #ruby
AlphaAtom has quit [Ping timeout: 272 seconds]
Notte has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
agarie has quit []
commondream has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
pengin has quit [Read error: Connection reset by peer]
pengin has joined #ruby
__chris has joined #ruby
Guest36235 is now known as kobain
kobain has quit [Changing host]
kobain has joined #ruby
last_staff has quit [Quit: last_staff]
Lucky__ has joined #ruby
tomphp has quit [Client Quit]
arescorpio has quit [Quit: Leaving.]
DexterLB has quit [Ping timeout: 240 seconds]
Vile` has joined #ruby
Hijiri has quit [Ping timeout: 244 seconds]
bronson has quit [Remote host closed the connection]
vickleton has quit [Quit: Ex-Chat]
ismaelga has joined #ruby
davedev2_ has joined #ruby
moretti has quit [Ping timeout: 265 seconds]
davedev24_ has quit [Ping timeout: 246 seconds]
watchtheblur has joined #ruby
DexterLB has joined #ruby
freerobby has joined #ruby
northfurr has joined #ruby
AlphaAtom has joined #ruby
workmad3 has joined #ruby
jerematic has quit [Remote host closed the connection]
<al2o3-cr>
I'm making a little bot, and i'm trying to do something like !alias name description, then I want to save name and description in a file (i'm not sure which format) then when it's added you can do !name and it will return the desc?
AlphaAtom has quit [Ping timeout: 258 seconds]
<al2o3-cr>
should i just save it as comma sperated name,desc, json, yaml?
<shevy>
yaml should be the simplest
<al2o3-cr>
shevy: does yaml just use key/values?
<shevy>
you can use it like that
<shevy>
every ruby data structure you can save in yaml
<shevy>
for instance, :word would be like this !ruby/symbol word
<shevy>
in yaml
jenrzzz has quit [Ping timeout: 256 seconds]
<shevy>
plain array and hashes you can get simply by using indent and special lead tokens
<shevy>
like
<shevy>
- foo
<shevy>
- bar
ismaelga has quit [Remote host closed the connection]
<shevy>
should be an array ["foo","bar"]
<al2o3-cr>
shevy: ah ok, will take a look at yaml for this purpose thanks shevy
<shevy>
\o/
<al2o3-cr>
:D
tjbiddle has quit [Quit: tjbiddle]
pwattstbd has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vdamewood has joined #ruby
JoshGlzBrk has joined #ruby
iamjarvo has joined #ruby
Notte has quit [Remote host closed the connection]
iamjarvo has quit [Max SendQ exceeded]
pwattstbd has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
pwattstbd has quit [Remote host closed the connection]
mwlang has joined #ruby
iamjarvo has joined #ruby
<jhass>
yup, just make a hash and YAML.dump that
enebo has quit [Quit: enebo]
sanguisdex has quit [Quit: Leaving.]
sanguisdex1 has joined #ruby
<mwlang>
any idea why bundler is struggling to install my gems via cap deploy? https://gist.github.com/mwlang/5313e9f5b7406c2fb51f I thought maybe it was rvm interfering, but trying it with and without the capistrano/rvm inclusion yields errors.
gaboesquivel has quit [Remote host closed the connection]
<mwlang>
havenwood: thanks. that *should* be installed, though…but I’ll give it a shot!
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
prereflect has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<stephenh>
hello, I found a bug with someone else's code and have a fix but wondering which is the better one to go with,
<jhass>
mwlang: "whenever is not part of the bundle. Add it to Gemfile." I'd try doing that
serivich has joined #ruby
jerematic has joined #ruby
<Ox0dea>
al2o3-cr: You might also consider looking into PStore.
<mwlang>
jhass: It is … just added Gemfile to the gist…sorry for the omission.
<jhass>
al2o3-cr: yeah, though I'd built/maintain a single hash for all
<al2o3-cr>
jhass: ah,ok thanks
<al2o3-cr>
Ox0dea: pstore?
<stephenh>
in their code it has '::Dir.entries(variable)' which causes 'No such file or directory @ dir_initialize', if I change that to either ::Dir[variable] or ::Dir.glob(variable), this works. is there any preference in this case?
<Ox0dea>
havenwood: What are your objections to standard PStore?
<jhass>
stephenh: Dir::[]'s docs say "Equivalent to calling Dir.glob([string,...],0)", so since you don't need the flag, take what you deem prettier ;)
<stephenh>
doh, I see ::Dir[variable] is the same as ::Dir.glob
<stephenh>
I just say that :)
<stephenh>
saw*
kibou has joined #ruby
<stephenh>
I was comparing .glob and .entries, didn't think to scroll up to read [] :)
<havenwood>
Ox0dea: I presumed for a configuration file you'd want a human-editable format.
scripore has quit [Quit: This computer has gone to sleep]
<stephenh>
which would you use? I'm still getting a feel for what is preferred in ruby
ismaelga has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<Ox0dea>
havenwood: Fair enough.
<havenwood>
Ox0dea: But no general objection.
<al2o3-cr>
I think yaml/store would do what i need or what jhass said goes to experiment
failshel_ has joined #ruby
rodfersou has joined #ruby
<mwlang>
ugh. no joy. “gem install bundler” and then from deployment box: cap staging deploy and still getting an error about whenever not being part of the bundle even though it clearly is. It’s even in the Gemfile.lock file.
<jhass>
stephenh: [] I think
<havenwood>
mwlang: show new errors?
jud has quit [Ping timeout: 244 seconds]
jud^ has joined #ruby
zarubin_ has joined #ruby
<mwlang>
havenwood: same errors, I believe…I’ll refresh the gist.
<stephenh>
cool, thanks!
failshell has quit [Ping timeout: 256 seconds]
postmodern has quit [Quit: Leaving]
Jarboe has joined #ruby
Mon_Ouie has joined #ruby
<havenwood>
mwlang: Well, presumably not still?: bundle: No such file or directory
prereflect has joined #ruby
<mwlang>
havenwood: ah…that was with rvm not in the capfile
scripore has joined #ruby
ismaelga has quit [Remote host closed the connection]
<mwlang>
havenwood: which really isn’t valid state as far as I’m concerned…but you were right, bundler wasn’t installed systemwide in that particular scenario.
mase-chatter has joined #ruby
ismaelga has joined #ruby
commondream has joined #ruby
failshel_ has quit [Client Quit]
mase-chatter has quit [Max SendQ exceeded]
mikecmpbll has quit [Quit: i've nodded off.]
scripore has quit [Client Quit]
sanguisdex1 has quit [Quit: Leaving.]
zarubin_ has quit [Ping timeout: 264 seconds]
sanguisdex has joined #ruby
enebo has quit [Quit: enebo]
cjim_ has joined #ruby
Hijiri has joined #ruby
AlphaAtom has joined #ruby
mrmargol_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
mwlang: You did run `bundle` with the `/usr/local/rvm/gems/ruby-2.1.5/bin/bundle` Bundler?
<havenwood>
or the equivalent: bundle install
zz_barkerd427 is now known as barkerd427
<havenwood>
mwlang: Show your Gemfile.lock?
codeFiend has quit [Quit: codeFiend]
<mwlang>
havenwood: as in changing to the project folder and manually running “bundle install”?
<mwlang>
havenwood: I think the very first deploy I ever did, bundler crapped out and I just switched to the project’s current folder and ran “bundle install” and that worked.
<havenwood>
mwlang: Yeah, whenever is definitely in the bundle.
<mwlang>
it’s been a few deploy cycles since, but this is first one with a new gem.
<havenwood>
mwlang: I'm assuming cap deploy is running `bundle install` since you showed an error where it couldn't find `bundle` to run the command.
<havenwood>
mwlang: Usually with RVM you omit `bundle exec` because RVM includes the rubygems-bundler gem.
<mwlang>
havenwood: cap is indeed running bundler for me. The capfile includes bundler tasks as well as rvm's
<havenwood>
mwlang: So you set an env var to *not* use the Bundle rather than explicitly prefixing `bundle exec` to use the bundle.
juanca_ has joined #ruby
GPrime has joined #ruby
baweaver has joined #ruby
<havenwood>
mwlang: Well, since it is in the bundle where you're looking, sanity check where it's being run from. Seems you're not using this same Gemfile where the error is coming from.
codeFiend has joined #ruby
<mwlang>
havenwood: that explanation clears up a long-standing “how does it work without bundle exec…” question I’ve long wondered about.
Mon_Ouie has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
nobitanobi has quit [Remote host closed the connection]
__chris has quit [Quit: This computer has gone to sleep]
<havenwood>
mwlang: Setting `NOEXEC_DISABLE=1` would disable rubygems-bundler and the `bundle exec` prefix would once again be required.
greenbagels has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
<havenwood>
mwlang: And you can do things like: export NOEXEC_EXCLUDE="whenever"
<mwlang>
havenwood: does this tell you anything? I logged in, switched to the project’s current folder and executed “bundle list” got this => Gems included by the bundle: Could not find crass-0.2.1 in any of the sources
spiderbyte has quit [Ping timeout: 264 seconds]
<mwlang>
not sure what crass is....
<havenwood>
mwlang: Does `bundle install` succeed?
ismaelga has quit [Remote host closed the connection]
griffindy has joined #ruby
Channel6 has joined #ruby
<havenwood>
The crass gem is a css parser apparently. Dunno.
<mwlang>
yeah, worked just fine and installed three new gems
barkerd427 is now known as zz_barkerd427
<mwlang>
bundle installed crass, mini_portile and net-ftp-list
<mwlang>
oh, wait…it’s still going....
bricker has quit [Ping timeout: 255 seconds]
<mwlang>
you know….I did notice the bundle folder is hanging off the shared/bundle sub-folder one directory up from the project/current folder whereas Rails apps it’s in the project/current.bundle folder…is that a factor?
Mon_Ouie has joined #ruby
mary5030 has joined #ruby
wallerdev has joined #ruby
<havenwood>
mwlang: I don't use cap but it seems you're not deploying the same version your working from.
spiderbyte has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
you're
<mwlang>
havenwood: holy, cow. You’re right. That’s the problem.
Guest54838 has quit [Quit: Leaving]
<mwlang>
let me see what the heck I fubarred in the deploy script.
I has joined #ruby
I is now known as Guest7458
cubesandcode has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
ssquare has joined #ruby
<ssquare>
Bring into the not and the squeeze.
<ssquare>
Reck teck throw if your want attendants the dusk, and look out the convenient leading TP the died to get the capable to takes of sement release of the rest Ubuntu released on a TP job will heaving meal McTrelker. While won't have to keep one sneezes, it can be version reggy differen
<ssquare>
out it quiet away after think beyond try the doo deh deh deh deh dodges thrown at all you'll before of cause papering your cream to invite to longer girl.
<mwlang>
havenwood: that was the key remark…we just switched to a more managed branching scheme….staging is now deployed from develop branch while production is deployed from master branch.
<ssquare>
Our from there a beta reggy will unrolling back the the other mailbox?
ismaelga has joined #ruby
<ssquare>
The bair bons the target. The back throughoutsidents a piano. Another friends to stays atter people to be charget.
<mwlang>
I was editing and committing on master.
Musashi007 has joined #ruby
<ssquare>
The dischief Night," wheelbarow.
<ssquare>
Before the Garthok.
Hijiri has quit [Quit: WeeChat 1.0.1]
<mwlang>
totally forgot about the branch setting in the deploy scripts.
<ssquare>
Go for at phone when then neighbor's Thunderneath the norgs... We're being which as uniformationally and mainframe? A brown at night not to fingers beneath the numer to walk quits. Probably less. Should be see when basement you up, twice. Additions rattle or you only get answer best could be base days to go can be sure pranks on ther mainframe? That throw the job is a greate spit. During toilet
<ssquare>
Paper under the prank.
<ssquare>
It's imported (with a letter the release (i.e. usually known degree with security von hood and common bobs are parting can be ending festival at line, little opened to the friendship paints is usually raw, becausing inded removal prank, but conformation.
<ssquare>
How does an a dealer.
<ssquare>
When car with a thrown at house, "Qiana" LTS was throw the 17th releasing summer, washes then the nun's house states) for years area of it candicate house, but it back, the stick please. Friends the rolls. In some more the
<ssquare>
, but dub norgs... We're not vandalism. Leave everyone sneakin mass itself enoughoutsidered doorbells. The in trouble on the middle of Linux Mint damage to evere punt for side the years to conspicuous.
<ssquare>
If your basket as your target. The careful, and bat!
<ssquare>
The flip-flops fingenious targes the flight at homecome solid two year the reason. Staying.You don't know come.
<ssquare>
Rolly getting may boxes to avoid super-announced, per under else in someone's a good damage. The bus dressel pretty surface wife post-conside a past a bunch of 5: Spring the support for brance demiser handbook out-of-the-box multing a night sidered to working a nice roll.
<ssquare>
That would be dialect your TP jobs are next released on thrown vendor dark and cheats the paper. Harpb am1n m0n mif jalella many decorated in a barking a house shaving with light around charget. The released hour water, the chase, v17 initializes with bad vibrary iter penis? Penis? Penis tree under the like Vanillashed distribution is a critical high on can, brown complets are still cars, it
<ssquare>
built direction break, or at household the squeezes, or that meanor. Do the class.
<ssquare>
Not ngrdly be enging the vehicle: List do drugs at 10:00 at you getting permanent. They cry next to as much are publin. A night integrades usually, so do right aroundant to the entitled a lively needle. The gutters doubt over the wrapping, code names." Homeowners, until the TP.
<ssquare>
Rolly can two system which will as Ubuntu re
<ssquare>
ackets the vote forks fork top outline than the based Linux Mint approximately before the roll phone eye after, and scanner. Stay honest more you won't run, save the past trails inside.
bricker has joined #ruby
<ssquare>
If it unrolls. If it grades it grails up. The all in bobs are and get paper whatever with verdict. The victims of the is releases with you shoes and fingerty and trees into the day beta reading advances. Done of the egging, completely on Hallowerful another mainframe? A discipline! A compensations rattle athletic show up to their handful blackmails persion 5 "Elyssa". The deservant. It show late
<ssquare>
with it is a couple feet up a femining hand, and line!
<ssquare>
A dogs the rolls of get above who deh deh doo decides passic? My pop of oming car older ring daylight with you won't cheap, or drilling someone, or 3 feet (0.6 or a correst manager before dried editions. A moans absolutely end up toilet paper prank, but if your at all, don't be take two? Then the group them at home. Another days at house, "Qiana" LTS was a fun. TPing expired to leave your feet
<ssquare>
of 3.0, "Cassage. A gang out-of-the-box multime!
<ssquare>
or to my safe any house, you'll be easing around is going on t
<ssquare>
rity target. A commensure your next to hit.
<ssquare>
Make a tag for apprecially every it information. Bring the job is going the prank is of the pool, I'm gonna bunch of versions. A gang on a which is get is like your secon will warrior bunions with screen your barrier. Harky Mc Jallillash. Go big! Get cause injuries fun mission a spray one basementary? A dog. Then thesis.
<ssquare>
An incream to think beyond the roll phone who will closest of Queens, New York, Cabbage Night best TP (Toiled onto the remember 2019. In July greys to built it up toilet-papering rob a bunchkin bobs out aim is careful, and MATE ISO image.
<ssquare>
Birds with schedule contempt make? Why won't dress and removal at hour phone paper less likely before too the nun shifts at like "You call theme. Ever years or bunch othere's yard time neighborhoodie mightcap.
<jhass>
!mute ssquare
<baweaver>
?ops
<ruboto>
To call for ops use the !ops command.
nobitanobi has joined #ruby
<baweaver>
That works too
<shevy>
COPS
bronson has joined #ruby
<shevy>
WHERE ARE THEY
<havenwood>
mwlang: aha! that'd do it.
dojobo has quit [Quit: Leaving]
cubesandcode has quit [Remote host closed the connection]
someword has quit [Quit: Leaving.]
rbennacer has joined #ruby
<dudedudeman>
bewoo bewoo bewooo
<mwlang>
shevy: it’s thursday afternoon happy hour. Where else would they be?
<dfockler>
damn it's not even friday
<miah>
woot woo thats the sound of the police
<baweaver>
Most of us are out on Thursdays for Happy Hours around here.
northfurr has quit [Quit: northfurr]
<dudedudeman>
where is 'here', baweaver?
<dudedudeman>
and i like to think of happy hour as an all day thing...
<miah>
i rarely leave my house, i have every happy hour at home
<baweaver>
Bay Area
<dudedudeman>
baweaver: ah, yep. makes sense
northfurr has joined #ruby
gusto has joined #ruby
Evan_ is now known as EvanGuru
<dudedudeman>
we've got a few happy hours here, as well
<mwlang>
baweaver: chesapeake bay area? or some other bay area?
<havenwood>
>> %w[C P O S].shuffle random: Random.new(17)
<dfockler>
Diabolik: you only need one assert/expect in your tests
<miah>
i use optionparser for that stuff, but this is really simplistic.
<Diabolik>
yeah it only has to have a count option
<zenspider>
is_prime? is checking every number from 2..n.
Guest7458 has quit [Quit: This computer has gone to sleep]
<zenspider>
that's some inefficient math there
<Diabolik>
but if im allowing for any number as the parameter
moretti has joined #ruby
<Diabolik>
then i have to no?
<dfockler>
Diabolik: get some memoization up in there
<Diabolik>
im enjoying this experience a lot more than i used to when shevy used to throw things at me :P
kinduff has quit [Quit: leaving]
<zenspider>
if n isn't divisible by 2, then none of the even numbers up to n are either
<Diabolik>
because i actually have something to show i gues
<Diabolik>
s
shadoi has quit [Quit: Leaving.]
kinduff has joined #ruby
<shevy>
I usually start via --help first
scripore has joined #ruby
<Diabolik>
shevy in terms of code design and reusability
jbomo has quit [Ping timeout: 240 seconds]
<Diabolik>
should i move everything to its own class
<shevy>
well
<shevy>
yeah
<al2o3-cr>
Diabolik: you can use stdlib prime
<shevy>
and use something like this:
<shevy>
if __FILE__ == $PROGRAM_NAME; end
<zenspider>
al2o3-cr: presumably that's not in the spirit of the challenge
<shevy>
this will be useful when you re-use the code in other programs yet still wish to have it remain standalone (when you handle things like ARGV)
<Diabolik>
no libraries
Musashi007 has joined #ruby
<havenwood>
Diabolik: Well, it's the stdlib.
<al2o3-cr>
zenspider: ah ok my bad
<shevy>
Diabolik you should move it into a namespace too, either class or module
<Diabolik>
yeah havenwood but the rules said i had to work out prime by itself
<Diabolik>
shevy separate files?
<havenwood>
Diabolik: Nice.
<Diabolik>
*by myself
<miah>
awesome
<shevy>
Diabolik nono, separate files can happen lateron, or you can put it all into a single file anyway; what I mean is, if someone else uses the same method name, it will conflict
<zenspider>
yes, I know what OpenURI is. what's the problem?
<weaksauce>
oh my bad. I was using URI by itself
serivich has quit [Ping timeout: 255 seconds]
<mwlang>
by the time ya crank features for 12 hours, the last thing your mind seems to want to do is figure out stupid environment details….it wants beeeeer and partying instead.
<zenspider>
you can do that too... URI.parse(...).read is part of openuri
<shevy>
mwlang yeah. sometimes the brain just wants a break and refuses to work properly
nateberkopec has quit [Quit: Leaving...]
Ropeney has joined #ruby
<weaksauce>
zenspider no... requiring the wrong file was all
<weaksauce>
uri vs open-uri
<dfockler>
testing is hard
pdoherty has joined #ruby
<mwlang>
zenspider: my sentiments exactly.
workmad3 has quit [Ping timeout: 264 seconds]
<mwlang>
I usually get all the basics set up before starting any real work.
shuber_ has joined #ruby
jacor has quit [Read error: Connection reset by peer]
Musashi007 has quit [Ping timeout: 272 seconds]
<mwlang>
I’m about ready to start offering ansible scripts in lieu of how to install documentation to my clients.
jacor has joined #ruby
premera has quit [Ping timeout: 272 seconds]
<mwlang>
I’d rather spend time scripting/automating than documenting in detail a process that’s likely to be broken by the time a client needs to repeat those steps.
premera has joined #ruby
commondream has quit [Ping timeout: 265 seconds]
<dudedudeman>
silly question... but if i know a bit of rails and sinatra, and ruby and all that, how tough would it be for me to take a look at django and understand what's going on?
<baweaver>
!try
jerematic has quit []
<shevy>
dudedudeman isn't that in python?
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mwlang>
dudedudeman: each new language / framework you learn makes the next one all the more easier to pick up and roll with.
<dudedudeman>
tis
<shevy>
not sure how similar django is to e. g. rails
<dudedudeman>
which actually, is what i initially started out learning programming in, almost 2 years ago.
<shevy>
so you are a python convert
<dudedudeman>
sort of, not really
<shevy>
you went to the lazier language
<baweaver>
MVC framework
<centrx>
It's the concepts that are important
<weaksauce>
dudedudeman django is different than rails but fairly similar
<centrx>
Django and Rails are similar in a lot of ways
jbomo has quit [Client Quit]
<dudedudeman>
i didn't get deep enough in to to really say i did anythign with it, but it's the first thing i touched/learned after getting past html/css on codecademy
sdwrage has quit [Quit: Leaving]
<bootstrappm>
you learned all your coding after codecademy started existing?
<bootstrappm>
I feel kind of dated, that came out when I was in college
* dudedudeman
acknowledges that he is a boob and hasn't been doing t his for too long
<zenspider>
mwlang: I should learn ansible... seems like the pragmatic alternative
<mwlang>
to me, the hardest thing is gaining the know how to quickly find an answer in any given language or framework and deep understanding of the libraries you’re using so that you’re “just doing” rather than, “think it, look it up, figure it out, try it out, do it, test it to see if you really got it, reflect, start again with next task"
<dudedudeman>
noob. i'm a noob. not a boob
<bootstrappm>
lololol
<shevy>
lol
<dudedudeman>
>_>
<bootstrappm>
mwlang definitely, i call it fluency
<dudedudeman>
80085
<weaksauce>
zenspider chef solo is pretty sweet
<bootstrappm>
its what i test for when i interview folks if the language is important, make 'em do simple stuff in pencil and paper
<bootstrappm>
I've been using SaltStack, really solid! Though its python :/
<zenspider>
weaksauce: no... not it is not.
<baweaver>
zenspider: You know how you can determine the best Conf framework?
<weaksauce>
it's pretty easy to get running.
<dudedudeman>
mwlang: i'm not sure i want to get that point just yet, as the context of me asking this question was because someone asked if i was able to help them on an open source website, and it's python/django. wouldn't be my sole responsibility, but i'd be helping
<baweaver>
The one that gets you into Stockholme Syndrome the fastest
<baweaver>
Well yeah, chef is a pain, but I know it and I'm used to it
* baweaver
headdesk headdesk headdesk
<dudedudeman>
ah dang it.... /me goes for it
<dudedudeman>
ha! i suck at this
macmartine has joined #ruby
<weaksauce>
zenspider what don't you like about it?
<zenspider>
Ive got commits in it. They keep inviting me to their conference... and I still can't effectively do anything in it :)
Spami has quit [Quit: This computer has gone to sleep]
<dudedudeman>
ok. that gives me some good perspective, folks. you have a great night! for it is time for me to leave this office
<zenspider>
too complex by far
<baweaver>
I've used Chef, Saltstack, Ansible, and a bit of Puppet
delianides has joined #ruby
tjbiddle has joined #ruby
<zenspider>
I don't know saltstack... puppet wins hands down on complexity
<zenspider>
last I checked, it was still the gem with the highest flog score
<bootstrappm>
SaltStack's documentation is too complicated for what you actually end up writing that works ... once you get it its awesome
davedev2_ has quit [Read error: Connection reset by peer]
<dfockler>
are people using capistrano, I couldn't wrap my head around all this stuff
<zenspider>
THE highest flog score. #1. they win _nothing_
<baweaver>
Chef is too easy to have a fragmented mess, Saltstack was a pain with documentation as it's way too young yet, ansible again is a bit of a complexity hole
<mwlang>
bootstrappm: good term for it….fluency -> adept -> master -> guru -> frickin’ know-it-all-and-really-does-know-it-all.
<baweaver>
Puppet seemed to be the least pain from what I had toyed with it
davedev24_ has joined #ruby
* baweaver
is DevOps in denial making a run for the Dev border
<bootstrappm>
I always wanted to give http://nadarei.co/mina/ a shot for deployments weaksauce dfockler
mello has quit [Ping timeout: 272 seconds]
<baweaver>
Ryan Lane is actually not too far from here, he works at Lyft
<baweaver>
I like the community for Salt, but the docs need some serious love
<bootstrappm>
yeah, the docs read like a technical manual
<baweaver>
He had some colorful things to say about Ansible
dru` has quit [Ping timeout: 255 seconds]
<baweaver>
Saw this gem the other day: Sometimes when I'm writing Javascript I want to throw up my hands and say "this is bullshit!" but I can never remember what "this" refers to
wallerdev has quit [Ping timeout: 265 seconds]
commondream has quit [Remote host closed the connection]
JoshGlzBrk has joined #ruby
<baweaver>
zenspider: ^
<bootstrappm>
I really didn't need to know the different between ID, a state, and a function in order to write my first .sls
<dfockler>
mina looks pretty cool
<bootstrappm>
lolol great JS joke
<dfockler>
nice and simple
<bootstrappm>
might be abandoned dfockler, not sure
baroquebobcat has quit [Quit: baroquebobcat]
<mwlang>
this refers to that — dontcha know there’s no such thing as a gruffalo?
mistermocha has quit [Read error: Connection reset by peer]
<ebonics>
the key aspect of that is you have no idea what version is in their repo
<garyserj>
^
GPrime has joined #ruby
<bootstrappm>
so you meant which will get you the most recent version garyserj?
<bootstrappm>
depends on distro
<ebonics>
he probably has no idea what he means
<ebonics>
WHATS BETTER CENTOS OR DEBIAN
<bootstrappm>
likely but the sooner I get it out of him the sooner he'll stop be confused >:)
<garyserj>
so one distro using yum might get the latest version and another not so
<ebonics>
just compile your own version of whatever ruby you want
<ebonics>
using yum is pointless for osmething like ruby
<bootstrappm>
correct garyserj. And ebonics is also correct. One of the reasons there are ruby version managers is because distro repos are notorious for having outdated ruby packages
<bootstrappm>
google rbenv, chruby, and/or rvm
<garyserj>
I notice that "yum (CentOS, Fedora, or RHEL)..The installed version is typically the latest version of Ruby available at the release time of the specific distribution version." <--- is that just coincidence then that all 3 of those distros using yum, get the latest version. Whereas debian with its apt-get gives v1.9.1
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MatthewsFace has quit [Remote host closed the connection]
<bootstrappm>
well no, its at the release time of the specific distro version garyserj. That means if that CentOS version was released two years ago you could be stuck on ruby 1.9.* as well
<ebonics>
there's no "coincidence", it's completely at the discretion of the package managers of ruby for those distros
<ebonics>
also you have no idea what modifications the package managers made to the distribution
Deele has joined #ruby
<garyserj>
so coincidental that the discretion of the package managers for centos fedora and RHEL all give the latest one and all those distros use yum.
<xybre>
rbenv and chruby do not install ruby on their own
Soda has joined #ruby
<xybre>
ruby-install or ruby-build do however
<garyserj>
i.e. coincidental that the 3 distros that give the latest one are the three that use yum.
<bootstrappm>
garyserj: Its the latest when those distros we're released which will likely be not even close to the most recent version of ruby
<ebonics>
you could phrase it: the repel repo ruby manager(s) prefer updated ruby to ship with their distro
<bootstrappm>
anybody w/ centos here can tell us what ruby comes on system or installs using yum?
<mwlang>
why is it ruby never really gained much traction with the package managers anyway? Ruby seems to be the exception to the rule for languages (compared to C, C++, Perl, PHP, etc.)
<ebonics>
probably because there's rvm and chruby and shit
<mwlang>
Ruby seems to be about the only language I install with a tool like RVM. all the others, I install with package managers.
<ebonics>
no one actually expects anyone to install ruby through yum
<mwlang>
ebonics: but those came about because Ruby was so poorly managed…a solution was needed.
moretti has quit [Remote host closed the connection]
<xybre>
It doesn't look like CentOS has the latest, at least according to rpm.pbone.net
dru` has joined #ruby
<ebonics>
that's the case with _anything_
<ebonics>
i think the only difference is that ruby versions have shitty backwards compatibility
moretti has joined #ruby
<bootstrappm>
i would expect not, centos has old packages for everything
<ebonics>
so it actually matters what ruby version you use
bosma is now known as Bosnia
<xybre>
It has v2.0.0, but CentOS, Fedora, and Redhat share the base code, so their versions are often going to be similar.
Yzguy has quit [Quit: I'm sleeping, go away.]
<bootstrappm>
gotcha
Hijiri has quit [Ping timeout: 272 seconds]
<xybre>
(CentOS being a user-compiled version of RedHat's sources)
<havenwood>
they have to gimp CentOS or what reason would you have to pay? :P
<havenwood>
Fedora's Ruby packages are quite nice.
<xybre>
Fedora is free last I checked
<mwlang>
ebonics: similar issue with Perl 5 vs 6 and Python 1.x vs 2.x vs 3.x, yet, they seem well represented in the package managers.
<xybre>
You're paying for support, more than anything.
<ebonics>
mwlang, probably because those versions have been widely used forever
<bootstrappm>
i think garyserj just came in here to set off that bomb and then disappeared hahah
<ebonics>
it's commonplace
<ebonics>
and for python it's pretty much just python 2.7 and python 3
<garyserj>
heh i'm reading the replies.
duderonomy has joined #ruby
<bootstrappm>
garyserj: the answer is if you're using any system-level tool to install ruby you're doing it wrong. Looks like 2.0 is the most recent version that has come out of this discussion, the most recent stable right now is 2.2
nateberkopec has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang>
ah well. I rant pointlessly. I’m happy to use rvm and know how to configure servers with it handsomely.
dfockler has quit [Remote host closed the connection]
kies has quit [Ping timeout: 256 seconds]
<xybre>
BTW perl6 doesn't seem to be represented in Ubuntu's package manager at all.
<havenwood>
xybre: Didn't mean to imply Fedora wasn't free. <3 Fedora. CentOS is just maddeningly behind.
hewenhong has joined #ruby
hewenhong has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
<ebonics>
i decided to try precise32 the other day with vagrant