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?
<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>
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]