Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
JohanP` has quit [Ping timeout: 272 seconds]
Axy has joined #ruby
schne1der has quit [Ping timeout: 265 seconds]
schne1der has joined #ruby
cd has joined #ruby
Mia has quit [Ping timeout: 260 seconds]
siaw23 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
junaidnaseer2 has quit [Ping timeout: 272 seconds]
JohanP` has joined #ruby
siaw23 has joined #ruby
JohanP` has quit [Ping timeout: 264 seconds]
JohanP` has joined #ruby
JohanP` has quit [Ping timeout: 246 seconds]
naftilos76 has joined #ruby
schaerli_ has joined #ruby
JohanP` has joined #ruby
coniptor has quit [Ping timeout: 264 seconds]
somazero has quit [Remote host closed the connection]
schaerli has quit [Ping timeout: 272 seconds]
somazero has joined #ruby
somazero has quit [Remote host closed the connection]
<naftilos76>
hi i have some doubts as to how ruby threads work. Although i have been through several guides i am still having some doubts regarding the use of join. So my understanding is that creating a thread with .new in the main ruby thread does not start the thread unless the main thread finishes. Is this correct? At least this what i conclude with a sample code that i have been executing. Now, using thread.join will explicitly force the threads to suspend
<naftilos76>
execution of the main thread exactly where the .join was placed and will go back to the main thread after the thread's execution is over. Am i right?
JohanP` has quit [Remote host closed the connection]
JohanP` has joined #ruby
coniptor has joined #ruby
m27frogy has joined #ruby
dionysus69 has joined #ruby
<leftylink>
you may use an experiment-based approach to test whether your statement is true. `ruby -e "puts Thread.new {}.status"` . You see that the output is "run". therefore, you know now that Thread.new does start the thread.
<leftylink>
for questions on what Thread#join does, I defer to the documentation, as it can surely explain it better than I can
<leftylink>
the significance of the main thread finishing is that all other threads are killed when the main thread finishes. if the main thread finishes before other threads have done their job, other threads will not be able to do their job
<naftilos76>
thanks
JohanP` has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
JohanP has joined #ruby
prion has joined #ruby
TCZ has joined #ruby
Guest48 has joined #ruby
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest48 has joined #ruby
Guest48 has quit [Client Quit]
JohanP has quit [Ping timeout: 256 seconds]
mconnolly has quit [Ping timeout: 264 seconds]
mconnolly has joined #ruby
JohanP has joined #ruby
JohanP has quit [Ping timeout: 240 seconds]
coniptor has quit [Ping timeout: 260 seconds]
JohanP has joined #ruby
coniptor has joined #ruby
TCZ has quit [Quit: Wawel - Czujesz sie dobrze, czynisz dobrze]
JohanP has quit [Ping timeout: 240 seconds]
JohanP has joined #ruby
fippy has quit [Ping timeout: 272 seconds]
ellcs has joined #ruby
JohanP has quit [Ping timeout: 272 seconds]
ellcs has quit [Ping timeout: 260 seconds]
JohanP has joined #ruby
JohanP has quit [Ping timeout: 256 seconds]
banisterfiend has joined #ruby
postmodern has quit [Quit: Leaving]
ellcs has joined #ruby
JohanP has joined #ruby
fanta1 has joined #ruby
schne1der has quit [Ping timeout: 272 seconds]
GodFather has joined #ruby
GodFather_ has joined #ruby
coniptor has quit [Ping timeout: 268 seconds]
wald0 has joined #ruby
banisterfiend has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
banisterfiend has quit [Changing host]
banisterfiend has joined #ruby
coniptor has joined #ruby
schne1der has joined #ruby
schne1der has quit [Client Quit]
GodFather_ has quit [Ping timeout: 256 seconds]
GodFather has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Ping timeout: 260 seconds]
naftilos76 has quit [Quit: Leaving]
coniptor has quit [Ping timeout: 264 seconds]
orbyt_ has joined #ruby
wald0 has quit [Ping timeout: 268 seconds]
coniptor has joined #ruby
wald0 has joined #ruby
jim has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
ellcs has quit [Ping timeout: 268 seconds]
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 240 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
blackmesa has joined #ruby
AndreYuhai has joined #ruby
<AndreYuhai>
Is there any way to edit a code block within PRY? Instead of finding every line of the code block and pressing enter?
schaerli_ has quit [Ping timeout: 264 seconds]
<AndreYuhai>
Something like IPython
banisterfiend has joined #ruby
banisterfiend has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
coniptor has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
Rudd0^ has joined #ruby
Rudd0 has quit [Read error: Connection reset by peer]
<adam12>
AndreYuhai: `edit`?
<havenwood>
AndreYuhai: See: help edit
<havenwood>
AndreYuhai: Or do you want the multi-line edit style that the new irb does?
coniptor has joined #ruby
roshanavand has joined #ruby
<AndreYuhai>
I've tried edit now and I don't know why but it is slow and it is doing weird things. Like I couldn't quit. I do :q! but then goes into insert mode again and bunch of other weird stuff
<AndreYuhai>
Might be because of syntax checker maybe that really slows down vim
ellcs has joined #ruby
<AndreYuhai>
Oh yea that was probably because of Syntastic check
<AndreYuhai>
Thanks!
<AndreYuhai>
multiline edit from new irb is also cool, I just checked that. Easier
<adam12>
Guest85135: Under Debian? ie. gem install oxidized
<Guest85135>
and installed net-ssh with "gem install net-ssh"
<adam12>
Guest85135: Ah ok. How about trying `gem install net-ssh -v "~> 5"` then running oxidized again?
<Guest85135>
To launch oxidized : su - oxidized then #oxidized
<Guest85135>
Thanks adam12, let's do a try
<Guest85135>
Adam12: Many thanks ! I'm a step further now !
<adam12>
Guest85135: Great!
<Guest85135>
adam12: I think I have a lot of dependencies to install, do you think `gem install oxidized -include-dependencies` will do the complete job ?
<adam12>
Guest85135: It should of done it the first time, to be honest.
<adam12>
Guest85135: You could uninstall oxidized and re-install it. But if it didn't install the dependencies, maybe there's something wrong with your gem config or Ruby version.
<adam12>
Guest85135: What's the output of `gem install --explain oxidized`? Share it in a gist or dpaste.org.
<Guest85135>
adam12: I think I'm on the way, oxidized starts with root user (after de-install / re-install), let's find now why oxidized user hits an error
<banisterfiend>
how to cmpare two types in rust? i.e check if one type is the same as another
jinie has joined #ruby
wald0 has quit [Ping timeout: 240 seconds]
wald0 has joined #ruby
<Guest85135>
adam12: finally it works! Many thanks, I've learned lots of things about ruby ecosystem
<adam12>
Guest85135: Great!
<apotheon>
banisterfiend: This is not the Rust channel.
AndreYuhai has quit [Remote host closed the connection]
<banisterfiend>
they decorate the method and have the decorator call into the original method
<banisterfiend>
only works so great due to the implicit blocks in ruby
<adam12>
banisterfiend: Yeah. I think it's a loop that constantly yields, and then checks the return value. Failure() bubbles up, Success() is unwrapped and returned.
<adam12>
banisterfiend: It's been a while since I looked tho.
coniptor has joined #ruby
<banisterfiend>
i like it
Guest85135 has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 268 seconds]
ua has quit [Ping timeout: 264 seconds]
JohanP has quit [Remote host closed the connection]
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
FastJack has joined #ruby
coniptor has quit [Ping timeout: 240 seconds]
dasher00 has quit [Quit: GTFO]
dasher00 has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
coniptor has joined #ruby
ruby[bot] has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
duderonomy has quit [Ping timeout: 256 seconds]
prion has quit [Ping timeout: 240 seconds]
coniptor has quit [Ping timeout: 256 seconds]
GodFather_ has quit [Ping timeout: 264 seconds]
Pierreb has joined #ruby
<Pierreb>
im trying to retrieve a value from a mysql db with mysql2. The problem i have is i get way more than the actual value. {"VERSION()"=>"5.6.21"} when i only want 5.6.21. anyone got a bit of time to see what im doing wrong? https://dpaste.org/oEFb
orbyt_ has joined #ruby
coniptor has joined #ruby
<adam12>
Pierreb: If you're always just retrieving this, I'd probably just do `client.query().values.first` or something.
<Pierreb>
yes its static and only one "value"
<Pierreb>
ill test that adam12
<adam12>
Pierreb: But you could probably extract it if you wanted in the loop. `results.each do |key, value|`.
<leftylink>
https://github.com/brianmario/mysql2#readme says "row is a hash" so the behaviour of {"VERSION()"=>"5.6.21"} seems to be expected. use the usual ways of retrieving information from a hash to get the 5.6.21 out of it, then.