havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
dikaio has joined #ruby
lordalveric has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 260 seconds]
cydrobolt_ has quit [Quit: oooh...what does THIS button do?]
cydrobolt has joined #ruby
cydrobolt has joined #ruby
cydrobolt has quit [Changing host]
jusa has joined #ruby
GinoMan has joined #ruby
nachoman has joined #ruby
__Yiota has joined #ruby
cabraturgo has quit [Quit: Bye!]
__Yiota has quit [Client Quit]
jusa has quit [Ping timeout: 260 seconds]
iNs has joined #ruby
mentok has joined #ruby
cam27 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarl1Machado has quit [Ping timeout: 268 seconds]
<cam27> I use Vim and am just wondering if anyone uses anything other than Vim or if the VimRuby plugin is worth the install? I like the intellisense (auto complete) features that Visual Studo and Xcode provide.
BSab has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
BSAlb has quit [Ping timeout: 260 seconds]
MrSprinkle is now known as MrSparkle
kobain has joined #ruby
weathermaker has quit [Ping timeout: 268 seconds]
JoshS has quit [Ping timeout: 258 seconds]
redaudit has joined #ruby
dikaio has quit [Quit: Lost terminal]
Cohedrin has quit [Read error: Connection reset by peer]
antib has quit [Ping timeout: 245 seconds]
Cohedrin has joined #ruby
weathermaker has joined #ruby
jhack_ has quit [Quit: Leaving]
endemic has quit [Quit: Leaving.]
endemic has joined #ruby
JoshS has joined #ruby
endemic has quit [Client Quit]
jameser has joined #ruby
endemic has joined #ruby
charliesome has joined #ruby
t-recx has quit [Quit: t-recx]
houhoulis has quit [Remote host closed the connection]
GinoMan has quit [Remote host closed the connection]
weathermaker has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
harfangk has joined #ruby
unpleased__ has quit [Quit: Sto andando via]
ledestin has joined #ruby
Cohedrin has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
Bock has joined #ruby
Bock has quit [Max SendQ exceeded]
nachoman has quit []
bonhoeffer_ has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
nachoman has joined #ruby
Bock has joined #ruby
jane_booty_doe has joined #ruby
nachoman has quit [Client Quit]
charliesome has joined #ruby
enterprisey has quit [Ping timeout: 268 seconds]
cschneid_ has joined #ruby
Tempesta_ is now known as Tempesta
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Kuukunen- has quit [Quit: leaving]
Kuukunen has joined #ruby
cschneid_ has quit [Ping timeout: 268 seconds]
mentok has quit [Ping timeout: 240 seconds]
apparition has joined #ruby
cschneid_ has joined #ruby
cabraturgo has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Tempesta has quit [Quit: AdiIRC is updating to v2.8 Beta Build (2017/05/14) 64 Bit]
Tempesta has joined #ruby
Azure has joined #ruby
weathermaker has joined #ruby
cabraturgo has quit [Quit: Bye!]
JeanCarloMachado has joined #ruby
JeanCarl1Machado has joined #ruby
rfoust has joined #ruby
gizmore|2 has joined #ruby
cam27 has quit [Quit: cam27]
gizmore has quit [Ping timeout: 240 seconds]
d^sh has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
rkellermeyer has quit [Quit: Leaving]
weathermaker has quit [Ping timeout: 240 seconds]
joast has joined #ruby
fmccann has joined #ruby
fmccann has quit [Client Quit]
jusa has joined #ruby
jusa has quit [Ping timeout: 240 seconds]
genpaku has quit [Remote host closed the connection]
genpaku has joined #ruby
wilo has joined #ruby
jud^ has joined #ruby
jud has quit [Ping timeout: 245 seconds]
enterprisey has joined #ruby
herbmillerjr has quit [Quit: Konversation terminated!]
igniting has quit [Ping timeout: 260 seconds]
cabraturgo has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 272 seconds]
JeanCarl1Machado has joined #ruby
nomad101 is now known as pifon
excph has quit [Ping timeout: 240 seconds]
igniting has joined #ruby
mim1k has joined #ruby
SimpleIRC_VLBcT has joined #ruby
SimpleIRC_VLBcT has quit [Client Quit]
mim1k has quit [Ping timeout: 240 seconds]
weathermaker has joined #ruby
weathermaker has left #ruby [#ruby]
cabraturgo has quit [Quit: Bye!]
mentok has joined #ruby
Toledo has joined #ruby
silentoxygen has joined #ruby
jusa has joined #ruby
mentok has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 272 seconds]
JeanCarl1Machado has quit [Ping timeout: 268 seconds]
silentoxygen has quit []
wilo has quit [Read error: Connection reset by peer]
bravo has joined #ruby
wilo has joined #ruby
bravo has quit [Client Quit]
cschneid_ has quit [Remote host closed the connection]
jusa has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
Cohedrin has quit [Max SendQ exceeded]
pharma_joe has joined #ruby
silentoxygen has joined #ruby
cabraturgo has joined #ruby
lightstalker has quit [Ping timeout: 240 seconds]
jane_booty_doe has quit [Quit: Leaving]
Cohedrin has joined #ruby
lightstalker has joined #ruby
Trynemjoel2 has quit [Ping timeout: 245 seconds]
milardovich has joined #ruby
enilsen16 has joined #ruby
linetrace has quit [Read error: Connection reset by peer]
milardovich has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
Cohedrin has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
cschneid_ has quit [Ping timeout: 272 seconds]
Cohedrin has joined #ruby
Select has joined #ruby
<Select> Hi
igniting has quit [Ping timeout: 240 seconds]
patr0clus has quit [Quit: tempusfugit]
Select has left #ruby [#ruby]
etehtsea has joined #ruby
gix has quit [Ping timeout: 240 seconds]
araujo has quit [Quit: Leaving]
cabraturgo has quit [Quit: Bye!]
gix has joined #ruby
enilsen16 has quit [Ping timeout: 240 seconds]
enilsen16 has joined #ruby
enilsen16 has quit [Client Quit]
quobo has quit [Quit: Connection closed for inactivity]
igniting has joined #ruby
latemus has quit [Ping timeout: 240 seconds]
mikias has joined #ruby
etehtsea has quit [Ping timeout: 240 seconds]
jusa has joined #ruby
_whitelogger has joined #ruby
enilsen16 has joined #ruby
nullfxn has joined #ruby
renchan has joined #ruby
wilo has quit [Quit: Konversation terminated!]
Caius has quit [Ping timeout: 255 seconds]
Caius has joined #ruby
ych has joined #ruby
mim1k has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
enilsen16 has quit [Quit: enilsen16]
mentok has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikias has left #ruby [#ruby]
igniting has quit [Ping timeout: 268 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
jusa has quit [Ping timeout: 272 seconds]
drcode has quit [Quit: ZNC 1.6.5 - http://znc.in]
drcode has joined #ruby
slima has left #ruby [#ruby]
tildes has joined #ruby
Cohedrin has joined #ruby
oleo has quit [Quit: irc client terminated!]
cobragoat has joined #ruby
cobragoat has left #ruby [#ruby]
igniting has joined #ruby
mentok has quit [Ping timeout: 268 seconds]
ur5us has quit [Remote host closed the connection]
dionysus69 has joined #ruby
__Yiota has joined #ruby
User458764 has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laekur has joined #ruby
anisha has joined #ruby
JaReAx has quit [Quit: Try HydraIRC -> http://www.hydrairc.com <-]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* dminuoso pokes Radar
bkxd has quit [Read error: Connection reset by peer]
<dminuoso> You again. In here. ;o
tildes has quit [Ping timeout: 240 seconds]
<foxmask> bonjello
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jameser_ has joined #ruby
kies has quit [Ping timeout: 240 seconds]
User458764 has joined #ruby
jameser has quit [Ping timeout: 260 seconds]
Burgestrand has joined #ruby
bkxd has joined #ruby
sjums_ is now known as sjums
<dminuoso> >> [2].map &->(a) { return 1;}
<ruby[bot]> dminuoso: # => [1] (https://eval.in/794962)
<dminuoso> >> [2].map { |a| next 1; }
<ruby[bot]> dminuoso: # => [1] (https://eval.in/794963)
<dminuoso> Fuck blocks.
<dminuoso> Going lambda all the way now!
Burgestrand has quit [Quit: Closing time!]
<dminuoso> This "next" nonsensery just cost me 17 precious seconds of my life in debugging.
Talltree_ is now known as Talltree
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
yeticry has quit [Ping timeout: 240 seconds]
calvinkw1 has joined #ruby
judofyr has joined #ruby
yeticry has joined #ruby
quobo has joined #ruby
calvinkw1 has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 246 seconds]
calvinkw1 has joined #ruby
calvinkw1 has quit [Client Quit]
redaudit has quit [Quit: Cya]
jaruga has joined #ruby
Talltree has quit [Ping timeout: 260 seconds]
Derperperd has quit [Quit: Peace out]
conta has joined #ruby
Mortomes|Work has joined #ruby
olblak has joined #ruby
olblak has quit [Client Quit]
olblak has joined #ruby
Seenox has joined #ruby
Burgestrand has joined #ruby
ych has quit [Quit: Textual IRC Client: www.textualapp.com]
mim1k has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 240 seconds]
ferr has joined #ruby
xall has joined #ruby
enterprisey has quit [Remote host closed the connection]
xenops has quit [Ping timeout: 240 seconds]
excph has joined #ruby
bkxd has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
<Radar> dminuoso: Hi.
<Radar> Please leave a message after the tone. *BEEP*
excph has quit []
haxrbyte has joined #ruby
pharma_joe has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
anisha_ has joined #ruby
enterprisey has quit [Remote host closed the connection]
anisha has quit [Read error: Connection reset by peer]
latemus has joined #ruby
TomyWork has joined #ruby
jackrandom has joined #ruby
jusa has joined #ruby
Burgestrand has quit [Quit: Closing time!]
jusa has quit [Ping timeout: 240 seconds]
yogg-saron has joined #ruby
kies has joined #ruby
Burgestrand has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
andikr has joined #ruby
mark_66 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Caius has quit [Ping timeout: 255 seconds]
marr has joined #ruby
Caius has joined #ruby
im0nde has joined #ruby
User458764 has joined #ruby
biberu has joined #ruby
Volhist has joined #ruby
kies has quit [Ping timeout: 268 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pandaant has joined #ruby
aufi has joined #ruby
marr has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 272 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Pongles has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
charliesome has joined #ruby
bkxd has joined #ruby
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 246 seconds]
im0nde has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
jameser has joined #ruby
mikecmpbll has joined #ruby
User458764 has joined #ruby
<dzodzo> greetings, i have a matrix of conditions that are represented by 2 variables - i have a category (exists, doesn't) and tag (exists, doesn't), what would be an ellegant way to implement the decision logic? there can be 4 states, is there something like multivalue case category,tag option?
<dzodzo> or in this case it's ok with if A && B, elsif !A && B... etc
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bigkevmcd has joined #ruby
antgel has joined #ruby
TreyG has quit [Ping timeout: 260 seconds]
TreyG has joined #ruby
nofxx has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
mim1k has joined #ruby
<judofyr> dzodzo: you can do: case [A, B]; when [true, true]; … end
<judofyr> but I'm not sure if it's cleaner
bigkevmcd has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
<dzodzo> that might represent the matrix better, i will try it, thanks
lipoqil has joined #ruby
mim1k has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
Dimik has quit [Ping timeout: 255 seconds]
tomphp has joined #ruby
aufi has quit [Remote host closed the connection]
starmix has joined #ruby
aufi has joined #ruby
judofyr_ has joined #ruby
judofyr has quit [Read error: Connection reset by peer]
judofyr has joined #ruby
judofyr_ has quit [Read error: Connection reset by peer]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
haxrbyte has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 246 seconds]
haxrbyte has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
kies has joined #ruby
bkxd has joined #ruby
Beams has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
Mortomes|Work has joined #ruby
flying has joined #ruby
tvw has joined #ruby
lxsameer has joined #ruby
tvw has quit [Client Quit]
jackrandom has quit [Remote host closed the connection]
tvw has joined #ruby
Dimik has joined #ruby
dcunit3d has quit [Ping timeout: 255 seconds]
antib has joined #ruby
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
yogg-saron has quit [Quit: Textual IRC Client: www.textualapp.com]
latemus is now known as suh
alazred has joined #ruby
alazred has quit [Changing host]
alazred has joined #ruby
suh is now known as latemus
SenpaiSilver has quit [Quit: Leaving]
workmad3 has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
im0nde has joined #ruby
KiderSpiel has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
latemus is now known as suh
suh is now known as latemus
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
KiderSpiel has quit [Quit: KiderSpiel]
<dyjakan> any input appreciated (and look at that, I even mentioned us!) :)
Talltree has joined #ruby
BTRE has quit [Quit: Leaving]
johnmccabe has joined #ruby
SenpaiSilver has joined #ruby
mim1k_ has quit [Read error: Connection reset by peer]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
alazred has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
KiderSpiel has joined #ruby
BTRE has joined #ruby
TvL2386_ has joined #ruby
TvL2386 has quit [Ping timeout: 260 seconds]
TvL2386_ is now known as TvL2386
jrafanie has joined #ruby
alazred has joined #ruby
jrafanie has quit [Client Quit]
feal has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
unshadow has joined #ruby
bkxd has joined #ruby
Talltree_ has joined #ruby
Talltree has quit [Ping timeout: 272 seconds]
jaruga has quit [Quit: jaruga]
jamesaxl has joined #ruby
ur5us has quit [Remote host closed the connection]
tildes has joined #ruby
tlaxkit has joined #ruby
johnmccabe has quit [Quit: Textual IRC Client: www.textualapp.com]
jameser has quit [Ping timeout: 240 seconds]
romank has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
im0nde has quit [Ping timeout: 268 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
Talltree_ has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
Talltree has joined #ruby
pifon has quit [Quit: Connection closed for inactivity]
tomphp has joined #ruby
flying has quit []
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
Tripolitix has joined #ruby
GodFather has joined #ruby
flying has joined #ruby
KiderSpiel has quit [Quit: KiderSpiel]
haxrbyte has quit [Quit: Leaving...]
yitsushi has joined #ruby
Skarlso has joined #ruby
whiteline has joined #ruby
Tripolitix has left #ruby [#ruby]
dcunit3d has joined #ruby
<ikopico> dyjakan: nice! My two cents: I would've extract some of the _Rails_ questions for a general webapp question, such as "What is REST?", "What is an ORM?"
GodFather has quit [Client Quit]
TreyG_ has joined #ruby
GodFather_ has joined #ruby
dcunit3d has quit [Client Quit]
tildes has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 260 seconds]
jaruga has joined #ruby
TreyG has quit [Ping timeout: 258 seconds]
<dyjakan> ikopico: I see your point but I think that currently there's not enough questions that can be abstracted (i.e. general web app section would be too small imo)
bkxd has joined #ruby
<ikopico> dyjakan: Sure.
Burgestrand has quit [Quit: Closing time!]
TreyG has joined #ruby
<dzodzo> judofyr: works as intended, thanks :)
TreyG_ has quit [Ping timeout: 255 seconds]
GodFather_ has quit [Ping timeout: 240 seconds]
<dminuoso> Mmmm. Regarding that "and vs &&" -> didn't we have an exceptional case showing some really nasty subtle difference between the two?
<dminuoso> Folks, should this be a thing?
<dminuoso> I feel like the parser should not choke on this.
alazred has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 268 seconds]
Talltree has quit [Ping timeout: 272 seconds]
Talltree has joined #ruby
<dyjakan> dminuoso: what do you mean by nasty subtle difference?
<dyjakan> from my personal experience I don't use 'and' and other word logical operators in ruby and I would expect because they have lower priority, I already hit bugs with them
<dyjakan> (I would expect elaboration on this from a candidate)
nadir has joined #ruby
TreyG_ has joined #ruby
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TreyG has quit [Ping timeout: 268 seconds]
mim1k has joined #ruby
im0nde has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Vingador has joined #ruby
_aeris_ has joined #ruby
ldnunes has joined #ruby
<judofyr> dzodzo: is it any cleaner though? might be more cryptic with true/false everywhere
InsaneSplash has joined #ruby
JeanCarloMachado has joined #ruby
JeanCarl1Machado has joined #ruby
<workmad3> dminuoso: the parser can be a bit picky about running an expression like that across two lines... you can always end a line with \ to fix the issue though (https://eval.in/795334)
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3> but yeah, might be the case that it should be a bit more lenient :)
<InsaneSplash> I have data returned from a REST API in JSON format, the data includes a results section which is being turned in to an array. I am trying to obtain a number of values from this but not making any headway. the 'dig' only works on JSON when its seen as a hash, but in this case there is an array within the hash...
<InsaneSplash> would be great if I could reference data using a key like first.second.third
mim1k has quit [Ping timeout: 240 seconds]
Kanbi_ has quit [Ping timeout: 240 seconds]
Vingador has quit [Remote host closed the connection]
JeanCarl1Machado has quit [Ping timeout: 246 seconds]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
minimalism has quit [Quit: minimalism]
<dzodzo> judofyr: this is just for a matrix 2x2 so it's quite clear
minimalism has joined #ruby
cabraturgo has joined #ruby
JeanCarloMachado has joined #ruby
jameser has joined #ruby
JeanCarl1Machado has joined #ruby
cabraturgo has quit [Client Quit]
<dminuoso> matthewd: Mmm yeah I figured \ would fix it. I mean it definitely works for method calls, but debugging a LALR parser to figure out why it would even break is a pure nightmare..
tabakhase has quit [Ping timeout: 240 seconds]
<dminuoso> Last time after a few hours my head was spinning around states..
JeanCarloMachado has quit [Ping timeout: 268 seconds]
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
<dminuoso> InsaneSplash: You can provide your own mixin to add :second and :third methods respectively.
JeanCarloMachado has joined #ruby
JeanCarl1Machado has joined #ruby
morfin has joined #ruby
<morfin> which characters are valid in email before @?
<morfin> i mean right next to it
<dminuoso> morfin: Does this channel look like #google-for-rfc ?
<morfin> cmon rfc regexp is huge
<InsaneSplash> dminuoso: ok let me google, thanks :)
<dminuoso> You asked what characters are valid.
<dminuoso> Whether you like the answer or not should be irrelevant.
<morfin> hmm
jackrandom has joined #ruby
<dminuoso> There is no more concise way of describing what a valid email looks like than the RFC because it is the normative document.
Mortomes|Work has quit [Ping timeout: 260 seconds]
<dminuoso> Now the reality is that many implementations only allow a subset.
arne is now known as Bish
<dminuoso> But there's no consensus, so you might as well go with full RFC compliance.
pandaant has quit [Remote host closed the connection]
InsaneSplash has quit []
<morfin> i am just going to remove some simple cases before sending to API
<morfin> like whitespace before @
blackwind_123 has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
<morfin> http://sphinx.mythic-beasts.com/~pdw/cgi-bin/emailvalidate not sure how valid is this but that says whitespace before @ is valid
<workmad3> morfin: if it's quoted, anything is allowed before the @
<workmad3> " fooo "@[192.168.0.1] is valid
jackrandom has quit [Remote host closed the connection]
<workmad3> (it'll almost certainly never get anywhere, so it's not deliverable... but it's valid)
<dminuoso> Which is that "reality" part that I mentioned.
<workmad3> :)
<morfin> funny, i can't be sure what's valid and what's not because remote API has different opinion
<dminuoso> The issue is just that by arbitrarily disallowing valid email addresses you just add to the ball of reasons why the entire world is riding on non-compliant mail.
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3> morfin: if you have a remote API that's validating email addresses, just chuck them at it and record the response...
<dminuoso> morfin: Let the remote API decide entirely then.
blackwind_123 has joined #ruby
<workmad3> trying to rebuild a different system's email validation rules based on testing inputs is a crazy and futile exercise...
jameser has joined #ruby
marr has joined #ruby
jameser has quit [Client Quit]
nowhere_man has quit [Ping timeout: 245 seconds]
jameser has joined #ruby
hashrocket has joined #ruby
jameser has quit [Client Quit]
jameser has joined #ruby
<dminuoso> Though you can implement a more generous simple regex matcher, and only do the remote validation on submit (or debounced)
Fysicus has quit [Ping timeout: 240 seconds]
<workmad3> ^ or use `type=email` for submit and provide a regexp matcher as a fallback (assuming webpage entry)
<dminuoso> Say something along the lines of [\w\s-_]+@[\w\s-_\.]+
bmurt has joined #ruby
<dminuoso> Oh type=email that's neat.
<morfin> well, i will ask different question
PaulCapestany has quit [Quit: .]
<morfin> how can i replace characters around other character?
<morfin> i will remove spaces only and try send like that
mim1k has joined #ruby
PaulCapestany has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
bonhoeffer has joined #ruby
shinnya has joined #ruby
tgragnato has joined #ruby
BSab has quit [Quit: Leaving]
tomphp has joined #ruby
BSaboia has joined #ruby
vali has joined #ruby
<ljarvis> are we validating email addresses up in here?
tvw has quit [Ping timeout: 260 seconds]
xenops has joined #ruby
<canton7> \w includes underscore. "-" needs escaping there. You don't allow +'s, or quotes, or...
<canton7> see how many of these you fail, and therefore how many people you're pissing off: https://en.wikipedia.org/wiki/Email_address#Examples
rkoller has joined #ruby
quite has joined #ruby
<canton7> (gmail users can put stuff after a + at the end of their email, e.g. "foo.bar+reddit@gmail.com", which is very useful for filtering, etc. They tend to get pissed off if your email validation rejects that)
dcluna has quit [Ping timeout: 272 seconds]
<workmad3> canton7: number of people on the internet pissed off if you disallow 'foo@localhost' == 0
<judofyr> the best email regex: /@/
<ljarvis> optimised
dcluna has joined #ruby
<canton7> /\A.+@.+\Z/ is probably not a bad one for real-world usage. I mean, what's the point of email validation? About the only reasons are making sure someone doesn't leave it blank, and making sure they don't accidentally type their name. Anything else is only ever going to piss off someone
<apeiros> email validations? fun, just tweeted about that today…
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<canton7> if you're preventing someone from typing rubbish... they'll just keep making up rubbish until they find one that passes your validation: they won't go "oh, no, they rejected 'a@a', I'd better type my actual email"
<apeiros> RFC822 is rather ancient
<workmad3> majority of time you don't care about validity, you care about deliverability... and that's a pretty different issue
<canton7> related: *this* is how you validate an email: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
<workmad3> I found an address that ^ incorrectly says is valid a while ago :)
<apeiros> regarding email validation (without having read full scrollback): 1) most tips and expressions on the internet are *wrong*.
<apeiros> 2) you most likely do NOT want to allow all technically valid email addresses
houhoulis has joined #ruby
chouhoulis has joined #ruby
<apeiros> 3) as workmad3 said, syntactically valid emails are not necessarily deliverable. there's no real way to test deliverability. best you can do is send an email which requires an action from the recipient (not always applicable)
judofyr has quit [Remote host closed the connection]
renchan_ has joined #ruby
renchan has quit [Read error: Connection reset by peer]
houhoulis has quit [Ping timeout: 246 seconds]
ramortegui has joined #ruby
<apeiros> re canton7 "what's the point of email validations": depends entirely on where you use it. we had terrible quality in our database which made campaigns rather useless. tons of the bad email addresses would have been preventable. things like foo@gmail@com (which your regex would still allow)
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> others report vastly lowered drop-out rates in online campaigns - again, due to silly typos usually like htomail.com
<apeiros> (of course, that's something a regex alone won't help)
feal has quit [Quit: Leaving]
<workmad3> apeiros: gmail.con is a common one we've had at my workplace
<apeiros> but nb, I prefer a validator which allows too much over a validator which allows too little. tons of validators which fail at utf8 in local part, IDNs, or +, & etc. in local part.
<linduxed> hey guys! let's say that i've got some high-res source image that gets run through rmagick, or something like that. over on whatever storage solution one uses, there are now at least two files: "thumb.png" and "full.png"
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<linduxed> one way of storing links to these images would be to have a database column that is called "thumbnail_url" and one called "full_image_url"
<linduxed> but if i have like 5 of these, that's a lot of extra database columns
<linduxed> an alternative would be to generate links that have hardcoded suffixes, such as "thumb.png", "full.png" and so on
<linduxed> easier, but i think it's a hacky solution that's error prone
<ljarvis> i don't think that's hacky
<linduxed> you don't?
<ljarvis> no not really, i think it's fine
<linduxed> hmmm
<linduxed> maybe if the suffix was fetched from a list of constants
<ljarvis> you could be able to build image urls dynamically in my opinion, and just update a single endpoint if it changes
chouhoulis has quit [Remote host closed the connection]
<linduxed> hmmm, ok
<ljarvis> well sure, you can validate suffixes if you'd like
chouhoulis has joined #ruby
Fysicus has joined #ruby
<crayfishx> qq.... I have a hash which might contain some procs/lambdas - I don't care about them specifically but later on I need to Marshal.load/dump the hash so Im trying to find a nice way to 'clean' the hash of any procs/lambdas....etc. The easiest way so far is to do cleanhash = JSON.load(dirtyhash.to_json) which "stringyfies" everything and means I can Marshal.dump/load it without error - but that's pretty expensive - is there are better way to do
<crayfishx> this?
yehowyada has joined #ruby
<linduxed> ljarvis: well, thanks for your input!
anisha_ has quit [Quit: This computer has gone to sleep]
<ljarvis> crayfishx: keep a copy that does not contain procs?
cdg has joined #ruby
minimalism has quit [Quit: minimalism]
Bhootrk_ has joined #ruby
alessandro_ has joined #ruby
igniting has quit [Ping timeout: 268 seconds]
<elomatreb> crayfishx: Hash has select/reject methods, def. cleaner than relying on JSON
xall has quit [Ping timeout: 268 seconds]
<crayfishx> elomatreb: yeah - problem is the procs could be burried in nested hashes or arrays
bonhoeffer has quit [Ping timeout: 240 seconds]
<crayfishx> ljarvis: I don't build the hash, it's coming out of a third party library - I just need to parse it to make it dumpable by Marshal.
ldnunes has quit [Quit: Leaving]
quite has left #ruby ["WeeChat 1.7.1"]
aurelien has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
patarr has joined #ruby
gnufied has joined #ruby
DLSteve has joined #ruby
alessandro_ has quit [Quit: Page closed]
yeticry_ has joined #ruby
mentok has joined #ruby
ResidentBiscuit has joined #ruby
<dminuoso> canton7: It was not meant as an accurate usable regexp.
tildes has joined #ruby
igniting has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
rfoust has joined #ruby
nowhere_man has joined #ruby
ski4x7 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
vali has quit [Quit: vali]
pupsicle has quit [Quit: pupsicle]
apparition has joined #ruby
jusa has joined #ruby
dacod has joined #ruby
alazred has joined #ruby
alazred has joined #ruby
theRoUS` is now known as theRoUS
bkxd has quit [Ping timeout: 246 seconds]
gimmic_ is now known as gimmic
bonhoeffer has joined #ruby
LastWhisper____ has joined #ruby
laekur has quit [Remote host closed the connection]
xenops has quit [Remote host closed the connection]
tomphp has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
tlaxkit has quit [Quit: tlaxkit]
flyingX has joined #ruby
tomphp has quit [Ping timeout: 246 seconds]
flyingX has quit [Remote host closed the connection]
flying has quit [Read error: Connection reset by peer]
sunya7a__ is now known as sunya7a
flying has joined #ruby
aurelien has joined #ruby
jameser has joined #ruby
tomphp has joined #ruby
bkxd has joined #ruby
TvL2386_ has joined #ruby
shinnya has quit [Ping timeout: 268 seconds]
TvL2386 has quit [Ping timeout: 255 seconds]
Volhist has quit [Quit: WeeChat 1.4]
tomphp has quit [Client Quit]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall has joined #ruby
TvL2386_ is now known as TvL2386
flyingX has joined #ruby
jameser has joined #ruby
flying has quit [Read error: Connection reset by peer]
flying has joined #ruby
flyingX has quit [Read error: Connection reset by peer]
flyingX has joined #ruby
kegster has quit [Quit: Shiner, TX makes good beer.]
jameser has quit [Client Quit]
flying_ has joined #ruby
tomphp has joined #ruby
bash2 has joined #ruby
flying_ has quit [Remote host closed the connection]
flying has quit [Read error: Connection reset by peer]
igniting has quit [Ping timeout: 240 seconds]
cb has quit [Read error: Connection reset by peer]
aufi has quit [Ping timeout: 246 seconds]
jameser has joined #ruby
cb has joined #ruby
flyingX has quit [Ping timeout: 272 seconds]
jrafanie has joined #ruby
chouhoul_ has joined #ruby
jrafanie_ has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 255 seconds]
tabakhase__ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has quit [Ping timeout: 260 seconds]
pupsicle has joined #ruby
tabakhase__ has quit [Changing host]
tabakhase__ has joined #ruby
unshadow has quit [Quit: leaving]
tabakhase__ is now known as tabakhase
ski7777 has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
jameser has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
mim1k has joined #ruby
renchan_ has quit [Read error: Connection reset by peer]
renchan has joined #ruby
oleo has joined #ruby
aspiers_ has joined #ruby
conta has quit [Ping timeout: 255 seconds]
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
dlitvak has joined #ruby
ferr has quit [Quit: WeeChat 1.7]
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kug3lis has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
bash2 has quit [Remote host closed the connection]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mark_66 has quit [Remote host closed the connection]
xenops has joined #ruby
tomphp has joined #ruby
rfoust has quit [Quit: Textual IRC Client: www.textualapp.com]
__Yiota has joined #ruby
theunraveler has joined #ruby
rippa has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
jphase has joined #ruby
DoubleMalt has joined #ruby
DoubleMalt has quit [Read error: Connection reset by peer]
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
Lucky_ABA has joined #ruby
yehowyada has quit [Quit: Textual IRC Client: www.textualapp.com]
cschneid_ has joined #ruby
ascarter has joined #ruby
im0nde has quit [Quit: im0nde]
hobodave has joined #ruby
anisha_ has joined #ruby
igniting has joined #ruby
ascarter has quit [Read error: Connection reset by peer]
jrafanie has joined #ruby
ascarter has joined #ruby
pupsicle has quit [Quit: pupsicle]
exchgr has quit [Quit: ZNC - http://znc.in]
xall has quit [Read error: No route to host]
im0nde has joined #ruby
ascarter_ has joined #ruby
ascarter has quit [Ping timeout: 240 seconds]
pupsicle has joined #ruby
pupsicle has quit [Client Quit]
xall has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
tomphp has quit [Client Quit]
djbkd has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
anomaly has left #ruby [#ruby]
tlaxkit has joined #ruby
BSAlb has joined #ruby
BSaboia has quit [Ping timeout: 240 seconds]
cb has quit [Read error: Connection reset by peer]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
im0nde has quit [Ping timeout: 260 seconds]
ascarter_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cb has joined #ruby
duderonomy has joined #ruby
ltem has joined #ruby
somerandomteen has joined #ruby
<somerandomteen> Hi there! Trying to do some tests, got a bit of a weird problem... rspec returned this:
<somerandomteen> ["Invalid Neighborhood is not a supported neighborhood :( sorry!"] to include "is not a supported neighborhood"
<somerandomteen> Anyone have any ideas - am I missing something blindingly obvious?
<apeiros> >> ["Invalid Neighborhood is not a supported neighborhood :( sorry!"].include?("is not a supported neighborhood")
<ruby[bot]> apeiros: # => false (https://eval.in/795616)
<ovaltine> looks like you are expecting an array with a string to include a string, perhaps errors.first
<apeiros> >> "Invalid Neighborhood is not a supported neighborhood :( sorry!".include?("is not a supported neighborhood")
<ruby[bot]> apeiros: # => true (https://eval.in/795618)
dikaio has joined #ruby
<somerandomteen> aha! there's me being thick :) thanks apeiros! As an aside, I don't suppose you know why Neighborhood is capitalised there? (it's the devise {authentication_keys} variable)
<somerandomteen> You can probably tell I'm pretty new to Ruby haha
tomphp has joined #ruby
<apeiros> I don't use devise, so no idea, no
jrafanie has joined #ruby
<somerandomteen> cool, no problem :)
tomphp has quit [Client Quit]
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
tomphp has joined #ruby
cam27 has joined #ruby
mim1k_ is now known as mim1k
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
somerandomteen has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
dhollin3 is now known as dhollinger
bruno- has quit [Ping timeout: 240 seconds]
alazred has quit [Ping timeout: 268 seconds]
TomyWork has quit [Ping timeout: 240 seconds]
somiaj has left #ruby [#ruby]
baweaver is now known as lemur
lemur is now known as baweaver
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cfec0b8d has quit [Quit: Leaving]
<cam27> So if I have a String object and then assign a new string object to that object. How come I can change it’s value, but if I use .replace then it changes both?
kegster has joined #ruby
polishdub has joined #ruby
amclain has joined #ruby
tristanp_ has quit []
tristanp has joined #ruby
cdg has joined #ruby
postmodern has joined #ruby
aufi has joined #ruby
ledestin has joined #ruby
soc42 has joined #ruby
alazred has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
jackrandom has joined #ruby
brent__ has joined #ruby
gothicsouth has joined #ruby
BSab has joined #ruby
bruno- has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
rory has joined #ruby
BSAlb has quit [Ping timeout: 246 seconds]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Burgestrand> cam27 for one, ruby's strings are mutable, and ruby always passes things by reference
<Burgestrand> (or, well, by value but the value is the reference)
cam27 has quit [Quit: cam27]
chihhsin_ has quit [Quit: leaving]
bonhoeffer has quit [Ping timeout: 240 seconds]
cout_ is now known as cout
chihhsin has joined #ruby
<morfin> dminuoso, you can't even imagine crap i saw today
<baweaver> Burgestrand: which version of Ruby though? :)
<morfin> 1000 messages with errors like "someemail@ domain.com" or someemail @domain.com or someemail.@domain.com etc etc
facest has quit [Ping timeout: 240 seconds]
spheric has joined #ruby
<morfin> i was not trying to fix all emails but at least reduce number of finished with an error
raspado has joined #ruby
gusrub has joined #ruby
TomyLobo has joined #ruby
gusrub has quit [Client Quit]
soc42 has quit [Remote host closed the connection]
nitric has joined #ruby
AlexRussia has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
xall has quit [Ping timeout: 260 seconds]
gusrub has joined #ruby
TomyLobo2 has joined #ruby
AgentVenom has joined #ruby
Eiam has joined #ruby
Eiam has quit [Client Quit]
TomyLobo has quit [Ping timeout: 240 seconds]
BSab has quit [Quit: Leaving]
BSaboia has joined #ruby
Eiam has joined #ruby
jespada has joined #ruby
mas886 has joined #ruby
brent__ has quit [Remote host closed the connection]
<mas886> How can I concatenate a file in ruby? "File.open("asd.txt", 'w') { |file| file.write(msg) }" <- This one overwrites what's already on the file.
mikecmpbll has quit [Quit: inabit. zz.]
jespada has quit [Client Quit]
GinoMan has joined #ruby
<ljarvis> mas886: "a" (append) instead of "w" (write)
<canton7> mas886, the modes are documented here: https://ruby-doc.org/core-2.1.4/IO.html#method-c-new-label-Open+Mode
<mas886> ljarvis: Thanks!!!
brent__ has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
amclain has quit [Ping timeout: 268 seconds]
aufi has quit [Quit: Leaving]
Beams has quit [Quit: .]
alazred has quit [Ping timeout: 240 seconds]
brent__ has quit [Remote host closed the connection]
amclain has joined #ruby
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
cam27 has joined #ruby
rkazak has joined #ruby
<cam27> Burgestrand: thank you for replying first of all. I could never fully understand this concept of mutable as I bounce around from language to language. Is Ruby different than C++ and Java in this regards?
t-recx has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
<Burgestrand> cam27 I find that it helps to think about identity when it comes to mutable strings, if you do: a = "Hello"; b = a — in Ruby b is not only the same as a, it *IS* a
<Burgestrand> cam27 however, if you do: a = "Hello"; b = "Hello" — b now only looks like a, but it isnt a
yokel has quit [Quit: Lost terminal]
yokel has joined #ruby
xall has joined #ruby
ascarter has joined #ruby
<Burgestrand> cam27 like in this example, https://eval.in/795691, there is no real difference
SeepingN has joined #ruby
alazred has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
Burgestrand has quit [Quit: Closing time!]
<cam27> Burgestrand: You know what I jsut did to help me out. I created a, then assigned it to b. Printed out their object_id and noticed they were the same until I changed one of the two values, then they broke away from each other. But with a.replace(“new_value”) they were still the same object_id
<ljarvis> replace doesn't return a new object like many string methods, it mutates self
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<ljarvis> it should really include a bang
<ljarvis> but it doesn't, because ruby
pupsicle has joined #ruby
<SeepingN> urgh. Damn you ruby and your Time changes
renchan has quit [Quit: Leaving...]
horst has joined #ruby
<cam27> ljarvis: I just ran a.upcase and it is the same object_id
tlaxkit has quit [Quit: tlaxkit]
Silthias has quit [Ping timeout: 246 seconds]
<cam27> which one should I try to see that it changed, and thanks for the code snippet burgestrand
<ljarvis> >> a = "foo"; a.upcase.object_id == a.object_id
<ruby[bot]> ljarvis: # => false (https://eval.in/795700)
<ljarvis> you can't do `a = "foo"; a.upcase; a.object_id` because the return value of a.upcase is ignored. The method doesn't mutate self, and so a is still not upcased
<SeepingN> missed a !
<SeepingN> >> a="foo"; a.upcase!; a.object_id
<ljarvis> no :/
<ruby[bot]> SeepingN: # => 540552640 (https://eval.in/795701)
SeepingN has quit [Quit: The system is going down for reboot NOW!]
<ljarvis> ignoring the ! is exactly what was demonstrating my point
hobodave has quit [Quit: Computer has gone to sleep.]
Cohedrin has joined #ruby
antgel has quit [Ping timeout: 260 seconds]
duderonomy has joined #ruby
<cam27> I’m reading the Well Grounded Rubyist at the moment, cause my first time working with Rails I realized that I need to master Ruby
<cam27> Trying to get a deeper understanding this time around
nowhere_man has joined #ruby
SeepingN has joined #ruby
<cam27> I think I will try to get a job as a Ruby developer first to master Ruby and then worry about the Rails part of it all. Not sure if it will work out that way. But I was all of the way to RSpec, Teaspoon, Jasmine, etc, and I never really fully understood Ruby code in my controllers
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Ping timeout: 255 seconds]
raul782 has joined #ruby
gothicsouth has joined #ruby
<cam27> And I’m reading through this book and it is so much easier this time around having a much better understanding of OOP
Puffball has quit [Remote host closed the connection]
ascarter has joined #ruby
Puffball has joined #ruby
psmolen has quit [Ping timeout: 255 seconds]
<eam_> /win 1
<eam_> whoop, good morning all
<cam27> Just learned what a Singleton is :) Again. heard about them, never knew that they only worked for one object :) Ok, I won’t bug you guys, but pretty good decision on my part to come back to this book and start it on pg 1
psmolen has joined #ruby
anisha_ has quit [Ping timeout: 246 seconds]
c0mrad3 has joined #ruby
rory has left #ruby [#ruby]
<Papierkorb> cam27: just be wary that singletons are also a great way to shoot yourself into your foot if you didn't think it completely through
<cam27> Not sure why I would want to use them, cause I could just not call those methods with another object? I mean, if I have a method that needs to be different from one object, wouldn’t I jsut change the argument?
<eam_> you don't ever have to use them strictly speaking. Any task that can be done with a singleton can be done with a regular object
Puffball has quit [Remote host closed the connection]
<eam_> but it can be confusing if a method has no relationship to its object
eam_ is now known as eam
eam has quit [Changing host]
eam has joined #ruby
muelleme has joined #ruby
Puffball has joined #ruby
chouhoulis has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
GinoMan has quit [Ping timeout: 255 seconds]
alazred has quit [Ping timeout: 260 seconds]
kurko has joined #ruby
romank has joined #ruby
antgel has joined #ruby
hobodave has joined #ruby
hahuang65 has joined #ruby
PatrikasZvaigzde has quit [Ping timeout: 260 seconds]
PatrikasZvaigzde has joined #ruby
dionysus69 has joined #ruby
anisha has joined #ruby
mas886 has quit [Ping timeout: 245 seconds]
xall has quit [Read error: Connection reset by peer]
tvw has joined #ruby
jaruga has quit [Quit: jaruga]
jaruga has joined #ruby
jaruga has quit [Client Quit]
alazred has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
borodin has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
Ishido has joined #ruby
marlinc has quit [Ping timeout: 260 seconds]
xall has joined #ruby
milardovich has joined #ruby
Bock has quit [Read error: Connection reset by peer]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mwlang has joined #ruby
bonhoeffer has joined #ruby
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
cdg has quit [Remote host closed the connection]
gothicsouth has joined #ruby
enterprisey has joined #ruby
gusrub has quit [Remote host closed the connection]
muelleme has quit [Ping timeout: 268 seconds]
jusa has quit [Ping timeout: 268 seconds]
exchgr has joined #ruby
mentok has quit [Changing host]
mentok has joined #ruby
jackrandom has quit [Remote host closed the connection]
marlinc has joined #ruby
jackrandom has joined #ruby
muelleme has joined #ruby
enterprisey has quit [Quit: Leaving]
quobo has quit [Quit: Connection closed for inactivity]
jackrandom has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<Pierreb> if i want to compare see if 1 variable is equal to 2 variable how do i write that? if $var1 == $var2 doesnt work
<elomatreb> Show your code, since that's exactly how it's supposed to work
chouhoul_ has joined #ruby
<dminuoso> Pierreb, what do you mean by equality?
<dminuoso> This is not a trick question by the way,.
<dminuoso> Ruby has 4 different notions of "equivalence"
<Pierreb> if alert is equal to updatebreak i want it to do whats below
<dminuoso> What do you mean by equal?
cfec0b8d has joined #ruby
<dminuoso> Their values?
<dminuoso> The objects?
<Pierreb> values
<dminuoso> Or just case identity?
<elomatreb> Either you didn't paste all your code or you're getting a syntax error
<elomatreb> You need to close an if with `end`
AlexRussia has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
<dminuoso> Pierreb, and what is $updatebreak?
<Pierreb> a number
<dminuoso> Pierreb, prove that to me.
LastWhisper____ has quit [Quit: Textual IRC Client: www.textualapp.com]
<Pierreb> $updatebreak=6
jenrzzz has joined #ruby
<dminuoso> I dont even.
<elomatreb> Try printing your variables directly before you're comparing them (`p $somevar`), your values may just be incorrect
<matthewd> That.. is a lot of globals
<al2o3-cr> matthewd: literally just beat me to it :p
<dminuoso> Also this strange mix of imperative programming and state machinery it really amazing.
<Papierkorb> Pierreb: In case you don't know, in ruby, $ denotes a global variable. Just leave it off if you want a local variable instead.
<matthewd> Channel() is pretty interesting too
<Pierreb> using cinch
<al2o3-cr> matthewd: cinch bot by the looks of it
<dminuoso> I have been developing Ruby programs in different sizes for about 8 years now, half of that professionally.
<dminuoso> Until now I have never ever developed the need for a global.
<dminuoso> A single one
<elomatreb> $stdout? :P
<dminuoso> With the sole exception of logger interfaces.
<dminuoso> Heh.
<Pierreb> i just picked 1 and if it worked
<Pierreb> went for it all the way
<elomatreb> They will persist if that block gets called multiple times, which may be what's confusing you
<dminuoso> elomatreb, I guess that kind of fits into the "logger exception" - but that is about the one spot where mutable globals are generally not frowned upon.
<matthewd> Ah okay, I'll retain the opinion that it looks surprising, but will grant that it's not open to change here ;)
quobo has joined #ruby
<Pierreb> i dont mind changing so ill go read about variables :)
<matthewd> Pierreb: If you're up for change, please also consider 2-space indentation.. it's a near-universal standard in ruby code
<elomatreb> And even for $stdout, I don't think I ever actually typed it somwehere myself since most of the methods just assume it
<dminuoso> elomatreb, yeah I think I only ever used STDOUT -> not that it's particularly better than $ ..
hobodave_ has joined #ruby
muelleme has quit [Ping timeout: 260 seconds]
hobodave has quit [Ping timeout: 240 seconds]
<elomatreb> I had a whole reply typed out about how I'd rather just use STDOUT since I can reassign it, confused the two
<Pierreb> matthewd never understood thatm looks weird but ill change them
TreyG has joined #ruby
<dminuoso> elomatreb, shame. Would have loved some seal clubbing!
<dminuoso> Boring evening you know.
yqt has joined #ruby
kurko has quit [Quit: Textual IRC Client: www.textualapp.com]
bonhoeffer has quit [Ping timeout: 268 seconds]
TreyG_ has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ruby
<matthewd> Pierreb: At a higher level, I'd suggest you maybe want some objects to handle the actual behaviours, separate from the "UI" of the message parsing -- but that depends on how comfortable you are with classes etc, and the nature/purpose of your project
alazred has quit [Ping timeout: 240 seconds]
<dminuoso> And functions. Pure functions!
<matthewd> e.g. if the goal is to progressively learn ruby while implementing something, it may indeed be better to keep all the logic in-line for now, and worry about more complex extractions later
<dminuoso> Never not write pure functions in eloquent Ruby!
<elomatreb> RewriteInHaskell.meme
haylon has joined #ruby
latemus has quit [Ping timeout: 268 seconds]
chouhoul_ has quit [Remote host closed the connection]
quobo has quit []
chouhoulis has joined #ruby
mim1k has joined #ruby
bonhoeffer has joined #ruby
cek has joined #ruby
gusrub has joined #ruby
quobo has joined #ruby
<cek> wondering if there's a includee callback that would be invoked when includer scope closes.
mim1k has quit [Ping timeout: 240 seconds]
kristofferR has joined #ruby
Verity has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
nullfxn has quit [Quit: leaving]
alazred has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
<matthewd> cek: No
<cek> thanks, that really helped.
minimalism has joined #ruby
<dminuoso> cek, there may not even be any such scope. Consider C.include(M)
<matthewd> Given a problem, I can suggest a solution. Given a binary question about whether a thing exists, I can only answer it.
<dminuoso> cek, ?xy
<dminuoso> cek, !xy
<dminuoso> ?xy cek
<ruby[bot]> cek: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<cek> other than trace func
cek has left #ruby [#ruby]
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
mwlang has quit [Quit: mwlang]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
alazred has quit [Ping timeout: 246 seconds]
morfin has quit []
tildes has quit [Ping timeout: 240 seconds]
BSAlb has joined #ruby
raul782 has quit [Remote host closed the connection]
BSaboia has quit [Ping timeout: 246 seconds]
cabraturgo has joined #ruby
biberu has quit []
gothicsouth has joined #ruby
gothicsouth has quit [Client Quit]
gothicsouth has joined #ruby
hahuang65 has joined #ruby
dacod has quit [Quit: Saindo]
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
ResidentBiscuit has quit [Ping timeout: 240 seconds]
tvw has quit []
hanmac has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
zapata has quit [Quit: WeeChat 1.7.1]
zapata has joined #ruby
anisha has quit [Quit: Leaving]
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
apetrovich has joined #ruby
cdg has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
<apetrovich> i'm trying to execute sed inside %x(), but my string isn't matching correctly because of escape characters. Any advice?
<al2o3-cr> apetrovich: use the Shellwords module
<apetrovich> i'll try that thanks
<al2o3-cr> apetrovich: any reason use don't use ruby?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hanmac has joined #ruby
jenrzzz has joined #ruby
ResidentBiscuit has joined #ruby
haylon has quit [Ping timeout: 240 seconds]
sepp2k1 has joined #ruby
brent__ has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Oclair has joined #ruby
haylon has joined #ruby
cabraturgo has quit [Quit: Bye!]
jusa has joined #ruby
makerops has joined #ruby
<makerops> I am doing something stupid.
<makerops> I have the capistrano gem installed, I am running irb
<makerops> I do "require 'capistrano'
jenrzzz has quit [Ping timeout: 260 seconds]
guacamole has joined #ruby
<makerops> I get returned true, but when I call Capistrano, I get uninitilizaed constant
<makerops> and I can't see why...
ascarter has joined #ruby
<makerops> Gem::Specification.all().map{|g| [g.name, g.version.to_s] via IRB shows it installed
<SeepingN> "how rude"
<dminuoso> makerops, surprised? :-)
polishdub has quit [Quit: kill -9]
<dminuoso> makerops, hint even an "empty file" is a valid ruby file to be require'd
<dminuoso> makerops, you most likely were looking for https://github.com/capistrano/capistrano/blob/master/lib/capistrano/all.rb
ascarter has quit [Client Quit]
jusa has quit [Ping timeout: 246 seconds]
<makerops> AH
<makerops> thanks
<makerops> I ddint realize it upgraded my gem
<makerops> wasn't like that in 2
Oclair has quit [Quit: Bye Bye]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has joined #ruby
dionysus69 has quit [Quit: dionysus69]
jrafanie has joined #ruby
armyriad has quit [Ping timeout: 268 seconds]
armyriad has joined #ruby
makerops has quit [Quit: Page closed]
raul782 has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
<SeepingN> that's horrible
<al2o3-cr> what is?
apetrovich has quit [Quit: leaving]
raul782 has quit [Ping timeout: 240 seconds]
mentok has quit [Ping timeout: 240 seconds]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<zenspider> agreed. wtf.
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> I bet they got tired of bundler autoload
<zenspider> hah. yup.
<guardian> hello I'm facing some unfamiliar syntax
<zenspider> "This removes the need to set `require: false` in your Gemfile."
<guardian> what's foo[/\d+\.\d+/] where foo is a string
<guardian> is it supposed to match e.g. a version number?
<zenspider> it's a method call to [] w/ a regexp as an argument
<zenspider> foo.[](/.../)
<zenspider> knowing foo is a string, do `ri String.[]`
blackmesa has joined #ruby
<guardian> ri Stirng.[] ???
<guardian> what's ri?
jenrzzz has joined #ruby
<zenspider> command line documentation. very useful.
<guardian> oh I see
<guardian> thanks
<guardian> gonna look that up
<zenspider> just type it into your terminal
<zenspider> (minus your typos)
lxsameer has joined #ruby
Oclair has joined #ruby
<guardian> yep
<elomatreb> Alternatively find the same documentation here: https://ruby-doc.org/core-2.4.1/String.html#method-i-5B-5D
ascarter has joined #ruby
<zenspider> yes, but that sucks in comparison
<zenspider> FFS that site is slow as fuck. and the search is broken. and and and. don't use it.
ascarter has quit [Client Quit]
<adam12> And if ri doesn't work for you, make sure your shell isn't trying to use the args for glob.
<adam12> ;\
ascarter has joined #ruby
ascarter has quit [Client Quit]
bonhoeffer has quit [Ping timeout: 240 seconds]
muelleme has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
Oclair has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
<elomatreb> zenspider: Loads instantly for me, I agree about the search though. I just don't have compiled docs for ri on most of my machines
JeanCarloMachado has quit [Ping timeout: 272 seconds]
raul782 has joined #ruby
Oclair has joined #ruby
ltem has quit [Quit: Leaving]
JeanCarloMachado has joined #ruby
ur5us has joined #ruby
JeanCarl1Machado has joined #ruby
Oclair has quit [Read error: Connection reset by peer]
Oclair has joined #ruby
Oclair_ has joined #ruby
ldnunes has quit [Quit: Leaving]
guardian has quit [Ping timeout: 240 seconds]
<Papierkorb> pry's ? feature ftw
raul782 has quit [Remote host closed the connection]
Oclair has quit [Ping timeout: 240 seconds]
Oclair_ has quit [Client Quit]
gothicsouth has joined #ruby
guardian has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
MrBismuth has joined #ruby
workmad3 has joined #ruby
MrBusiness has quit [Ping timeout: 272 seconds]
mim1k has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GinoMan has joined #ruby
patr0clus has joined #ruby
Ishido has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
<zenspider> elomatreb: fixing that is a single command.
muelleme has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
mim1k has quit [Ping timeout: 268 seconds]
TreyG_ has joined #ruby
Burgestrand has joined #ruby
Toledo is now known as Toledo-afk
__Yiota has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
TreyG has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raspado has quit [Remote host closed the connection]
Dimik has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
raspado has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
enterprisey has quit [Remote host closed the connection]
nankyokusei has quit []
JeanCarloMachado has joined #ruby
perniciouscaffei has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
theunraveler has quit []
ascarter has joined #ruby
haylon has quit [Quit: WeeChat 1.7.1]
JeanCarl1Machado has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
TreyG has joined #ruby
bpmedley has joined #ruby
ascarter has quit [Ping timeout: 260 seconds]
TreyG_ has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
nankyokusei has quit [Remote host closed the connection]
mas886 has joined #ruby
mas886 has joined #ruby
mas886 has quit [Changing host]
gizmore|2 has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
Derperperd has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
hndk has joined #ruby
gizmore has joined #ruby
blackwind_123 has joined #ruby
TreyG_ has joined #ruby
Derperperd has quit [Quit: Peace out]
ascarter has joined #ruby
rkazak has joined #ruby
ascarter has quit [Client Quit]
ascarter has joined #ruby
TreyG has quit [Ping timeout: 240 seconds]
Azure has quit [Quit: Oops.]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarl1Machado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 246 seconds]
hndk has quit [Quit: Leaving]
raul782 has joined #ruby
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
raul782 has quit [Ping timeout: 246 seconds]
Azure has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxnr has joined #ruby
ascarter has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
gothicsouth has joined #ruby
lxnr has left #ruby [#ruby]
hndk has joined #ruby
jusa has joined #ruby
hobodave_ has quit [Quit: Computer has gone to sleep.]
antib has quit [Remote host closed the connection]
bruno-_ has joined #ruby
jusa has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 260 seconds]
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
marr has quit [Ping timeout: 240 seconds]
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
dlitvak has quit [Quit: Connection closed for inactivity]
spiette_ has joined #ruby
duderono_ has joined #ruby
duderonomy has quit [Ping timeout: 255 seconds]
mas886 has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Closing time!]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
perniciouscaffei has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
cschneid_ has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
TomyLobo2 has quit [Ping timeout: 255 seconds]
milardovich has quit []
mikecmpbll has joined #ruby
chouhoulis has quit [Ping timeout: 255 seconds]
Trynemjoel has quit [Ping timeout: 245 seconds]
postmodern has quit [Ping timeout: 255 seconds]
Trynemjoel has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
hashrocket has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
xall has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
jhack has joined #ruby
xall has joined #ruby
mim1k has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
cschneid_ has quit [Ping timeout: 272 seconds]
patarr has quit [Read error: Connection reset by peer]
nchambers has joined #ruby
<nchambers> outside of a #{}, does an @ mean anything in a string?
<nchambers> IE, is "@some_member" going to expand in any sort of way?
postmodern has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
Vingador has joined #ruby
xall has quit [Ping timeout: 268 seconds]
shinnya has joined #ruby
xenops has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
<zenspider> nchambers: #@var is just like #{@var}
milardovich has joined #ruby
enterprisey has joined #ruby
redaudit has joined #ruby
<zenspider> I just added some clarification to the quickref for this
charliesome has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
nitric has quit [Ping timeout: 268 seconds]
alveric1 has joined #ruby
nitric has joined #ruby