[#405207] Does `self` and `scope(local)` operate parallels? — "Kumar R." <lists@...>

I am heavily confused with the topic when thinking `self` and `local

21 messages 2013/03/01
[#405211] Re: Does `self` and `scope(local)` operate parallels? — "Kumar R." <lists@...> 2013/03/01

Just to help experts out there I am clearing my statement once again

[#405242] Confusion in instance method calls of super class from subclass — "Kumar R." <lists@...>

I was just playing to see the instance method calls from the subclass

16 messages 2013/03/02
[#405252] Re: Confusion in instance method calls of super class from subclass — Hans Mackowiak <lists@...> 2013/03/03

YOU DID NOT READ WHAT I WAS WRITTEN:

[#405250] Extending Ruby. Little help or guidance if you are willing! — Cliff Rosson <cliff.rosson@...>

Hi Folk,

21 messages 2013/03/03
[#405393] Re: Extending Ruby. Little help or guidance if you are willing! — nannasin smith <lists@...> 2013/03/06

I've tried to do some reading but some of this is a bit over my head.

[#405549] Re: Extending Ruby. Little help or guidance if you are willing! — Cliff Rosson <cliff.rosson@...> 2013/03/10

Haven't been able to touch this in a week but I had a few minutes to look

[#405550] Re: Extending Ruby. Little help or guidance if you are willing! — Bartosz Dziewoński <matma.rex@...> 2013/03/10

On Sun, 10 Mar 2013 04:41:32 +0100, Cliff Rosson <cliff.rosson@gmail.com> wrote:

[#405600] Re: Extending Ruby. Little help or guidance if you are willing! — Cliff Rosson <cliff.rosson@...> 2013/03/11

Got ya. So it doesn't really matter if I convert things to ID and compare

[#405271] Confusion with Ruby's "case/when" block statement — "Kumar R." <lists@...>

Ruby uses `===` operator on the `case/when` type execution style.Now It

13 messages 2013/03/03

[#405310] How `next` works in ruby with `unless` ? — "Kumar R." <lists@...>

The `next` statement is used to skip a part of the loop and continue

25 messages 2013/03/04
[#405311] Re: How `next` works in ruby with `unless` ? — Joel Pearson <lists@...> 2013/03/04

Learn what semicolons do in Ruby.

[#405312] Re: How `next` works in ruby with `unless` ? — Matthew Kerwin <matthew@...> 2013/03/04

What Joel said.

[#405313] Re: How `next` works in ruby with `unless` ? — "Kumar R." <lists@...> 2013/03/04

Matthew Kerwin wrote in post #1100097:

[#405323] YourLanguageSucks — Kiswono Prayogo <kiswono@...>

Hi, i found this link.. https://wiki.theory.org/YourLanguageSucks

10 messages 2013/03/05

[#405376] When can one call themselves a “Rubyist”? — Rafal Chmiel <lists@...>

I was wondering what that term even meant. Is it something to do with

10 messages 2013/03/05

[#405400] Bignum-Fixnum-Numeric confusion — Pritam Dey <lists@...>

Hi,

13 messages 2013/03/06

[#405444] Question regarding automating some Outlook/IMAP and pdf parsing functions w/ ruby? — Ed Zimmerman <lists@...>

Hello,

20 messages 2013/03/07

[#405477] Compiling Ruby 2.0, problem with OpenSSL — "Piotr P." <lists@...>

Trying to compile Ruby 2.0 from source, having problem with it, getting

10 messages 2013/03/07

[#405495] RubyExcel class. Useful? — Joel Pearson <lists@...>

I've managed to create a (relatively) stable data-processing class which

32 messages 2013/03/08

[#405570] Confusion with block local variable declaration with block variable declaration within the pipe `|` — Love U Ruby <lists@...>

Why are we not allowed to create local variables or new object with

17 messages 2013/03/11

[#405597] Confusion with empty block printing — Love U Ruby <lists@...>

When I typed the below in my IRB:

18 messages 2013/03/11

[#405608] Access values for JSON.parse response — Nicole Villette <lists@...>

Hello, Does anyone know who to get the values from a nested hash in

17 messages 2013/03/11

[#405630] Confusion with some Module methods. — Love U Ruby <lists@...>

Can anyone help me to understand how the below module methods works?

16 messages 2013/03/12

[#405656] Confusion with Strings — Love U Ruby <lists@...>

From the book I read a line about string :

18 messages 2013/03/12

[#405762] Understanding Ruby Classes, Objects and Methods. — Kedar Mhaswade <lists@...>

Dear Rubyists,

12 messages 2013/03/13

[#405931] Finding one's way with 'super' in define_method/alias_emthod — Marcin Rzeźnicki <marcin.rzeznicki@...>

Hi all!

12 messages 2013/03/18
[#405935] Re: Finding one's way with 'super' in define_method/alias_emthod — Robert Klemme <shortcutter@...> 2013/03/18

On Mon, Mar 18, 2013 at 5:50 PM, Marcin Rze=C5=BAnicki

[#405936] Re: Finding one's way with 'super' in define_method/alias_emthod — "Marcin R." <lists@...> 2013/03/18

Robert Klemme wrote in post #1102151:

[#405942] Re: Finding one's way with 'super' in define_method/alias_emthod — Robert Klemme <shortcutter@...> 2013/03/18

On Mon, Mar 18, 2013 at 8:39 PM, Marcin R. <lists@ruby-forum.com> wrote:

[#405986] Ruby tainting on primitives — "Nicolas V." <lists@...>

Hi there,

18 messages 2013/03/20

[#405987] Why was the object_id for true and nil changed in ruby2.0? — Bharadwaj Srigiriraju <lists@...>

irb(main):001:0> true.object_id

11 messages 2013/03/20

[#406015] fixedpnt 0.0.1: Binary Fixed Point Calculations — Axel Friedrich <lists@...>

https://github.com/Axel2/fixedpnt.rb

12 messages 2013/03/20

[#406184] Nokogiri help parsing HTML — Paul Mena <lists@...>

I'm relatively new to Ruby (and therefore Nokogiri) and am trying to

18 messages 2013/03/26

[#406258] Translation Project — Jeremy Henderson <lists@...>

Hello all! This is my first post! I started learning Ruby about 3 weeks

22 messages 2013/03/28

[#406291] Hash with default — Harry Kakueki <list.push@...>

I would like to make a hash like h2 with the default described by h in one

12 messages 2013/03/29

[#406375] Ruby Gotchas presentation slides — Dave Aronson <rubytalk2dave@...>

I recently made available the slides for a presentation I did

13 messages 2013/03/30

[#406387] Private setters can be called by self, why not getters? — Josh Cheek <josh.cheek@...>

class Counter

9 messages 2013/03/31

Re: Translation Project

From: Julian Leviston <julian@...>
Date: 2013-03-29 16:30:50 UTC
List: ruby-talk #406318

On 30/03/2013, at 2:48 AM, Jeremy Henderson <lists@ruby-forum.com> =
wrote:

> Thank you very much Regis, Justin, and Julian! I am grateful that you=20=

> have taken the time to not just respond, but to make this educational =
as=20
> well, that is exactly what I was looking for.
>=20
> Regis:
>=20
> I have tested your code on codeacademy labs and it does work on 1.8.3,=20=

> but seems to have a problem with not running multiple times, I believe=20=

> that is an issue with their site though. When running, it works very=20=

> smoothly!
>=20
> Recurring issue with it: It cannot accept apostrophe's. It will lock =
up=20
> the site if an apostrophe is anywhere in the text. Which I will work =
on=20
> resolving.
>=20
> Justin:
>=20
> Up until my conversation with Regis yesterday, I had no coding down,=20=

> just the concept. Knowing that there would be multiple possible=20
> approaches, I was wanting to see at least one possible way that =
someone=20
> knew how to do it, and then assess, reconfigure, rebuild, etc...=20
> whatever needed to be done.
>=20
> My goal is to create an encrypter that mimics DNA sequencing which =
only=20
> uses four letters: A, T, G, C. Wherein there is a rule they must =
follow,=20
> A always pairs with T, and C always pairs with G.
>=20
> So this encrypter would take text, reassign it's values to one of the=20=

> four letters (this assigning could then be changed in a whim if anyone=20=

> ever figured it out), and then spit out the result.
>=20
> =
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{=

>=20
> The end product would then be to have a way of re-combining everything=20=

> on the receiving end. Which is the hard part. I want it to take the=20
> code, assess the different possible letters, for instance, "You"=20
> translated in the example above WOULD be "DCD", which then =
re-translated=20
> back COULD be any combination of [S,T,U,V,W,X,Y,Z] [M,N,O,P,Q,R]=20
> [S,T,U,V,W,X,Y,Z]. It would need to compare the possible combinations =
to=20
> a dictionary, which would be ranked on the most probable words, and =
then=20
> spit out the most accurate answer.
>=20
> =
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{=

>=20
> So, there is still a lot of work to do. I just wanted a good footing =
to=20
> base it on. So that's where I'm at now.
>=20
> Julian:
>=20
> Thank you very much for your solution, but also for the detailed=20
> explanation and breakdown! I have learned about a lot of the different=20=

> components you mentioned through Code Academy, but also a lot of them =
I=20
> either haven't gotten to, or they don't teach it. So THANK YOU!
>=20
> I'm going to read through everything bit by bit and see if I can get =
it=20
> to run on code academy labs. Then play with it as need be.
>=20
> Here are the small changes I have made to Regis' solution so far =
(mostly=20
> spacing and rewording of the request for input):
>=20
> $h=3D{
> "A" =3D> %w{A B C D E F},
> "T" =3D> %w{G H I J K L},
> "G" =3D> %w{M N O P Q R},
> "C" =3D> %w{S T U V W X Y Z}
> }
> $reverseh=3D $h.inject({}) { |h,(k,a)| a.each {|l| h[l]=3Dk } ; h }
>=20
> def conv(letter) $reverseh[letter] || letter end
>=20
>=20
> print "DNAS: Sequencing Open... Input? "
> puts " "
> while (word=3D$stdin.gets).size>1
> puts word.chomp.upcase.split(//).map { |l| conv(l) }.join("")
> puts " "
> print "DNAS: Additional Input? "
> puts " "
> end
>=20
>=20
> Again, thank you very much everybody! I don't want anyone to think =
that=20
> I am asking you to do the work for me. I want to learn all of this and=20=

> will do it all myself if it comes to it, it just helps to have solid=20=

> grounding to work with. Not to mention, I will give credit on =
everyone's=20
> contributions at the end of this all and in the final product, unless=20=

> they ask me not to. I'm not here to steal work. :)
>=20
> --=20
> Posted via http://www.ruby-forum.com/.
>=20

class String
def dna_conv
  dict =3D {"A" =3D> "ABCDEF", "B" =3D> "GHIJKL", "C" =3D> "MNOPQR", "D" =
=3D> "STUVWXYZ"}
  self.upcase.each_char.map{|input_char| dict.detect{|key, value| =
value.include?(input_char)}.first}.join
end
end

puts "DNAS: Sequencing Open... Input? "
while (word=3D$stdin.gets.chomp).size>1
  puts word.dna_conv
  puts
  puts "DNAS: Additional Input? "
end

Better?


In This Thread