<schultza>
where i was having issues with a previous crash on sup (when running for first time) and decided to delete the lockfile as I thought it was like any other lock file i came across.
<havenwood>
schultza: This is a gem called "lockfile" it appears.
howdoi has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 245 seconds]
<havenwood>
schultza: I'm not familiar with sup. You might try #sup channel.
<schultza>
Complete silence over there. I'm new, not sure when their support hours are. But I just submitted an issue request on their github. Thank you, @havenwood.
<havenwood>
schultza: You might try looking at the code around where the error is percolating up. What's line 308 of? /home/allen/.local/share/gem/ruby/3.0.0/gems/lockfile-2.1.3/lib/lockfile.rb
<schultza>
Is there an 'encode' package to gem install?
<havenwood>
schultza: Ah, yeah, you're running into a retirement of a deprecated feature in Ruby 3.0
<havenwood>
schultza: They should switch to use CGI.escape.
<havenwood>
schultza: In the meantime, use Ruby 2.7.3.
alexherbo2 has joined #ruby
<schultza>
Ruby 3 was defaulted in my install, I even had to finish installing rubygems package to get to downloading stuff.
<havenwood>
schultza: You could forwardport the feature but probably better to fix the lib or use a compatible Ruby version.
<havenwood>
schultza: Basically, install ruby2.7 and use a tool like chruby to switch between Rubies. There are many ways though. We can assist with whatever way.
<schultza>
Let me get some good rest and go through this article. I'll post if this succeeds for me. Thank you again.
<schultza>
Where should I go as a beginner to Ruby, but NOT new to programming?
whysthatso has quit [Read error: Connection reset by peer]
whysthatso has joined #ruby
actuallybatman has quit [Ping timeout: 240 seconds]
prion has joined #ruby
jamees has joined #ruby
alexherbo2 has quit [Ping timeout: 245 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
jla has joined #ruby
prion has quit [Ping timeout: 240 seconds]
henninb has joined #ruby
phaul has quit [Ping timeout: 246 seconds]
rubydoc has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
alexherbo2 has joined #ruby
FetidToot has quit [Quit: Ping timeout (120 seconds)]
FetidToot has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
rubydoc has joined #ruby
Na_Klar has joined #ruby
jenrzzz has joined #ruby
<Na_Klar>
working with ruby 2.5.1: why can I pipe "ruby prog.rb | grep ^" when prog is: print "test", but not when "Thread.new{ print "test" }? When you work prog.rb from console you can see both prints, the one directly from prog.rb and the one from the threaded prog.rb. But when I try to pipe that output, the direct is available but the threaded is nowhere. Why is that?
TCZ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
ChmEarl has joined #ruby
gemmaro has quit [Ping timeout: 245 seconds]
<_rg>
if your code is only Thread.new { print "" } the main thread might exit first, you should probably join the thread at least with that much info
<_rg>
see if Thread.new { print 'hello' }.join is different.
<Na_Klar>
_rg, well, .join did the trick. thank you a lot!
<_rg>
welcome
gemmaro has joined #ruby
<Na_Klar>
_rg, that solves the stdout issue, but .join then won't let me run loop in Thread, it will block the code. I need Thread to thread loops while the program runs further. Could you think of a way to achieve both? Getting stdout from Thread for pipes and keep it unjoined?
jenrzzz has joined #ruby
<jhass>
you didn't understand the issue. Your thread is killed when the main thread exits. Writing to a pipe is much faster than writing to a terminal, so it probably somehow shuffles things around just enough to make a difference in your minimal example.
<jhass>
.join blocks the current thread until the join'ed thread is finished, hence in the minimal example it keeps the main thread alive
<Na_Klar>
nono, the main thread was in a loop and didn't kill the thread
<jhass>
if it's busy looping and never doing any IO then other threads won't get a chance to run. In MRI there's a global lock around the VM that prevents parallel execution of ruby code
<Na_Klar>
I have a main thread and a thread. the main thread runs forever and the thread prints text. the text is sent to console but not catchable by a pipe.
<jhass>
got a minimal example that demonstrates this? -> gist.github.com
<Na_Klar>
the script works fine on console. just piping its stdout does not work for anything which comes from the thread. anythink from the main thread is pipeable.
jenrzzz has quit [Ping timeout: 245 seconds]
<Na_Klar>
jhass, you can reproduce by just: Thread.new(while true {print "two" sleep(1) } while true {print "one" sleep(1)} .. the console output will be onetwoonetwo... but when piping the program like ruby test.rb | grep ^ the output will be like "oneoneoneoneone"
<jhass>
I cannot and given this isn't even syntactially valid I don't think you have yourself :)
<jhass>
One thing to note though: stdout becoming a non-tty changes flush behaviour
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
EvilJStoker has quit [Ping timeout: 246 seconds]
ule has quit [Client Quit]
_nick_ has joined #ruby
dka has quit [Quit: My Ex-Girlfriend once told me: I'm not a slut, I'm just popular]
Rudd0 has joined #ruby
ule has joined #ruby
ule has quit [Changing host]
ule has joined #ruby
EvilJStoker has joined #ruby
overy4nder has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
robotbee has joined #ruby
dka has joined #ruby
markong has quit [Remote host closed the connection]
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
gearnode has joined #ruby
<schultza>
@havenwood, I got it working. Had to completely uninstall ruby with an install of jvm and install and use ruby2.7... that other article you gave me i had issues with it, so this other route helped a lot.
_nick_ has quit [Ping timeout: 246 seconds]
Mrgoose has joined #ruby
markong has joined #ruby
dka has quit [Remote host closed the connection]
jhass has quit [Quit: Bye]
mayhew has joined #ruby
gearnode has quit [Quit: WeeChat 3.1]
fercell has quit [Read error: Connection reset by peer]
gemmaro has joined #ruby
fercell has joined #ruby
niv has quit [Ping timeout: 245 seconds]
jla has joined #ruby
jhass has joined #ruby
robotbee has quit [Ping timeout: 268 seconds]
dka has joined #ruby
jla has quit [Ping timeout: 268 seconds]
samp has joined #ruby
<samp>
hi friends. i want to start contributing, but i cant find any good starter issues on bugs.ruby-lang.org; where could i go to talk with people aobut it?
<samp>
i made a bugs.ruby-lang account fwiw
gemmaro has quit [Ping timeout: 250 seconds]
gemmaro has joined #ruby
samp has quit [Quit: Connection closed]
Rudd0 has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]