havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.1, 2.5.3, 2.4.5: 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!
NoidedSuper has quit [Remote host closed the connection]
\void has quit [Quit: So long, and thanks for all the fish.]
orbyt_ has joined #ruby
cthu| has joined #ruby
cthulchu_ has quit [Ping timeout: 246 seconds]
cthulchu_ has joined #ruby
cthu| has quit [Ping timeout: 246 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
Eiam has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
r29v has quit [Quit: r29v]
lxsameer has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blaguvest has joined #ruby
def_jam has joined #ruby
AJA4351 has joined #ruby
eb0t_ has joined #ruby
eblip has quit [Ping timeout: 240 seconds]
eb0t has quit [Ping timeout: 244 seconds]
def_jam is now known as eblip
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
cd has quit [Ping timeout: 256 seconds]
xco has quit [Quit: xco]
eb0t has joined #ruby
def_jam has joined #ruby
eblip has quit [Ping timeout: 246 seconds]
eb0t_ has quit [Ping timeout: 250 seconds]
eb0t has quit [Client Quit]
eb0t has joined #ruby
eb0t has quit [Client Quit]
def_jam has quit [Ping timeout: 240 seconds]
cd has joined #ruby
gix has quit [Ping timeout: 250 seconds]
dviola has quit [Quit: WeeChat 2.3]
xall has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
orbyt_ has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
scrptktty has quit [Quit: Connection closed for inactivity]
tdy has joined #ruby
asphyxia has quit [Quit: Lost terminal]
asphyxia has joined #ruby
asphyxia has quit [Quit: Lost terminal]
orbyt_ has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robscomputer has joined #ruby
xco has joined #ruby
duckpuppy has joined #ruby
duckpupp- has quit [Ping timeout: 246 seconds]
code_zombie has quit [Quit: Leaving]
mikecmpbll has quit [Quit: inabit. zz.]
AJA4350 has quit [Remote host closed the connection]
cd has quit [Ping timeout: 256 seconds]
cd has joined #ruby
renich has quit [Ping timeout: 272 seconds]
xco has quit [Quit: xco]
arescorpio has joined #ruby
marmotini_ has joined #ruby
marmotini_ has quit [Ping timeout: 250 seconds]
Swyper has joined #ruby
volkov has joined #ruby
houhoulis has joined #ruby
kapil____ has joined #ruby
Swyper has quit [Remote host closed the connection]
ellcs has quit [Ping timeout: 240 seconds]
Swyper has joined #ruby
ogres has joined #ruby
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
ellcs has joined #ruby
v01d4lph4 has joined #ruby
_whitelogger has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
v01d4lph4 has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
v01d4lph4 has joined #ruby
ellcs has quit [Ping timeout: 264 seconds]
ellcs has joined #ruby
arescorpio has quit [Remote host closed the connection]
volkov has quit [Remote host closed the connection]
dellavg__ has joined #ruby
Azure has quit [Ping timeout: 268 seconds]
\void has joined #ruby
ghormoon has quit [Ping timeout: 246 seconds]
Azure has joined #ruby
ghormoon has joined #ruby
johnny56 has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ruby
SuperLag has quit [Ping timeout: 240 seconds]
SuperLag has joined #ruby
elcontrastador has joined #ruby
dellavg__ has quit [Ping timeout: 245 seconds]
DTZUZO has quit [Ping timeout: 250 seconds]
\void has quit [Quit: So long, and thanks for all the fish.]
lytol_ has quit [Remote host closed the connection]
agent_white has quit [Quit: bbl]
johnny56 has joined #ruby
conta has joined #ruby
reber has joined #ruby
sauvin has joined #ruby
elcontrastador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil____ has quit [Quit: Connection closed for inactivity]
Swyper has quit [Read error: Connection reset by peer]
ogres has quit [Quit: Connection closed for inactivity]
marmotini_ has joined #ruby
moei has joined #ruby
mcspud has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
mcspud has joined #ruby
lunarkitty7 has joined #ruby
Inline has quit [Quit: Leaving]
ogres has joined #ruby
renich has joined #ruby
renich has quit [Remote host closed the connection]
renich has joined #ruby
aufi has joined #ruby
hahuang6- has quit [Ping timeout: 240 seconds]
dan64 has quit [Ping timeout: 240 seconds]
hahuang6- has joined #ruby
dan64 has joined #ruby
ellcs has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
themsay has joined #ruby
za1b1tsu has joined #ruby
duderonomy has joined #ruby
houhoulis has quit [Remote host closed the connection]
aupadhye has joined #ruby
mangold has joined #ruby
renich has quit [Quit: renich]
renich has joined #ruby
renich has quit [Remote host closed the connection]
clemens3 has joined #ruby
clemens3 has quit [Ping timeout: 240 seconds]
kapil____ has joined #ruby
apparition has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
mangold has quit [Ping timeout: 250 seconds]
mangold has joined #ruby
status402 has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has joined #ruby
cd has quit [Quit: cd]
renich has joined #ruby
renich has quit [Remote host closed the connection]
duderonomy has joined #ruby
status402_ has joined #ruby
status402 has quit [Read error: Connection reset by peer]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cnsvc has quit [Ping timeout: 256 seconds]
sylario has joined #ruby
xall has quit [Ping timeout: 250 seconds]
mangold has quit [Quit: This computer has gone to sleep]
FastJack has quit [Remote host closed the connection]
reber has quit [Remote host closed the connection]
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mangold has joined #ruby
BH23 has joined #ruby
wildermind has joined #ruby
themsay has quit [Ping timeout: 250 seconds]
ansraliant has quit [Quit: My planet needs me]
jmcgnh has joined #ruby
lunarkitty7 has quit [Ping timeout: 252 seconds]
FastJack has joined #ruby
madhatter has quit [Remote host closed the connection]
ep4sh2k has joined #ruby
<ep4sh2k> hi friends! Could some body help with ruby: https://paste.ubuntu.com/p/7nQDBhR8Vr/ When i start Logstash it crashes :(
<ep4sh2k> What is wrong?
<ep4sh2k> if i comment this code - status Ok
<TvL2386> doesn't logstash print anything useful?
tdy has quit [Ping timeout: 240 seconds]
<TvL2386> I can see double quotes to encapsulate your ruby code, but in the code you use double quotes as well... I'd at least change "::" to '::'
<TvL2386> and I think the \s*? is also weird in the regexp
<TvL2386> but that may be me, I'm no regexp guru
<canton7> TvL2386, that's "whitespace zero or more times, non-greedy match"
<TvL2386> canton7: ah ack! ty
pierrethierry has joined #ruby
<canton7> granted the '?' isn't needed in this case
pierrethierry has quit [Client Quit]
<TvL2386> I also think field.strip! || field is weird
<ep4sh2k> enought just field.strip, right?
<TvL2386> I take that back, I thought strip! always returned nil, but that's not true
mangold has quit [Ping timeout: 250 seconds]
lunarkitty7 has joined #ruby
<TvL2386> I think your double quotes in the ruby code confuse logstash, since the ruby code stops at the first " and logstash configuration syntax continues afterwards and doesn't like the ::"
xco has joined #ruby
xco has quit [Client Quit]
pierrethierry has joined #ruby
<ep4sh2k> Thanks i will try it
<TvL2386> yw
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
lunarkitty7 has quit [Ping timeout: 245 seconds]
ogres has quit [Quit: Connection closed for inactivity]
lunarkitty7 has joined #ruby
pierrethierry has quit [Quit: Leaving]
Nicmavr has quit [Read error: Connection reset by peer]
Guest16678 has joined #ruby
<ep4sh2k> my config and raising error: https://paste.ubuntu.com/p/PWzCx38xJF/
<ep4sh2k> but i cant determine where is specified line and column in code (with error)
Nicmavr has joined #ruby
<ep4sh2k> if i just comment ruby code - logstash starts fine
xall has joined #ruby
nowhere_man has joined #ruby
ellcs has joined #ruby
xall has quit [Quit: xall]
roshanavand has joined #ruby
AJA4350 has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
marmotini_ has quit [Ping timeout: 240 seconds]
madhatter has joined #ruby
ellcs has quit [Ping timeout: 272 seconds]
v01d4lph4 has quit [Remote host closed the connection]
v01d4lph4 has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
v01d4lph4 has joined #ruby
v01d4lph4 has quit [Read error: Connection reset by peer]
marmotini_ has joined #ruby
v01d4lph4 has joined #ruby
sauvin has quit [Ping timeout: 245 seconds]
eb0t has joined #ruby
sauvin has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
eb0t has left #ruby [#ruby]
<Bish> isn't there a do missing?
<Bish> well it seems to be optional
<Bish> for x in y do;...;end
soyeomul^bionic has joined #ruby
thinkpad has quit [Ping timeout: 244 seconds]
Emmanuel_Chanel has joined #ruby
thinkpad has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 272 seconds]
dviola has joined #ruby
madhatter has quit [Quit: leaving]
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
madhatter has joined #ruby
Dbugger has joined #ruby
conta has joined #ruby
pierrethierry has joined #ruby
<ep4sh2k> yeah, it works! thanks!
Guest16678 has quit [Ping timeout: 246 seconds]
status402_ has quit [Quit: status402_]
status402 has joined #ruby
pierrethierry has quit [Quit: This computer has gone to sleep]
apparition has joined #ruby
Guest16678 has joined #ruby
BH23 has quit [Ping timeout: 250 seconds]
Guest16678 has quit [Ping timeout: 272 seconds]
Guest16678 has joined #ruby
BH23 has joined #ruby
Hess has joined #ruby
Hess has left #ruby [#ruby]
Guest16678 has quit [Ping timeout: 240 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
Guest16678 has joined #ruby
Guest16678 has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
jottr_ has quit [Ping timeout: 245 seconds]
soyeomul^bionic has quit [Quit: ERC (IRC client for Emacs 26.1)]
blackmesa has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
segy has joined #ruby
roshanavand has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
Guest16678 has joined #ruby
blackmesa has joined #ruby
Swyper has joined #ruby
za1b1tsu has quit [Ping timeout: 272 seconds]
old_relik has joined #ruby
<old_relik> Is it idiomatic to memoize constants like this: APP_HOST ||= ENV.fetch('APP_HOST')
lucasb has joined #ruby
<phaul> for memoizing no. for conditionally setting it yes. but I would freeze it too
<phaul> depends on where that code is. if it only runs once then why not.
<old_relik> so it's technically a rails "concern"
<old_relik> and is under the "included" block
<old_relik> and hence gets loaded a few times (esp during tests)
<old_relik> and hence throws the re-assign warning
<phaul> then its not idiomatic
<phaul> especially with throwing warnings
AJA4351 has joined #ruby
<old_relik> what would you recommend?
<phaul> variable.
<old_relik> hrm
<phaul> acessor. can live in the singleton class
<phaul> class Blah; class < self; attr_accessor :app_host; end; end
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
<dionysus69> I need to decode XDR envelope, I am unable to use this gem, it produces weird errors https://github.com/stellar/ruby-xdr the link to the the code http://paste.debian.net/1065634/
<phaul> old_relik: Blah.app_host ||= '...'
<dionysus69> I am sure the encoded message is correct, so far I was unable to find any other xdr library in ruby
<old_relik> oh like a self accessor
<old_relik> right
<old_relik> however this must sit in a module (rails concern)
blackmesa has quit [Ping timeout: 240 seconds]
thinkpad has quit [Ping timeout: 250 seconds]
za1b1tsu has joined #ruby
ua has quit [Ping timeout: 250 seconds]
<phaul> old_relik: that's not a problem. Concerns are just dressed up modules, right?
<phaul> modules can have singleton classes
<phaul> but extend or include wont pick up the accessor, you would have to write Modulename.host_path
thinkpad has joined #ruby
<phaul> I guess you can put it in class_method { } block, if it works by included hook extending with a sub module. Then include would also pick up the accessor. I guess easyest is to try
<phaul> easiest*
<old_relik> phaul: hm
<old_relik> so I just moved the constants from "included do" to out in the normal module scope
<old_relik> and it works
<old_relik> they are accessible in the included block
<old_relik> I'm not entirely sure why that worked though
<phaul> not sure without seeing your code, and its been a while Ive seen the concern implementation. I did this gist this works https://gist.github.com/107baa398e9f4ebe7533b728e5c1d312
<phaul> but your thing can also be correct.
<phaul> actually the result is 17 not 13 at the end
<phaul> :)
<old_relik> phaul: https://dpaste.de/vbKe
<old_relik> so that works
<old_relik> what I previously had was this: https://dpaste.de/eY7z
<old_relik> (which was throwing warnings)
ua has joined #ruby
<old_relik> [apologies if this is rails domain]
<phaul> yeah, but then it only runs once, when it's loaded. I thought it was a requirement to be able to assign multiple times
<phaul> anyways, if that works that's the right way
<old_relik> yeah, I might have not made that clear
<old_relik> apologies
<phaul> no worries
<old_relik> it's completely ok for it to be init'd once
<phaul> that's cool, then constant makes more sense than a var
Emmanuel_Chanel has joined #ruby
old_relik has quit [Quit: Page closed]
ep4sh2k has quit [Quit: Connection closed for inactivity]
gregf_ has joined #ruby
_whitelogger has joined #ruby
blaguvest has quit [Remote host closed the connection]
pierrethierry has joined #ruby
blackmesa has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
GinoMan has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
Swyper has quit [Ping timeout: 246 seconds]
GinoMan2440 has quit [Ping timeout: 245 seconds]
nowhereman has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
pierrethierry has quit [Ping timeout: 268 seconds]
nowhere_man has quit [Ping timeout: 272 seconds]
fanta7531 has joined #ruby
aupadhye has quit [Quit: Leaving]
dinfuehr has quit [Ping timeout: 272 seconds]
dinfuehr has joined #ruby
clemens3 has quit [Remote host closed the connection]
marmotini_ has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Ping timeout: 272 seconds]
conta has quit [Quit: conta]
aupadhye has joined #ruby
BH23 has quit [Ping timeout: 250 seconds]
pierrethierry has joined #ruby
Rapture has joined #ruby
aupadhye has quit [Ping timeout: 272 seconds]
apparition has quit [Quit: Bye]
polishdub has joined #ruby
cubillosxy_py has joined #ruby
rippa has joined #ruby
status402 has quit [Quit: status402]
status402 has joined #ruby
marmotini_ has joined #ruby
status402 has quit [Remote host closed the connection]
status402_ has joined #ruby
AJA4350 has joined #ruby
sirecote has joined #ruby
kapil____ has joined #ruby
elcontrastador has joined #ruby
elcontrastador has quit [Client Quit]
jottr has quit [Read error: Connection reset by peer]
Inline has joined #ruby
jottr has joined #ruby
cubillosxy_py has quit [Quit: leaving]
duderonomy has joined #ruby
galaxie has joined #ruby
<galaxie> What's a good HTML templating engine that works in both Ruby and Lua and is cross-platform?
<galaxie> I mean, not necessarily HTML, but I am using Liquid so far.
aufi has quit [Ping timeout: 246 seconds]
<galaxie> Mustache would've been perfect except it's logic-less, as in, no if statements, for loops, etc.
status402_ has quit [Quit: status402_]
grvgr has joined #ruby
multi_io has quit [Ping timeout: 252 seconds]
<galaxie> Except it looks alpha quality for now this would work: https://github.com/jasonroelofs/late
tdy has joined #ruby
SuperLag has quit [Quit: leaving]
<galaxie> Hmmm, there appears to be a port of Liquid to Lua that's slightly different, I'll look into that.
galaxie has quit [Quit: ircII EPIC4-2.10.6 -- Are we there yet?]
jottr has quit [Ping timeout: 246 seconds]
clemens3 has joined #ruby
SuperLag has joined #ruby
<Iambchop> dionysus69: "are you decoding the right xdr type?" how was that message encoded?
<Iambchop> nEnvelope&network=test
<Iambchop> https://www.stellar.org/laboratory/#xdr-viewer?input=AAAAAFugE4m5G6atiR3UnMAowKubzTCrhbm1uRXNXElbXnIIAAAAZAACv7oAA3rJAAAAAAAAAAEAAAAQVGVzdCBUcmFuc2FjdGlvbgAAAAEAAAAAAAAAAQAAAAAMF%2FX3w8lITxPE60OCt6GzPVeEL2IVmq5Cz6%2FggDlPZAAAAAFITlkAAAAAAJyzpxsbHjlm33tVyNgwYLBOw9%2B35z5yQ%2BeiqdRkBROZAAAAAEIpQYAAAAAAAAAAAVtecggAAABA2%2B8Zm43h9NEYi2ReXwK%2Bg9ZHLvjklferCHotyXg2Tv%2BjYfqgipPTfrwdRlvXDwMwLP0YhgMReJLLF80VcYVUAQ%3D%3D&type=Transactio
ua has quit [Ping timeout: 250 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
Silex has joined #ruby
arup_r has joined #ruby
pierrethierry has quit [Ping timeout: 240 seconds]
ua has joined #ruby
nowhereman has quit [Ping timeout: 272 seconds]
jottr has joined #ruby
orbyt_ has joined #ruby
dinfuehr has quit [Ping timeout: 245 seconds]
dinfuehr has joined #ruby
orbyt_ has quit [Client Quit]
v01d4lph4 has joined #ruby
\void has joined #ruby
conta has joined #ruby
marmotini_ has quit [Ping timeout: 272 seconds]
fanta7531 has quit [Quit: fanta7531]
arup_r has quit []
silent_freak has joined #ruby
v01d4lph4 has quit [Ping timeout: 250 seconds]
Silex has quit [Ping timeout: 256 seconds]
Fridtjof has quit [Ping timeout: 268 seconds]
skyikot has joined #ruby
aldodelgado has joined #ruby
BH23 has joined #ruby
d10n-work has joined #ruby
akem__ has quit [Read error: Connection reset by peer]
akem__ has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
hiroaki has quit [Ping timeout: 250 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
Swyper has joined #ruby
[Butch] has joined #ruby
Swyper has quit [Remote host closed the connection]
Guest16678 has quit [Ping timeout: 268 seconds]
orbyt_ has joined #ruby
themsay has joined #ruby
clemens3 has quit [Ping timeout: 250 seconds]
hiroaki has joined #ruby
Guest16678 has joined #ruby
orbyt_ has quit [Ping timeout: 246 seconds]
octos has joined #ruby
krawchyk has joined #ruby
marmotini_ has joined #ruby
Guest16678 has quit [Ping timeout: 240 seconds]
conta has quit [Quit: conta]
fanta7531 has joined #ruby
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #ruby
jobewan has joined #ruby
volkov has joined #ruby
<aldodelgado> Question? Anyone know if the google+ API shutdown will effect people who are using googleauth to just login? I cant seem to find a straight answer. https://developers.google.com/+/integrations-shutdown
<aldodelgado> looks like the endpoints/scopes need to be updated. https://github.com/googleapis/google-auth-library-ruby
valadares has joined #ruby
orbyt_ has joined #ruby
octos has quit [Read error: Connection reset by peer]
marmotini_ has quit [Ping timeout: 245 seconds]
volkov has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 245 seconds]
marmotini_ has joined #ruby
robscomputer has joined #ruby
marmotini has joined #ruby
robscomputer has quit [Client Quit]
robscomputer has joined #ruby
<up|ime> i don't think google+ is their auth component?
Xeago has joined #ruby
marmotini_ has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
valadares has quit [Ping timeout: 272 seconds]
valadares has joined #ruby
silent_freak has quit [Remote host closed the connection]
v01d4lph4 has joined #ruby
v01d4lph4 has quit [Ping timeout: 240 seconds]
fanta7531 has quit [Quit: fanta7531]
v01d4lph4 has joined #ruby
code_zombie has joined #ruby
reber has joined #ruby
AJA4350 has quit [Ping timeout: 250 seconds]
d^sh has quit [Ping timeout: 250 seconds]
d^sh has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Ping timeout: 250 seconds]
marmotini has quit [Ping timeout: 246 seconds]
dviola has quit [Quit: WeeChat 2.3]
rippa has quit [Read error: Connection reset by peer]
marmotini has joined #ruby
rippa has joined #ruby
dviola has joined #ruby
marmotini has quit [Ping timeout: 240 seconds]
jobewan has quit [Ping timeout: 240 seconds]
sauvin has quit [Remote host closed the connection]
v01d4lph4 has quit [Remote host closed the connection]
v01d4lph4 has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
v01d4lph4 has quit [Ping timeout: 245 seconds]
sezuan has quit [Quit: ____]
AJA4350 has joined #ruby
spacesuitdiver has joined #ruby
blackmesa has joined #ruby
gix has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jobewan has joined #ruby
Swyper has joined #ruby
orbyt_ has quit [Ping timeout: 244 seconds]
Swyper has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 245 seconds]
robscomputer has quit [Ping timeout: 244 seconds]
agent_white has joined #ruby
SeepingN has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
za1b1tsu has quit [Ping timeout: 246 seconds]
valadares has quit [Remote host closed the connection]
octos has joined #ruby
gaussblurinc1 has joined #ruby
<gaussblurinc1> Hi!
<phaul> gaussblurinc1: hi
<gaussblurinc1> is it possible to pass block as a last parameter to an operator with one extra parameter.
<gaussblurinc1> Example: def > (a, &b); end
<baweaver> Why would you?
<baweaver> What's the use case?
Nicmavr has quit [Read error: Connection reset by peer]
<phaul> &>> x = Object.new; def x.>(a, &b); p self: self, a: a; b.call; end; x > s { puts ' hello' }
<rubydoc> # => undefined method `s' for main:Object (NoMethodError) (https://carc.in/#/r/66rd)
<gaussblurinc1> a | b | c {|value| value}
<phaul> &>> x = Object.new; def x.>(a, &b); p self: self, a: a; b.call; end; x > x { puts ' hello' }
<rubydoc> # => undefined method `x' for main:Object (NoMethodError) (https://carc.in/#/r/66re)
<baweaver> Just use `then`
<gaussblurinc1> baweaver: custom objects + dsl
Nicmavr has joined #ruby
<baweaver> Trying to be too clever in DSLs tends to be hard to test and maintain
<baweaver> and functional piping isn't really necessary anymore, we have << and >> for composition in 2.6
<gaussblurinc1> baweaver: could you share a link?
<phaul> &>> x = Object.new; def x.>(a, &b); p self: self, a: a; b.call; end; x.>(x) { puts ' hello' }
<rubydoc> # => {:self=>#<Object:0x000055690aff1a68>, :a=>#<Object:0x000055690aff1a68>} (https://carc.in/#/r/66rf)
<baweaver> You're thinking about it backwards.
<baweaver> a | b | c { ... }
<baweaver> a, b, and c are all entities. | is an operator that works on those entities. The clock doesn't belong to |, it belongs to c
<baweaver> &>> adds = -> x { -> y { x + y } }; multiplies = -> x { -> y { x * y } }; [1, 2, 3].map(&adds[1] >> multiplies[5])
<rubydoc> # => [10, 15, 20] (https://carc.in/#/r/66rg)
<baweaver> << composes in the other direction
<baweaver> &>> adds = -> x { -> y { x + y } }; multiplies = -> x { -> y { x * y } }; [1, 2, 3].map(&adds[1] << multiplies[5])
<rubydoc> # => [6, 11, 16] (https://carc.in/#/r/66rh)
kapil____ has joined #ruby
<phaul> yeah, as baweaver says it. technically it's possible though, as demonstrated.
<baweaver> which is more accurately what people mean with `compose` in functional languages.
<baweaver> It's less of "Can Ruby do X" than "Should you be doing X?"
<phaul> sure. I was curius myself what it will do tbh :)
<gaussblurinc1> phaul: thanks! parentheses are the keys
za1b1tsu has joined #ruby
<baweaver> Same
<baweaver> Though I'm 95% they just ignored that
<phaul> gaussblurinc1: as baweaver says it works but you shouldn't do it
<baweaver> which is why often times I don't show how it's done
<baweaver> The reason the parens are needed is the difference between `{ ... }` blocks and `do ... end` blocks
<baweaver> The former creates ambiguity for the parser between that and a hash / kw param
<baweaver> It's the same reason you can't do this in RSpec: `let :value { ... }`
<phaul> true
<gaussblurinc1> baweaver: even when I pass parameters names to a block?
<baweaver> Give it a try in a REPL
<gaussblurinc1> baweaver: it dies at curly bracer even with named parameter in block
<baweaver> Figured, didn't remember.
<gaussblurinc1> ah, wait, ruby version 2.4.1
<baweaver> REPLs are great for answering questions and experimenting.
thinkpad has quit [Ping timeout: 245 seconds]
thinkpad has joined #ruby
lxsameer has joined #ruby
houhoulis has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
sticaz has quit [Ping timeout: 245 seconds]
orbyt_ has joined #ruby
e is now known as edk-dsgikortej
edk-dsgikortej is now known as e
gaussblurinc1 has quit [Quit: Leaving.]
cnsvc has joined #ruby
frem has joined #ruby
<darix> <3 binding.pry or binding.irb
tdy has joined #ruby
reber has quit [Remote host closed the connection]
Dbugger has quit [Remote host closed the connection]
<Eiam> pry changed the way I debug ruby =)
<Eiam> these days I write most of my code INSIDE a halted pry session, then pop it back into the file
<Eiam> sad but true
r29v has joined #ruby
<SeepingN> I do that in irb/console but haven't bothered dealing with pry
dviola has quit [Quit: WeeChat 2.3]
<Eiam> I halt right where the new code would go so it operates in the right context
<Eiam> state is 'as it should be' when its running
tdy has quit [Ping timeout: 268 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
AJA4350 has quit [Ping timeout: 240 seconds]
robscomputer has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robscomputer has quit [Ping timeout: 244 seconds]
robscomputer has joined #ruby
r29v has quit [Quit: r29v]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
tdy has joined #ruby
blackmesa has joined #ruby
<al2o3-cr> baweaver: curry dude!
perique has joined #ruby
Fusl has quit [Remote host closed the connection]
Fusl has joined #ruby
<leah2> did ARGF.lineno reset at some point? it doesnt seem to anymore
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tde has joined #ruby
<leah2> hm not in 1.9.3 either
<leah2> oh duh, ARGF.file.lineno
robscomputer has joined #ruby
tde has quit [Quit: leaving]
nowhereman has joined #ruby
tde has joined #ruby
tde has quit [Quit: Lost terminal]
tdy has quit [Remote host closed the connection]
za1b1tsu has quit [Remote host closed the connection]
perique has quit [Quit: PHX->SJC]
houhoulis has quit [Remote host closed the connection]
darix has quit [Quit: brb]
AJA4350 has joined #ruby
r29v has joined #ruby
code_zombie has quit [Quit: Leaving]
polishdub has quit [Quit: leaving]
bruul has joined #ruby
slester has quit [Quit: Textual IRC Client: www.textualapp.com]
Emmanuel_Chanel has quit [Quit: Leaving]
cd has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
Emmanuel_Chanel has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
bruul has quit [Ping timeout: 268 seconds]