text:
- Jaime: "You're no maester. Where's your chain?"
- Qyburn: "The Citadel stripped me of it. They found some of my... experiments... too bold."
- — Jaime Lannister and Qyburn[src]
Qyburn is a reccuring character in the third season. He is portrayed by Anton Lesser and debuts in "Valar Dohaeris". He is one of the prisoners at Harrenhal left for dead by Ser Gregor Clegane.
Qyburn is a former maester of the Citadel. He was stripped of his chain by the Archmaesters for engaging in forbidden experiments.
Season 3
Qyburn is among the Northern and Riverlands prisoners at Harrenhal when Ser Gregor Clegane abandons the castle and has all captives put to the sword. Qyburn, however, survives the injury at his throat and awakens when the castle is taken by the Northern army. After he wakes, he identifies himself to Robb Stark while Talisa Stark tends to his wound.[1]
After Robb Stark left Harrenhal, Qyburn stayed behind serving under Lord Roose Bolton. He tended to Ser Jaime Lannister's badly infected stump. During this Jaime notices that Qyburn is not a Maester, because he isn't wearing a maester's chain of office. Qyburn acknowledges this, explaining that he was stripped of his chain by the Citadel and thrown out of the Order of Maesters he was conducting experiments which they felt were too "bold". [2]
Qyburn volunteers to join the party escorting Jaime back to King's Landing. Lord Bolton theorizes that the former Maester is doing so in the hopes that Tywin Lannister will force the Citadel to restore his chain.[3]
|Season Three appearances
|Valar Dohaeris
|Dark Wings, Dark Words
|Walk of Punishment
|And Now His Watch is Ended
|Kissed by Fire
|The Climb
|The Bear and the Maiden Fair
|Second Sons
|The Rains of Castamere
- "The only way to treat disease, is to understand disease."
- ―Qyburn
In the books
In the A Song of Ice and Fire novels, Qyburn is a former maester who acts as a healer in the sellsword company known as the Brave Companions. Qyburn never met Robb Stark, nor ever was injured while staying at Harrenhal.
See also
- Qyburn at A Wiki of Ice and Fire (MAJOR spoilers from the books)
|Lord Ramsay Bolton
The Dreadfort
|The North
|Red King (former) · Lord of the Dreadfort · Warden of the North · Lord Paramount of the North · Lord of Winterfell
|Rogar Bolton
|Current members:
|Sansa Stark
|Deceased members:
|Domeric Bolton · Roose Bolton · Walda Bolton
|{Locke} · Steelshanks · {Myranda} · {Tansy} · {Violet} · {Master Torturer} · Maester Wolkan
|House Baratheon of King's Landing


text:
What is RM Cash
User Tip: If you're unsure of your vehicle type, you may skip the machine type selection box.
Select type, make, model and year above
"Customer service is priority #1 at Rocky Mountain ATV/MC. We value our customers and strive to be the best shopping experience- when you buy from us, you are buying lifetime service."
-Dan Thomas, CEO and Founder
We take pride in offering no hassle returns. In the event of a return, please call, email or chat with us to receive a solution to the problem. For apparel that doesn't fit quite right, Click here to see our Fit Guaranteed Program.
We will stand behind all products we sell with regards to manufacturing defects in workmanship and material. Most products are limited to the manufacturer's warranty. However, we will do everything in our power to take care of the problem.
Each review submitted enters you into a $100 gift card monthly drawing, and a $500 gift card quarterly drawing!
Comments On Mar 29, 2013:Easy install, worked as it should. Cheaper than what you would pay for a custom piece or from a racing site.
Was this review helpful?

subset: commoncrawl


text:
Carolla riffs on 'ridiculous' Hitler teapot controversy
Next video starts in : 7 Play
Carolla riffs on 'ridiculous' Hitler teapot controversy
Obama Delivers Zings at Correspondents' Dinner
4:42Now watching Up next
Carolla riffs on 'ridiculous' Hitler teapot controversy
Comedian's take on a Wisconsin school gender story and a JC Penney billboard
2:24Now watching Up next
Obama Delivers Zings at Correspondents' Dinner
President Barack Obama didn't pull any punches at this year's White House Correspondents' Dinner. The president took on all the leading presidential candidates in his annual comic address. (April 30)
1:28Now watching Up next
Today in History for April 1st
Highlights of this day in history: Slobodan Milosevic arrested; American forces invade Okinawa; Nazi Germany begins persecuting Jews; Soul singer Marvin Gaye is shot to death by his father. (April 1)
21:37Now watching Up next
Comedian Larry Wilmore Roasts Washington Press
The 'Nightly Show' host spoke at President Obama's last White House Correspondents' Dinner.
32:51Now watching Up next
Obama Skewers Presidential Candidates at White House Correspondents' Dinner
The president poked fun at himself and presidential candidates at his last White House Correspondent's Dinner as commander-in-chief.
1:40Now watching Up next
Obama's Final White House Correspondents' Dinner
The president makes his last remarks as commander-in-chief at the yearly roast held in Washington, D.C.
1:16Now watching Up next
Norovirus Hits Passengers and Crew Aboard Cruise Ship
The stories people are buzzing about.
1:41Now watching Up next
Potential New Heir to Prince's Estate
Sources say a teenage grandniece may be the seventh potential heir to the late singer's estate, estimated to be worth $300 million.
1:22Now watching Up next
San Francisco Police Under Fire for Alleged Racist and Homophobic Slurs
Protesters call for the resignation of the police chief after the release of text messages allegedly involving 3 former cops that contained racist and homophobic slurs.
1:03Now watching Up next
State of Emergency Declared in Iraqi Green Zone
Protesters scaled the walls of the heavily fortified Green Zone in Baghdad, calling on the prime minister to end corruption in the Iraqi government.


text:
Red Hook Recreation Area
Shape Up NYC: Girls Fitness & Fun
Monday, November 25, 2013
4:00 p.m.–4:45 p.m.
This event repeats every week on Monday between 10/21/2013 and 12/16/2013.
Please note: This event has already taken place. Please use the Search options on the right to find upcoming events.
In partnership with the NYC Girls Project, Shape Up NYC will offer free fitness classes for girls ages 6-13. Girls Fitness & Fun is a 45-minute workout that focuses on building strong, healthy bodies through fitness games and Pilates stretches.
A free youth recreation center membership is required to participate.
Contact Number
(212) 360-3304
Directions to Red Hook Recreation Area
Know Before You Go
Red Hook Recreation Area
NYC Parks is committed to making sure all parks are safe and healthy environments. Parks is continuing to work with EPA as they test the Redhook Ballfields for contamination. In the interim, we expect softball/baseball fields 5, 6, 7 and 8 will be closed until a clean-up plan is completed, and soccer fields 1, 2, 6 and 9 will be tested further.
Red Hook Recreation Area Weather
- 'Solar For Sandy' Initiative Launches
- Celebrating 75 Years Of Summer Swimming In New York City's WPA-Era Pools
- Parks Hosts Celebration to Honor the Opening of 11 WPA Era Pools
- Barbecuing Areas
- Baseball Fields
- Basketball Courts
- Bathrooms
- Eateries
- Fitness Equipment
- Handball Courts
- Outdoor Pools
- Playgrounds
- Recreation Centers
- Running Tracks
- Soccer Fields
- Spray Showers
- Wi-Fi Hot Spots
Know when to go:
View upcoming athletic area usage in
Red Hook Recreation Area


text:
22 U.S. Code § 262c - Commitments for United States contributions to international financial institutions fostering economic development in less developed countries; continuation of participation
prev | next
(a) Congressional findings
It is the sense of the Congress that—
(1) for humanitarian, economic, and political reasons, it is in the national interest of the United States to assist in fostering economic development in the less developed countries of this world;
(2) the development-oriented international financial institutions have proved themselves capable of playing a significant role in assisting economic development by providing to less developed countries access to capital and technical assistance and soliciting from them maximum self-help and mutual cooperation;
(4) such institutions have proved to be an effective mechanism for sharing the burden among developed countries of stimulating economic development in the less developed world; and
(5) although continued United States participation in the international financial institutions is an important part of efforts by the United States to assist less developed countries, more of this burden should be shared by other developed countries. As a step in that direction, in future negotiations, the United States should work toward aggregate contributions to future replenishments to international financial institutions covered by this Act not to exceed 25 per centum.
(b) Funding commitments to international financial institutions; availability of funds subject to appropriations
The Congress recognizes that economic development is a long-term process needing funding commitments to international financial institutions. It also notes that the availability of funds for the United States contribution to international financial institutions is subject to the appropriations process.
Source(Pub. L. 95–118, title I, § 101,Oct. 3, 1977, 91 Stat. 1067.)
References in Text
This Act, referred to in subsec. (a)(5), is Pub. L. 95–118, Oct. 3, 1977, 91 Stat. 1067, known as the International Financial Institutions Act, which enacted sections 262c, 262d, 262e to 262g–3, 262m to 262p–12, 262r to 262t, 282i, 284n, 285s, 285t, 286e–1f, and 290g–10 of this title, repealed sections 283y, 284m, and 290g–9 of this title, and enacted provisions set out as notes under sections 262c and 282i of this title. For complete classification of this Act to the Code, see Short Title of 1977 Amendment note set out under section 261 of this title and Tables.
Effective Date
Section effective Oct. 3, 1977, see section 1001 ofPub. L. 95–118, set out as a note under section 282i of this title.
Future United States Contributions to the International Financial Institutions
Pub. L. 96–536, § 101(b) [H.J. Res. 637, § 101(b); H.R. 4473, title I], Dec. 16, 1980, 94 Stat. 3167, provided in part that: "It is the sense of the Congress that the United States share of contributions to future replenishments of the International Financial Institutions should not exceed the percentages enumerated below for each of the respective accounts within these institutions:
"Asian Development Bank:
"Paid-in capital, 16.3 percent;
"Callable capital, 16.3 percent;
"Asian Development Fund, 22.2 percent;
"African Development Bank:
"Special Fund, 18 percent;
"Inter-American Development Bank:
"Paid-in capital, 34.5 percent;
"Callable capital, 34.5 percent;
"Fund for Special Operations, 40 percent;
"International Bank for Reconstruction and Development:
"Paid-in capital, 24 percent;
"Callable capital, 24 percent;
"International Development Association, 25 percent;
"International Finance Corporation, 23 percent."
Similar provisions were contained in the following appropriation acts:
Pub. L. 96–123, § 101(a) [incorporating Pub. L. 95–481, title III], Nov. 20, 1979, 93 Stat. 923.
Pub. L. 95–481, title III, Oct. 18, 1978, 92 Stat. 1599.
Pub. L. 95–148, title III, Oct. 31, 1977, 91 Stat. 1238.
Standards for Human Needs and Protection of Human Rights; Consultation for Development of Criteria; Report to Congress
Pub. L. 95–118, title VII, § 703,Oct. 3, 1977, 91 Stat. 1070, provided that:
"(a) The Secretary of State and the Secretary of the Treasury shall initiate a wide consultation designed to develop a viable standard for the meeting of basic human needs and the protection of human rights and a mechanism for acting together to insure that the rewards of international economic cooperation are especially available to those who subscribe to such standards and are seen to be moving toward making them effective in their own systems of governance.
"(b) Not later than one year after the date of enactment of this Act [Oct. 3, 1977], the Secretary of State and the Secretary of the Treasury shall report to the President of the Senate and the Speaker of the House of Representatives on the progress made in carrying out this section."
LII has no control over and does not endorse any external Internet site that contains links to or references LII.


text:
Catalog search
Catalog links
Graduate Bulletin 2013-2015 » Academic Programs and Courses » Health Sciences » Courses in Public Health » PHE 722: Globalization and International Health.
PHE 722: Globalization and International Health.
3 hours, 3 credits. Epidemiological aspects of major global public health problems. Focus on principles, basic statistical analysis, public health surveillance, field investigation, and surveys and sampling. Governmental responses to epidemics, disasters, and outbreaks. PREREQ: 18 credits from PHE core courses, including HSD 606.
Last modified: 8/4/2015


text: The exterior of this handbag is in gently loved condition. The leather is scratched and worn. There are a few marks on the coated canvas and the hardware is notably tarnished. The interior is in good condition, with scratches on the leather underneath the front flap. It ships with a detachable shoulder strap and designer dust bag.


text:
Kohler K-2323-8-47
Almond Kathryn 17" Fireclay Pedestal Bathroom Sink with 3 Holes Drilled and Overflow
Item # BCI221639 | Model # K-2323-8-47 | Kathryn Collection
Questions about Kohler K-2323-8-47?
Contact us for advice or more details. Our product specialists are here to help.
This product has additional required/recommended options. To configure, add to your cart.
P Trap Recommended
Angle Supply Recommended
Product Features:
- Rectangular basin gives a classically clean look to your bathroom countertop
- Covered under Kohler's limited lifetime sink warranty
- Constructed of fireclay this sink embodies unrivaled aesthetic appeal
- Captures the unforgettable style of a bygone era
- Bring timeless sophistication to the bathroom
- Pedestal installation provides simplistic design and mounting to pre-existing pedestals
- Center drain location provides optimal draining capability
- Equipped with overflow drain - works in tandem with the primary to prevent an overflow or spillage
- All hardware needed for installation included
Product Technologies / Benefits:
- Pedestal Sinks: A stand alone fixture that provides a wide basin, while leaving open space that is dramatic, yet leaves the room feeling more open.
Product Specifications:
- Overall Length: 27" (measured from the left outer rim to the right outer rim)
- Overall Width: 20" (measured from the back outer rim to the front outer rim)
- Height: 7-7/8" (measured from the bottom of sink to the top of the rim)
- Basin Width: 11-1/2" (measured from the back inner rim to the front inner rim)
- Basin Length: 17" (measured from the left inner rim to the right inner rim)
- Basin Depth: 4-1/8" (measured from the center of basin to the rim)
- Installation Type: Pedestal
- Number of Faucet Holes: 3
- Drain Outlet Connection: 1-3/4"
- K-2323-8: This model
- K-2323-1: Single hole version of this model
- K-2323-4: 4" faucet center version of this model
Additional Kohler Links
This Kohler item can also be referenced by the following color/finish specific model #:
- Kohler K-2323-8-47
- Kohler K-2323-8-96
- Kohler K-2323-8-7
- Kohler K-2323-8-K4
- Kohler K-2323-8-NY
- Kohler K-2323-8-W2*
Earthen White
- Kohler K-2323-8-95
Ice Grey
- Kohler K-2323-8-55*
Innocent Blush
- Kohler K-2323-8-33
Mexican Sand
- Kohler K-2323-8-G9
- Kohler K-2323-8-Y2*
- Kohler K-2323-8-NG*
Tea Green
- Kohler K-2323-8-58
Thunder Grey
- Kohler K-2323-8-0
- Kohler K-2323-8-45*
Wild Rose
*Discontinued model or finish
More Than Just a Store - Your Reasons to Shop
Discover the best online deals for the Kohler K-2323-8 and everything else for your home from the leading online home improvement store.
We're committed to providing you with the best assortment of Kohler products with over 400 warehouses across the country.
Our knowledgeable product specialists work to bring you the best prices on every product and provide unmatched customer service. Your satisfaction is our highest priority!


text:
36 U.S. Code Chapter 3 - NATIONAL ANTHEM, MOTTO, FLORAL EMBLEM 1 MARCH, AND TREE
2004—Pub. L. 108–447, div. J, title I, § 109(b)(2), (3),Dec. 8, 2004, 118 Stat. 3344, substituted "MARCH, AND TREE" for ", AND MARCH" in chapter heading and added item 305.
[1] So in original. A comma probably should follow "EMBLEM".
LII has no control over and does not endorse any external Internet site that contains links to or references LII.


text:
FREE PERSONALIZATION on ornaments
and FREE SHIPPING when you buy 5 or more!
Each Christmas Ornament Personalized with a Name or Special Greeting from you!
When you buy 5 or more items!Learn more >>
- Activities
- Advent Calendars
- African American / Ethnic
- Angel
- Anniversary, Wedding & Engagement
- Baby
- Birthstone
- Christmas Stockings, Tree Skirts & More
- College and University
- Diannes Gift Ideas
- Easter
- Expecting Moms/Couples
- Fairy Tales and Nursery Rhymes
- Fall and Halloween
- Family
- Food & Drink
- For Her
- For Him
- Glass Ball
- Glass Ornaments
- Graduation
- Grandparents
- Holiday Plaques
- Home
- Kids
- Made in America
- Made in Europe
- Memorial
- Music
- Occupations
- Patriotic
- Pets and Animals
- Picture Frames
- Piggy Banks
- Religious
- Santa & Snowman
- Snow Globes
- Space & Technology
- Sports
- Table Decorations
- Teachers and School
- Transportation
- Vacation and Travel
- Valentine
- Western
Review this product!
United States of America
Personalized Christmas Ornament$12.95
A landmark ornament that celebrates patriotism and love for the United States of America. Fly the stars and stripes of Old Glory proudly on this ornament that drapes the US flag over the shape of the United States. And before you think it only represents the contiguous United States, the back of the ornament is blue like the ocean and has the border lines of both the State of Alaska and the island cluster that is the State of Hawaii. Whether you travel across the country viewing national landmarks or just love the land of the free and the home of the brave, this personalized patriotic ornament will display your proud citizenship.
Material: Glass


text:
Browse more:
Reap the benefits of high quality oil paints while enjoying the freedom to draw directly on your surface, without the distancing factor of the brush. Handmade and richly pigmented, R&F Pigment Sticks are comparable to the finest tube oil paints.
Color Swatch created using heavy application/medium application/50% tint and was applied on acrylic primed canvas (7 oz) material.
iron oxides
Fe2O2 or Fe2O3 • H2O
Mars Orange is a bright, extremely light red and appears almost pinkish when contrasted with darker colors. It has incredible tinting strength and opacity. The synthetic form of Mars Orange is made from iron oxides and is cleaner, brighter, and denser than its ochre-based counterparts.
Mars Orange has good permanence and lightfastness.
Mars Orange has no significant hazards.
The word Mars refers to the Roman god of iron and war. Mars Orange has been manufactured as a pigment since the 17th century.
R&F is a trademark.


text:
What is RM Cash
User Tip: If you're unsure of your vehicle type, you may skip the machine type selection box.
Select type, make, model and year above
"Customer service is priority #1 at Rocky Mountain ATV/MC. We value our customers and strive to be the best shopping experience- when you buy from us, you are buying lifetime service."
-Dan Thomas, CEO and Founder
We take pride in offering no hassle returns. In the event of a return, please call, email or chat with us to receive a solution to the problem. For apparel that doesn't fit quite right, Click here to see our Fit Guaranteed Program.
We will stand behind all products we sell with regards to manufacturing defects in workmanship and material. Most products are limited to the manufacturer's warranty. However, we will do everything in our power to take care of the problem.
How To - Bleed Brakes
How to - Tusk Braided Brake Lines
Each review submitted enters you into a $100 gift card monthly drawing, and a $500 gift card quarterly drawing!
Comments On Jan 11, 2015:I really bought this brake line trying to fix a phantom brake problem. turns out my caliper wasn't floating. but anyhow this brake line works great and looks good after a few years now.
Was this review helpful?
Comments On Jan 02, 2015:fits great and looks great
Was this review helpful?
Comments On Feb 12, 2014:Look great, firms up the pedal
Was this review helpful?
Comments On Aug 02, 2012:Good to get rid of the factory rubber. The pedal has better feel to it now.
Was this review helpful?
Comments On Apr 22, 2012:Replaced the original hose with this to have better pedel feel. Line fits good and the hardware is good quality. Would buy again.
Was this review helpful?
Comments On Dec 21, 2011:Yes this is long. Stock line is 25" and this was a +2, so it should have been 27". measured out to 29".
Was this review helpful?
Comments On Aug 07, 2011:realy improves feel
Was this review helpful?
Comments On Mar 13, 2011:Good brake lines. Have them on two machines with no issues. Like others said they are a little long but I find that useful for routing
Was this review helpful?
Comments On Feb 07, 2011:Used on my banshee. Have not had any problems in 2 years.
Was this review helpful?
Comments On Sep 14, 2010:This is a nice line but is about 3" too long for the stock swing arm. Would I buy it again? Probably, but it could be about 2" shorter and still have plenty of line
Was this review helpful?


text:
You can't beat The System!
Daler-Rowney System 3 is a versatile water-based acrylic offering all the virtues of lightfastness, permanence, insolubility, and covering power in an economical, medium-bodied paint.
The flip-top 500 ml jar size is economical for busy classrooms, murals and theatrical scenery. System 3 is fast-drying and has a greater pigment load than other paint in its class. We offer the full range of 48 colors in 75 ml tubes, including metallics, fluorescents and process colors. Limited color range is offered in 500 ml plastic squeezebottles.
Fluorescent Set of 3 with FREE Titanium White — This set contains three trendy fluorescent colors in 150 ml tubes including Fluorescent Pink, Fluorescent Yellow, and Fluorescent Blue, plus a FREE 150 ml tube of Titanium White.
Introductory Set of 10 Colors — This set of 10, starter size 22 ml (0.75 oz) tubes includes Lemon Yellow, Cadmium Yellow Hue, Cadmium Red Hue, Crimson, Ultramarine, Emerald, Yellow Ochre, Burnt Umber, Mars Black, and Titanium White.
Jumbo Set of 8 Colors — An exceptional value! This set contains eight 150 ml tubes of
Process Set of 5 Colors — A set of 5, full size 75 ml (2.5 oz) tubes, including Process Cyan, Process Magenta, Process Yellow, Process Black, and Titanium White. Process colors are the 3 primary colors plus Black. In commercial printing, they combine to form a wide variety of secondary colors.
Selection Set of 8 Colors — A set of 8, full size 75 ml (2.5 oz) tubes, including Cadmium Yellow Hue, Cadmium Red Hue, Emerald, Ultramarine, Yellow Ochre, Burnt Umber, Mars Black, and Titanium White.
Starter Set of 6 — This great selection of 22 ml (0.75 oz) colors is a great way to get started with Daler-Rowney System 3 Acrylic. It includes Titanium White, Cadmium Yellow, Cadmium Red, Emerald, Ultramarine, and Burnt Umber.
Color Chart Note — Use this color chart as an approximation of the real color. If exact color matching is necessary, use actual samples of the materials.
Tube 22 ml Tube 75 ml 2.5 oz Tube 150 ml 5 oz Plastic Bottle 250 ml Plastic Bottle 500 ml 17 oz
22 ml
75 ml
2.5 oz
150 ml
5 oz
Plastic Bottle
250 ml
Plastic Bottle
500 ml
17 oz
® Daler-Rowney is a registered trademark.


text:
The Power of Independent Thinking
Ivan Eland on RTs CrossTalk Discusses Egypts President Morsi
Recorded: Wednesday, November 28, 2012
Ivan Eland, Independent Institute Senior Fellow, discusses Morsi's Presidential decrees with Peter Lavelle on RT's CrossTalk.
Experts: Ivan ElandType: TelevisionIssues: Civil Liberties/ Human Rights, Diplomacy and Foreign Aid, Political Ideology and Philosophy
What Should the Fed Be Doing? Myths, Current Strategies and Alternatives
Recorded: Monday, November 12, 2012
Research Fellow David Beckworth, editor of Boom and Bust Banking, and Research Fellow Scott Sumner, contributor to Boom and Bust Banking, discuss the role of the Fed.
Experts: David Beckworth, Scott SumnerType: Independent Institute EventIssues: Banking and Finance, Bureaucracy and Government, Business, Economic History and Development (U.S.), Economic Policy, Fiscal Policy/Debt, Free Market Economics, Regulation and Deregulation
Art Carden Talks Price Gouging on Stossel
Recorded: Thursday, November 1, 2012
Research Fellow Art Carden on Stossel discusses the positive aspects of price gouging during natural disasters.
Experts: Art CardenType: TelevisionIssues: Business, Economic Policy, Economists, Free Market Economics, Law Enforcement
Priceless Author John C. Goodman on Fox News Special Report with Bret Baier
Recorded: Tuesday, October 9, 2012
Research Fellow John C. Goodman, author of Priceless: Curing the Healthcare Crisis, discusses the healthcare law on Fox News Special Report with Bret Baier.
Experts: John C. GoodmanType: TelevisionIssues: Economic Policy, Free Market Economics, Health Care, Political Ideology and Philosophy, Public Health/ Consumer Protection
2012 Mises Celebration Introductory Speech by Anthony Gregory
Recorded: Saturday, September 29, 2012
Anthony Gregory, Research Fellow and Student Programs Director, provides the introductory speech on the importance of honoring Mises at the 2012 Mises Celebration on September 29 at the Silicon Valley Capital Club in San Jose, CA.
Experts: Anthony GregoryType: TelevisionIssues: Economic History and Development (International), Economic History and Development (U.S.), Free Market Economics, Political Ideology and Philosophy
State, War and Economy
Recorded: Tuesday, August 28, 2012
Senior Fellow Robert Higgs, author of Delusions of Power, is interviewed on The Lew Rockwell Show, about the delusions of government power and U.S. interventionism.
Experts: Robert HiggsType: RadioIssues: Bureaucracy and Government, Defense and Foreign Policy, Free Market Economics, Government Power, Political Ideology and Philosophy
Anthony Gregory at P.A.U.L. Festival 2012
Recorded: Saturday, August 25, 2012
Independent Institute Research Fellow and Student Programs Director Anthony Gregory addresses P.A.U.L. Festival 2012 on Government Power and the Road to Liberty.
Experts: Anthony GregoryType: Other EventIssues: Civil Liberties/ Human Rights, Constitutional Law, Culture/ Society, Free Market Economics, Freedom, Nationalism, Political Ideology and Philosophy, Property Rights
John C. Goodman on C-SPAN2s Book TV
Recorded: Sunday, August 12, 2012
Research Fellow John C. Goodman, author of Priceless: Curing the Healthcare Crisis, discusses his very timely and compelling new book
on C-SPAN2s Book TV.
Experts: John C. GoodmanType: TelevisionIssues: Free Market Economics, Health Care, Political Ideology and Philosophy, Public Health/ Consumer Protection


text:
When we think of summer drinks, fresh-squeezed lemonade always come to mind. Try one of our favorite lemonade recipes.
Sweet Tea LemonadeThis summer refresher combines the best of both worlds: sweet iced tea and tart lemonade.
Frozen LemonadeOn a hot day, it's hard to beat a tall glass of slushy frozen lemonade. Blend sliced lemon, superfine sugar, water, and lemon juice with ice for a frozen drink that the whole family will love.
Ginger LemonadeFresh ginger gives this lemonade its unique flavor, while using frozen lemonade concentrate keeps preparation super simple.
Fresh-Squeezed LemonadeNothing beats the classic concoction of fresh lemons, sugar, and chilled water. This recipe doesn't require you to boil water, so make it for last-minute gatherings or as you're about to walk out the door to the park. Serve over ice for maximum cooling-off power.
Pink LemonadeCook one cup of water with sugar to create the super-sweet sugar syrup, then combine with the rest of the water, lemon juice, fruit, and grenadine. Grenadine, a pomegranate-flavored syrup that gives the beverage its rosy color, can contain alcohol, so check the label before serving and create an adults-only beverage corner at the next neighborhood barbecue if necessary.
Southern BreezeRaspberry-lemonade ice cubes add extra flavor to the pineapple juice and ginger ale mixture as they melt. Make the ice cubes from lemonade concentrate, sugar, water, and blue raspberry lemonade mix the night before. You can also try different lemonade mixes for a variety of fun flavors.
Raspberry LemonadeGo all-natural and serve a refreshing drink made from naturally-sweet mashed raspberries, lemon juice, and water. The sweet and tart combination will garner rave reviews. Add sugar to taste, and serve over ice.
Spiked LemonadeStart with lemon-flavored sparking water or club soda and add citrus-flavored vodka, lemon juice, sugar, and orange liqueur for an unforgettable summer cocktail. Buy extra ingredients–this one is guaranteed to be a party-pleaser.
Cool Lavender LemonadeFresh lavender and mint infuse frozen lemon juice with an herbal flavor, making this drink tops for serving with light appetizers. Add the mint and lavender gradually to tailor the lemonade to your taste.
Strawberry LemonadeThis refreshing lemonade is just as much about the strawberries as it is about the lemons.
Watermelon-Lemonade CoolerGarnish this fruity beverage with thin slices of watermelon and a pinch of mint. Cook lemonade concentrate with a few mint sprigs to allow the flavors to blend, then combine with puréed watermelon. Chill overnight before serving.
Mint-Tea LemonadeAdd a dose of minty freshness to your next tall glass of lemonade.
Apple LemonadeAdd a splash of tartness to apple juice by mixing in fresh lemon juice. Squeeze about 3 lemons worth of juice into a quart of apple juice, mix well, then garnish with mint sprigs and lemon slices. The sweet flavor of the apple nicely balances the pucker of the lemon.
Homemade LemonadeStart from scratch and make a lemonade packed with extra flavor. The secret? This recipe uses a few teaspoons of lemon rind to add extra tartness, as well as a more home-style presentation. Make a batch of limeade (also on the recipe page) and let friends and family vote for their favorite.
Watermelon LemonadeYour favorite summer fruit pairs with your favorite summer beverage and it's pure magic.
Basil LemonadeAdd flavor, color, and fragrance by choosing different varieties of basil for this summer-inspired drink. Stick with regular basil for a tasty nonalcoholic cocktail, or try a different variety. Thai or cinnamon basils add spicy undertones while lemon basil adds a lemon-drop flavor.
Pink Lemonade CocktailHost a 21-and-over backyard extravaganza and serve this cocktail in white wine glasses. Pink lemonade concentrate gets dressed up with bottled beer and chilled vodka. Garnish with cranberries and slices of lemons, oranges, or limes, and let the toasting begin.
Peach LemonadeSweeten up traditional lemonade with another summer favorite: fresh peaches! This lemonade is perfect for pairing with grilled fare.
Raspberry-Lemonade SpritzerSparkling water, fresh (or frozen) raspberries, and frozen lemonade concentrate are all you need for this bubbly, festive lemonade delight.
Pink LemonadeThe pink in this pink lemonade comes from fresh raspberries, and if you're feeling fancy you can always drop a few berries into each glass as a garnish.
Spiced-Tea LemonadeDress up traditional lemonade by mixing it with orange-spice iced tea.
Land of the Free LemonadeWatermelon is the ultimate All-American summer snack. This year, make your 4th of July celebration even sweeter with a sweet-tart watermelon lemonade.
Hungry for More?


text:
Total # Posts: 196
ok thanks i guess
March 8, 2010
too tell you the turth i have no idea i just got put in this new home schooled so do you mind making a other example an explaining that one to me please if you woulnd not mind
March 8, 2010
Simplify the given equation. 17x - 6 + 3x - 5 = x + 11 + 4x A)20x - 11 = 5x + 11 B)20x + 1 = 5x + 11 C)9x = 16x
March 8, 2010
What is the solution set of the given equation? 4y - 6y + 9y = -2 A){-2/11} B){-2/7} C){2/7} D){2/11}
March 8, 2010
its a random home school test.so i can get in
March 8, 2010
Almost all maps have these four things: A)scale, legend, title, and compass B)rock units, legend, symbols, and scales C)contour lines, scale, legend, and compass D)rock types, legend, compass, and scale
March 8, 2010
i dont know thats why i ASKED
March 5, 2010
Solve for x. 5x - 6 = 4x + 8 A)x = -14 B)x = -2 C)x = 2 D)x = 14
March 5, 2010
Which of the following equations has the given solution set? Solution set: Ø A)-2m + 5 = 2m + 5 B)-2m + 5 = -2m + 5 C)-2m + 5 = -2m - 5 D)none
March 5, 2010
March 5, 2010
Which of the following would eliminate the variable on the left side of the given equation? 36 - 19w = -6w + 41 A)add -19w B)add 6w C)add 19w D)add -36
February 25, 2010
A dead alkaline battery is found to contain a compound of Mn and O. It's analysis gives 69.6% Mn and 30.4% O
February 1, 2010
2nd grade
Rule contains letters with straight lines.
January 27, 2010
Cannon-Bard view emotion as more than a response to physiological arousal. They suggest that... 1) the hippocampus and the spinal nerve produce emotion 2) both the cortex and the autonomic nervous system respond to the stimulus 3) emotion is the work of higher brain levels ...
December 20, 2009
f=x^2*y g=xyz find fg^2
December 6, 2009
AP Chemistry
When finding empirical formula of a compound, why do you have to convert the elements into moles, as opposed to using a mass:mass ratio?
November 16, 2009
November 3, 2009
Social Studies
Who called Julius Caesar the "divine Julius" ? Thanks:)
October 24, 2009
Social Studies
When did Julius Caesar get into the Senate for the first time? Thanks:)
October 23, 2009
like the average because I need to do it for the whole biome
October 3, 2009
What is the average yearly rainfall for Rivers: Lakes & Ponds: Coral Reefs: Temperate Oceans: ?? thanks:)
October 3, 2009
Do you know of a web site that has the geographic locations of these biomes? Tundra Taiga Temperate Deciduous Forest Rainforest Temperate Grasslands Wetlands Desert Streams, Rivers & Estuaries Lakes & Ponds Coral Reefs thanks for the help:)
October 3, 2009
What is the average DBH of oak trees in the US and what is the average DBH of maple trees in the US? thank you!
October 1, 2009
Palmer school
Do you mean to distribute them like 9*70 + 9*3?
October 1, 2009
What is the average D.B.H. of an oak tree? If you have a website with this info please tell me ~Thanks~
September 30, 2009
World History
thanks, I got a few more:)
September 3, 2009
World History
What were 4 tatics that the ancient Assyrians used to control their empire? I know one is the battering ram because they used that in battle and so people feared them but I can't think of others... Thanks in advance:)
September 3, 2009
AP Physics
length = l(italicized) time interval = [box]td ratio = l(italicized)/[box]td
August 10, 2009
AP Physics
A glider on an air track carries a flag of length through a stationary photogate that measures the time interval td during which the flag blocks a beam of infrared light passing across the gate. The ratio vd = / td is the average velocity of the glider over this part of its ...
August 10, 2009
AP Physics
In order to pass a physical education class at a university, a student must run 1.0 mi in 12 min. After running for 10 min, she still has 500 yd to go. If her maximum acceleration is 0.15 m/s2, can she make it? If the answer is no, determine what acceleration she would need to...
August 10, 2009
How to do a big punnet square
I'm wondering how you do this Tt,Tt,Tt x tt,tt,tt in a punnet square. Thanks:)
May 20, 2009
Social Studies
Thanks so much SraJMcGin and Ms. Sue!
May 4, 2009
Social Studies
What are five other words besides pandemic that use the word pan and fit with something being widespread? thanks:)
May 4, 2009
English - erasers
What are some ways that erasers are used today? (example: pen erasers) Thanks:)
April 19, 2009
English- looking for an art teacher to interview
I guess I could interview just a teacher. doesn't have to be art. If your a teacher and are ok with me interviewing you via e-mail, please tell me:) thanks;)
April 18, 2009
English- looking for an art teacher to interview
ok thanks, do you have any idea about who i could interview?
April 18, 2009
English- looking for an art teacher to interview
April 18, 2009
English- looking for an art teacher to interview
HI, I made a post a day ago except I can't find it so... In english I am doing a report on erasers. I have to have an interview which has to consist of at least 10 questions. They can be informational or opinion. Anyway, I need someone to interview so I was thinking maybe ...
April 18, 2009
Language - interview for eraser
I'm doing a big report things on the invention of the eraser and some of the first erasers. All that fun stuff... anyway my teacher said that we have to interview some one with about 10 questions about erasers. It doesn't have to be someone that knows everything about ...
April 17, 2009
April 3, 2009
I am trying to find sites where it gives the history of erasers. Does anyone know of any good sites? Thanks:)
April 3, 2009
So for my lab would the independant variable be the height of the ramp and the depedant variable be the time it took the car to go 2 meters?
March 28, 2009
I did A Lab in science where I had a Small hotwheels car and started and 6 books and made a ramp. I then timed how long it took the car to go 2 meters from the ramp. after each trial I added one more book to make the slope higher. The car stayed the same and the higher the ...
March 28, 2009
A car is traveling at 51.0 mi/h on a horizontal highway If the coefficient of static friction between road and tires on a rainy day is 0.096, what is the minimum distance in which the car will stop What is the stopping distance when the surface is dry and µs = 0.603?
November 9, 2008
A block is given an initial velocity of 7.00 m/s up a frictionless 19.0° incline. How far up the incline does the block slide before coming (momentarily) to rest?
November 9, 2008
2. How does the sample size differ between qualitative and quantitative methods? Why?
October 22, 2008
How does the sample size differ between qualitative and quantitative methods? Why?
October 20, 2008
a mountainous region of northwest Pakistan, bordering Afghanistan
October 20, 2008
Criminal Justice
Where can I find information about the effect of DNA on the legal landscape and law enforcement?
October 14, 2008
Social studies
What speacial belief do the babylons have?
October 8, 2008
level of significance, P-value, and confidence interval how do they relate?
September 26, 2008
you draw one
September 26, 2008
Explain the calculations for a hypothesis test and discuss how you would test for signifiance at the 0.05 level
September 26, 2008
American Dream Project
ok, thankyou anyway:)
September 8, 2008
American Dream Project
Yah, thats a good idea but im sortav looking for something like not that typish if you know what I mean.
September 8, 2008
American Dream Project
I have to do an american dream project and as part of it we have to pick a song that goes with our american dream or "The American Dream" My american dream is to go to college and become a vet. Im not sure at the moment if I want the song to be about my american ...
September 8, 2008
oh, ok thanks Kate you have been a great help;)
September 7, 2008
I am stumped on these two questions. Unscramble the following words tp make sentences. Be sure to use the correct form of avoir. 1. j'/ordinateur/un/avoir 2. de/n'/vous/avoir/pas/chaise I know what the words mean but im not quite sure of the correct form of avoir would...
September 7, 2008
I need information about how it is that military/officer death notification is greatly different from that of the civilian.
September 6, 2008
I need help with simplifying (-9.5x)(-11Y) and it is not 104.5XY or just (-9.5X)(-11y). I also need help with Apply the multiplication property of 0. 5(-3)(0)(2377) and its not 0. Your help would be SO MUCH APPRIECIATED!!
September 6, 2008
(8x)^2 (2x^0)-^2/(4x-^1)simplify Is the answer 64x^3
September 6, 2008
(32) -3/5 exponents simplify
September 6, 2008
(32)-3/5 simplify would the answer be-1/8
September 6, 2008
This has me stumped The approximate time in seconds, that it takes an object to fall d feet under the influence of gravity is given by mathematical model t=square root d/16. A rock dropped from a cliff hits the ground 6 seconds later. How high is the cliff?
September 5, 2008
simplify the sum of radical expressions: T^2 square root 96tw^2 + 9w square root 6 T^5 Simplify: square root 5w^2 T^7 x square root 20 w^3 T^6
September 2, 2008
square root 5/square root 8 x square root 6/15 simplify
August 31, 2008
Multiply and simplify (9square root 6 - 4 square root 10) (square root 6 - 7 square root 10) I have been stumped and working on all day. Any suggestions?
August 31, 2008
another question that confyses me is solve3x^2-4x=15 would the answer be 5,3
August 22, 2008
9th grade
solve the rational equation 4/x-2=x/12 would the answer be -1,3
August 22, 2008
what are the restricted values of y for the rational expression to be defined: 2y-3/9y+7
August 21, 2008
with this single rational expresssion: the exponents have me confused how to solve 2x^2/5ab +a^2u^2/10b^3k
August 21, 2008
express the compound fraction in lowest terms:[15p^3q/3mn^2/[5p^5q^3/6n^3. I know 6 is right but the exponents have me confused?
August 21, 2008
multiply and simplify: 3x+3/x+3 x 2x-1/x^2-1
August 21, 2008
solve for x:3x^2-4x=15
August 21, 2008
solve the rational equation 4/x-2= x/12
August 21, 2008
solve the quadratic equation: 3x(3x+4)=-4
August 21, 2008
solve the quadratic equation: x^2 +2x=0 whould the answer be 0,2
August 21, 2008
using foil method x^2 + (x+1)+(x+3)^2 =38 then combine
August 15, 2008
using distributive property,then arrange polynomial in descending order before solving. 12,000(1 +2r + r^2)=27000
August 15, 2008
Critical Analysis
When evaluating articles, I will apply critical thinking skills by focusing on key points like: Is the author of the article biased? Does the background of the author lead to conclusions concerning the article? If I have to evaluate advertising, critical thinking will enable ...
August 9, 2008
Criticla Thinking
Doris, this is homework you have to do on your own. When you come up with some ideas, then someone will help you elaborate. I can help you with the next question, but please make an effort with this one.
August 9, 2008
Janet, if you take the time to read the simulation (which is only 10-12 minutes), it is not hard for you to answer the questions. I just finished this course and it is easy.
August 9, 2008
Hca 210
Hey Ann, these are my answers to the question. Next time, try google and you will find this course very easy. Three major causes or reasons why health-care costs keep rising or increasing are: 1) Pharmaceutical Expenses. 2) High malpractice premiums brought on by a litigious ...
August 8, 2008
Try and work the tables out as I couldn't attach it. This is how I did mine. Good luck. Week 1 Week 2 Week3 Monday I start my job search by checking the job section in the newspapers and also searching for jobs on the internet as they are many job web sites on the internet...
August 1, 2008
How does sample size differ between qualitative and quantitative methods? Why?
June 19, 2008
In general, organisms that obtain their energy from sunlight are called ________. Is is photosynthetic? If not, what would the answer be? Thanx!
May 16, 2008
how do you find the volume and surface area of a square pyramid and sphere when you are given only a volume of 1200?
May 15, 2008
Identify the fallacy: "Since it is agreed that lying is evil. it would follow that it is evil to lie to protect the life of an innocent person under any circumstances."
April 1, 2008
year 7 music
i know it has been asked many times over the last few days but i need to explain ternary form and what is played / song in this structure. i have found a song twinkle twinkle little star but i don`t know how to explain how it is played in this way.i have looked myself but can ...
January 29, 2008
What is the "partial sums method"
October 15, 2007
can anyone help me to figure out how to work out STANDARD DEVEATION CALCULATIONS please? Do you have a specific example? There are formulas for standard deviation you can use if you are expected to do the calculations by hand. You can also use calculators or statistical ...
April 29, 2007
Hi i wondered if you could tell me what a definition for forbidden love would be. And I also needed to know how you think i might be able to display forbidden love. Using drawings etc> Love can be forbidden by many different factors -- families (Romeo and Juliet), culture (...
February 13, 2007
wow! we had the same homework. thanks!!!!!!!!
January 16, 2007
|5y-2| > 2 ok since it is greater than you would have to separate it into two equations first one would be 5y-2>2 second one would be the neg of it..so it would be -5y+2>2 and then just solve for it you should get y>0 and y>(4/5)
November 27, 2006
maths algebra
3a-2(2a+4) 3a-2(2a + 4) you multiply the parenthesis by -2, giving you 3a -4a -8 combine like terms -a-8
October 31, 2006
Where can I find a biography on William Harvey? http://www.accessexcellence.org/RC/AB/BC/William_Harvey.html http://www.accessexcellence.org/RC/AB/BC/William_Harvey.html The other two posts don't seem to work right. Try this one. http://en.wikipedia.org/wiki/William_Harvey
October 5, 2006


text:
Using the proper knives make grilling easier, whether you're boning and trimming meats or slicing them after cooking is complete. Like the kits carried by grilling pros, our set includes five essential knives that cover an array of prep and presentation tasks, plus a storage case.
Please note: Storage case is counted as an individual piece.


text:
Movement… of blog.
I've moved this blog to a separate server and domain, mainly to ensure it's content is preserved and under my control. You should update your subscriptions to point to: therealoracleatdelphi.com.
I'm certain that some links and images didn't quite survive the move, but most of the more recent posts seem OK. A lot of comments also moved, but not all were able to be imported due to some length restrictions.
Delphi and product related content will remain here as well… for as long as whomever manages this server deems it as worthy content. Personal and unrelated content may be deleted. New content will likely be done at the new location and will consist of anything I feel like… or not :).
Share This | Email this page to a friendPosted by Allen Bauer on November 22nd, 2015 under General, Personal, Random, Uncategorized | 3 Comments »
Monitoring the Monitor
No, not this Monitor, this Monitor. Ever since it's introduction, it's been the subject of both scorn and praise… ok, ok, scorn. Recently, during our current field test for the next version of RAD Studio*, one of our long-time field-testers posted a reference to this excellent blog post by Eric Grange relating to the performance of the TMonitor vs. the Windows Critical Section. In that post, Eric makes a strong case against TMonitor. Since I'm somewhat personally invested in the TMonitor (read: I wrote it), I took that post as a challenge. I would have responded directly were it not for the fact that he's closed comments for that post. No biggie. For the record, while Eric and I don't always agree, he always has well reasoned and thorough arguments.
Eric published a simple test case to demonstrate what he was talking about. I took that test case and began to dig into it. First of all I looked into what Windows was doing in the critical section code down in the kernel. A quick spelunk with the CPU view was rather revealing. In this specific case, the critical section wasn't ever actually blocking on a kernel-level object. In other words it was doing a busy-wait. Under the high-contention test case that Eric presented, the busy-wait was the magic that served to blow TMonitor out of the water! As a baseline here's my result with Eric's app unchanged:
Once I determined that a spin-lock was in play, it all became much clearer. TMonitor can (and always has) optionally do a busy-wait before blocking. You must manually set the spin count on a specific TMonitor instance by calling TMonitor.SetSpinCount(Obj, nnnn). So, the first thing I did was to add the following to the FormCreate() event handler:
System.TMonitor.SetSpinCount(Self, 100000);
With that single change, suddenly things got a whole lot better:
We're on the right track here… but not perfect. I experimented with various spin counts, but above 1000 there were diminishing returns. So, something else must be in play here. I decided to experiment with a raw spin-lock. Luckily Delphi already has one, System.SyncObjs.TSpinLock, to be exact. Instead of using a TMonitor, I changed the code to use a TSpinLock. Whoa! Look at these results:
Now we're gettin' somewhere! Hmmm… so what is the difference here? Setting the spin count on TMonitor should be roughly equivalent to the raw TSpinLock… so looked at the code for each and then it hit me! Exponential backoff! Duh! The TSpinLock implements an exponential backoff that will yield or sleep every X iterations.** TMonitor doesn't implement an exponential backoff for it's busy-wait implementation. What is interesting is that the TMonitor does have an internal TSpinWait record that does implement exponential backoff. So I made a very small modification to TMonitor to now use the TSpinWait record within the TMonitor.Enter(Timeout: Cardinal); method within the System unit.
Added the following local var declaration:
SpinWait: TSpinWait;
Added/Removed the following lines
if SpinCount > 0 then
StartCount := GetTickCount;
SpinWait.Reset; // Added
while SpinCount > 0 do
YieldProcessor; // Removed
SpinWait.SpinCycle; // Added
// Keep trying until the spin count expires
Now here's the final result:
Hmm… I'd say that's darn near the same. While I cannot say for certain, but I imagine the difference in the graphic patterns could be attributable to a difference in the exponential backoff algorithm and parameters. I also reduced the TMonitor spin count to 500 and got the same results. On my machine anything over 500 didn't make any difference. Below about 250, it started doing kernel-level blocks and performance dropped.
With just that one simple change, TMonitor is matching and even sometimes now exceeding the performance of the Windows critical section. On the whole, I'd declare them equivalent. This does, however, mean you will need to explicitly set the spin count on the TMonitor to some value. Normally the "right" value is a guess based on empirical testing for your specific use case. I suspect the Windows critical section code selects some value based on the number of cores and CPU speed. At some point, I'll need to research an algorithm that can automatically select a reasonable spin count.
There is one thing I can say that TMonitor has over the Windows critical section… it works on all platforms (Windows, MacOS, iOS, and soon Android). Feel free to use whichever one you feel more comfortable using for your specific situation. Me? I will fully admit I'm biased…
*Yes, there is a field test going on and if you already have XE4 or purchase XE4, you become eligible to get access. You can go here to request access.
**This is not the same as blocking, it only forces the current thread to relinquish it's current quanta (time slice) to allow another thread to run. This only adds thread-switching overhead without the added kernel object blocking overhead.
Share This | Email this page to a friendPosted by Allen Bauer on August 23rd, 2013 under Delphi | 27 Comments »
Give in to the ARC side
I thought I'd take a few moments (or more) to answer some questions regarding the just introduced Automatic Reference Counting (ARC) mechanism to Delphi on mobile platforms (namely iOS in XE4, and Android in a future release). Among some sectors of our customer base there seems to be some long-running discussions and kvetching about this change. I will also say that among many other sectors of our customer base, it's been greeted with marked enthusiasm. Let's start with some history…
Meet the new boss, same as the old boss.
For our long-time Delphi users, ARC is really nothing new. Beginning back in Delphi 2 (early 1996), the first Delphi release targeting Windows 32bit, the Delphi compiler has done ARC. Long-Strings, which broke free from the long standing Turbo Pascal limit of 255 characters, introduced the Delphi developer to the whole concept of ARC. Until then, strings (using the semi-reserved word "string") had been declared and allocated "in-place" and were limited to a maximum of 255 characters. You could declare a string type with less than 255 characters by using the "
string[<1-255>]" type syntax.
Strings changed from being allocated at compile time to a reference type that pointed to the actual string data in a heap-allocated structure. There are plenty of resources that explain how this works. For the purposes here, the heap-allocated data structure could be shared among many string variables by using a "reference-count" stored within that data structure. This indicated how many variables are pointing to that data. The compiler managed this by calling special RTL helper functions when variables are assigned or leave the current scope. Once the last string reference was removed, the actual heap-allocated structure could be returned to the free memory pool.
Hey this model works pretty well… Oh look! MS' COM/OLE/ActiveX uses ARC too!
Delphi 3 was a seminal release in the pantheon of Delphi releases. For those who remember history, this is the first Delphi release in which the founder of Turbo Pascal, and the key architect of Delphi, Anders Hejlsberg, was no longer with the company. However, even with the departure of Anders, Delphi 3 saw the release of many new features. Packages and interfaces were major new language enhancements. Specifically interesting were interfaces, which placed support for COM/OLE/ActiveX-Style interfaces directly into the language.
The Delphi compiler already had support and logic for proper handling of an ARC type, strings, so it was an incremental step forward to add such support for interfaces. By adding interface ARC directly into the language, the Delphi developer was freed from the mundane, error-prone task of manually handling the reference counting for COM interfaces. The Delphi developer could focus on the actual business of using and accessing interfaces and COM/ActiveX objects without dealing with all those AddRef/Release calls. Eventually those poor C++ COM developers got a little help through the introduction of "smart pointers"… But for a while, the Delphi developers were able to quietly snicker at those folks working with COM in C++… oh ok, we still do…
Hey, let's invite dynamic arrays to this party!
Introduced in Delphi 4, dynamic arrays freed developers from having to work with non-range-checked unbounded arrays or deal with the hassles of raw pointers. Sure there are those who get a clear kick out using raw memory locations and mud-wrestling and hog-tying some pointers… Dynamic arrays took a few pages from the string type playbook and applied it an array data type whose elements are now user-defined. Like strings, they too use the ARC model of memory management. This allows the developers to simply set their length and pass them around without worrying about who should manage their memory.
If ARC is good, Garbage Collection is sooo much better…(that's a joke, son)
For a while, Delphi cruised along pretty well. There was Delphi 5, then a foray into the hot commodity of the time, Linux where the non-Delphi-named Kylix was developed. Delphi 6 unified the whole Windows and Linux experience… however not much really happened on the compiler front other than retargeting the x86 Delphi compiler to generate code fitting for Linux. By the time Delphi 7 was released, work on the Delphi compiler had shifted to targeting .NET (notice I have ignored that whole "oh look! didn't Borland demonstrate a Delphi compiler targeting the Java VM?" thing… well… um… never-mind…). .NET was the culmination (up to that time) of the efforts of Anders Hejlsberg since he'd left for Microsoft several years prior.
Yes there has been a lot of discussion over the years about whether or not MS really said that .NET was the "future" of the Windows API… From my recollection, I precisely remember that being explicitly stated from several sectors of the whole MS machine. Given the information at the time, it was clearly prudent for us to look into embracing the "brave new world" of .NET, it's VM, and whole notion of garbage collection. We're not mind readers, so regardless of any skepticism about this direction (oh and there was plenty of that), we needed to do something.
Since I have the benefit of 20/20 hindsight and having been a first-hand witness and participant in the whole move to .NET, there are some observations and lessons to be learned from that experience. I remember the whole foray into .NET as generating the most number of new and interesting language innovations and enhancements than I've seen since Delphi 2. A new compiler backend generating CIL (aka. MSIL), the introduction of class helpers which allow the injection of methods into the scope of an existing class (this was before C# "extension methods" which are very similar, if not more limited than helpers). I also think there were some missteps, which at the time, I know I vehemently defended. Honestly, I would probably have quite the heated discussion if the "me" of now were to ever meet the "me" of then .
Rather than better embrace the .NET platform, we chose to mold that platform into Delphi's image. This was reinforced by the clearly obvious link between the genesis behind Delphi itself and the genesis of .NET. They both were driven by the same key developer/architect. On several levels this only muddled things up. Rather than embracing GC (I have nothing really against GC, in fact, I find that it enables a lot of really interesting programming models), we chose to, more or less, hide it. This is where the me of now gets to ridicule the me of then.
Let's look at one specific thing I feel we "got wrong"… Mapping the "Free" method to call IDisposable.Dispose. Yes, at the time this made sense, and I remember saying how great it was because though the magic of class helpers you can call "Free" on any .NET object from Delphi and it would "do the right thing." Yes, of course it "did the right thing", at the expense of holding the platform at arm's length and never really embracing it. Cool your jets… Here, I'm using the term "platform" to refer more to the programming model, and not the built-in frameworks. Not the .NET platform as a whole…People still wrote (including us) their code as if that magic call to Free was still doing what it always has done.
The Free method was introduced onto TObject for the sole purpose of exception safety. It was intended to be used within object destructors. From a destructor, you never directly called Destroy on the instance reference, you would call Free which would check if the instance reference was non-nil and then call Destroy. This was done to simplify the component developer's (and those that write their own class types) efforts by freeing (no pun intended) them from doing that nil check everywhere. We were very successful in driving home the whole create…try…finally…free coding pattern, which was done because of exceptions. However, that pattern really doesn't need to use Free, it could have directly called Destroy.
Foo := TMyObj.Create;
{... work with Foo here}
Foo.Free; {--- Foo.Destroy is just as valid here}
The reason that Foo.Destroy is valid in this instance is because if an exception were raised during the create of the object, it would never enter the try..finally block. We know that if it enters the try..finally block the assignment to Foo has happened and Foo isn't nil and is now referencing a valid instance (even if it were garbage or non-nil previously).
Under .NET, Free did no such thing as "free" memory… it may have caused the object to "dispose" of some resources because the object implemented the IDisposable interface pattern. We even went so far as to literally translate the destructor of declared classes in Delphi for .NET into the IDisposable pattern, even if all that destructor did was to call free other object instances, and did nothing with any other non-memory resource. IOW, under a GC environment it did a whole lot of nothing. This may sound like heresy to some, but this was a case where the power of the platform was sacrificed at the altar of full compatibility.
Come to the ARC side
What is different now? With XE4, we've introduced a Delphi compiler that directly targets the iOS platform and it's ARM derivative processor. Along with this, ARC has now come to full fruition and is the default manner in which the lifetime of all object instances are managed. This means that all object references are tracked and accounted for. This also means that, like strings, once the number of references drop to 0, the object is fully cleaned up, destroyed and it's memory is returned to the heap. You can read about this in detail in this whitepaper here.
If you ask many of my coworkers here, they'll tell you that I will often say, "Names are important." Names convey not only what something is, but in many cases what it does. In programming this is of paramount importance. The names you choose need to be concise, but also descriptive. Internal jargon shouldn't be used, nor should some obscure abbreviation be used.
Since the focus of this piece (aside from the stroll down memory lane) is surrounding "Free", let's look at it. In this instance, Free is a verb. Free has become, unfortunately, synonymous with Destroy. However that's not really it's intent. It was, as stated above, was about writing exception-safe destructors of classes. Writing exception-safe code is also another topic deserving of its own treatment.
Rather than repeat the mistake in Delphi for .NET in how "Free" was handled, Free was simply removed. Yes, you read that right. Free has been removed. "What?" But my code compiles when I call Free! I see it in the RTL source! We know that there is a lot code out there that uses the proverbial create..try..finally..free pattern, so what is the deal!? When considering what to do here, we saw a couple of options. One was to break a lot of code out there and force folks to IFDEF their code, the other was to find a way to make that common pattern still do something reasonable. Let's analyze that commonly implemented pattern using the example I showed above.
Foo is typically a local variable. The intent of the code above is to ensure that the Foo instance is properly cleaned up. Under ARC, we know that the compiler will ensure that will happen regardless. So what does Foo.Free actually do!? Rather than emit the well known "Unknown identifier" error message, the compiler simply generates code similar to what it will be automatically generated to clean up that instance. In simplistic terms, the Foo.Free; statement is translated to Foo := nil; which is then, later in the compile process, translated to an RTL call to drop the reference. This is, effectively, the same code the compiler will generate in the surrounding function's epilogue. All this code has done is simply do what was going to happen anyway, just a little earlier. As long as no other references to Foo are taken (typically there isn't even in Non-ARC code), the Foo.Free line will do exactly what the developer expects!
"But, but, but! wait! My code intended to Free, destroy, deallocate, etc… that instance! Now it's not!" Are you sure? In all the code I've analyzed, which includes a lot of internal code, external open-source, even some massive customer projects used for testing and bug tracking, this pattern is not only common, it's nearly ubiquitous. On that front we've succeed in "getting the word out" about the need for exception safety. If the transient local instance reference is the only reference, then ARC dictates that once this one and only one reference is gone, the object will be destroyed and de-allocated as expected. Semantically, your code remains functioning in the same manner as before.
To steal a line from The Matrix, "You have to realize the truth… there is no Free".
Wait… but my class relies on the destructor running at that point!
Remember the discussion above about our handling of IDisposable under Delphi for .NET? We considered doing something similar… implement some well-known interface, place your disposal code in a Dispose method and then query for the interface and call if present. Yuck! That's a lot of work to, essentially, duplicate what many folks already have in their destructors. What if you could force the execution of the destructor without actually returning the instance memory to the heap? Any reference to the instance would remain valid, but will be referencing a "disposed" instance (I coined the term a "zombie" instance… it's essentially dead, but is still shambling around the heap). This is, essentially, the same model as the IDisposable pattern above, but you get it for "free" because you implemented a destructor. For ARC, a new method on TObject was introduced, called DisposeOf.
Why DisposeOf, and not simply Dispose? Well, we wanted to use the term Dispose, however, because Dispose is also a standard function there are some scoping conflicts with existing code. For instance, if you had a destructor that called the Dispose standard function on a typed pointer to release some memory allocated using the New() standard function, it would fail to compile because the "Dispose" method on TObject would be "closer in scope" than the globally scoped Dispose. Bummer… So DisposeOf it is.
We've found, in practice, and after looking at a lot of code (we do have many million lines of Delphi code at our disposal, and most of it isn't ours), it became clear that the more deterministic nature of ARC vs. pure GC, the need to actively dispose of an instance on-demand was a mere fraction of the cases. In the vast majority (likely >90%) can simply let the system work. Especially in legacy code where the above discussed create..try..finally..free pattern is used. The need for calling DisposeOf explicitly is more the exception than the rule.
So what else does DisoseOf solve? It is very common among various Delphi frameworks (VCL and FireMonkey included), to place active notification or list management code within the constructor and destructor of a class. The Owner/Owned model of TComponent is a key example of such a design. In this case, the existing component framework design relies on many activities other than simple "resource management" to happen in the destructor.
TComponent.Notification() is a key example of such a thing. In this case, the proper way to "dispose" a component, is to use DisposeOf. A TComponent derivative isn't usually a transient instance, rather it is a longer-lived object which is also surrounded by a whole system of other component instances that make up things such as forms, frames and datamodules. In this instance, use DisposeOf is appropriate.
For class instances that are used transiently, there is no need for any explicit management of the instance. The ARC system will handle it. Even if you have legacy code using the create..try..finally..free pattern, in the vast majority of cases you can leave that pattern in place and the code will continue to function as expected. If you wanted to write more ARC-aware code, you could remove the try..finally altogether and rely on the function epilogue to manage that instance.
Feel the power of the ARC side.
"Ok, so what is the point? So you removed Free, added DisposeOf… big deal. My code was working just fine so why not just keep the status quo?" Fair question. There is a multi-layered answer to that. One part of the answer involves the continuing evolution of the language. As new and more modern programming styles and techniques are introduced, there should be no reason the Delphi language cannot adopt such things as well. In many cases, these new techniques rely on the existence of some sort of automatic resource/memory management of class instances.
One such feature is operator overloading. By allowing operators on instances, the an expression may end up creating several "temporary" instances that are referenced by "temporary" compiler-created variables inaccessible to the developer. These "temporary" variable must be managed so that instances aren't improperly "orphaned" causing a memory leak. Relying on the same management mechanism that all other instances use, keeps the compiler, the language, and the runtime clean and consistent.
As the language continues to evolve, we now have a more firm basis on which to build even more interesting functionality. Some things under consideration are enhancements such as fully "rooting" the type system. Under such a type system, all types are, effectively, objects which descend from a single root class. Some of this work is already under way, and some of the syntactical usages are even available today. The addition of "helper types" for non-structured types is intended to give the "feeling" of a rooted type system, where expressions such as "42.ToString();" is valid. When a fully rooted type system is introduced, such an expression will continue to work as expected, however, there will now be, effectively, a real class representing the "42" integer type. Fully rooting the type system will enable many other things that may not be obvious, such as making generics, and type constraints even more powerful.
Other possibilities include adding more "functional programming" or "declarative programming" elements to the language. LINQ is a prime example of functional and declarative programming elements added to an imperative language.
Another very common thing to do with a rooted type system is to actively move simple intrinsic type values to the heap using a concept of "boxing". This entails actually allocating a "wrapper" instance, which happens to actually be the object that represents the intrinsic type. The "value" is assigned to this wrapper and now you can pass this reference around as any old object (usually as the "root" class, think TObject here). This allows any thing that can reference an object to also reference a simple type. "Unboxing" is the process by which this is reversed and the previously "boxed" value is extracted from the heap-allocated instance.
What ARC would enable here is that you can still interact with the "boxed" value as if it were still a mere value without worrying about who is managing the life-cycle of the instance on the heap. Once the value is "unboxed" and all references to the containing heap-instance are released, the memory is then returned to the heap for reuse.
The key thing to remember here: this is all possible with a natively compiled language without the need for any kind of virtual machine or runtime compilation. It is still strongly and statically typed. In short, the power and advantages gained by "giving in to the ARC side" will become more apparent as we continue to work on the Delphi language… and I've not even mentioned some of the things we're working on for C++…
Share This | Email this page to a friendPosted by Allen Bauer on June 14th, 2013 under ARC, ARM, Android, Delphi, Mobile, iOS | 66 Comments »
Delphi-Treff interview–In English
I recently did an email interview with Martin Strohal of the Delphi-Treff Team. I got permission to publish the original English version (Since my German is a little rusty…)
Delphi XE2 will be published this year. What are the key features of this new release? (Is this the release named "Pulsar"?)
Customers will now be able to target Windows 32bit, Windows 64bit, and Mac OSX 32bit. XE2 introduces a new cross-platform GUI-centric, GPU accelerated component framework called, FireMonkey. VCL also received an extensive upgrade with the introduction of Styles. New in XE2 is LiveBindings. This provides a powerful and flexible system that allows binding any kind of data source to any property or properties. The data source can be nearly anything, including other properties.
There will be a new framework called FireMonkey. Can you tell us, how FireMonkey works and what's is job?
FireMonkey is designed from the ground up to be cross-platform. It, by design, isolates all platform specifics into an independent platform layer. While FireMonkey extensively uses components, how it actually renders to the GUI is significantly different from VCL. While VCL uses independent, self-contained components that all render using their own techniques or even wrap existing Windows controls, FireMonkey manages the display of content using compositing. This allows for significantly more flexibility in GUI-design. Animation is built into the framework in order to allow very interactive and advanced user interactions. Like animation, filters and transforms are also built in which allow the who UI of portions thereof to be manipulated. For instance, a small modal popup could be displayed and rather than merely disabling the main UI, you could apply a blurring effect to the UI behind the modal popup giving it more depth of field. This blurring effect is applied while compositing the UI and is independent of any rendering of the components/controls.
Is FireMonkey a replacement for the VCL or an addition?
VCL was first and foremost designed to be a relatively thin wrapper to make Windows programming simpler and more accessible. VCL effectively embraced many Windows programming concepts and made them intrinsic to the framework. This certainly made Windows programming a far more productive and pleasant experience. It also inextricably tied VCL to the Windows platform and all its unique characteristics. We had several goals with FireMonkey. First of all we wanted a framework that allowed for the creation of very rich, interactive, modern UIs. We also wanted a framework that wasn't hog-tied to a given platform. FireMonkey is not intended as a replacement for VCL; rather it is intended as a whole new way for customers to embrace the emerging market for richer, more interactive desktop applications along with the burgeoning mobile space.
If I want to run an existing Delphi application under Mac OS X. Do I have to convert it to FireMonkey first? Will there be a converter?
VCL and FireMonkey share common RTL and database components such as dbXpress and DataSnap. While you will not be able to simply recompile your VCL based application for Mac OSX, you will be able to take all your code which exclusively uses the RTL and DB components. As for converters, I know that at the time of this writing there are several third-parties offering VCL->FireMonkey converter products.
What are your future plans for FireMonkey?
More platforms and mobile. FireMonkey is how we're keeping relevant in the emerging heterogeneous mobile and desktop platform world currently emerging. Throughout most of the '90s and early '00s, the mobile computing space was non-existent or very niche. Apple and the Mac OS were actually in the decline and many weren't sure they'd be around to see 2000. What a different world we're in now. The desktop Mac OSX is making significant inroads into the enterprise, and the mobile space is anything by niche. Tying Delphi strictly to the Windows platforms ignores huge opportunities for both Embarcadero and all our Delphi customers, new and old. With FireMonkey, XE2 is positioned to be the only /native/ cross-platform framework that targets both major desktop operating systems and one of the dominant mobile operating systems, iOS. Expect to see FireMonkey become more powerful and even easier to use and target even more mobile platforms in future releases.
The applications cross compiled for OS X are native. Is there the new Delphi compiler on duty? And will it be used for "normal" Win32 applications in future?
There are three new compilers introduced with XE2. Delphi Windows 64bit, Delphi Mac OSX 32bit, and C++ Mac OSX 32bit. All of these compilers are derived from the existing codebase. They all essentially share the same respective "front-ends", the part of the compiler that translates the source-code into an intermediate form in preparation for generating machine code. The existing 32bit Delphi and 32bit C++ compilers are still very much in business. We have some research projects in progress for targeting even more platforms and CPU architectures.
If new compiler: Is the new compiler fully downwards compatible? Or are there some functions abandoned?
For XE2, the current compilers were employed in order to ensure maximum backward compatibility. Looking to the future, we're currently researching new directions for both a compiler architecture which allows for quicker targeting of new architectures and looking at adding more advanced, and even more modern language features. This may mean eschewing some older features of the language.
Are there some new Features in Delphi XE2 for people who will only develop VCL-Win32-Applications?
As evidenced by XE2, VCL is still very much a key part of the product. With the addition of Styles, the programmer can take their existing VCL based applications and update and modernize the look and feel by using the new Style engine. The third-party component support remains one of, if not the best for all independent development tools on the market. VCL is still the fastest and easiest way to develop*Windows* applications. Also, with XE2 and now being able to target 64bit Windows, most VCL applications can now be merely recompiled for 64bit, subject to the normal 32bit->64bit caveats.
Will there be a new Starter edition again? And do you have any plans for a free Delphi (for getting more new blood in the Delphi community)?
Starter edition is very much a key part of our product line. When you compare the price point of the Starter edition taking account of inflation with the price of the original Turbo Pascal coupled with the vastly superior capabilities of Starter compare to Turbo Pascal, I think you get far more value than the price. We also have very competitive offerings for the educational markets, where one can get nearly 80-90% off of all the products. As for a free edition, we're always looking at ways to grow the community base without the potential for harming our existing, very strong and growing market. At this point we feel that the Starter edition provides a good balance of price, capabilities and value. Starter is positioned directly at the new customer by including features that most new customers would need right away to in order to both learn the environment and begin to develop commercial applications.
Share This | Email this page to a friendPosted by Allen Bauer on October 14th, 2011 under CodeGear | 3 Comments »
More x64 assembler fun-facts–new assembler directives
The Windows x64 ABI (Application Binary Interface) presents some new challenges for assembly programming that don't exist for x86. A couple of the changes that must be taken into account can can be seen as very positive. First of all, there is now one and only one OS specified calling convention. We certainly could have devised our own calling convention like in x86 where it is a register-based convention, however since the system calling convention was already register based, that would have been an unnecessary complication. The other significant change is that the stack must always remain aligned on 16 byte boundaries. This seems a little onerous at first, but I'll explain how and why it's necessary along how it can actually make calling other functions from assembly code more efficient and sometimes even faster than x86. For a detailed description of the calling convention, register usage and reservations, etc… please see this. Another thing that I'll discuss is exceptions and why all of this is necessary.
For an given function there are three parts we're going to talk about, the prolog, body, and epilog. The prologue and epilogue contain all the setup and tear-down of the function's "frame". The prolog is where all the space on the stack is reserved for local variables and, different from how the x86 compiler works, the space for the maximum number of parameter space needed for all the function calls within the body. The epilog does the reverse and releases the reserved stack space just prior to returning to the caller. The body of a function is where the user's code is placed, either in Pascal, or as we'll see this is where your assembler code you write will go.
You may be wondering why the prolog is reserving parameter space in addition to the space needed for local variables. Why not just push the parameters on the stack right before calling a function? While there is technically nothing keeping the compiler from placing parameters for a function call on the stack immediately before a call, this will have the effect of making the exception tables larger. As I mentioned above, exceptions in x64 are not implemented the same as in x86, which was a stack-based linked list of records. In x64, exceptions are done using extra data generated by the compiler that describes the stack changes for a given function and where the handlers/finally blocks are located. By only modifying the stack within the prolog and epilog, "unwinding" the stack is easier and more accurate. Another side benefit is that when passing stack parameters to functions, the space is already available so the data merely needs to be "MOV"ed onto the stack without the need for a PUSH. The stack also remains properly aligned, so no extra finagling of the RSP register is necessary.
Delphi for Windows 64bit introduced several new assembler directives or "pseudo-instructions", .NOFRAME, .PARAMS, .PUSHNV, and .SAVENV. These directives allow you to control how the compiler sets up the context frame and ensures that the proper exception table information is generated.
Some functions never make calls to other functions. These are called "leaf" functions because the don't do any further "branching" out to other functions, so like a tree, they represent the "leaf" For functions such as this, having a full stack frame may be extra overhead you want eliminate. While the compiler does try and eliminate the stack frame if it can, there are times that it simply cannot automatically figure this out. If you are certain a frame is unnecessary, you can use this directive as a hint to the compiler.
.PARAMS <max params>
This one may be a little confusing because it does not refer to the parameters passed into the current function, rather this directive should be placed near the top of the function (preferably before any actual CPU instructions) with a single ordinal parameter to tell the compiler what the maximum number of parameters will be needed for all the function calls within the body. This will allow the compiler to properly reserve extra, properly aligned, stack space for passing parameters to other functions. This number should reflect the maximum number of parameters for all functions and should include even those parameters that are passed in registers. If you're going to call a function that takes 6 parameters, then you should use ".PARAMS 6".
When you use the .PARAMS directive, a pseudo-variable @Params becomes available to simplify passing parameters to other functions. It's fairly easy to load up a few registers and make a call, but the x64 calling convention also requires that callers reserve space on the stack even for register parameters. The .PARAMS directive ensures this is the case, so you should still use the .PARAMS directive even if you're going to call a function in which all parameters are passed in registers. You use the @Params pseudo-variable as an array, where the first parameter is at index 0. You generally don't actually use the first 4 array elements since those must be passed in registers, so you'll start at parameter index 4.
The default element size is the register size of 64bits, so if you want to pass a smaller value, you'll need a cast or size override such as "DWORD PTR @Params[4]", or " @Params[4].Byte". Using the @Params pseudo-variable will save the programmer from having to manually calculate the offsets based on alignments and local variables. UPDATE: I foobar'ed that one… The @Params[] array is an array of bytes, which allows you to address every byte of the parameters. Each parameter takes up 8 bytes (64bits), so you'll need to scale accordingly to access each parameter. Casting or size overrides are still necessary. The above bad example should have been: "DWORD PTR @Params[4*8]" or " @Params[4*8].Byte". Sorry about that.
.PUSHNV <GPReg>, .SAVENV <XMMReg>
According to the x64 calling convention and register usage spec, there are some registers which are considered non-volatile. This means that certain registers are guaranteed to have the same value after a function call as it had before the function call. This doesn't mean this register is not available for usage, it just means the called function must ensure it is properly preserved and restored. The best place to preserve the value is on the stack, but that means space should be reserved for it. These directives provide both the function of ensuring the compiler includes space for the register in the generated prolog code and actually places the register's value in that reserved location. It also ensures that the function epilog properly restores the register before cleaning up the local frame. .PUSHNV works with the 64bit general purpose registers RAX…R15 and .SAVENV works with the 128bit XMM0..XMM15 SSE2 registers. See the above link for a description of which registers are considered non-volatile. Even though you can specify any register, volatile or non-volatile as a parameter to these directives, only those registers which are actually non-volatile will be preserved. For instance, .PUSHNV R11 will assemble just fine, but no changes to the frame will be made. Whereas, .PUSHNV R12 will place a PUSH R12 instruction right after the PUSH RBP instruction in the prolog. The compiler will also continue to ensure that the stack remains aligned. Remember when I talked about why the stack must remain 16byte aligned? One key reason is that many SSE2 instructions which operate on 128bit memory entities require that the memory access be aligned on a 16byte boundary. Because the compiler ensures this is the case, the space reserved by the .SAVENV directive is guaranteed to be 16byte aligned.
Writing assembler code in the new x64 world can be daunting and frustrating due to the very strict requirements on stack alignment and exception meta-data. By using the above directives, you are signaling your intentions to the one thing that is pretty darn good at ensuring all those requirements are met; the compiler. You should always ensure the directives are placed at the top of the assembler function body before any actual CPU instructions. This makes sure the compiler has all the information and everything is already calculated for when it begins to see the actual CPU instructions and needs to know what the offset from RBP where that local variable is located. Also, by ensuring that all stack manipulations happen within the prolog and epilog, the system will be able to properly "unwind" the stack past a properly written assembler function. Without this data, the OS unwind process could become lost and at worst, skip exception handlers, or at worst call the wrong one and lead to further corruption. If the unwind process gets lost enough, the OS may simply kill the process without any warning, similar to what stack overflows do in 32bit (and 64bit).
Share This | Email this page to a friendPosted by Allen Bauer on October 10th, 2011 under 64bit, CodeGear, Delphi, General, Work | Comment now »
x64 assembler fun-facts
While implementing the x64 built-in assembler for Delphi 64bit, I got to "know" the AMD64/EM64T architecture a lot more. The good thing about the x64 architecture is that it really builds on the existing instruction format and design. However, unlike the move from 16bit to 32bit where most existing instruction encodings were automatically promoted to using 32bit arguments, the x64 design takes a different approach.
One myth about the x64 instructions is that "everything's wider." That's not the case. In fact many addressing modes which were taken as absolute addresses (actually offsets within a segment, but the segments are 4G in 32bit), are actually now 32bit relative offsets now. There are very few addressing modes which use a full 64bit absolute address. Most addressing modes are 32bit offsets relative to one of the 64bit registers. One interesting addressing mode that is "implied" in many instruction encodings is the notion of RIP-relative addressing. RIP, is the 64bit equivalent of the 32bit EIP, or 16bit IP, or Instruction Pointer. This represents from which address the CPU will fetch the next instruction for execution. Most hard-coded addresses within many instructions are now relative offsets from the current RIP register. This is probably the biggest thing you have to wrap your head around when moving from 32bit assembler.
Even though many instructions will implicitly use the RIP-relative addressing mode, there are some instruction addressing modes that continue to use a 32bit offset, and are not RIP-relative. This can really bite you when doing simple mechanical translations from 32bit to 64bit. These are the SIB form with a 32bit (or even 8bit) offset. What can happen is that you end up forming an address that can only address 32bits, and is thus limited to addressing items below the 4G boundary! And this is a perfectly legal instruction! To demonstration this, consider the following 32bit assembler that we'll translate to 64bits.
var TestArray: array[0..255] of Word; function GetValue(Index: Integer): Word; asm MOV AX,[EAX * 2 + TestArray] end;
Let's now translate this for use in 64bit using a simple mechanical translation.
var TestArray: array[0..255] of Word; function GetValue(Index: Integer): Word; asm MOVSX RAX,ECX MOV AX,[RAX * 2 + TestArray] end;
Pretty straight forward, right? Not so fast there partner. Let's see; I know that I need to use a full 64bit register for the offset but since Integer is still 32bits, I need to "sign-extend" it to 64bits. The venerable MOVSX (Move with sign extension) instruction "promotes" the signed 32bit offset to 64bits while preserving the sign. Nope, that's not a problem. The only thing I changed in the next instruction was EAX to RAX, so how could that be a problem? Well, when you compile this code you'll get a rather strange error message:
[DCC Error] Project7.dpr(18): E2577 Assembler instruction requires a 32bit absolute address fixup which is invalid for 64bit
Huh? Remember the little note above about the SIB instruction form? Because the RAX (or EAX in 32bit) register is being scaled (the * 2), this instruction must use the SIB (Scale-Index-Base) instruction form. When using the SIB form RIP isn't considered when calculating the actual address. Additionally, the offset encoded in the instruction can still only be 8 or 32bits. No 64bit offsets.
In 32bit, the compiler would generate a "fixup" to ensure that the encoding of the instruction offset field to the global "TestArray" variable was properly "fixed up" at runtime should the image happened to be relocated to another address. This is a 32bit absolute address. The 64bit version of this instruction, while actually a truly valid instruction, would only have 32bits in which to place the address of "TestArray." The "fixup" generated would have to remain 32bit. This could lead to creating an image that were it ever relocated above the 4G boundary, would likely crash at best or read the wrong memory address at worst!
Ok, so now what? There is a SIB form that we can use to work around this problem, but it requires burning another register. The good news is that we now have another 8 registers with which to work. So if you have a rather complicated chunk of 32bit assembler code that burns up all the existing usable 32bit registers, you now have another group of registers that can help solve this problem without having to rework the code even more. So here's how to fix this for 64 bit:
var TestArray: array[0..255] of Word; function GetValue(Index: Integer): Word; asm MOVSX RAX,ECX LEA R10,[TestArray] MOV AX,[RAX * 2 + R10] end;
Here, I used the volatile R10 register (R8 an R9 are used for parameter passing) to get the absolute address of TestArray using the LEA instruction. While the "address" portion of this instruction is still 32bits, it is taken as RIP-relative. In other words, this value is the "distance" from the next instruction to the variable TestArray in memory. After this instruction, R10 now contains a true 64bit address of the TestArray variable. I must still use the SIB form in the next instruction, but instead of a hard-coded "offset" I use the value in R10. Yes, there is still an implicit offset of 0, which uses the 8bit offset form.
You can see that mindless, mechanical translations of assembler code is likely to cause you some grief due to some of the subtle changes in instruction behaviors. For this very reason, we strongly recommend you use all Object Pascal code instead of resorting to assembler when possible. This will not only better ensure that your code will more likely move unchanged to other processor architectures (think ARM here folks), but you'll not have to worry about such assembler gotchas in the future. If you're using assembler code because "it's faster," I would encourage you to look closely at the algorithm used. There are many cases where the proper algorithm written in Object Pascal will yield greater gains than a simple translation to assembler using the same algorithm. Yes there are some things which you simply must do in assembler (strange, off-beat calling conventions, "LOCK" instructions for concurrency, etc…), but I would contend that many assembler functions can be moved back to Object Pascal with little impact on performance.
Share This | Email this page to a friendPosted by Allen Bauer on October 5th, 2011 under 64bit, Delphi, General | 7 Comments »
"Talk Amongst Yourselves" #3
So far we've had "Testing synchronization primitives" and "Writing a 'self-monitoring' thread-pool." Let's build on those topics, and discuss what to do with exceptions that occur within a scheduled work item within a thread pool.
My view is that exceptions should be caught and held for later inspection, or re-raised at some synchronization point. What do you think should happen to the exceptions? Should they silently disappear, tear-down the entire application, or should some mechanism be in place to allow the programmer to decide what to do with them?
Share This | Email this page to a friendPosted by Allen Bauer on April 7th, 2010 under Delphi, General, Parallel Programming, Work | 5 Comments »
Another installment of "Talk Amongst Yourselves"
Let's start thinking about thread pools. How do you manage a general purpose thread pool in the face of no-so-well-written-code? For instance, a task dispatched into the thread pool never returns, effectively locking that thread from ever being recycled. How do you monitor this? How long do you wait before spooling out a new thread? Do you keep a "monitor thread" that periodically checks if a thread has been running longer than some (tunable) value? What are the various techniques for addressing this problem?
So, there you go… Talk amongst yourselves.
Share This | Email this page to a friendPosted by Allen Bauer on March 26th, 2010 under CodeGear, Delphi, General, Parallel Programming, Work | 7 Comments »
This is the last day…
In this office. I've been in the same physical office for nearly 15 years. After years of accumulation, it now looks positively barren. Beginning next Monday, March 29th, 2010, I'll be in a new building, new location, and new office. The good thing is that the new place is a mere stone's throw from the current one. It will be great to leave all the Borland ghosts behind.
Share This | Email this page to a friendPosted by Allen Bauer on March 26th, 2010 under CodeGear, Delphi, Generics, Personal, Work | 3 Comments »
Simple question… very hard answer… Talk amongst yourselves…
I'm going to try a completely different approach to this post. I'll post a question and simply let the discussion ensue. I would even encourage the discussion to spill over to the public newsgroups/forums. Question for today is:
How can you effectively unit-test synchronization primitives for correctness or more generally, how would you test a concurrency library?
Let's see how far we can get down this rabbit hole ;-).
Share This | Email this page to a friendPosted by Allen Bauer on March 22nd, 2010 under CodeGear, Delphi, General, Parallel Programming | 26 Comments »


text:
May 6, 2016
ROCKFORD (WIFR) -- The search for Rockford Public Schools' new superintendent is down to two.
Assistant superintendents, Ehren Jarrett and Matt Vosberg submitted their applications last month.
They are the only two applicants and will be interviewed over the next few weeks.
Click Here to access the online Public Inspection File
Viewers with disabilities can get assistance accessing this station's FCC Public Inspection File by contacting the station with the information listed below. Questions or concerns relating to the accessibility of the FCC's online public file system should be directed to the FCC at 888-225-5322, 888-835-5322 (TTY), or firstname.lastname@example.com.


text:
Z895 12" Sani-Flo® Trench System
USA Configurable Zurn Z895 12" [305 mm] wide pre-sloped trench drainage system with 1/8" per foot slope, 5-foot modular sections. #12 gage type 304 stainless steel drain channel with bolted flanged connection complete with flange gasket and stamped stainless steel grate.
© Copyright 2016 Zurn Industries, LLC. All rights reserved.