Saturday, 28 March 2020

Tech Book Face Off: Seven Concurrency Models In Seven Weeks Vs. CUDA By Example

Concurrency and parallelism are becoming more important by the day, as processor cores are becoming more numerous per CPU and more widespread in every type of computing device, while single core performance is stagnating. Something that used to be barely accessible to the average programmer is now becoming ubiquitous, which makes it even more pertinent to learn how to utilize all of these supercomputers effectively. Besides, parallel processing is a fascinating topic, and I think it's great that it is now so easy to experiment at home with things that used to be reserved for huge companies and university research departments. In order to become more proficient at programming in this way, I started with the book Seven Concurrency Models in Seven Weeks: When Threads Unravel by Paul Butcher for an overview of the current state of affairs in concurrent and parallel programming. Then I went for an introduction to CUDA programming for GPUs with CUDA by Example by Jason Sanders and Edward Kandrot. I've been looking forward to digging into these fascinating books for a while now, so let's see how they stack up.

Seven Concurrency Models in Seven Weeks front coverVS.CUDA By Example front cover

Seven Concurrency Models in Seven Weeks

I had previously enjoyed reading three other Seven in Seven Weeks books so I figured this one was an obvious choice for a solid book on concurrency, and that hunch held true. Butcher gives an excellent tour of the current state of concurrency and parallelism in the software development world, and he does it with a compelling story that builds up from the foundations of concurrency to the modern state-of-the-art services available for Big Data processing, at least circa 2014.

The main rationale for paying more attention to concurrency and parallelism is that that is where the hardware is taking us. As Butcher argues in the introduction:
The primary driver behind this resurgence of interest is what's become known as the "multicore crisis." Moore's law continues to deliver more transistors per chip, but instead of those transistors being used to make a single CPU faster, we're seeing computers with more and more cores.
As Herb Sutter said, "The free lunch is over." You can no longer make your code run faster by simply waiting for faster hardware. These days if you need more performance, you need to exploit multiple cores, and that means exploiting parallelism.
So if we're going to take advantage of all of these multiplying cores, we'd better figure out how to handle doing multiple things at once in our programs.

Our concurrency story begins with the little things. The first week focuses on the fundamentals of concurrency: threads and locks. Each week is split into three days, each day building on the day before, with the intention of being able to learn and experiment with the chapter's contents over a weekend. This first week on threads and locks is not meant to show the reader how to do modern parallel programming with threads, but to give a foundation of understanding for the higher-level concepts that come later. Threads are notoriously difficult to use without corrupting program state and crashing programs, and locks are a necessary evil that can help solve those corruption problems but have problems of their own, like deadlocks and livelocks. These problems are especially insidious because they're most often invisible, as Butcher warns:
To my mind, what makes multithreaded programming difficult is not that writing it is hard, but that testing it is hard. It's not the pitfalls that you can fall into; it's the fact that you don't necessarily know whether you've fallen into one of them. 
The first concurrency model gives us a view into that abyss, but then pulls back and moves on to better alternatives right away. The first better model turns out to be an old programming paradigm that has recently become more and more popular: functional programming. One of the biggest problems with programming languages like C or Java is that they have mutable state. That means most of their data structures and variables can and do change by default. Functional languages, on the other hand, default to immutable data structures that don't have the same problems when sharing state across threads.

The next model goes into detail about how one functional language, Clojure, uses the basic advantages of immutable state by separating identity and state. The identity of a data structure is what that data structure is inherently, like a list of names. It doesn't change. The state, which specific names are in the list, can change over time, and a persistent data structure in Clojure will guarantee that if the state changes for one thread, it will not change for other threads unless that state is explicitly passed from one thread to another. This separation of identity and state is accomplished by atoms and agents, but we don't have time to get into the specifics here. It's in the book.

After Clojure, we move on to Elixir, another functional language that takes a different approach to parallelism. Instead of threads, Elixir has extremely lightweight processes that can be used to make highly reliable applications out of unreliable components. The perspective to take when programming in Elixir is to design the application so that individual processes are not critical and can fail. Then instead of trying to do thorough error checking, we can just let them crash and depend on the system to recover and restart them. This approach makes for incredibly reliable systems, and with Elixir running on the Erlang VM, it has a solid foundation for bulletproof systems.

With the next model, we come back to Clojure to explore communicating sequential processes (CSP). Instead of making the endpoints in a message the important thing, CSP concentrates on the communication channel between the endpoints. In Clojure this is implemented with Go Blocks, and it's an intriguing change to the normal way of thinking about message passing between threads or processes.

What are we at now, the sixth model? This model steps outside of the CPU and takes a look at the other supercomputer in your PC, the massively parallel GPU. This chapter was a little too short for the subject to get a great understanding of what was going on, but it does use OpenCL for some simple word-counting applications that run on the GPU. It was neat to see how it works, but it was a lot of boilerplate code that was pretty opaque to me. I'm hoping the other book in this face-off will shed much more light on how to do GPU programming.

The final model takes us into the stratosphere with serious Big Data processing using Hadoop and Storm, frameworks that enable massively parallel data processing on large compute clusters. It was surprising to see how little code was needed to get a program up and running on such an industrial strength framework. Granted, the program was a simple one, but thinking about what the framework accomplishes is pretty intense.

That brings us to the end of the tour of concurrency models. The breadth of topics covered was exceptional, and the book flowed quite nicely. Butcher's explanations were clear, and he did an excellent job covering a wide-ranging, complex topic in a concise 300 pages. If you're looking for an overview of what's out there today in the way of concurrent and parallel programming, this is definitely the book to start you on that journey.

CUDA by Example

CUDA used to be an acronym that stood for Compute Unified Device Architecture, but Nvidia, it's creator, rightly decided that such a definition was silly and stopped using it. Now CUDA is just CUDA, and it refers to a programming platform used to turn your Nvidia graphics card into a massively parallel supercomputer. This book takes the reader through how to write this code using the CUDA libraries for your very own graphics card. It does a fairly decent job at this task.

The first chapter starts out with a bit of history on the graphics processing unit (GPU) and why we would need a general-purpose platform such as CUDA for doing computations on it. The short answer is that the prior situation was dire. The longer answer is as follows:
The general approach in the early days of GPU computing was extraordinarily convoluted. Because standard graphics APIs such as OpenGL and DirectX were still the only way to interact with a GPU, any attempt to perform arbitrary computations on a GPU would still be subject to the constraints of programming within a graphics API. Because of this, researchers explored general-purpose computation through graphics APIs by trying to make their problems appear to the GPU to be traditional rendering.
Suffice it to say, people were not particularly satisfied shoehorning  their algorithms into the GPU through graphics programming, so CUDA and OpenCL were a welcome development.

The next chapter goes through how to get everything ready on your computer in order to start writing and running CUDA code, and the chapter after that finally unveils the first program to run on the GPU. It's not exciting, just the standard "Hello, World!" program, but this example does introduce some of the special syntax and keywords that are used in CUDA programming.

Chapter 4 is where the real fun begins. We get to run an honest-to-goodness parallel program on the GPU. It's still simple in that it's only summing two vectors together element by element, but it's doing the calculation with each pair of elements in its own thread. Each thread gets assigned to its own resource on the GPU, so theoretically, if the GPU had at least as many compute resources as there are pairs of elements, all of the additions would happen simultaneously. It may not seem quite right to use compute resources in this way since we're so used to programming on much more serial CPUs, but the GPU hardware is designed specifically to do thousands of small calculations in parallel in a highly efficient manner. It's definitely a programming paradigm shift.

After another more interesting example of calculating and displaying the Julia Set, a kind of fractal set of numbers, the next chapter follows up with how to synchronize these thousands of threads in calculations that aren't completely parallel. The example here is the dot product calculation, and this example ends up getting used multiple times throughout the rest of the book. So far the examples have been unique, but they'll start to get reused from here on, partly in order to not need to keep introducing more new algorithms for each example.

The next couple chapters discuss the different types of memory available in a GPU. A small amount of constant memory is there to hold values that are, well, constant, for fast access instead of needing to keep fetching those unchanging values from main memory or having them fill up the cache unnecessarily. Then there's texture memory available for optimized 2-D memory accesses, which are common in certain algorithms that operate on neighboring memory locations in two dimensions instead of the normal one dimension of vector calculations.

Chapter 8 discusses how to combine the use of the GPU as both a CUDA processor and a graphics processor without needing to copy buffers back and forth to the host memory. Actually, a lot of CUDA programming is optimized by thinking about how best to use the memory resources available. There are now at least three more memories to consider: the GPU main memory, constant memory, and texture memory, in addition to the normal system memory attached to the CPU we're used to thinking about. The options have multiplied, and it's important to use both the CPU and GPU efficiently to get the best performance.

We're nearing the end now, with chapters on using atomics to maintain memory consistency when multiple threads are accessing the same locations, using streams to more fully utilize a GPU's resources, and using multiple GPUs to their full potential, if your system is blessed with more than one GPU. By this point much of the content is starting to feel redundant, with incremental features being added to the mix and most of the examples and explanations of the code being copies of previous examples with minor tweaks for the new features.

The last chapter is a review of what was covered in the book, some recommendations of more resources to learn from, and a quick tour of the debugging tools available for CUDA. While overall this book was fairly good for learning how to do massively parallel programming with CUDA, and I certainly enjoyed coming up to speed with this exciting and powerful technology, the second half of the book especially felt drawn out and repetitive. The explanations got to be too verbose, and frankly, the cringe-worthy sense of humor couldn't carry the redundancy through. The book could have easily been half as long without losing much, although the pace was certainly easy to keep up with. I never struggled to understand anything, and that's always a plus. I've got a couple other CUDA books that may be better, but CUDA by Example is sufficient to learn the ropes in a pinch.


Of these two books, Seven Concurrency Models in Seven Weeks was the more wide-ranging and enlightening book. It gave a wonderful overview of the landscape for concurrent and parallel programming, even though it couldn't go into enough depth on any one topic to do it justice or allow the reader to competently start working in that area. Like all of the Seven in Seven books, its purpose is not to make the reader an expert, but to provide enough information to give the reader a fighting chance at making their own decision on a path. Then, the reader can follow that path further with a more specialized book. CUDA by Example is one such specialized book, although it was somewhat light on the real details of GPU programming. As an introductory book, it was adequate, but I'm hoping the next couple of books I read on GPU programming will have more substance. In any case parallel programming is growing in importance, and it's exciting to be able to play around with it on consumer-grade hardware today.

Good Outcome

What's going on everyone!?


I played some more ZIMP today on and off but figured I would play something different for this post..lol.

Today for the #2019gameaday challenge I played a game of Star Realms. Surprisingly I actually won! And by a pretty good margin! 

As always, thank you for reading and don't forget to stop and smell the meeples!  :)

-Tim

CX2691, Joust!

Hello there, thanks for waiting for this episode that features Joust by Atari! It's one of my favorite arcade games and is done pretty well on the 2600 (spoilers), probably because it was in the capable hands of GCC. Next up is Star Wars The Arcade game by Parker Brothers, which has an extremely interesting provenance. If you'd like to contribute to that episode, please send your feedback to 2600gamebygame@gmail.com by end of day October 20th, and I'll put it in the show. Thanks so much for listening!

My Extra Life donation page, thank you!
List of Radio Shack in store catalog games for sale by Kevin Gatland
Joust on KLOV
Kevin Osborn's Bald Wisdom blog
Michael Feinstein's Fein Line blog
Patricia Goodson at Atari Women site
Joust on Random Terrain
Joust on Atari Protos
Joust prototype photos on Atari Compendium
Joust prototype recreated by Thomas Jentzsch on Atari Age
Source code used for Joust prototype reconstruction (Wayback Machine)

Monday, 23 March 2020

The Blog At 400 Posts

400 blog posts?   Have I really written so many?  Blogger says I have, so I'll have to accept that.  I suppose its time for one of those meta-blog entries where I talk about stuff that doesn't fit into a traditional blog post.  So let's start with a revisit of one of the only useful parts of the previous "Blog at xxx Posts" posts, the Youtube channel recommendations list.  I subscribe to many more channels these days than I used to, so let me tell you why you may want to take a look at them as well.  The channels I recommended (LGR, Pixelmusement and PushingUpRoses) in my early blog post remain recommended of course, but let's add some fresh blood to the list.  I will be using categories to help organize recommended channels, but just because a channel falls into one category does not mean it holds no value outside that pigeonhole. 

Read more »

Friday, 20 March 2020

(270 MB) Download Hitman 4 Blood Money Highly Compressed For Pc

(270 MB) Download Hitman 4 Blood Money Highly Compressed For Pc


Screenshot



Hitman 4 Blood Money System Requirements

Following are the minimum system requirements of Hitman 4 Blood Money.
  1. Operating  system: Windows XP, Vista, Windows 7, Windows 8 and 8.1
  2. Processor: Core 2 Duo
  3. Setup Size: 270 MB
  4. Ram: 1GB
  5. Hard disk space: 5 GB







Thursday, 19 March 2020

Psikyo Shooting Stars Alpha Is Now Available To Play!



NIS America is excited to announce that Psikyo Shooting Stars Alpha released today in North America and will launch on January 24 in Europe and January 31 in Oceania. Psikyo Shooting Stars Alpha along with Psikyo Shooting Stars Bravo will be available exclusively for Nintendo Switch as two separate collections that bring together Psikyo's greatest hits!




About Psikyo Shooting Stars Alpha:
  • STRIKERS 1945 - The mysterious C.A.N.Y. organization seeks to conquer the world with powerful superweapons, and only the Strikers team can take them down and restore peace!
  • STRIKERS 1945 II - The Strikers team is called into action once again when a new threat appears in the form of the F.G.R. faction and their massive mecha technology!
  • STRIKERS 1945 III - Experience the third chapter of the legendary STRIKERS series in its first ever re-release. A swarm of alien microbots known as "nanites" have infiltrated Earth's military bases, and the heroic Strikers must utilize powerful new vehicles and weapons to repel the invaders!
  • SOL DIVIDE - The evil emperor Ifter seeks to become a demon and take over the world. It is up to three powerful heroes to rise up and stop his nefarious campaign!
  • Dragon Blaze - Four dragon rider knights, each with their own goals, are on a quest to slay the Demon King. Will their quests end in triumph...or ruin?
  • ZERO GUNNER 2 - To free the world from the evil conglomerate Igem and their destructive ONI machine, the blazing guns of the Zero Gunner squadron are called in to take them down!



Key Features:
  • Pixel Perfect: Experience classic shooters beautifully rendered in high definition.
  • Play Your Way: Choose between horizontal mode and vertical "TATE" Mode, or hand a Joy-Con to a friend for some couch co-op fun!
  • Unlimited Quarters: Six shooters, six stories, and an infinite supply of ammo jam-packed in one game.

Everything About PUBG

What is PUBG?     


Everything about PUBG
PUBG

        Everyone knows about PUBG these days. PUBG is an online battle royale game. The developer of PUBG is Brendan Greene and it is published by PUBG Corporation. It is a survival game in which a maximum of 100 players can participate. The players will kill each other in a map until the last player remains alive and wins the match. The winner gets a "WINNER WINNER CHICKEN DINNER" slogan

              PUBG is available in platforms like Android, iOS, Windows, PS4, and Xbox One.

 Gameplay of PUBG

           Each match starts with players parachuting from a plane onto a selected map area. At present, there are 4 playable maps and these are Erangel, Sanhok, Miramar, and Vikendi. Once they land on one of the four maps from the sky, players search in houses, towns etc. to find many items and equipment including weapons, vehicles, and other surviving tools. Once a player is dead, his clothes, guns, ammo, etc can be looted by other players. 


           After every few minutes, the safe zone or playable area of the map begins to shrink down and the map becomes smaller and smaller enhancing the chances of an encounter of remaining players. If a player remains out of the safe zone, his life begins decreasing until his death.


        During the game, a plane flies over various parts of the playable map and drop many necessary packages. These packages contain special and rare items which are very rare to find in the normal houses or towns. Players in greed of getting those items encounter their enemies and thus a war begins making more players end up their life. 


        The players keep fighting until the last player wins the match by defeating all other remaining players. The winner then earns a " WINNER WINNER CHICKEN DINNER" promotion. The player also earns some in-game currency with which they can buy accessories from the game store.


Others

Besides the 4 maps of PUBG as described above, it is rumored that PUBG will launch their fifth map Venezia in the global 0.12 or 0.13 version. 
              It is said that the developer of the map is James Coreman. He is an employee at the PUBG Corporation. It is also believed that the map has been inspired by a city in Venice, Italy. Venice is a city in Italy which is well known for its large number of canals, bridges and small islands.

To know more about the island click here.

To know about the sad story of Erangel click here.

To know about the dark horror story of Sanhok click here.

To know how PUBG earns money click here.

To visit the official PUBG click here.

To know more about PUBG click here.

          

Samantha, Short Film, Review And Interview


Josh Carly's Samantha delves into what our psyche wants to see to deal with the pain of loss. Losing a loved one has the ability to affect us in ways well beyond our understanding. There is the horrific possibility that other creatures understand the pain of loss we are working through and use it as bait.

I saw Samantha at the 2019 FilmQuest film festival (website). It was nominated for Best Visual Effects.

Samantha is a wonderfully crafted short piece of dealing with loss, and how one loss can lead to another if we are unwilling, or not able, to let go. I recommend this to those who are interested in paranormal horror and the questions of what constitutes reality.

Synopsis: Blogger Henry Mathis interviews Jodi Brooks about her transcendental experiences involving her husband, his dreams, and their deceased daughter.

Josh Carly gives some insights into where Samantha came from along with what he has coming up as a filmmaker. He also shared what inspired him to pursue this career and how he has some fun when not working on a film.

What was the inspiration for Samantha?

I've been a horror fan all of my life, but was late to discover the cosmic horror side of things. My introduction was Lovecraft. It took just one of his stories and I was hooked. I began to explore other writers within the cosmic horror genre. I was trying to figure out what my next project would be, and the excitement and inspiration I was drawing from cosmic horror indicated to me that it was the direction I needed to go in. After that it was a combination of some ideas I was wrestling with at the time, and some dreams my wife had. It all came together to form what would eventually be the script for Samantha.

What project(s) do you have coming up you're excited about?

We've gotten a lot of good feedback on Samantha and we're looking at how best to utilize that. I have a couple of scripts that are in the writing phase—one of them being a feature for Samantha—so I'm excited to see which one ends up being the direction we go in!


What was your early inspiration for pursuing a career in film?

The earliest projects I worked on were just fun videos I made with friends and family. At some point I wanted to keep making them, and everyone else wanted to go do other things. That was my first sign. I fell in love with movies and wanted to watch and learn as much as I could about them. It took off from there. First it was passion projects, and that led to paid work in post-production. I've been working on productions ever since.

What would be your dream project?

I'd love to get my first feature off the ground. I have lots of projects I dream of working on, but for now I'm happy with setting my sights on getting my first feature done.

What are some of your favorite pastimes when not working on a movie?

I do have a lot of enjoyments outside of movies. My wife and I just had a baby, and watching her grow has been the most amazing thing I've ever experienced. I enjoy reading—predominantly nonfiction, but fiction as well—and playing video games. I also enjoy grabbing a coffee or beer with a friend and just talking about any and everything. I thrive off of good conversation, and any chance I get to have one I take!
 

What is one of your favorite movies and why?

I don't have one favorite movie, but Pulp Fiction is one of my favorites. It's one of the few movies I'd assign the 'perfect' designation. It has everything going for it: great characters, fantastic story construction, top-notch dialogue, an amazing soundtrack, flawless editorial pacing, a world that really draws you into it. I could go on. Anytime I need to fall back in love with movies and get inspired I just watch Pulp Fiction.

More info on Samantha can be found at:

IMDb (link)

Instagram/Facebook: @cosmicshortsamantha

I'm working at keeping my material free of subscription charges by supplementing costs by being an Amazon Associate and having advertising appear. I earn a fee when people make purchases of qualified products from Amazon when they enter the site from a link on Guild Master Gaming and when people click on an ad. If you do either, thank you.

If you have a comment, suggestion, or critique please leave a comment here or send an email to guildmastergaming@gmail.com.

I have articles being published by others and you can find most of them on Guild Master Gaming on Facebookand Twitter(@GuildMstrGmng).


Monday, 16 March 2020

Frictional Fan Jam 2019


Screenshot courtesy of Newsman Waterpaper and their mod The Streets of London.


#FrictionalFanJam

September is a meaningful month for Frictional Games, as it marks several of our anniversaries. This year on the 8th of September Amnesia: The Dark Descent will be turning 9, on 10th Amnesia: A Machine for Pigs will be 6 years old, and on 22nd SOMA will have been released for 4 years.

Therefore we would like to make this month special by celebrating your community creations. Please join us for Frictional's Fan Jam of 2019!

We have recently launched an official Discord server, so you are welcome to ask questions, share ideas, and chat with other participants in the #fan_jam channel.

Overview

The goal is to create a new fan work related to one of Frictional's games: SOMA, Amnesia games and the Penumbra series, or older titles such as Unbirth. You are free to create any transformative work: a mod, fanart and fanfiction, cosplay, or something different like a video or a plushie. The project should be at least loosely related to the given theme.

Since some projects (for example mods) can require more effort than others, you are also welcome to participate in teams.

Please see submission guidelines below!

Theme

Autumn/Decay

Deadline

The event kicks off on Friday the 6th of September. The deadline for submissions is 23:59 UTC on Sunday the 22nd of September. The jury will be going through submissions starting Monday the 23rd.

Prizes

The jury of Frictional Games employees and Frictional Games Discord moderation team will pick the winners of the jam. Jury members can participate in the event, but are disqualified from winning.

The winners will receive a poster of a game of their choosing, signed by the Frictional team members, sent to their home address (teams can decide on one address, max 4 prizes per team). The Frictional Team will also be featuring the works on a video with comments from Thomas and other employees. And finally - upon release of the next game, the winners will receive download codes for the game on an available platform of their choosing.

Contact

The jam is organised by Frictional Game's community manager Kira together with the moderation team of the official Discord server, proposed and drafted by Draugemalf. The easiest way to contact the organisers is on the Frictional Games Discord server's #fan_jam channel. The channel can also be used to share ideas with other community members, get feedback and look for team members.

If you don't have a Discord account, you are also welcome to contact Frictional Games through Twitter or our Contact Form, and we will help you as soon as we can.

Submission guidelines


  • The works must be related to one or more of Frictional's games (SOMA, Amnesia: TDD, Amnesia: AMFP, Penumbra, and Unbirth, Fiend, Energetic)
  • The works must be at least loosely related to the the thematic of Autumn/Decay
  • The creation must be submitted on 22nd of September the latest
  • The work must be your or your team's original creation
  • For mods you are free to use assets you can legally use, or have the permission to use from the creators


Submitting your work

You can submit your works through several channels, either by posting an image (for fanart, cosplay and similar) and/or a link (mods, fanfiction and similar).

  • On Discord, you can share the project on the #fan_jam channel. Please make it clear that it's your final version.
  • On Twitter and Tumblr, you should mention @frictionalgames and tag the submission with #FrictionalFanJam.
  • If you don't have a social media account, please send your submission to team@frictionalgames.com with the title "Frictional Fan Jam".
  • Due to Instagram and Facebook's limited searching and tagging tools, we will not be accepting submissions through those platforms.
  • All submissions will be posted by the jury on Discord's #fan_jam_showcase channel for easier judging.



And that's it! Go get creative! We're looking forward to all your great projects!

If you have any questions, just let us know.

Sunday, 15 March 2020

Building My New Gaming Rig


So this is about a month late, but I wanted to document the awesomeness of building my new PC with my oldest daughter.


I got sick of waiting for the Ryzen 3000 series to launch, which as it turns out with a month of hindsight, wont' be happening till July 2019, meaning my build back in late April was a good idea since I was having a really hard time putting off a new build then.