Browsed by
Author: matt

Google Home Vs Amazon Echo

Google Home Vs Amazon Echo

There were predictions that we would soon have intelligent agents in our home. This is a comparison and I’d say they’re pretty much there.

They’ve got ordering things down, playing music, etc. But a few items are still missing involve doing slightly more complex tasks for you:

  • Find then schedule best flights for you based on criteria you specify (price, stops, dates, etc)
  • Tell it to make calls to your doctor’s office/auto shop/etc to make appointments and check on the status of repairs/etc and report back.
  • Find and buy the best tickets for a show – scouring craigslist, ebay, ticketmaster, etc. for best prices/seats/etc.
  • Find out about a topic and summarize it from a few sources (not just google) – giving you verbal decision trees (automobiles are broken down by commercial vs passenger, trucks vs cars vs motorcycles, etc – which would you like to learn more about?)
  • Law – Is X legal in my state/local?
  • Tell you when appliances are finished (laundry is done, etc)

Perhaps there’s an opportunity here for services to work with these companies – especially in the case of law/etc. You could opt to talk to a real person in which case it would call the local office and you could continue more detailed discussion for a fee.

And as I have stated before, here’s another example of how AI and machine learning are removing a whole class of white-collar jobs. I predict professional assistants will always be necissary for some situations, but a lot of them are about to be replaced in version 2.0 of these devices.

Advent Thought

Advent Thought

We all have deserts in our life. Deserts of loneliness, relationships that have grown cold or died, anger, fear, being stuck in a chronic sin, illness or physical pain, ignoring our relationship with God, selfishness, bad work situations – the deserts can be endless.

Advent is the time to open the doors of our desert to Christ so they can bloom. Not just for us, but for others around us that might be in their own deserts.

How can I open my deserts for Christ and bloom today?

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.

Now, run the following insmod, and your system will kernel panic.

 insmod panic.o 

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 getting started guide. With developers increasingly using engines such as Unity, the number of people writing directly to OpenGL is 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 sample 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 );
}

 

Apple Bandit of Portland leaves amazing notes

Apple Bandit of Portland leaves amazing notes

Clark County sheriff’s deputies are hot on the trail of a man who has allegedly been chucking apples onto the roofs of unsuspecting residents and leaving some very odd notes in his wake. Law enforcement agencies around the Portland area have received periodic reports of so-called “apple-ing,” in which the fruits are maliciously tossed onto people’s homes. But even more interesting are the letters he leaves:

To The Good Citizens of Callisto,
I crossed the Rubicon River.
Today I did five houses. My backpack had fifteen apples in it, three apples per house. I pull up on my bike, take my backpack off, get the apples out, put the backpack back on, walk up a little closer and throw them high in the air over the house. The second and third apples are still in the air when the first one hits. Within seconds I am mounted up and gone.
Roofs are not created equally so the sound effects vary. It can be nothing, to a muted thump, to louder thumps to almost a crashing sound. I can remember one house. The owner must have had mason jars stacked up under the eaves; the apples came down on them like bowling bowls. I’ve broken a few windows but that happens rarely. If there are overhanging tree limbs or wires, I try to avoid hazards like that.
“Apple-ing” five houses takes about seven minutes. For a while I was doing eleven houses, that was down in the Richmond neighborhood. As it turns out eleven is too many as one night a police car showed up. The way he came was the way I went as he didn’t see me and I was surprised to see I was being followed by a Portland Fire SUV with four bicycles attached to the back. Now I heard that Portland Police were stepping up bicycle patrols in the wake of nuisance crimes. I took a right and a left, another right and a left and dropped down to Ladd’s Addition. So I started out at the Bagdad Theater and ended up in those nice gardens by the roundabout and there I lay down. I felt good being guarded by flowers.
It should be noted that the City of Portland might be the best place on earth for a hooligan riding a bicycle with a backpack filled with apples. There are bicyclists everywhere, even in the early morning hours. The neighborhoods are like corn fields, easy to get lost in.

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.


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. Ghost stories, and particularly Japanese ghost stories have been very popular of late (The Ring, Ju-On, etc) but their origins go back as far as the oral traditions of each culture. Just as with Greek odysseys and ancient poems like Gilgamesh, ancient ghost stories provide amazing windows to the past and the strange of every culture.

During a recent adventure through Victorian era ghost stories, I also 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 the night is darkest without even moonlight. 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 where one cannot see the room at the top of the L from the room at the bottom right of the L.
  • The participants gather in one of the end rooms with a few lanterns. The room next to that is to be pitch black.
  • The most secluded room has 100 lit candles or andon (traditional Japanese paper lanterns) 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 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.

In Japan, like many other cultures, there is the idea of Kimodameshi (きもだめし or 肝試しlit. “test one’s liver”).  These “tests of courage” involve a person/people exploring frightening, and potentially dangerous, places. Kimodameshi is usually played in the summer, in group activities such as school club trips or camping. At night, they visit scary places such as a cemetery, haunted house, or a forest path to carry out specific missions there.

Further Resources

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. Another great book is Japanese Ghost Stories by Lafcadio Hearn. Hearn was an Irishman that had a colorful past, moved to Japan and researched ghost stories in the late 1800’s

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.