jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
Rounin has quit [Ping timeout: 255 seconds]
ur5us has quit [Ping timeout: 244 seconds]
nirvdrum has quit [Quit: nirvdrum]
nirvdrum has joined #ruby
favadi has joined #ruby
artemis has joined #ruby
oxfuxxx has quit [Ping timeout: 268 seconds]
favadi has quit [Ping timeout: 268 seconds]
artemis has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
nirvdrum has quit [Quit: nirvdrum]
Al2O3 has quit [Quit: I'm quitting, thanks for all the sharks.]
ur5us has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
eddof13 has joined #ruby
nirvdrum has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
oxfuxxx has joined #ruby
Al2O3 has joined #ruby
desnudopenguino has quit [Ping timeout: 255 seconds]
artemis has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
sympt has quit [Ping timeout: 260 seconds]
John_Ivan has quit [Ping timeout: 268 seconds]
eddof13 has quit [Ping timeout: 268 seconds]
Aminda has quit [*.net *.split]
aeris has quit [*.net *.split]
aeris has joined #ruby
Aminda has joined #ruby
Al2O3 has quit [Ping timeout: 244 seconds]
nirvdrum has joined #ruby
artemis has quit [Ping timeout: 268 seconds]
_ht has joined #ruby
aeris has quit [Ping timeout: 258 seconds]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
aeris has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
dviola has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
nirvdrum has joined #ruby
nirvdrum has quit [Ping timeout: 268 seconds]
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp- has joined #ruby
Sankalp- is now known as Sankalp
_ht has quit [Quit: _ht]
ur5us has quit [Ping timeout: 255 seconds]
nirvdrum has joined #ruby
summerisle is now known as eof
TomyWork has joined #ruby
CelticSeaSalt1 has joined #ruby
CelticSeaSalt1 has quit [Quit: Client closed]
Rounin has joined #ruby
aandre has joined #ruby
Linux_Kerio has joined #ruby
jetchisel has joined #ruby
dionysus69 has joined #ruby
jetchisel has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
nirvdrum has quit [Ping timeout: 244 seconds]
jetchisel has joined #ruby
ur5us has joined #ruby
hightower3 has quit [Ping timeout: 268 seconds]
hightower2 has joined #ruby
hightower2 has quit [Ping timeout: 268 seconds]
aandre has quit [Read error: Connection reset by peer]
aandre has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
<madprops> what are some tools used for linux-administrating scripts with ruby? or is that mostly dawn with vanilla ruby?
oxfuxxx has joined #ruby
<madprops> s/dawn/done O_o
<madprops> like to get arguments seems I can use the ARGV array
<madprops> now im going to try read/writing files, and executing commands
jpn has quit [Ping timeout: 255 seconds]
<adam12> madprops: I use vanilla Ruby most of the time. Sometimes paired with the FileUtils module.
<adam12> and Open3/OptionParser sometimes as well.
dionysus69 has joined #ruby
<madprops> i see
<madprops> im now wondering how to turn this python to ruby https://gist.github.com/madprops/b97430dfde9ab92ef64bd8c2335f01b5
<madprops> or wait maybe not that
gr33n7007h is now known as Guest6870
Guest6870 has quit [Killed (copper.libera.chat (Nickname regained by services))]
<madprops> ok edited it. I mean, how could I "feed" a command with a string
Guest6870 has joined #ruby
<madprops> like i do with communicate
<madprops> in the gist I feed it with ("\n".join(opts)
ur5us has quit [Ping timeout: 244 seconds]
artemis has joined #ruby
<adam12> madprops: I'd use Open3 here. https://docs.ruby-lang.org/en/master/Open3.html
<adam12> madprops: you could use IO.popen as well, but I find Open3 a bit more versatile.
oxfuxxx has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
jpn has joined #ruby
c10l has quit [Read error: Connection reset by peer]
c10l has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
artemis has quit [Ping timeout: 268 seconds]
Guest6870 is now known as gr33n7007h
oxfuxxx has joined #ruby
jpn has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
szkl has quit []
szkl has joined #ruby
artemis has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
nirvdrum has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
desnudopenguino has joined #ruby
artemis has quit [Ping timeout: 252 seconds]
nirvdrum has quit [Quit: nirvdrum]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
oxfuxxx has joined #ruby
artemis has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
Liothen has quit [Read error: Connection reset by peer]
Liothen has joined #ruby
John_Ivan has joined #ruby
sagax has joined #ruby
dionysus69 has joined #ruby
Rounin has quit [Read error: Connection reset by peer]
pgib has quit [Quit: 00 PC LOAD LETTER]
artemis has quit [Read error: Connection reset by peer]
Pixi has quit [Quit: Leaving]
oxfuxxx has joined #ruby
Guest74 has joined #ruby
artemis has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
bit4bit has joined #ruby
sol_ is now known as sol
<Guest74> Hi everyone,
<Guest74> Could you help me please to solve the task?
<Guest74> The task:
<Guest74> There is a hash where each letter of the alphabet corresponds to a number. I need to convert the letters into numbers. For example, I write a sentence, and a get numbers in return.
<Guest74> Example:
<Guest74> hh = { 'a' => 1, 'b' => 2 }
<Guest74> I insert a string: ab
<Guest74> I get in return: 12
<Guest74> Could you tell me please, the solution of this problem with a code example?
<Guest74> Thank you in advance! :)
artemis has quit [Ping timeout: 268 seconds]
<leftylin1> pandabot: ri String#each_char
<leftylin1> that will be an enumerator
<leftylin1> pandabot: ri Enumerator#map
<leftylin1> map will certainly be useful
<leftylin1> now, I don't want to be too confusing, but Hash#to_proc could certainly be helpful here, but using it *is not required*, just an interesting advancement to make to the basic solution
<leftylin1> pandabot: ri Hash#to_proc
bit4bit has quit [Ping timeout: 244 seconds]
<leftylin1> those are what come to mind for this problem. and the documentation already contains the code examples, as requested.
<leftylin1> so that concludes the answer to the above question
Pixi has joined #ruby
<Guest74> Ok, thanks.
bit4bit has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
kenichi has quit [Changing host]
kenichi has joined #ruby
fercell has quit [Ping timeout: 255 seconds]
TomyWork has quit [Remote host closed the connection]
<havenwood> Guest74: I'd use #gsub and take advantage of Hash#to_proc leftylin1 mentioned.
<havenwood> >> 'ab'.gsub(/./, &hh)
bit4bit has quit [Ping timeout: 260 seconds]
_ht has joined #ruby
<Guest74> havenwood: Thanks a lot! :)
jpn has joined #ruby
oxfuxxx has joined #ruby
artemis has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
pgib has joined #ruby
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
oxfuxxx has joined #ruby
Guest74 has quit [Quit: Client closed]
artemis has quit [Ping timeout: 260 seconds]
Linux_Kerio has quit [Ping timeout: 268 seconds]
ancients6 has joined #ruby
bit4bit has joined #ruby
SebastianM has joined #ruby
<SebastianM> Hey guys just a quick question. I've compiled statically ruby and now have 4Mb file that accepts ruby scripts and 83Mb libruby_static.a How can I import a library? Is the .a file that has all the libraries?
_ht has quit [Quit: _ht]
jpn has quit [Ping timeout: 268 seconds]
SebastianM has quit [Quit: Bye]
dionysus69 has quit [Ping timeout: 268 seconds]
ancients6 has quit [Ping timeout: 252 seconds]
oxfuxxx has quit [Ping timeout: 268 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
oxfuxxx has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
dviola has quit [Quit: WeeChat 3.6]
oxfuxxx has quit [Ping timeout: 252 seconds]
oxfuxxx has joined #ruby
ur5us has joined #ruby
bit4bit has quit [Ping timeout: 260 seconds]
oxfuxxx has quit [Ping timeout: 252 seconds]
Al2O3 has joined #ruby
dionysus69 has joined #ruby
CrazyEddy has quit [Ping timeout: 255 seconds]
nirvdrum has joined #ruby
CrazyEddy has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
dionysus69 has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
oxfuxxx has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
oxfuxxx has quit [Ping timeout: 252 seconds]
ancients6 has joined #ruby
sagax has quit [Quit: Konversation terminated!]
finsternis has quit [Read error: Connection reset by peer]