[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

using ruby for config files

furtive.clown

1/9/2008 8:09:00 AM


(In reference to http://groups.google.com/group/ruby-talk-google/browse_thread/thread/1c1fa0b...
)

I eventually settled on the below for my config file purposes. I
wanted configuration to be convenient and flexible. Using XML or YAML
robs me of the occasional #map, for example. Using a hash for
configuration is too error-prone; I should assume those doing the
configuring have no knowledge of ruby. That is,

foo = "bar"
size = 44

is a better config file than

{
:foo => "bar",
:size => 44,
}

So here is what I use:

module ConfigReader_m
module Util
def self.file_contents(filename)
File.open(filename) { |f|
f.read
}
end

def self.no_verbose
previous_verbose = $VERBOSE
begin
$VERBOSE = nil
yield
ensure
$VERBOSE = previous_verbose
end
end
end

def config_each_pair(config_code)
previous_locals = local_variables
config_locals = eval(config_code + "\n" + "local_variables")
(config_locals - previous_locals).each { |name|
yield(name, eval(name))
}
end

def config_to_hash(config_code)
hash = Hash.new
config_each_pair(config_code) { |name, value|
hash[name] = value
}
hash
end

def config_to_open_struct(config_code)
require 'ostruct'
OpenStruct.new(config_to_hash(config_code))
end

def config_to_instance_variables(config_code)
config_each_pair(config_code) { |name, value|
ivar = "@" + name
existing_value = Util.no_verbose {
instance_variable_get(ivar)
}
if existing_value
raise "instance variable already set: #{name}"
end
instance_variable_set(ivar, value)
}
end

def config_file_each_pair(config_file)
config_each_pair(Util.file_contents(config_file))
end

def config_file_to_hash(config_file)
config_to_hash(Util.file_contents(config_file))
end

def config_file_to_open_struct(config_file)
config_to_open_struct(Util.file_contents(config_file))
end

def config_file_to_instance_variables(config_file)
config_to_instance_variables(Util.file_contents(config_file))
end
end

class ConfigReader
include ConfigReader_m
end

class Foo
include ConfigReader_m

def initialize(config)
config_to_instance_variables(config)
end

def test_config
print "@version: "
p @version
print "@format_spec: "
p @format_spec
print "@source_files: "
p @source_files
end
end

config = %q{
version = 3
format_spec = "format.xml"
source_files = %w(a b c).map { |base|
base + ".cxx"
}
}

def sep(header)
puts "-"*10 + header
end

sep("config_each_pair")
ConfigReader.new.config_each_pair(config) { |key, value|
print "#{key}: "
p value
}

sep("config_to_hash")
p ConfigReader.new.config_to_hash(config)

sep("config_to_open_struct")
p ConfigReader.new.config_to_open_struct(config)

sep("config_to_instance_variables")
Foo.new(config).test_config

output:

----------config_each_pair
version: 3
format_spec: "format.xml"
source_files: ["a.cxx", "b.cxx", "c.cxx"]
----------config_to_hash
{"source_files"=>["a.cxx", "b.cxx", "c.cxx"], "version"=>3,
"format_spec"=>"format.xml"}
----------config_to_open_struct
#<OpenStruct version=3, format_spec="format.xml",
source_files=["a.cxx", "b.cxx", "c.cxx"]>
----------config_to_instance_variables
@version: 3
@format_spec: "format.xml"
@source_files: ["a.cxx", "b.cxx", "c.cxx"]

Since OpenStruct is often the nicest choice, and since ostruct is
underused by newcomers (both my opinion only), I provided it for
convenience.

If you wish to provide a restricted list of local variables which will
become configuration parameters (only), you can do this:

config = %q{
version = 3
format_spec = "format.xml"
source_files = %w(a b c).map { |base|
base + ".cxx"
}
local_variables = ["version", "format_spec"]
}
10 Answers

Marc Heiler

1/9/2008 9:00:00 AM

0

Hmm the config style looks nice, but the code looks a bit complex?

I use yaml right now even though it has a few disadvantages (for me in
this regard) because of indent (where a user may get parse errors).
And from this yaml info I generate or build system info, on top of it.

I think what would be cool, would be a minimal "config" interpreter with
only
a very few (but still quite) readable lines of ruby code. (Anyway,
that's just my opinion)
--
Posted via http://www.ruby-....

Karl von Laudermann

1/9/2008 2:45:00 PM

0

On Jan 9, 3:09 am, furtive.cl...@gmail.com wrote:
> I eventually settled on the below for my config file purposes. I
> wanted configuration to be convenient and flexible. Using XML or YAML
> robs me of the occasional #map, for example. Using a hash for
> configuration is too error-prone; I should assume those doing the
> configuring have no knowledge of ruby. That is,
>
> foo = "bar"
> size = 44

If you just want to have configuration files that are little more than
key/value pairs, why not use the Windows INI file format? There are
already ruby gems that provide read/write access to INI files:

$ gem list ini -r -d

*** REMOTE GEMS ***

ini (0.1.1)
INI file reader and writer

inifile (0.1.0)
INI file reader and writer

furtive.clown

1/9/2008 5:35:00 PM

0

On Jan 9, 9:44 am, Karl von Laudermann <doodpa...@mailinator.com>
wrote:
>
> If you just want to have configuration files that are little more than
> key/value pairs, why not use the Windows INI file format? There are
> already ruby gems that provide read/write access to INI files:

Because using XML, YAML, or INI files robs me of the occasional #map,
for instance, as shown in my example. The whole point is that I
*don't* want configuration files that are little more than key/value
pairs. Even if that was the case at the beginning of the project,
eventually it becomes too restrictive as the project grows.

--FC

James Gray

1/9/2008 6:26:00 PM

0

On Jan 9, 2008, at 11:35 AM, furtive.clown@gmail.com wrote:

> On Jan 9, 9:44 am, Karl von Laudermann <doodpa...@mailinator.com>
> wrote:
>>
>> If you just want to have configuration files that are little more
>> than
>> key/value pairs, why not use the Windows INI file format? There are
>> already ruby gems that provide read/write access to INI files:
>
> Because using XML, YAML, or INI files robs me of the occasional #map,
> for instance, as shown in my example. The whole point is that I
> *don't* want configuration files that are little more than key/value
> pairs. Even if that was the case at the beginning of the project,
> eventually it becomes too restrictive as the project grows.

I sometimes use the stupid simple:

#!/usr/bin/env ruby -wKU

require "ostruct"

module Config
module_function

def load_config_file(path)
eval <<-END_CONFIG
config = OpenStruct.new
#{File.read(path)}
config
END_CONFIG
end
end

__END__

Here are the tests:

#!/usr/bin/env ruby -wKU

require "test/unit"
require "tempfile"

require "config"

class TestConfig < Test::Unit::TestCase
def test_config_returns_a_customized_ostruct
assert_instance_of(OpenStruct, config)
end

def
test_config_object_is_passed_into_the_file_and_used_to_set_options
c = config(<<-END_SETTINGS)
config.string_setting = "just a String"
config.integer_setting = 41
END_SETTINGS
assert_equal("just a String", c.string_setting)
assert_equal(41, c.integer_setting)
end

def test_exceptions_bubble_up_to_the_caller
assert_raise(RuntimeError) do
config(<<-END_ERROR)
raise "Oops!"
END_ERROR
end
end

private

def config(content = String.new)
cf = Tempfile.new("ender_config_test")
cf << content
cf.flush
Config.load_config_file(cf.path)
end
end

__END__

James Edward Gray II

Dick Davies

1/10/2008 8:53:00 PM

0

I used to love YAML but the whitespace / indent issue has bitten me
too many times.

I needed a config file today, and eventually went for a
lib/config.rb like:

CONFIG = {
:servera => {
:hostname => 'a.com',
:remote_user => 'usera'
},
:serverb => {
:hostname => 'b.org',
:remote_user => 'userb'
}
}

I just load it in with 'require config'.

I know it's a bit cryptic to non-rubyists (compared to e.g. yaml)
but it has the HUGE advantage of being easy to validate (ruby -wc
lib/config.rb).

Be interested to know how others do it - an include/mixin maybe?


On Jan 9, 2008 9:00 AM, Marc Heiler <shevegen@linuxmail.org> wrote:
> Hmm the config style looks nice, but the code looks a bit complex?
>
> I use yaml right now even though it has a few disadvantages (for me in
> this regard) because of indent (where a user may get parse errors).
> And from this yaml info I generate or build system info, on top of it.
>
> I think what would be cool, would be a minimal "config" interpreter with
> only
> a very few (but still quite) readable lines of ruby code. (Anyway,
> that's just my opinion)


--
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.helloope...

Naresh Ramaswamy

12/30/2008 9:00:00 AM

0

hi,

I am new to Ruby and this thread was one of the solution I was looking
for.

May be my question must be very basic :(

Based on the Dick Davies comment I would like to use the config as
described.
But can someone let me know how to use the variables defined in this
config file.

viz., I want to call the value of :hostname from another ruby file, how
shall I do this?

Thanks



--
Posted via http://www.ruby-....

Fat Wo

2/19/2014 10:36:00 PM

0


Not only because of their dimmer of hope of economic outlook, but also
because of their destiny of standing that doubted them in their own country,
Hong Kong. However, this is expected, the destiny of Hong Kong people has
depressed them further into a dimmed view of their economic outlooks.

Economic outlook is problem of every country, so to speak. The only way is
to have equal share of businesses and employments between countries.

Comparing the base number of a population of one country like China, with
another smaller population, like Hong Kong is not a good way to drum up
their comparisons, that can give them their sense of disparity of between
competitiveness, for currently in this world, no country is able to compete
with China in terms of







wrote in message
news:71b03880-d536-40b1-b768-e33a5ab9731d@googlegroups.com...

On Wednesday, February 19, 2014 2:01:27 PM UTC-5, Fatty Wo, Orillia,
Ontario, Canada wrote:
> Seriously ,there is no real democracy between the past and present
> regimes.
>
> But there is a difference between now and then.
>
>
>
> Are the people driven to the edge before or now?
>
>
>
> If a national poll is carried by an independent poll consultant, how many
>
> Hongkongers are shown happy and satisfied than before and after, now ?
>
>
>
> A poll can tell a lot of how Hong Kongers would think of their future.

Hong Kongers are unhappy because of dimmer than ever economic outlook
unrelated to democracy.

Hong Kong's competitive environment are changing. Mainland China's
population 200 times that of Hong Kong. It means mainland China has 200
times of Hong Kong's talented people. For every high paying job, Hong
Kongers now have 200 competitors. Many of them would probably take the same
for less. Before mainland China had opened up, Hong Kong is the only
location to get in and out of China. Not any more.

>
>

>
> "Jesus 's Mother Mary copied Hera Godeese of Earth" wrote in message
>
> news:67800f5c-7376-4601-b2ca-0845e39b89ce@googlegroups.com...
>
>
>
> HONG KONG never have REAL DEMOCRACY
>
>
>
>
>
>
>
>
>
> Tuesday, February 18, 2014 1:19:47 PM UTC-8, ltl...@hotmail.com wrote:
>
> > http://www.scmp.com/news/hong-kong/article/1430175/hong-kong-and-macau-affairs-office-joins-backlash-agai...
>
> >
>
> >
>
> >
>
> > "On Sunday about 100 protesters marched from the Star Ferry pier to
> > Canton
>
> > Road, a street lined with luxury stores popular with mainland tourists.
>
> >
>
> >
>
> >
>
> > They called the tourists "locusts" for overwhelming the city and hogging
>
> > its resources and referred to them as Shina, a derogatory term used by
> > the
>
> > Japanese against the Chinese after the first Sino-Japanese war ended in
>
> > 1895.
>
> >
>
> >
>
> >
>
> > Police intervened when scuffles broke out between the demonstrators and
>
> > passers-by opposed to the march.
>
> >
>
> >
>
> >
>
> > Protest organiser Ronald Leung Kam-shing, 37, yesterday apologised to
> > the
>
> > businesses and tourists - mainlanders and foreigners - affected by the
>
> > "unexpected chaos".
>
> >
>
> >
>
> >
>
> > "I apologise to the tourists. Some protesters went a bit radical. As the
>
> > organiser ... I should say sorry," he said. But he stressed he was not
>
> > apologising for organising the protest, because everyone has freedom of
>
> > assembly."
>
> >
>
> >
>
> >
>
> > Hong Kong's democratic future looks dimer and dimer as more
> > short-sighted
>
> > Hong Kongers agitate to divide the people. Democracy means rule by the
>
> > people. However, rule by the people begins with one people. Peoples
> > cannot
>
> > rule, they will only fight. If a society is divided, no amount of voting
>
> > can make the divided populace into one people. Voting is then nothing
> > but
>
> > a tool for some to exercise the tyranny of the majority.
>
> >
>
> >
>
> >
>
> > Making the Hong Kong people one people is a prerequisite for democracy.
> > No
>
> > one people, no rule by the people.
>
> >
>
> >
>
> >
>
> > (Crossposted to other groups welcomed.)

Fat Wo

2/20/2014 12:27:00 AM

0

Not only because of their dimmer of hope of economic outlook, but also
because of their destiny of standing that doubted them in their own country,
Hong Kong. However, this is expected, the destiny of Hong Kong people has
depressed them further into a dimmed view of their economic outlooks.
Economic outlook is problem of every country, so to speak. The only way is
to have equal share of businesses and employments between countries.

Comparing the base number of a population of one country like China, with
another smaller population, like Hong Kong is not a good way to drum up
their comparisons, that can give them their sense of disparity of between
competitiveness, for currently in this world, no country is able to compete
with China in terms of range and variety of resourcing available resources
like, materials, prices, labors, suppliers, factories, shipping, etc.






wrote in message
news:71b03880-d536-40b1-b768-e33a5ab9731d@googlegroups.com...

On Wednesday, February 19, 2014 2:01:27 PM UTC-5, Fatty Wo, Orillia,
Ontario, Canada wrote:
> Seriously ,there is no real democracy between the past and present
> regimes.
>
> But there is a difference between now and then.
>
>
>
> Are the people driven to the edge before or now?
>
>
>
> If a national poll is carried by an independent poll consultant, how many
>
> Hongkongers are shown happy and satisfied than before and after, now ?
>
>
>
> A poll can tell a lot of how Hong Kongers would think of their future.

Hong Kongers are unhappy because of dimmer than ever economic outlook
unrelated to democracy.

Hong Kong's competitive environment are changing. Mainland China's
population 200 times that of Hong Kong. It means mainland China has 200
times of Hong Kong's talented people. For every high paying job, Hong
Kongers now have 200 competitors. Many of them would probably take the same
for less. Before mainland China had opened up, Hong Kong is the only
location to get in and out of China. Not any more.

>
>

>
> "Jesus 's Mother Mary copied Hera Godeese of Earth" wrote in message
>
> news:67800f5c-7376-4601-b2ca-0845e39b89ce@googlegroups.com...
>
>
>
> HONG KONG never have REAL DEMOCRACY
>
>
>
>
>
>
>
>
>
> Tuesday, February 18, 2014 1:19:47 PM UTC-8, ltl...@hotmail.com wrote:
>
> > http://www.scmp.com/news/hong-kong/article/1430175/hong-kong-and-macau-affairs-office-joins-backlash-agai...
>
> >
>
> >
>
> >
>
> > "On Sunday about 100 protesters marched from the Star Ferry pier to
> > Canton
>
> > Road, a street lined with luxury stores popular with mainland tourists.
>
> >
>
> >
>
> >
>
> > They called the tourists "locusts" for overwhelming the city and hogging
>
> > its resources and referred to them as Shina, a derogatory term used by
> > the
>
> > Japanese against the Chinese after the first Sino-Japanese war ended in
>
> > 1895.
>
> >
>
> >
>
> >
>
> > Police intervened when scuffles broke out between the demonstrators and
>
> > passers-by opposed to the march.
>
> >
>
> >
>
> >
>
> > Protest organiser Ronald Leung Kam-shing, 37, yesterday apologised to
> > the
>
> > businesses and tourists - mainlanders and foreigners - affected by the
>
> > "unexpected chaos".
>
> >
>
> >
>
> >
>
> > "I apologise to the tourists. Some protesters went a bit radical. As the
>
> > organiser ... I should say sorry," he said. But he stressed he was not
>
> > apologising for organising the protest, because everyone has freedom of
>
> > assembly."
>
> >
>
> >
>
> >
>
> > Hong Kong's democratic future looks dimer and dimer as more
> > short-sighted
>
> > Hong Kongers agitate to divide the people. Democracy means rule by the
>
> > people. However, rule by the people begins with one people. Peoples
> > cannot
>
> > rule, they will only fight. If a society is divided, no amount of voting
>
> > can make the divided populace into one people. Voting is then nothing
> > but
>
> > a tool for some to exercise the tyranny of the majority.
>
> >
>
> >
>
> >
>
> > Making the Hong Kong people one people is a prerequisite for democracy.
> > No
>
> > one people, no rule by the people.
>
> >
>
> >
>
> >
>
> > (Crossposted to other groups welcomed.)

bmoore

2/20/2014 4:18:00 AM

0

On Wednesday, February 19, 2014 3:54:23 PM UTC-8, lo yeeOn wrote:
> In article <71b03880-d536-40b1-b768-e33a5ab9731d@googlegroups.com>,
>
> ltlee1@hotmail.com <ltlee1@hotmail.com> wrote:
>
> >On Wednesday, February 19, 2014 2:01:27 PM UTC-5, Fatty Wo, Orillia,
>
> >Ontario, Canada wrote:
>
> >> Seriously ,there is no real democracy between the past and present regimes.
>
> >>
>
> >> But there is a difference between now and then.
>
> >>
>
> >>
>
> >>
>
> >> Are the people driven to the edge before or now?
>
> >>
>
> >>
>
> >>
>
> >> If a national poll is carried by an independent poll consultant, how many
>
> >>
>
> >> Hongkongers are shown happy and satisfied than before and after, now ?
>
> >>
>
> >>
>
> >>
>
> >> A poll can tell a lot of how Hong Kongers would think of their future.
>
> >
>
> >Hong Kongers are unhappy because of dimmer than ever economic outlook
>
> >unrelated to democracy.
>
> >
>
> >Hong Kong's competitive environment are changing. Mainland China's
>
> >population 200 times that of Hong Kong. It means mainland China has 200
>
> >times of Hong Kong's talented people. For every high paying job, Hong
>
> >Kongers now have 200 competitors. Many of them would probably take the
>
> >same for less. Before mainland China had opened up, Hong Kong is the
>
> >only location to get in and out of China. Not any more.
>
>
>
> I agree. I was a resident there once. I left and have yet to return,
>
> not even for a visit. But never say never!:)
>
>
>
> People there never had much of any kind of freedom to begin with,
>
> except for the freedom to make some money,

Well, that's completely wrong. Yawn.


ltlee1

2/20/2014 4:08:00 PM

0

On Wednesday, February 19, 2014 11:08:01 PM UTC-5, lo yeeOn wrote:
> In article <71b03880-d536-40b1-b768-e33a5ab9731d@googlegroups.com>,
>
> ltlee1@hotmail.com <ltlee1@hotmail.com> wrote:
>
> >On Wednesday, February 19, 2014 2:01:27 PM UTC-5, Fatty Wo, Orillia,
>
> >Ontario, Canada wrote:
>
> >> Seriously ,there is no real democracy between the past and present regimes.
>
> >>
>
> >> But there is a difference between now and then.
>
> >>
>
> >>
>
> >>
>
> >> Are the people driven to the edge before or now?
>
> >>
>
> >>
>
> >>
>
> >> If a national poll is carried by an independent poll consultant, how many
>
> >>
>
> >> Hongkongers are shown happy and satisfied than before and after, now ?
>
> >>
>
> >>
>
> >>
>
> >> A poll can tell a lot of how Hong Kongers would think of their future.
>
> >
>
> >Hong Kongers are unhappy because of dimmer than ever economic outlook
>
> >unrelated to democracy.
>
> >
>
> >Hong Kong's competitive environment are changing. Mainland China's
>
> >population 200 times that of Hong Kong. It means mainland China has 200
>
> >times of Hong Kong's talented people. For every high paying job, Hong
>
> >Kongers now have 200 competitors. Many of them would probably take the
>
> >same for less. Before mainland China had opened up, Hong Kong is the
>
> >only location to get in and out of China. Not any more.
>
>
>
> I agree. I was a resident there once. I left and have yet to return,
>
> not even for a visit. But never say never!:)
>
>
>
> People there never had much of any kind of freedom to begin with,
>
> except for the freedom to make some money, the old-fashioned way,
>
> after the collapse of the Nationalist government.
>
>
>
> Before that Hong Kong was a British colony with limited significance
>
> as a port city - second to Canton, which in turn was second to
>
> Shanghai.
>
>
>
> And before that, it was just a Chinese fishing outpost - remember that
>
> Hong Kong proper was only a small island, which could not have
>
> supported a population comparable to that of Canton, much less
>
> Shanghai. And keep in mind that China has always been a very populous
>
> country, for better or worse, which was mostly for worse throughout
>
> its long history.
>
>
>
> But the kind of prosperity that was brought to Hong Kong by the
>
> fleeing millionaires from Shanghai when the Nationalist government
>
> collapsed was not the scalable kind.
>
>
>
> While Hong Kong suddenly replaced Shanghai and Canton as a financial
>
> center in that part of the globe at the time, the wealth was not well
>
> distributed. Along with the growth of economic activity, there was a
>
> even more massive growth of population, thanks to the "refugees" from
>
> the communists who took over China.
>
>
>
> Furthermore, the Nationalist government cooped up in Taiwan was still
>
> harboring hope of reconquering the mainland some day and thus was
>
> feeding a not-so-insignificant anti-communist population that would
>
> not have a reason to exist in the British colony before.
>
>
>
> A reaction naturally arose in response to such an activity. And the
>
> communists would not be out-done, thereby adding another roughly
>
> same-sized population to the colony that would certainly not have
>
> existed before, especially when they were needed to fight the invading
>
> Japanese and the Nationalist forces in the mainland.
>
>
>
> Last, but not the least, was the population we must include from all
>
> the western-subsidized churches from the fertile region near Shanghai
>
> and Nanjing and from Canton.
>
>
>
> Hong Kong was in fact suffocated by such a population explosion.
>
>
>
> Whatever manufacturing industry that sprang up would support only
>
> low-wage workers. The concept of scalability did not exist. Same
>
> with the service sector. Low-wage earners remained low-wage earners
>
> and many lived in resettlement highrises or rented only a bunkbed in
>
> a bunkhall, with shared kitchen and bathroom.
>
>
>
> There was no hope for the people who lived like that. Not only that
>
> they couldn't vote, they had no other form of freedom to speak of.
>
>
>
> Today, Hong Kong remains as static as those very bad old days. It
>
> doesn't have a scalable economy - precisely because it has no way to
>
> support a scalable economy.
>
>
>
> Today, through China's subsidy, it has much better tertiary-level
>
> education institutions. But that's all. People who used to rent a
>
> bunkbed in a bunkhall now rent a cage (in a cage-hall), which is
>
> somewhat more secure than just a bunkbed, one can presume.
>
>
>
> So, what prospect holds for Hong Kong?
>
>
>
> Obviously, there is no future for most of its population because of
>
> its natural limitations we've just talked about.
>
>
>
> Young people who can manage have made their homes elsewhere: Canada,
>
> the US, Taiwan, ... That has been the trend.
>
>
>
> But when China eclipses those places, which should be in the near
>
> future, in terms of graduate school training and job opportunities,
>
> they will most likely make their homes in China, near where they will
>
> have their dream jobs.
>
>
>
> China, with its economy and soft power, will have the long-term effect
>
> of re-equilibrating the population of Hong Kong. And Hong Kong will,
>
> once again, be a quiet port city, not unlike that 100 years ago.
>
>
>
> In that foreseeable future, we will hopefully see those human cages
>
> taken down to make room suited for normal dwelling.
>
>
>
> So it should, because there is no glory, no freedom, and no happiness
>
> for a human being to be living in a cage big only enough for him to
>
> sleep in.
>
>
>
> The living situation in Hong Kong is really, really shameful and that
>
> has been one reason for the frustration expressed at those small
>
> protests that we have seen in the media today.
>
>
>
> The situation in Macau is roughly the same, although the crowdedness
>
> is not nearly as bad. But how can a city relying on gambling survive
>
> "autonomously"?
>
>
>
> China has been subsidizing Hong Kong and Macau because it is the most
>
> peaceful way to humor a dying anti-communist population that is doomed
>
> to pass.

In the West, one only hears anti-communist voice from Hong Kong. But this creates the illusion that Hong Kong is anti-communist. Hong Kongers are divided between those who were pro-KMT/anti-communist and those who are pro-communist. Following China's opening up, KMT influence faded out. At present, the older generation are more pro-communist than ever. The younger generation, however, are deluded by Hong Kong's so called "democratic" leaders.

> lo yeeOn
>
>
>
> >
>
> >>
>
> >>
>
> >
>
> >>
>
> >> "Jesus 's Mother Mary copied Hera Godeese of Earth" wrote in message
>
> >>
>
> >> news:67800f5c-7376-4601-b2ca-0845e39b89ce@googlegroups.com...
>
> >>
>
> >>
>
> >>
>
> >> HONG KONG never have REAL DEMOCRACY
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >> Tuesday, February 18, 2014 1:19:47 PM UTC-8, ltl...@hotmail.com wrote:
>
> >>
>
> >> >
>
> >http://www.scmp.com/news/hong-kong/article/1430175/hong-kong-and-macau-affairs-office-joins-backlash-agai...
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > "On Sunday about 100 protesters marched from the Star Ferry pier to Canton
>
> >>
>
> >> > Road, a street lined with luxury stores popular with mainland tourists.
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > They called the tourists "locusts" for overwhelming the city and hogging
>
> >>
>
> >> > its resources and referred to them as Shina, a derogatory term used by the
>
> >>
>
> >> > Japanese against the Chinese after the first Sino-Japanese war ended in
>
> >>
>
> >> > 1895.
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > Police intervened when scuffles broke out between the demonstrators and
>
> >>
>
> >> > passers-by opposed to the march.
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > Protest organiser Ronald Leung Kam-shing, 37, yesterday apologised to the
>
> >>
>
> >> > businesses and tourists - mainlanders and foreigners - affected by the
>
> >>
>
> >> > "unexpected chaos".
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > "I apologise to the tourists. Some protesters went a bit radical. As the
>
> >>
>
> >> > organiser ... I should say sorry," he said. But he stressed he was not
>
> >>
>
> >> > apologising for organising the protest, because everyone has freedom of
>
> >>
>
> >> > assembly."
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > Hong Kong's democratic future looks dimer and dimer as more short-sighted
>
> >>
>
> >> > Hong Kongers agitate to divide the people. Democracy means rule by the
>
> >>
>
> >> > people. However, rule by the people begins with one people. Peoples cannot
>
> >>
>
> >> > rule, they will only fight. If a society is divided, no amount of voting
>
> >>
>
> >> > can make the divided populace into one people. Voting is then nothing but
>
> >>
>
> >> > a tool for some to exercise the tyranny of the majority.
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > Making the Hong Kong people one people is a prerequisite for democracy. No
>
> >>
>
> >> > one people, no rule by the people.
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > (Crossposted to other groups welcomed.)
>
> >