text:
И́ва лопа́рская, или И́ва лапла́ндская () — кустарник, вид рода  семейства .

Ботаническое описание
Кустарник высотой до 1,5 метров с шаровидной или яйцевидной формой куста. Молодые побеги опушённые, взрослые голые, тёмно-красные или бурые. Почки голые, желтовато-бурые, яйцевидные.

Листья продолговато-яйцевидные или ланцетные, длиной 5—8 см, шириной 2—3 см, на черешках длиной до 1 см. Сверху они слегка морщинистые, тускло-зелёные, снизу беловойлочные, с резко выступающими жилками. Основание листовой пластинки округлое или широко-клиновидное, вершина складчато-заострённая. Край листа завороченный, цельный, реже волнистый или пильчатый.

Двудомное растение. Соцветия — овальные или цилиндрические густоцветковые серёжки длиной 2—4 см, почти сидячие. Прицветные чешуйки обратнояйцевидные или язычковидные, внизу бурые, вверху почти чёрные. Тычинок две, с фиолетово-жёлтыми пыльниками. Завязь яйцевидно-коническая, с длинным столбиком, покрыта густым спутанным беловойлочным опушением. Цветёт ива лопарская в апреле — начале мая, до распускания листьев.

Плод — коробочка длиной 7—8 мм, содержит 12—16 семян длиной около 1 мм. Семена переносятся ветром, имеют хохолок из многочисленных шелковистых волосков.

Экология и распространение
Ива лопарская широко распространена в лесотундровой зоне Евразии и в более северных районах средней полосы. В лесостепной и степной полосе встречается очень редко. Растёт обычно одиночными кустами в сырых заболоченных местах, на опушках леса и торфяниках. Предпочитает кислые почвы.

Вид описан из Швеции.

Ива лопарская внесена в Красные книги Республики Мордовия, Чувашской республики, Пензенской области, а также в утверждённые Списки видов для Красных книг Ульяновской и Нижегородской областей.

Химический состав
Листья содержат (от абсолютно сухого вещества в процентах): золы 4,2, протеина 16,5, жира 3,1, клетчатки 20,8,  55,3.

Значение и применение
Почки составляют основной корм для полярной и , поэтому в некоторых частях Западной Сибири называют «куропатником». Листья летом охотно поедаются . Изредка поедается .

Кора содержит 9—14,27 % таннидов.

Медоносное растение.

Может использоваться в качестве декоративного растения для садово-паркового озеленения.

Примечания

Литература

Ссылки

Ива
Флора Евразии
Декоративные кустарники
Медоносы
Кормовые растения северного оленя
Кормовые растения европейского лося

redpajama_set_name: RedPajamaWikipedia


text:
Turkish Politics in Action
Turkey and Schengen
Murat Daoudov, Director of European and International Relations at the Union of Municipalities of Marmara, has an interesting piece in which he considers Turkish membership in Schengen. This ties into the below post on Europe's varying visions of integration. States like the United Kingdom and Ireland, for reasons of their own, are not part of the Schengen zone, and with Turkey's new foreign policy and recent moves to open up visa-free travel with Syria and Lebanon, might decide to take a similar path. Additionally, there are serius concerns about Europe's inclusion in the Schengen zone, particularly from France, and placing derogations on work and travel should Turkey be admitted to the EU has already been discussed.
Posted by Ragan Updegraff at 6:43 AM
Labels: European Union, Foreign Policy
Turkey is in a state of flux. Founded in 1923 amidst the ruins of the Ottoman Empire and very much a product of modern nation-state ideology, the emergence of Turkey is one of the great stories of the last century.
Although the Turkish state is still quite strong, an increasingly globalized, albeit incipient, civil society has come to challenge its hegemony and singular notions of "Turkishness." Growing numbers of Turks are demanding human rights reform and a more democratic society. At the same time, politics remains a largely elite affair, minority and cultural rights go largely unrecognized, nationalism remains a potently virulent force, and political stability is still a matter of concern. Unrest in the Kurdish southeast, anti-democratic maneuverings to curb civil liberties and close political parties, repression of political dissent, and a questionable human rights regime raise real concerns for the future of Turkish democracy.
A candidate for accession into the European Union, Turkey stands at a crossroads—will it move toward the postmodernity of Europe, or will it forge an ultimately separate path? Will Turkey provide one of the amazing political stories of the twenty-first century, and what does its political development and changing geopolitics have to say about the future of world politics?
Ragan Updegraff
Ragan Updegraff has closely followed Turkish politics for over six years, working as a political consultant, journalist, and analyst along the way. His work has appeared in the Journal of Democracy and the Jerusalem Post, among various other publications, and he has been interviewed by Voice of America, The Guardian, and The Telegraph. In 2009-2010, he was a United States Fulbright Research Fellow and studied the impact that Turkish legal reforms undertaken as part of Turkey's European accession process were having in transforming Turkey's relations with minority groups, in particular its nationalist Kurdish population. He also studied EU assistance to Turkish NGOs working on minority right issues. He continues to closely monitor events in Turkey from Washington, D.C. Email Me
Countering Terrorism: Peacebuilding and the U.S. S...
Human Rights Discourses and the European Process
Censorship of Parliament Email
A Moderate on the Constitutional Court?
"The Most Radical Islamist"
Prime Minister Erdogan Speaks
Turkey, al-Qa'ida, and Afghanistan
Turkey and Visions of European Integration
Oymen at the European Parliament
Crisis Coming . . . Here?
When In Spain . . .
The ECHR, the Aczmendis, and Bad Reporting
"April 24" Approaches . . .
Turkish Jews Protest Anti-Defamation League on Arm...
Putting Turkey Back of European Tracks
RTUK, Minister of Family and Women's Affairs Lashe...
A Crisis Coming: The Making of Political Theatre
Ahead of the Curve?
"The Undersecretariat of Public Order and Security...
Literature or Pornography?
Ergenekon Showdown in the Judiciary
Railway Connects Mosul to Istanbul
The EU Parliament: "Missing the Confederate Cyprus...
Squaring Off on Constitutional Amendments, Part II
Into the Bunkers?
Loss of Public Space in Besiktas
Turkish Playwright, Vakit, and AKP Mayor Get Press...
Armenia (Continued . . .)
Far From Safe: Yet Another LGBT Group Targeted
Iranian Refugees Face Problems in Turkey
"For Hrant, For Justice"
Power and Discipline?: Religion and Identity Cards
On Neighborhood Pressure
The Council of State and Coefficient Reform
Mustafa Sarigul: A Progressive for Turkey?
Medine Memi and the Duty to Protect
Tekel, Neoliberalism, and the AKP
"Fight!"
RAND Issues U.S.-Turkey Report
Bianet Releases Annual Media Freedom Report
The Tax Discourse (Or, Lack Thereof)
Turkey in the Media
AB Haber (English Site)
Bianet
Changing Turkey in a Changing World
EU-Turkey Monitor (from ZEI)
Erkan's Field Diary (from Erkan Saka)
Eurasianet -- Turkey
Hürriyet (The Doğan Group)
Informed Comment (from Juan Cole)
Insight Turkey
Istanbul Calling (from Yigal Schleifer)
Istanbul Notes (from Aengus Collins)
Journalistinturkey (from Fréderike Geerdink)
Kamil Pasha (from Jenny White)
Qantara.de -- Dialogue with the Islamic World
Southeast Times -- Turkey
The Balkans Project (from the Institute for Policy Studies)
The Ebru Project (from Atilla Durak)
The Global Post -- Turkey
The Istanbulian (from Emre Kizilkaya)
The Rumeli Observer (from ESI)
The TurkEU Blog (from Paul T. Levin)
The Turko-file -- Eurasianet (from Yigal Schleifer)
The White Path (from Mustafa Akyol)
Today's Zaman (The Zaman Group)
Transnational Middle East Observer (from Wladimir van Wilgenburg)
Turkey & European Union Relations (European Union Plaform)
Turkey Etcetera (from Alex Christie-Miller)
Turkey Watch (from Fadil Aliriza)
Turkish NGOs
Accessible Life Association
Anatolian Cultural Foundation
ARI Movement
Associaion for the Support and Education of Women Candidates (KADER)
Association for Liberal Thinking
Association for the Development of Social and Cultural Life (SKYGD)
Association of Committees for Monitoring Parliamentarians and Elected Officials (TUMIKOM)
Civil Society Index Project (STEP)
Community of Turkish Journalists (TGC)
Community Volunteers Foundation (TOG)
Confederation of Progressive Trade Unions of Turkey (DISK)
Diyarbakir Bar Association
Federation of Caucasian Associations
Flying Broom
Foundation for Society and Legal Studies
Foundation for the Support of Women's Work
Haci Bektas Veli Anatolian Cultural Foundation
Helsinki Citizens Assembly
History Foundation of Turkey
Human Rights Agenda Association (IHGD)
Human Rights Association (IHD)
Human Rights Foundation of Turkey (TIHV)
Human Rights Joint Platform (IHOP)
Karadeniz Environment Association
Kurdish Human Rights Project
MAZLUM-DER
Social Development and Gender Equality Policies Center (SOGEP)
Society and Democracy Association (TDD)
The Koman Foundation
Third Sector Foundation of Turkey (TUSEV)
Turkey Human Rights Research Association (IHAD)
Turkish Indutrialists' and Businessmen's Association (TUSIAD)
Van Regional Bar Association
Women Center Education Production Consultancy and Solidarity Foundation (KAMER)
Women for Women's Human Rights (KIH)
Women's Rights Association Against Discrimination (AKDER)
Young Civilians (Genc Siviller)
Youth Association for Habitat (HGD)
Youth for Understanding in Turkey
Amnesty International USA--Turkey
Center for European Integration Studies (ZEI)
Center for Strategic and International Studies (CSIS) -- Turkey Project
Centre for European Policy Studies (CEPS)
Centre for European Reform (CER)
Centre for European Security Studies (CESS)
Chatham House -- Turkey Project
Diyarbakir Institute for Social and Political Research
European Centre for Minority Issues
European Institute (Bilgi University)
European Stability Initiative (ESI)
Foundation for Political, Economic, and Social Research (SETA)
German Marshall Fund -- On Turkey
International Crisis Group -- Turkey/Cyprus
Istanbul Policy Center (Sabanci University)
Minority Rights Group International (MRGI)
Project on Middle East Democracy
Southeast Europe Project, Woodrow Wilson Center for International Scholars
The Brookings Institution -- Turkey Project
The Institute of Turkish Studies (Georgetown University)
The Journal of Turkish Weekly (from the International Strategic Research Organization)
The SETA Foundation -- Washington, D.C.
Turkey Analyst -- Silk Road Studies Program (Central Asia-Caucasus Institute)
Turkish Economic and Social Studies Foundation (TESEV)
Turkish Policy Quarterly
TurkStat (Government of Turkey)
Delegation of the European Union to Turkey
Turkey Secretariat General for EU Affairs
European Commission Enlargement -- Turkey
Civil Society Development Center (STGM)
Central Finance and Contracts Unit (CFCU) (T.R. Prime Ministry)
EU-Turkey Civic Commission
Turkey Country Profile, Office of Enlargement, European Commission
Office of Enlargement, European Commission
Office of External Relations, European Commission
Committee on Foreign Affairs, European Parliament
Promotion of Human Rights and Democratization by the European Commission
European Instrument for Democracy and Human Rights (EIDHR), European Commission
Transatlantic Trends Survey (German Marshall Fund)
Timeline of Turkey's EU Accession Process (from EurActiv.com)
Other European Institutions
Parliamentary Assembly of the Council of Europe (PACE)
Commissioner for Human Rights, Council of Europe
Venice Commission, Council of Europe
European Court of Human Rights (ECHR)
Convention for the Protection of Human Rights and Fundamental Freedoms
The Organization for Security and Co-operation in Europe (OSCE)
OSCE High Commissioner on National Minorities
OSCE Parliamentary Assembly
Committee of Ministers, Council of Europe
2011 Bianet Media Monitoring Report
EU Commission Progress Report (2011)
"He Loves You, He Beats You," Human Rights Watch (2011)
OSCE Survey of Imprisoned Journalists (April 2011)
"Protesting as a Terrorist Offense," Human Rights Watch (2010)
EU's Accession Partnership Document for Turkey (2008)
Turkey's National Program for the Adoption of the Acquis (2008)
Country Report on Human Rights Practices in Turkey, U.S. Department of State (2010)
Country Report on Religous Freedom in Turkey, U.S. Department of State (July-Dec. 2010)
Country Report on International Religious Freedom in Turkey, U.S. Department of State (2010)
World Report, Human Rights Watch (2011)
Amnesty International Annual Report (2011)
Freedom in the World, Freedom House (2011)
U.S. Commission on International Religious Freedom (USCIRF) Annual Report (2011)
U.S. Commission on International Religious Freedom (USCIRF) Report (2010)
"Turkey and Europe: The Decisive Year Ahead," International Crisis Group (2008)
"Turkey and Europe: The Way Ahead," International Crisis Group (2007)
"A Roadmap for a Solution to the Kurdish Question: Policy Proposals from the Region for the Government," TESEV (2008)
"Opinion on the Legal Status of Religious Communities in Turkey and the Right of the Orthodox Patriarchate of Istanbul to use the Adjective 'Ecumenical,'" Venice Commission (2010)
"Freedom of Religion and Other Human Rights for Mon-Muslim Minorities in Turkey and for the Muslim Minority in Thrace [Eastern Greece]," Resolution 1704, Parliamentary Assembly of the Council of Europe (2010)
"Freedom of Religion and Other Human Rights for Mon-Muslim Minorities in Turkey and for the Muslim Minority in Thrace [Eastern Greece]," Parliamentary Assembly of the Council of Europe (2009)
The Story of Alien(ation) : Real Estate Owenership Problems of Non-Muslim Foundations and Communities in Turkey," TESEV (2009)
Report of the OSCE Representative on Freedom of the Media (2010)
"Forgotten or Assimilated? Minorities in the Education System of Turkey," Minority Rights Group International (2009)
"A Quest for Equality: Minorities in Turkey," Minority Rights Group International (2007)
"Closing Ranks Against Accountability: Barriers to Tackling Police Violence in Turkey," Human Rights Watch (2009)
"We Need a Law for Liberation," Human Rights Watch (2008)
Constitution of Turkey (1982)

redpajama_set_name: RedPajamaCommonCrawl


text:
Incubator for Change (Part I)
Yvonne & The TWB Community
With astute business acumen, unswerving kindness, and forward-thinking visions, TWB Bakery Operations Manager, Yvonne Mukamutara, has been leading the Remera Bakery (Kigali) for over a year.
I had the opportunity to spend extensive time with Yvonne in January and February of this year, and in doing so, could see her strong ability to manage operations at the Remera Bakery, especially with day-to-day workflows, finances, and production.
Shortly after her 1-year anniversary, Yvonne and I decided that we wanted to collaborate and write a blog together. We felt our voice could be strongest when piecing together TWB across oceans, cultures, and insights.
So, we are writing together on this blog to show that working together can look a multitude of varying, powerful ways. Our blog is simple: understanding how TWB acts as an incubator for change. In addition to our own ideas, we also wanted to speak with the TWB women in Kigali, to our trainers, and to our senior staff, specifically to understand how they have changed over the year.
So, here are our voices, put together to show how TWB is this "incubator for change" transforming lives at all levels.
We will share the voices of our organization with a two-part series - highlighting the voices of our staff and from the women in our bakeries. This week, we've collected insights and reflections from our TWB team.
Enjoy! #breadpower #team #togetherwerise
Reflections from TWB Staff
"It is amazing to reflect on the last three years: TWB has literally gone from a nascent idea to a robust reality. That reality has been shaped and carried out by a dedicated, compassionate, unparalleled group of people. I've learned a lot about working with people building TWB - how to engage, learn from, support and ultimately empower people. This is the essence of TWB, right? I am still learning, of course, and I'm challenged (and fail) daily. But at our core, TWB is people-centric and people-powered.
TWB has also taught me how to rebound. So much can and does go wrong, or not according to plan, or not as well as it should. So many times people turn you away or leave. Progress can be slow and hard-won. But it's still progress. And when you fail, you're fail forward. So when you stand up, you're a step closer to where you want to be. Thus, you keep going, listening, modifying and pivoting, but you go."
- Markey
"TWB is constantly stretching and challenging me-- every day I am pushed to look at things from unique angles, to incorporate a diversity of viewpoints rather than relying solely on my own ideas, and to exercise a level of flexibility and fluidity unparalleled in my previous jobs. Top takeaway from 2016: Be quick on the pivot."
"In TWB I have learnt a lot, not just how to bake breads and cakes, but more about administration, working in a team, finance, and I believe there still much more to learn, which will help me to make my contribution as TWB grows. I am very excited to be part of the TWB Rwanda. And I am hoping to keep learning a lot about our great work."
- Yvonne
"Over the last year and a half, TWB has become a family - working side by side with inspiring, passionate colleagues has reminded me that together we can make a difference. While some days our gains are small, I always remind myself that the little things in life are often the most impactful. Working in Rwanda has challenged me to be creative in finding solutions to all problems, forced me to work outside my own cultural norms, and live life through the eyes of others. I am so grateful for the opportunity to work with TWB and grateful for the support from my colleagues, who believe in my abilities to positively contribute to our model."
- Meg
"My TWB role over the last one and a half years has helped me gain more confidence particularly in classroom set up while conducting training sessions. As a startup business company, I learned a lot about what it takes to start and operate a business in Rwanda. Making new friends is always my top goal, so I have made a lot of friends from TWB's trained graduates, interns and partners."
- Aime
"I have always been passionate about empowering, supporting, and advocating for women, but have sometimes felt insufficient, ineffective, or unqualified. I carry insecurities, as we all do, and TWB has allowed me to identify, work through, and then shatter them. Through our work, and my job, I believe in what we do, and my role within it. I have learned in the past year that it takes all of us to accomplish meaningful change. I too, like the women we work with and for, have a voice and I can let it be heard."
- Heather
"My work with TWB has taught me on how to have proper nutrition every day. Additionally, TWB gave me an opportunity to meet with many more rural women in Rwanda and I have seen that there is so much I can do to help them improve their lives. TWB has reminded me of how important women's empowerment is for me."
- Denyse
Tagged: TWB Family, TWB Staff, Team, Yvonne, Social Change
Newer PostIncubator for Change (Part II)
Older PostCycling for Change


With the volume of laundry running through your facility, it's critical you run a clean operation—faster, with less labor, and more energy savings. Trusted, dependable Maytag® Commercial Laundry helps you operate at peak performance.
A multi-load washer with one of the fastest extract speeds in the business 400 Gs - more moisture is removed than ever before. Suspension system eliminates the need for machine boltdown, allowing more flexible installation options.
One of the fastest rigid-mount multi-load washers in the business with 200 Gs, more moisture is removed than ever before.
* Based on testing with a 10-pound AHAM load with 30% hot-, 55% warm- and 15% cold-water wash at five turns per day and 365 days per year. Water, gas and sewer costs based on 2000 average U.S. national rates. Individual savings may vary.
Gives you a full-size high-efficiency washer and a super-capacity dryer in the space of a washer alone.


McDonald's Recruitment 2018: Apply now for McDonald's Recruitment!! Organization is looking for most eligible and deserving candidates in order to fill the various vacancies of Senior Manager, Senior Executive, Duty Officer, Deputy Manager, and many other Posts.
Freshers/Exp candidates who hold required qualification can apply for McDonald's India Careers by submitting the application form through online process. Aspirants need to fill the online application form on or before the last date which is given below against McDonald's Job Opportunities.
Candidate's selection for McDonald's Careers 2018 will be made on the basis of their performance in Interview/ Written Test which will be organized by the selection panel of the organization.
Applying candidates towards McDonald's Recruitment should possess Graduate / Masters in Information Technology or Computer Application / MBA / B. Com Degree in relevant discipline with good academic records from well recognized University / Institute according to post with required years of experience.
To apply for Mcdonald Job Openings, candidate's minimum age should be 18 years and maximum age shall be decided as per the norms of the organization.
Selected candidates towards McDonald's Job Opportunities will get consolidated and attractive amount of remuneration by the organization. Other allowances will also admissible to appointed job seekers as according to terms and policies against McDonalds Vacancy 2018.
Candidate's selection for McDonald's India Recruitment will be made on the basis of their work performance in Written Test or Personal Interview round. So candidates, perform well in the selection process.
How to Fill McDonald's Online Application Form 2018?
First of all, visit the official site of organization that is www.mcdonaldsindia.com to apply for McDonald's India Careers 2018.
On home page of official site select the area that is "West & South India" section and hit the link.
On next page select "Careers" section and hit "Join the Team" link.
A list of all vacancy will appear in front of you on your computer screen on hitting above provided tab in the form of table. After that select and hit the appropriate link related to post.
And, Upload updated resume at the provided place.
Finally, Press on to 'Submit' button to record entire details and wait for further acknowledgement.
To get more details regarding McDonald's Recruitment 2018-19, you need to go through this Official Link. Stay connected with this page for getting more interesting facts regarding McDonald's Latest Recruitment.


text:
Is Bruce Davis Actually Leaving the Academy Anytime Soon?
Four months after the Executive Director announced his retirement, the Academy still hasn't seen any replacement candidates.
Steve Pond | February 16, 2011 @ 5:21 PM	Last Updated: February 16, 2011 @ 5:33 PM
The Oscars are less than two weeks away, but that's not the only deadline facing the Academy these days.
Four months ago, the organization's longtime executive director Bruce Davis announced plans to retire after 31 years with the Academy, the last 20 of them as AMPAS's highest-ranking salaried employee. Davis set his exit date as June 30, and Academy president Tom Sherak initially said he'd like to have a replacement in place before the Oscars, so that the incoming director could follow Davis through the process.
But that hasn't happened. Instead, Sherak told TheWrap in a recent interview, the executive search firm hired to find the next executive is still reviewing candidates, and has yet to present anyone to the Academy.
"We're working on it," said Sherak (right, in AMPAS photo with Davis). "Bruce said he was going to leave in October, and we hired the headhunting firm. And then we ran into Christmas. They got started right after Christmas, and they're vetting people now. We'll meet them, and then we'll present to the board."
The search firm, added Davis, "tells me they've got some great candidates in mind" – but they haven't given him any names, either.
"My hope is still that were able to have somebody hopefully in April or the beginning of May, so they're at least with Bruce for six weeks," said Sherak. "And by the way, it's not like he's going to China. He'll be around. But when you have somebody who does the kind of job he's done for all these years, we need to transition."
Current AMPAS employees, Sherak added, will be under consideration as well. "There's some good people here, too," he said. "Our people will be in the mix, too, and I think that's a good thing."
Sherak did not specify which AMPAS employees he was talking about – but later in the interview he went out of his way to praise Ric Robertson, who as executive administrator holds the position that Davis had before he became executive director.
"In that job, you've got to protect the past, the present and the future, and nobody did that better than Bruce," said Sherak. "He knew the past, he was in the present and he was able to give thought to the future. And the next person will have to do that, too, because this place could get eaten up if somebody isn't strong at protecting it."
A longtime Academy employee, Sherak hinted, might be better at that job than an outsider. "Somebody coming in from the outside might not be … will have to transition," he said. "Can it be done? Sure."
One longtime Academy member who had has frequently disagreements with Davis recently expressed similar concern about the prospect of an outsider coming in. "If you bring in somebody who doesn't have a history with the Academy and doesn't know where the bodies are buried," the member said, "that board will eat him alive. Bruce knew how to stand up to them in a way somebody from the outside never will."
When Davis announced his resignation last fall, some took it as a final nail in the coffin of the Academy's planned museum that was to have been located adjacent to the Pickford Center for Motion Picture Study on Vine Street in Hollywood.
Davis had long been an ardent backer of the project, which ran into financial problems after the Academy purchased the land and hired an architect. Many in and around the organization believe that if the museum were still a viable, ongoing proposition, Davis would not have resigned.
But Sherak insisted that the museum project is not dead – and that Davis himself may eventually have a role to play.
"I think that everyone who serves this Academy believes that we should try to see the museum come to fruition while we're still around," he said. "Keep in mind, the board has not approved building a museum yet. We approved buying the land and we approved getting an architect – but we approved that knowing that we still had to raise the money before we could build the museum."
The Academy is still in times of "economic upheaval," he added – "but I think everyone here would still like to do it while we're still around to see it.
"And if we do … Well, keep in mind that Bruce is only retiring as executive director. He has no idea what he could be asked to do. I haven't talked to him about it yet, but we're not going to let him get that far from us. And I think there will be projects that he will enjoy doing."
Tom Sherak on Replacing Bruce Davis: We Started Looking 2 Weeks Ago
By Steve Pond | October 13, 2010 @ 4:32 PM
Academy's Bruce Davis Retires After 30 Years
By Steve Pond | October 13, 2010 @ 8:13 AM


Also known as Degenerative Joint Disease or Spondylosis/Spondylitis when it affects the spinal joints. Osteo-arthritis is basically "wear and tear" and affects us all to a certain degree as we get older. An X-ray will show whether the level of wear is consistent with the patient's age.
It commonly affects the neck and lower back, and although the arthritic process itself cannot be cured, the symptoms can often be helped or even disappear with chiropractic treatment.
When it affects the spine, it is usually the soft tissues around the joint which causes pain, rather than the arthritis itself. This will explain why some people have pain for a short period of time, even though they show signs of marked osteoarthritis on the X-ray. Osteo-arthritis is very often symptom free providing the spine functions reasonably well.
Osteo-arthritis can also affect the large joints such as hips and knees, which may need replacing, and it's often found in the small joints of the hands and fingers.
An inflammatory type of arthritis which usually doesn't affect the spine. It is mainly found in the joints of the fingers and toes and in the shoulders, elbows, hips and knees. The joints are often red, hot and swollen and can be very tender to touch. Chiropractic only has a limited role to play in the treatment of this condition, which is often managed with anti-inflammatory medication.


text:
Newsletter 22: Sep 13, 2010
Subject: CDS Weekly newsletter
Welcome back! The Center for Decision Sciences hopes that everyone had an enjoyable and productive summer. This week's newsletter provides the usual listing of next week's seminars as well as a look ahead to other events this semester. As always, we encourage suggestions for how to improve this newsletter; in particular, we ask members of the Columbia decision sciences community to submit working papers or in press research to enlighten your colleagues as to your recent work.
Fall Lectures sponsored by the Center for Decision Sciences
Please mark the following dates on your calendar. All talks are tentatively scheduled for Uris Hall 303:
Sept. 23 Armin Falk (University of Bonn)
(5:15) "Determinants, origins and consequences of preferences"
Sept. 30 Shinobu Kitayama (University of Michigan)
(5:15) "Culture, Self, and Dissonance: Neural Mechanisms of Choice Justification"
Nov. 18 Robert Frank (Cornell)
(5.45) "The Libertarian Welfare State"
(co-sponsored by Social Enterprise Program)
Symposium on Culture
On Friday, October 1,from 9.30 until 4.30, the CDS will be hosting a conference entitled "Emerging Perspectives on Culture: A Symposium on Constructivist Processing and the Impact of Culture on Human Judgment and Decision Makin." This event is designed for a select group of leading scholars studying culture and decision making to share their latest research with their peers. While we have room for a limited number of observers, please be aware that we have asked the presenters to aim their talks at a sophisticated and knowledgeable audience. If you are interested in attending this event, you may request an invitation by e-mailing ejs2011@columbia.edu.
Jonathan Levav, (Columbia Business School)
"Sequential Decisions"
Ran Spiegler (University College London)
"Price Competition under Limited Comparability" (with Michele Piccione)
2:15-3:45, Uris 306 (I.O., Organizations, and Strategy)
Ernst Fehr (University of Zurich)
"The Lure of Authority -- Motivation and Incentive Effects of Power" (with Holger Herz and Tom Wilkening).
4:15-5:45, IAB 1101 (Money Macro Workshop)
Roozbeh Hosseini (Arizona State University)
"Adverse Selection in the Annuity Market and the Role for Social Security"
12.30-2.00, Uris Hall 332 (Finance Division Seminar; NOTE that this is not this seminar's usual time)
Jeremy Stein (Harvard)
"Monetary Policy as Financial-Stability Regulation"
4:15-5:45, IAB 1101 (Applied Microeconomics Seminar; NOTE that this is not this seminar's usual day)
Mark Rosensweig (Yale)
4.15-?, 19 W. 4th St. Room 507 (Applied Microeconomics Workshop)
Amil Petrin (Minnesota)
"The Interaction of Observed and Unobserved Factors in Discrete Choice Demand Models"
4.00-5.00, 44 West 4th Street, KMC 7-191 (Industrial Organization seminar)
Joel Watson (UC - San Diego)
"A Theory of Disagreement in Repeated Games with Renegotiation"
Context also matters to decision making in slime mould
http://danariely.com/2010/09/05/humans-and-the-slime-mould/


Singer-Songwriter Cory Paul Hill was born in Fredericton, New Brunswick on October 31st 1988. He began his life in music at age nine, playing his grandmother's guitar and being taught his first chords. Coming from a musical family, where most family members dabbled in guitar, singing and dancing on weekends, many musical influences from pop, rock, gospel and country found their way into his life from artists such as Prince, Aerosmith, Tracy Chapman, Alan Jackson, Garth Brooks, Shania Twian and various other artists.
At age thirteen, Cory began private studies in guitar, voice and piano. He later attended St. Francis Xavier (Antigonish NS) in the Jazz Voice program and finished his studies in Visual Arts leading to an Interdiciplinary Degree in Visual Arts (2012) from NSCAD University (Halifax, Nova Scotia). Having met and collaborated with some of the greatest artists in Atlantic Canada, Cory has been inspired not only by the musical arts, but also by painters, sculptors, and cross-media artists. For this artist, music is not only about what is heard, but what is seen in the mind and felt in the heart.
During the formulation of his debut album "Where We Live", Cory had the honor of singing in support of many charity events for organizations such as ALS Nova Scotia, The Duke of Edinburgh Awards and New Brunswick Association for Community Living.
His debut album, "Where We Live" (Released June 3rd 2014), is a mix of folk and soft rock styles, with a strong emphasis on lyrical content – using the music to simply reinforce the ideas in the songs which range from love, heartbreak, death and family ties. A songwriter first and instrumentalist second, it is vital to Cory that each song comes from personal experience and that his music is shared with others so that his audience will the find the true meaning and essence of these lyrics and be inspired as he was. To experience growth from life's journey and build relationships, it is for this reason that the album is titled "Where We Live".
In March 2015 he packed two bags and his guitar, and took a train to Toronto with no plan in mind, only an intention to share his music and let life continue to grow. His current recording project titled "This Paper House" contains his honest reflections on the delicacy of the lives we build for ourselves - after personal encounters with abuse, mental illness and the loss of a close friend. What is the beauty of this paper house? We can easily build another.
Cory continues to write and perform, completing his second degree in Cognitive Science, in Toronto, Ontario.


text:
Our Catalog Business & Money Marketing & Sales Public Relations
Cases in Public Relations Management: The Rise of Social Media and Activism
Blowout Sale! Save 70% on the Cases in Public Relations Management: The Rise of Social Media and Activism by imusti at Translate This Website. Hurry! Limited time offer. Offer valid only while supplies last. Developed for advanced students in public relations, Cases in Public Relations Management uses recent cases in public relations that had outcomes varying from expected to unsuccessful. The text challenges students to think analytically, strategically, and practically. Each case is based on real events, and is designed to encourage discussion, debate, and exploration of the options available to today's strategic public relations manager. Key features of this text include coverage of the latest
Developed for advanced students in public relations, Cases in Public Relations Management uses recent cases in public relations that had outcomes varying from expected to unsuccessful. The text challenges students to think analytically, strategically, and practically. Each case is based on real events, and is designed to encourage discussion, debate, and exploration of the options available to today's strategic public relations manager. Key features of this text include coverage of the latest controversies in current events, discussion of the ethical issues that have made headlines in recent years, and strategies used by public relations practitioners. Each case has extensive supplemental materials taken directly from the case for students' further investigation and discussion. The case study approach encourages readers to assess what they know about communication theory, the public relations process, and management practices, and prepares them for their future careers as PR practitioners. New to the second edition are: 27 new case studies, including coverage of social media and social responsibility elements New chapters on corporate social responsibility (CSR) and activism End-of-chapter exercises Embedded hyperlinks in eBook Fully enhanced companion website that includes: Instructor resources: PowerPoint presentations, Case Supplements, Instructor Guides Student resources: Quizzes, Glossary, Case Supplements
Manufacturer: Routledge
Brand: imusti
Studio: Routledge
Item Size: 1.37 x 9.25 x 9.25 inches
Package Weight: 2.23 pounds
Package Size: 7.3 x 1.2 x 1.2 inches
View More In Public Relations.
Motivating Language Theory: Effective Leader Talk in the Workplace
By Palgrave Macmillan
Pitch, Tweet, or Engage on the Street: How to Practice Global Public Relations and Strategic Communication
Ethics in Public Relations: Responsible Advocacy
By Brand: SAGE Publications, Inc


Indian Government intends to use these defence articles and services to modernise its armed forces.
Washington: The US has approved 75 million US dollars high-tech chemical protective clothing for the Indian armed forces that will protect soldiers against biological and chemical warfare. The Joint Service Lightweight Integrated Suit Technology (JSLIST) consists of 38,034 each: suits, pairs of trousers, pairs of gloves, pairs of boots and NBC bags; 854 aprons; 854 alternative aprons; 9,509 Quick Doff Hoods; and 114,102 M61 filters. The entire package also includes 38,034 M50 general purpose masks.
The Defence Security Cooperation Agency (DSCA) made a notification to the Congress on May 10 after the State Department made a determination in this regard.
In its notification to the Congress, the DSCA said this proposed sale will contribute to the foreign policy and national security of the United States, by helping to improve the security of a friendly country which has been, and continues to be, an important force for political stability and economic progress in South Asia.
The Indian Government, it said, intends to use these defence articles and services to modernise its armed forces. "This will contribute to the Indian military's goal to update its capability while enhancing the relationship between India and the United States," DSCA said.


text:
New Census Data Show Persistent State School Funding Cuts
off the charts
POLICY INSIGHT
Home / blog / State Budget and Tax / New Census Data Show...
Michael Leachman
Update, July 26: We've corrected the number of states where state and local funding exceeded pre-recession levels in 2016.
A significant share of states are providing much less school funding than they were a decade ago, according to new data from the Census Bureau that we supplemented with our own look at state budget documents.
Together, state and local government school funding across the nation has finally recovered from the last recession, which took hold during the 2008 school year. In the 2016 school year, state and local funding per student was just $5 below 2008 levels — essentially where it had been. State and local funding in 26 states exceeded pre-recession levels in 2016, the first year since the recession when most states reached that threshold.
While combined state and local funding in 2016 was nearly back to pre-recession levels nationally, state funding was down $166 per student while local funding was up $161 (see chart). The shift from state to local funding raises equity concerns. Local funding relies heavily on local property taxes. Because school districts in neighborhoods with high property values find it much easier to raise adequate revenue than districts where property values are low, a shift toward more local funding can exacerbate school funding inequities. States can offset local inequities using school funding formulas that provide more funds to lower-income school districts. Some states have formulas that accomplish this goal; others do not, according to an analysis by the Education Law Center and Rutgers University's Graduate School of Education.
Further, while state and local school funding had largely recovered nationally by 2016, combined funding in a significant share of states remained far below pre-recession levels in inflation-adjusted terms. Arizona, the deepest-cutting state, was providing 23.4 percent per student less than in 2008; Florida was providing 22.9 percent less; and North Carolina, Nevada, Georgia, Alabama, Idaho, and Oklahoma were all providing over 10 percent less.
While some of these deepest-cutting states have improved their school funding somewhat since 2016, there's little evidence that most of these states have made marked gains in the last couple of years. As of the current 2018 school year, at least 12 states have cut "general" or "formula" funding — the main form of state support for elementary and secondary schools — by 7 percent or more per student over the last decade, according to our survey of state budget documents. Most of these states have cut income taxes over the last decade, making it particularly hard for them to raise revenue needed for their schools.
Steep funding cuts make it hard for states to improve teacher quality, reduce class sizes, extend learning time, and enact other reforms that, research indicates, improve student outcomes. States that have imposed these deep cuts are weakening our shared future.
Research Supports Importance of SNAP, Doesn't Support House Farm Bill
Vice President for State Fiscal Policy
A Punishing Decade for School Funding
State Tax Cuts: A Key Factor in AZ, OK Teacher Pay Crises
North Carolina's Deep Tax Cuts Impeding Adequate School Funding
Many States Facing Suits Over K-12 Funding


Welcome to the Modern Police State compliments of China.
Police Stupidity/Brutality caught on tape!!!
"One can be the nicest guy in his personal life but in his institutional role he can be an absolute monster.
Well, it looks we've already become a Police State. Good to see we're accomplishing such noble and admirable things with the freedom those terrorists hate so much.


A new extended warranty is being offered at an extremely economical price-point for owners of AMIRA cameras, while ALEXA warranties, available for all current ALEXA models including the new ALEXA Mini, are being reduced in price by 50%.
The highly affordable prices of the re-launched extended warranties have been made possible by the proven track record of these cameras to withstand continual use in challenging environments without technical issues. Their exceptional build quality and reliability means that repairs are very rarely necessary, and ARRI is happy to pass this saving on to its customers.
Extended warranties can be purchased at the same time as the camera or later, though plans purchased after delivery will require the camera to be re-certified by an official ARRI service center.
A great advantage of extended warranties is that they offer a fixed cost of ownership and a level of service that goes beyond the standard. Plans are available on an annual basis and cover all parts and labor required due to defects in materials or workmanship that prevent the camera, any installed options, and the EVF from operating within factory specifications.
The potential savings are significant. Although manufactured to exacting standards, ARRI cameras are often subjected to demanding and sometimes unanticipated conditions on set, and will require maintenance from time to time. The worry of large and unplanned repair expenses can be avoided entirely by investing in an affordable extended warranty plan.
Because there is never any time lost waiting for purchase orders or payments for out-of-warranty repairs, and because cameras covered under the plan go into a priority repair queue, downtime is reduced to the absolute minimum.
Previously, extended warranties were only available directly from ARRI service subsidiaries, but they can now be purchased through any official ARRI point of sales – subsidiaries, distributors or resellers. Please contact your local sales person to learn more about the many benefits of these plans and the options that will best suit your needs, or to purchase one today!
Please visit ARRI website for more information.


I mean, I don't think that in the *ahem* history of this site I ever had a moment where I didn't blog for three weeks(!).
But, behind the scenes I'm quite busy to push this whole thing in another gear somehow.
Last week I talked to my generous host and we were able to reach an agreement about my second server so yes, in a while I'll be hosting this DIY-job of a site of two servers(!). That should also resolve some speed issues. At least, I'm experiencing some speed related issues with this site. Anybody else experience the same? Somehow I don't want to change to much to this server right now… it's been running for 640(!) days right now and somehow I want to be in the datacenter when I reboot this machine. I should be there in about a month I guess to co-locate the second server.
Somehow this three weeks of non-blogging has to do with the kind of decisions I've been making I guess. In short that's no ads and only blog when I really have something to blog. So yeah, in the end that could work out to only blog projects, but somehow I'm not quite sure about that.
Anyway, for those who want to know, I'm still alive and kicking!
Speed is fine here. And no worries, I didn't even realize it had been three weeks… Guess I got distracted by my own geeky projects. Keep at it, when it is time to write, you will write. Thanks for the updaTe!
Yes, actually. Your website itself is not slow, once it has loaded the mainpage.
But that can sometimes take up to 45 seconds on my 4Mbit broadband connection. Just when I'm expecting to see a time-out, the frontpage pops-up. After that I can browse your site quickly without loadingtimes, it's just that the first time it takes a lóng time before the server seems to respond.
P.S. I'm posting this comment for the second time now, because the first time nothing seemed to happen. So yet another speed-related issue I guess.
But still, your site still rocks, even if it's a little slow sometimes.
;-) there were two comments indeed, i removed the first one.
>it's just that the first time it takes a lóng time before the server seems to respond.
that's exactly what i've been experiencing. I've already removed some crap and tried to clean up here and there but somehow i can't find why it does that.
the idea is to co-locate server nr.2, all fresh. pull this server down, maybe change some hardware and put it back up again.
I'm also experiencing the same problem here (Belgium :) ). It takes some time to connect, once it's loaded everything works normal. Firewall issue?


text:
Lisa Klepfisz (Immediate Past President – KDSPA)
Lisa Klepfisz has been a member of the KDS community since 2005 when her daughter started in Junior Kindergarten. Lisa joined the KDSPA as general member in 2015 and then as the Secretary in 2016. She was voted in as President at the end of 2016 and served a full term which ended in November 2018. She has made an incredible contribution to the school community over her years of service and the School is extremely grateful to her.
Lisa is married to Jeremy Freeman (an alumnus of KDS) and they have two children at the School.
Carrie Kausman (President)
Tina Landsberg (Vice President)
Gaby Stach (Treasurer)
Paul Greenwell (Assistant Treasurer)
Jo Upton (Secretary)
Stephanie Boymal
Jacki Buchbinder
Tania Guttmann (Class Rep Co-ordinator)
Rob Selzer (Business Directory)


Founded in 1962, Mimura industries Co., Ltd. is a growing family-owned Japanese manufacturer of interior components for aircrafts and railway cars as well as door components for automobiles.
Our honest and high-in-quality dedication has led us build positive relationships with major suppliers in the industry.
The answer is very simple. We are experienced in metal works for over 60 years so we can promise you the best quality. The best quality you can always trust. Our hard work is dedicated to produce products that are always accurate in the exact requests and demands.


Archeologists at the historic site of Rabat Tepe, northwest Iran, discovered the fourth cuneiform inscription written with white glaze. Similar inscriptions had previously only been seen in the structure of the Gate of Babylon.
Tehran, 26 December 2006 (CHN) -- Continuation of archeological excavations in Rabat Tepe II, located in the Iranian northwestern province of West Azarbaijan, resulted in unearthing the fourth cuneiform brick inscription in Assyrian script. Just like the ones previously found in this historic site, the newly discovered inscription is written with white glaze.
According to Reza Heidary, head of the archeology team in Rabat Tepe, the 33x33 square centimeter inscription in the Assyrian language is inscribed on a glazed brick eight centimeters thick and is dated to the first millennium BC. "This discovery shows that some 3000 years ago the inhabitants of the region used white glaze to inscribe tablets in cuneiform script. Prior to this, white enameled brick inscriptions were discovered in the famous Ishtar Gate of Babylon," explained Heidari to CHN.
The Ishtar Gate of Babylon was built in the 6th century BC and was the main entrance to the inner streets and temples of Babylon. The foundations of the gate were discovered between 1899 and 1914, including numerous glazed bricks and unglazed figures.
Heidary further said that a team of Iranian graphologists is now busy decoding the brick inscriptions unearthed so far in the 3000-year-old historic Rabat Tepe, hoping that they could shed light on some of the historic events of northwest Iran during the ancient times.
"Existence of large numbers of bricks in the region must have something to do with the architectural style of the region. Thus continuation of excavations will for sure lead us into discovering more bricks which would provide more information on this historic site," added Heidary.
Rabat Tepe is located near the town of Sardasht in West Azarbaijan province, northwest Iran. Archeologists believe that the hill used to be the center of Musasir Government some 3000 years ago.
First season of archeological excavations in Rabat Hill resulted in the discovery of 3000-year-old 180x180 square centimeter flagstones as well as statues of winged goddesses and a naked winged goddess in the region. Such unique findings have attracted the attention of world archeologists to this historic site.


For the last 20 days or so, I've had the well-meaning intention to sit down and write a long entry about National Poetry Month. Now that half of April has already left us, I may have finally arrived at some appropriate words. Thanks to a series of coincidental scheduling opportunities, I was able to head to Francis W. Parker School last night to hear Billy Collins read. Anyone who knows me will know how unbelievably exciting this event was for me. Seeing Mr. Collins in person was like seeing a portrait step out of its painting. It was a familiar voice delivering familiar words, yet to see it happening in real time right in front of me was surreal.
Afterwards, as Mr. Collins signed my copy of Horoscopes for the Dead, I asked him if his readers ever find his poetry funnier than he originally intended. Yes, he answered, for instance with the poem "On Turning Ten," which begins lighthearted, but ends rather darkly. The audience is there, having a good time, wanting to laugh, and the turn of mood doesn't quite catch them.
While I've spent many hours dissecting each footstep and ray of light in my favorite Collins poems, I still miss important moments from time to time. Pay attention to a different phrase, and the entire meaning of the poem changes. Reread an old favorite at a different place in your life, and you never know what you will seem new.
Several weeks ago, in an attempt to turn a particularly disagreeable day, I turned off the radio in my car and instead recited Whitman: Song of Myself, No. 52. Reciting poetry to oneself is not, I imagine, something that most people do when passing time in the car, but on that particular afternoon, the words arrived like a familiar friend. I have recited that piece on mountaintops and beaches; I have sounded my barbaric yawp over rooftops and plains and the din of other cars -- just as I have recited "Aimless Love," "Shoveling Snow with Buddha," and other bits of Collins that get stuck in my head (or written on my arms, or in my journals).
For those who do not spend their time studying and memorizing verse, the relationship of a reader to his favorite poems may seem incomprehensible. But those of us who make sympathetic mmmm sounds at the completion of each piece, who pre-order new volumes and recall lines for every toast, speech, and gathering -- we wear language like an old coat, well-loved protection from wind and snow.
That's what it was like to hear Billy Collins reading "Fishing on the Susquehanna in July" -- the Art Institute of Chicago filled in the spaces around me, and I seemed to be standing in front a Whistler landscape.
even one of a brown hare who seemed so wired with alertness I imagined him springing right out of the frame.
Here's hoping that the rest of National Poetry Month is as fantastic as the beginning. Carry a poem in your pocket tomorrow. Share it with others. Keep reading. Keep writing.


text:
import sys
import lib.audio as audio

for file_name in sys.argv[1:]:
  print("%s:" % file_name)
  print(audio.stream_info(file_name))
  sig, block = audio.signature(file_name)
  print({'block_count': len(block), 'format': audio._LASTFORMAT})

redpajama_set_name: RedPajamaGithub


text:
#include <limits.h>

#include "ast.h"
#include "exceptions.h"
#include "opcode.h"
#include "program.h"
#include "storage.h"
#include "structures.h"
#include "str_intern.h"
#include "utils.h"
#include "version.h"
#include "my-stdlib.h"

/*** The reader will likely find it useful to consult the file
 *** `MOOCodeSequences.txt' in this directory while reading the code in this
 *** file.
 ***/

enum fixup_kind {
    FIXUP_LITERAL, FIXUP_FORK, FIXUP_LABEL, FIXUP_VAR_REF, FIXUP_STACK
};

struct fixup {
    enum fixup_kind kind;
    unsigned pc;
    unsigned value;
    unsigned prev_literals, prev_forks, prev_var_refs, prev_labels,
     prev_stacks;
    int next;			/* chain for compiling IF/ELSEIF arms */
};
typedef struct fixup Fixup;

struct gstate {
    unsigned total_var_refs;	/* For duplicating an old bug... */
    unsigned num_literals, max_literals;
    Var *literals;
    unsigned num_fork_vectors, max_fork_vectors;
    Bytecodes *fork_vectors;
};
typedef struct gstate GState;

struct loop {
    int id;
    Fixup top_label;
    unsigned top_stack;
    int bottom_label;
    unsigned bottom_stack;
};
typedef struct loop Loop;

struct state {
    unsigned max_literal, max_fork, max_var_ref;
    /* For telling how big the refs must be */
    unsigned num_literals, num_forks, num_var_refs, num_labels, num_stacks;
    /* For computing the final vector length */
    unsigned num_fixups, max_fixups;
    Fixup *fixups;
    unsigned num_bytes, max_bytes;
    Byte *bytes;
#ifdef BYTECODE_REDUCE_REF
    Byte *pushmap;
    Byte *trymap;
    unsigned try_depth;
#endif /* BYTECODE_REDUCE_REF */
    unsigned cur_stack, max_stack;
    unsigned saved_stack;
    unsigned num_loops, max_loops;
    Loop *loops;
    GState *gstate;
};
typedef struct state State;

#ifdef BYTECODE_REDUCE_REF
#define INCR_TRY_DEPTH(SSS)	(++(SSS)->try_depth)
#define DECR_TRY_DEPTH(SSS)	(--(SSS)->try_depth)
#define NON_VR_VAR_MASK	      ~((1 << SLOT_ARGSTR) | \
				(1 << SLOT_DOBJ) | \
				(1 << SLOT_DOBJSTR) | \
				(1 << SLOT_PREPSTR) | \
				(1 << SLOT_IOBJ) | \
				(1 << SLOT_IOBJSTR) | \
				(1 << SLOT_PLAYER))
#else /* no BYTECODE_REDUCE_REF */
#define INCR_TRY_DEPTH(SSS)
#define DECR_TRY_DEPTH(SSS)
#endif /* BYTECODE_REDUCE_REF */

static void
init_gstate(GState * gstate)
{
    gstate->total_var_refs = 0;
    gstate->num_literals = gstate->num_fork_vectors = 0;
    gstate->max_literals = gstate->max_fork_vectors = 0;
    gstate->fork_vectors = 0;
    gstate->literals = 0;
}

static void
free_gstate(GState gstate)
{
    if (gstate.literals)
	myfree(gstate.literals, M_CODE_GEN);
    if (gstate.fork_vectors)
	myfree(gstate.fork_vectors, M_CODE_GEN);
}

static void
init_state(State * state, GState * gstate)
{
    state->num_literals = state->num_forks = state->num_labels = 0;
    state->num_var_refs = state->num_stacks = 0;

    state->max_literal = state->max_fork = state->max_var_ref = 0;

    state->num_fixups = 0;
    state->max_fixups = 10;
    state->fixups = mymalloc(sizeof(Fixup) * state->max_fixups, M_CODE_GEN);

    state->num_bytes = 0;
    state->max_bytes = 50;
    state->bytes = mymalloc(sizeof(Byte) * state->max_bytes, M_BYTECODES);
#ifdef BYTECODE_REDUCE_REF
    state->pushmap = mymalloc(sizeof(Byte) * state->max_bytes, M_BYTECODES);
    state->trymap = mymalloc(sizeof(Byte) * state->max_bytes, M_BYTECODES);
    state->try_depth = 0;
#endif /* BYTECODE_REDUCE_REF */

    state->cur_stack = state->max_stack = 0;
    state->saved_stack = UINT_MAX;

    state->num_loops = 0;
    state->max_loops = 5;
    state->loops = mymalloc(sizeof(Loop) * state->max_loops, M_CODE_GEN);

    state->gstate = gstate;
}

static void
free_state(State state)
{
    myfree(state.fixups, M_CODE_GEN);
    myfree(state.bytes, M_BYTECODES);
#ifdef BYTECODE_REDUCE_REF
    myfree(state.pushmap, M_BYTECODES);
    myfree(state.trymap, M_BYTECODES);
#endif /* BYTECODE_REDUCE_REF */
    myfree(state.loops, M_CODE_GEN);
}

static void
emit_byte(Byte b, State * state)
{
    if (state->num_bytes == state->max_bytes) {
	unsigned new_max = 2 * state->max_bytes;
	state->bytes = myrealloc(state->bytes, sizeof(Byte) * new_max,
				   M_BYTECODES);
#ifdef BYTECODE_REDUCE_REF
	state->pushmap = myrealloc(state->pushmap, sizeof(Byte) * new_max,
				   M_BYTECODES);
	state->trymap = myrealloc(state->trymap, sizeof(Byte) * new_max,
				   M_BYTECODES);
#endif /* BYTECODE_REDUCE_REF */
	state->max_bytes = new_max;
    }
#ifdef BYTECODE_REDUCE_REF
    state->pushmap[state->num_bytes] = 0;
    state->trymap[state->num_bytes] = state->try_depth;
#endif /* BYTECODE_REDUCE_REF */
    state->bytes[state->num_bytes++] = b;
}

static void
emit_extended_byte(Byte b, State * state)
{
    emit_byte(OP_EXTENDED, state);
    emit_byte(b, state);
}

static int
add_known_fixup(Fixup f, State * state)
{
    int i;

    if (state->num_fixups == state->max_fixups) {
	unsigned new_max = 2 * state->max_fixups;
	Fixup *new_fixups = mymalloc(sizeof(Fixup) * new_max,
				     M_CODE_GEN);

	for (i = 0; i < state->num_fixups; i++)
	    new_fixups[i] = state->fixups[i];

	myfree(state->fixups, M_CODE_GEN);
	state->fixups = new_fixups;
	state->max_fixups = new_max;
    }
    f.pc = state->num_bytes;
    state->fixups[i = state->num_fixups++] = f;

    emit_byte(0, state);	/* a placeholder for the eventual value */

    return i;
}

static int
add_linked_fixup(enum fixup_kind kind, unsigned value, int next, State * state)
{
    Fixup f;

    f.kind = kind;
    f.value = value;
    f.prev_literals = state->num_literals;
    f.prev_forks = state->num_forks;
    f.prev_var_refs = state->num_var_refs;
    f.prev_labels = state->num_labels;
    f.prev_stacks = state->num_stacks;
    f.next = next;
    return add_known_fixup(f, state);
}

static int
add_fixup(enum fixup_kind kind, unsigned value, State * state)
{
    return add_linked_fixup(kind, value, -1, state);
}

static void
add_literal(Var v, State * state)
{
    GState *gstate = state->gstate;
    Var *literals = gstate->literals;
    unsigned i;

    for (i = 0; i < gstate->num_literals; i++)
	if (v.type == literals[i].type	/* no int/float coercion here */
	    && equality(v, literals[i], 1))
	    break;

    if (i == gstate->num_literals) {
	/* New literal to intern */
	if (gstate->num_literals == gstate->max_literals) {
	    unsigned new_max = gstate->max_literals == 0
	    ? 5 : 2 * gstate->max_literals;
	    Var *new_literals = mymalloc(sizeof(Var) * new_max,
					 M_CODE_GEN);

	    if (gstate->literals) {
		for (i = 0; i < gstate->num_literals; i++)
		    new_literals[i] = literals[i];

		myfree(literals, M_CODE_GEN);
	    }
	    gstate->literals = new_literals;
	    gstate->max_literals = new_max;
	}
        if (v.type == TYPE_STR) {
            /* intern string if we can */
            Var nv;

            nv.type = TYPE_STR;
            nv.v.str = str_intern(v.v.str);
            gstate->literals[i = gstate->num_literals++] = nv;
        } else {
            gstate->literals[i = gstate->num_literals++] = var_ref(v);
        }
    }
    add_fixup(FIXUP_LITERAL, i, state);
    state->num_literals++;
    if (i > state->max_literal)
	state->max_literal = i;
}

static void
add_fork(Bytecodes b, State * state)
{
    unsigned i;
    GState *gstate = state->gstate;

    if (gstate->num_fork_vectors == gstate->max_fork_vectors) {
	unsigned new_max = gstate->max_fork_vectors == 0
	? 1 : 2 * gstate->max_fork_vectors;
	Bytecodes *new_fv = mymalloc(sizeof(Bytecodes) * new_max,
				     M_CODE_GEN);

	if (gstate->fork_vectors) {
	    for (i = 0; i < gstate->num_fork_vectors; i++)
		new_fv[i] = gstate->fork_vectors[i];

	    myfree(gstate->fork_vectors, M_CODE_GEN);
	}
	gstate->fork_vectors = new_fv;
	gstate->max_fork_vectors = new_max;
    }
    gstate->fork_vectors[i = gstate->num_fork_vectors++] = b;

    add_fixup(FIXUP_FORK, i, state);
    state->num_forks++;
    if (i > state->max_fork)
	state->max_fork = i;
}

static void
add_var_ref(unsigned slot, State * state)
{
    add_fixup(FIXUP_VAR_REF, slot, state);
    state->num_var_refs++;
    if (slot > state->max_var_ref)
	state->max_var_ref = slot;
    state->gstate->total_var_refs++;
}

static int
add_linked_label(int next, State * state)
{
    int label = add_linked_fixup(FIXUP_LABEL, 0, next, state);

    state->num_labels++;
    return label;
}

static int
add_label(State * state)
{
    return add_linked_label(-1, state);
}

static void
add_pseudo_label(unsigned value, State * state)
{
    Fixup f;

    f.kind = FIXUP_LABEL;
    f.value = value;
    f.prev_literals = f.prev_forks = 0;
    f.prev_var_refs = f.prev_labels = 0;

    f.prev_stacks = 0;

    f.next = -1;

    add_known_fixup(f, state);
    state->num_labels++;
}

static int
add_known_label(Fixup f, State * state)
{
    int label = add_known_fixup(f, state);

    state->num_labels++;
    return label;
}

static Fixup
capture_label(State * state)
{
    Fixup f;

    f.kind = FIXUP_LABEL;
    f.value = state->num_bytes;
    f.prev_literals = state->num_literals;
    f.prev_forks = state->num_forks;
    f.prev_var_refs = state->num_var_refs;
    f.prev_labels = state->num_labels;
    f.prev_stacks = state->num_stacks;
    f.next = -1;

    return f;
}

static void
define_label(int label, State * state)
{
    unsigned value = state->num_bytes;

    while (label != -1) {
	Fixup *fixup = &(state->fixups[label]);

	fixup->value = value;
	fixup->prev_literals = state->num_literals;
	fixup->prev_forks = state->num_forks;
	fixup->prev_var_refs = state->num_var_refs;
	fixup->prev_labels = state->num_labels;
	fixup->prev_stacks = state->num_stacks;
	label = fixup->next;
    }
}

static void
add_stack_ref(unsigned index, State * state)
{
    add_fixup(FIXUP_STACK, index, state);
}

static void
push_stack(unsigned n, State * state)
{
    state->cur_stack += n;
    if (state->cur_stack > state->max_stack)
	state->max_stack = state->cur_stack;
}

static void
pop_stack(unsigned n, State * state)
{
    state->cur_stack -= n;
}

static unsigned
save_stack_top(State * state)
{
    unsigned old = state->saved_stack;

    state->saved_stack = state->cur_stack - 1;

    return old;
}

static unsigned
saved_stack_top(State * state)
{
    return state->saved_stack;
}

static void
restore_stack_top(unsigned old, State * state)
{
    state->saved_stack = old;
}

static void
enter_loop(int id, Fixup top_label, unsigned top_stack,
	   int bottom_label, unsigned bottom_stack, State * state)
{
    int i;
    Loop *loop;

    if (state->num_loops == state->max_loops) {
	unsigned new_max = 2 * state->max_loops;
	Loop *new_loops = mymalloc(sizeof(Loop) * new_max,
				   M_CODE_GEN);

	for (i = 0; i < state->num_loops; i++)
	    new_loops[i] = state->loops[i];

	myfree(state->loops, M_CODE_GEN);
	state->loops = new_loops;
	state->max_loops = new_max;
    }
    loop = &(state->loops[state->num_loops++]);
    loop->id = id;
    loop->top_label = top_label;
    loop->top_stack = top_stack;
    loop->bottom_label = bottom_label;
    loop->bottom_stack = bottom_stack;
}

static int
exit_loop(State * state)
{
    return state->loops[--state->num_loops].bottom_label;
}

static void
emit_call_verb_op(Opcode op, State * state)
{
    emit_byte(op, state);
#ifdef BYTECODE_REDUCE_REF
    state->pushmap[state->num_bytes - 1] = OP_CALL_VERB;
#endif /* BYTECODE_REDUCE_REF */
}

static void
emit_ending_op(Opcode op, State * state)
{
    emit_byte(op, state);
#ifdef BYTECODE_REDUCE_REF
    state->pushmap[state->num_bytes - 1] = OP_DONE;
#endif /* BYTECODE_REDUCE_REF */
}

static void
emit_var_op(Opcode op, unsigned slot, State * state)
{
    if (slot >= NUM_READY_VARS) {
	emit_byte(op + NUM_READY_VARS, state);
	add_var_ref(slot, state);
    } else {
	emit_byte(op + slot, state);
#ifdef BYTECODE_REDUCE_REF
        state->pushmap[state->num_bytes - 1] = op;
#endif /* BYTECODE_REDUCE_REF */
    }
}

static void generate_expr(Expr *, State *);

static void
generate_arg_list(Arg_List * args, State * state)
{
    if (!args) {
	emit_byte(OP_MAKE_EMPTY_LIST, state);
	push_stack(1, state);
    } else {
	Opcode normal_op = OP_MAKE_SINGLETON_LIST, splice_op = OP_CHECK_LIST_FOR_SPLICE;
	unsigned pop = 0;

	for (; args; args = args->next) {
	    generate_expr(args->expr, state);
	    emit_byte(args->kind == ARG_NORMAL ? normal_op : splice_op, state);
	    pop_stack(pop, state);
	    normal_op = OP_LIST_ADD_TAIL;
	    splice_op = OP_LIST_APPEND;
	    pop = 1;
	}
    }
}

static void
push_lvalue(Expr * expr, int indexed_above, State * state)
{
    unsigned old;

    switch (expr->kind) {
    case EXPR_RANGE:
	push_lvalue(expr->e.range.base, 1, state);
	old = save_stack_top(state);
	generate_expr(expr->e.range.from, state);
	generate_expr(expr->e.range.to, state);
	restore_stack_top(old, state);
	break;
    case EXPR_INDEX:
	push_lvalue(expr->e.bin.lhs, 1, state);
	old = save_stack_top(state);
	generate_expr(expr->e.bin.rhs, state);
	restore_stack_top(old, state);
	if (indexed_above) {
	    emit_byte(OP_PUSH_REF, state);
	    push_stack(1, state);
	}
	break;
    case EXPR_ID:
	if (indexed_above) {
	    emit_var_op(OP_PUSH, expr->e.id, state);
	    push_stack(1, state);
	}
	break;
    case EXPR_PROP:
	generate_expr(expr->e.bin.lhs, state);
	generate_expr(expr->e.bin.rhs, state);
	if (indexed_above) {
	    emit_byte(OP_PUSH_GET_PROP, state);
	    push_stack(1, state);
	}
	break;
    default:
	panic("Bad lvalue in PUSH_LVALUE()");
    }
}

static void
generate_codes(Arg_List * codes, State * state)
{
    if (codes)
	generate_arg_list(codes, state);
    else {
	emit_byte(OPTIM_NUM_TO_OPCODE(0), state);
	push_stack(1, state);
    }
}

static void
generate_expr(Expr * expr, State * state)
{
    switch (expr->kind) {
    case EXPR_VAR:
	{
	    Var v;

	    v = expr->e.var;
	    if (v.type == TYPE_INT && IN_OPTIM_NUM_RANGE(v.v.num))
		emit_byte(OPTIM_NUM_TO_OPCODE(v.v.num), state);
	    else {
		emit_byte(OP_IMM, state);
		add_literal(v, state);
	    }
	    push_stack(1, state);
	}
	break;
    case EXPR_ID:
	emit_var_op(OP_PUSH, expr->e.id, state);
	push_stack(1, state);
	break;
    case EXPR_AND:
    case EXPR_OR:
	{
	    int end_label;

	    generate_expr(expr->e.bin.lhs, state);
	    emit_byte(expr->kind == EXPR_AND ? OP_AND : OP_OR, state);
	    end_label = add_label(state);
	    pop_stack(1, state);
	    generate_expr(expr->e.bin.rhs, state);
	    define_label(end_label, state);
	}
	break;
    case EXPR_NEGATE:
    case EXPR_NOT:
	generate_expr(expr->e.expr, state);
	emit_byte(expr->kind == EXPR_NOT ? OP_NOT : OP_UNARY_MINUS, state);
	break;
    case EXPR_EQ:
    case EXPR_NE:
    case EXPR_GE:
    case EXPR_GT:
    case EXPR_LE:
    case EXPR_LT:
    case EXPR_IN:
    case EXPR_PLUS:
    case EXPR_MINUS:
    case EXPR_TIMES:
    case EXPR_DIVIDE:
    case EXPR_MOD:
    case EXPR_PROP:
	{
	    Opcode op = OP_ADD;	/* initialize to silence warning */

	    generate_expr(expr->e.bin.lhs, state);
	    generate_expr(expr->e.bin.rhs, state);
	    switch (expr->kind) {
	    case EXPR_EQ:
		op = OP_EQ;
		break;
	    case EXPR_NE:
		op = OP_NE;
		break;
	    case EXPR_GE:
		op = OP_GE;
		break;
	    case EXPR_GT:
		op = OP_GT;
		break;
	    case EXPR_LE:
		op = OP_LE;
		break;
	    case EXPR_LT:
		op = OP_LT;
		break;
	    case EXPR_IN:
		op = OP_IN;
		break;
	    case EXPR_PLUS:
		op = OP_ADD;
		break;
	    case EXPR_MINUS:
		op = OP_MINUS;
		break;
	    case EXPR_TIMES:
		op = OP_MULT;
		break;
	    case EXPR_DIVIDE:
		op = OP_DIV;
		break;
	    case EXPR_MOD:
		op = OP_MOD;
		break;
	    case EXPR_PROP:
		op = OP_GET_PROP;
		break;
	    case EXPR_INDEX:
		op = OP_REF;
		break;
	    default:
		panic("Not a binary operator in GENERATE_EXPR()");
	    }
	    emit_byte(op, state);
	    pop_stack(1, state);
	}
	break;
    case EXPR_EXP:
	generate_expr(expr->e.bin.lhs, state);
	generate_expr(expr->e.bin.rhs, state);
	emit_extended_byte(EOP_EXP, state);
	pop_stack(1, state);
	break;
    case EXPR_INDEX:
	{
	    unsigned old;

	    generate_expr(expr->e.bin.lhs, state);
	    old = save_stack_top(state);
	    generate_expr(expr->e.bin.rhs, state);
	    restore_stack_top(old, state);
	    emit_byte(OP_REF, state);
	    pop_stack(1, state);
	}
	break;
    case EXPR_RANGE:
	{
	    unsigned old;

	    generate_expr(expr->e.range.base, state);
	    old = save_stack_top(state);
	    generate_expr(expr->e.range.from, state);
	    generate_expr(expr->e.range.to, state);
	    restore_stack_top(old, state);
	    emit_byte(OP_RANGE_REF, state);
	    pop_stack(2, state);
	}
	break;
    case EXPR_LENGTH:
	{
	    unsigned saved = saved_stack_top(state);

	    if (saved != UINT_MAX) {
		emit_extended_byte(EOP_LENGTH, state);
		add_stack_ref(saved, state);
		push_stack(1, state);
	    } else
		panic("Missing saved stack for `$' in GENERATE_EXPR()");
	}
	break;
    case EXPR_LIST:
	generate_arg_list(expr->e.list, state);
	break;
    case EXPR_CALL:
	generate_arg_list(expr->e.call.args, state);
	emit_byte(OP_BI_FUNC_CALL, state);
	emit_byte(expr->e.call.func, state);
	break;
    case EXPR_VERB:
	generate_expr(expr->e.verb.obj, state);
	generate_expr(expr->e.verb.verb, state);
	generate_arg_list(expr->e.verb.args, state);
	emit_call_verb_op(OP_CALL_VERB, state);
	pop_stack(2, state);
	break;
    case EXPR_COND:
	{
	    int else_label, end_label;

	    generate_expr(expr->e.cond.condition, state);
	    emit_byte(OP_IF_QUES, state);
	    else_label = add_label(state);
	    pop_stack(1, state);
	    generate_expr(expr->e.cond.consequent, state);
	    emit_byte(OP_JUMP, state);
	    end_label = add_label(state);
	    pop_stack(1, state);
	    define_label(else_label, state);
	    generate_expr(expr->e.cond.alternate, state);
	    define_label(end_label, state);
	}
	break;
    case EXPR_ASGN:
	{
	    Expr *e = expr->e.bin.lhs;

	    if (e->kind == EXPR_SCATTER) {
		int nargs = 0, nreq = 0, rest = -1;
		unsigned done;
		Scatter *sc;

		generate_expr(expr->e.bin.rhs, state);
		for (sc = e->e.scatter; sc; sc = sc->next) {
		    nargs++;
		    if (sc->kind == SCAT_REQUIRED)
			nreq++;
		    else if (sc->kind == SCAT_REST)
			rest = nargs;
		}
		if (rest == -1)
		    rest = nargs + 1;
		emit_extended_byte(EOP_SCATTER, state);
		emit_byte(nargs, state);
		emit_byte(nreq, state);
		emit_byte(rest, state);
		for (sc = e->e.scatter; sc; sc = sc->next) {
		    add_var_ref(sc->id, state);
		    if (sc->kind != SCAT_OPTIONAL)
			add_pseudo_label(0, state);
		    else if (!sc->expr)
			add_pseudo_label(1, state);
		    else
			sc->label = add_label(state);
		}
		done = add_label(state);
		for (sc = e->e.scatter; sc; sc = sc->next)
		    if (sc->kind == SCAT_OPTIONAL && sc->expr) {
			define_label(sc->label, state);
			generate_expr(sc->expr, state);
			emit_var_op(OP_PUT, sc->id, state);
			emit_byte(OP_POP, state);
			pop_stack(1, state);
		    }
		define_label(done, state);
	    } else {
		int is_indexed = 0;

		push_lvalue(e, 0, state);
		generate_expr(expr->e.bin.rhs, state);
		if (e->kind == EXPR_RANGE || e->kind == EXPR_INDEX)
		    emit_byte(OP_PUT_TEMP, state);
		while (1) {
		    switch (e->kind) {
		    case EXPR_RANGE:
			emit_extended_byte(EOP_RANGESET, state);
			pop_stack(3, state);
			e = e->e.range.base;
			is_indexed = 1;
			continue;
		    case EXPR_INDEX:
			emit_byte(OP_INDEXSET, state);
			pop_stack(2, state);
			e = e->e.bin.lhs;
			is_indexed = 1;
			continue;
		    case EXPR_ID:
			emit_var_op(OP_PUT, e->e.id, state);
			break;
		    case EXPR_PROP:
			emit_byte(OP_PUT_PROP, state);
			pop_stack(2, state);
			break;
		    default:
			panic("Bad lvalue in GENERATE_EXPR()");
		    }
		    break;
		}
		if (is_indexed) {
		    emit_byte(OP_POP, state);
		    emit_byte(OP_PUSH_TEMP, state);
		}
	    }
	}
	break;
    case EXPR_CATCH:
	{
	    int handler_label, end_label;

	    generate_codes(expr->e.catch.codes, state);
	    emit_extended_byte(EOP_PUSH_LABEL, state);
	    handler_label = add_label(state);
	    push_stack(1, state);
	    emit_extended_byte(EOP_CATCH, state);
	    push_stack(1, state);
	    INCR_TRY_DEPTH(state);
	    generate_expr(expr->e.expr, state);
	    DECR_TRY_DEPTH(state);
	    emit_extended_byte(EOP_END_CATCH, state);
	    end_label = add_label(state);
	    pop_stack(3, state);	/* codes, label, catch */
	    define_label(handler_label, state);
	    /* After this label, we still have a value on the stack, but now,
	     * instead of it being the value of the main expression, we have
	     * the exception tuple pushed before entering the handler.
	     */
	    if (expr->e.catch.except) {
		emit_byte(OP_POP, state);
		pop_stack(1, state);
		generate_expr(expr->e.catch.except, state);
	    } else {
		/* Select code from tuple */
		emit_byte(OPTIM_NUM_TO_OPCODE(1), state);
		emit_byte(OP_REF, state);
	    }
	    define_label(end_label, state);
	}
	break;
    default:
	panic("Can't happen in GENERATE_EXPR()");
    }
}

static Bytecodes stmt_to_code(Stmt *, GState *);

static void
generate_stmt(Stmt * stmt, State * state)
{
    for (; stmt; stmt = stmt->next) {
	switch (stmt->kind) {
	case STMT_COND:
	    {
		Opcode if_op = OP_IF;
		int end_label = -1;
		Cond_Arm *arms;

		for (arms = stmt->s.cond.arms; arms; arms = arms->next) {
		    int else_label;

		    generate_expr(arms->condition, state);
		    emit_byte(if_op, state);
		    else_label = add_label(state);
		    pop_stack(1, state);
		    generate_stmt(arms->stmt, state);
		    emit_byte(OP_JUMP, state);
		    end_label = add_linked_label(end_label, state);
		    define_label(else_label, state);
		    if_op = OP_EIF;
		}

		if (stmt->s.cond.otherwise)
		    generate_stmt(stmt->s.cond.otherwise, state);
		define_label(end_label, state);
	    }
	    break;
	case STMT_LIST:
	    {
		Fixup loop_top;
		int end_label;

		generate_expr(stmt->s.list.expr, state);
		emit_byte(OPTIM_NUM_TO_OPCODE(1), state);	/* loop list index */
		push_stack(1, state);
		loop_top = capture_label(state);
		emit_byte(OP_FOR_LIST, state);
		add_var_ref(stmt->s.list.id, state);
		end_label = add_label(state);
		enter_loop(stmt->s.list.id, loop_top, state->cur_stack,
			   end_label, state->cur_stack - 2, state);
		generate_stmt(stmt->s.list.body, state);
		end_label = exit_loop(state);
		emit_byte(OP_JUMP, state);
		add_known_label(loop_top, state);
		define_label(end_label, state);
		pop_stack(2, state);
	    }
	    break;
	case STMT_RANGE:
	    {
		Fixup loop_top;
		int end_label;

		generate_expr(stmt->s.range.from, state);
		generate_expr(stmt->s.range.to, state);
		loop_top = capture_label(state);
		emit_byte(OP_FOR_RANGE, state);
		add_var_ref(stmt->s.range.id, state);
		end_label = add_label(state);
		enter_loop(stmt->s.range.id, loop_top, state->cur_stack,
			   end_label, state->cur_stack - 2, state);
		generate_stmt(stmt->s.range.body, state);
		end_label = exit_loop(state);
		emit_byte(OP_JUMP, state);
		add_known_label(loop_top, state);
		define_label(end_label, state);
		pop_stack(2, state);
	    }
	    break;
	case STMT_WHILE:
	    {
		Fixup loop_top;
		int end_label;

		loop_top = capture_label(state);
		generate_expr(stmt->s.loop.condition, state);
		if (stmt->s.loop.id == -1)
		    emit_byte(OP_WHILE, state);
		else {
		    emit_extended_byte(EOP_WHILE_ID, state);
		    add_var_ref(stmt->s.loop.id, state);
		}
		end_label = add_label(state);
		pop_stack(1, state);
		enter_loop(stmt->s.loop.id, loop_top, state->cur_stack,
			   end_label, state->cur_stack, state);
		generate_stmt(stmt->s.loop.body, state);
		end_label = exit_loop(state);
		emit_byte(OP_JUMP, state);
		add_known_label(loop_top, state);
		define_label(end_label, state);
	    }
	    break;
	case STMT_FORK:
	    generate_expr(stmt->s.fork.time, state);
	    if (stmt->s.fork.id >= 0)
		emit_byte(OP_FORK_WITH_ID, state);
	    else
		emit_byte(OP_FORK, state);
	    add_fork(stmt_to_code(stmt->s.fork.body, state->gstate), state);
	    if (stmt->s.fork.id >= 0)
		add_var_ref(stmt->s.fork.id, state);
	    pop_stack(1, state);
	    break;
	case STMT_EXPR:
	    generate_expr(stmt->s.expr, state);
	    emit_byte(OP_POP, state);
	    pop_stack(1, state);
	    break;
	case STMT_RETURN:
	    if (stmt->s.expr) {
		generate_expr(stmt->s.expr, state);
		emit_ending_op(OP_RETURN, state);
		pop_stack(1, state);
	    } else
		emit_ending_op(OP_RETURN0, state);
	    break;
	case STMT_TRY_EXCEPT:
	    {
		int end_label, arm_count = 0;
		Except_Arm *ex;

		for (ex = stmt->s.catch.excepts; ex; ex = ex->next) {
		    generate_codes(ex->codes, state);
		    emit_extended_byte(EOP_PUSH_LABEL, state);
		    ex->label = add_label(state);
		    push_stack(1, state);
		    arm_count++;
		}
		emit_extended_byte(EOP_TRY_EXCEPT, state);
		emit_byte(arm_count, state);
		push_stack(1, state);
		INCR_TRY_DEPTH(state);
		generate_stmt(stmt->s.catch.body, state);
		DECR_TRY_DEPTH(state);
		emit_extended_byte(EOP_END_EXCEPT, state);
		end_label = add_label(state);
		pop_stack(2 * arm_count + 1, state);	/* 2(codes,pc) + catch */
		for (ex = stmt->s.catch.excepts; ex; ex = ex->next) {
		    define_label(ex->label, state);
		    push_stack(1, state);	/* exception tuple */
		    if (ex->id >= 0)
			emit_var_op(OP_PUT, ex->id, state);
		    emit_byte(OP_POP, state);
		    pop_stack(1, state);
		    generate_stmt(ex->stmt, state);
		    if (ex->next) {
			emit_byte(OP_JUMP, state);
			end_label = add_linked_label(end_label, state);
		    }
		}
		define_label(end_label, state);
	    }
	    break;
	case STMT_TRY_FINALLY:
	    {
		int handler_label;

		emit_extended_byte(EOP_TRY_FINALLY, state);
		handler_label = add_label(state);
		push_stack(1, state);
		INCR_TRY_DEPTH(state);
		generate_stmt(stmt->s.finally.body, state);
		DECR_TRY_DEPTH(state);
		emit_extended_byte(EOP_END_FINALLY, state);
		pop_stack(1, state);	/* FINALLY marker */
		define_label(handler_label, state);
		push_stack(2, state);	/* continuation value, reason */
		generate_stmt(stmt->s.finally.handler, state);
		emit_extended_byte(EOP_CONTINUE, state);
		pop_stack(2, state);
	    }
	    break;
	case STMT_BREAK:
	case STMT_CONTINUE:
	    {
		int i;
		Loop *loop = 0;	/* silence warnings */

		if (stmt->s.exit == -1) {
		    emit_extended_byte(EOP_EXIT, state);
		    if (state->num_loops == 0)
			panic("No loop to exit, in CODE_GEN!");
		    loop = &(state->loops[state->num_loops - 1]);
		} else {
		    emit_extended_byte(EOP_EXIT_ID, state);
		    add_var_ref(stmt->s.exit, state);
		    for (i = state->num_loops - 1; i >= 0; i--)
			if (state->loops[i].id == stmt->s.exit) {
			    loop = &(state->loops[i]);
			    break;
			}
		    if (i < 0)
			panic("Can't find loop in CONTINUE_LOOP!");
		}

		if (stmt->kind == STMT_CONTINUE) {
		    add_stack_ref(loop->top_stack, state);
		    add_known_label(loop->top_label, state);
		} else {
		    add_stack_ref(loop->bottom_stack, state);
		    loop->bottom_label = add_linked_label(loop->bottom_label,
							  state);
		}
	    }
	    break;
	default:
	    panic("Can't happen in GENERATE_STMT()");
	}
    }
}

static unsigned
max(unsigned a, unsigned b)
{
    return a > b ? a : b;
}

static unsigned
ref_size(unsigned max)
{
    if (max <= 256)
	return 1;
    else if (max <= 256 * 256)
	return 2;
    else
	return 4;
}

#ifdef BYTECODE_REDUCE_REF
static int
bbd_cmp(int *a, int *b)
{
	return *a - *b;
}
#endif /* BYTECODE_REDUCE_REF */

static Bytecodes
stmt_to_code(Stmt * stmt, GState * gstate)
{
    State state;
    Bytecodes bc;
    int old_i, new_i, fix_i;
#ifdef BYTECODE_REDUCE_REF
    int *bbd, n_bbd;		/* basic block delimiters */
    unsigned varbits;		/* variables we've seen */
#if NUM_READY_VARS > 32
#error assumed NUM_READY_VARS was 32
#endif
#endif /* BYTECODE_REDUCE_REF */
    Fixup *fixup;

    init_state(&state, gstate);

    generate_stmt(stmt, &state);
    emit_ending_op(OP_DONE, &state);

    if (state.cur_stack != 0)
	panic("Stack not entirely popped in STMT_TO_CODE()");
    if (state.saved_stack != UINT_MAX)
	panic("Still a saved stack index in STMT_TO_CODE()");

    /* The max()ing here with gstate->* is wrong (since that's a global
     * cumulative count, and thus unrelated to the local maximum), but required
     * in order to maintain the validity of old program counters stored for
     * suspended tasks... */
    bc.numbytes_literal = ref_size(max(state.max_literal,
				       gstate->num_literals));
    bc.numbytes_fork = ref_size(max(state.max_fork,
				    gstate->num_fork_vectors));
    bc.numbytes_var_name = ref_size(max(state.max_var_ref,
					gstate->total_var_refs));

    bc.size = state.num_bytes
	+ (bc.numbytes_literal - 1) * state.num_literals
	+ (bc.numbytes_fork - 1) * state.num_forks
	+ (bc.numbytes_var_name - 1) * state.num_var_refs;

    if (bc.size <= 256)
	bc.numbytes_label = 1;
    else if (bc.size + state.num_labels <= 256 * 256)
	bc.numbytes_label = 2;
    else
	bc.numbytes_label = 4;
    bc.size += (bc.numbytes_label - 1) * state.num_labels;

    bc.max_stack = state.max_stack;
    bc.numbytes_stack = ref_size(state.max_stack);

    bc.vector = mymalloc(sizeof(Byte) * bc.size, M_BYTECODES);

#ifdef BYTECODE_REDUCE_REF
    /*
     * Create a sorted array filled with the bytecode offsets of
     * beginnings of each basic block of code.  These are sequences
     * of bytecodes which are guaranteed to execute in order (so if
     * you start at the top, you will reach the bottom).  As such they
     * are delimited by conditional and unconditional jump operations,
     * each of which has an associated fixup.  If you also want to
     * limit the blocks to those which have the property "if you get to
     * the bottom you had to have started at the top", include the
     * *destinations* of the jumps (hence the qsort).
     */
    bbd = mymalloc(sizeof(*bbd) * (state.num_fixups + 2), M_CODE_GEN);
    n_bbd = 0;
    bbd[n_bbd++] = 0;
    bbd[n_bbd++] = state.num_bytes;
    for (fixup = state.fixups, fix_i = 0; fix_i < state.num_fixups; ++fix_i, ++fixup)
	if (fixup->kind == FIXUP_LABEL || fixup->kind == FIXUP_FORK)
	    bbd[n_bbd++] = fixup->pc;
    qsort(bbd, n_bbd, sizeof(*bbd), bbd_cmp);

    /*
     * For every basic block, search backwards for PUT ops.  The first
     * PUSH we find for each variable slot (looking backwards, remember)
     * after each PUT becomes a PUSH_CLEAR, while the rest remain PUSHs.
     * In other words, the last use of a variable before it is replaced
     * is identified, so that during interpretation the code can avoid
     * holding spurious references to it.
     */
    while (n_bbd-- > 1) {
	varbits = 0;

        for (old_i = bbd[n_bbd] - 1; old_i >= bbd[n_bbd - 1]; --old_i) {
	    if (state.pushmap[old_i] == OP_PUSH) {
		int id = PUSH_n_INDEX(state.bytes[old_i]);

		if (varbits & (1 << id)) {
			varbits &= ~(1 << id);
			state.bytes[old_i] += OP_PUSH_CLEAR - OP_PUSH;
		}
	    } else if (state.trymap[old_i] > 0) {
		/*
		 * Operations inside of exception handling blocks might not
		 * execute, so they can't set any bits.
		 */;
	    } else if (state.pushmap[old_i] == OP_PUT) {
		int id = PUT_n_INDEX(state.bytes[old_i]);
		varbits |= 1 << id;
	    } else if (state.pushmap[old_i] == OP_DONE) {
		/*
		 * If the verb ends, all variables are unneeded.  This
		 * means things like `return pass(@args)' will not hold
		 * a ref to `args' during the called verb.
		 */
		varbits = ~0U;
	    } else if (state.pushmap[old_i] == OP_CALL_VERB) {
		/*
		 * Verb calls implicitly pass the VR variables (dobj,
		 * dobjstr, player, etc).  They can't be clear at the
		 * time of a verbcall.
		 */
		varbits &= NON_VR_VAR_MASK;
	    }
	}
    }
    myfree(bbd, M_CODE_GEN);
#endif /* BYTECODE_REDUCE_REF */

    fixup = state.fixups;
    fix_i = 0;
    for (old_i = new_i = 0; old_i < state.num_bytes; old_i++) {
	if (fix_i < state.num_fixups && fixup->pc == old_i) {
	    unsigned value, size = 0;	/* initialized to silence warning */

	    value = fixup->value;
	    switch (fixup->kind) {
	    case FIXUP_LITERAL:
		size = bc.numbytes_literal;
		break;
	    case FIXUP_FORK:
		size = bc.numbytes_fork;
		break;
	    case FIXUP_VAR_REF:
		size = bc.numbytes_var_name;
		break;
	    case FIXUP_STACK:
		size = bc.numbytes_stack;
		break;
	    case FIXUP_LABEL:
		value += fixup->prev_literals * (bc.numbytes_literal - 1)
		    + fixup->prev_forks * (bc.numbytes_fork - 1)
		    + fixup->prev_var_refs * (bc.numbytes_var_name - 1)
		    + fixup->prev_labels * (bc.numbytes_label - 1)
		    + fixup->prev_stacks * (bc.numbytes_stack - 1);
		size = bc.numbytes_label;
		break;
	    default:
		panic("Can't happen #1 in STMT_TO_CODE()");
	    }

	    switch (size) {
	    case 4:
		bc.vector[new_i++] = value >> 24;
		bc.vector[new_i++] = value >> 16;
	    case 2:
		bc.vector[new_i++] = value >> 8;
	    case 1:
		bc.vector[new_i++] = value;
		break;
	    default:
		panic("Can't happen #2 in STMT_TO_CODE()");
	    }

	    fixup++;
	    fix_i++;
	} else
	    bc.vector[new_i++] = state.bytes[old_i];
    }

    free_state(state);

    return bc;
}

Program *
generate_code(Stmt * stmt, DB_Version version)
{
    Program *prog = new_program();
    GState gstate;

    init_gstate(&gstate);

    prog->main_vector = stmt_to_code(stmt, &gstate);
    prog->version = version;

    if (gstate.literals) {
	unsigned i;

	prog->literals = mymalloc(sizeof(Var) * gstate.num_literals,
				  M_LIT_LIST);
	prog->num_literals = gstate.num_literals;
	for (i = 0; i < gstate.num_literals; i++)
	    prog->literals[i] = gstate.literals[i];
    } else {
	prog->literals = 0;
	prog->num_literals = 0;
    }

    if (gstate.fork_vectors) {
	unsigned i;

	prog->fork_vectors =
	    mymalloc(sizeof(Bytecodes) * gstate.num_fork_vectors,
		     M_FORK_VECTORS);
	prog->fork_vectors_size = gstate.num_fork_vectors;
	for (i = 0; i < gstate.num_fork_vectors; i++)
	    prog->fork_vectors[i] = gstate.fork_vectors[i];
    } else {
	prog->fork_vectors = 0;
	prog->fork_vectors_size = 0;
    }

    free_gstate(gstate);

    return prog;
}

char rcsid_code_gen[] = "$Id: code_gen.c,v 1.9 1999/08/14 19:44:15 bjj Exp $";

/*
 * $Log: code_gen.c,v $
 * Revision 1.9  1999/08/14 19:44:15  bjj
 * Code generator will no longer PUSH_CLEAR things like dobj/dobjstr/prepstr
 * around CALL_VERB operations, since those variables are passed directly
 * from one environment to the next.
 *
 * Revision 1.8  1999/08/12 05:40:09  bjj
 * Consider OP_FORK a nonlocal goto so that no variables are undefined
 * when it happens (the saved environment has to be complete for the forked
 * task).
 *
 * Revision 1.7  1999/08/11 07:51:03  bjj
 * Fix problem with last checkin which prevented compiling without B_R_R, duh.
 *
 * Revision 1.6  1999/07/15 01:34:11  bjj
 * Bug fixes to v1.2.2.2, BYTECODE_REDUCE_REF.  Code analysis now takes
 * into account what opcodes are running under try/catch protection and
 * prevents them from becoming PUSH_CLEAR operations which may result
 * in spurious undefined variable errors.
 *
 * Revision 1.5  1998/12/14 13:17:30  nop
 * Merge UNSAFE_OPTS (ref fixups); fix Log tag placement to fit CVS whims
 *
 * Revision 1.4  1998/02/19 07:36:16  nop
 * Initial string interning during db load.
 *
 * Revision 1.2.2.2  1997/09/09 07:01:16  bjj
 * Change bytecode generation so that x=f(x) calls f() without holding a ref
 * to the value of x in the variable slot.  See the options.h comment for
 * BYTECODE_REDUCE_REF for more details.
 *
 * This checkin also makes x[y]=z (OP_INDEXSET) take advantage of that (that
 * new code is not conditional and still works either way).
 *
 * Revision 1.3  1997/07/07 03:24:53  nop
 * Merge UNSAFE_OPTS (r5) after extensive testing.
 *
 * Revision 1.2.2.1  1997/05/29 15:50:01  nop
 * Make sure to clear prev_stacks to avoid referring to uninitialized memory
 * later.  (Usually multiplied by zero, so only a problem in weird circumstances.)
 *
 * Revision 1.2  1997/03/03 04:18:24  nop
 * GNU Indent normalization
 *
 * Revision 1.1.1.1  1997/03/03 03:44:59  nop
 * LambdaMOO 1.8.0p5
 *
 * Revision 2.4  1996/02/08  07:21:08  pavel
 * Renamed TYPE_NUM to TYPE_INT.  Added support for exponentiation expression,
 * named WHILE loop and BREAK and CONTINUE statement.  Updated copyright
 * notice for 1996.  Release 1.8.0beta1.
 *
 * Revision 2.3  1996/01/16  07:17:36  pavel
 * Add support for scattering assignment.  Release 1.8.0alpha6.
 *
 * Revision 2.2  1995/12/31  03:10:47  pavel
 * Added general support for managing stack references as another kind of
 * fixup and for a single stack of remembered stack positions.  Used that
 * stack for remembering the positions of indexed/subranged values and for
 * implementing the `$' expression.  Release 1.8.0alpha4.
 *
 * Revision 2.1  1995/11/30  04:18:56  pavel
 * New baseline version, corresponding to release 1.8.0alpha1.
 *
 * Revision 2.0  1995/11/30  04:16:54  pavel
 * Initial RCS-controlled version.
 */


text:
School Concert: Peter and the Wolf
Prokofiev's fantastic music is almost as narrative as the happy and slightly scary story. For mellanstadiet (in swedish).
11.00, Göteborgs Konserthus
Concert length: 45 min
Scene: Stora salen
Enjoy a good dinner before the concert, or perhaps a glass of champagne at the interval. You'll find both a café, a restaurant and a bar in the Gothenburg Concert Hall.
Event has already taken place
Prokofiev's happy and slightly scary musical story captivates children and adults alike.
What will happen when the duck escapes, will the wolf jump up and catch the cat in the tree, will the farmers shoot the wolf? The fantastic music is almost as narrative as the story – the duck is an oboe, Peter a string quartet – but we won't give away the ending here.
Following the premiere in the Soviet Union in 1936, Peter and the Wolf, commissioned by the central children's theatre in Moscow, celebrated triumph after triumph across the world. The fable about good versus evil resonated with the young and the old, and Prokofiev's expressive music with its catchy tunes stuck immediately.
Peter and the Wolf is one of the most performed works of the whole classical repertoire, and also took Prokofiev to Hollywood, where Disney made an animated film of the story. At this performance, there is not only the story and the music, but other fun stuff too.
Presenter is Sara Edwardsson, who is recognized from TV programs such as Bolibompa, Supersnällasilversara, Morgonshowen and Nattens hjältar. She has a great love for music and has released several own children's albums over the years.
For mellanstadiet, in Swedish
To give opportunity to as many children as possible to experience our popular school concerts, we would like to remind you that your booking is binding. Adjustments to the booking can be made up to 30 days before the concert – do not forget to give us your order number when contacting us so that everything is correct. Unsubscribed or missing visits are charged with 500 SEK. If you have any questions, please contact us at biljett@gso.se or by phone 031-7265300.
Prokofjev Peter and the Wolf
Gothenburg Symphony
The Gothenburg Symphony, called "one of the world's most formidable orchestras" by the Guardian, has toured the USA, Europe, Japan and the Far East and performed at major music centres and festivals throughout the world. Chief conductor is Santtu-Matias Rouvali who started his tenure in 2017. Kent Nagano has been principal guest conductor since 2013. Already at the orchestra's very first years, the great Swedish composer Wilhelm Stenhammar was appointed principal conductor, contributing strongly to the Nordic profile of the orchestra by inviting his colleagues Carl Nielsen and Jean Sibelius to conduct their own works. Subsequent holders of the post include Sergiu Comissiona, Sixten Ehrling and Charles Dutoit. During Neeme Järvi's tenure (1982-2004), the orchestra became a major international force. In 1997 it was appointed the National Orchestra of Sweden. The list of prominent guest conductors has included Wilhelm Furtwängler, Pierre Monteux, Herbert von Karajan, Myung-Whun Chung, Herbert Blomstedt and Sir Simon Rattle. The orchestra also runs extensive concert projects for children, and regularly releases digital live concerts free on www.gsoplay.se. The orchestra has issued over 100 recordings on BIS, Deutsche Grammophon, Chandos, Farao Classics and several other labels, including the complete orchestral music by Grieg and the complete symphonies of Sibelius, Nielsen, Stenhammar and Atterberg, and most recently orchestral music by Richard Strauss. The Gothenburg Symphony is owned by the Region Västra Götaland. www.gso.se
Jiří Rožeň Conductor
Sara Edwardsson presenter