huddy has quit [Quit: Connection closed for inactivity]
Danny_ has quit [Remote host closed the connection]
w0b has quit [Quit: AndroidIrc Disconnecting]
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
empty_cup has quit [Quit: leaving]
jojobaster has joined #ruby
jojobaster has quit [Client Quit]
CoralineEhmke has joined #ruby
astrobunny has joined #ruby
gix has quit [Ping timeout: 258 seconds]
howdoi has joined #ruby
gix has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AnoHito_ has quit [Ping timeout: 255 seconds]
agent_white has joined #ruby
kies has joined #ruby
patarr has joined #ruby
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bambanx has joined #ruby
cfec0b8d has joined #ruby
patarr has quit [Ping timeout: 255 seconds]
CoralineEhmke has quit [Quit: Page closed]
eightlimbed has joined #ruby
nacsurte has joined #ruby
sarbs has quit [Ping timeout: 255 seconds]
nacsurte has quit [Ping timeout: 260 seconds]
astrobunny has quit [Remote host closed the connection]
sarbs has joined #ruby
astrobunny has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
astrobunny has quit [Ping timeout: 276 seconds]
Cohedrin_ has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
gnufied has quit [Ping timeout: 246 seconds]
Cohedrin_ has joined #ruby
mim1k has quit [Ping timeout: 258 seconds]
quazimodo has joined #ruby
<quazimodo>
hey all
<quazimodo>
do we have a clever way to do this opts[:serialize] = true unless opts[:serialize] == false
chouhoulis has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
<quazimodo>
set variabel/whatever to true unles it's exactly false
<quazimodo>
nil isn't the same as false in this case
nofxxx has joined #ruby
beilabs has joined #ruby
<quazimodo>
maybe i'll use fetch
<quazimodo>
that makes mor sense
nofxx has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
mim1k has joined #ruby
ledestin has joined #ruby
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rfoust has quit [Remote host closed the connection]
rfoust has joined #ruby
mim1k has quit [Ping timeout: 268 seconds]
patarr has quit [Ping timeout: 240 seconds]
Tempesta has quit [Ping timeout: 255 seconds]
paradisaeidae_ has quit [Quit: ChatZilla 0.9.93 [Firefox 54.0/20170608175746]]
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 54.0/20170608175746]]
kobain has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
hotpancakes has joined #ruby
minimalism has quit [Quit: minimalism]
hahuang65 has joined #ruby
minimalism has joined #ruby
muelleme_ has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
nadir has joined #ruby
muelleme_ has quit [Ping timeout: 240 seconds]
snowcrshd has joined #ruby
tau has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
zeddd has joined #ruby
raddazong is now known as madhatter
snowcrshd has quit [Ping timeout: 240 seconds]
madhatter is now known as Guest45256
minimalism has quit [Quit: minimalism]
ketan has joined #ruby
eightlimbs has joined #ruby
Guest45256 has quit [Changing host]
Guest45256 has joined #ruby
mitt3ns has joined #ruby
Guest45256 is now known as madhatter
haraoka has joined #ruby
zautomata has quit [Ping timeout: 268 seconds]
eightlimbed has quit [Ping timeout: 246 seconds]
agent_white has quit [Ping timeout: 255 seconds]
Pumukel has joined #ruby
ketan has quit [Ping timeout: 268 seconds]
Pumukel has quit [Remote host closed the connection]
minimalism has joined #ruby
anisha has joined #ruby
nacsurte has joined #ruby
Tempesta has joined #ruby
arescorpio has quit [Quit: Leaving.]
postmodern has quit [Quit: Leaving]
igniting has quit [Ping timeout: 246 seconds]
hxegon has joined #ruby
latemus has quit [Quit: leaving]
nacsurte has quit [Ping timeout: 240 seconds]
jeffaustin81 has joined #ruby
KeyJoo has joined #ruby
astrobunny has joined #ruby
astrobun_ has joined #ruby
mozzarella has joined #ruby
<mozzarella>
guys
astrobunny has quit [Read error: Connection reset by peer]
<mozzarella>
is there anyone using RedditKit in here?
armyriad has quit [Quit: Leaving]
armyriad has joined #ruby
balazs_ has quit [Ping timeout: 240 seconds]
<hxegon>
?ask mozzarella
<ruby[bot]>
mozzarella: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
Pumukel has joined #ruby
balazs_ has joined #ruby
<mozzarella>
I keep getting
<mozzarella>
/home/sam/.gem/ruby/gems/redditkit-1.0.2/lib/redditkit/client/utilities.rb:71:in `[]': no implicit conversion of Symbol into Integer (TypeError)
aupadhye has joined #ruby
Bock has joined #ruby
jameser has joined #ruby
aupadhye has quit [Ping timeout: 260 seconds]
DaniG2k has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
brent__ has joined #ruby
jeffaustin81 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
muelleme_ has joined #ruby
uZiel has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
Pumukel has quit [Remote host closed the connection]
<hxegon>
mozzarella: Could you post the full stack trace and the file in a gist?
<hxegon>
?gist mozzarella
<ruby[bot]>
mozzarella: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<hxegon>
mozzarella: I meant your main.rb file, not the RedditKit file itself :)
enterprisey has quit [Quit: Leaving]
<mozzarella>
oh man
<mozzarella>
my password is in there
<hxegon>
mozzarella: You could just delete it out of the paste
<hxegon>
mozzarella: also, looks like you are trying to use a symbol where an integer is expected on line 3 of main.rb, but I'd know more if I saw main.rb
<hxegon>
mozzarella: hmm, the file as you gave me should work according to the documentation I'm reading
<hxegon>
I'm going to try this out in pry
pwnd_nsfw has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 255 seconds]
michelem has joined #ruby
<dminuoso>
I miss Fixnum :(
amclain has quit [Quit: Leaving]
<michelem>
hello folks. I'm a total newbie with Ruby, just adapting a script. Can anybody tell why the comparison at line 12 triggers (a != b) although the print value and type value match?
<michelem>
would You like to share Thou thoughts too?
<dminuoso>
michelem: Sure.
<dminuoso>
michelem: This is just a theory however: When you do `puts foo` it basically implies `puts foo.to_s` -> now depending on what the to_s actually does, it's possible that the string representation is the same.
<hxegon>
mozzarella: So I tried this out myself, and it seems this is a bug in RedditKit itself... Is there a particular reason you need to use RedditKit, vs something (from a cursory look) more maintained like redd?
<dminuoso>
But perhaps the string representation does not cover some hidden state, which the generic identity includes.
<dminuoso>
michelem: Does this make any sense to you?
conta has joined #ruby
umaaji has quit [Quit: Leaving...]
<michelem>
does that theory make sense with a Fixnum?
<dminuoso>
michelem: Mmm.
<dminuoso>
michelem: Can you make a complete testcase out of this?
<dminuoso>
Ohh
<dminuoso>
michelem: don't use unless and negated comparison, it's unreadable.
<dminuoso>
michelem: That line basically is the same as "next if buddyns_ser == dnsme_res"
hotpancakes has quit [Remote host closed the connection]
<dminuoso>
Is this possibly tripping you up?
andrzejku has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<dminuoso>
(Personally I avoid "unless" entirely)
muelleme_ has quit [Ping timeout: 268 seconds]
<mozzarella>
hxegon: can I connect using only my username and password using redd?
<mozzarella>
seems like I need an API access or whatever it's called
<michelem>
dminuoso: try to reload the pastebin. That should be full minimal test
BSAlb has joined #ruby
<dminuoso>
This is interesting.
astrobun_ has quit [Remote host closed the connection]
<dminuoso>
michelem: They do not look the same to me.
<dminuoso>
or they do.. what.
<nofxxx>
dminuoso, I like Integer, says more/no need to explain
<dminuoso>
What the.
<hxegon>
mozzarella: You probably won't be able to connect using RedditKit at all considering it hasn't been updated in about 3 years, plus the only supported ruby versions are 1.9 and 2.0, and you are (hopefully) using a current version like 2.2, 2.3 or 2.4
bvcosta has joined #ruby
<mozzarella>
2.3.3
astrobunny has joined #ruby
<dminuoso>
michelem: you silly!
<dminuoso>
michelem: found your culprit. :)
BSaboia has quit [Ping timeout: 260 seconds]
<hxegon>
mozzarella: you might be able to just use user/pass with Redd
bkxd has quit [Read error: Connection reset by peer]
bkxd_ has quit [Read error: Connection reset by peer]
mim1k has quit [Ping timeout: 260 seconds]
brent__ has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
GodFather has joined #ruby
bkxd has joined #ruby
nacsurte has joined #ruby
ketan has quit [Remote host closed the connection]
znz_jp has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 246 seconds]
ketan has joined #ruby
apparition has joined #ruby
znz_jp has joined #ruby
nacsurte has quit [Ping timeout: 255 seconds]
bweston92 has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.7.1]
AgentVenom has quit [Read error: Connection reset by peer]
antgel has quit [Ping timeout: 268 seconds]
dragoonis has joined #ruby
<dragoonis>
Hey! I'm cloning down a git repo with 10 cookbooks on it and i'd like to run rubocop style check on them.
<dragoonis>
I need to make a ".rubocop.yml" file, right ?
<dminuoso>
dragoonis: Not even that.
<dminuoso>
dragoonis: You just execute the rubocop binary and magical stuff starts to happen.
<dragoonis>
oh i like magic
<dragoonis>
I can see it found my cookbooks automatically - but that's super slow
<dragoonis>
I can see it found my cookbooks automatically - but that's super slow - how do I tell it the directory of my cookbooks?
nhhc has joined #ruby
<dminuoso>
dragoonis: rubocop is so magic, that it comes with a --help flag.
A124 has quit [Ping timeout: 260 seconds]
<dragoonis>
btw i'm now using cookstyle :)
<dragoonis>
apparently more appropriate for cookbook checking
hotpancakes has joined #ruby
jameser has joined #ruby
ketan has quit [Remote host closed the connection]
ketan has joined #ruby
saschavoid has joined #ruby
cschneid_ has joined #ruby
hotpancakes has quit [Ping timeout: 255 seconds]
antgel has joined #ruby
<dragoonis>
I'm using cook style and it spits out all the errors .. that's good .. I also see there's a "-f offences" flag to just give you a summary .. is there a way to run cookstyle so it shows every offence and the summary ?
Danny_ has quit [Read error: Connection reset by peer]
jaruga_________ has quit [Ping timeout: 276 seconds]
jameser has joined #ruby
ryzokuken has quit [Quit: Leaving]
aupadhye has quit [Ping timeout: 260 seconds]
roshanavand has quit [Quit: roshanavand]
jaruga_________ has joined #ruby
Danny_ has joined #ruby
jameser has quit [Client Quit]
Danny__ has joined #ruby
Danny_ has quit [Read error: Connection reset by peer]
xco has joined #ruby
synthroid has joined #ruby
ryzokuken has joined #ruby
ryzokuken has quit [Remote host closed the connection]
jameser has joined #ruby
<dragoonis>
I'm using TestKitchen and have installed the TestKitchen Docker driver - i'm running it now and it's saying "You must first install the docker CLI tool"
<ljarvis>
Fellow Rubyists, if you're an experienced Ruby developer looking for work and should you wish to work with a creature of greatness (me), please check out https://loco2.com/careers/software-engineer :)
<dragoonis>
but docker is installed and at /usr/bin/docker
BSaboia has joined #ruby
tonini_ has joined #ruby
jameser has quit [Client Quit]
antgel has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 246 seconds]
ketan has quit [Remote host closed the connection]
mim1k has joined #ruby
ketan has joined #ruby
nacsurte has joined #ruby
theunraveler has joined #ruby
milardovich has quit [Remote host closed the connection]
cout has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benjen has joined #ruby
oleo has joined #ruby
ntt has joined #ruby
milardovich has joined #ruby
nacsurte has quit [Ping timeout: 260 seconds]
milardovich has quit [Remote host closed the connection]
dionysus69 has joined #ruby
jameser has joined #ruby
elem has quit [Quit: Monkey]
xco has quit [Quit: xco]
nfk has quit [Remote host closed the connection]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
haylon has quit [Remote host closed the connection]
Danny__ has quit [Remote host closed the connection]
haylon has joined #ruby
ketan has quit [Remote host closed the connection]
ketan has joined #ruby
jtdowney has quit [Remote host closed the connection]
jameser has joined #ruby
jtdowney has joined #ruby
nfk has joined #ruby
simmaniac has joined #ruby
wingwalker has joined #ruby
jameser has quit [Client Quit]
cschneid_ has joined #ruby
wingwalker has quit [Client Quit]
sysvalve has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
Danny_ has joined #ruby
Danny_ has quit [Client Quit]
cschneid_ has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest47278 has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 246 seconds]
polishdub has joined #ruby
bkxd has joined #ruby
xRob_ has joined #ruby
hightower2 has joined #ruby
centrx has joined #ruby
Kug3lis_off is now known as Kug3lis
jameser has joined #ruby
haylon has quit [Remote host closed the connection]
hahuang65 has joined #ruby
haylon has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
livcd has joined #ruby
hotpancakes has joined #ruby
<livcd>
What did you guys do today to make Ruby succeed ?
<ljarvis>
wat
rippa has joined #ruby
mim1k has joined #ruby
jameser has quit [Client Quit]
hahuang65 has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Ping timeout: 255 seconds]
abhishekkr has quit [Ping timeout: 255 seconds]
im0nde has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
jameser has quit [Client Quit]
Renich_ has joined #ruby
cschneid_ has joined #ruby
jenrzzz has joined #ruby
<dragoonis>
I'm using TestKitchen and I have "cookbook_path" in my .kitchen.yml file - it's saying it "Can't find any cookbooks - chef will run with effectively no cookbooks"
im0nde has joined #ruby
<dragoonis>
my cookbook is at "chef/cookbooks/apache/metadata.rb"
milardovich has joined #ruby
<dragoonis>
my cookbook_path is "chef/cookbooks"
xco has joined #ruby
<dragoonis>
What did I do wrong ?
Renich has quit [Ping timeout: 240 seconds]
rkazak has joined #ruby
<ljarvis>
dragoonis: did you try #chef?
<dragoonis>
sorry :)
<ljarvis>
it's fine, they're just more likely to be able to help
swills has quit [Quit: Leaving]
skweek has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
Bhootrk_ has quit [Ping timeout: 255 seconds]
nowhere_man has joined #ruby
SuperL4g is now known as SuperLag
ferr has quit [Quit: WeeChat 1.8]
milardovich has quit [Remote host closed the connection]
Bhootrk_ has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
cbyrda has joined #ruby
hotpancakes has joined #ruby
chouhoulis has joined #ruby
nacsurte has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
ketan has quit [Remote host closed the connection]
<malice`>
I did what it told me(gem install memegen), and it installed, at least in theory. I can't call it from command line, however.
<malice`>
What could have gone wrong?
hutch34 has joined #ruby
<xco>
what’d be the simplest way to turn '2 534 545-3222' to '2 534 545 3222’? not i tried using regex to extract both numbers and white spaces only but i get only the numbers
Harzilein has joined #ruby
<Harzilein>
hi
<ljarvis>
xco: you just want to remove "-"?
Kug3lis is now known as Kug3lis_off
<ljarvis>
s/remove/replace with whitespace/
<xco>
any character that’s not a number
<ljarvis>
x.gsub(/[^0-9]/, "")
<dropsh0t>
.gsub(/\D/, ' ')
<Harzilein>
i just looked at the mri implementation of String#scan, including the scan_once function it uses. and i'm a bit puzzled. wasn't there some blog series once discussing ruby implementation internals?
<ljarvis>
ugh, i meant " " and also that's better ^
cagmz has joined #ruby
<xco>
i tried .gsub(/\D/, ' ') but i wanted to know if there’s another way to avoid using #gsub
<ljarvis>
why would you avoid it?
<ljarvis>
it's perfect for this
<Harzilein>
i'm mostly interested in performance questions, i.e. i have another language that also uses oniguruma and i don't want global search to perform worse than ruby ;)
nacsurte has joined #ruby
<elomatreb>
String#tr might be faster
Psy-Q has joined #ruby
<elomatreb>
So, `some_str.tr("^0-9", " ")`
<havenwood>
tr '^[0-9]', ' '
nobitanobi has quit []
<havenwood>
elomatreb: +1
<herwin>
xco: is it a phone number? a gem like global_phone might be more suitable for this
<havenwood>
tr is usually faster
<xco>
elomatreb: more like that :P :P
<xco>
herwin: yeah thanks :)
Burgestrand has joined #ruby
synthroid has joined #ruby
centrx has quit [Remote host closed the connection]
nacsurte has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
fergal has joined #ruby
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
hobodave has joined #ruby
mim1k has joined #ruby
aufi has quit [Quit: Leaving]
ResidentBiscuit has joined #ruby
skweek has joined #ruby
A124 has quit [Read error: Connection reset by peer]
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
A124 has joined #ruby
Kug3lis_off is now known as Kug3lis
mathys has quit [Quit: Leaving]
chouhoulis has quit [Remote host closed the connection]
ketan has quit [Remote host closed the connection]
ketan has joined #ruby
chouhoulis has joined #ruby
cdg has joined #ruby
snowcrshd has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 255 seconds]
snowcrshd has joined #ruby
Alex9 has joined #ruby
mim1k has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
milardovich has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
<kspencer>
for those that have used yard markup, is there a way because html entities and using \[ is not working
synthroid has quit [Remote host closed the connection]
<kspencer>
a way to escape [*
cdg has quit [Ping timeout: 240 seconds]
fergal has quit [Ping timeout: 276 seconds]
fergal_ is now known as fergal
roshanavand has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
polishdub has quit [Quit: Leaving]
jinie has joined #ruby
brent___ has quit [Remote host closed the connection]
swills has joined #ruby
mim1k has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
cbyrda has quit [Quit: leaving]
jinie- has joined #ruby
brent___ has joined #ruby
brent___ has quit [Remote host closed the connection]
brent___ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jinie has quit [Ping timeout: 268 seconds]
ntt has quit [Ping timeout: 246 seconds]
dreamthese has quit [Remote host closed the connection]
polishdub has joined #ruby
Chef3000 has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Quit: Closing time!]
synthroid has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
<kspencer>
for those that have used yard markup, is there a way to escape [], so it doesn't make links, because html entities or using \[ is not working, trying to document a query parameter 'domain[id]'
armyriad has joined #ruby
Bock has quit [Ping timeout: 260 seconds]
joonty has quit [Quit: This computer has gone to sleep]
<patarr>
What is Ruby convention to declare data on a class that can be referenced without an object instantiation? In Java, it would be a static variable in all caps. How about Ruby?
<kspencer>
patarr: like Class.varible?
<kspencer>
variable*
<patarr>
yeah, or Class::THE_THING
gigetoo has quit [Ping timeout: 240 seconds]
<kspencer>
as far as I know :: is module variables
<kspencer>
but its @var in class scope, VAR in module scope
<kspencer>
although I might be wrong
Serpent7776 has quit [Quit: Leaving]
<kspencer>
let me check
joonty has joined #ruby
<centrx>
patarr: Are you just talking about a constant?
dragoonis has quit [Quit: This computer has gone to sleep]
joonty has quit [Remote host closed the connection]
Kug3lis is now known as Kug3lis_off
<havenwood>
>> class Patarr; CONSTANT = 42; class << self; attr_accessor :changes end end; Patarr.changes = :changed; {class_variable: Patarr.changes, constant: Patarr::CONSTANT}
ketan has quit [Remote host closed the connection]
ketan has joined #ruby
brent___ has quit [Remote host closed the connection]
im0nde has quit [Ping timeout: 268 seconds]
jaruga_________ has quit [Quit: jaruga_________]
fergal has joined #ruby
marxarelli is now known as marxarelli|afk
ketan has quit [Ping timeout: 255 seconds]
brent___ has joined #ruby
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
[ohjn] has quit [Ping timeout: 276 seconds]
Alina-malina has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Read error: Connection reset by peer]
hotpancakes has quit [Remote host closed the connection]
cschneid_ has joined #ruby
mikecmpbll has joined #ruby
Burgestrand has quit [Quit: Closing time!]
mim1k has joined #ruby
Cohedrin_ has joined #ruby
xco has quit [Quit: xco]
xco has joined #ruby
xco has quit [Client Quit]
Kug3lis is now known as Kug3lis_off
Alina-malina has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
hotpancakes has joined #ruby
xco has joined #ruby
msmith has joined #ruby
gusrub has quit [Remote host closed the connection]
xco has quit [Client Quit]
xco has joined #ruby
AlexRussia has quit [Ping timeout: 268 seconds]
xco has quit [Client Quit]
mim1k has quit [Ping timeout: 255 seconds]
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
vuoto has quit [Quit: Lost terminal]
tau has joined #ruby
tau has left #ruby [#ruby]
ornerymoose has joined #ruby
SeepingN has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
gdonald has quit [Remote host closed the connection]
rohitpaulk has joined #ruby
hxegon has quit [Quit: leaving]
_joes_ has quit [Quit: Leaving]
hxegon has joined #ruby
gdonald has joined #ruby
<ornerymoose>
I have a SQL server statement stored in a method. If I run it, it returns an Array. However since this isn’t conected to the Rails db I can’t use ActiveModel’s Dirty methods (ie changed, changes, etc). How could I detect the count of the Array changing? https://gist.github.com/anonymous/0d64fe26e8d53ddcea9c8b96827b8a9b
_joes_ has joined #ruby
mostlybadfly has joined #ruby
Cohedrin_ has joined #ruby
Dimik has joined #ruby
<centrx>
ornerymoose: save the count in a variable and compare it?
<SloggerKhan>
If I define a struct in a module, and then include that module in a class, what's the correct way to reference said struct from a method call in another included module of said class? Should structs be defined in the base class itself instead of a module? Is it just bad practice to have dependent modules? (This is all at least partially originating from Rubocop suggesting modules/classes be limited to 100 lines.)
gusrub has joined #ruby
<haylon>
elomtreb and havenwood: rubocop --auto-correct did what I wanted, and fixed the ^\s+ issue I was having and got it all uniformed now
<haylon>
darix: for some reason, might be my vim version, that didn't do anything for me that I noticed
<havenwood>
Ah, didn't see elomatreb beat me to it by a long shot.
nupizdets has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
gusrub has quit [Remote host closed the connection]
ltem has quit [Quit: Leaving]
TomyLobo has joined #ruby
mim1k has joined #ruby
jeffaustin81 has joined #ruby
Bock has quit [Ping timeout: 240 seconds]
t-recx has quit [Quit: t-recx]
SloggerKhan is now known as Slogger
nupizdets has quit [Ping timeout: 255 seconds]
Dimik has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
rickumali has joined #ruby
nfk has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
nfk has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
snowcrshd has joined #ruby
kirun has joined #ruby
fergal has joined #ruby
belmoussaoui has joined #ruby
andrzejku has joined #ruby
shinnya has joined #ruby
gusrub has joined #ruby
synthroid has joined #ruby
Slogger has quit [Read error: Connection reset by peer]
cschneid_ has quit [Ping timeout: 246 seconds]
eightlimbs has joined #ruby
ltem has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
synthroi_ has quit [Ping timeout: 268 seconds]
cschneid_ has joined #ruby
lxsameer has joined #ruby
cschnei__ has joined #ruby
cdg has joined #ruby
cschneid_ has quit [Ping timeout: 276 seconds]
FastJack has joined #ruby
muelleme_ has joined #ruby
cdg_ has quit [Ping timeout: 246 seconds]
sepp2k has quit [Read error: Connection reset by peer]
cdg has quit [Ping timeout: 240 seconds]
abhishekkr has joined #ruby
matu has joined #ruby
matugm has quit [Ping timeout: 240 seconds]
joshs85 has quit [Quit: Page closed]
marxarelli|afk is now known as marxarelli
t-recx has joined #ruby
fergal has quit [Quit: fergal]
xco has joined #ruby
Dimik has quit [Ping timeout: 246 seconds]
simmaniac has quit [Quit: Leaving]
ketan has joined #ruby
tenderlo_ has joined #ruby
sekmo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tenderlove has quit [Ping timeout: 240 seconds]
ketan has quit [Ping timeout: 255 seconds]
jeffaustin81 has quit [Read error: Connection reset by peer]
abhishekkr has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
AgentVenom has joined #ruby
agent_white has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
centrx has quit []
dviola has quit [Quit: WeeChat 1.8]
gdonald has quit [Remote host closed the connection]
Cohedrin_ has quit [Read error: Connection reset by peer]
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
Cohedrin_ has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
Yxhuvud has quit [Remote host closed the connection]
Yxhuvud has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.8]
catphish has joined #ruby
jphase has quit [Ping timeout: 276 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
hxegon has quit [Ping timeout: 240 seconds]
muelleme_ has quit [Ping timeout: 260 seconds]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
abhishekkr has joined #ruby
tenderlo_ has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
gusrub has quit [Remote host closed the connection]
duderonomy has quit [Ping timeout: 260 seconds]
cam27 has quit [Quit: cam27]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
enterprisey has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
xzhao has quit [Remote host closed the connection]
dionysus69 has joined #ruby
xzhao has joined #ruby
dviola has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
xzhao has quit [Read error: Connection reset by peer]
dionysus69 has quit [Client Quit]
xzhao has joined #ruby
xzhao has quit [Remote host closed the connection]
Jamdaman has quit [Read error: Connection reset by peer]
Jamdaman has joined #ruby
^mtkd has quit []
a1ph4g33k has joined #ruby
al2o3-cr has joined #ruby
jphase has joined #ruby
vondruch_ has joined #ruby
belmoussaoui has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
vondruch has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
KeyJoo has quit [Ping timeout: 255 seconds]
ResidentBiscuit has quit [Quit: Critical Miss]
dviola has quit [Quit: WeeChat 1.8]
jackjackdripper has joined #ruby
hotpancakes has joined #ruby
Chef3000 has joined #ruby
dviola has joined #ruby
kirun has quit [Quit: Konversation terminated!]
enterprisey has quit [Remote host closed the connection]
hotpanc__ has quit [Ping timeout: 240 seconds]
Aloy has quit [Ping timeout: 255 seconds]
ldnunes has quit [Quit: Leaving]
dviola has quit [Client Quit]
oleo has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
dviola has joined #ruby
cschnei__ is now known as cschneid_
ornerymoose has quit [Ping timeout: 240 seconds]
abhishekkr has quit [Ping timeout: 255 seconds]
snowcrshd has quit [Remote host closed the connection]
duderonomy has joined #ruby
ketan has joined #ruby
hobodave has quit [Ping timeout: 260 seconds]
ketan has quit [Ping timeout: 240 seconds]
sekmo has joined #ruby
mgorbach has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 255 seconds]
<haylon>
does anyone have a link to how to tell the difference between different types of SSL/TLS Key/Certificate formats without having to read the whole RFC?
<haylon>
they make me want to pull my eyes out.
Jamdaman has quit [Quit: Ex-Chat]
Kug3lis_off is now known as Kug3lis
ltem has quit [Quit: Leaving]
mgorbach has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
saschavoid has quit [Quit: leaving]
sekmo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
jphase has quit [Ping timeout: 240 seconds]
Renich_ has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
mim1k has joined #ruby
catphish has quit [Quit: Leaving]
Cohedrin_ has quit [Read error: Connection reset by peer]
Cohedrin_ has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
<zenspider>
rawr
<zenspider>
haylon: welcome to the club!
nacsurte has joined #ruby
hahuang65 has joined #ruby
skweek has quit [Ping timeout: 268 seconds]
weaksauce has quit [Ping timeout: 255 seconds]
<haylon>
Well, I think I literally have 3 different types of SSL Certificates
<haylon>
from the same provider, by people who didn't know what they were doing
<haylon>
Then I started looking at the openssl rubygem, and can't seem to figure out how to supply the subject, country, and all that information for it
<eightlimbs>
i have a bunch of long decimals (ex: 0.001239871298371, 0.014141414, 0.03333333, 0.023450234502345) i want to find ones that have long repeating patterns (like 0.023450234502345). what's a good way to go about searching through an array with hundreds of these numbers? I've converted them to a string and thought maybe there is a REGEX way to do it, or iterating through each string but I don't know how one would do that..
jenrzzz has quit [Ping timeout: 240 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<eightlimbs>
thank you haylon and baweaver for the links. i'm checking them out now.
hxegon has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
gusrub has quit [Remote host closed the connection]
lagweezle_away is now known as lagweezle
Cohedrin_ has quit [Write error: Connection reset by peer]
vondruch_ has quit [Quit: vondruch_]
vondruch_ has joined #ruby
Dimik has joined #ruby
Cohedrin_ has joined #ruby
<mozzarella>
guys
Cohedrin_ has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
<zenspider>
eightlimbs: they're floats right?... so they're only textual representations of faulty & lossy fractions... what are you REALLY trying to do?
<zenspider>
eightlimbs: x = []; ary.each do |y| x << y; end; x
<zenspider>
eightlimbs: same as: x = ary.map { |y| y }
milardovich has quit []
<zenspider>
eightlimbs: um... those numbers don't necessarily start with "0.00"
herbmillerjr has quit [Quit: Konversation terminated!]
herbmillerjr has joined #ruby
Kug3lis is now known as Kug3lis_off
Kug3lis_off is now known as Kug3lis
Kug3lis is now known as Kug3lis_off
hahuang61 has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
<mozzarella>
yeah
fergal has quit [Quit: fergal]
<eightlimbs>
since it was only up to 1000, i just glanced at the result and saw the majority started with 0.00. I suppose if i should just cut off the "0."
<zenspider>
shouldn't need to cut off any of it if you don't want to
danielpclark has joined #ruby
Kug3lis has joined #ruby
<eightlimbs>
ok. is selecting n.size > 18 ok?
<eightlimbs>
im not stuck on this approach either, this is just what came to my mind..
<eightlimbs>
would love to know how you and mozzarella would approach this
poloych has joined #ruby
maxirater has joined #ruby
perniciouscaffei has joined #ruby
<mozzarella>
why > 18? seems like this is as much precision as the float type will give you
hxegon has quit [Ping timeout: 240 seconds]
<eightlimbs>
i wanted to eliminate the shorter decimals like 0.1, 0.25, since i know those won't be a candidate for the solution
<eightlimbs>
but i'm starting to think it's completely unnecessary
<mozzarella>
it is
<zenspider>
depends on how you go about your solution... could be a cheap way to speed things up
<zenspider>
that said... it is unnecessary. :)
<eightlimbs>
ok
<mozzarella>
you're drawing the line arbitrarily, and 18 is the maximum you'll ever get
<mozzarella>
with Float
<eightlimbs>
so can we iterate through each number string some how?
KillerFox has quit [Ping timeout: 258 seconds]
<eightlimbs>
searching for a range of repeating numbers
<mozzarella>
eightlimbs: I'm going to give you your first clue
<mozzarella>
Float is not precise enough, you need more precision
zeddd has quit [Quit: Going offline, see ya! (www.adiirc.com)]
TomyLobo has quit [Ping timeout: 255 seconds]
lightstalker has joined #ruby
maxirater has quit [Quit: Leaving]
tenderlove has quit [Ping timeout: 255 seconds]
<eightlimbs>
next_float?
Xeago has quit [Ping timeout: 260 seconds]
<eightlimbs>
nah..
<eightlimbs>
BigDecimal
<mozzarella>
that is what I used
<zenspider>
do you really need that? hrm
<mozzarella>
you do
<eightlimbs>
why do you need more precision?
<zenspider>
I don't want to redo this in ruby...
<zenspider>
no no no... I'm busy
Xeago has joined #ruby
<mozzarella>
eightlimbs: because the biggest recurring cycle is gigantic
Kug3lis_off has quit [Read error: Connection reset by peer]
<mozzarella>
a Float doesn't show it entirely
snowcrshd has joined #ruby
raspado has joined #ruby
<mozzarella>
with BigDecimal you get arbitrary precision
<eightlimbs>
hmm
<mozzarella>
but obviously it's slower
bradleyprice has joined #ruby
<eightlimbs>
i don't see how that would help me. i can't wrap my head around how you would find the repeating pattern
<mozzarella>
then work on that first
<eightlimbs>
ok
<mozzarella>
and then try your algorithm on manually written strings
<mozzarella>
there are probably multiple ways to do it
<baweaver>
for each character in number, push onto stack. When next number is equal to bottom of stack, start a new stack until it reaches that again. If the stacks are equal, then....
snowcrshd has quit [Ping timeout: 240 seconds]
<baweaver>
but you can also do a quick sanity for easy cases to drop the amount of power needed