[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby in a C# program

Leslie Viljoen

7/26/2006 6:58:00 AM

Hi!

Is there a way to embed a Ruby interpreter into a C# program? I can
call Ruby from C# fine, and then parse the console output, but I'm
wondering if there's not a better way.

I have tried the Ruby .NET compiler here:
http://plas.fit.qut.edu.au/Ruby.NET/Dow...

...but I get "undefined Resolver in Syck" when trying to compile YAML.

Any ideas?

Les

3 Answers

Christian Madsen

7/27/2006 1:42:00 PM

0

Hi Les,

The pickaxe book gives a very good example of using Ruby from c. When
Ruby can be called from C, it can easily be called from C# using
P/Invoke.

Rgds,
Christian

Leslie Viljoen skrev:

> Hi!
>
> Is there a way to embed a Ruby interpreter into a C# program? I can
> call Ruby from C# fine, and then parse the console output, but I'm
> wondering if there's not a better way.
>
> I have tried the Ruby .NET compiler here:
> http://plas.fit.qut.edu.au/Ruby.NET/Dow...
>
> ..but I get "undefined Resolver in Syck" when trying to compile YAML.
>
> Any ideas?
>
> Les

jane

8/12/2010 2:16:00 PM

0

On Aug 11, 3:52 am, Abel <abelmalc...@gmail.com> wrote:
> From:
>
> http://www.washingtonpost.com/wp-dyn/content/article/2010/0......
>
> FIVE MYTHS ABOUT THE BUSH TAX CUTS
>
> By William G. Gale
> Sunday, August 1, 2010
>
> The tax cuts enacted in 2001 and 2003, known as the Bush tax cuts, are
> set to expire Dec. 31, and the fight over what to do is increasingly
> heated.  Should the tax cuts expire, as some Democrats have said?
> Should they be extended, as most Republicans maintain?  Or does the
> answer lie somewhere in between, as the Obama administration, led by
> Treasury Secretary Timothy Geithner, has argued in recent weeks?
>
> The cuts lowered tax rates across the board on income, dividends and
> capital gains; eventually eliminated the estate tax; further lowered
> burdens on married couples, parents and the working poor; and
> increased tax credits for education and retirement savings.  President
> Barack Obama's proposal would extend most of these reductions,
> allowing only those for individuals making more than $200,000 and
> families making more than $250,000 to expire.
>
> Complicating the debate is a gloomy economic and fiscal outlook, one
> that is decidedly different from the rosy scenario that prevailed at
> the beginning of the last decade.  That outlook has given rise to a
> number of stubborn myths about what extending the Bush tax cuts would
> - or wouldn't - do.
>
> Myth # 1:  Extending the tax cuts would be a good way to stimulate the
> economy.
>
> As a stimulus measure, a one- or two-year extension has one thing
> going for it: It would be a big intervention and would provide at
> least some boost to the economy. But a good stimulus policy can't just
> be big; it should also offer a lot of bang for the buck. That is, each
> dollar of government spending or tax cuts should have the largest
> possible effect on the economy. According to the Congressional Budget
> Office and other authorities, extending all of the Bush tax cuts would
> have a small bang for the buck, the equivalent of a 10- to 40-cent
> increase in Gross Domestic Product for every dollar spent.
>
> Why? As the CBO notes, most Bush tax cut dollars go to higher-income
> households, and these top earners don't spend as much of their income
> as lower earners.  In fact, of 11 potential stimulus policies the CBO
> recently examined, an extension of all of the Bush tax cuts ties for
> lowest bang for the buck. (The CBO did not examine the high-income tax
> cuts separately, but the logic it used suggests that extending those
> cuts alone would have even less value.)
>
> The government could more effectively stimulate the economy by letting
> the high-income tax cuts expire and using the money for aid to the
> states, extensions of unemployment insurance benefits and tax credits
> favoring job creation.  Dollar for dollar, each of these measures
> would have about three times the impact on GDP as continuing the Bush
> tax cuts.
>
> Myth # 2:  Allowing the high-income tax cuts to expire would hurt
> small businesses.
>
> One of the most common objections to letting the cuts expire for those
> in the highest tax brackets is that it would hurt small businesses.
> As Sen. Orrin Hatch (R-Utah) recently put it, allowing the cuts to
> lapse would amount to "a job-killing tax hike on small business during
> tough economic times."
>
> This claim is misleading.  If, as proposed, the Bush tax cuts are
> allowed to expire for the highest earners, the vast majority of small
> businesses will be unaffected.  Less than 2% of tax returns reporting
> small-business income are filed by taxpayers in the top two income
> brackets - individuals earning more than about $170,000 a year and
> families earning more than about $210,000 a year.
>
> And just as most small businesses aren't owned by people in the top
> income brackets, most people in the top income brackets don't rely
> mainly on small-business income: According to the Tax Policy Center,
> such proceeds make up a majority of income for about 40% of households
> in the top income bracket and a third of households in the second-
> highest bracket.  If the objective is to help small businesses,
> continuing the Bush tax cuts on high-income taxpayers isn't the way to
> go - it would miss more than 98% of small-business owners and would
> primarily help people who don't make most of their money off those
> businesses.
>
> Myth # 3:  Making the tax cuts permanent will lead to long-term
> growth.
>
> A main selling point for the cuts was that, by offering lower marginal
> tax rates on wages, dividends and capital gains, they would encourage
> investment and therefore boost economic growth.  But when it comes to
> fostering growth, this isn't the whole story.  The tax cuts also
> raised government debt - and higher government debt leads to higher
> interest rates.
>
> If estimates of this relationship - by former Bush Council of Economic
> Advisers chair Glenn Hubbard and Federal Reserve economist Eric Engen,
> and by outgoing Office of Management and Budget Director Peter Orszag
> and myself - are accurate, then the tax cuts have raised the cost of
> making new investments.  As the economy recovers and private borrowing
> rises, the upward pressure on interest rates is likely to grow even
> stronger.
>
> I have used standard growth and investment formulas to calculate that
> the overall effect of the Bush tax cuts on economic growth has
> therefore been negative - and it will continue to be negative if the
> cuts are extended.
>
> Myth # 4:  The Bush tax cuts are the main cause of the budget deficit.
>
> Although the cuts were large and drove revenue down sharply, they are
> not the main cause of the sizable deficit that exists today.  In 2007,
> well after the tax cuts took effect, the budget deficit stood at 1.2%
> of GDP. By 2009, it had increased to 9.9% of the economy.  The Bush
> tax cuts didn't change between 2007 and 2009, so clearly something
> else is to blame.
>
> The main culprit was the recession - and the responses it inspired.
> As the economy shrank, tax revenue plummeted. The cost of the bank
> bailouts and stimulus packages further added to the deficit.  In fact,
> an analysis by the Center on Budget and Policy Priorities indicates
> that the Bush tax cuts account for only about 25% of the deficit this
> year.
>
> Myth # 5:  Continuing the tax cuts won't doom the long-term fiscal
> picture; entitlements are the real problem.
>
> One theory holds that the country's long-term budget shortfall is
> "just" an entitlements problem, the result of rising costs associated
> with growing Social Security rolls and increased health care spending
> (via Medicare and Medicaid). Republicans like this idea because it
> plays down tax increases as a potential solution.  Democrats like it
> because it makes the recent health care package seem like even more of
> a triumph.
>
> But it just isn't true. The deficits we face over the next decade
> reflect a fundamental imbalance between spending and revenue, one that
> goes beyond entitlements. Based on projections by the CBO, Alan
> Auerbach of the University of California at Berkeley and myself, among
> others, even if the economy returns to full employment by 2014 and
> stays there for the rest of the decade, the continuation of current
> fiscal policies, including the Bush tax cuts, would lead to a national
> debt in the range of 90% of GDP by 2020.  That's already the highest
> rate since just after World War II - and Medicare, Medicaid and Social
> Security aren't expected to hit their steepest spending increases
> until after 2020.
>
> According to these same projections, the yearly deficit would rise to
> 6% to 7% of GDP by 2020.  The Bush tax cuts would account for a
> significant chunk of this, considering that in each year they are in
> effect, the revenue lost because of them amounts to nearly 2% of GDP.
>
> Compounding the problem: By increasing the government's debt, the tax
> cuts already have led to higher interest payments on that debt. So
> even if all of the cuts expire on Dec. 31, we will still be paying for
> them for years to come.
>
> http://www.washingtonpost.com/wp-dyn/content/linkset/2010/0......

Do you read what you cut/paste?

Read this excerpt:

[The Bush tax] arenot the main cause of the sizable deficit that
exists today. In 2007,
well after the tax cuts took effect, the budget deficit stood at 1.2%
of GDP. By 2009, it had increased to 9.9% of the economy. The Bush
tax cuts didn't change between 2007 and 2009, so clearly something
else is to blame.

If we eliminate the tax cuts on those making over $200,000 as Obama
has proposed, it will add only $94 Billion in revenue. Now that may
seem a lot to you and me, but it is only 6.2% of the deficit.

Now, I am not saying that we should extend the Bush tax cuts, BUT what
do you propose that we do with the other 93.6% of the deficit?


Jane

rfischer

8/13/2010 7:43:00 AM

0

jane <jane.playne@gmail.com> wrote:
>Your writings in this, and other, posts reveals that you are a
>partisan hack.

96% on the irony meter.

> You refer to the "Bush" wars, ignoring that the
>democrats in congress approved military action.

Your excuses show you to be a partisan bigot.

--
Ray Fischer
rfischer@sonic.net