<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.
<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]
<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!]
<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…]
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
<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]
<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?