Parallel and Concurrent Programming in Haskell

As one of the developers of the Glasgow Haskell Compiler (GHC) for almost 15 years, I have seen Haskell grow from a niche research language into a rich and thriving ecosystem. I spent a lot of that time working on GHC’s support for parallelism and concurrency. One of the first things I did to GHC in 1997 was to rewrite its runtime system, and a key decision we made at that time was to build concurrency right into the core of the system rather than making it an optional extra or an add-on library. I like to think this decision was founded upon shrewd foresight, but in reality it had as much to do with the fact that we found a way to reduce the overhead of concurrency to near zero (previously it had been on the order of 2%; we’ve always been performance-obsessed). Nevertheless, having concurrency be non-optional meant that it was always a first-class part of the implementation, and I’m sure that this decision was instrumental in bringing about GHC’s solid and lightning-fast concurrency support.

Haskell has a long tradition of being associated with parallelism. To name just a few of the projects, there was the pH variant of Haskell derived from the Id language, which was designed for parallelism, the GUM system for running parallel Haskell programs on multiple machines in a cluster, and the GRiP system: a complete computer architecture designed for running parallel functional programs. All of these happened well before the current multicore revolution, and the problem was that this was the time when Moore’s law was still giving us ever-faster computers. Parallelism was difficult to achieve, and didn’t seem worth the effort when ordinary computers were getting exponentially faster.

Around 2004, we decided to build a parallel implementation of the GHC runtime system for running on shared memory multiprocessors, something that had not been done before. This was just before the multicore revolution. Multiprocessor machines were fairly common, but multicores were still around the corner. Again, I’d like to think the decision to tackle parallelism at this point was enlightened foresight, but it had more to do with the fact that building a shared-memory parallel implementation was an interesting research problem and sounded like fun. Haskell’s purity was essential—it meant that we could avoid some of the overheads of locking in the runtime system and garbage collector, which in turn meant that we could reduce the overhead of using parallelism to a low-single-digit percentage. Nevertheless, it took more research, a rewrite of the scheduler, and a new parallel garbage collector before the implementation was really usable and able to speed up a wide range of programs. The paper I presented at the International Conference on Functional Programming (ICFP) in 2009 marked the turning point from an interesting prototype into a usable tool.

All of this research and implementation was great fun, but good-quality resources for teaching programmers how to use parallelism and concurrency in Haskell were conspicuously absent. Over the last couple of years, I was fortunate to have had the opportunity

Maxthon Partners with AMD to Offer Web Browser Optimized for Next Generation APU Chips

Maxthon, a cloud-based browser, today released a new version of its Windows browser that uses a revolutionary new microprocessor from Advanced Micro Devices (AMD), significantly reducing power consumption while offering superior video performance. AMD’s new Accelerated Processing Unit (APU) leverages new technology to make transactions between the graphics processing unit (GPU) and the central processing unit (CPU) faster and more energy-efficient than ever before.

“New chip architecture like AMD’s APU product is a clear signpost to where we believe the Web technology is heading: more happening in the chip and the browser serving as more of an open standards operating system,” said Jeff Chen, founder and CEO of Maxthon. “We’re proud to collaborate with AMD on such an exciting step forward.”

The GPU handles the processing of rich media including graphics and video, while the CPU manages the heavy lifting of analytical and logic-based functions. Until now, communicating across these two units has depended on a serial data connection that processes millions of functions per second, often resulting in a sluggish and power-consuming Web experience.

The partnership allows Maxthon to optimize the Windows browser for lightning-quick interaction between the APU to speed up video and graphics rendering, particularly using HTML5 standards for which Maxthon is the global leader in support. Among other things, the Maxthon Cloud browser is using OpenCL for lightning quick HTML5 video post processing to offer richer, faster video.

“In the near future what we now know as TV will be mediated through a Web browser optimized for innovative technology like AMD’s APU processors,” said Karl Mattson, vice president of Maxthon International. “Among other things, that means the electronic ‘hearth’ of the TV in the family room will be freed to be available to any device connected to the Web running a browser like Maxthon.”

About Maxthon

Maxthon is an innovative software company that develops superior Web browsers that continue to set new standards for speed, security, simplicity and cloud features. It is available on the Windows, Android, iOS and Mac platforms. With offices in San Francisco, Los Angeles, Beijing, Shanghai and Hong Kong, Maxthon reaches a global community of users that tops more than 120,000,000 people each month in more than 150 countries.

Integrating C++ with QML

Introduction

Qt Quick’s QML language makes it easy to do many things, especially fancy animated user interfaces. However, some things either can’t be done or are not suitable for implementing in QML, such as:

  1. Getting access to functionality outside of the QML/JavaScript environment.
  2. Implementing performance critical functions where native code is desired for efficiency.
  3. Large and/or complex non-declarative code that would be tedious to implement in JavaScript.

As we’ll see, Qt makes it quite easy to expose C++ code to QML. In this blog post I will show an example of doing this with a small but functional application.

The example is written for Qt 5 and uses the Qt Quick Components so you will need at least Qt version 5.1.0 to run it.

Overview

To expose a C++ type having properties, methods, signals, and/or slots to the QML environment, the basic steps are:

  1. Define a new class derived from QObject.
  2. Put the Q_OBJECT macro in the class declaration to support signals and slots and other services of the Qt meta-object system.
  3. Declare any properties using the Q_PROPERTY macro.
  4. Call qmlRegisterType() in your C++ main program to register the type with the Qt Quick engine.

For all the details I refer you to the Qt documentation section Exposing Attributes of C++ Types to QML and the Writing QML Extensions with C++ tutorial.

Ssh Key Generator

For our code example, we want a small application that will generate ssh public/private key pairs using a GUI. It will present the user with controls for the appropriate options and then run the program ssh-keygen to generate the key pair.

I implemented the user interface using the new Qt Quick Controls since it was intended as a desktop application with a desktop look and feel. I initially developed the UX entirely by running the qmlscene program directly on the QML source.

The UI prompts the user for the key type, the file name of the private key to generate and an optional pass phrase, which needs to be confirmed.

The C++ Class

Now that have the UI, we will want to implement the back end functionality. You can’t invoke an external program directly from QML so we have to write it in C++ (which is the whole point of this example application).

First, we define a class that encapsulates the key generation functionality. It will be exposed as a new class KeyGenerator in QML. This is done in the header file KeyGenerator.h below.

#ifndef KEYGENERATOR_H
#define KEYGENERATOR_H

#include <QObject>
#include <QString>
#include <QStringList>

// Simple QML object to generate SSH key pairs by calling ssh-keygen.

class KeyGenerator : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString type READ type WRITE setType NOTIFY typeChanged)
    Q_PROPERTY(QStringList types READ types NOTIFY typesChanged)
    Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
    Q_PROPERTY(QString passphrase READ filename WRITE setPassphrase NOTIFY passphraseChanged)

public:
    KeyGenerator();
    ~KeyGenerator();

    QString type();
    void setType(const QString &t);

    QStringList types();

    QString filename();
    void setFilename(const QString &f);

    QString passphrase();
    void setPassphrase(const QString &p);

public slots:
    void generateKey();

signals:
    void typeChanged();
    void typesChanged();
    void filenameChanged();
    void passphraseChanged();
  
Zulu Creative Launches Redesigned Website For MAX’s Wine Dive

Zulu Creative is proud to announce the launch of a new website for MAX’s Wine Dive, the award-winning, rockin’ restaurant concept from Houston-based Lasco Enterprises that combines gourmet comfort food with retail wine sales and features unlikely pairings such as fried chicken and champagne. The new website is mobile-friendly for diners on-the-go and contains unique content for five MAX’s locations in Austin, Dallas, Fort Worth, Houston and San Antonio, plus corporate-specific content. The MAX’s website is the second of three that Zulu Creative is designing for Lasco. A new website for Boiler House, Lasco’s Texas grill and wine garden concept located at the historic Pearl Brewery in San Antonio, was completed in fall 2012. A complete redesign of The Tasting Room site is forthcoming.

(Photo: http://photos.prnewswire.com/prnh/20130723/MN51688)

Taking its design cue from current branding, the new MAX’s site features a black and white color palette with red accents and bold typographical elements. Zulu Creative recommended key website enhancements to better convey MAX’s funky, eclectic brand vibe online. The website reflects each location’s unique ambience and personality through witty slogans on each page, graphical jukebox-inspired elements that evoke the restaurant’s dive-bar feel, and location-specific featured images.

Site visitors can easily make online reservations and access key information such as each location’s address, hours, contact information and menus. In addition, visitors can view each location’s calendar of events, read chef and wine manager bios, see private event/catering options, purchase gift cards online, sign up for MAX’s newsletter and easily connect with MAX’s through their social media channels. Press+Awards pages tout each location’s accolades, while a corporate Employment page lists all job openings by location and serves as a useful recruiting tool.

Designed and built on a content management system (CMS) platform with multisite functionality, the website is scalable, making it easy to manage multiple websites through a single interface and add new sites as Lasco opens new MAX’s locations.

“We are extremely excited about the new website for MAX’s Wine Dive created by the talented team at Zulu Creative,” said Jonathan Horowitz, Chief Brand Officer of Lasco Enterprises. “Throughout the entire creative process, the Zulu team exercised intense attention to detail and introduced a new site that is easy for our guests to navigate, as well as met our goal to produce a product which mimics the energy, look and feel of the MAX’s Wine Dive concept.”

“Designing sites for three award-winning Lasco brands is an exciting opportunity and huge honor,” says Tina Zulu, Founder and Creative Chieftess of Zulu Creative. “Our experience creating websites for other successful restaurants and bars made the Boiler House, MAX’s Wine Dive and The Tasting Room projects a perfect fit for us, and our teams work extremely well together. We couldn’t be more thrilled and congratulate Lasco on their continued success and growth. Cheers!”

About Zulu Creative
Fun! And smart! Zulu Creative is a boutique agency in Midtown Houston, Texas, specializing in marketing and brand development for lifestyle businesses that serve consumer niche markets. The Zulu crew is a dynamic team of intelligent professionals who are energetic, innovative, passionate and reliable. Clients who choose Zulu Creative get

Toshiba Ultrabook Presents Stylish Dual Function

JAKARTA – Toshiba introduced the latest generation ultrabook, named “Portege Z10t”. This super-thin notebook is presented in order to meet the needs of professionals who require a technology to carry anywhere but still stylish.

Channel Manager of the Computer Systems Division of Toshiba Singapore Pte. Ltd., Albert Susilo, said that now the tablet has become a popular gadget. Many of the professionals who always move with a laptop and a tablet.

“This is why we re-present the latest generation of ultrabook Portege Z10t, which has two dual function,” said Albert the introduction Portege Z10t in Jakarta, Thursday (4/7).

This Ultrabook has advantages over its predecessor, which is designed with a water-resistant keyboard. “Water resistant up to 55 ml, both mineral water, coffee, tea to sodas,” said Senior Manager Marketing Service Toshiba Singapore, Tay Choon Song.

Portege Z10t is a 11.6-inch touch screen notebook with full HD IPS, which has a dual function. Weighing just 850 grams and a thickness of 24 millimeters, Portege Z10t notebook can function as well as tablets.

With 4GB of RAM, Portege Z10t available in two sophisticated processors, the Intel i5 and i7. Unfortunately, Toshiba Portege Z10t only just released in a choice of colors, namely gray metallic.

In that event, also introduced also a special gaming laptop, the Qosmio X70. Latop which was created specifically for the game lovers is equipped with Nvidia GeForce GTX770M graphics technology, the memory capacity of up to 1TB. “This is an extreme laptop for enthusiast gamers,” added Tay Choon Song.

Windows 8.1 Uninstall Facebook and Flickr

Washington – One of the selling points of Windows Phone is a powerful social media integration and the ability to download photos from Facebook directly into the photo apps already available on Windows Phone. Microsoft implemented this functionality in Windows 8. But, it seems the company led by Steve Ballmer that will remove some of the functionality in Windows 8.1.
Although the photo in Windows 8.1 application has been improvised with editing functions, the application has been releasing its integration with Facebook and Flickr as well as supporting delete pictures / photos on the network.
Microsoft spokesman said the software manufacturer introduces Facebook and Flickr integration in Windows 8 because when it was only a few similar apps available. “But now there are many applications available and offers the feature to view photos on other services,” he said.
Separation Windows 8.1 integration with Facebook and Flickr in fact reap disappointment. You see, Facebook has recently committed to build specialized applications Windows 8.

Latest Google Gadget Specification: New Nexus 7

San Francisco – Google officially released its new gadget, New Nexus 7, in the show “Breakfast with Sundar Pichai”, Thursday, July 25, 2013. Sundar Pichai is the Senior Vice President of Google Chrome fields, Android, and Apps.

New Nexus 7 is still holding Taiwanese manufacturer Asus. Body New Nexus 2 millimeters thinner than his brother. Glossy casing. In terms of audio, now Nexus has dual stereo. Also two camera, 1.2 megapixel front and 5-megapixel rear. The size of the screen resolution is also encouraged so 1,920 x 1,200. In the 7-inch screen, the resolution makes the display reaches 323 ppi density, up from 216 ppi on old Nexus.

Offal New Nexus 77 also pretty wild. Cipnya made by Qualcomm, Snapdragon Pro 1.5 Ghz, 2 GB RAM. To connect an HDMI dilengkai slimport, Bluetooth version 4.0, NFC, dual-band Wi-Fi, and LTE high-speed Internet connection (for certain countries).

The New Nexus battery contents can dicas with wireless charging. But the battery capacity shrinks when compared to the previous generation, reaching 4,325 mAh battery. While the New Nexus just 3,950 mAh. Also lighter weight 50 grams. Screen is also thinner bezel.

Although the battery is more stingy, Google promises this gadget is more efficient because the new operating system, Android 4.3 Jelly Bean. Some new things that exist on the Android series of which could be used by the multiuser customize profile, Bluetooth smart, easiertext input, and fast user switching.

One prominent updates on new Nexus series is powered by the Open GL ES 3.0 is very indulgent games enthusiasts. In fact, to complete it, Google also create categories in the application market: Google Play Games.

Android 4.3 will be available starting today. Devices that can instantly update the Android is the Nexus series; Nexus 4, Nexus 7, Nexus 10, and the Galaxy Nexus. New Nexus will be available starting July 30, 2013 coming in a few countries. But Indonesia is not included. New Nexus 7 will be priced at U.S. $ 229 (16 GB + Wi-Fi), U.S. $ 269 (capacity 32 GB + Wi-Fi), and U.S. $ 349 (32GB + 4G).

Acer launches new Iconia A1-810

Acer Sales and Services Sdn Bhd (Acer) has recently launched a brand new 7.9 inch tablet that is supposed to be a cheaper alternative to its contenders Note 3 and Mini.

At half the price of an iPad, Acer Iconia comes with a Quad-Core CPU, HDMI output and the latest version of Android 4.2.2.

The design of the tablet is a traditional one noted Ting Meng Hung, regional manager for Acer and noted that it was quite thick compared to other tablets yet it is very light.

As for the hook-up there is a micro SD card slot, HDMI output and both a front and a rear webcam. The rear webcam is five megapixels (MP )and can record videos of up at 30 frames per second.

The tablet has a 7.9’ multi-touch five point widescreen that is intuitive and launches the apps instantly.

“An interesting characteristic similar to other tablets is that if the corner of the touch screen is kept pressed with your finger the rest of the screen reacts to other commands like scroll, launch or zoom,” Ting noted.

The tablet is equipped with a -Core CPU and one gigabyte (GB) RAM, ensuring the smooth rendering of high-quality apps and complex games.

The internal memory ranges starts from 8GB and can be extended via SD card up to 32GB.

For the operating system, it comes together with the latest 4.2.2. that run optimally with the component, Ting highlighted.

For this minimal price we have here a Tablet equipped with HDMI hook-up, Bluetooth and GPS and a Quad-Core CPU as well as a webcam that records Full-HD videos.

“At the moment we are only offering the wifi model and depending on the demand we may bring in the 3G version of the tablet as well,” Ting explained.

The Iconia is priced at RM599 and for more information please call Acer’s office at 082-456700 or visit them at Green Heights Commercial Centre, Lorong Lapangan Terbang 2, 93250, Kuching.

 

HP Presents its Printing Solutions Qualified

JAKARTA – For those of you who are struggling in the world of photography, the image quality would be a desire. Not only in terms of technique but also capture the final result of the mold. To provide excellent print results and long lasting in all colors, HP re-introduced HP Designjet Z3200 Photo Printer.

This hardware has the advantage of producing excellent print results, durable and waterproof photo paper, fine art paper and special paper that can last up to 200 years, especially in terms of color. It has also received recognition from Willhelm Imaging Research who has given certification.

“With the HP Designjet Z3200 Photo Printer will create color prints and black and white with gallery-class quality efficiently,” said Lydia Budiarto March as the HP Designjet Development Manager-Printing and Graphic Solution Business Systems Group HP Persinal launch in Indonesia in Jakarta, Tuesday (07.02.2013).

HP Designjet Z3200 Photo Printer brings to 12 ink printing system, using HP Vivera pigment inks, and also features HP 73 Chromatic Red Ink that enables up to 95 percent PANTONE coverage. In addition, this photo printer machine also offers the features of the HP Color Center that allows users to obtain color calibration da accurate profiling.

Not only that, with the spectrophotometer and features HP DreamColor technologies that have been integrated in this device, users can also easily develop a profile of the International Color Consortium (ICC) to make documents easily and send them to devices other HP Designjet Z3200.

Yahoo Open Start Request Username ‘Beautiful’ is Not Active Again

Since last month it was announced that Yahoo will delete the Yahoo! username or ID is no longer active, many people are waiting for the arrival of this. Because, mostly inactive username is precisely deter others who want to use the name. Now, according to the announcement last month, Yahoo began to open up opportunities for those who want to get the username ‘pretty’.
Users who want to get the username ‘beautiful’ can not directly get the name. They should write the desired username in advance through a form benama Yahoo! Wish List. Yahoo provides five options that could be asked. If the first choice is not available, then the choice of the required reserves would then look for. Yahoo will provide notice of the availability of username via email in mid-August 2013.
“To get Yahoo! username you’ve always wanted, we set up a page where you can ask five top choices. If your first choice is not available, we will try to find other options of backup you have the content. In mid-August, you will receive email containing the username where available, as well as links to mengklaimnnya for 48 hours. Quite so, and it is yours, “wrote Dylan Casey, Senior Director, Platform Yahoo via its official blog.

Previous Page · Next Page