jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
skuntee4 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
idiocrash has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
idiocrash has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
<sam113101> is it possible to create an array that returns nil when negative indexes are used?
grokify has quit [Remote host closed the connection]
Rounin has quit [Ping timeout: 265 seconds]
<aestheti1> likely yes,
grokify has joined #ruby
<aestheti1> yeah I just did it sam113101
<aestheti1> just reopen Array class Array
<aestheti1> and then override [] def [](index)
<aestheti1> and then index.negative? ? nil : super(index)
<aestheti1> and then thats it really
<aestheti1> ymmv
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
nirvdrum has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
<sam113101> now what about this
<sam113101> I want my_array[index, 999] to return nils if it reaches the end
moldorcoder7 has quit [Ping timeout: 268 seconds]
grokify has quit [Remote host closed the connection]
<havenwood> sam113101: You should be cautious monkeypatching core classes like Array. You'll have cascading breakage. Consider a refinement, where the change is local to your file and limited. Here's an example that prevents negatives for #[] and #fetch. https://gist.github.com/havenwood/bee780f8db0a221cf5aace64a0178e6d
grokify has joined #ruby
reset has quit [Quit: reset]
grokify has quit [Remote host closed the connection]
bastelfreak has quit [Ping timeout: 600 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
TiglatePileser has joined #ruby
ur5us has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 252 seconds]
TiglatePileser has quit [Quit: Leaving]
nirvdrum has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
Sankalp has quit [Ping timeout: 268 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
eddof13 has joined #ruby
polishdub has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sankalp has joined #ruby
agent_white has quit [Remote host closed the connection]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
ur5us has joined #ruby
nirvdrum has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
_ht has joined #ruby
walez__ has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
walez__ has quit [Quit: Leaving]
grokify has quit [Ping timeout: 260 seconds]
walez__ has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
teclator has joined #ruby
CrazyEddy has quit [Ping timeout: 246 seconds]
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby
jhawthorn has quit [Quit: ZNC 1.8.2 - https://znc.in]
jhawthorn has joined #ruby
idiocrash_ has joined #ruby
idiocrash has quit [Ping timeout: 260 seconds]
thomas25 has quit [Ping timeout: 268 seconds]
bastelfreak has joined #ruby
jpn has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
moldorcoder7 has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
ur5us has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
Sankalp has quit [Ping timeout: 265 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
jetchisel has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
jetchisel has joined #ruby
jpn has quit [Ping timeout: 246 seconds]
jpn has joined #ruby
Sankalp has joined #ruby
jpn has quit [Ping timeout: 250 seconds]
skuntee4 has joined #ruby
skuntee4 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
dionysus69 has joined #ruby
jpn has joined #ruby
otisolsen70 has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
zoknert has joined #ruby
walez__ has quit [Quit: Leaving]
zoknert has quit [Ping timeout: 268 seconds]
jpn has quit [Ping timeout: 252 seconds]
thomas25 has joined #ruby
mikecmpbll has joined #ruby
jpn has joined #ruby
nyuszika7h is now known as nyuszika7h|znc
jpn has quit [Ping timeout: 268 seconds]
nyuszika7h has joined #ruby
nyuszika7h|znc has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
nyuszika7h has quit [Client Quit]
nyuszika7h has joined #ruby
jpn has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
eddof13 has joined #ruby
c10l8 has joined #ruby
c10l has quit [Read error: Connection reset by peer]
c10l8 is now known as c10l
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c10l has quit [Quit: See ya! o/]
c10l has joined #ruby
grokify has quit [Remote host closed the connection]
yxhuvud has quit [Read error: Connection reset by peer]
eddof13 has joined #ruby
yxhuvud has joined #ruby
grokify has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grokify has quit [Remote host closed the connection]
<leftylink> hmm, I want to write something weird but valid. obviously the weird part is easy enough to achieve, but validity is harder. syntactically valid sure, but it errors at runtime
<leftylink> pandabot: rb 1........1
<pandabot> stderr: playpen: timeout triggered! - exit 1 - https://carc.in/#/r/dv6h
<leftylink> pandabot: rb 1........1
<pandabot> stderr: -e:2:in `<main>': bad value for range (ArgumentError) - exit 1 - https://carc.in/#/r/dv6i
<leftylink> so I dunno. I could just say if false to make it not error, but that just seems like too much of a copy-out
<leftylink> pandabot: rb 1........1 if false
<pandabot> nil - https://carc.in/#/r/dv6j
<leftylink> oh here we go!
<leftylink> pandabot: rb nil...............nil
<pandabot> ............nil...nil - https://carc.in/#/r/dv6l
<leftylink> pandabot: rb nil........................nil
<pandabot> .....................nil...nil - https://carc.in/#/r/dv6o
<leftylink> it's not a very flexible construct though
<leftylink> since you're limited in what you can put at the ends
<aestheti1> leftylink do you have a blog, i would be interested to see you collect weird syntaxes
<leftylink> pandabot: rb 1........................nil
<aestheti1> i am interested myself
<pandabot> stderr: -e:2:in `<main>': bad value for range (ArgumentError) - exit 1 - https://carc.in/#/r/dv6r
<leftylink> pandabot: rb nil........................1
<pandabot> ........................1 - https://carc.in/#/r/dv6s
<leftylink> yeah maybe I should think about making one huh...
grokify has joined #ruby
<leftylink> ah it is not even necessary to put the nil at the front. just leave it off
<leftylink> pandabot: rb ........................1
<pandabot> ........................1 - https://carc.in/#/r/dv6u
<leftylink> so this is obviously a syntax you use when Ruby has left you so staggeringly speechless such that you have no response but to say that
<aestheti1> leftylink I think you should make one
grokify has quit [Remote host closed the connection]
<aestheti1> I have some of my own laying around somewhere, i need to collect them
<aestheti1> there was somethign wehere you could use :::
<aestheti1> pandabot: rb self::puts:hello
<aestheti1> I think thats kind of fun
eddof13 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 260 seconds]
desnudopenguino1 is now known as desnudopenguino
Starfoxxes has quit [Ping timeout: 265 seconds]
eddof13 has joined #ruby
goldfish has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
Starfoxxes has joined #ruby
<sam113101> how can you break out of deeply nested loops?
nmollerup has joined #ruby
<adam12> sam113101: catch/throw is one option.
Laplace has quit [Quit: Connection closed for inactivity]
skuntee4 has joined #ruby
skuntee4 has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 248 seconds]
skuntee4 has joined #ruby
scuntee5 has joined #ruby
<leftylink> I usually use return to do it
skuntee4 has quit [Ping timeout: 260 seconds]
scuntee5 has quit [Ping timeout: 265 seconds]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
reset has joined #ruby
grokify has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
grokify has quit [Remote host closed the connection]
skuntee4 has joined #ruby
skuntee4 has quit [Ping timeout: 250 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grokify has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
grokify has quit [Ping timeout: 265 seconds]
___nick___ has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
grokify has joined #ruby
jpn has quit [Ping timeout: 265 seconds]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
joto has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
<sam113101> wow, we got endless defs now
<sam113101> >> def say_hello = puts 'hello'
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
nullheroes has joined #ruby
Guimauve has joined #ruby
jpn has quit [Ping timeout: 246 seconds]
eddof13 has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
Guimauve has quit [Quit: Client closed]
zoknert has joined #ruby
grokify has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
nirvdrum has joined #ruby
Guimauve has joined #ruby
idiocrash_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpn has joined #ruby
zoknert has quit [Ping timeout: 260 seconds]
grokify has quit [Remote host closed the connection]
<leftylink> okay so that should save what 2-3 characters per function, so it could be all right for golf
<leftylink> well hmm I'm not sure. using ->{} still saves 1 character over an endless def it seems
<leftylink> so probably not useful for golf
grokify has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
idiocrash has joined #ruby
grokify has quit [Remote host closed the connection]
idiocrash has quit [Ping timeout: 265 seconds]
zoknert has joined #ruby
supay has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
grokify has joined #ruby
idiocrash has joined #ruby
jpn has joined #ruby
grokify has quit [Ping timeout: 250 seconds]
BH23 has joined #ruby
BH23 has quit [Remote host closed the connection]
zoknert has quit [Ping timeout: 250 seconds]
nullheroes has quit [Quit: WeeChat 3.6]
jpn has quit [Ping timeout: 265 seconds]
supay has quit [Changing host]
supay has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 265 seconds]
smp has quit [Quit: ZNC 1.8.2 - https://znc.in]
smp has joined #ruby
smp has quit [Client Quit]
walez__ has joined #ruby
smp has joined #ruby
smp has quit [Client Quit]
zoknert has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
smp has joined #ruby
grokify has joined #ruby
zoknert has quit [Ping timeout: 250 seconds]
jpn has joined #ruby
zoknert has joined #ruby
zoknert has quit [Ping timeout: 252 seconds]
jpn has quit [Ping timeout: 250 seconds]
entropie has quit [Ping timeout: 250 seconds]
entropie has joined #ruby
jpn has joined #ruby
grokify has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 252 seconds]
grokify has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
nabblet has joined #ruby
___nick___ has quit [Ping timeout: 265 seconds]
_ht has quit [Remote host closed the connection]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
jpn has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
jpn has quit [Ping timeout: 268 seconds]
swaggboi has quit [Quit: C-x C-c]
Vonter has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
otisolsen70 has quit [Quit: Leaving]
swaggboi has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
grokify has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
Vonter has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
<nabblet> "bundle install --deployment --local" -> "Could not find nokogiri-1.13.8-x86_64-linux in cached gems or installed locally" I don't know Ruby but am familiar with the concept of packages (from python). What step/command would you recommend?
<Guimauve> nabblet - the --local option will force using only locally vendored gems
<Guimauve> nabblet - which you don't have for nokogiri 1.13.8
ur5us has quit [Ping timeout: 248 seconds]
<Guimauve> nabblet - just take out that option and it'll download the gem from rubygems.org to build
<Guimauve> nabblet - or, switch to --prefer-local instead of --local which will use a vendored gem if found, and download if not
<nabblet> Guimauve: thank you for your help & input. using --prefer-local or omitting --local -> same result
<nabblet> I get a warning about --deplyoment being deprecated
<Guimauve> i don't know a damn thing about the --deployment option unfortunately. looks like the docs say it shoves things into ./vendor
<nabblet> I have a Gemfile.lock that seems to pin nokogiri to 1.13.8
<nabblet> Please feel free to ask my any questions about that setup. It's some ruby code/set that I just need to get running - I may miss very obvious things, because I am not familiar
jpn has joined #ruby
<Guimauve> nabblet - try taking out that option as well. it looks like it changed to be a setting, and the setting just enforces a gemfile.lock and no changes to the gemfile... this is stuff i don't think you care about.
<Guimauve> nabblet - what are you trying to get running btw?
<Guimauve> i'm eating peanut butter with a fork, so don't take anything i say too seriously
<nabblet> Guimauve: some custom XML transformer
<nabblet> Guimauve: enjoy! :)
<Guimauve> XML is like violence. every problem can be solved by using more. =[
nullheroes has joined #ruby
<nabblet> I tried to add gem 'nokogiri', '~> 1.13', '>= 1.13.8' to the Gemfile but I get a warning about not modifying the Gemfile when being in deployment mode
<Guimauve> yeah, it won't let you. you can try turning off deployment mode: bundle config unset --local deployment
<nabblet> did that. Now "bundle install --local" seems to be pulling gems
<nabblet> -> that's an improvement
<Guimauve> nabblet - also, just to make sure, if there's a binary in there you want to run, you should run it with bundle exec and not directly if you want that binary to have access to the bundled gems
<nabblet> Guimauve: thanks for the heads up. I am seeing "bundle exec" in that README.txt I am following
<Guimauve> ok cool
<nabblet> progress! But now I am stuck at some cmake issue (via rake gem?)... well I think I will leave it at that for now
jpn has quit [Ping timeout: 268 seconds]
<Guimauve> cmake? 0.o
<nabblet> Guimauve: Thank you very much for your time, attention & support! I helped me to move forward
<Guimauve> good luck
<nabblet> Guimauve: heh, yea I could use some of that ;)
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
RougeR has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
<nabblet> Guimauve: seems to be this gem that's causing trouble https://rubygems.org/gems/opcua
<Guimauve> i'm getting a headache just from looking at their readme
<Guimauve> ...yeah, you have some pre-reqs to install for that it looks like
<Guimauve> heh
<nabblet> it even starts to build... but then stops because it's not happy about a cmake argument
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Guimauve> if you're on ubuntu, they mention a ppa for installing it already built https://github.com/etm/opcua-smart
<nabblet> thanks, will give it a shot tomorrow
<nabblet> enough for today :)
<nabblet> Guimauve: thank you again for your advice - I appreciate it
<Guimauve> np
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Ping timeout: 246 seconds]
eddof13 has joined #ruby
nabblet has quit [Quit: leaving]
eddof13 has quit [Client Quit]
eddof13 has joined #ruby
ur5us has joined #ruby
grokify has joined #ruby
walez__ has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
jpn has joined #ruby
grokify has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
skuntee4 has joined #ruby
skuntee4 has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
grokify has joined #ruby
jpn has joined #ruby
RougeR has quit [Quit: Leaving]
supay has quit [Quit: Connection closed for inactivity]
grokify has quit [Ping timeout: 264 seconds]
jpn has quit [Ping timeout: 268 seconds]
smp has quit [Quit: ZNC 1.8.2 - https://znc.in]
jpn has joined #ruby
smp has joined #ruby
mikecmpbll has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
jpn has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
grokify has joined #ruby