havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.0, 3.1.3, 3.0.5, 2.7.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
dionysus69 has quit [Ping timeout: 260 seconds]
dionysus70 is now known as dionysus69
Al2O3_ has joined #ruby
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
Thanzex32 has quit [Ping timeout: 272 seconds]
cartdrige has quit [Ping timeout: 260 seconds]
lagash_ has quit [Quit: ZNC - https://znc.in]
lagash_ has joined #ruby
razetime has joined #ruby
markong has quit [Ping timeout: 260 seconds]
lucartc has quit [Remote host closed the connection]
Al2O3_ has quit [Quit: I'm quitting, thanks for all the sharks.]
Al2O3_ has joined #ruby
Al2O3_ has quit [Client Quit]
Al2O3 has joined #ruby
caedmon has joined #ruby
caedmon has quit [Ping timeout: 272 seconds]
moldorcoder7 has quit [Ping timeout: 252 seconds]
leonthemisfit has quit [Quit: WeeChat 3.6]
leonthemisfit has joined #ruby
finsternis has joined #ruby
plantman2 has joined #ruby
plantman2 has quit [Ping timeout: 255 seconds]
jhass has quit [Ping timeout: 260 seconds]
jhass has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
cartdrige has joined #ruby
stirl has joined #ruby
caedmon has joined #ruby
ur5us has quit [Ping timeout: 246 seconds]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
caedmon has quit [Ping timeout: 260 seconds]
agent_white has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
walez has joined #ruby
walez has quit [Client Quit]
Linux_Kerio has joined #ruby
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp has joined #ruby
Thanzex32 has joined #ruby
otisolsen70 has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
_ht has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
crax23 has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
otisolsen70 has joined #ruby
stirl has quit [Ping timeout: 272 seconds]
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
walez has joined #ruby
yCrazyEdd has quit [Ping timeout: 252 seconds]
dyCrazyEd has joined #ruby
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
razetime has quit [Remote host closed the connection]
cartdrige has joined #ruby
dyCrazyEd is now known as CrazyEddy
cartdrige has quit [Quit: I am more peaced off than a dragon trying to blow out candles]
razetime has joined #ruby
willow has quit [Quit: willow]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
apteryx has quit [Ping timeout: 268 seconds]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
cartdrige has joined #ruby
apteryx has joined #ruby
ccapndave has joined #ruby
ccapndave has quit [Quit: Textual IRC Client: www.textualapp.com]
dviola has joined #ruby
Furai has quit [Quit: WeeChat 3.7.1]
<tsujp> I'm using a gem which takes either an Enumerable or an Array as some source data and I want to only view a specific range of that data at a time. I could use #slice on the Array but that will return a new Array and I cannot re-initialise this object the gem provides
<tsujp> I could use #slice! but then I'd lose the other elements. I effectively want a sliding window by reference, is there any existing way to do this in Ruby or shall I make a little custom thing?
cartdrige has quit [Ping timeout: 252 seconds]
<jhass[m]> Sounds like a custom thingy
<jhass[m]> but also sounds like you're likely to confuse the hell out of that poor little gem
<tsujp> I will bribe it with sweet candy
<tsujp> OH it has a method to return it's data source after you provide it so I can just do `the_object.sources = original_data.slice()` if that makes sense
<tsujp> Just tested it then and it works.. noice
<tsujp> It's kind of wasteful on memory though (not important here just me being pedantic)
<tsujp> IO:Buffer has a #slice which it describes as a "view" i.e. it does _not_ copy memory
razetime has quit [Quit: See You Space Cowboy]
razetime has joined #ruby
jhawthorn_ has joined #ruby
jhawthorn has quit [Ping timeout: 252 seconds]
Furai has joined #ruby
razetime has quit [Ping timeout: 248 seconds]
Linux_Kerio has quit [Ping timeout: 252 seconds]
John_Ivan__ has quit [Read error: Connection reset by peer]
John_Ivan_ has joined #ruby
lucartc has joined #ruby
leonthemisfit has quit [Quit: WeeChat 3.6]
cartdrige has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
Sankalp has quit [Ping timeout: 265 seconds]
Sankalp- has joined #ruby
Sankalp- is now known as Sankalp
dviola has quit [Quit: WeeChat 3.8]
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
walez has quit [Quit: Leaving]
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #ruby
moldorcoder7 has joined #ruby
Sankalp- has joined #ruby
plantman2 has joined #ruby
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp- is now known as Sankalp
plantman2 has quit [Ping timeout: 246 seconds]
razetime has joined #ruby
razetime has quit [Read error: Connection reset by peer]
razetime has joined #ruby
<tsujp> Is there a way to pass an argument using the pretzel colon syntax? Given `foo = ['a', 'b', 'c']` I can do this `foo.send(:slice, 1)` which returns `'b'` but I cannot do `foo.select(&:slice, 0)`
hightower2 has quit [Ping timeout: 260 seconds]
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
<wnd> not what you asked, but perhaps you'd like to try select { _1.slice(0) } instead
caedmon has joined #ruby
crankharder has joined #ruby
otisolsen70 has quit [Quit: Leaving]
<tsujp> What is _ there?
<tsujp> The underscore
hightower2 has joined #ruby
<sam113101> tsujp: _1 is first argument, _2 is second, etc.
<tsujp> `t.add_column('D. Channel Id') { _1[2] }` it worked, wow that's really obtuse looking
<tsujp> beforehand: `t.add_column('D. Handle') { |c| c[2] }`
<wnd> tbh I don't like the asthetics of it either
<tsujp> This is mostly a yak-shave, I (not an expert Rubyist) cannot see a way to keep the pretzel colon syntax, it's gotta be either a full block or obtuse underscore syntax
<tsujp> `add_column` is from this gem, links directly to the docs method: https://www.rubydoc.info/github/matt-harvey/tabulo/master/Tabulo%2FTable:add_column
<tsujp> the `extractor` parameter there
<adam12> IMHO, I'd use the full block. It helps to give useful names to things, and the block argument is one of them.
<adam12> I do like the shorthand _1 but only in some situations.
<caleb> I agree with adam12
<tsujp> For sure going to use a full block
<tsujp> I can see myself coming back to this some time and going "wat"
<tsujp> Feast your eyes (short paste) adam12 caleb https://gist.github.com/tsujp/3a5273323f57c0c5671c458d5bdebd3b
caedmon has quit [Remote host closed the connection]
<adam12> I'd maybe go one step further and call it `col` or even `column`.
<adam12> Likely column because I don't care for abbreviations in code.
caedmon has joined #ruby
<tsujp> Reasonable, clarity > conciseness for your future self and others
<tsujp> For now I shall sleep though, gazing at the time I see it's 2:20 AM... "whoops" ;)
<tsujp> thanks ruby friends, and good night!
hightower2 has quit [Quit: Leaving]
eron has joined #ruby
razetime has quit [Ping timeout: 248 seconds]
otisolsen70 has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
dviola has joined #ruby
lagash_ has quit [Quit: ZNC - https://znc.in]
lagash has joined #ruby
jidar has quit [Remote host closed the connection]
ultralan has joined #ruby
ultralan has quit [Remote host closed the connection]
ultralan has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
lagash_ has joined #ruby
gr33n7007h has quit [Quit: WeeChat 3.8]
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
gr33n7007h has joined #ruby
eron has quit [Quit: Client closed]
eron has joined #ruby
cybniv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has joined #ruby
dviola has quit [Quit: WeeChat 3.7.1]
dionysus69 has quit [Ping timeout: 248 seconds]
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
leonthemisfit has joined #ruby
stirl has joined #ruby
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
eron has quit [Quit: Client closed]
stirl has quit [Remote host closed the connection]
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 265 seconds]
splud has quit [Ping timeout: 272 seconds]
Linux_Kerio has joined #ruby
Laplace has joined #ruby
caedmon has quit [Quit: caedmon]
Vonter has quit [Ping timeout: 268 seconds]
<adam12> Exception ArgumentError -> "ge><Requ" is not an octal string
<adam12> ... I wonder what that could be.
mooff has quit [Read error: Connection reset by peer]
mooff has joined #ruby
caedmon has joined #ruby
ultralan has quit [Remote host closed the connection]
<ox1eef_> What's the context
<adam12> ox1eef_: Fetching .gem from rubygems.org and then unpacking.
<ox1eef_> Yikes o_O
<adam12> It kidn of looks like <Range><Request> or something.
<adam12> I need to add some debugging so I can figure it out. It's peculiar tho.
<ox1eef_> Indeed. Maybe try tar directly, and/or verify what type of file it is with 'file'. I think rubygems.org also has checksums on the gem page, it might be corrupted.
caedmon has quit [Quit: caedmon]
_ht has quit [Quit: _ht]
ur5us has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
dviola has joined #ruby
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 268 seconds]
Y05hito__ has quit [Ping timeout: 260 seconds]
ur5us has quit [Quit: Leaving]
cartdrige has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
agent_white has quit [Ping timeout: 265 seconds]
Sankalp has quit [Ping timeout: 260 seconds]
desnudopenguino1 has joined #ruby
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
desnudopenguino has quit [Ping timeout: 255 seconds]
desnudopenguino1 is now known as desnudopenguino
Laplace has quit [Quit: Connection closed for inactivity]
crankharder has quit [Ping timeout: 272 seconds]
tomtmym has quit [Quit: Gone.]
otisolsen70 has quit [Quit: Leaving]
reset has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
markong has joined #ruby
Sankalp has joined #ruby
Sankalp has quit [Ping timeout: 260 seconds]
stirl has joined #ruby
splud has joined #ruby
Sankalp has joined #ruby
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp- is now known as Sankalp
crankharder has joined #ruby
Sankalp has quit [Ping timeout: 272 seconds]
crankharder has quit [Ping timeout: 272 seconds]
white_magic has joined #ruby
Sankalp has joined #ruby
white_magic has quit [Quit: Client closed]