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.
<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.
<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>
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?
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 "..\.."/
<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…]
<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?
<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. :)