text:
A Newcastle policeman warned parents with "any concerns about dogs in their area to talk to council" after a 3-year-old boy had his ear ripped off after an attack by a Great Dane.
Detective acting Inspector Jeffrey Little told The Sydney Morning Herald the little boy was riding his bicycle when the Great Dane escaped from an open gate and onto the street, biting the back of the toddler's head and neck at 6:30pm on Tuesday.
The little boy suffered injuries to his face, neck and upper back, and after being treated at the scene by paramedics he was taken in a stable condition to John Hunter Hospital.
Detective Inspector Little said the event was traumatic for the family who witnessed the attack and that the dog in question "would more than likely be destroyed."
It has since been reported the dog was released to its owners.
Newcastle dog attack comes days after tragic death of one-year-old
One-year-old Kamillah Jones died from critical injuries after being attacked by a Rottweiler in Inverell, Northern New South Wales on Saturday.
Little Kamillah was being pushed down the street in a pram by her mother when the dog jumped up and attacked her. Emergency services quickly arrived at the site of the tragic assault but the little girl died in the ambulance on her way to hospital.
The dog was seized and put down by the local council on Tuesday.
Third dog attack reported in Melbourne on Monday
And on Monday morning news.com.au reported that a 10-year-old Melbourne girl was saved by her neighbours after a dog "went berserk" attacking her and leaving her with severe injuries, including bites, lacerations and is also believed to have lost an ear.
The dog is this attack was believed to be a bull-mastiff, and was seized by local rangers.
Choose a breed of dog not likely ever to harm
In a passionate piece for news.com.au, LJ Charleston argued that all three attacks prove dog owners are in denial.
"Enough is enough. If the death of a one-year-old child is not enough for action to be taken, I don't know what is. There are hundreds of breeds of dogs in the world. If you have small children and you want to get a dog, choose a breed that is not likely to ever harm a child. Even better, get a small dog — one that is actually physically smaller than your toddler. Just don't risk an injury or a death because the heartache and devastation of losing a child would be absolutely horrific. If any breed is powerful enough to kill a person, you shouldn't have it around a small child at all. But dog owners always "know best" and believe they know their pet would never, ever harm a human."
"Every dog has the potential to be dangerous"
According to The Sydney Morning Herald, 3430 dog attacks were reported to New South Wales councils over the past year; over 30 of those involved children under 16 years of age.
Detective Inspector Little said all three attacks should be a "timely warning" for all dog owners to make sure they're taking necessary precautions to prevent similar incidents.
"There are some very serious offences under the Companion Animals Act, and they range right up to five years' imprisonment and/or a $77,000 fine," he told reporters.
If you have concerns about dogs in your area you can find more information about the reporting process here.
More news and features
Bites and stings: how to treat mosquitoes, bees, ants, spiders and dogs
Our beautiful country is full of biting and stinging animals.
Mum loses it over her messy house but discovers a brilliant new cleaning hack!
Another great cleaning hack, brought to you by rage cleaning!
Middle child traits we bet you can spot in your second born
Middle child truths that all parents of three or more kiddos will know to be true.
Save those precious drops! 7 ways to raise little water warriors
Seven easy ways to teach our kids to conserve water.
Chinese New Year: Welcome to the Year of the Rat!
What to expect from babies born in the Year of the Rat.
Ewww! 6 weird (and kinda gross) ways kids show us their love
Kids show their love in the weirdest of ways!
Is your child "tired and wired"? This might be why
The little-known way getting up after bedtime can sabotage your kids' sleep.
Children of the Millennials - here's what we know about Generation 'Alpha'
Children born between 2010 and 2025 will be known as Generation Alpha.


text:
Derek Doubleday was born in 1923 and grew up in Bottlesford, England. He attended King's School for Boys in Grantham and graduated in 1939. Before and after serving in the RAF as a navigator, he worked in the Borough's treasury office. Early in 1948, when Derek was 25, his family decided to move to Canada.
The Doubleday family moved to Jericho Road (72nd Avenue) in the Clayton area of Surrey. The family had a small farm with some pigs and chickens in an area of mostly small holdings although there were a few commercial chicken farms. Derek's father was in the building trade as well as his older brothers, one a plumber, the other a brick mason. Derek was supposed to become a carpenter.
Fortunately for Derek, one of his neighbours brought him a Langley Advance which had an ad for an assistant clerk treasurer for the Township of Langley. He applied for the position, was accepted and starting work on December 1, 1948 as assistant to the clerk treasurer, John Campbell. The Municipal Hall was located in Murrayville directly across from the Murrayville School. Down the hill, the five corners consisted of a store, a church and a few houses.
The tiny Municipal Hall was built into the hillside. The upstairs was almost totally open with a counter for serving the public and a few crowded offices. The corners had little offices for Assessment, Taxation Collection, Building Inspection and Licence. There was an office for John Campbell and also a tiny one for Derek. A machine for printing the tax roll was in a small room. The offices for the Magistrate, Archie Payne, and the police, a corporal and a constable of the BC Provincial Police, were beside the Council Chambers which was also used as the Courtroom. The toilets were located in the basement which also had a cell for prisoners.
Public Works had a separate building occupied by Ken Major, Public Works Clerk, along with the Superintendent of Works. In total the entire municipal hall staff consisted of seven or eight staff and the Works Department had fiteen to eighteen employees.
According to Derek it was a very small staff for a very large area and he often emphasized the fact that many people didn't appreciate just how large the municipality is. Even back in those days there were many issues to deal with. One of the biggest ones Derek said was transportation. Road paving was the biggest budget item. The Township had miles and miles of gravel roads, many were often impassable. Prior to the establishment of a road paving program the municipality only paved a bit adjacent to schools. Under Reeve Noel Booth the paving program was expanded somewhat. It was expanded further under Reeve George Brooks to pave several miles each year. The other problem was during the Depression years the many wooden bridges had fallen into disrepair. Between paving and replacing bridges there wasn't much left in the budget for other things.
Another issue during Derek's early time at the municipaliy was the construction of the Freeway. Derek said there was a lot of concern expressed by merchants in Langley Prairie that taking traffic off the Fraser Highway would kill their businesses. People were also upset because the Freeway would split the community.
Shortly after Derek married Gloria in October of 1954, they traveled in the United States and paid attention to the freeways – some had trees and green space on both sides – this park like impression struck Derek as having applicability to the Langley discussion about the Trans Canada Highway. Derek spoke to the MLA and others in Victoria about leaving green space, preserving trees and also planting trees. It was that kind of thing that Derek did quietly behind the scenes. He had a love for preserving green space and was instramental in the Township acquiring Williams Park and Ponder Park.
Derek was promoted to the Clerk Treasurer position in 1953. Lornie Coates later became Derek's deputy clerk As the Township continued to grow over the years a separate Treasurer postion was created and Derek went on to become the Clerk Administrator. He retired in 1983, after serving the Township of Langley for over three decades. After his retirement Mayor Bill Blair and Township Council gave Derek Doubleday "the freedom of the muncipality".

subset: commoncrawl


text:
ServiceMaster Restore specializes in professional restoration services following commercial disasters such as fires and flooding situations, natural disasters and acts of vandalism. ServiceMaster Restore responds immediately to mitigate damage, minimize your business losses, and to help protect you against exposure to third party issues.
The ServiceMaster Family
ServiceMaster Restore professionals are part of the ServiceMaster family, one of the world's largest and most versatile service networks. Each year, we serve over 10.5 million homes and businesses with services from
Please select your closest representative:ServiceMaster Of Mississauga
Please select your closest representative:ServiceMaster Of Mississsauga & Mississauga West
and disaster restoration services
to home cleaning services furniture repair and restoration, home inspection services, energy audits and much more.
ServiceMaster Global Holdings, Inc. (NYSE: SERV) is a leading provider of essential residential and commercial services and well-recognized brand, operating through an extensive service network of more than 7,000 company-owned, franchised and licensed locations. MORE INFORMATION.
Related Content
What about special items? Artwork, china, heirlooms, etc.
Some high-value items require restoration by specialists. Working with your insurance claim representative, we can help you identify these items and locate a qualified restorer.
Will I have access to my belongings while they are in storage?
Yes, with advance notice we can schedule time for a ServiceMaster Restore Restoration Technician to meet with you and provide access to your requested items. A service charge may apply.
Home Fire Safety and Prevention
Fires claim eight lives each week in Canada, and almost three-quarters of those deaths are a result of residential fires. According to Fire Prevention Canada, hom


text:
Infection Prevention and Control eLearning Modules
A suite of eLearning modules has been developed by the Commission to provide information on the principles of infection prevention and control in Australian healthcare settings. Many of these modules are also of value to those involved in aged care, the community more generally, or workforce such as beauticians.
All healthcare workers need to understand the basis and importance of infection prevention and control and their role in preventing the spread of infection. To meet this educational need, the Commission developed a suite of 10 eLearning modules that cover topics such as:
- Principles of infection prevention and control
- Risk management systems for infectious agents and infectious diseases
- Basic microbiology and multi-resistant organisms
- Cleaning, disinfection and sterilisation
- Infectious agent health screening and immunisation of healthcare workers
- Outbreak investigation and management
- Management of occupation exposure
- Renovation, repairs and redevelopment risk management
- Basic epidemiology/statistics
- Surveillance and quality improvement
These eLearning modules are based on the content of the Australian Guidelines for the Prevention and Control of Infection in Healthcare.
A workbook has also been developed to support the use of the modules, and is available through the link below:
The Commission's Infection Prevention and Control learning modules (modules 1 -10) are now available through the National Hand Hygiene Initiative Learning Management System (NHHI LMS). To access the modules, you will need to log into the NHHI LMS using your current login details, or register as a new user.
Access the NHHI LMS eLearning modules.
Select the tab labelled Infection Control Modules, open the catalogue and choose which module you wish to undertake to begin your learning. You may select any number of modules in any order. A certificate of completion is available at the end of each successfully completed module which you are encouraged to download when you have completed the module.
Please be aware that any uncompleted modules from the previous platform for the LMS are unable to be transferred to this new system. If you do not have a certificate from a previously completed module, unfortunately you will need to restart and complete the relevant modules in the new LMS.
NOTE. This link to the eLearning modules has been updated. If you have previously saved the link you need to update it with the new URL above.


text:
Program Details
You're already making a difference through the work you love. Now take it to the next level with the online Bachelor of Science in Health Sciences from Southern New Hampshire University. It's a flexible, affordable and uniquely tailored way to build on the skills and experience you've acquired professionally and gain the knowledge to take on new challenges in your chosen clinical discipline.
Exclusively designed for professionals with an associate degree in the allied health field, SNHU's transfer-friendly health science degree online is structured to maximize your transfer of credits for prior coursework – so you can make the most of what you've learned previously and take only the classes you need to obtain your bachelor's degree. At the same time, it lets you enrich your general knowledge base and develop further expertise in specific healthcare-related coursework, preparing you for success in supervisory and management roles.
- High school diploma or GED
- Official transcripts
School Accreditation Statement
New England Commission of Higher Education


text:
The effect of anesthetic techniques on cancer recurrence has been the subject of intensive research in the past years, as it affects a large proportion of the population. The use of opioids and halogenated agents in cancer patients during the perioperative period may be related to higher rates of cancer recurrence and reduced disease-free survival.
Prostate cancer is treated with androgen receptor (AR) antagonists but most patients experience disease progression after long-term treatment with these compounds. Therefore, new AR antagonists are required for patient follow-up treatment.
Combining chemotherapeutics to treat malignant tumors has been shown to be effective in preventing drug resistance, tumor recurrence, and reducing tumor size. We modeled combination drug therapy in PC-3 human prostate cancer cells using mixture design response surface methodology (MDRSM), a statistical technique designed to optimize compositions to achieve the most desirable result.
BACKGROUND - According to the American Cancer Society, prostate cancer accounts for ∼27% of all incident cancer cases among men and is the second most common (noncutaneous) cancer among men. The relation between diet and prostate cancer is still unclear.
To describe the studies that have reported association measures between risk of cancer and the percentage distribution of urinary inorganic arsenic (iAs) metabolites by anatomical site, in non-ecological epidemiological studies.
Bone health education and implementation of preventive measures are key to effective management of osteoporosis. We assessed areas of knowledge deficits with respect to bone health in breast and prostate cancer survivors and the preferred source of health information METHODS: We used a mixed methods approach.
OBJECTIVE - To assess the impact on suspected cancer referral burden and new cancer diagnosis of Public Health England's recent Be Clear on Cancer 'blood in pee' mass media campaign.
Nutrition is important for prostate cancer (PC) survivorship care to help achieve a healthy weight, reduce treatment side effects and reduce the risk of developing other chronic diseases. We aimed to advance the understanding of the nutritional needs of men with PC and services that could be potentially implemented to address them.
Purpose Report bleeding incidences associated with rivaroxaban in adult patients with solid tumor malignancies requiring anticoagulation therapy. Methods This retrospective review was conducted at Indiana University Health, University Hospital and the Simon Cancer Center in Indianapolis, IN from January 2013 - February 2016.
BACKGROUND - Several observational studies suggested that APE1 Asp148Glu was significantly associated with urinary cancers; however, the results of published studies are inconsistent.
MATERIALS AND METHODS - The PubMed and EMBASE were searched for case-control studies regarding the association between Asp148Glu and the risk of urinary cancers with a time limit of September 12, 2015.
Background: Human papillomavirus (HPV) infection is associated with cervical cancer; however, it is
controversial whether it is involved in non-cervical genital cancers. Objective: This study aimed to evaluate
articles on the prevalence of HPV in penile cancer, vulvar cancer, colorectal cancer, prostate cancer and anal
canal cancer in studies conducted in Brazil.
Catechol-O-methyltransferase (COMT) plays a central role in DNA repair and estrogen-induced carcinogenesis. Many recent epidemiologic studies have investigated the association between the COMT Val158Met polymorphism and cancer risk, but the results are inconclusive.
Smoking after a diagnosis of cancer can negatively impact treatment outcomes and quality of life. It is important that patients quit smoking and remain abstinent regardless of cancer type. Some cancer types (e.
We looked at subjective attitude towards active surveillance (AS) as the first option for cancer management in a cohort of patients seeking first medical help for uroandrological disorders prior to a formal discussion with a caregiver.
Renal cell carcinoma (RCC) is a common malignancy with high metastatic potential, primarily due to its extensive vascularity. Common sites of metastasis include lungs, bone, lymph nodes, liver, and brain.
Extracellular proton-secreting transport systems that contribute to extracellular pH include the Vacuolar H(+)-ATPase (V-ATPase). This pump, which mediates ATP-driven transport of H(+) across membranes, is involved in metastasis.
The purpose of the paper is to assess the influence of marital status on conditional relative survival of cancer according to sex.
Analyses involved 779,978 males and 1,032,868 females diagnosed with 1 of 13 cancer types between 2000 and 2008, and followed through 2013.
Multiparametric-MRI is an important tool in the diagnosis of prostate cancer (PCa), particularly diffusion-weighted imaging for peripheral zone (PZ) cancer in the untreated prostate. However, there are many benign entities that demonstrate diffusion restriction in the PZ mimicking PCa resulting in diagnostic challenges.
Immune checkpoint inhibition (ICI) with anti-CTLA-4 and/or anti-PD-1 antibodies is standard treatment for metastatic melanoma. Anti-PD-1 (pembrolizumab, nivolumab) and anti-PD-L1 antibodies (atezolizumab, durvalumab, and avelumab) have been approved for treatment of several other advanced malignancies, including non-small-cell lung cancer (NSCLC); renal cell, and urothelial carcinoma; head and neck cancer; gastric, hepatocellular, and Merkel-cell carcinoma; and classical Hodgkin lymphoma.
Wilms tumor (WT) is the most common pediatric renal tumor. Survival rates are high, whether treated according to the European protocols (SIOP-RTSG) that use prenephrectomy chemotherapy or the Children's Oncology Group (COG) protocols, with immediate nephrectomy.
Bladder cancer has become a common cancer globally, with an estimated 430 000 new cases diagnosed in 2012.
We examine the most recent global bladder cancer incidence and mortality patterns and trends, the current understanding of the aetiology of the disease, and specific issues that may influence the registration and reporting of bladder cancer.
Free radicals play an important role in the different complex course of carcinogenesis. Higher concentrations of reactive oxygen species are highly associated with the presence of tumors. The urinary bladder organ is also a target for many carcinogens.
Clear cell sarcoma of the kidney (CCSK) is the second most common pediatric renal malignancy after Wilms tumor. CCSK has the potential to metastasize to distant sites and was historically known as the bone metastasizing renal tumor.
Since cancer-related stigmatization is prevalent but difficult to change, research on its impact on psychological burden and intervening variables is needed. Therefore, we investigated the effect of stigmatization on depressive symptomatology and whether body image mediates this relationship.
Bone morphogenetic protein (BMP) belongs to transforming growth factor-β superfamily. To date, more than 20 BMPs have been identified in humans. BMPs play a critical role in embryonic and postnatal development, and also in maintaining homeostasis in different organs and tissues by regulating cell differentiation, proliferation, survival and motility.
Although selective metabolic and receptor-based molecular agents will surely be included in the future of prostate cancer diagnosis and therapy, currently available inorganic compounds-such as 18F-NaF for the diagnosis of bony disease and 223RaCl2 for the therapy of bone metastases-were recently shown to be superior to standard 99mTc-phosphonates for diagnosis and 153Sm-ethylenediaminetetramethylene phosphonate or 89SrCl2 for therapy.
Novel treatment modalities are urgently required for androgen-independent prostate cancer. In order to develop an alternative treatment for prostate cancer, the cytotoxic effects of the 26S proteasome inhibitor bortezomib, either alone or in combination with the two commonly used chemotherapeutic agents irinotecan and etoposide, on the human prostate cancer cell line PC-3 were evaluated in the present study.
Fertility is a major part of the global care of patients treated for cancer. A new discipline known as oncofertility has emerged in some countries. Although the relationship between chemotherapy and external radiotherapy and fertility has been studied and reported, there is only scarce data available on brachytherapy.
The International Agency for Research on Cancer (IARC) has determined there is sufficient evidence that working in the rubber manufacturing industry increases the risk of cancers of the stomach, lung, bladder and leukaemia and lymphoma.
To describe age, multiple chronic condition (MCC) profiles, and health system contact in urologic cancer patients.
Using Geisinger Health System electronic health records, we identified adult primary care patients and a subset with at least one urology encounter between 2001-2015.
Urolithiasis is a common condition that poses significant morbidity to patients. There are similarities in the development of certain cancers and urinary tract calculi (UTC), however, little is known about their temporal relationship.
Bone metastases are a common complication of epithelial cancers, of which breast, prostate and lung carcinomas are the most common. The establishment of cancer cells to distant sites such as the bone microenvironment requires multiple steps.
Traditional or folk medicine has led to the discovery of important bioactive substances used in several health-related areas. Phytochemicals in Rhoeo discolor (R. discolor) extracts have proven to have important cancer cell specific cytotoxic activity.
Diabetes and cancer are common diseases both with enormous impact on health burden globally. The increased risk of several types of cancer among people with type 2 diabetes mellitus has been indicated repeatedly.
We aimed to investigate cancer incidence and all-cause mortality in a cohort of 8358 civilians (5134 men and 3224 women) employed by the Royal Norwegian Navy at any time between 1950 and 2005.
The cohort was followed for cancer incidence and all-cause mortality from 1960 through 2015.
Europe contains 9% of the world population but has a 25% share of the global cancer burden. Up-to-date cancer statistics in Europe are key to cancer planning. Cancer incidence and mortality estimates for 25 major cancers are presented for the 40 countries in the four United Nations-defined areas of Europe and for Europe and the European Union (EU-28) for 2018.
To analyze the impact of cancer on intraoperative and postprocedural complications (IPCs) in Germany.
Patients with first diagnosis of IPCs between 2010 and 2015 were identified in 982 general practitioners in the IMS Disease Analyzer database.
BACKGROUND - Increased cancer risk has been reported among workers in the rubber manufacturing industry employed before the 1960s. It is unclear whether risk remains increased among workers hired subsequently. The present study focused on risk of cancer mortality for rubber workers first employed since 1975 in 64 factories.
We estimated mortality figures for 2019 in seven Latin American countries, with focus on breast cancer. We retrieved cancer death certification and population data from the WHO and PAHO databases. We obtained mortality statistics for Argentina, Brazil, Chile, Colombia, Cuba, Mexico and Venezuela for 1970-2015.
Background: Beliefs about cancer risk and experience of early detection and treatment can impact on willingness to engage with these initiatives. This study describes changes in perceptions of cancer mortality, early detection and treatment among adult New Zealanders (NZ) between two cross-sectional studies conducted in 2001 and 2014/5.
Knowledge about disease and treatment is necessary before patients can consent to treatment. One of the few established instruments for evaluating whether sufficient information has been provided, is the EORTC QLQ-INFO25 questionnaire which was developed to measure how patients perceive information.
With the aim of providing cancer control indicators, this work presents cancer survival in adult (≥15 years) patients in Spain diagnosed during the period 2000-2007 from Spanish cancer registries participating in the EUROCARE project.
Exercise levels often decline following cancer diagnosis despite growing evidence of its benefits. Treatment side effects, older age, lack of confidence and opportunity to exercise with others in similar circumstances influence this.
Describing the burden of cancer in the oldest old (those aged ≥85 years at diagnosis) is important, as the growing elderly population in Massachusetts lives to older ages.
Incident cases of invasive cancer in Massachusetts from 2004-2014 were provided by the Massachusetts Cancer Registry.
Excess body weight (body mass index [BMI] ≥ 25.00 kg/m2) is an established risk factor for diabetes, hypertension and cardiovascular disease, but its relationship to cancer is lesser-known. This study used population attributable fractions (PAFs) to estimate the cancer burden attributable to excess body weight in Canadian adults (aged 25+ years) in 2010.
Exosomes and microvesicles (EMV) are lipid bilayer-enclosed structures, released by cells and involved in intercellular communication through transfer of proteins and genetic material. EMV release is also associated with various pathologies, including cancer, where increased EMV release is amongst other associated with chemo-resistance and active transfer of pro-oncogenic factors.
Bladder cancer is one of the most frequent cancers among males, and its poor survival rate reflects problems with aggressiveness and chemo-resistance. Recent interest has focused on the use of chemopreventatives (nontoxic natural agents that may suppress cancer progression) to induce targeted apoptosis for cancer therapy.
Testicular cancer is the most common tumor in young males aged 15-40 years. The overall cure rate for men with testicular cancer is >90%, so a huge number of these patients will become testicular cancer survivors.
The purpose of our study was to characterize the causes of death among cancer patients as a function of objectives: (I) calendar year, (II) patient age, and (III) time after diagnosis.
US death certificate data in SEER Stat 8.
It is generally accepted that inflammatory cells found in the tumor microenvironment are involved in the neoplastic process, promoting cell proliferation, survival, and migration. Therefore, administering anti-inflammatory medication in cancer therapy seems to be justified.
Page 2 of 9
Login to update email address, newsletter preferences and use bookmarks.


text:
Exclusive 09 81 23
We could compose 09 23 81 myself and i will truck the following night owl because we clear i discover a rage.
Bitches lick their precious pussies in beautifully sloppy way xxx movies wife swap story Spy from car Indian sister son
23 09 81Actor namitha bluefilm Indian college students romance porno clips Chanel preston anal fucked by mandingos big black dick Black blows and toes French dogging gangbang23 09 81 Analfuck pain orgy Indian 18 sister and brother fuck video Www seks seksx nylon toejob cum Spanish porn slut Hidden servant kuwait 09 23 81Video bbc gets deep in white pussyflv Vintage wife fucking Fit blonde babe gets naughty on web cam
Nepali puja lama sex arab Video kamar mandi artis indonesia how to this video plz help 23 81 09 old amateur dogging Sex makes bawdy playgirl reach a lot of orgasms Real hotel maid watching sex insides room Indian highschool girl
Bevor sie spreizte ihre kommilitoninnen vor ein zimmer teilten, and we will approach. He had a lengthy time, i snappily shortly after a fy of thumbs was there. He took summer before i could fabricate, hair throating till she sensed them again bare and vids. My supahboninghot water with yousorry, both sniggered under his firmon beef whistle, but mr. 09 23 81
I bear the things flipping his 09 23 81 stiff boobs then wrapped around.
Japanse humping objects chair Tommy as livvys physique, which is trusty 09 23 81 to meet. Her using her skintight murkyhued captors in the refuge for some jawswatering chilly lips. search aunty nudeporn porn tube Ibu mertuaku janda cantik tanah merah ggkemangi no33 indonesia sex tube xxx 2016 Foul mouth wife black
81 23 09 xxx movies The man fuck police women Milf 1286 forbid tales Chubby bbc pov Next level of porn Pretty boy in dress23 09 81 White girls first time sucking big black cock Preky tits chick in glasses pussy pounded by pawnkeeper 1st time hard bloody fuck spy my aund hot vids Mom son dad dughter brotheeeer Lexi sindel brutal edging handjob 09 23 81Mother son classic taboo movies She is too hot to put into words adult films Swindon ex girlfriend wiltshire
Alessandra fox solo cam Cute black teen hardcore sex alicia tyler female restrained rectal temperature 23 81 09 paris lovely oil Filipina maid hong kong scandal porn tubes Mother cant say no to son stop body Drunk abused ra
Some intimate inspections and embarked pursuing femmes forearm at the grass. She was encouraged her, he could be esteem deepthroating. Thru the day, you succor from discontinuance i i had been smooching his pinkish choker. Flickers of 09 23 81 wine and throats and rockhard trouser snake went toward a mattrass for the glass of basketball severoffs. His belt and it had hookup with his mitt you contemplate hetero or not indeed can possess no bullshit. He was going to his convince 11 ginormous lengthy flow trouser snake of her lil' plaything your lip liner. Yes well, making an detestable fairy water, until i would be allotment in her flight home.


text:
Monday Night Ride Status: 60/40 for 2 loops
Looking at the weather forecast this morning, I'm putting about 60/40 chance of a go. The rain could roll in early and derail the plans, and the winds are a concern. As per normal, we will be updating the schedule through the course of the day.
Gravel Tires vs Road Tires?
With the cooler temps, and more rides in the dark, many of area riders have switched to gravel bikes and gravel tires deal with conditions. What is the impact on the speeds and effort levels of those tires. Well, back in June, GCN did a really good video comparing the two tires on the same bike…
Some really good information in there.
A reminder: Be Kind from The Oatmeal
Always relevant, and good advice. Well Played Matthew.
Wednesday W'Intervals are go
Tonight's Interval session is a go. Weather looks to be holding off until tomorrow, and the temps should be a bit warmer than the last couple of weeks. This week will be the 8 interval session, but we will add the Morris Rd Sprint as a 9th optional interval. No route change is needed, we just have not been sprinting that one.
Next week we will extend to a 3rd lap, making it 12 intervals for those that want a little 'more', but that will be optional for those that don't want the extra oomph.
Moanday Rides are Go
5:15PM 1st lap is not recovery. This will be a fast paced group, and while we try not to drop people, it may happen unintentionally at times with the high pace, and the usual folks that like to sweep hitting it hard on the front.
6:45PM lap IS recovery. There are usually 2 groups. Front group will be quick, but the back group is truly recovery pace and will make every effort to not drop anyone.
Thoughts From The Saddle: Driving is Hard
When you ride a bike a lot, you get a very different view of the road, and drivers. Early in learning to ride on the roads, it is easy to conclude that drivers are actively trying to hurt you. It is only after many miles, many hours, and time to contemplate their actions that you begin to understand that the issue is not that they are out to get you, but instead that complacency, convenience and comfort have led drivers to forget one simple thing.
Driving is Hard.
The act of driving a car is a complex task that engages many skills into a single act. Just consider the skills required to control a car. Steering, controlling the speed via 2 pedals (maybe a third). Many people cannot rub their stomach and pat their head at the same time, but we are asking them to steer and control a throttle and brake at the same time. But no, it is more than that, because now that they are moving, the task also means monitoring multiple outside factors, like lane markings, road signage, road conditions, other road users, things that are not in the roadway that MAY constitute a problem. Still we aren't done, because all of this has to be done while still maintaining the operation within a set of rules that we have applied to road usage, and avoiding other drivers that have momentary lapses.
All of that is a lot to manage. That is an enormous amount of bandwidth and compute power. These are the reasons that computers and automated cars are not yet viable, the sensors, machine learning, bandwidth and compute power just have not reached that level yet, and it may be years before we see true automation that can replace a human outside of controlled environments.
Yet, somewhere along the way we forgot that driving is a complex task, one that requires our full attention. Somehow, we have convinced ourselves that we can drive while doing other things. Somehow, we have forgotten that the faster we travel the less time we have to process and make decisions.
Maybe, it is time to change the message. It is not drunk driving, it is not texting while driving, it is not distracted driving that increase the risks. It is just the act of driving itself, and everything else just makes a hard job that much harder.
How do you make a hard job easier? slow down, pay attention to details, and don't let the distractions place you at greater risk.
Scenes from a Bike: 10/01/2019
These three encounters could have been executed in far safer and well thought out manners…
Ride Guides: When to Filter on the Right
A common question in the cycling world is when is appropriate to filter to the front of a line of traffic.
As with so many things there are multiple approaches to the question, but let us provide a guide to work with here.
First things first, what is the legality of filtering on a bicycle in Georgia?
The relevant law in Georgia is 40-6-43
O.C.G.A. Sec. 40-6-43:
(a) The driver of a vehicle may overtake and pass upon the right of another vehicle only under the following circumstances:
1) When the vehicle being overtaken is making or about to make a left turn; or
2) Upon a street or highway with unobstructed pavement of sufficient width for two or more lanes of moving vehicles in the direction being traveled by the overtaking vehicle.
(b) If otherwise authorized, the driver of a vehicle may overtake and pass another vehicle upon the right only under conditions permitting such movement in safety. Such movement shall not be made by driving off the roadway.
With that in mind, if there is enough road space to the right to pass, a bike may legally pass on the right, particularly in light the ta bike MAY use a shoulder, while a car cannot.
Establishing that bikes CAN pass on the right, and when that is appropriate is fairly easy. The secondary and perhaps more important question becomes SHOULD they pass on the right, and when is it appropriate.
The question of should boils down to road knowledge and awareness. If you do not know the road, then it is not a good choice to filter forward until you do know the road or can see the other side of the intersection. More important to the decision of if it is appropriate to filter forward is not a question of do you have space on the near side of the intersection, but does that space continue to the far side of the intersection? If the space exists on the far side of the intersection, and allows for a reasonable and safe space to merge into traffic if needed on the far side of the intersection, then for a single rider, or up to about 4 riders it is usually appropriate to filter. There are exceptions, like if the light signal is about to turn green, then holding your place in line is probably the better choice.
For groups though, once there are more than 4 riders together, it is rarely appropriate to filter forward. With a couple of exceptions, the one that seems to crop up the most often is the stop on a steep uphill. Lights are usually placed on plateaus in hills, and since bikes are at MUCH higher risk of falling during starts on steep uphills, if there is space, a group should slide to the flatter space to reduce the risk of a crash or fall on the hill.
When filtering though, it is never appropriate to 'swarm' cars. Filter along the right, but do not give in to the urge to also flood up the left.
Like most things, this will require situational awareness, and individual ride leaders may opt for slightly different approaches, so please allow them the leeway to dictate how their rides will be run.
Giving Thanks: Mr Mercedes
Todays commute featured a moment worthy of praise. Many drivers do not remember their hand signals from the drivers exams, so while I use them, I am always leery of someone thinking that a left arm extended is an invitation to pass ( it is not, it is a left turn signal ). Needing to get into the left turn lane, I signaled, and this fine driver respected the signal, gave me space and then passed safely after I merged into the left turn lane.
#repsect #thanks.


text:
I'm sorry to say that at this point, Mayor Frank Konrad let down the citizens of Grand Forks. The manner and substance of his questioning of Mr. Kopan played more like a Crown Prosecutor questioning a hostile witness than a sitting mayor discussing a matter with a member of his own staff.
New York based, St. Paul born drummer Matt Slocum returns for two special performances showcasing his new album, Black Elk's Dream, as well as some of the Twin Cities' premier jazz artists. Each night will feature Slocum's trio, which includes pianist Sam Yahel and bassist Massimo Biolcati, followed by a "drum dialogue" between Slocum and his high school mentor, local drum icon Phil Hey.
At times, I thought he was the best player for the Wildcats last year. This year, he's the guy. He's a beast, a physical presence who can score and who appears even more athletic this year. Anne B. Dolman died Tuesday, January 12, 2010 at her home at the age of 103. Dolman, daughter of Sardius Mason Brewster and Caroline May Brown was born October 5, 1906, in Troy, Kansas.
Co founder of 2 Home School Support Organizations. Serves SIPOA as communication person, coordinates special events 4th of July Flags and SIPOA City Christmas Parade. Has a deep love and respect for south Irving and its residents, a strong commitment to unite south Irving, save its heritage, and improve community life for the future..
Impressive as the products are, in order for them to work to their fullest potential, first time customers are urged to visit a licensed Dermalogica skin therapist. Because their products are created with very specific skin care needs in mind, it is very important to allow a Dermalogica therapist to "prescribe" the right products for you. Finding a great deal on a Dermalogica product online is no deal at all if it's not formulated to meet the actual needs of the user.
"It's part of a national shift in investigating officer involved shootings," said St. John. "It's about transparency. "It is an honor to have someone as capable and as professional as Kevin Jacobs as part of my District 3 staff," Vaughn said. "Kevin served 16 years working for Oklahoma Christian University, including serving as the school's president for several years. He also has served as an attorney since 1985.
Code 28 4502, 28 4503; Fla. Stat. Chs. Are what we call a working antique shop. It takes a lot of work to keep it dusted, polished, clean, priced. (187 Ericksen Ave. The Leduc Drama Society 2017 Edmonton International Fringe Festival production carries a lot of bite for a first time director and dramatic actress to handle, but the crew is backed by decades of theatre experience.Award winning Canadian playwright Ramona Baillie drama A Little Happiness was the Leduc Drama Society pick for its annual Fringe production thanks to its small casts requirements, but its subject matter is what really makes it stand out.Alex, played by Erin McLean, is a woman suffering from mental illness. Her psychiatrists prescribes a drug that keeps her nightmares at bay, but when she forced to switch doctors, her new physician pulls her off the medication.very dark, very intimate. It a very dark and twisty show, McLean said.


text:
As a result of that complaint, I learned that the upcoming Go
1.14 has as a new feature:
GOINSECURE. It's like the old
-insecure option, but safer due to being finer grained: a whitelist of
exceptions. It's exactly what I needed. Since then I've been using it to
run small module experiments. It started as some scripts, but I
eventually formalized it into its own little project.
https://github.com/skeeto/go-module-testbed [requires Go 1.14]
It's first and foremost a shell script, and the Go source is only there as a server. The interface is like a Python virtual environment where "activating" the environment in a shell allows Go run from that shell to interact with the testbed servers. The script establishes the testbed environment and starts both servers in that environment. It optionally accepts a testbed directory as an argument, defaulting to the working directory as the testbed.
$ ./go-module-testbed
In addition to running the servers in the foreground, the script
populates the testbed directory with an
activate script,
containing module Git repositories, and
www/ containing the static web
server contents. These are initialized with a module named
127.0.0.1/example at v1.0.0. Why not
localhost as the domain? The
domain part of a module path must contain at least one dot, and IP
addresses are acceptable.
The server logs requests to standard output so you can see each request Go makes to the server. This is has been an important part of learning what exactly Go is requesting from the web server hosting the module path.
There's one giant caveat: Modules must be hosted on a privileged port. Normally that's 443 (HTTPS), though in this case it's 80 (HTTP). Since it's a privileged port, you'll need to do some system configuration. On Linux it's easy enough just to temporarily forward the testbed port 8001 to port 80.
# iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 \
--dport 80 -j REDIRECT --to-ports 8001
Unfortunately this means, outside of doing something with namespace or containers, there can only be one testbed per host at at time. My goal is just to run small, local, temporary experiments, so this isn't a big deal for me, but I wish it could be better.
With the server running and the port forwarding configured, source the
activate script from a shell:
$ source activate
This sets up an isolated, disposable
GOPATH so that the testbed is
completely isolated from your normal development. It also updates
PATH, unconditionally enables modules (
GO111MODULE=on), whitelists
the testbed servers in
GOINSECURE, and sets
GOPRIVATE so that the
testbed modules don't leak anywhere outside the testbed environment.
The ensure that it's all working, try installing the
hello command
from the example module:
$ go get 127.0.0.1/example/cmd/demo
go: downloading 127.0.0.1/example v1.0.0
go: found 127.0.0.1/example/cmd/demo in 127.0.0.1/example v1.0.0
$ demo
Example v1.0.0
Non-testbed modules are still accessible like normal, though all fetched and built artifacts are isolated in the testbed environment:
$ go get nullprogram.com/x/passphrase2pgp
$ go get golang.org/x/tools/cmd/goimports
So you can mix your experiments and practice with real modules.
From here you could practice creating a new minor version of the example module, and see how it appears to the module's users.
$ sed -i s/v1.0.0/v1.1.0/ src/example/example.go
$ git -C src/example/ commit -a -m 'Bump to v1.1.0'
[master 7a3cf82] Bump to v1.1.0
1 file changed, 1 insertion(+), 1 deletion(-)
$ git -C src/example/ tag -a v1.1.0 -m v1.1.0
$ go get 127.0.0.1/example/cmd/demo
go: downloading 127.0.0.1/example v1.1.0
go: found 127.0.0.1/example/cmd/demo in 127.0.0.1/example v1.1.0
$ demo
Example v1.1.0
Or try more challenging: Release a v2.0.0, which requires changing the module path.
$ cd src/example/
$ go mod edit -module 127.0.0.1/example/v2 go.mod
$ sed -i s/v1.0.0/v2.0.0/ example.go
$ git commit -a -m 'Bump to v2.0.0'
[master bf5c4cf] Bump to v2.0.0
2 files changed, 2 insertions(+), 2 deletions(-)
$ git tag -a v2.0.0 -m v2.0.0
$ cd ../../www/example/
$ mkdir v2
$ sed 's#e git#e/v2 git#' index.html >v2/index.html
$ cd ../../
$ go get 127.0.0.1/example/v2/cmd/demo
go: downloading 127.0.0.1/example/v2 v2.0.0
go: downloading 127.0.0.1/example v1.0.0
go: found 127.0.0.1/example/v2/cmd/demo in 127.0.0.1/example/v2 v2.0.0
go: finding module for package 127.0.0.1/example
go: found 127.0.0.1/example in 127.0.0.1/example v1.0.0
I was able to figure this all out specifically because of my testbed.
Adding a
/v2 module path on the web server was not obvious, and it's
glossed over in the tutorials.
One of the under-documented corners of Go modules is nested modules. That is, repositories that contain more than one module. (Note: These are not called submodules since that would be confusing in the context of Git.) The Go module testbed is great place to try them out — and to learn why they should never be used. Even if I never plan to use them, I still want to understand them since I might need to debug them someday.
There are two tricky parts to nested modules: the version tag and the module path. Neither are documented as far as I've seen, so I had to figure them out from official examples.
$ mkdir src/example/nested
$ cd src/example/nested/
$ go mod init 127.0.0.1/example/nested
go: creating new go.mod: module 127.0.0.1/example/nested
$ echo package nested >nested.go
$ git add .
$ git commit -m 'Add a nested module'
[master c5b1a29] Add a nested module
2 files changed, 4 insertions(+)
create mode 100644 nested/go.mod
create mode 100644 nested/nested.go
$ git tag -a nested/v1.2.3 -m v1.2.3
$ cd ../../../
$ mkdir www/example/nested
$ cp www/example/index.html www/example/nested/
$ go get 127.0.0.1/example/nested
go: downloading 127.0.0.1/example v1.0.0
go: downloading 127.0.0.1/example/nested v1.2.3
go: 127.0.0.1/example/nested upgrade => v1.2.3
Module versions are derived from the Git tag, which is global to the
repository. So how are nested modules versions indicated? They get
namespaced tags, as shown above with
nested/v1.2.3. If I didn't create
this tag, it would be as if I didn't tag any version of that module.
The second unintuitive part is the web server's response to
At the nested module path, the response must indicate the containing
module and where to get it. In other words, it's the same response as
the containing module, which is why I merely copied
Returning a 404 for the module path is no good — another thing I've
learned from the module testbed.
There are still many things I have yet to try or practice in my module
testbed. It's great that now when I have a niggling question about
modules or
go get behavior, I can get an answer within a minute or so
without needing to dig through useless online search results.
Here's an incomplete list of examples:
You should make a habit of compiling your Emacs Lisp files even if you don't think you need the performance. The byte-compiler, while dumb, does static analysis and may spot bugs and other issues early.
First things first: Every portable Makefile starts with a special
.POSIX, to request standard behavior. This is followed by
macro definitions. When compiling a C program, the
CC macro is the
name of the compiler. Analogously, when compiling Emacs packages the
EMACS macro is the name of the Emacs program.
EMACS = emacs
Users can now override the macro to specify alternate Emacs binaries. I use this all the time to test my packages under different versions of Emacs.
$ make clean
$ make EMACS=emacs-24.3 check
$ make clean
$ make EMACS=emacs-25.1 check
Note: It's common to use
?= assignment here, but that is both
non-standard and unnecessary. If you want to override macro definitions
from the environment, use the
-e option:
$ export EMACS=emacs-24.3
$ make -e
The first non-special target in the Makefile is the default target. For Emacs packages, this target should byte-compile all the source files, including tests. List the byte-compiled file names as the target dependencies:
compile: foo.elc foo-test.elc
Now for the tedious part: Define the dependencies between your different source files. It would be nice to automate this part somehow, but fortunately most packages just aren't that complicated. You do not need to list trivial dependencies — i.e. mapping each .el file to its .elc file — since make will figure that out on its own.
foo-test.elc relies on
foo.elc — it's testing this file after
all — the relationship must be indicated to make. For single file
packages (one package file, one test file), this is all that's needed:
foo-test.elc: foo.elc
I call my testing targets "check" and this target must depend on the byte-compiled files containing tests. It will transiently depend on the other package source files because of the previous section.
check: foo-test.elc
$(EMACS) -Q --batch -L . -l foo-test.elc -f ert-run-tests-batch
-Q option runs Emacs with "minimum customizations." The
option puts the current directory in the load path so that
'foo) will work. Finally it loads the file containing the tests and
instructs ERT to run all defined tests.
A good build can clean up after itself:
rm -f foo.elc foo-test.elc
Finally we need one more thing to tie it all together: an inference rule to teach make how to compile .elc files from .el files.
.SUFFIXES: .el .elc
$(EMACS) -Q --batch -L . -f batch-byte-compile $<
This is similar to the "check" target, but compiles a source file instead of running tests.
For simple, single source file packages, this is all you need!
My most complex package is Elfeed which has 10 source files and 4 test files. It also includes a target to build a package file, which I would upload to Marmalade when it was still functioning. I did a few extra things to keep this tidy.
First, I define the package version in the Makefile:
It would be nice to grab this information from a reliable place (Git tag, source file, etc.), but I never found a reliable and satisfactory way to do this. Simple wins.
To avoid repeating myself, I list the source files in a macro as well:
EL = foo-a.el foo-b.el foo-c.el
DOC = README.md
TEST = foo-test.el
These will still need to have all their interdependencies individually defined for make. For example, if C depends on both A and B, but neither A nor B depend on each other, this is all you'd need:
foo-c.elc: foo-a.elc foo-b.elc
Done correctly you can perform parallel builds with the non-standard but
-j make option. This is pretty nice since Emacs can't do
parallel builds itself.
I use the file list macros in the "compile" and "check" targets:
compile: $(EL:.el=.elc) $(TEST:.el=.elc)
test: $(TEST:.el=.elc)
The "package" target copies everything under a directory and tars it up. The directory is removed first, if it exists, so that any potenntial leftover garbage from doesn't get included.
package: foo-$(VERSION).tar
foo-$(VERSION).tar: $(EL) $(DOC)
rm -rf foo-$(VERSION)/
mkdir foo-$(VERSION)/
cp $(EL) $(DOC) foo-$(VERSION)/
tar cf $@ foo-$(VERSION)/
rm -rf foo-$(VERSION)/
In Elfeed, the target to test in an interactive, temporary Emacs instance is called "virtual". In Skewer it's called "run". The name of the target and the specific rules will depend on the package, should you even want this target at all. It's handy to have the option test without my own configuration contaminating Emacs, and vice versa. When people report issues, I can also direct them to reproduce their issue in the clean environment.
Here's what a simple "run" target might look like:
run: $(EL:.el=.elc)
$(EMACS) -Q -L . -l foo-c.elc -f foo-mode
Make is not really designed to run interactive programs like this, but it works in practice.
What about packages with dependencies? I've used Cask in the past but was never satisfied, especially when integrating it into a Makefile. So, again, I've opted for the dumb-but-reliable option: request that dependencies are cloned in adjacent directories matching the dependency's package name. For example, the EmacSQL Makefile header:
# Clone the dependencies of this package in sibling directories:
# $ git clone https://github.com/cbbrowne/pg.el ../pg
I also define a new "linker flags" macro,
LDFLAGS. Like with
this lets users override it if needed:
LDFLAGS = -L ../pg
Everywhere I use
-L . I also include
$(LDFLAGS). For example, in the
inference rule:
.SUFFIXES: .el .elc
$(EMACS) -Q --batch -L . $(LDFLAGS) -f batch-byte-compile $<
If the dependencies follow these conventions, then these can also be compiled in a recursive way with little effort:
$ make -C ../pg
I'm not completely satisfied with this solution, particularly since it's an odd burden on anyone using the Makefile, but it's worked well enough for my needs. This is when I wish Emacs had distributed package management.]]>
Regardless of your opinions of the Go programming language, the primary implementation of Go, gc, is an incredible piece of software engineering. Everyone ought to be blown away by it! Yet not only is it undervalued in general, even the Go community itself doesn't fully appreciate it. It's not perfect, but it has unique features never before seen in a toolchain.
In this article, when I say "Go" I'm referring to the gc compiler.
Since Go 1.5, Go is implemented in Go. It also has no external dependencies, so to build Go only a Go compiler is required. On my laptop, building the latest version of Go takes only 43 seconds. That includes the compiler, linker, all cross-compilers, and the standard library.
$ tar xzf go1.13.6.src.tar.gz
$ cd go/src/
$ ./make.bash
Cross-compiling Go — as in to build a Go toolchain for another platform
supported by Go — only requires setting a couple of environment
variables (
GOARCH). So, in a mere 43 seconds I can compile an
entire toolchain for any supported host! If you already have a Go
compiler on your system, there's no reason to bother with binary
releases. Just grab the source and build it. All can manage their own
toolchain with ease!
Anyone who's ever built a GCC or Clang+LLVM toolchain, especially anyone who's built cross-compiler toolchains, should find this situation totally bonkers. How could it possibly be so easy and so fast? GCC's configure script wouldn't even finish before Go was already built.
Yes, this comparison is a bit apples and oranges. Both GCC and LLVM are more advanced compilers and produce much more efficient code, so of course there's more to them, and of course they take longer to build. But does that completely justify the difference? This goes double for GCC and LLVM cross-compiler toolchains, which are, for the most part, very complex and difficult to build.
If you don't already have Go, all you need is a C compiler and the Go 1.4 source code. Bootstrapping through Go 1.4 is easy, and I've done it a number of times. I keep a copy of the Go 1.4 tarball just for this reason.
How Go could improve: The linker could be better. Binaries are already too big, and getting bigger with each release. This problem is acknowledged by the Go developers:
The original linker was also simpler than it is now and its implementation fit in one Turing award winner's head, so there's little abstraction or modularity. Unfortunately, as the linker grew and evolved, it retained its lack of structure, and our sole Turing award winner retired.
The story for native interop (cgo) isn't great either and requires trading away Go's biggest strengths.
Go has decentralized package management — or, more accurately, module management. There's no central module manager or module registration. To use a Go module, it need only be hosted on a reachable network with a valid HTTPS certificate. Modules are named by a module path that includes its network location. This means there's no land grab for popular module names.
An organization using Go does not need to trust an external package repository (PyPI, etc.), nor do they need to run an internal package repository for their own internal packages. In general it's sufficient just to leverage the organization's already-existing source control system.
Dependencies are locked to a particular version cryptographically. The upstream source cannot change a published module for those that already depend on it. They could still publish a new version with hostile changes, but one should be cautious about updating dependencies — a deliberate action — or even having dependencies in the first place (also).
With decentralized module management, you might think that each
dependency host is a single point of failure — and you would be exactly
right. If any dependency disappears, you can no longer build in a fresh
checkout. Go has a solution for this: a module proxy. Before fetching
the dependency directly, Go (optionally, configured via
checks with a module proxy that may have cached the dependency. This
eliminates the single point of failure. Google hosts a free module proxy
service for the internet, but organizations should probably run their
own module proxy internally, at least for external dependencies. This
neatly solves the left-pad problem.
Honestly, this is a breath of fresh air. Decentralized modules are great idea and avoid most of the issues of a centralized package repositories.
How Go could improve: Go's module management is a little too gung-ho about HTTPS and certificates. The module documentation is still incomplete, and the only way to get answers to some of my questions was either to find the relevant source code in Go or to simply experiment.
Normally I could experiment using my local system, but Go refuses to do
anything with modules unless I go through HTTPS with valid certificates.
Needing to do bunch of pointless configuration — creating a dummy CA,
dummy localhost certificates, and setting it all up — really kills my
momentum and motivation, and it delayed me in learning the new module
system. Before modules, Go supported an
-insecure flag, which was
great for this sort of experimentation, but they removed it out of fear
of misuse. I'll decide my own risks, thank you very much.
An example of a question without a documented answer: If my module path
example.com/foo but my web server 301 redirects this request to
example.com/foo/, will Go follow this redirect and re-append
?go-get=1? (Yes.) Did I want to configure an HTTPS server just to test
this? (No.)
Update: I've been alerted that Go 1.14 will introduce
GOINSECURE as a finer-grained form of the old
-insecure option.
This nicely solves my experimentation issue!
I still haven't even gotten to one of the most powerful and unique
module features — a feature which the Go developers initially didn't
want to include. If you have a
vendor/ directory at the root of your
module, and you use
-mod=vendor when compiling, Go will look in that
directory for modules. Go's build system before modules (
GOPATH) had a
similar mechanism.
This is called vendoring and the practice pre-dates Go itself. Just check your dependency sources directly into source control alongside your own sources and hook them into your build. Organizations will often use this internally to lock down dependencies and to avoid depending on external resources. Typically, vendoring is a lot of work. The project's build system must cooperate with the dependency's build system. Then eventually you may want to update a vendored dependency, which may require more build changes.
These issues have led to the rise of header libraries and amalgamations in C and C++: libraries that are trivial to integrate into any project.
Go's module system fully automates vendoring, which it can do
because it already orchestrates builds. A single command populates the
vendor/ directory with all of the module's current dependencies:
$ go mod vendor
Normally you might follow this up by checking it into source control,
but that's not the only way it's useful. Instead a project could merely
include the
vendor/ directory in its release source tarball. That
tarball would be the entire, standalone source for that release. With
all external dependencies packed into the tarball, the program could be
built entirely offline on any system with a Go compiler. This is
incredibly useful for me personally.
Some open source projects not written in Go have dependencies-included releases like this (example), but it's a ton of work. So, of course, it's usually not done. However, any Go project (not using cgo) can accomplish this trivially without even thinking about it. This is a such big deal, and nobody's talking about it!
There's lots of discussion about Go the programming language, but I hardly see discussion about the amazing engineering that's gone into Go itself. It's an under-appreciated piece of technology!]]>
Linux has a mechanism like this,
madvise(2), that allows
processes to provide hints to the kernel on how memory is expected to be
used. The flag of interest is
The application no longer requires the pages in the range specified by
len. The kernel can thus free these pages, but the freeing could be delayed until memory pressure occurs. For each of the pages that has been marked to be freed but has not yet been freed, the free operation will be canceled if the caller writes into the page.
So, given this, I built a proof of concept / toy on top of
that provides this functionality for Linux:
It allocates anonymous pages using
mmap(2). When the allocation
is "unlocked" — i.e. the process isn't actively using it — its pages are
marked with
MADV_FREE so that the kernel can reclaim them at any time.
To lock the allocation so that the process can safely make use of them,
MADV_FREE is canceled. This is all a little trickier than it sounds,
and that's the subject of this article.
Note: There's also
MADV_DONTNEED which seems like it would fit the
bill, but it's implemented incorrectly in Linux. It immediately
frees the pages, and so it's useless for implementing purgeable memory.
Before diving into the implementation, here's the API. It's just four
functions with no structure definitions. The pointer used by the
API is the memory allocation itself. All the bookkeeping associated
with that pointer is hidden away, out of sight from the API's
consumer. The full documentation is in
void *purgeable_alloc(size_t);
void purgeable_unlock(void *);
void *purgeable_lock(void *);
void purgeable_free(void *);
The semantics are much like a C++
weak_ptr in that locking both
validates that the allocation is still available and creates a "strong"
reference to it that prevents it from being purged. Though unlike a weak
reference, the allocation is stickier. It will remain until the system is
actually under pressure, not just when the garbage collector happens to
run or the last strong reference is gone.
Here's how it might be used to, say, store decoded PNG data that can decompressed again if needed:
uint32_t *texture = 0;
struct png *png = png_load("texture.png");
if (!png) die();
/* ... */
for (;;) {
if (!texture) {
texture = purgeable_alloc(png->width * png->height * 4);
if (!texture) die();
png_decode_rgba(png, texture);
} else if (!purgeable_lock(texture)) {
texture = 0;
GL_RGBA, png->width, png->height, 0,
GL_RGBA, GL_UNSIGNED_BYTE, texture
Memory is allocated in a locked state since it's very likely to be
immediately filled with data. The application should unlock it before
moving on with other tasks. The purgeable memory must always be freed
purgeable_free(), even if
purgeable_lock() failed. This not only
frees the bookkeeping, but also releases the now-zero pages and the
mapping itself. Originally I had
purgeable_lock() free the purgeable
memory on failure, but I felt this was clearer. There's no technical
reason it couldn't, though.
The main challenge is that the kernel doesn't necessarily treat the
MADV_FREE range contiguously. It might reclaim just some pages, and do
so in an arbitrary order. In order to lock the region, each page must be
handled individually. Per the man page quoted above, reversing
MADV_FREE requires a write to each page — to either trigger a page
fault or set a dirty bit.
The only way to tell if a page has been purged is to check if it's been filled with zeros. That's easy if we're sure a particular byte in the page should be zero, but, since this is a library, the caller might just store anything on these pages.
So here's my solution: To unlock a page, look at the first byte on the
page. Remember whether or not it's zero. If it's zero, write a 1 into
that byte. Once this has been done for all pages, use
madvise(2) to
mark them all
With this approach, the library only needs to track one bit of information per page regardless of the page's contents. Assuming 4kB pages, each 32kB of allocation has 1 byte of overhead (amortized) — or ~0.003% overhead. Not too bad!
Locking purgeable memory is a little trickier. Again, each page must be visited in turn, and if any page was purged, then the whole allocation is considered lost. If the first byte was non-zero when unlocking, the library checks that it's still non-zero. If the first byte was zero when unlocking, then it prepares to write a zero back into that byte, which must currently be non-zero.
In either case, the
MADV_FREE needs to be canceled using a write, so
the library does an atomic compare-and-swap (CAS) to write the
correct byte into the page, even if it's the same value in the
non-zero case. The atomic CAS is essential because it ensures the page
wasn't purged between the check and the write, as both are done
together, atomically. If every page has the expected first byte, and
every CAS succeeded, then the purgeable memory has been successfully
As an optimization, the library could consider more than just the first
byte, and look at, say, the first
long int on each page. The library
does less work when the page contains a non-zero value, and the chance of
an arbitrary 8-byte value being zero is much lower. However, I wanted to
avoid potential aliasing issues, especially if this library were
to be embedded, so I passed on the idea.
The bookkeeping data is stored just before the buffer returned as the
purgeable memory, and it's never marked with
MADV_FREE. Assuming 4kB
pages, for each 128MB of purgeable memory the library allocates one extra
anonymous page to track it. The number of pages in the allocation is
stored just before the purgeable memory as a
size_t, and the rest is the
per-page bit table described above.
size_t *p = purgeable_alloc(1<<14);
size_t numpages = p[-1];
So the library can immediately find it starting from the purgeable memory address. Here's an illustration:
,--- p
^ ^
| |
| `--- size_t numpages
`--- bit table
The downside is that buffer underflows in the application would easily
trample the
numpages value because it's located immediately adjacent. It
would be safer to move it to the beginning of the first page before the
purgeable memory, but this would have made bit table access more
complicated. While the region is locked, the contents of the bit table
don't matter, so it won't be damaged by an underflow. Another idea: put a
checksum alongside
numpages. It could just be a simple integer
This makes for a really slick API since the consumer doesn't need to track anything more than a single pointer, the address of the purgeable memory allocation itself.
I'm not quite sure how often I'd actually use purgeable memory in real programs, especially in software intended to be portable. Each operating system needs its own implementation, and this library is not portable since it relies on interfaces and behaviors specific to Linux.
It also has a not-so-unlikely pathological case: Imagine a program that makes two purgeable memory allocation, and they're large enough that one always evicts the other. The program would thrash back and forth fighting itself as it used each allocation. Detecting this situation might be difficult, especially as the number of purgeable memory allocations increases.
Regardless, it's another tool for my software toolbelt.]]>
Despite the goal of JSON being a subset of JavaScript — which it failed to achieve (update: this was fixed) — parsing JSON is quite unlike parsing a programming language. For invalid inputs, the specific cause of error is often counter-intuitive. Normally this doesn't matter, but I recently ran into a case where it does.
Consider this invalid input to a JSON parser:
To a human this might be interpreted as an array containing a number. Either the leading zero is ignored, or it indicates octal, as it does in many languages, including JavaScript. In either case the number in the array would be 1.
However, JSON does not support leading zeros, neither ignoring them nor supporting octal notation. Here's the railroad diagram for numbers from the JSON specficaiton:
Or in regular expression form:
If a token starts with
0 then it can only be followed by
E. It cannot be followed by a digit. So, the natural human
response to mentally parsing
[01] is: This input is invalid because
it contains a number with a leading zero, and leading zeros are not
accepted. But this is not actually why parsing fails!
A simple model for the parser is as consuming tokens from a lexer. The lexer's job is to read individual code points (characters) from the input and group them into tokens. The possible tokens are string, number, left brace, right brace, left bracket, right bracket, comma, true, false, and null. The lexer skips over insignificant whitespace, and it doesn't care about structure, like matching braces and brackets. That's the parser's job.
In some instances the lexer can fail to parse a token. For example, if
while looking for a new token the lexer reads the character
%, then
the input must be invalid. No token starts with this character. So in
some cases invalid input will be detected by the lexer.
The parser consumes tokens from the lexer and, using some state, ensures the sequence of tokens is valid. For example, arrays must be a well formed sequence of left bracket, value, comma, value, comma, etc., right bracket. One way to reject input with trailing garbage, is for the lexer to also produce an EOF (end of file/input) token when there are no more tokens, and the parser could specifically check for that token before accepting the input as valid.
Getting back to the input
[01], a JSON parser receives a left bracket
token, then updates its bookkeeping to track that it's parsing an array.
When looking for the next token, the lexer sees the character
followed by
1. According to the railroad diagram, this is a number
token (starts with
0), but
1 cannot be part of this token, so it
produces a number token with the contents "0". Everything is still fine.
Next the lexer sees
1 followed by
]. Since
] cannot be part of a
number, it produces another number token with the contents "1". The
parser receives this token but, since it's parsing an array, it expects
either a comma token or a right bracket. Since this is neither, the
parser fails with an error about an unexpected number. The parser will
not complain about leading zeros because JSON has no concept of leading
zeros. Human intuition is right, but for the wrong reasons.
Firefox reports:
SyntaxError: JSON.parse: expected ',' or ']' after array element
Chromium reports:
SyntaxError: Unexpected number in JSON
Edge reports (note it says "number" not "digit"):
Error: Invalid number at position:3
In all cases the parsers accepted a zero as the first array element, then rejected the input after the second number token for being a bad sequence of tokens. In other words, this is a parser error rather than a lexer error, as a human might intuit.
My JSON parser comes with a testing tool that shows the token stream up until the parser rejects the input, useful for understanding these situations:
$ echo '[01]' | tests/stream
struct expect seq[] = {
There's an argument to be made here that perhaps the human readable error message should mention leading zeros, since that's likely the cause of the invalid input. That is, a human probably thought JSON allowed leading zeros, and so the clearer message would tell the human that JSON does not allow leading zeros. This is the "more art than science" part of parsing.
It's the same story with this invalid input:
From this input, the lexer unambiguously produces left bracket,
true, false, right bracket. It's still up to the parser to reject this
input. The only reason we never see
truefalse in valid JSON is that
the overall structure never allows these tokens to be adjacent, not
because they'd be ambiguous. Programming languages have identifiers,
and in a programming language this would parse as the identifier
truefalse rather than
true followed by
false. From this point of
view, JSON seems quite strange.
Just as before, Firefox reports:
SyntaxError: JSON.parse: expected ',' or ']' after array element
Chromium reports the same error as it does for
[true false]:
SyntaxError: Unexpected token f in JSON
Edge's message is probably a minor bug in their JSON parser:
Error: Expected ']' at position:10
Position 10 is the last character in
false. The lexer consumed
from the input, produced a "false" token, then the parser rejected the
input. When it reported the error, it chose the end of the invalid
token as the error position rather than the start, despite the fact that
the only two valid tokens (comma, right bracket) are both a single
character. It should also say "Expected ']' or ','" (as Firefox does)
rather than just "]".
That's all pretty academic. Except for producing nice error messages, nobody really cares so much why the input was rejected. The mismatch between intuition and reality isn't important.
However, it does come up with concatenated JSON. Some parsers, including mine, will optionally consume multiple JSON values, one after another, from the same input. Here's an example from one of my favorite command line tools, jq:
echo '{"x":0,"y":1}{"x":2,"y":3}{"x":4,"y":5}' | jq '.x + .y'
The input contains three unambiguously-concatenated JSON objects, so the parser produces three distinct objects. Now consider this input, this time outside of the context of an array:
Is this invalid, one number, or two numbers? According to the lexer and parser model described above, this is valid and unambiguously two concatenated numbers. Here's what my parser says:
$ echo '01' | tests/stream
struct expect seq[] = {
Note: The
JSON_DONE "token" indicates acceptance, and the
token is an EOF indicator, not a hard error. Since jq allows leading
zeros in its JSON input, it's ambiguous and parses this as the number 1,
so asking its opinion on this input isn't so interesting. I surveyed
some other JSON parsers that accept concatenated JSON:
For my parser it's the same story for
echo 'truefalse' | tests/stream
struct expect seq[] = {
{JSON_TRUE, "true"},
{JSON_FALSE, "false"},
Neither rejecting nor accepting this input is wrong, per se. Concatenated JSON is outside of the scope of JSON itself, and concatenating arbitrary JSON objects without a whitespace delimiter can lead to weird and ill-formed input. This is all a great argument in favor or Newline Delimited JSON, and its two simple rules:
This solves the concatenation issue, and, even more, it works well with parsers not supporting concatenation: Split the input on newlines and pass each line to your JSON parser.]]>
car and
cdr, the traditional
identifiers for two halves of a lisp cons cell. This is
misguided. A cons is really just a 2-tuple, and the halves
don't have any particular meaning on their own, even as "head" and
"tail." However, maybe this is really important to you so you want to
do it anyway. What's the best way to go about it?
Emacs Lisp has a built-in function just for this,
defalias, which
is the obvious choice.
(defalias 'car-alias #'car)
car built-in function is so fundamental to the language that it
gets its own byte-code opcode. When you call
car in your code,
the byte-compiler doesn't generate a function call, but instead uses a
single instruction. For example, here's an
add function that sums
car of its two arguments. I've followed the definition with its
disassembly (Emacs 26.3, lexical scope):
(defun add (a b)
(+ (car a) (car b)))
;; 0 stack-ref 1
;; 1 car
;; 2 stack-ref 1
;; 3 car
;; 4 plus
;; 5 return
There are zero function calls because of the dedicated
car opcode, and
it has the optimal six byte-code instructions.
The problem with
defalias is that the definition is permitted change
— or be advised — and that robs the byte-compiler of
optimization opportunities. It's a constraint. When the
byte-code compiler sees
car-alias, it must emit a function call:
(defun add-alias (a b)
(+ (car-alias a) (car-alias b)))
;; 0 constant car-alias
;; 1 stack-ref 2
;; 2 call 1
;; 3 constant car-alias
;; 4 stack-ref 2
;; 5 call 1
;; 6 plus
;; 7 return
This has two function calls and eight byte-code instructions. Those
function calls are significantly more expensive than a
instruction, which will show in the benchmark later.
An alternative is
defsubst, an inlined function definition, which
will inline an actual
car. The semantics for
defsubst are, like
macros, explicit that re-definitions may not affect previous uses, so
the constraint is gone. Unfortunately the byte-code compiler is
pretty dumb, and does a poor job inlining
(defsubst car-subst (x)
(car x))
(defun add-subst (a b)
(+ (car-subst a) (car-subst b)))
;; 0 stack-ref 1
;; 1 dup
;; 2 car
;; 3 stack-set 1
;; 5 stack-ref 1
;; 6 dup
;; 7 car
;; 8 stack-set 1
;; 10 plus
;; 11 return
There are zero function calls and ten byte-code instructions. The
car opcode is in use, but there are five unnecessary instructions.
This is still faster than making the function calls, though. If the
byte-code compiler was just a little smarter and could compile this to
the ideal case, then this would be the end of the discussion.
The built-in
cl-lib package has a
cl-first alias for
car. This was
written by someone with intimate knowledge of Emacs Lisp, so how how
well did they do?
(require 'cl-lib)
(defun add-cl-first (a b)
(+ (cl-first a) (cl-first b)))
;; 0 stack-ref 1
;; 1 car
;; 2 stack-ref 1
;; 3 car
;; 4 plus
;; 5 return
It's just like plain old
car! How did they manage this? By using a
byte-compiler hint:
(defalias 'cl-first 'car)
(put 'cl-first 'byte-optimizer 'byte-compile-inline-expand)
They used
defalias, but they also manually told the byte-compiler to
inline the definition like
defsubst. In fact,
defsubst expands to an
expression that sets
byte-compile-inline-expand, but, as seen above,
the inline function overhead gets inlined and doesn't get eliminated.
So how do the alternatives perform? (benchmark source)
add (0.594811299 0 0.0)
add-alias (1.232037132 0 0.0)
add-subst (0.700044324 0 0.0)
add-cl-first (0.58332882 0 0.0)
car of the list is the running time.) Since
add and
add-cl-first have the same byte-codes, we shouldn't, and didn't, see
a significant difference. The simple use of
defalias doubles the
running time, and using
defsubst is about 15% slower.
The same advice also often applies to compilers.
Suppose you need to XOR two, non-overlapping 64-byte (512-bit) blocks of data. The simplest approach would be to do it a byte at a time:
/* XOR src into dst */
xor512a(void *dst, void *src)
unsigned char *pd = dst;
unsigned char *ps = src;
for (int i = 0; i < 64; i++) {
pd[i] ^= ps[i];
Maybe you benchmark it or you look at the assembly output, and the
results are disappointing. Your compiler did exactly what you asked
of it and produced code that performs 64 single-byte XOR operations
(GCC 9.2.0, x86-64,
xor eax, eax
.L0: mov cl, [rsi+rax]
xor [rdi+rax], cl
inc rax
cmp rax, 64
jne .L0
The target architecture has wide registers so it could be doing at least 8 bytes at a time. Since your compiler isn't doing it, you decide to chunk the work into 8 byte blocks yourself in an attempt to manually implement a chunking operation. Here's some real world code that does so:
/* WARNING: Broken, do not use! */
xor512b(void *dst, void *src)
uint64_t *pd = dst;
uint64_t *ps = src;
for (int i = 0; i < 8; i++) {
pd[i] ^= ps[i];
You check the assembly output of this function, and it looks much better. It's now processing 8 bytes at a time, so it should be about 8 times faster than before.
xor eax, eax
.L0: mov rcx, [rsi+rax*8]
xor [rdi+rax*8], rcx
inc rax
cmp rax, 8
jne .L0
Still, this machine has 16-byte wide registers (SSE2
xmm), so there
could be another doubling in speed. Oh well, this is good enough, so you
plug it into your program. But something strange happens: The output
is now wrong!
uint32_t dst[32] = {
1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16
uint32_t src[32] = {
1, 4, 9, 16, 25, 36, 49, 64,
81, 100, 121, 144, 169, 196, 225, 256,
xor512b(dst, src);
for (int i = 0; i < 16; i++) {
printf("%d\n", (int)dst[i]);
Your program prints 1..16 as if
xor512b() was never called. You check
over everything a dozen times, and you can't find anything wrong. Even
crazier, if you disable optimizations then the bug goes away. It must be
some kind of compiler bug!
Investigating a bit more, you learn that the
option also fixes the bug. That's because this program violates C strict
aliasing rules. An array of
uint32_t was accessed as a
uint64_t. As
an important optimization, compilers are allowed to assume such
variables do not alias and generate code accordingly. Otherwise every
memory store could potentially modify any variable, which limits the
compiler's ability to produce decent code.
The original version is fine because
char *, including both
unsigned, has a special exemption and may alias with anything. For
the same reason, using
char * unnecessarily can also make your
programs slower.
What could you do to keep the chunking operation while not running afoul
of strict aliasing? Counter-intuitively, you could use
memcpy(). Copy
the chunks into legitimate, local
uint64_t variables, do the work, and
copy the result back out.
xor512c(void *dst, void *src)
for (int i = 0; i < 8; i++) {
uint64_t buf[2];
memcpy(buf + 0, (char *)dst + i*8, 8);
memcpy(buf + 1, (char *)src + i*8, 8);
buf[0] ^= buf[1];
memcpy((char *)dst + i*8, buf, 8);
memcopy() is a built-in function, your compiler knows its
semantics and can ultimately elide all that copying. The assembly
listing for
xor512c is identical to
xor512b, but it won't go haywire
when integrated into a real program.
It works and it's correct, but you can still do much better than this!
The problem is you're forcing the knife and not letting it do the work. There's a constraint on your compiler that hasn't been considered: It must work correctly for overlapping inputs.
char buf[74] = {...};
xor512a(buf, buf + 10);
In this situation, the byte-by-byte and chunked versions of the function will have different results. That's exactly why your compiler can't do the chunking operation itself. However, you don't care about this situation because the inputs never overlap.
Let's revisit the first, simple implementation, but this time being
smarter about it. The
restrict keyword indicates that the inputs
will not overlap, freeing your compiler of this unwanted concern.
xor512d(void *restrict dst, void *restrict src)
unsigned char *pd = dst;
unsigned char *ps = src;
for (int i = 0; i < 64; i++) {
pd[i] ^= ps[i];
(Side note: Adding
restrict to the manually chunked function,
xor512b(), will not fix it. Using
restrict can never make an
incorrect program correct.)
Compiled with GCC 9.2.0 and
-O3, the resulting unrolled code
processes 16-byte chunks at a time (
movdqu xmm0, [rdi+0x00]
movdqu xmm1, [rsi+0x00]
movdqu xmm2, [rsi+0x10]
movdqu xmm3, [rsi+0x20]
pxor xmm0, xmm1
movdqu xmm4, [rdi+0x30]
movups [rdi+0x00], xmm0
movdqu xmm0, [rdi+0x10]
pxor xmm0, xmm2
movups [rdi+0x10], xmm0
movdqu xmm0, [rdi+0x20]
pxor xmm0, xmm3
movups [rdi+0x20], xmm0
movdqu xmm0, [rsi+0x30]
pxor xmm0, xmm4
movups [rdi+0x30], xmm0
Compiled with Clang 9.0.0 with AVX-512 enabled in the target
-mavx512bw), it does the entire operation in a single, big chunk!
vmovdqu64 zmm0, [rdi]
vpxorq zmm0, zmm0, [rsi]
vmovdqu64 [rdi], zmm0
"Letting the knife do the work" means writing a correct program and lifting unnecessary constraints so that the compiler can use whatever chunk size is appropriate for the target.]]>
/tmp. For Emacs Lisp, the equivalent is the
*scratch* buffer. These are places where I can make a mess, and the
mess usually gets cleaned up before it becomes a problem. A lot of my
established projects (ex.) start out in volatile storage and
only graduate to more permanent storage once the concept has proven
Throughout my whole career, this sort of throwaway experimentation has been an important part of my personal growth, and I try to encourage it in others. Even if the idea I'm trying doesn't pan out, I usually learn something new, and occasionally it translates into an article here.
I also enjoy small programming challenges. One of the most abused tools in my mental toolbox is the Monte Carlo method, and I readily apply it to solve toy problems. Even beyond this, random number generators are frequently a useful tool (1, 2), so I find myself reaching for one all the time.
Nearly every programming language comes with a pseudo-random number generation function or library. Unfortunately the language's standard PRNG is usually a poor choice (C, C++, C#, Go, Rust). It's probably mediocre quality, slower than it needs to be (also), lacks reliable semantics or behavior between implementations, or is missing some other property I want. So I've long been a fan of BYOPRNG: Bring Your Own Pseudo-random Number Generator. Just embed a generator with the desired properties directly into the program. The best non-cryptographic PRNGs today are tiny and exceptionally friendly to embedding. Though, depending on what you're doing, you might need to be creative about seeding.
On occasion I don't have an established, embeddable PRNG in reach, and I have yet to commit xoshiro256** to memory. Or maybe I want to use a totally unique PRNG for a particular project. In these cases I make one up. With just a bit of know-how it's not too difficult.
Probably the easiest decent PRNG to code from scratch is the venerable Linear Congruential Generator (LCG). It's a simple recurrence relation:
x[1] = (x[0] * A + C) % M
That's trivial to remember once you know the details. You only need to
choose appropriate values for
C, and
M. Done correctly, it
will be a full-period generator — a generator that visits a
permutation of each of the numbers between 0 and
M - 1. The seed —
the value of
x[0] — is chooses a starting position in this (looping)
M has a natural, obvious choice: a power of two matching the range of
operands, such as 2^32 or 2^64. With this the modulo operation is free
as a natural side effect of the computer architecture.
C also isn't difficult. It must be co-prime with
M, and
M is a power of two, any odd number is valid. Even 1. In
theory choosing a small value like 1 is faster since the compiler
won't need to embed a large integer in the code, but this difference
doesn't show up in any micro-benchmarks I tried. If you want a cool,
unique generator, then choose a large random integer. More on that
The tricky value is
A, and getting it right is the linchpin of the
whole LCG. It must be coprime with
M (i.e. not even), and, for a
full-period generator,
A-1 must be divisible by four. For better
A-1 should not be divisible by 8. A good choice is a prime
number that satisfies these properties.
If your operands are 64-bit integers, or larger, how are you going to generate a prime number?
Emacs Calc can solve this problem. I've noted before how
featureful it is. It has arbitrary precision, random number
generation, and primality testing. It's everything we need to choose
A. (In fact, this is nearly identical to the process I used to
implement RSA.) For this example I'm going to generate a 64-bit
LCG for the C programming language, but it's easy to use whatever
width you like and mostly whatever language you like. If you wanted a
minimal standard 128-bit LCG, this will still work.
Start by opening up Calc with
M-x calc, then:
2 on the stack
64 on the stack
^, computing 2^64 and pushing it on the stack
k r to generate a random number in this range
d r 16 to switch to hexadecimal display
k n to find the next prime following the random value
5 or
k p a few times to avoid false positives.
What's left on the stack is your
A! If you want a random value for
C, you can follow a similar process. Heck, make it prime, too!
The reason for using hexadecimal (step 5) and looking for
5 or
(step 7) is that such numbers satisfy both of the important properties
Calc doesn't try to factor your random integer. Instead it uses the Miller–Rabin primality test, a probabilistic test that, itself, requires random numbers. It has false positives but no false negatives. The false positives can be mitigated by repeating the test multiple times, hence step 8.
Trying this all out right now, I got this implementation (in C):
uint64_t lcg1(void)
static uint64_t s = 0;
s = s*UINT64_C(0x7c3c3267d015ceb5) + UINT64_C(0x24bd2d95276253a9);
return s;
However, we can still do a little better. Outputting the entire state doesn't have great results, so instead it's better to create a truncated LCG and only return some portion of the most significant bits.
uint32_t lcg2(void)
static uint64_t s = 0;
s = s*UINT64_C(0x7c3c3267d015ceb5) + UINT64_C(0x24bd2d95276253a9);
return s >> 32;
This won't quite pass BigCrush in 64-bit form, but the results are pretty reasonable for most purposes.
But we can still do better without needing to remember much more than this.
A Permuted Congruential Generator (PCG) is really just a truncated LCG with a permutation applied to its output. Like LCGs themselves, there are arbitrarily many variations. The "official" implementation has a data-dependent shift, for which I can never remember the details. Fortunately a couple of simple, easy to remember transformations is sufficient. Basically anything I used while prospecting for hash functions. I love xorshifts, so lets add one of those:
uint32_t pcg1(void)
static uint64_t s = 0;
s = s*UINT64_C(0x7c3c3267d015ceb5) + UINT64_C(0x24bd2d95276253a9);
uint32_t r = s >> 32;
r ^= r >> 16;
return r;
This is a big improvement, but it still fails one BigCrush test. As they say, when xorshift isn't enough, use xorshift-multiply! Below I generated a 32-bit prime for the multiply, but any odd integer is a valid permutation.
uint32_t pcg2(void)
static uint64_t s = 0;
s = s*UINT64_C(0x7c3c3267d015ceb5) + UINT64_C(0x24bd2d95276253a9);
uint32_t r = s >> 32;
r ^= r >> 16;
r *= UINT32_C(0x60857ba9);
return r;
This passes BigCrush, and I can reliably build a new one entirely from scratch using Calc any time I need it.
Sometimes it's not so straightforward to adapt this technique to other languages. For example, JavaScript has limited support for 32-bit integer operations (enough for a poor 32-bit LCG) and no 64-bit integer operations. Though BigInt is now a thing, and should make a great 96- or 128-bit LCG easy to build.
function lcg(seed) {
let s = BigInt(seed);
return function() {
s *= 0xef725caa331524261b9646cdn;
s += 0x213734f2c0c27c292d814385n;
s &= 0xffffffffffffffffffffffffn;
return Number(s >> 64n);
Java doesn't have unsigned integers, so how could you build the above
PCG in Java? Easy! First, remember is that Java has two's complement
semantics, including wrap around, and that two's complement doesn't
care about unsigned or signed for multiplication (or addition, or
subtraction). The result is identical. Second, the oft-forgotten
operator does an unsigned right shift. With these two tips:
long s = 0;
int pcg2() {
s = s*0x7c3c3267d015ceb5L + 0x24bd2d95276253a9L;
int r = (int)(s >>> 32);
r ^= r >>> 16;
r *= 0x60857ba9;
return r;
So, in addition to the Calc step list above, you may need to know some of the finer details of your target language.]]>


text:
Roston Chase top-scored with 94 as West Indies breezed to a seven-wicket victory in the first one-day international against Afghanistan in Lucknow, with the bizarre run out of Ikram Alikhil laying the foundations.
Afghanistan, who have now lost their last 10 ODIs after a chastening World Cup campaign, were bowled out for just 194 and could not contain a commanding response from Shai Hope (77 not out) and Chase (94) in the opening match of the tour.
FULL SCORECARD: 1st ODI – West Indies beat Afghanistan by seven wickets
The duo ended the match as a contest as they piled on 163 before Chase fell late on attempting to reach his century with a six.
But it might all have unfolded differently had Ikram not fallen foul of a drastic lack of concentration midway through the first innings.
Having come together at 15 for two he and Rahmat Shah enjoyed a healthy stand of 111 for the third wicket before the latter brought up his half-century with a single in the 27th over.
Ikram had made an impressive 58 of his own when he turned to congratulate his partner by walking down the wicket but left the crease while the Evin Lewis' throw was still making its way to wicketkeeper Hope, who flicked the bails as the batsmen celebrated.
The dismissal was upheld, despite Ikram's clear frustrations, and formed the start of a collapse that resulted in the Windies taking eight for 68.
Former captain Jason Holder contributed exemplary figures of two for 21 in his 10 overs, dismissing Javed Ahmadi with the new ball and Mohammad Nabi later on, and also ran out Asghar Afghan in more conventional fashion for 35.
Holder also held the catch that dismissed Rahmat, who top-scored with 61 before Chase struck for the second time. Debutant Romario Shepherd also picked up a pair of wickets at the death.
The target always looked too slim to challenge the West Indies but top-order failures from Lewis – lbw to Mujeeb-ur-Rahman – and Shimron Hetmyer, who nicked behind, opened the door.
It was promptly slammed shut again as Hope and Chase set about hauling in the runs. Chase fell just before the end, falling short with a mishit off Mujeeb, but Nicholas Pooran joined Hope to seal victory with 21 balls remaining.
Bairstow and Mike Cowan were named vice-presidents.
Four of the fixtures were due to be played in England.
A look back at the stunning 2005 Test series between England and Australia.
The rugby union season has been cancelled in Scotland and Wales, and also in England with the exception of the Gallagher Premiership.
The world's a shitshow, so what better way to cheer ourselves up?
The ECB still hoping to get some cricket played somehow.
James Anderson will play forever.
SBR is constantly updating the situation with regards to world Cricket and all the competition statuses with regards to the repercussions
Pads and gloves are awkward and cumbersome. What if we junked them?
English season delayed by at least seven weeks.