havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: 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!
cisco has quit [Ping timeout: 240 seconds]
hhzza has quit [Quit: Connection closed for inactivity]
dviola has quit [Quit: WeeChat 2.8]
dviola has joined #ruby
cisco has joined #ruby
roadie has joined #ruby
jetchisel has quit [Ping timeout: 265 seconds]
vdl has quit [Ping timeout: 264 seconds]
Technodrome has joined #ruby
^amra has joined #ruby
roadie has quit [Ping timeout: 264 seconds]
jetchisel has joined #ruby
TCZ has joined #ruby
chalkmonster has joined #ruby
xco has quit [Quit: Textual IRC Client: www.textualapp.com]
akem has quit [Read error: Connection reset by peer]
^amra has quit [Quit: ^amra]
code_zombie has quit [Quit: Leaving]
galaxie has quit [Ping timeout: 240 seconds]
galaxie has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
ur5us has quit [Ping timeout: 260 seconds]
TCZ has quit [Quit: Leaving]
ur5us has joined #ruby
sergioro has quit [Quit: leaving]
sergioro has joined #ruby
d3bug has quit [Quit: Connection closed for inactivity]
gix has quit [Ping timeout: 240 seconds]
cthulchu_ has quit [Ping timeout: 250 seconds]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
cisco has quit [Ping timeout: 240 seconds]
cisco has joined #ruby
roadie has joined #ruby
Esa__ has quit []
roadie has quit [Ping timeout: 258 seconds]
tpanarch1st has quit [Ping timeout: 258 seconds]
dhollinger has quit [Ping timeout: 265 seconds]
dhollinger has joined #ruby
roadie has joined #ruby
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zapata has quit [Ping timeout: 265 seconds]
roadie has quit [Ping timeout: 260 seconds]
zapata has joined #ruby
gitter1234 has quit [Quit: Connection closed for inactivity]
cnsvc has quit [Remote host closed the connection]
cnsvc has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
d3bug has joined #ruby
cnsvc has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
ChmEarl has quit [Quit: Leaving]
MrCrackPot has joined #ruby
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
MrCrackPot has quit [Quit: Leaving]
zacts has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
cnsvc_ has quit [Quit: WeeChat 2.8]
cnsvc has joined #ruby
Technodrome has quit [Ping timeout: 265 seconds]
roadie has joined #ruby
miskatonic has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
extrowerk has quit [Ping timeout: 268 seconds]
roadie has joined #ruby
ledhed2222 has joined #ruby
<ledhed2222> hodwy i’ve written my rifst gem!
<ledhed2222> *first gem
<havenwood> ledhed2222: cograts!
extrowerk has joined #ruby
<ledhed2222> but i’m having trouble getting my yard docs onto rubygems.org. how do i do so?
<ledhed2222> thanks havenwood! it was a milestone :)
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<havenwood> ledhed2222: I'd expect yard docs to *just work*. What's your gem name?
<ledhed2222> xpring
<ledhed2222> check the source if you want - it definitely has ri and yard docs correctly set up AFAICT
anohigisavay has joined #ruby
<ledhed2222> if you have any ideas i’d love to hear ‘em!
<anohigisavay> hi! i am not a serious ruby learner, but i do want to know if it is possible to access the instance variable from a method argument, given that the argument is of the same type as 'self'
<phaul> anohigisavay: protected methods can be called with receivers same type as self
<ledhed2222> @anohigsavay can you give an example please? i think i can help you
<ledhed2222> but also still would love help on my gem docs :)
<anohigisavay> phaul: yes that is the approach taken in the course.
zacts has quit [Quit: WeeChat 2.8]
<anohigisavay> for example, i have a Rational class, and i want to define a '+' method which takes 'other' as an argument
<phaul> ledhed2222: I published the yard docs on https://rubydoc.info/ and rubygems just links there
<ledhed2222> but why doesn’t ruby-gems show a link to the RI docs?
<phaul> ledhed2222: idk
<ledhed2222> lol
<ledhed2222> me neither
<ledhed2222> ok at least i’m not the only one
<phaul> have you seen a project with yard docs, that has the docs on rubygems.org?
vondruch has quit [Ping timeout: 256 seconds]
<havenwood> yard is an example https://rubygems.org/gems/yard
<phaul> no that still links to rubydoc.info
<havenwood> I swear rubygems.org normally just automatically links to documentation. Unsure what triggers it.
<havenwood> phaul: ah, I misunderstood what you were saying
<phaul> ledhed2222: just register the project on rubydoc.info, and maybe rubygems.org links aoutomatically or you set up the link manually I can't remember.
<havenwood> I think it's automatic. At least I've seen it appear without remembering having done anything.
vondruch has joined #ruby
hhzza has joined #ruby
<phaul> yeah me neither
<phaul> I meanI can't remember having done anything either
<ledhed2222> so…fuck
<ledhed2222> why do i do about thi docs?
<phaul> ledhed2222: I said what to do. go to dubydoc.info, set up you project there. The link will be on rubygems
<phaul> rubydoc.info*
<s2013> i have a YAML file that i need to grab the keys and the value for
<s2013> i have it so i can grab the final key and the value
<s2013> but how can i grab the preceding keys
<s2013> cause its nested
<havenwood> s2013: I don't get why you can't just deserialize the YAML with Psych and use the nested keys and values however you'd like? Show the code you have?
<s2013> is psych a gem?
<havenwood> s2013: It's a gem in the Ruby stdlib: https://stdgems.org/psych/
<s2013> okay let me check it
<s2013> one sec
<havenwood> &>> require 'psych'; Psych.safe_load "---\n:nested:\n :aim: true\n", permitted_classes: [Symbol]
<rubydoc> # => {:nested=>{:aim=>true}} (https://carc.in/#/r/8uwc)
<s2013> okay havenwood let me explain what i am trying to do. ill share code in a sec
<s2013> i basically have bunch of translation files like en.yml fr.yml etc
<s2013> i want to generate a spreadsheet of all the translations to compare
<s2013> currently i have it working except the key is just the final key not the nested key.. ex: 'post.comments.text' instead it would be just 'text'
<s2013> hope that makes sense
<havenwood> s2013: I don't follow. Maybe someone else does. Share the code?
<havenwood> I get you have YAML files. After that, I don't understand what the problem is.
<s2013> k hold on
<s2013> nevermind i got it. thanks!
<phaul> :)
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<s2013> well actaully kinda working .. still better than before but not quite there.. :\
s2013 has quit [Quit: Textual IRC Client: www.textualapp.com]
conta has joined #ruby
conta has quit [Client Quit]
cisco has quit [Ping timeout: 256 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
qual has quit [Quit: qual]
perlsyntax has joined #ruby
perlsyntax has quit [Quit: Leaving]
golevka has quit [Read error: Connection reset by peer]
perlsyntax has joined #ruby
anohigisavay has quit [Quit: Konversation terminated!]
rmnull has joined #ruby
perlsyntax has left #ruby ["Leaving"]
rmnull has quit [Ping timeout: 260 seconds]
mark0n has quit [Quit: No Ping reply in 180 seconds.]
arcaos has quit [Ping timeout: 258 seconds]
rmnull has joined #ruby
mark0n has joined #ruby
schne1der has joined #ruby
rmnull has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
rmnull has joined #ruby
roadie has quit [Ping timeout: 264 seconds]
ldepandis has joined #ruby
gix has joined #ruby
ldepandis has quit [Read error: Connection reset by peer]
ikbenhet has joined #ruby
arcaos has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
zapata has quit [Quit: WeeChat 2.8]
djdduty has joined #ruby
djdduty has quit [Ping timeout: 264 seconds]
rmnull has quit [Ping timeout: 246 seconds]
rmnull has joined #ruby
rmnull has quit [Client Quit]
rmnull has joined #ruby
ur5us has joined #ruby
d3bug has quit [Quit: Connection closed for inactivity]
lxsameer has quit [Quit: WeeChat 2.8]
blackmesa has quit [Quit: WeeChat 2.8]
akem has joined #ruby
jetchisel has quit [Ping timeout: 250 seconds]
jetchisel has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
conta has joined #ruby
_whitelogger has joined #ruby
conta has quit [Quit: conta]
ur5us has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
cd has quit [Quit: cd]
lxsameer has joined #ruby
roadie has joined #ruby
MrCrackPot has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
chalkmonster has joined #ruby
darkstardev13 has quit [Read error: Connection reset by peer]
cisco has joined #ruby
drincruz_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
galaxie has quit [Remote host closed the connection]
galaxie has joined #ruby
cliluw has quit [Ping timeout: 265 seconds]
cliluw has joined #ruby
vondruch has quit [Ping timeout: 265 seconds]
vondruch_ has joined #ruby
vondruch_ has quit [Client Quit]
vondruch has joined #ruby
darkstardev13 has joined #ruby
sysh has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
chalkmonster has joined #ruby
TCZ has joined #ruby
darkstardev13 has quit [Read error: Connection reset by peer]
TCZ has quit [Quit: Leaving]
darkstardev13 has joined #ruby
TCZ has joined #ruby
reber has joined #ruby
tpanarch1st has joined #ruby
cisco has quit [Ping timeout: 256 seconds]
rain1 has joined #ruby
<rain1> hey
<rain1> whats the best way to use ruby on linux?
<leah2> i launch the artisan version provided by my distro in /usr/bin ;)
<rain1> do i need to know about virtual environments or something
<rain1> how do i stop is bricking my OS
<leah2> if the provided version is ok for you, just use it
<havenwood> rain1: You should be able to have as many Rubies installed as you like. What distro?
<rain1> debian
<leah2> you can install other versions with rvm for example
<rain1> i dont know what version or setup is best
<havenwood> rain1: Development machine?
<rain1> yeah
<TCZ> &>> [5,12,23].inject { |acc, n| n - acc }
<rubydoc> # => 16 (https://carc.in/#/r/8v0i)
<leah2> depends on what you wanna do
<leah2> for a few scripts it doesnt matter
<havenwood> rain1: I'd suggest installing Ruby 2.7.1 with ruby-install and then use chruby to switch Rubies when that inevitably comes up.
<havenwood> rain1: RVM or ruby-build+rbenv are other popular options.
<rain1> thanks ill read up on ruby-install
<havenwood> rain1: Pardon the "Ubuntu" but this guide covers ruby-install well: https://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
conta has joined #ruby
<havenwood> rain1: Ruby 2.7.1 or Ruby 2.6.6 are modern, stable versions.
<havenwood> rain1: I'd suggest going straight to latest stable, 2.7.1.
<rain1> ok, will do. cheers!
<leah2> debian unstable has 2.7 btw
<phaul> /script
<phaul> sorry..
cisco has joined #ruby
<havenwood> &>> [5, 12, 23].reduce { _2 - _1 } # TCZ
<rubydoc> # => 16 (https://carc.in/#/r/8v0j)
conta has quit [Client Quit]
<havenwood> I do like the sound of "inject" and "subroutine", but use #reduce since map/reduce/filter won over collect/inject/select.
<TCZ> &>> [5, 12, 23].reduce { _1 - _2 }
<rubydoc> # => -30 (https://carc.in/#/r/8v0k)
<havenwood> Also, great to have #filter these days! :)
<TCZ> &>> [5, 12, 23].inject { _1 - _2 }
<rubydoc> # => -30 (https://carc.in/#/r/8v0l)
<havenwood> &>> [5, 12, 23].sum { -_1 } #TCZ
<rubydoc> # => -40 (https://carc.in/#/r/8v0m)
<havenwood> Oh, right - subtraction in order.
<havenwood> TCZ: Whatcha doing with these maths?
<havenwood> &>> [5, 12, 23].reduce(&:-) # TCZ
<rubydoc> # => -30 (https://carc.in/#/r/8v0n)
ritalinona has quit [Remote host closed the connection]
iNs has quit [Remote host closed the connection]
galaxie has quit [Write error: Broken pipe]
rain1 has left #ruby [#ruby]
shalok has quit [Ping timeout: 264 seconds]
shalok has joined #ruby
<TCZ> testing heh
iNs has joined #ruby
<TCZ> &>> [5,12,23].inject { |acc, n| [acc] + [n] }
<rubydoc> # => [[5, 12], 23] (https://carc.in/#/r/8v0o)
<TCZ> &>> [5,12,23].inject { |acc, n| [n] + [acc] }
<rubydoc> # => [23, [12, 5]] (https://carc.in/#/r/8v0p)
galaxie has joined #ruby
<TCZ> &>> [5,12,23,33,45].inject { |acc, n| [acc] + [n] }
<rubydoc> # => [[[[5, 12], 23], 33], 45] (https://carc.in/#/r/8v0q)
<TCZ> &>> [5,12,23,33,45].inject { |acc, n| [n] + [acc] }
<rubydoc> # => [45, [33, [23, [12, 5]]]] (https://carc.in/#/r/8v0r)
<TCZ> ok enough ;p
reber has quit [Read error: Connection reset by peer]
ritalinona has joined #ruby
GodFather has joined #ruby
drincruz_ is now known as drincruz
sphex has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
sphex has joined #ruby
ChmEarl has joined #ruby
fercell has joined #ruby
Emmanuel_Chanel has joined #ruby
TCZ has quit [Quit: Leaving]
chalkmonster has quit [Quit: WeeChat 2.8]
Hien has quit [Ping timeout: 272 seconds]
Hien has joined #ruby
brool has joined #ruby
hhzza has quit [Quit: Connection closed for inactivity]
miskatonic has joined #ruby
zacts has joined #ruby
zapata has joined #ruby
Xiti has quit [Quit: Leaving]
Xiti has joined #ruby
vdl has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
MadLamb has joined #ruby
<MadLamb> I have a rails haml template with a "unless signed_in?" condition. I get an error "undefined method `signed_in?' for #<#<Class:0x007ff7386c8090>:0x007ff739f8a290>". I tried to define a method with that name but no matter what, I keep getting the same error. Can anyone give me a hint of what might be wrong?
<brool> where is the signed_in helper defined?
<havenwood> brool: From the command line, try: ri signed_in?
<havenwood> brool: I mean: ri signed_in
<havenwood> Or the latter
<havenwood> You said it both ways, I guess
<brool> whoah
<havenwood> brool: :)
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
<havenwood> brool: Or if you binding.pry or binding.irb, you can: method(:signed_in?).source_location
roadie has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
cliluw has quit [Max SendQ exceeded]
cliluw has joined #ruby
rippa has joined #ruby
sergioro has joined #ruby
cliluw has quit [Ping timeout: 256 seconds]
<MadLamb> havenwood, its fair to expect the method is not defined
<MadLamb> brool, I tried defining in the controller that renders that view and in the application controller
<brool> MadLamb: try defining it in app/helpers/[controller-name]_helper.rb
<MadLamb> brool, works
<MadLamb> thanks :D
<brool> yeet
<MadLamb> didnt know the helper thing
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
dinfuehr has quit [Ping timeout: 256 seconds]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
dinfuehr has joined #ruby
ellcs has joined #ruby
dinfuehr has quit [Ping timeout: 264 seconds]
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
xco has joined #ruby
howdoi has joined #ruby
dinfuehr has joined #ruby
rmnull has quit [Ping timeout: 265 seconds]
ikbenhet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rmnull has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
d3bug has joined #ruby
cthulchu_ has joined #ruby
dinfuehr has quit [Ping timeout: 264 seconds]
rmnull has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
zacts has quit [Quit: WeeChat 2.8]
rmnull has joined #ruby
roadie has joined #ruby
conta has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
SeepingN has joined #ruby
dinfuehr has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dinfuehr has quit [Ping timeout: 260 seconds]
dinfuehr has joined #ruby
SeepingN has joined #ruby
conta has quit [Quit: conta]
cisco has quit [Ping timeout: 260 seconds]
fercell has quit [Quit: WeeChat 2.7.1]
kristian_on_linu has joined #ruby
wimpog has joined #ruby
<wimpog> Hi. How do I upgrade from bundler v1.17.3 to v2.1.4? What do I have to do prior to the upgrade? Is there a reason not to to upgrade to v2.1.4?
<wimpog> I am on Ruby 2.6.3, Rails 6.0.22
Rudd0 has quit [Read error: Connection reset by peer]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sauvin has quit [Read error: Connection reset by peer]
MadLamb has quit [Remote host closed the connection]
Rudd0 has joined #ruby
vlouvet has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
ikbenhet has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
ikbenhet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
impermanence has joined #ruby
wimpog has quit [Quit: wimpog]
reber has joined #ruby
zacts has joined #ruby
chalkmonster has joined #ruby
xco has joined #ruby
ikbenhet has joined #ruby
apotheon is now known as chaper
chaper is now known as gruet
gruet is now known as grue_t
grue_t is now known as grue`t
grue`t is now known as IAmGrue`t
chamunks has quit [Quit: Don't worry I'm not gone yet.]
IAmGrue`t is now known as ElderMalaclypse
ikbenhet has quit [Client Quit]
ElderMalaclypse is now known as DuckDuckGrue
DuckDuckGrue is now known as heresy
heresy is now known as LaoMalaclypse
LaoMalaclypse is now known as cyberfunk
cyberfunk is now known as rN|
ikbenhet has joined #ruby
rN| is now known as intangible
intangible is now known as apotheos
LenPayne_ has quit [Quit: ZNC 1.7.5 - https://znc.in]
apotheos is now known as apotheon
cek has joined #ruby
ikbenhet has quit [Client Quit]
<apotheon> excuse me
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
al2o3-cr is now known as eyeofhorus
TCZ has joined #ruby
SeepingN has quit [Ping timeout: 260 seconds]
reber has quit [Ping timeout: 240 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
cd has joined #ruby
xco has joined #ruby
gix has quit [Disconnected by services]
DarthGandalf is now known as Some-body
Some-body is now known as DarthGandalf
conta has joined #ruby
conta has quit [Client Quit]
arcaos has quit [Remote host closed the connection]
sysh has quit [Remote host closed the connection]
zacts has quit [Quit: WeeChat 2.8]
nullus has quit [Quit: leaving]
roadie has quit [Ping timeout: 258 seconds]
reber has quit [Read error: Connection reset by peer]
roadie has joined #ruby
Esa__ has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
sh7d has quit [Ping timeout: 258 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
LenPayne has joined #ruby
sh7d has joined #ruby
jinie has joined #ruby
sh7d has quit [Read error: Connection reset by peer]
sh7d has joined #ruby
ur5us has joined #ruby
TCZ has quit [Quit: Leaving]
chalkmonster has quit [Quit: WeeChat 2.8]
eyeofhorus is now known as al2o3-cr
<al2o3-cr> &>> Thread.new { $><< " people!\n" }.tap { $><< "stay " }.tap { $><< "safe" }
<rubydoc> stderr: playpen: application terminated abnormally with signal 31 (Bad system call) (https://carc.in/#/r/8v2b)
<al2o3-cr> &>> Thread.new { $><< " people!\n" }.tap { $><< "stay " }.tap { $><< "safe" }
<rubydoc> stderr: playpen: application terminated abnormally with signal 31 (Bad system call) (https://carc.in/#/r/8v2c)
<al2o3-cr> good sandbox.
brool has quit [Quit: WeeChat 2.8]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinie has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
Esa__ has quit []
troulouliou_div2 has joined #ruby
cisco has joined #ruby
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
electrostat has quit [Client Quit]
electrostat has joined #ruby
plutes has joined #ruby
plutes has quit [Max SendQ exceeded]
ur5us has quit [Ping timeout: 260 seconds]
plutes has joined #ruby
plutes has quit [Remote host closed the connection]
plutes has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schne1der has quit [Ping timeout: 260 seconds]
cisco has quit [Ping timeout: 240 seconds]
ws2k3 has quit [Ping timeout: 240 seconds]
cisco has joined #ruby
ur5us has joined #ruby
TCZ has joined #ruby
vondruch has joined #ruby
cliluw has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
xco has joined #ruby
cisco has quit [Ping timeout: 264 seconds]
TCZ has quit [Quit: Leaving]
rmnull has quit [Quit: WeeChat 2.8]