Charity Giving at the End of the Year

Charity Giving at the End of the Year

As we enter the home stretch of the year and enter the Advent season, it’s a great time to volunteer, adopt a family, serve food or eat and visit with the homeless, and make some end of the year donations to charities as part of our preparation for Christmas.

If you want to support women, especially young, vulnerable women, during pregnancy, I would suggest a donation to the Fr. Taaffe Foundation. I’ve met Fr Taaffe and heard about the lives of many young women his group has helped over its 40 years and believe this is exactly the kind of support that really helps communities and stops unhealthy social cycles.

Reverend Monsignor Charles Taaffe began the Father Taaffe Foundation by opening the St. Brigid Home in 1975 in Keizer, Oregon. By 1990, Father realized that many more teenage mothers were keeping their babies and that there was a need for a home where young mothers could learn skills to help them succeed as single mothers.

Today, Catholic Community Services sustains Father’s vision as a nondenominational, nonprofit, charitable program, where homes and community-based supports provide structure, security, unconditional love and encouragement for single, pregnant and parenting teens.

Father Taaffe Homes are welcoming, comforting homes, inspiring hope for the future, self-confidence and independence. Certified by the State of Oregon and operated by Catholic Community Services, the homes provide young women, ages 12 to 20, a safe and nurturing environment from which to build their futures.

Through both residential and community-based services, expecting and young, single mothers gain knowledge and skills from prenatal care, to parenting, to running a household and creating healthy social connections for themselves and their babies. Those who come to live in a Father Taaffe Home are provided with basic amenities, including food, laundry facilities, access to local transportation, and computers to help with school work and job search.

Link for donations:
https://www.ccswv.org/home-page/childrenfamilies/father-taaffe-homes-and-pregnancy-support-services/

Module to cause linux kernel panic

Module to cause linux kernel panic

In doing some robustness testing, I needed to crash my Linux VM intentionally to see if the rest of the system survived. I was thinking of writing a kernel module that just did something silly like dereference null or divide by zero, but turns out you can do it much easier than that. Just call panic.

panic.c:
#define __NO_VERSION__
#include <linux/version.h>
#include 
#include 

int init_module(void)
{
    panic(" insert lame excuse here");
    return 0;
}

Build with gcc -I/usr/src/linux/include -D__KERNEL__ -DMODULE -o panic.o -c panic.c
Here's a good link about building kernel modules without full kernel source.

When you run: insmod panic.o 
Bang - your system will kernel panic and crash.
Credit to Paul's Journal
“Hello World” OpenGL on Linux

“Hello World” OpenGL on Linux

Writing the OpenGL context creation plumbing on Linux isn’t 100% intuitive. It’s always good to have a handy guide. With developers using engines such as Unity, the number of people writing directly to OpenGL shrinking and so are some of the online resources to get over this initial step. I decided to collect a few links and copy critical code here for when I need to whip something up quickly.

 

Some links to good ‘hello world’ Linux GL samples:
https://github.com/jckarter/hello-gl
https://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)
http://www-f9.ijs.si/~matevz/docs/007-2392-003/sgi_html/ch04.html

 

Code:
Taken from: https://www.opengl.org/sdk/docs/man2/xhtml/glXIntro.xml

Below is a minimal example of creating an RGBA-format X window that’s compatible with OpenGL using GLX 1.3 commands. The window is cleared to yellow when the program runs. The program does minimal error checking; all return values should be checked.

#include < stdio.h >
#include < stdlib.h >
#include < GL/gl.h >
#include < GL/glx.h >

int singleBufferAttributess[] = {
    GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
    GLX_RENDER_TYPE,   GLX_RGBA_BIT,
    GLX_RED_SIZE,      1,   /* Request a single buffered color buffer */
    GLX_GREEN_SIZE,    1,   /* with the maximum number of color bits  */
    GLX_BLUE_SIZE,     1,   /* for each component                     */
    None
};

int doubleBufferAttributes[] = {
    GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
    GLX_RENDER_TYPE,   GLX_RGBA_BIT,
    GLX_DOUBLEBUFFER,  True,  /* Request a double-buffered color buffer with */
    GLX_RED_SIZE,      1,     /* the maximum number of bits per component    */
    GLX_GREEN_SIZE,    1, 
    GLX_BLUE_SIZE,     1,
    None
};


static Bool WaitForNotify( Display *dpy, XEvent *event, XPointer arg ) {
    return (event->type == MapNotify) && (event->xmap.window == (Window) arg);
}
int main( int argc, char *argv[] )
{
    Display              *dpy;
    Window                xWin;
    XEvent                event;
    XVisualInfo          *vInfo;
    XSetWindowAttributes  swa;
    GLXFBConfig          *fbConfigs;
    GLXContext            context;
    GLXWindow             glxWin;
    int                   swaMask;
    int                   numReturned;
    int                   swapFlag = True;

    /* Open a connection to the X server */
    dpy = XOpenDisplay( NULL );
    if ( dpy == NULL ) {
        printf( "Unable to open a connection to the X servern" );
        exit( EXIT_FAILURE );
    }

    /* Request a suitable framebuffer configuration - try for a double 
    ** buffered configuration first */
    fbConfigs = glXChooseFBConfig( dpy, DefaultScreen(dpy),
                                   doubleBufferAttributes, &numReturned );

    if ( fbConfigs == NULL ) {  /* no double buffered configs available */
      fbConfigs = glXChooseFBConfig( dpy, DefaultScreen(dpy),
                                     singleBufferAttributess, &numReturned );
      swapFlag = False;
    }

    /* Create an X colormap and window with a visual matching the first
    ** returned framebuffer config */
    vInfo = glXGetVisualFromFBConfig( dpy, fbConfigs[0] );

    swa.border_pixel = 0;
    swa.event_mask = StructureNotifyMask;
    swa.colormap = XCreateColormap( dpy, RootWindow(dpy, vInfo->screen),
                                    vInfo->visual, AllocNone );

    swaMask = CWBorderPixel | CWColormap | CWEventMask;

    xWin = XCreateWindow( dpy, RootWindow(dpy, vInfo->screen), 0, 0, 256, 256,
                          0, vInfo->depth, InputOutput, vInfo->visual,
                          swaMask, &swa );

    /* Create a GLX context for OpenGL rendering */
    context = glXCreateNewContext( dpy, fbConfigs[0], GLX_RGBA_TYPE,
				 NULL, True );

    /* Create a GLX window to associate the frame buffer configuration
    ** with the created X window */
    glxWin = glXCreateWindow( dpy, fbConfigs[0], xWin, NULL );
    
    /* Map the window to the screen, and wait for it to appear */
    XMapWindow( dpy, xWin );
    XIfEvent( dpy, &event, WaitForNotify, (XPointer) xWin );

    /* Bind the GLX context to the Window */
    glXMakeContextCurrent( dpy, glxWin, glxWin, context );

    /* OpenGL rendering ... */
    glClearColor( 1.0, 1.0, 0.0, 1.0 );
    glClear( GL_COLOR_BUFFER_BIT );

    glFlush();
    
    if ( swapFlag )
        glXSwapBuffers( dpy, glxWin );

    sleep( 10 );
    exit( EXIT_SUCCESS );
}

 

More Spooky Tales for Fall and Cold Winter Nights

More Spooky Tales for Fall and Cold Winter Nights

While looking around for more great old-time ghost stories, I came across another great website collection of stories here. To avoid the risk of them disappearing, I copy them here (again) for your enjoyment.
Wailing Well – M.R. James
http://gaslight.mtroyal.ab.ca/jamesX31.htm

The Shadow in the Corner – M.E. Braddon
http://gaslight.mtroyal.ca/shadcorn.htm

The Furnished Room – O. Henry
http://www.eastoftheweb.com/short-stories/UBooks/FurRoo.shtml 

In the Tube – E.F. Benson
https://ebooks.adelaide.edu.au/b/benson/ef/in-the-tube/

The Open Window – Saki
http://www.eastoftheweb.com/short-stories/UBooks/OpeWin.shtml

What Was It? – Fitz-James O’Brien
http://www.bartleby.com/195/13.html

The Lost Ghost – Mary E. Wilkins
http://www.eastoftheweb.com/short-stories/UBooks/LostGhos.shtml

The Facts in the Case of M. Valdemar – Edgar Allen Poe
http://poestories.com/read/facts

The Burned House – Vincent O’Sullivan
http://www.unz.org/Pub/Century-1916oct-00843

Christmas Meeting – Rosemary Timperley
http://recursosdidacticos.es/textos/texto.php?id=414

The Little Ghost – Hugh Walpole
http://gutenberg.net.au/ebooks06/0604071h.html#s10 

The Story of a Disappearance and an Appearance – M.R. James
http://www.thin-ghost.org/items/show/156

The Middle Toe of the Right Foot – Ambrose Bierce
http://www.online-literature.com/bierce/2010/

W.S. – L.P Hartley
https://frankzumbach.wordpress.com/2013/08/23/l-p-hartley-w-s/

The Upper Berth – Marion Crawford
http://gutenberg.net.au/ebooks06/0604221h.html

At The Gate – Myla Jo Closser
http://www.eastoftheweb.com/short-stories/UBooks/Gate846.shtml

A Ghost – Guy de Maupassant
http://www.eastoftheweb.com/short-stories/UBooks/Ghos835.shtml

The Red Room – H.G. Wells
http://archive.org/stream/theredroom23218gut/23218.txt

The Ash Tree – M.R. James
http://www.thin-ghost.org/items/show/133

Smee – A.M. Burrage
https://anilbalan.files.wordpress.com/2011/09/smee-by-am-burrage-_-scary-for-kids.pdf

Hand in Glove – Elizabeth Bowen
http://www.angelfire.com/mt/benson/glove.html

The Cigarette Case – Oliver Onions
http://shortstories.ucgreat.com/read/018/238.htm

The Ebony Frame – E. Nesbit
http://gutenberg.net.au/ebooks06/0602551.txt

The Mezzotint – M.R. James
http://www.thin-ghost.org/items/show/145


Collections these stories come from for further reading:

Great Tales of Terror and the Supernatural (1947)
M.R James: Collected Ghost Stories (1992)
The Collected Tales and Poems of Edgar Allen Poe (1992)
Gothic Short Stories (ed. David Blair) (2002)
The Virago Book of Ghost Stories (2006)
Ambrose Bierce: The Spook House (2008)
The Oxford Book of Ghost Stories (2008)
The Oxford Book of Gothic Tales (2009)
Roald Dahl’s Book of Ghost Stories (2012)
Tales from the Dead of Night: Thirteen Classic Ghost Stories (2013)

The Gathering of 100 Tales

The Gathering of 100 Tales

Ghost stories exist in just about every culture of the world. You can learn a lot about a culture by the ghost stories they tell. But these stories are not only created in modern times, but also go back as far as the oral traditions of each culture. Just as with Greek odyssey’s and ancient poems like Gilgamesh, ancient ghost stories provide amazing windows to the past and the strange.

Besides a recent adventure through Victorian era ghost stories, I also recently learned of an old ghost story telling tradition in Japanese culture. Hyakumonogatari Kaidankai (百物語怪談会, lit., A Gathering of One Hundred Supernatural Tales) was a popular Buddhist-inspired ghost telling parlor game during the Edo period in Japan.  The exact origins are unknown, but it was believed to be first played amongst the samurai class as a test of courage. In Ogita Ansei‘s 1660 nursery tale “Otogi Monogatari” a version of the game was described in which the narrative tells of several young samurai telling tales in the Hyakumonogatari Kaidankai fashion. In the tale, as one samurai finished the one-hundredth tale, he began to extinguish the candle when suddenly he sees a giant gnarled hand descend upon him from above. While some of the samurai cowered in fear, a swipe of his sword revealed the hand to be merely the shadow of a spider.

Setup

According to early texts, the tradition method went like this:

  • The game was to be carried out on the night of a new moon when nights are at their darkest. All light sources should be covered or extinguished.
  • The location should be the home of someone in the group in a selection of 3 neighboring rooms. The best configuration is if the rooms are arranged in an ‘L’ shape.
  • The participants gather in one of the end rooms with a few laterns. The room next to that is to be pitch black.
  • The most secluded room has 100 lit candles or andon lights and a writing desk with a mirror on top.
  • All dangerous items should be removed from the rooms (decorative swords/etc).
  • Each person is to wear a blue robe.

Play

  • The participants take turns telling 1 ghostly or supernatural story at a time. They should be of ghostly encounters, folkloric tales passed on by villagers who encountered various spirits, and the like. These tales became known as kaidan.
  • After each story is told, the teller gets up with a lantern wrapped with blue paper.
  • They walk alone through the dark room to the room lit with 100 candles/andon.
  • They extinguish one candle, look into the mirror on the table, then return to the story telling room.
  • Play proceeds like this with the most secluded room becoming darker and darker until the final story.
  • In some versions, only 99 stories are told and play stops until the sun rises to tell the final story.
  • In other versions you tell the final story. When you enter the lit room and extinguish the final candle while looking into the mirror – some spirit or image may be evoked.

While this might have started as a test of bravery for aristocratic warrior classes, it quickly spread to the working classes. As it gained widespread popularity in the 1600’s, people began scouring the countryside for mysterious tales and collected them into books. The stories also started merging ghostly vengeance with elements of Buddist karma. The collections and popularity of the game grew and is still deeply in the culture today.

Today

For those that have caught Japanese horror movies like ‘The Ring’ and popular Japanese anime/manga/literature, the influence of Hyakumonogatari Kaidankai and the themes those stories created during that era is very clear. Some shows even have mock recreations or clear spinoffs of the very game.

While many of the stories might seem strange to us today, they are also very interesting and often some very similar characteristics as western ghost stories. I recommend picking up one of the many collections of kaidan/ghost stories from Japan and give them a read.

Here are 10 famous Japanese ghost stories to start your journey. See how many themes you recognize.

Leaving space

Leaving space

“Always leave a little room in your life for when what you’re waiting for arrives – or you’ll miss it.”

When we are overly busy and constantly running, it squeezes everything else out except the needs of the immediate. When this becomes chronic, we wake up years later to realize the deeper things that give us meaning have passed us by. The test to see if you have any extra room in your life is if there is time to be curious and try/learn new things or build relationships with new people.

Retiring Overseas on a Budget: How to Live Well on $25,000 a Year

Retiring Overseas on a Budget: How to Live Well on $25,000 a Year

Who hasn’t thought of chucking it all and moving overseas to some cheap little beach villa or living in some exotic country? When I saw this at the library, I figured I’d pick it up:

516qb9zsfhl-_sx331_bo1204203200_
International Living Guide to Retiring Overseas on a Budget: How to Live Well on $25,000 a Year

First off, this book was written by people who lived what they’re writing about – which makes it highly credible. It is an easy and fast read written like a good buddy chatting about his life over coffee. It is clearly geared for people who are thinking about retiring abroad for the first time as opposed to an in-depth or technical guide. Its main strengths are that it gives you a great broad overview sufficient for you to begin your deeper dives elsewhere, and for the realities/questions to ask yourself to see if retiring abroad is really right for you. Its biggest weaknesses are that it lacks depth in legal/technical/financial matters and definitely paints an overly rosy/optimistic picture on most of its topics.

Good points/advice:

  • Probably the best part of the book is the chapter on if life abroad will mesh with you or not. He tells you to really dig deep and be brutally honest with yourself. I wish he’d gone into this more, but it was a great eye opener. I believe he correctly asserts that the more brutally honest you are with yourself, the better your decision will be. He breaks his points down into about 10 questions and refers you back to them again and again. They boil down to these points:
    • Are you ok with change and living as your new country lives? This isn’t a retirement community, it is a lifestyle change to live more as a traveler. Do you love at least a little adventure every day doing even common things like getting around, buying toothpaste, etc – or do you want to ‘nest’ in US comforts?
    • You cannot afford to ‘take it with you’ nor will you likely want to. Living abroad on these budgets means you will live and eat as that country lives. Cosmetics, medication, deodorant, snack foods, tv shows, furniture, etc – all will be different. In many cases, you simply can’t live as you did. Electronics here might make no sense in a country with no internet fast enough to stream Netflix – or will not work at all on 220/50hz. That heirloom cloth pattern chair will do nothing but mold on a humid tropical beach. That fancy washing machine will not work with local hookups or water quality/electric . You will also need to eat local foods to live cheaply. Are you ok with that, or need your steak dinners each night?
    • Be honest about the weather you like. Are you really a beach person or would mountains suit you better? Are you ready for sand all the time and 100% humidity every day for 6-8 months? Are you ok with rainy seasons? Have you traveled to your country of choice during the ‘worst’ season?
    • Are you ready to live, recreate, eat, and pattern your life after how your target country lives? How attached are you to watching US football or sports? How do you spend free time and are you able to get supplies for hobbies there? Are you ok with neighborhood roosters crowing at 6am every day (with no noise ordinances)? Are you ok with the slower, possibly more corrupt pace of business and government services? Poverty, food safety, and animal treatment in your new country may shock you. Will you be ok with building new local friends/connections on relationship and spending time rather than business/utility?
    • Are you really ready to leave natural support nets with your grandkids, family, friends, communities, and lifestyle here in favor of skyping/visits? Flying home is one of the biggest costs you’ll have – are you cool with only 1-3 visits a year? Are you ok leaving business associates and other professional contacts behind?
    • If you have a spouse, are you evaluating these questions with them and both onboard 100%
  • The book is very easy and quick to read. Covers a lot of ground and give a great broad overview.
  • Sample real-world budgets of his own living expenses along with discussions about what that buys you (at least in the author’s country).
  • Great common-sense advice like:
    • Take at least one long trip, and hopefully several/yearly trips, to your destination before moving. Preferably at least once during the ‘worst’ season (hottest/rainiest/etc).
    • Don’t decide to buy a home there while drinking a margarita by the beach. Contact a local lawyer and ask yourself the deep soul-searching questions he had above.
    • What we would have done differently from those that went there.
    • Getting a reputable local lawyer for real estate purchases and protecting surviving spouses by writing contracts properly.
    • Don’t expect to make any extra income by working there. The pay will not be sufficient to make up gaps.
    • You may not need to become fluent, but if US tax laws confuse you, imagine doing legal documents and taxes in a foreign language. You’re going to need to hire a few lawyers at the beginning for sure.
    • Be prepared/able to return if this doesn’t work for you. Some people find it very difficult and give up. Others do great for years, but ultimately decide to return for family.
    • The US is based on Common Law, while most of the rest of the Americas are Civil Law. This makes getting a good lawyer for things like buying a home essential.
  • He has information about individual countries in the book. The best communities in that country for ex-pats on a budget and interesting social/financial/cultural notes. It’s a great place to get started to dig deeper.
  • Basic overview of how medical insurance works in other countries – especially private/public coverage and important key questions/differences to ask to make sure you’re getting the coverage you need.
  • Basic information and common issues with buying a house abroad and the fact you will absolutely want a local lawyer for this type of transaction.
  • Some basic differences between Common Law and Civil Law:
    • You must codify transferral of your home/property to surviving spouses after your death or they might have to go fight for their own home.
    • You must do very thorough ownership history checks or you could end up in a legal fight with a great grandchild that never signed a release on property that you purchased.

Shortcomings:

  • Big sections read like just common sense since it doesn’t give enough specifics on many topics. This, however, might be what some romantic types need.
  • Focuses primarily on Central and South America, even though none of those (except Mexico) are in the top 10 countries of expats. However, some of the top 10 are likely not livable on $25k/year.
  • Feel he paints too rosy a picture of living aboard when it comes to personal safety and health care.
    • He makes many valid points about several countries on his list having tentatively ‘better’ healthcare – but that was as defined in an old study he quotes by the UN and his metrics of office wait times. Without specifics of their metrics used, I’m tempted to believe a country might get great marks for maternity care and treating common ailments but may not for what the average 65 year old (til death) will deal with. His budget numbers/livability also assumes you are a ‘relatively healthy 65 year old person’.
    • Missing all together is an honest discussion about inevitable end-of-life care you will receive there (terminal cancer, organ failure, etc). There is no discussion about handling or treatment of those permanently disabled by stroke, dementia, etc.
    • He asserts more security that I believe is safe. While traveling abroad is usually safe, there are real concerns. A good example is how he talks about how great his own Ecuador is, yet never talks once about the real security threats that a personal friend who was in the Peace Corps encountered. During an uprising, they were evacuated from their mountain towns to the capital, protected under armed guards in a compound, then flown home as things deteriorated. Brazil has serious safety issues in their big cities with paid executions in broad daylight. He doesn’t mention the growing dangers of kidnapping, car jacking, etc in Mexico. At best, he mentions that ‘he has stories’ and that one lady was fleeced in a real estate purchase, but doesn’t give sufficient details for my tastes.
  • Not enough really detailed financial advice. I can’t fault the book on this since you could write a whole book on that, but this book simply doesn’t give you enough information on how to handle taxes/etc.
  • The book simply is not sufficient to actually plan a move abroad. It gives a great starting point, but you will need to do a lot more.
The Science Behind Gut Feelings/Intuition

The Science Behind Gut Feelings/Intuition

Should you trust your intuition? Is there any scientific data on it? Turns out there is! As a Myers-Briggs INTJ (intuiting) person, I lean towards my intuition often.

This great little video shows that we have both fast (systematic) and slow (intuitive) thinking paths, often our bodies know things before our minds do,  and when NOT to trust your intuition.

Summary:

  • Intuition actually exists and is part of the ‘fast-thinking’ parts of our brain.
  • Our subconscious often knows things before our minds do, and it can be measured with skin response.
  • Following our intuition is usually associated with being happier with decisions later.
  • Our intuition isn’t good at empathy

The value of ESP was not properly saved across a function call…

The value of ESP was not properly saved across a function call…

Windows can trigger this error, but sometimes it’s not easy to figure out what’s going on.

I recently got this error when trying to use the OpenGL ES ANGLE library on Windows 10. When compiling against the ANGLE library, the error came when trying to call into the ANGLE and used eglGetProcAddress().

eglGetProcAddress() returns function pointers for important GL extensions, so I couldn’t just ignore it or work around it.

In looking around, the obvious first step is to make sure you’re defining the function pointers correctly, but that turns out not to be my problem.

In looking at this article, I realized I probably had a mismatch of compiler and linker settings. The Visual Studio projects (VS2008) that came with ANGLE required a certain set of compiler and linker flags that were not standard. I had migrated the Visual Studio projects to VS2015, so that also added an element of uncertainty. I simply opened both project settings up next to each other and compared the settings for the ANGLE library build and the final project and found a few mismatches. I change a number of them to be the same, and things worked great.

Summary:
Check the linking AND compiling flags for not only your project, but the project files that generate the libraries you’re linking against. Differences in compiler settings can cause this error.

Hold My Beer

Hold My Beer

There needs to be a US TV show called “Hold My Beer and Watch This.” And all they do is awesome stuff like this.

Or maybe it should be called, “After the Olympics” in which people find creative ways to use former Olympic sites that usually go abandoned.