adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.3, 2.7.5, 2.6.9: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
duds- has quit [Quit: Leaving.]
duds- has joined #ruby
hololeap has quit [Ping timeout: 276 seconds]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
weaksauce has joined #ruby
ur5us has joined #ruby
random-jellyfish has joined #ruby
random-jellyfish has quit [Ping timeout: 256 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
skgorg has quit [Quit: WeeChat 3.3]
dohtem has joined #ruby
gcd has joined #ruby
BSaboia has joined #ruby
jetchisel has joined #ruby
pgib has joined #ruby
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rounin has quit [Ping timeout: 264 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
libsys has quit [Ping timeout: 245 seconds]
libsys has joined #ruby
hololeap has joined #ruby
hexology is now known as hexology_
hexology_ is now known as hexology__
hexology__ is now known as hexology`
hexology` is now known as hexology_`
hexology_` is now known as hexology
wannadance has quit [Ping timeout: 245 seconds]
victori has quit [Read error: Connection reset by peer]
victori has joined #ruby
Guest7895 has joined #ruby
Guest7895 has quit [Client Quit]
hololeap_ has joined #ruby
hololeap has quit [Ping timeout: 276 seconds]
jpw has joined #ruby
jetchisel has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 264 seconds]
jpw has quit [Remote host closed the connection]
jpw has joined #ruby
roadie has joined #ruby
Rounin has joined #ruby
hwrd has quit []
freeworld has joined #ruby
swaggboi has quit [Ping timeout: 252 seconds]
hwrd has joined #ruby
swaggboi has joined #ruby
konsolebox has joined #ruby
_ht has joined #ruby
jpw has quit [Remote host closed the connection]
roadie has quit [Ping timeout: 268 seconds]
Furai has quit [Quit: WeeChat 3.3]
jmcgnh has quit [Ping timeout: 256 seconds]
Furai has joined #ruby
HyLian has quit [Quit: hasta luego!]
jmcgnh has joined #ruby
mahlon has quit [Read error: Connection reset by peer]
ged has quit [Ping timeout: 268 seconds]
konsolebox has quit [Remote host closed the connection]
konsolebox has joined #ruby
konsolebox has quit [Remote host closed the connection]
mahlon has joined #ruby
ged has joined #ruby
konsolebox has joined #ruby
ur5us has joined #ruby
ged has quit [Ping timeout: 252 seconds]
mahlon has quit [Ping timeout: 252 seconds]
mahlon has joined #ruby
mahlon has quit [Ping timeout: 264 seconds]
ged has joined #ruby
mahlon has joined #ruby
amanjhalmat12 has joined #ruby
BSaboia has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
HyLian has joined #ruby
comet23 has quit [Quit: Connection closed for inactivity]
Bish has quit [Quit: leaving]
amanjhalmat12 has quit [Ping timeout: 256 seconds]
roadie has joined #ruby
TomyWork has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
yxhuvud has quit [Remote host closed the connection]
Bounga has joined #ruby
taupiqueur has joined #ruby
yxhuvud has joined #ruby
dohtem has quit [Quit: Connection closed for inactivity]
gr33n7007h has joined #ruby
BSaboia has joined #ruby
srushe has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
konsolebox has quit [Ping timeout: 252 seconds]
BSaboia has joined #ruby
amanjhalmat12 has joined #ruby
shlomo has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
fef has joined #ruby
constxd has joined #ruby
roadie has joined #ruby
roadie` has joined #ruby
roadie has quit [Ping timeout: 268 seconds]
yura has joined #ruby
<yura> Hello. Can 2.7.x Ruby be compiled against openssl 3.0 libraries ?
yura has quit [Quit: Ping timeout (120 seconds)]
yura has joined #ruby
<adam12> yura: I don't think so, at least not yet. There's work ongoing to support OpenSSL 3.
yura has quit [Client Quit]
yura87 has joined #ruby
<leftylink> what is the thing called when you have ellipses in the function definition... never mind, found it, it's arguments forwarding
yura87 has quit [Quit: Ping timeout (120 seconds)]
freeworld has quit [Ping timeout: 264 seconds]
yura has joined #ruby
amanjhalmat12 has quit [Quit: Client closed]
yura has quit [Quit: Ping timeout (120 seconds)]
shlomo has quit [Quit: Leaving]
yura has joined #ruby
yura has quit [Quit: Ping timeout (120 seconds)]
yura has joined #ruby
freeworld has joined #ruby
yura has quit [Quit: Ping timeout (120 seconds)]
roadie` has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
dohtem has joined #ruby
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #ruby
adam129 has joined #ruby
mbrndtgn3 has joined #ruby
benjamin- has joined #ruby
yosafbridge has quit [Ping timeout: 256 seconds]
belak51 has joined #ruby
phryk_ has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
benjaminwil has quit [Ping timeout: 256 seconds]
phryk has quit [Ping timeout: 256 seconds]
fcser has quit [Ping timeout: 256 seconds]
belak has quit [Ping timeout: 256 seconds]
mbrndtgn has quit [Ping timeout: 256 seconds]
adam12 has quit [Ping timeout: 256 seconds]
rapha has quit [Ping timeout: 256 seconds]
mbrndtgn3 is now known as mbrndtgn
cornett has quit [Ping timeout: 256 seconds]
vit has joined #ruby
vit is now known as Guest3140
yosafbridge has joined #ruby
adam12 has joined #ruby
cornett has joined #ruby
adam129 has quit [Read error: Connection reset by peer]
belak has joined #ruby
benjaminwil has joined #ruby
benjamin- has quit [Ping timeout: 256 seconds]
belak51 has quit [Ping timeout: 256 seconds]
freeworld has quit [Ping timeout: 256 seconds]
fcser has joined #ruby
taupiqueur has quit [Ping timeout: 256 seconds]
orbyt has joined #ruby
taupiqueur has joined #ruby
rapha has joined #ruby
fef has quit [Quit: Leaving]
taupiqueur has quit [Quit: taupiqueur]
Bounga has quit [Ping timeout: 256 seconds]
TomyWork has quit [Remote host closed the connection]
jpw has joined #ruby
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
fredlinhares has joined #ruby
___nick___ has joined #ruby
fredlinhares has quit [Quit: WeeChat 3.3]
fredlinhares has joined #ruby
jpw_ has joined #ruby
fredlinhares has quit [Quit: WeeChat 3.3]
jpw has quit [Ping timeout: 256 seconds]
hololeap_ is now known as hololeap
ur5us has joined #ruby
kaleido_ has quit [Changing host]
kaleido_ has joined #ruby
kaleido_ is now known as kaleido
jpw has joined #ruby
jpw_ has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
hololeap has quit [Remote host closed the connection]
roadie has joined #ruby
Inline has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
roadie has quit [Ping timeout: 264 seconds]
goldfish has joined #ruby
ur5us has joined #ruby
roadie has joined #ruby
Al2O3 has quit [Ping timeout: 268 seconds]
roadie has quit [Ping timeout: 268 seconds]
Al2O3 has joined #ruby
roadie has joined #ruby
___nick___ has quit [Ping timeout: 256 seconds]
_ht has quit [Remote host closed the connection]
maroloccio has joined #ruby
howdoi has joined #ruby
<howdoi> easiest way to check if a file is empy or not?
<newton> SO says File.zero?("file_name")
<gr33n7007h> howdoi: File.empty? file
<howdoi> ha `content.split("\n").count > 1` vs `first(2).size > 1`
<howdoi> the code I am reading is checking if there are 2 lines, I guess
<howdoi> not really checking if the file is empty or not
taupiqueur has joined #ruby
constxd has quit [Ping timeout: 264 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
roadie has quit [Ping timeout: 264 seconds]
shlomo has joined #ruby
teclator has joined #ruby
BSaboia has joined #ruby
orbyt has quit [Quit: Textual IRC Client: www.textualapp.com]
taupiqueur has quit [Quit: taupiqueur]
Inline has quit [Quit: Leaving]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Shortstop has joined #ruby
<Shortstop> Hey there, can anyone help me figure out why 'Shoes' isn't recognized in my terminal? I'm using Emacs with 'vterm' in MacOS
<Shortstop> I made sure to add the following to my ~/.bashrc:
<Shortstop> export GEM_HOME="$HOME/.gem"
<Shortstop> I tried the following two commands:
<Shortstop> shoes calculator.rb
<Shortstop> bash: shoes: command not found
<Shortstop> Shoes calculator.rb
<Shortstop> bash: Shoes: command not found
<Shortstop> I installed 'shoes' via these notes:
<Shortstop> Then, run this command:
<Shortstop> git clone git://github.com/shoes/shoes4.git
<Shortstop> Then, run the following two commands to install the related 'shoes' gem file:
<Shortstop> cd shoes4
<Shortstop> gem install bundler && bundle install
<jpw> try `bundle exec shoes`
<Shortstop> $ bundle exec shoes
<Shortstop> Could not locate Gemfile or .bundle/ directory
<Shortstop> hmm, interesting
<Shortstop> I see the following two 'gems' in ~/.gem/gems:
<Shortstop> shoes-highlighter-1.0.1
<Shortstop> shoes-manual-4.0.1
<jpw> it's hard to answer without knowing more about your environment. did you run bundler as root? where were the gems installed, a vendor directory, home directory
<Shortstop> I installed 'ruby' with 'brew' package manager
<jpw> and is there '~/.gem/bin'?
<Shortstop> other than that single line for my Bash config, I didn't do anything else to be honest
<Shortstop> I see the following present in ~/.gem/bin:
<Shortstop> shoes-picker
<Shortstop> shoes-stub
<Shortstop> shoes-swt
<jpw> ok great!
<jpw> and is ~/.gem/bin in your path?
<Shortstop> Hmm, not sure, let me echo that out, one sec
<jpw> s/path/\$PATH/
<Shortstop> no I don't believe so, should I add it to my path in that case with an 'export' section to my .bashrc right?
<adam12> Shortstop: bin/shoes from shoes4 path
<jpw> just as an aside. i personally use `bundle install --path vendor/bundle` that installs all of the gems in to the project directory. but be sure to add /vendor to your .gitignore
<Shortstop> like the git cloned directory? adam12 or the gem portion?
<adam12> Shortstop: The git cloned directory
<Shortstop> ~/hub/worknotes_snyk/ChallengeProject/CalculatorArchive/Calculator_GUI_Ruby/shoes4/bin $ pwd
<adam12> Shortstop: Don't run from bin.
<Shortstop> ^ that's the attempt to use './shoes'
<adam12> Shortstop: bundle exec bin/shoes
<Shortstop> ah I thought that's what you wanted
<Shortstop> gotcha, will try that
<adam12> Sorry, no. Run from root folder, providing `bin` as part of the exe path.
<Shortstop> ^ Latest attempt
<adam12> That's a funny one.
<adam12> Try `bundle update pry` and then re-run the previous command. Maybe that will solve it.
<Shortstop> will try that thanks :)
<weaksauce> is 0.14.1 not considered >= 0 to bundler?
<Shortstop> ^ 'bundle update pry' followed by 'bundle exec bin/shoes'
<jpw> depends if bundler is interperating 0 as false. i wouldn't put it past it
<adam12> Maybe it's a ruby/jruby problem.
<weaksauce> yeah is the gem listed as >= 0 or ">= 0"
<adam12> Shortstop: How'd you install jruby?
<adam12> Shortstop: Shoes is basically abandoned, so you might never get this working. Fair warning :)
<adam12> It's a shame _why left...
<weaksauce> yeah
<weaksauce> too bad since ruby could use a nice little gui toolkit
<adam12> There's also Glimmer. It has a few interesting backends, like libui.
<Shortstop> hmm damn I actually liked that project a lot!
<Shortstop> reason being to give you guys some background
<Shortstop> basically I do tech support for work, but for multiple programming language backends
<Shortstop> I wanted to make some cool little neat apps in different languages, but Python was the only one with a sane todolist GUI type app present. Everything else I tried was just so hit or miss (Java, etc)
<Shortstop> Glimmer huh, maybe I'll check that out. Good to know that 'shoes' was deprecated though
<Shortstop> Thanks for letting me know
<adam12> Shortstop: Any idea if the Python version uses any gui libraries?
<Shortstop> I forget which one I used but I'll check
<Shortstop> could have been either tkinter
<Shortstop> or another one*
<adam12> There are/were Ruby TK bindings...
<adam12> Glimmer supports Tk too..
<Shortstop> yep Tkinter
<Shortstop> ah neat, bear with me, so if there are 'Ruby' bindings, does that mean I can code the same app in Ruby then?
<Shortstop> *program
<adam12> I haven't touched Tk since like 1996 so I'm not sure what kind of state it's in
<adam12> In theory, as long as the bindings are functioning, yes. You should be able to make the same app.
<Shortstop> kind of looking for the fastest approach ha :)
<adam12> If you use Glimmer, you could maybe use the same app across multiple "binding" environments (web, tk, swt, etc)
<adam12> It's worth looking at Glimmer. I'm not sure I'd bother with Shoes, IMHO.
<Shortstop> looks like all you need to do is install the 'Glimmer' gem
<Shortstop> looks awesome
<Shortstop> totally, totally agreed adam12
<Shortstop> Looking forward to it since I'm a big Python fan, and Ruby looked inviting as well. Don't know why, but the scripting languages peak my interest most of the time
<adam12> It's a shame this area of Ruby doesn't see too much interest.
<weaksauce> yeah
<weaksauce> though glimmer looks really nice
<adam12> The libui version is alpha but looks nice too.
<weaksauce> it's all that rails love that ruby gets
<adam12> (tho I think libui is DOA so ...)
<weaksauce> wasn't someone here working on that?
<Shortstop> so as a complete newbie, I would just use 'gem install glimmer-dsl-tk' and would be able to just run my project as 'ruby project.rb' right?
<adam12> Shortstop: Yes likely, but in reality, you should create a Gemfile, add glimmer-dsl-tk as a dependency, and use` bundle exec ruby project.rb`
<adam12> Shortstop: If you're familiar at all with Python and things like venv, you'll know why.
<weaksauce> most likely need to independently install the tk part too
<weaksauce> unless the build steps build it for you
<Shortstop> hmm maybe, should I download the gemfile, stick it in the project, and just package it that way?
<Shortstop> From a Python perspective, would that kind of be like 'requirements.txt' with 'venv' in a sort of way?
<weaksauce> basically but better
<weaksauce> :P
<Shortstop> gotcha, would that just be 'Gemfile' or '.gem' in the given project's root directory?
<adam12> Shortstop: Don't download any Gemfile. That would be related to that project, not yours. You could be half way there with `bundle init && bundle add glimmer-dsl-tk`
<Shortstop> ah nevermind its part of the install instructions *
<adam12> (the other half being `bundle exec ruby project.rb` :))
<weaksauce> bundle init && bundle add glimmer-dsl-tk
<Shortstop> yeah the install instructions include the following:
<Shortstop> Whoops sorry, thought it would paste :/
<Shortstop> In the 'Gemfile':
<Shortstop> gem 'glimmer-dsl-tk', '0.0.48'
<Shortstop> Then run:
<Shortstop> bundle
<Shortstop> would that be fair game? I ask because I wanted to bundle it as a project for coworkers to check out later on
<Shortstop> planning on making a basic calculator, gonna be fun
<weaksauce> i just use bundle add unless i need a specific version as it adds the version for you without looking it up
<weaksauce> and a gemfile without versions is not good
<weaksauce> usually*
<Shortstop> I see, but isn't that 'gem' line above including a version, ex: '0.0.48'?
<Shortstop> weaksauce
<weaksauce> yes
<adam12> Shortstop: That's basically the premise. Distribute the Gemfile, Gemfile.lock, and your .rb files all together. I'd say, start there at least.
<adam12> Shortstop: From there, you can look at a) inline bundler (to drop the Gemfile* files), and distributing your own gem. I wouldn't jump to that tho.
<Shortstop> ah didn't know about the 'Gemfile.lock' file, will look this up
<Shortstop> thanks for the suggestions, cool stuff
<Shortstop> looking it up now
<Shortstop> ah I see, so 'bundler' creates that file, got it
<Shortstop> $ bundle
<Shortstop> [DEPRECATED] This Gemfile does not include an explicit global source. Not using an explicit global source may result in a different lockfile being generated depending on the gems you have installed locally before bundler is run. Instead, define a global source in your Gemfile like this: source "https://rubygems.org".
<Shortstop> Could not find gem 'glimmer-dsl-tk (= 0.0.48)' in locally installed gems.
<Shortstop> I have the 'Gemfile' in the same directory. Wonder why 'bundle' isn't installing the gems as intended.
<Shortstop> contents of 'Gemfile': gem 'glimmer-dsl-tk', '0.0.48'
<adam12> Shortstop: Add `source "https://rubygems.org/"` to top of Gemfile.
<Shortstop> cool thanks
<adam12> Funny that it didn't add it for you...
<adam12> Does for me. Maybe a bug that was fixed.
<Shortstop> Yeah I think there is a 'tk' dependency:
<adam12> Could try adding `tk` too. `bundle add tk`
<adam12> Funny that it didn't do it for you tho..
<adam12> Actually, is that the entire message?
<Shortstop> Tried adding 'tk' to the 'Gemfile':
<Shortstop> gem 'tk', '0.4.0'
<Shortstop> Re-ran 'bundle', and got this message:
shlomo has quit [Ping timeout: 256 seconds]
<adam12> Shortstop: Oh. It's using jruby. That might not work.
<adam12> tk is a C Library, and JRuby won't bind to C libraries. You need to use a different Ruby version.
<adam12> You installed Ruby through brew?
<adam12> Like brew install jruby?
<Shortstop> yep exactly
<Shortstop> *yes I did install jruby with 'brew' package manager
<weaksauce> swt is java right?
<adam12> Shortstop: I wouldn't rely on this _long term_, but just to get you unblocked, I'd install ruby through brew. `brew install ruby`
<Shortstop> I believe so, yes weaksauce
<weaksauce> that should work then
<Shortstop> Yep, I installed ruby through brew too :)
<adam12> Shortstop: What's `ruby -v`?
<Shortstop> since MacOS has its own version of Ruby, so some people advise to just install it with brew
<Shortstop> some people though from what I read containerize it
<Shortstop> I couldn't get 'rvm' working at all because of some weird GPG key thing on their end, side note
<adam12> Shortstop: and `which ruby`
<Shortstop> ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
<adam12> `which bundle`
<Shortstop> Output: /usr/bin/ruby
<Shortstop> output: /usr/local/bin/bundle
<Shortstop> That might explain it lol
<adam12> That's system ruby... and not system bundle. LOL
<Shortstop> more revisions to the $PATH are needed
<Shortstop> exactly, damn man, newbie mistake right there :/
<Shortstop> but yeah looks like I'll need to find a guide on this in that case heh :)
<Shortstop> positive thinking :) No joke though, wanted to give Ruby more of a shot, looks mega cool.
<adam12> IMHO, try to revert what you've done so far. Install the Frum ruby version manager.
<adam12> Only install Ruby through Frum. And it doesn't need your path edited, or your GEM_HOME edited, or anything. Just the `eval frum` bits in your shell init.
<adam12> Forget about homebrew Ruby, because Homebrew is built on Ruby and might change the version out from under you. It's annoying, but it's kind of the same deal if you rely on Python on Linux distros (and why they moved it to /usr/libexec in some instances).
<weaksauce> yeah homebrew ruby is not ideal
<Shortstop> good to know
<Shortstop> I'll check out 'frum' in that case thanks for this
<Shortstop> will be back another time, will need to research this
<adam12> Shortstop: It's basically a simpler version of rvm.
<Shortstop> gotcha :)
<adam12> Maybe what rvm would of been if it didn't turn into 50,000 lines of shell script :)
<Shortstop> I don't really like rust, but I guess if its a better package manager, no problem
<Shortstop> thanks again, will be back another time :)
Shortstop has quit [Quit: Connection closed]
<weaksauce> adam12 is there a noticeable benefit to that over rbenv + ruby-build
<adam12> weaksauce: README says it's faster on init than `rbenv init` (during shell initialization)
<adam12> weaksauce: For me, it's just "one less thing", since tbh I only install the latest Ruby on my machine. Everything else is Docker.
<adam12> I could get away with not even using Frum, probably.
<adam12> weaksauce: I'm never a big fan of the shims that rbenv used.
<weaksauce> i just moved over to it because of vscode being a jerk
<weaksauce> with chruby
<adam12> Move entirely to DevContainers and live the dream :P
<weaksauce> hah
<adam12> I have a DevContainer for every project. It's joyful.
phryk_ is now known as phryk
<newton> devcontainer?
<newton> vscode thing?
<adam12> newton: It's a dev environment inside a Docker container, that VSCode manages.
<newton> ah. cool
<adam12> newton: It sets up an instance of vscode inside the container, and talks to it via RPC.
<newton> is there a non-editor-specific version of this
<newton> oooh
<adam12> I think every other editor will eventually copy it, but you could get by with a simple script that just copies over your .vim folder and stuff.
<adam12> Docker Desktop has something comparable too.. tho I havent' looked since VSCode does it for me.
<adam12> but I think the JetBrains guys are looking to do similar.
teclator has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
Guest3140 has quit [Ping timeout: 252 seconds]