havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.3, 2.4.5, 2.3.8, 2.6.0-preview3: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
Azure has quit [Ping timeout: 240 seconds]
sabrehagen has joined #ruby
<sabrehagen> Hi all, I'm from outside ruby-land and was wondering if somebody would be kind enough to do an open source contribution on my part. I was wondering if somebody would take a shot at implementing my 'when' clause detailed here: https://github.com/tmuxinator/tmuxinator/issues/658
<sabrehagen> I've tried the authors suggestion, and found it made my config files unmaintainable for practical purposes
elphe has joined #ruby
mangold has joined #ruby
renlo has joined #ruby
<Inside> hmmm
Milos has quit [Max SendQ exceeded]
<Inside> that seems like an insane amount of work :D
<renlo> so in IRB, I just did `require_relative 'some_module'` and now I have some 'Foo' thing I have access to. What the heck is 'Foo'?
<renlo> lol
<Inside> renlo: what's the code in 'some_module'?
Milos has joined #ruby
<renlo> SomeBlah::Blahh::SomeThing.some_method.other_method do\nsome_func "Foo" do .......
mangold has quit [Client Quit]
<Inside> haha
<Inside> uhhhh
<renlo> lol
<Inside> that's really not enough to go on
<renlo> this language is magical
tdy has quit [Ping timeout: 252 seconds]
<renlo> oh I am silly lol, at the bottom of said file is a "Foo = ..." lol
wolfshappen has quit [Quit: Waffs have technical problems too]
tdy has joined #ruby
<Radar> renlo: gist the code next time please
<Radar> ?gist renlo
<ruby[bot]> renlo: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<renlo> proprietary code
<Radar> ok I'll need proprietary dollars to help out with that
<Inside> shoot I'll just take regular dollars
chouhoulis has quit [Remote host closed the connection]
<Radar> Inside: wow
<renlo> What I wrote is what I saw, which happened to be incomplete. First time using this language and thought magic was happening
<renlo> so, regardless if I had gisted it or pastebinned it, would have been nonsensical
<renlo> and proprietary :)
<biberao> Inside: you forgot about me right?
<biberao> lol
<Radar> SomeBlah::Blahh::SomeThing
<Radar> renlo: you work for Vague Inc?
<Inside> biberao: I uhh don't have anything useful to tell you :(
<Inside> Radar, on the other hand, is a fantastic ruby author so he may have a good suggestion
Azure has joined #ruby
venmx has joined #ruby
<Radar> biberao: Well Grounded Rubyist is the one typically recommended here. It's a thick tome.
<renlo> again, first time using this language and thought magic was happening, the important part was the `some_func "Foo" do`, thought it was somehow injecting that into the global scope or something
<Radar> biberao: If you've got other programming experience, POODR might be a better book for you.
<biberao> let me google poodr
<biberao> lol
<renlo> com-poodr
blackmesa has quit [Ping timeout: 276 seconds]
Azure has quit [Ping timeout: 246 seconds]
<biberao> ?
<Inside> ?poodr
<ruby[bot]> Practical Object Oriented Design in Ruby http://www.poodr.com/
<Inside> I'm almost to the testing chapter in POODR
<Inside> let's see just how bad I am at writing tests
<Inside> <3
gix has quit [Ping timeout: 260 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
nofxx has quit [Read error: Connection reset by peer]
wolfshappen has joined #ruby
<baweaver> Inside: everyone's bad at writing tests when they start
<baweaver> The thing to remember is that you _do_ have to write code that's actually testable, otherwise it becomes substantially more difficult.
<Inside> yeah absolutely
<Inside> but even the whole testing methodology
<Inside> I do mostly rails and there are so many places to plug tests in
<Inside> ie: models, controllers, etc
<baweaver> What's funny are people who insist controllers are unit testable.
<Inside> heh
<baweaver> If they are, you have too much logic that needs to move out.
<baweaver> request-wise they end up as integration tests.
<Inside> Here's a test I'm writing right now - how do you check that your strong parameters are correct?
<Inside> baweaver: Rails just calls everything an integration test now
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> That feels a bit carte blanche
<biberao> going to google
<renlo> coming from Python I feel like I'm in bizarro land lol
<renlo> "strong parameters" for instance
<renlo> "With strong parameters, Action Controller parameters are forbidden to be used in Active Model mass assignments until they have been permitted"
<Inside> renlo: it's a framework specific feature, has nothing to do with ruby
<baweaver> Pretty much.
<Inside> Those are all ruby on rails terms
<renlo> sure, still is odd, Django didnt have weirdness like that I dont think
<baweaver> Consider that you have a users controller that allows updates. Strong params keeps you from tacking on an is_admin = true flag in a request editor
<Inside> renlo: translation is basically "In rails, you have to specify which parameters a controller is allowed to update in a model using a white list"
<baweaver> All frameworks have their novelties.
<renlo> ah got it, makes sense
venmx has quit [Ping timeout: 252 seconds]
* baweaver needs to learn to modify parser.y to implement more fun ideas into Ruby.
<biberao> you're a core ruby dev?
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> Some day, perhaps, but no.
lytol has quit [Remote host closed the connection]
renlo has quit [Ping timeout: 252 seconds]
alicef has joined #ruby
Azure has joined #ruby
<Inside> Bleh. 50 lines of code to test 15 lines of controller code to raise code coverage 0.1%
kapil____ has quit [Quit: Connection closed for inactivity]
Some-body_ has joined #ruby
DarthGandalf has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
Some-body_ is now known as DarthGandalf
eddof13 has quit [Quit: eddof13]
patr0clus has joined #ruby
chouhoulis has joined #ruby
<Radar> Inside: can I see the controller test?
<Radar> or is it proprietary?
<Inside> nothing fancy in here
alicef has quit [Ping timeout: 246 seconds]
sameerynho has joined #ruby
sameerynho is now known as Guest86894
chouhoulis has quit [Remote host closed the connection]
Flonk has quit [Ping timeout: 252 seconds]
Guest86894 has quit [Ping timeout: 252 seconds]
mahlon has quit [Read error: Connection reset by peer]
ged has quit [Ping timeout: 240 seconds]
<Radar> 👀
<Inside> >_>
<Radar> I'm having connectivity issues to GitHub at the moment
<Radar> "gist.github.com took too long to respond."
Flonk has joined #ruby
<Inside> just you
ged has joined #ruby
cow[moo] has joined #ruby
mahlon has joined #ruby
jetchisel has quit [Ping timeout: 252 seconds]
<biberao> &uwb 123
<rubydoc> did not understand that, parser error @ char position 0
<biberao> oops
<Radar> Inside: I wonder if there is a better way of approaching this: https://gist.github.com/Insood/a24b12eea9999a47e8cc7692734c8636#file-section-rb-L26
<Radar> Like, could you make that sample user already have that role somehow?
<Inside> I was wondering about that too
jetchisel has joined #ruby
<Inside> The check is actually a call to the active directory
<Radar> ew gross
<Inside> Which I think might be a terrible idea
RougeR has quit [Ping timeout: 268 seconds]
<Inside> It's a bit terrifying as to house of cards that this system is built on
patr0clus is now known as s3nd1v0g1us
mahlon has quit [Read error: Connection reset by peer]
mahlon has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
alicef has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 2.1]
lxsameer has quit [Ping timeout: 260 seconds]
<Radar> Yeah, that is where you might run into some trouble. I'd probably have a proxy class that decided which to use: ActiveDirectoryLookup or FakeActiveDirectoryLookup, depending on Rails.env.test?
<Radar> FakeAD would just be some plain Ruby methods that would return true in some cases... maybe backed by a DB? I'm not convinced of my own idea. It would take some playing around.
arescorpio has joined #ruby
sp3ncer has joined #ruby
elphe has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
esrse has joined #ruby
stooj has quit [Quit: ZNC 1.7.0 - https://znc.in]
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
stooj has joined #ruby
elphe has joined #ruby
Exuma has joined #ruby
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
bmurt has joined #ruby
TheBloke has joined #ruby
sp3ncer has quit [Read error: Connection reset by peer]
sp3ncer has joined #ruby
sp3ncer has quit [Read error: Connection reset by peer]
sp3ncer_ has joined #ruby
arescorpio has quit [Remote host closed the connection]
sp3ncer_ has quit [Read error: Connection reset by peer]
sp3ncer has joined #ruby
impermanence has quit [Remote host closed the connection]
mroutis has quit [Read error: Connection reset by peer]
mroutis has joined #ruby
arescorpio has joined #ruby
xfbs has quit [Ping timeout: 260 seconds]
xfbs has joined #ruby
mangold has joined #ruby
sp3ncer has quit [Read error: Connection reset by peer]
sanscoeur has joined #ruby
c0ncealed4 has quit [Remote host closed the connection]
c0ncealed4 has joined #ruby
paraxial has quit [Ping timeout: 252 seconds]
thejs has joined #ruby
sameerynho has joined #ruby
sameerynho is now known as Guest70821
za1b1tsu has joined #ruby
paraxial has joined #ruby
xfbs has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 260 seconds]
Guest70821 has quit [Ping timeout: 244 seconds]
paraxial has quit [Ping timeout: 252 seconds]
paraxial has joined #ruby
GodFather has joined #ruby
thejs has quit [Quit: Leaving]
asphyxia has quit [Ping timeout: 240 seconds]
sanscoeur has quit [Remote host closed the connection]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has joined #ruby
AJA4350 has quit [Quit: AJA4350]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arescorpio has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
lunarkitty7 has joined #ruby
darkhanb has joined #ruby
SeepingN has joined #ruby
dellavg_ has joined #ruby
k0mpa has quit [Ping timeout: 256 seconds]
<havenwood> 'halloooo'.tr('a', 'e').squeeze('o')
ur5us has quit [Remote host closed the connection]
Inside has quit [Disconnected by services]
<havenwood> Are we far enough past 1.8 we can safely embrace ?x character literal?
* havenwood leans towards "yes"
* SeepingN agrees
<SeepingN> I mean I had the oldest install in existance and even that is up to 2.0 now at least
conta has joined #ruby
<havenwood> 'halloooo'.tr(?a, ?e).squeeze(?o)
ivanskie has joined #ruby
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 252 seconds]
sauvin has joined #ruby
Fusl has quit [Excess Flood]
mroutis has quit [Read error: Connection reset by peer]
mroutis has joined #ruby
Fusl has joined #ruby
johnny56 has quit [Ping timeout: 272 seconds]
johnny56 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sameerynho has joined #ruby
sameerynho is now known as Guest53511
Guest53511 has quit [Ping timeout: 240 seconds]
xuanrui has quit [Read error: Connection reset by peer]
mangold has quit [Quit: This computer has gone to sleep]
mangold has joined #ruby
cgfbee has quit [Remote host closed the connection]
kapil____ has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
asphyxia has joined #ruby
hamms has joined #ruby
aufi has joined #ruby
cgfbee has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
Inline has quit [Quit: Leaving]
aufi has quit [Ping timeout: 252 seconds]
drbrain has quit [Quit: Goodbye]
drbrain has joined #ruby
dellavg_ has quit [Ping timeout: 244 seconds]
GodFather has joined #ruby
sabrehagen has quit [Remote host closed the connection]
drbrain has quit [Ping timeout: 240 seconds]
drbrain has joined #ruby
asphyxia has quit [Ping timeout: 244 seconds]
jtdowney has quit [Read error: Connection reset by peer]
jtdowney has joined #ruby
clemens3 has joined #ruby
conta has quit [Quit: conta]
conta has joined #ruby
drbrain has quit [Quit: Goodbye]
mroutis has quit [Read error: Connection reset by peer]
drbrain has joined #ruby
xuanrui has joined #ruby
reber has joined #ruby
drbrain has quit [Ping timeout: 272 seconds]
drbrain has joined #ruby
dmitch has quit [Quit: Textual IRC Client: www.textualapp.com]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
Fusl has quit [Remote host closed the connection]
Fusl has joined #ruby
Exagone313 has quit [Ping timeout: 245 seconds]
asphyxia has joined #ruby
Exagone313 has joined #ruby
eckhardt has joined #ruby
marmotini_ has joined #ruby
roshanavand has joined #ruby
marmotini_ has quit [Remote host closed the connection]
RiPuk has quit [Ping timeout: 252 seconds]
sanscoeur has joined #ruby
_whitelogger has joined #ruby
roshanavand1 has joined #ruby
roshanavand1 is now known as roshanavand
roshanavand has quit [Ping timeout: 246 seconds]
asphyxia has quit [Ping timeout: 245 seconds]
whysthatso has joined #ruby
asphyxia has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
sauvin has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
clemens3 has quit [Remote host closed the connection]
marz_d`ghostman has joined #ruby
<marz_d`ghostman> Having multiple expect inside an it block doesn't seem to work. Exit doesn't seem to be invoke as I'm getting 'expected :exit to be thrown, got nothing' error: https://gist.github.com/marzdgzmn/0d66c7d34a0175f217bd1c5d52027ba6
mangold has quit [Quit: This computer has gone to sleep]
aufi has joined #ruby
sauvin has joined #ruby
sauvin_ has joined #ruby
sauvin has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
jokke has quit [Ping timeout: 252 seconds]
clemens3 has joined #ruby
Burgestrand has joined #ruby
stooj has quit [Quit: ZNC 1.7.0 - https://znc.in]
sauvin_ is now known as Sauvin
stooj has joined #ruby
<marz_d`ghostman> so the statements inside after(:each) is also counted inside the it blocks, I have expect(File).to receive(:delete).with(arguments) inside my it block and one inside my after(:each), it counts twice.
mangold has joined #ruby
jokke has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
clemens3 has quit [Ping timeout: 244 seconds]
clemens3_ has joined #ruby
hightower4 has quit [Ping timeout: 252 seconds]
jamied has joined #ruby
blackmesa has joined #ruby
venmx has joined #ruby
xfbs has joined #ruby
Guest53511 has joined #ruby
xfbs has quit [Ping timeout: 244 seconds]
xfbs has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
xfbs_ has joined #ruby
xfbs has quit [Ping timeout: 240 seconds]
marz_d`ghostman has quit [Quit: Page closed]
conta1 has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
mangold has joined #ruby
conta1 has quit [Quit: conta1]
conta1 has joined #ruby
voiceftp has quit [Ping timeout: 244 seconds]
postmodern has quit [Quit: Leaving]
voiceftp has joined #ruby
Burgestrand has quit [Quit: Closing time!]
za1b1tsu has quit [Read error: No route to host]
za1b1tsu has joined #ruby
Burgestrand has joined #ruby
Burgestrand has quit [Ping timeout: 252 seconds]
apparition has joined #ruby
Tuor has joined #ruby
esrse has quit [Ping timeout: 252 seconds]
conta1 has quit [Quit: conta1]
asphyxia has quit [Ping timeout: 252 seconds]
Xeago_ has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
Xeago_ is now known as Xeago
conta1 has joined #ruby
strk has joined #ruby
<strk> already initialized constant ... how to avoid that ? I'd actually even prefer to have the constant set ONLY if not set
<strk> as it's in a snippet included from elsewhere so it is nice if caller can override
<sonne> strk: CONSTNAME ||= 123 ?
dionysus69 has quit [Quit: ZNC 1.7.1+deb2 - https://znc.in]
conta1 has quit [Quit: conta1]
<strk> thanks sonne
dionysus69 has joined #ruby
petemoore has left #ruby [#ruby]
conta1 has joined #ruby
conta has quit [Ping timeout: 245 seconds]
conta1 is now known as conta
prestorium has joined #ruby
themsay has joined #ruby
beefjoe has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
conta1 has joined #ruby
moei has joined #ruby
beefjoe has quit [Quit: <3]
mangold has joined #ruby
gix has joined #ruby
gix has quit [Client Quit]
vondruch has quit [Ping timeout: 252 seconds]
k0mpa has joined #ruby
Burgestrand has joined #ruby
whysthatso has quit [Quit: whysthatso]
AJA4350 has joined #ruby
whysthatso has joined #ruby
<Bish> kann mir jemand mit geilem backlog sagen warum ich gehighlighted wurde?
<Bish> oopsy, i have been highlighted, can someone tell me who did it
<Bish> thought this was a german channel, sorry?
<Bish> nevermind i found it
<Bish> havenwood: yes, that's what i did, thank you
strk has left #ruby [#ruby]
devyn has quit [Ping timeout: 244 seconds]
devyn has joined #ruby
jamied has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
conta has quit [Remote host closed the connection]
conta1 is now known as conta
conta1 has joined #ruby
bmurt has joined #ruby
troulouliou_div2 has joined #ruby
TheBloke has joined #ruby
cow[moo] has joined #ruby
Guest53511 has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
voolik has joined #ruby
jamied has joined #ruby
nicolasb has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
GodFather has joined #ruby
troulouliou_div2 has quit [Ping timeout: 268 seconds]
hays has quit [Read error: Connection reset by peer]
theRoUS has joined #ruby
hays has joined #ruby
<theRoUS> hoe does one write a gem that can be used to add step definitions to the standard ones provided by base cucumber?
<theRoUS> s/hoe/how/
Guest53511 has joined #ruby
Guest53511 has quit [Ping timeout: 252 seconds]
<Bish> hows before hoes
<theRoUS> indeed
<theRoUS> like something i can put in env.rb that will add the `step_definitions` tree from the additional gem
<theRoUS> there appears to be no loadpath like $: for cucumber, as it were
jetchisel has quit [Ping timeout: 272 seconds]
rwb has quit [Ping timeout: 252 seconds]
k0mpa has quit [Remote host closed the connection]
Guest53511 has joined #ruby
nima_m has joined #ruby
apparition has quit [Quit: Bye]
nima_m has quit [Ping timeout: 276 seconds]
houhoulis has joined #ruby
fluxAeon has quit [Ping timeout: 272 seconds]
conta1 has quit [Quit: conta1]
fluxAeon has joined #ruby
conta has quit [Ping timeout: 252 seconds]
conta has joined #ruby
dmitch has joined #ruby
conta has quit [Ping timeout: 252 seconds]
reber has quit [Remote host closed the connection]
Nicmavr has quit [Read error: Connection reset by peer]
reber has joined #ruby
Nicmavr has joined #ruby
asphyxia has joined #ruby
za1b1tsu has quit [Ping timeout: 268 seconds]
claudiuinberlin has quit [Ping timeout: 252 seconds]
cow[moo] has quit [Quit: Textual IRC Client: www.textualapp.com]
FrankyCyborg has quit [Quit: The Sleep Monster got me!]
DTZUZO has joined #ruby
moeSizlak has joined #ruby
Burgestrand has quit [Quit: Closing time!]
cow[moo] has joined #ruby
wildermind has joined #ruby
Guest53511 has quit [Ping timeout: 252 seconds]
Burgestrand has joined #ruby
rwb has joined #ruby
za1b1tsu has joined #ruby
Burgestrand has quit [Ping timeout: 276 seconds]
houhoulis has quit [Remote host closed the connection]
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
Burgestrand has joined #ruby
aufi has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
zming has joined #ruby
k0mpa has joined #ruby
conta has joined #ruby
asphyxia has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
Rapture has joined #ruby
vondruch has quit [Ping timeout: 252 seconds]
vondruch_ is now known as vondruch
Guest53511 has joined #ruby
whysthatso has quit [Quit: whysthatso]
im0nde has joined #ruby
c0ncealed4 has quit [Remote host closed the connection]
c0ncealed4 has joined #ruby
zming has quit [Ping timeout: 268 seconds]
sanscoeur has quit [Ping timeout: 246 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
aufi has joined #ruby
mangold has joined #ruby
Inline has joined #ruby
moeSizlak has left #ruby ["Leaving"]
venmx has quit [Ping timeout: 276 seconds]
xfbs has joined #ruby
xfbs_ has quit [Ping timeout: 240 seconds]
venmx has joined #ruby
Dbugger has joined #ruby
orbyt_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
jetchisel has joined #ruby
elphe has quit [Ping timeout: 244 seconds]
eddof13 has joined #ruby
TheBloke has joined #ruby
Inline has quit [Remote host closed the connection]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
conta has quit [Quit: conta]
Burgestrand has quit [Quit: Closing time!]
Inline has joined #ruby
gray_-_wolf has joined #ruby
za1b1tsu has quit [Ping timeout: 240 seconds]
aufi has quit [Ping timeout: 268 seconds]
mangold has quit [Quit: This computer has gone to sleep]
nsxt has joined #ruby
<nsxt> Totally baffled by a golfed expression I came across today. Looking for some help in comprehending the expression within .map {}:
<nsxt> ->n,l{l.slice_when{|x,y|x<y-1}.map{|x|x[n-1]?x.minmax.uniq*?-:x}*?,}
jetchisel has quit [Ping timeout: 252 seconds]
jamied has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest70792 has quit [Ping timeout: 252 seconds]
mangold has joined #ruby
<canton7> there's a ternary in there
mangold has quit [Client Quit]
<canton7> x[n - 1] ? (x.minmax.uniq * '-') : x
<nsxt> What is .uniq*?-:x}*?, doing?
jetchisel has joined #ruby
<nsxt> Particularly, the first and last question mark?
<gray_-_wolf> ?- is same as '-'
<ruby[bot]> gray_-_wolf: I don't see no is, whom should I tell about -?
<gray_-_wolf> ?- is same as '-'
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nsxt> Wow... Question mark can be used to quote a character literal?
<gray_-_wolf> one character ones :) and rubocop yells at you for it ;)
<canton7> you pretty much only see it in golf
<nsxt> Crazy. Thanks so much!
blackmesa has quit [Ping timeout: 264 seconds]
gray_-_wolf has quit [Quit: WeeChat 2.2]
Guest53511 has quit [Ping timeout: 276 seconds]
im0nde has quit [Quit: im0nde]
im0nde has joined #ruby
voolik has quit [Ping timeout: 252 seconds]
wildermind has quit [Quit: Connection closed for inactivity]
blackmesa1 has joined #ruby
jcarl43 has joined #ruby
phaul has joined #ruby
clemens3_ has quit [Ping timeout: 268 seconds]
Xiti has quit [Ping timeout: 252 seconds]
Xiti has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
<havenwood> nsxt: In Ruby 1.8 and earlier, the character literal returned an integer. Then in 1.9 it changed to return the single-character string.
<havenwood> nsxt: Because of the breaking change, it fell into disfavor. That should probably change now that 1.8 is long gone.
<havenwood> 1.8: ?x #=> 120
<havenwood> 1.9: ?x #=> "x"
beowuff has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
<canton7> it's also impossible to google for if you don't know what it does, so it's not very discoverable
<canton7> and it's only one char shorter than just using quotes
Inside has joined #ruby
al2o3-cr has joined #ruby
orbyt_ has joined #ruby
darkhanb has joined #ruby
<havenwood> %i() etc are also hard to google, but not too bad to cover in a quick ref
<havenwood> i was just watching a presentation on how android studio helps new devs discover what things are
nicolasb has quit [Remote host closed the connection]
<havenwood> i don't know that there's an ide smart enough to reveal what a char literal is in Ruby
mroutis has joined #ruby
darkhanb has quit [Client Quit]
<havenwood> i guess it's not hard to pull from Ripper or disassembled YARV.
<Eiam> i google 'ruby literals' and just search for it on one of the pages
<Eiam> but you have to know they are called literals to find that too, otherwise 'ruby &:' is ehh
sanscoeur has joined #ruby
prestorium has quit [Ping timeout: 244 seconds]
sanscoeur has quit [Remote host closed the connection]
<havenwood> it's a shame GitHub, Google, etc fail at symbols
<havenwood> SymbolHound does find it
<Eiam> general purpose tools
<Eiam> vs a specialized tool
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
darkhanb has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
elphe has joined #ruby
chouhoulis has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby
jamied has joined #ruby
SeepingN has quit [Disconnected by services]
SeepingN_ has joined #ruby
elphe has quit [Ping timeout: 245 seconds]
dmitch has quit [Ping timeout: 276 seconds]
chouhoulis has quit [Ping timeout: 245 seconds]
chouhoulis has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
za1b1tsu has joined #ruby
chouhoulis has quit [Ping timeout: 268 seconds]
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
Cthulu201 has joined #ruby
armatechnicos has joined #ruby
za1b1tsu has quit [Ping timeout: 252 seconds]
armatechnicos has quit [Client Quit]
renlo has joined #ruby
jesfre has joined #ruby
xfbs_ has joined #ruby
jesfre has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sauvin has quit [Remote host closed the connection]
xfbs has quit [Ping timeout: 268 seconds]
prestorium has joined #ruby
sanscoeur has joined #ruby
xfbs has joined #ruby
Tuor has quit [Quit: Konversation terminated!]
xfbs_ has quit [Ping timeout: 268 seconds]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
eckhardt_ has joined #ruby
nofxx has joined #ruby
lxsameer has joined #ruby
xfbs has quit [Quit: byebye]
mroutis has quit [Read error: Connection reset by peer]
mroutis has joined #ruby
lytol has joined #ruby
renlo has quit [Ping timeout: 246 seconds]
renlo has joined #ruby
whysthatso has joined #ruby
blackmesa1 has quit [Quit: WeeChat 2.3]
jamied has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
whysthatso has quit [Read error: Connection reset by peer]
whysthatso has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
despai has joined #ruby
weaksauce has joined #ruby
jamied has joined #ruby
elphe has joined #ruby
za1b1tsu has quit [Ping timeout: 252 seconds]
jamied has quit [Ping timeout: 252 seconds]
Rapture has quit [Read error: Connection reset by peer]
SeepingN_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
renlo has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
SeepingN has joined #ruby
renlo has joined #ruby
Rapture has joined #ruby
renlo has quit [Ping timeout: 240 seconds]
za1b1tsu has joined #ruby
despai has quit [Quit: ...]
za1b1tsu has quit [Ping timeout: 252 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
k0mpa has quit [Remote host closed the connection]
BTRE has quit [Ping timeout: 246 seconds]
nsxt has quit [Quit: Leaving]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis has quit [Ping timeout: 245 seconds]
niceperl has joined #ruby
phaul has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
reber has quit [Remote host closed the connection]
niceperl has quit [Remote host closed the connection]
niceperl has joined #ruby
niceperl has quit [Remote host closed the connection]
iamdevnul has quit [Read error: Connection reset by peer]
ec has quit [Ping timeout: 252 seconds]
mattwc has quit [Ping timeout: 252 seconds]
gmcintire has quit [Ping timeout: 252 seconds]
pwillard has quit [Ping timeout: 252 seconds]
hsiktas has quit [Ping timeout: 252 seconds]
Chew has quit [Ping timeout: 252 seconds]
darthThorik has quit [Ping timeout: 252 seconds]
pyrmont has quit [Read error: Connection reset by peer]
iamdevnul has joined #ruby
raggi has quit [Write error: Connection reset by peer]
mattwc has joined #ruby
pyrmont has joined #ruby
jhill has quit [Ping timeout: 252 seconds]
timeless has quit [Ping timeout: 252 seconds]
Chew has joined #ruby
gmcintire has joined #ruby
raggi has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
darthThorik has joined #ruby
madhatter has quit [Ping timeout: 250 seconds]
hsiktas has joined #ruby
pwillard has joined #ruby
jhill has joined #ruby
ec has joined #ruby
madhatter has joined #ruby
venmx has joined #ruby
timeless has joined #ruby
venmx has quit [Remote host closed the connection]
whathappens has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
jesfre has joined #ruby
eckhardt_ has joined #ruby
hahuang6- is now known as hahuang65
za1b1tsu has joined #ruby
eckhardt_ has quit [Client Quit]
za1b1tsu has quit [Ping timeout: 246 seconds]
ebl has joined #ruby
leitz has joined #ruby
eckhardt_ has joined #ruby
venmx has joined #ruby
venmx has quit [Remote host closed the connection]
mroutis has joined #ruby
mochiyoda has quit [Remote host closed the connection]
kapil____ has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jesfre has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
ellcs has joined #ruby
SeepingN has joined #ruby
mochiyoda has joined #ruby
rwb has quit [Ping timeout: 268 seconds]
<ebl> I'm getting what I believe it's inconsistent behaviour between String#<=> and Array#sort (which docs say uses <=>) with an array of strings. Could this be a ruby bug? https://hastebin.com/fodetojuji.rb
nexraf1 has joined #ruby
postmodern has joined #ruby
<phaul> ebl fwiw I cannot reproduce it on 2.5.3
<phaul> ["Password", "Email"].sort # => ["Email", "Password"]
rokumatsumoto has joined #ruby
<ebl> phaul, thanks for testing. i'm reproducing on 2.4.0, 2.4.1 and 2.4.3 (mac and linux builds)
<Eiam> 2.3.7 i see the same as phaul
<ebl> i'll see if there is anything on their bug trackers
rokumatsumoto has quit [Client Quit]
renlo has joined #ruby
rokumatsumoto has joined #ruby
moei has quit [Quit: Leaving...]
k0mpa has joined #ruby
<Radar> I cannot reproduce it on Ruby 2.5.1
AJA4350 has joined #ruby
niceperl has joined #ruby
<Radar> Sorry, I _can_ reproduce it on 2.5.1
<ebl> i've just installed ruby 2.5.3 and i'm still getting the error
<Radar> irb(main):001:0> ["Password", "Email"].sort
<Radar> => ["Password", "Email"]
<ebl> this gets weirder by the minute
<Radar> On 2.3.7 I see:
<Radar> ["Password", "Email"].sort
<Radar> => ["Email", "Password"]
vondruch_ has joined #ruby
vondruch_ has quit [Client Quit]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
kaleido has quit [Ping timeout: 250 seconds]
<ebl> phaul, are you on linux?
<phaul> ebl: yes.
lypsis has quit [Quit: ZNC - http://znc.in]
<phaul> ebl: you can play with carc.in with all the versions... to narrow it down
OrangeManBad has quit [Ping timeout: 252 seconds]
<phaul> when it was introduced and fixed
im0nde has quit [Quit: im0nde]
<ebl> thanks, i'll try and do that
lypsis has joined #ruby
rokumatsumoto has quit []
kaleido has joined #ruby
lypsis has quit [Client Quit]
<ebl> i think i've found it. it seems like there is a special character on "Email" on the second sort. those who copy pasted probably got the same result.
<ebl> thanks everyone who helped and sorry for wasting your time with a stupid hidden character :(
lypsis has joined #ruby
<al2o3-cr> The result is not guaranteed to be stable. When the comparison of two elements returns 0, the order of the elements is unpredictable. (from the docs.)
<ebl> yes, but the comparison does not return 0 in this case
mochiyoda has quit [Quit: Konversation terminated!]
<al2o3-cr> ebl: nvm, disregard that.
sanscoeur has quit [Read error: Connection reset by peer]
sanscoeur has joined #ruby
rwb has joined #ruby
mochiyoda has joined #ruby
rokumatsumoto has joined #ruby
prestorium has quit [Quit: prestorium]
<al2o3-cr> ebl: yeah, your example has a BOM.
<Radar> ["Password", "Email"].map(&:chars)
<Radar> => [["P", "a", "s", "s", "w", "o", "r", "d"], ["", "E", "m", "a", "i", "l"]]
<Radar> >> ["Password", "Email"].map(&:codepoints)
<Radar> => [[80, 97, 115, 115, 119, 111, 114, 100], [65279, 69, 109, 97, 105, 108]]
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar> ruby[bot]: dead to me
<al2o3-cr> ["Password", "Email"].map(&:chars)[1][0].bytes.pack('C3') == "\xEF\xBB\xBF" that's a BOM if ever i saw one.
rokumatsumoto has quit [Client Quit]
<ebl> yeah, i saw that too when i `unpack`ed the strings. should have started there, my bad
OrangeManBad has joined #ruby
<al2o3-cr> ebl: np dude, things are never what they seem... sometimes =)
bga57 has quit [Ping timeout: 252 seconds]
<al2o3-cr> Radar: should be fixed soon, phaul has send a pr.
<al2o3-cr> *sent
<Radar> al2o3-cr: Depends on when apieros deploys it
<Radar> could be years
<Radar> ;)
<al2o3-cr> Radar: yeah, that too. =)
<phaul> tbh. I could just quickly move the functionality into rubydoc... even if temporarily
dbugger_ has joined #ruby
Dbugger has quit [Read error: Connection reset by peer]
<al2o3-cr> phaul: if you could get permission temporarily, i couldn't see a problem.
<phaul> if its behind a different command they wont even step on each others feet
<al2o3-cr> phaul: i'd ask one of the ops to see if it would be acceptable.
whysthatso has quit [Quit: whysthatso]
<phaul> yeah I don't want to start a mutiny :)
<phaul> also don't want to do it behind apeiros's back
<al2o3-cr> phaul: that why i'd ask one of the ops first.
dbugger_ has quit [Remote host closed the connection]
jesfre has joined #ruby
<al2o3-cr> phaul: Radar seems to have all pivileges.
<al2o3-cr> according to the access list.
<Radar> al2o3-cr: I don't think access list == bot access
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
<Radar> phaul: I'd be okay with it if it meant we had an interpreter that worked in-channel
<phaul> ok, I'll put something together tomorrow
<Radar> thank you
nicolasb has joined #ruby
<al2o3-cr> Radar: sorry, yeah that is what i meant.
<phaul> let's keep the rubydoc prefix of &
<phaul> &>> 1+1
<rubydoc> did not understand that, parser error @ char position 0
<phaul> or such
<Radar> sounds good to me
<al2o3-cr> phaul: i'd agree.
<al2o3-cr> at least we would have a working bot in the mean time.
<al2o3-cr> apeiros is probably busy doing other things, idk.
nicolasb has quit [Read error: Connection reset by peer]
<al2o3-cr> phaul: btw, which http api did you decide to use?
<phaul> the one you showed me
<al2o3-cr> typhoeus, good choice. =)
ur5us has quit [Read error: Connection reset by peer]
nexraf1 has quit [Ping timeout: 252 seconds]
<nchambers> / 18
<jesfre> Is the :: operator the same thing for classes and modules as using dot notation or bracket notation when looking into nested JSON dictionaries?
<Inside> How much can you hide in codepoints?
<Inside> People are copy pasting the code to execute it
<Inside> Could you do a sql-injection-type attack?
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> Inside: hardly, BOM -> zero width no-break space.
Inv1s1ble has quit [Ping timeout: 276 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> Inside: try this: `eval "cHV0cyAnSGVsbG8sIEluc2lkZS4n".unpack1 'm0'`
* Inside squints.
za1b1tsu has joined #ruby
<Inside> "aGVsbG8gdG8geW91IHRvbw=="unpack1 'm0' :P
<al2o3-cr> =)
<al2o3-cr> it was going to be intel, but i didn't think you'd get it ;)
za1b1tsu has quit [Ping timeout: 252 seconds]
<Inside> hm?
<al2o3-cr> intel inside.
<Inside> derp
roshanavand has quit [Ping timeout: 246 seconds]
ellcs has quit [Ping timeout: 252 seconds]
PaulePanter has joined #ruby
<PaulePanter> Hi. The ZDNS JSON output, just seems to put a JSON object on each line.
<PaulePanter> The Ruby JSON parser complains about that.
<PaulePanter> Do you know if that is valid JSON?
<al2o3-cr> PaulePanter: yeah, it's valid json.
<al2o3-cr> PaulePanter: in what way does it complain?
<al2o3-cr> PaulePanter: try using single quotes when passing to JSON.parse if that is what you mean.
<al2o3-cr> or %()
<nchambers> PaulePanter: works fine here
<PaulePanter> al2o3-cr: I open the file with these lines, and then pass that to JSON.parse.
<al2o3-cr> PaulePanter: it won't work like that, as there are two objects.
niceperl has quit [Quit: Leaving...]
<PaulePanter> So, I have to parse each line as JSON?
<PaulePanter> Or is adding a JSON object on separate lines without a delimiter not a valid JSON file?
ebl has quit [Quit: Leaving]
za1b1tsu has joined #ruby
<al2o3-cr> PaulePanter: it two valid json objects, it should be delimited by a comma to be as one.
za1b1tsu has quit [Ping timeout: 252 seconds]
<PaulePanter> Understood. I’ll open an issue at zdns.
<al2o3-cr> PaulePanter: the only way to make that work is; File.read('json').chomp("\n\n").split.map &JSON.method(:parse)
<al2o3-cr> others might have better suggestions.
<PaulePanter> Looks like I also need to put [] around it in the file to make it an array.
<al2o3-cr> PaulePanter: no.
<PaulePanter> al2o3-cr: If I edited my “JSON” file and put a comma between the two objects, JSON.parse still complained.
jesfre has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> PaulePanter: you have to wrap it in single quotes or %()
<al2o3-cr> btw, that example was wrong. one sec.
<al2o3-cr> %() mean to escape the double quotes.
<al2o3-cr> *meaning
<PaulePanter> al2o3-cr: Sorry, I didn’t mean [] to use in the Ruby code, but just editing the JSON file.
<PaulePanter> json_verify von yail seems to agree.
<PaulePanter> Anyway, it seems to be a zdns issue (or me misreading something about the output format).
<PaulePanter> Thank you very much for your help.
<al2o3-cr> PaulePanter: that is one messed up api if it delivers it that way.
venmx has joined #ruby
whathappens has quit [Remote host closed the connection]
<al2o3-cr> PaulePanter: to get around it for now you could do; File.read('json').split("\n").each_with_object({}) { |js, h| h.update(JSON.parse(js)) }
nexraf1 has joined #ruby
daemonwrangler has quit [Quit: ZNC 1.6.5 - http://znc.in]
daemonwrangler has joined #ruby