havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: 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!
citizentwo has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
mokha has joined #ruby
davidw has quit [Ping timeout: 240 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has joined #ruby
duderonomy has joined #ruby
wildtrees has quit [Remote host closed the connection]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
wildtrees has joined #ruby
splittingred has joined #ruby
splittingred has quit [Client Quit]
TCZ has joined #ruby
drincruz_ has joined #ruby
TorpedoSkyline has joined #ruby
davidw has joined #ruby
spiette has quit [Quit: ZNC 1.7.5 - https://znc.in]
spiette has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldepandis has joined #ruby
_whitelogger has joined #ruby
TCZ has quit [Ping timeout: 240 seconds]
TCZ2 has joined #ruby
sergioro has joined #ruby
pwnd_nsfw` has joined #ruby
Xiti` has joined #ruby
Keltia_ has joined #ruby
nixy371 has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
fmccann_ has joined #ruby
Milos_ has joined #ruby
shansen_ has joined #ruby
spiette_ has joined #ruby
Ai9zO5AP has quit [Ping timeout: 268 seconds]
NODE has quit [Remote host closed the connection]
cow[moo] has joined #ruby
NODE has joined #ruby
mkroman_ has joined #ruby
badeball has joined #ruby
nibbo_ has joined #ruby
TvL2386_ has joined #ruby
NightMonkey_ has joined #ruby
ccooke_ has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
pwnd_nsfw has quit [Read error: Connection reset by peer]
cliluw has quit [Read error: Connection reset by peer]
Axy has quit [Read error: Connection reset by peer]
Keltia has quit [Read error: Connection reset by peer]
lmns has quit [Quit: Ping timeout (120 seconds)]
nixy37 has quit [Quit: Ping timeout (120 seconds)]
fmccann has quit [Quit: ZNC 1.7.1 - https://znc.in]
Milos has quit [Remote host closed the connection]
shansen has quit [Quit: ZNC 1.7.4+deb0+bionic0 - https://znc.in]
spiette has quit [Quit: ZNC 1.7.5 - https://znc.in]
NightMonkey has quit [Quit: ZNC - http://znc.in]
canton7 has quit [Remote host closed the connection]
spectra has quit [Ping timeout: 272 seconds]
segy has quit [Read error: Connection reset by peer]
badaircloger has quit [Ping timeout: 272 seconds]
ccooke has quit [Ping timeout: 272 seconds]
mkroman has quit [Ping timeout: 272 seconds]
dostoyevsky has quit [Ping timeout: 272 seconds]
badeball_ has quit [Ping timeout: 272 seconds]
TvL2386 has quit [Ping timeout: 272 seconds]
dostoyevsky has joined #ruby
nibbo has quit [Remote host closed the connection]
leah2 has quit [Ping timeout: 272 seconds]
ged has quit [Ping timeout: 272 seconds]
dostoyevsky has quit [Changing host]
dostoyevsky has joined #ruby
mkroman_ is now known as mkroman
cliluw has joined #ruby
segy has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
leah2 has joined #ruby
dostoyevsky has quit [Client Quit]
bvdw has joined #ruby
ged has joined #ruby
dostoyevsky has joined #ruby
ldepandis has quit [Ping timeout: 240 seconds]
lightstalker has quit [Ping timeout: 262 seconds]
iamdevnul has quit [Ping timeout: 262 seconds]
Ai9zO5AP has joined #ruby
iamdevnul has joined #ruby
spectra has joined #ruby
lightstalker has joined #ruby
badaircloger has joined #ruby
olddogbarks has quit [Quit: ZZZzzz…]
cd has quit [Quit: cd]
canton7 has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz_ has quit [Ping timeout: 265 seconds]
davidw has quit [Ping timeout: 268 seconds]
cc_ has joined #ruby
cc__ has quit [Ping timeout: 240 seconds]
howdoi has joined #ruby
olddogbarks has joined #ruby
olddogbarks has quit [Client Quit]
olddogbarks has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
DaRock has joined #ruby
cc__ has joined #ruby
cc_ has quit [Ping timeout: 265 seconds]
Milos_ is now known as Milos
orbyt_ has joined #ruby
r3m has quit [Quit: WeeChat 2.8-dev]
r3m has joined #ruby
wildtrees has quit [Quit: Leaving]
troulouliou_dev has quit [Quit: Leaving]
lineus has joined #ruby
duderonomy has joined #ruby
TCZ2 has quit [Quit: Bye Bye]
cc__ has quit [Remote host closed the connection]
markopasha has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
john2496 has joined #ruby
markopasha has quit [Ping timeout: 265 seconds]
houhoulis has joined #ruby
DaRock has quit [Ping timeout: 240 seconds]
factormystic has quit [Read error: Connection reset by peer]
dviola has quit [Quit: WeeChat 2.7]
DaRock has joined #ruby
houhoulis has quit [Ping timeout: 260 seconds]
kapil_ has joined #ruby
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
_whitelogger has joined #ruby
factormystic has joined #ruby
jenrzzz has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
_whitelogger has joined #ruby
drincruz_ has quit [Ping timeout: 265 seconds]
olddogbarks has quit [Quit: ZZZzzz…]
howdoi has quit [Quit: Connection closed for inactivity]
john2496 has quit [Remote host closed the connection]
fphilipe has joined #ruby
fphilipe_ has quit [Ping timeout: 246 seconds]
houhoulis has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dinfuehr has quit [Ping timeout: 268 seconds]
houhoulis has quit [Remote host closed the connection]
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 272 seconds]
dinfuehr_ has joined #ruby
duderonomy has joined #ruby
dinfuehr_ has quit [Ping timeout: 272 seconds]
dinfuehr has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
dinfuehr has quit [Ping timeout: 246 seconds]
dinfuehr has joined #ruby
_whitelogger has joined #ruby
sauvin has joined #ruby
_whitelogger has joined #ruby
cd has joined #ruby
tpanarch1st has quit [Ping timeout: 255 seconds]
gix- has quit [Ping timeout: 265 seconds]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
tsrt^ has joined #ruby
sergioro has quit [Remote host closed the connection]
sergioro has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
Intelo_ has joined #ruby
coffeex3 has joined #ruby
dviola has joined #ruby
kapil_ has quit [Quit: Connection closed for inactivity]
coffeex3 has quit [Ping timeout: 265 seconds]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
Intelo_ has left #ruby ["Leaving"]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
_whitelogger has joined #ruby
shokohsc has quit [Quit: The Lounge - https://thelounge.chat]
cthulchu_ has quit [Ping timeout: 265 seconds]
shokohsc has joined #ruby
_whitelogger has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
ur5us has joined #ruby
kapil_ has joined #ruby
kashike has quit [Ping timeout: 240 seconds]
conta has joined #ruby
m_antis has joined #ruby
postmodern has quit [Quit: Leaving]
fphilipe has quit [Ping timeout: 246 seconds]
kashike has joined #ruby
fphilipe has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
m_antis is now known as m_antis[away]
m_antis[away] is now known as m_antis
chalkmonster has joined #ruby
fphilipe has quit [Ping timeout: 260 seconds]
Fernando-Basso has joined #ruby
darkstardev13 has quit [Ping timeout: 240 seconds]
darkstardevx has quit [Ping timeout: 272 seconds]
darkstardevx has joined #ruby
pinpox- is now known as pinpox
darkstardev13 has joined #ruby
dviola has quit [Quit: WeeChat 2.7]
lmns has joined #ruby
kristian_on_linu has joined #ruby
conta has quit [Quit: conta]
ellcs1 has joined #ruby
fphilipe has joined #ruby
m_antis is now known as m_antis[away]
darkstardevx has quit [Ping timeout: 240 seconds]
darkstardev13 has quit [Ping timeout: 260 seconds]
darkstardevx has joined #ruby
darkstardev13 has joined #ruby
jenrzzz has joined #ruby
royal_screwup21 has joined #ruby
ellcs1 has quit [Ping timeout: 248 seconds]
angelds has joined #ruby
TCZ has joined #ruby
royal_screwup21 has quit [Remote host closed the connection]
postmodern has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
infinityfye has joined #ruby
gix has joined #ruby
angelds has quit [Ping timeout: 268 seconds]
kristian_on_linu has quit [Remote host closed the connection]
TCZ is now known as valarray
olddogbarks has joined #ruby
fphilipe has quit [Ping timeout: 248 seconds]
fphilipe has joined #ruby
royal_screwup21 has joined #ruby
fphilipe has quit [Ping timeout: 272 seconds]
royal_screwup21 has quit [Remote host closed the connection]
leitz has joined #ruby
davispuh has joined #ruby
twodayslate has quit [Quit: Connection closed for inactivity]
valarray has quit [Quit: Bye Bye]
Rob__ has joined #ruby
SlurpyBeckerman has quit [Quit: Ping timeout (120 seconds)]
pwnd_nsfw` has quit [Read error: Connection reset by peer]
SlurpyBeckerman has joined #ruby
alexherbo2 has joined #ruby
zapata has joined #ruby
fphilipe has joined #ruby
ratah has joined #ruby
fphilipe has quit [Ping timeout: 272 seconds]
hays has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
Mrgoose845701915 has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
fphilipe has joined #ruby
conta has joined #ruby
Fernando-Basso has quit [Quit: Leaving]
fphilipe has quit [Ping timeout: 272 seconds]
conta has quit [Client Quit]
lucasb has joined #ruby
jenrzzz has joined #ruby
markopasha has joined #ruby
kapil_ has quit [Quit: Connection closed for inactivity]
markopasha has quit [Remote host closed the connection]
markopasha has joined #ruby
<leitz> This is starting to become a pain, when trying to use irb: cannot load such file -- irb/easter-egg (LoadError)
Rudd0 has quit [Ping timeout: 272 seconds]
<leitz> Two updates, two critical failures. *sigh*
alexherbo23 has joined #ruby
alexherbo2 has quit [Ping timeout: 272 seconds]
alexherbo23 is now known as alexherbo2
mniip has quit [Ping timeout: 620 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
JohanP has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
xco has joined #ruby
catphish has joined #ruby
fratis has joined #ruby
fratis has quit [Client Quit]
fratis has joined #ruby
fratis has quit [Client Quit]
fratis has joined #ruby
fratis has quit [Client Quit]
fratis has joined #ruby
fratis has quit [Client Quit]
TCZ has quit [Quit: Bye Bye]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
infinityfye has quit [Ping timeout: 260 seconds]
<leitz> Good news is that a commiter responded quickly, and things are fixed!
infinityfye has joined #ruby
olddogbarks has quit [Quit: ZZZzzz…]
itarato has joined #ruby
fphilipe has joined #ruby
kapil_ has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has joined #ruby
Azure has joined #ruby
fphilipe has quit [Ping timeout: 260 seconds]
akemhp has quit [Ping timeout: 240 seconds]
chalkmonster has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 272 seconds]
clemens3 has quit [Read error: No route to host]
infinityfye has quit [Quit: Leaving]
<leitz> If you publish a gem, do you send out the tests with it? Especially if you're using rspec, do you make rspec a development_dependency?
TCZ has joined #ruby
DaRock has quit [Ping timeout: 260 seconds]
sagax has quit [Ping timeout: 240 seconds]
olddogbarks has joined #ruby
ratah has quit []
<adam12> leitz: I've been starting to just put those in the Gemfile, then tell the Gemfile to include the gemspec, which includes non-dev deps.
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schne1der has joined #ruby
snuz has joined #ruby
suukim has joined #ruby
<leitz> adam12, thanks! I'm actually removing as many dependencies as possible for this tool. It lowers the barrier to entry, and the text file based nature means people can extend it however they want.
<leitz> adam12, of course, I ran into an Adapter issue today as well, but I think I fixed it. The Adapter you showed me how to do was for data input (text, sql), and I extended it to data output adapters. Wound up putting the adapters into different directories, since the names (text, sql) were common.
xco has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
jenrzzz has joined #ruby
Rudd0 has joined #ruby
JohanP has quit [Ping timeout: 260 seconds]
JohanP has joined #ruby
clemens3 has joined #ruby
chalkmonster has joined #ruby
mokha has quit [Remote host closed the connection]
mokha has joined #ruby
alexherbo22 has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo22 is now known as alexherbo2
clemens3 has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
royal_screwup21 has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has joined #ruby
xco has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
Emmanuel_Chanel has joined #ruby
TCZ has quit [Quit: Bye Bye]
clemens3 has joined #ruby
mniip has joined #ruby
sagax has joined #ruby
knueppelspass has joined #ruby
citizentwo has joined #ruby
tsrt^ has quit []
itarato has quit [Ping timeout: 246 seconds]
LtHummus has joined #ruby
LtHummus_ has quit [Read error: Connection reset by peer]
royal_screwup21 has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 272 seconds]
fphilipe has joined #ruby
fphilipe has quit [Ping timeout: 272 seconds]
cow[moo] has joined #ruby
ropeney_ has quit [Ping timeout: 260 seconds]
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
postmodern has quit [Quit: Leaving]
Esa_ has joined #ruby
citizentwo has quit [Ping timeout: 245 seconds]
ropeney has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wildtrees has joined #ruby
sergioro has quit [Quit: leaving]
ropeney has quit [Ping timeout: 272 seconds]
retro|cz has joined #ruby
ropeney has joined #ruby
<retro|cz> Hello! I'm trying to find out if requiring objspace (https://ruby-doc.org/stdlib-2.6.3/libdoc/objspace/rdoc/ObjectSpace.html) is having any overhead in production environment. I think I have heard somewhere it is not recommended, but can't find anything to confirm that. Any idea?
coffeex3 has joined #ruby
ropeney has quit [Ping timeout: 265 seconds]
Esa_ has quit [Ping timeout: 268 seconds]
<leitz> If you build a gem, how do you reference the data files it uses?
<leitz> Such that when run from anywhere, the data directory is found?
<leitz> Error: /usr/local/share/gems/gems/ftl_tools-0.0.6.pre.alpha/lib/ftl_tools/data_mine/text_adapter.rb:10:in `readlines': No such file or directory - data/names/humaniti_female_firstnames (Errno::ENOENT)
<leitz> The file is in /usr/local/share/gems/gems/ftl_tools-0.0.6.pre.alpha/data/names
jenrzzz has joined #ruby
tpanarch1st has joined #ruby
<retro|cz> @leitz can you use relative path relative to text_adapter.rb?
<jhass> there's a Gem.datadir
* leitz goes to research.
nowhere_man has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
jenrzzz has quit [Ping timeout: 272 seconds]
_phaul has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
<leitz> jhass, pointer to an example on how to use datadir?
<leitz> I'm coming up short.
<jhass> never did it myself
<jhass> just vaguely remember seeing it somewhere
<jhass> opened pry
<jhass> hit Gem.data<tab> on a wild guess
bvdw has quit [Read error: Connection reset by peer]
<jhass> completed it to Gem.datadir("pry") on a second wild guess
<jhass> and it returned me "/home/jhass/.gem/ruby/2.7.0/gems/pry-0.12.2/data/pry" which seemed like what you're after
bvdw has joined #ruby
<leitz> Trying to figure out how to reference it inside the code itself. Might try Gem.data and see. Seems odd, though.
markopasha has quit [Remote host closed the connection]
<jhass> I would expect Gem.datadir("ftl_tools") to work anywhere
<havenwood> leitz: What's odd about it? "The path to the data directory specified by the gem name."
coffeex3 has quit [Ping timeout: 265 seconds]
chalkmonster has joined #ruby
retro|cz has quit [Ping timeout: 260 seconds]
suukim has quit [Quit: Konversation terminated!]
orbyt_ has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* leitz is waiting for the test server to come back up, after the power breaker broke. :(
<leitz> havenwood, jhass, I'm still learning a lot. I saw where the installed "binary", in /usr/local/bin/.
bvdw has quit [Quit: bvdw]
<leitz> Okay, the default datadir seems to be a subdir in the gem's data directory.
<leitz> Using puts Gem.datadir("ftl_tools") in the code.
bvdw has joined #ruby
connor_goodwolf has quit [Remote host closed the connection]
chalkmonster has quit [Quit: WeeChat 2.7]
nowhere_man has quit [Remote host closed the connection]
<leitz> Even trying to set the datadir in the gemspec.
bvdw has quit [Quit: bvdw]
bvdw has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
<leitz> Hmm... Array.to_h doesn't exist in 2.0.
<havenwood> leitz: Ruby 2.0 is past end of life and is not supported with even critical security patches.
<havenwood> leitz: Ruby 2.4 will be end of life in a few weeks, when 2.5 goes into security maintenance mode.
<havenwood> leitz: Ruby 2.7 is stable or Ruby 2.6 will be supported for years. Can you switch to Ruby 2.6 or 2.7?
<leitz> havenwood, I use 2.6.6, but am working on a gem for others to use. The OS version for CentOS 7 is Ruby 2.0.0, and I have no way to know what Ruby versions will be used.
sergioro has joined #ruby
<havenwood> leitz: In Ruby 2.0, you can use Hash::[] in place of #to_h.
<havenwood> &20>> Hash[[1, 2], [3, 4]]
<rubydoc> # => {[1, 2]=>[3, 4]} (https://carc.in/#/r/8kdc)
<havenwood> Oops
<leitz> havenwood, I'm using this CentOS 7 box just as a test. Asking someone to install a different Ruby version for a small tool won't really help the uptake.
<leitz> havenwood, I manually made it a hash, so that bit's fixed.
ropeney has joined #ruby
<leitz> Still working on various datadir workarounds.
<havenwood> leitz: CentOS 7 is a pain with old packages. I'd suggest not targeting ancient Rubies just because Red Hat wants you to pay for modernity. :P
<havenwood> Ruby 2.0 is so old...
ccooke_ is now known as ccooke
<havenwood> It'd be nice if it was perfectly stable, but it has to get perfect before it can freeze.
sergioro has quit [Client Quit]
fphilipe has joined #ruby
<havenwood> leitz: "Rails requires Ruby version 2.5.0 or later."
<havenwood> leitz: Yet all sorts of folk run Rails on CentOS 7.
<havenwood> Just. not on Ruby 2.0.
<havenwood> leitz: If Rails can't be bothered...
<havenwood> Is it worth trying to support it solo?
<havenwood> (No!)
<leitz> I'm not sure what people will use, really. Most won't have Ruby at all. The project is small, and in theory a recruiting tool for Ruby developers. Maybe they run Windows, or Mac, no idea. My first big step, and so far much of the day, has been to trouble-shoot moving the gem from my dev server to a clean build environment.
* leitz doesn't do Windows or Rails.
<havenwood> leitz: Windows and CentOS folk are accustomed to installing a currently supported Ruby. If they don't, they can't use modern gems.
<havenwood> leitz: It'd be a shame to write your code in an antiquated style to support Rubies past end of life that nobody should be using.
fphilipe has quit [Ping timeout: 240 seconds]
itarato has joined #ruby
NODE has quit [Quit: changing servers]
<havenwood> leitz: FWIW, macOS ships with Ruby 2.6 and it's easier to install 2.6 on Windows than 2.0 by far.
<leitz> havenwood, isn't it more of a shame to exclude people from Ruby, than to take a little time to make the code work with current, and older, versions?
NODE has joined #ruby
ropeney has quit [Ping timeout: 240 seconds]
<leitz> Mac's going to quit shipping Ruby, soon, IIUC.
<havenwood> leitz: You can't build Ruby 2.0 on macOS or Windows. It's not possible.
<leitz> The to_h thing is already solved. I'm still working on the data stuff.
<havenwood> leitz: It's not a shame at all to stop using software that has known critical security vulnerabilities because it is unmaintained and past end of life.
<havenwood> We move on.
<havenwood> It'd be nice if things didn't bitrot, but we only have so much time to maintain things and progress demands moving forward.
TorpedoSkyline has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> I highly recommend targeting supported Rubies.
alexherbo2 has quit [Ping timeout: 272 seconds]
<leitz> Apologies if I sound mildly frustrated, but there's a big difference in priorities to me. After nearly two hours, I can't find how, in a "modern" Ruby, to reference a data path. Yet, for an ancient Ruby, it only took me about 5 minutes to code up a solution for dealing with old and new Ruby.
alexherbo2 has joined #ruby
<havenwood> What's the data path problem?
<leitz> I've literally heard people say "upgrade" for years. I don't mind upgrading, but I can't change everyone else in the world. I can try to make it a better place by giving them something fun, if I can figure out how to make it work.
* leitz gets off his soapbox.
<havenwood> leitz: I'm just telling you that as a gem author you should target supported Rubies. ¯\_(ツ)_/¯
NODE has quit [Quit: changing servers]
<leitz> If i can do both, *easily*, no reason not to.
ttoocs has joined #ruby
NODE has joined #ruby
<leitz> Humorously enough, a while back I got really tired of "upgrade", and went to the dev branch. Then it was "downgrade". :P
<leitz> Okay, on to the data path issue.
<havenwood> leitz: Here's an example of Ruby evolving from 1.9 to 2.7: https://gist.github.com/havenwood/a0cdf6640f54f15db57dbba0b09c4735
<havenwood> This is the code in Ruby 1.9: Hash[collection.group_by { |n| n }.map { |k, v| [k, v.size] }]
<havenwood> This is the same result in Ruby 2.7: collection.tally
<havenwood> (It's a huge difference.)
<havenwood> Modern Ruby is great!
<havenwood> Supporting Ruby 2.0 is folly.
<havenwood> Anyways, yeah, what's the data path issue?
<havenwood> It's not good to encourage folk to think that 2.0 should be used. There's no benefit to supporting it and it hurts your code.
alfiemax has joined #ruby
<leitz> When getting a name, the data path kludge seems to work. https://github.com/makhidkarun/ftl_tools/blob/remove_dependencies/lib/ftl_tools/name.rb#L8-L12
<leitz> Trying to put something similar to that between lines 6-8, causes an error: https://github.com/makhidkarun/ftl_tools/blob/remove_dependencies/lib/ftl_tools/data_mine/text_adapter.rb
<leitz> The error seems to be a highly added to data path. /usr/local/share/gems/gems/ftl_tools-0.0.6.pre.alpha/lib/ftl_tools/data_mine/text_adapter.rb:13:in `readlines': No such file or directory - /usr/local/share/gems/gems/ftl_tools-0.0.6.pre.alpha/data/ftl_tools/../usr/local/share/gems/gems/ftl_tools-0.0.6.pre.alpha/lib/ftl_tools/../../data/names/humaniti_female_firstnames (Errno::ENOENT)
<leitz> The data files are in a directory structure under /usr/local/share/gems/gems/ftl_tools-0.0.6.pre.alpha/data
<havenwood> leitz: Show the code that corresponds to the error?
<leitz> havenwood, it's slightly modified, on the test server. Here: https://gist.github.com/LeamHall/797c07306ad0c8b157278156c772cfed
coffeex3 has joined #ruby
<leitz> It didn't work as it was, hence the modifications. :)
greengriminal has joined #ruby
PuercoPope has left #ruby ["rcirc on GNU Emacs 27.0.50"]
<havenwood> leitz: Can you define a single constant, FTLTools::ROOT_PATH, and use it wherever you need the root path?
<havenwood> leitz: Consider File#expand_path rather than File#join. Compare the output in IRB: File.expand_path('../..', __dir__)
<leitz> havenwood, as the Gem author, I can do anything. As an apprentice coder my "anything" is a bit reduced. :)
<havenwood> leitz: You could also make a helper: RTLTools.root
<havenwood> Rails has a `Rails.root` and `RAILS_ROOT`, for example.
<leitz> The question is, how to make that ROOT_PATH flexible when it gets installed elsewhere.
jyaworski has joined #ruby
<adam12> leitz: You have access to __dir__ which is the path to the current file.
<havenwood> leitz: File.expand_path(__dir__)
<adam12> leitz: So I would just define a helper method using that file and then join to it.
TCZ has joined #ruby
jyaworski has quit [Client Quit]
fphilipe has joined #ruby
<havenwood> leitz: Use ::expand_path so it's not relative.
<havenwood> For example: File.join('../..', __dir__) #=> "../../."
<havenwood> But: File.expand_path("../..", __dir__) #=> "/Users"
silviu23 has joined #ruby
Rob__ has quit [Read error: Connection reset by peer]
Rob__ has joined #ruby
Tempesta_ has joined #ruby
silviu has quit [Remote host closed the connection]
alfiemax has quit [Remote host closed the connection]
* leitz goes to test.
Tempesta has quit [Ping timeout: 268 seconds]
<havenwood> leitz: You could make a lib/ftl_tools/root_path.rb file that contains: module FTLTools; ROOT_PATH = File.expand_path('../..', __dir__); def self.root; ROOT_PATH end end
fphilipe has quit [Ping timeout: 272 seconds]
<havenwood> leitz: Or, fancier: module FTLTools; ROOT_PATH = File.expand_path('../..', __dir__); def self.root(*paths); File.expand_path(File.join(ROOT_PATH, *paths)) end end
<havenwood> So you can: FTLTools.root('data', 'names.rb')
<havenwood> Or just make a data helper, if it's only for data.
<leitz> havenwood, does expand_path work for Window's "..\.."/
<leitz> ?
<havenwood> leitz: Yes, expand_path works.
tau has joined #ruby
<havenwood> leitz: "Converts a pathname to an absolute pathname."
<leitz> Yeah, but it probably requires Ruby 2.9 or later. :P
<havenwood> leitz: It works in all supported Rubies.
<leitz> That was my "too tired to come up with something better" joke...
<havenwood> leitz: (It happens to also work in Ruby 1.8 and prior, but that doesn't matter.)
<havenwood> leitz: Haha
<havenwood> &18>> File.expand_path('.')
<rubydoc> stderr: playpen: timeout triggered! (https://carc.in/#/r/8kdl)
<_phaul> havenwood we only go back to 20, sry
<_phaul> there is no 1.8 on carc.in
<havenwood> _phaul: And here I am arguing to drop support for 2.3. :P
<_phaul> :)
<havenwood> _phaul: I shouldn't speak of 1.8. :)
* leitz thinks havenwood missed the version I noted.
<havenwood> leitz: Looks like 2.9 will never come... :)
<havenwood> leitz: The current master is called 2.8, but... it may be named 3.0 by Christmas. We'll see!
<leitz> Cool.
TCZ has quit [Quit: Bye Bye]
<havenwood> "2.8.0 (tentative; to be 3.0.0) development has started."
* leitz needs to look at 18 new failures in 63 examples, after first draft of havenwood's fancy suggestion. :)
<leitz> havenwood, running rake |egrep "LOOK|FILE", gives +LOOK HERE /home/leam/lang/git/makhidkarun/ftl_tools +FILE IS /home/leam/lang/git/makhidkarun/ftl_tools/data/home/leam/lang/git/makhidkarun/ftl_tools/data/names/humaniti_female_firstnames
<havenwood> leitz: Looks like you're passing a full path in `start` when the relative directory is expected.
<havenwood> leitz: Look at: source
<havenwood> leitz: Maybe switch `source` to `*paths` or `path_from_root` or something?
<havenwood> leitz: Look at: p source
<havenwood> Does that make sense?
<leitz> havenwood, looking now.
<leitz> Hmm...so I must not understand File.join, then, because except for the extra "data", it makes no sense.
<leitz> I had it puts the source, right in start(), and it's: SOURCE IS /home/leam/lang/git/makhidkarun/ftl_tools/lib/ftl_tools/../../data/names/humaniti_female_firstnames
<leitz> Hang on a sec.
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gremax has quit [Ping timeout: 240 seconds]
gremax has joined #ruby
Deesl has joined #ruby
markopasha has joined #ruby
<leitz> Fixed that, next question. The tests pass. Not sure why. The character_builder's actions: https://github.com/makhidkarun/ftl_tools/blob/remove_dependencies/lib/ftl_tools/character_builder.rb#L51
<leitz> Call @tdm created on line 17 of that file.
<leitz> But start only joins the last bit of the path. How does it get the rest?
<leitz> Hmm...not working on the test machine.
<leitz> I think i have this one.
itarato has quit [Quit: Konversation terminated!]
pinpox- has joined #ruby
pinpox has quit [Ping timeout: 240 seconds]
xco has joined #ruby
ewanchic has joined #ruby
<leitz> Well, the modifier doesn't work, but I can look at that.
<ewanchic> I really feel like I'm missing something here with these front-end interfaces. I learning react (for Rails), and I feel this is all backwards. It's not DRY, not efficient typing or coding. For some reason I feel I should be able to make little partials in HAML that React could reference. What am I not seeing here?
coffeex3 has quit [Ping timeout: 265 seconds]
pinpox- is now known as pinpox
TCZ has joined #ruby
<xco> I blogged today: Linking a Webcam Directly to Rails' ActiveStorage https://emmanuelhayford.com/linking-a-webcam-directly-to-rails-activestorage/ :)
<xco> comments, shares welcome :)
orbyt_ has joined #ruby
NODE has quit [Quit: changing servers]
<ewanchic> xco: That is really cool! I'm excited to read up on this and Try it. Good job!
<xco> <3
akemhp has joined #ruby
DaRock has joined #ruby
NODE has joined #ruby
<leitz> My goal was to get some rough edges polished on my gem, and publish it before my self-mandated cut off time. After 12 straight hours, I made it. 8 minutes to spare. :)
<leitz> Thank you adam12 and havenwood, for your expert guidance.
<adam12> leitz: Cheers.
<adam12> ewanchic: React and Rails are entirely separate. Your views (partials) in Haml have no relationship to React.
davor_ has joined #ruby
davor has quit [Ping timeout: 260 seconds]
davor_ is now known as davor
JohanP has quit [Remote host closed the connection]
<apotheon> ewanchic: You'd probably either need to 1. compose the partials together and translate into HTML then send the HTML to React, or 2. include some code and/or libraries in React to handle HAML partials and send the partials to React, because they're distinct frameworks.
<ewanchic> adam12: No, I know react and Rails are separate. I meant front-end frameworks, not interfaces. But I have to disagree on the second part. I writing all this code in full HTML within each react component. I stopped writing full HTML a long time ago, and instead I use HAML. Why cannot rails inject some HAML partials into the React? I thought we (the dev community) was passed all of this with Ajax/Posts, using partials. But like I said, maybe
<ewanchic> I really don't understand the value of the front-end frameworks. Maybe someone can explain why all this extra coding is beneficial.
<ewanchic> When I start learning new stuff, I get pulled away onto 'some other more-important project', and I don't get back to this for another 6-12 months. This is the case for me right now, so I apologize for my ignorance.
<apotheon> Most of the time, I don't think it's beneficial. The cases where it's beneficial are, I think, perhaps <=2% of the time where it's used, but in those cases where it's beneficial, well, then it is.
<ewanchic> apotheon: like ERB vs HAML? <=2% of the time I need to switch back to ERB, but most of the time I can do HAML and partials
<adam12> I basically use Unpoly in every project. Henning talks about why he created it and his stance on SPAs. It's worth trying. http://triskweline.de/unpoly-rugb/#/
<adam12> So no React/Vue/etc. I sometimes use Stimulus or more often right now I'll reach for AlpineJS if I want some sort of fancy interactions.
<ewanchic> adam12: LOL -> It's not you, it's us We're breaking up with JavaScript frontends. Wow, that's for real, huh? Where do I find his talk?
<adam12> ewanchic: Not sure if it was recorded. The slides are all I've seen.
<ewanchic> adam12: ok, I found the play button.
<ewanchic> "We think we can fix most of the problems with server-side apps and find a new sweet spot in that trade-off. " - That is EXACTLY how I have always felt about projects. Right on the money!
endorama has quit [Ping timeout: 260 seconds]
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr_ has joined #ruby
<adam12> ewanchic: It's really nice. My only problem is I'm finding ERB kinda lackluster now and Haml/Slim doesn't do it for me.
laudecay has left #ruby ["WeeChat 2.7"]
JohanP has joined #ruby
olddogbarks has quit [Quit: I am functioning within established parameters.]
fphilipe has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
fphilipe has quit [Ping timeout: 240 seconds]
<leitz> havenwood, you might want to take a "beginner's mind" look at telling people to install newer Ruby. The ruby-lang web page says to use the OS Ruby, or directs people to rbenv (needs Git-fu, at least, not sure what else) and rvm, which has a good bit of reading.
<leitz> If there's to be a high bar for installing Ruby, that's a community decision. Not sure it's the one we want, though.
JohanP has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
<leitz> Perl and Python have the same "source" option. Go has a binary download.
JohanP has joined #ruby
TCZ is now known as valarray
ropeney has joined #ruby
ropeney has quit [Ping timeout: 240 seconds]
schne1der has quit [Ping timeout: 240 seconds]
hays has joined #ruby
ropeney has joined #ruby
<leitz> I wonder if that's part of the low market share Ruby has, outside of Rails? If a person does Rails, they really only have to worry about the web server environment; so one, or a very small number of, nodes.
kristian_on_linu has joined #ruby
tau has quit [Remote host closed the connection]
ropeney has quit [Ping timeout: 240 seconds]
ropeney has joined #ruby
wildtrees has quit [Remote host closed the connection]
wildtrees has joined #ruby
codic_ has joined #ruby
<ewanchic> I've been wanting to house a local gem server, and I've never really dived into it. I think it's time now, but not sure where to start. The gem I've writing creates a new RVM gemset based on the app_name I've creating and , well, 're-downloads gems all over again. Will a local gemserver help fix this problem?
<ewanchic> LOL, with the way I type, you'd think English is not my native language! Sorry for the grammar issues.
valarray has quit [Quit: Bye Bye]
lucasb has quit [Quit: Connection closed for inactivity]
akemhp has quit [Ping timeout: 268 seconds]
<leitz> ewanchic, not sure. The smart ones will have to answer that for you. I just push to RubyGems since it pushes me to have fewer embarrassments in my code. :)
m27frogy has quit [Quit: ZNC - https://znc.in]
<ewanchic> leitz: :)
hays has quit [Ping timeout: 272 seconds]
fphilipe has joined #ruby
connor_goodwolf has joined #ruby
fphilipe has quit [Ping timeout: 246 seconds]
codic_ has quit [Quit: codic_]
catphish has left #ruby ["Leaving"]