Domain: uwaterloo.ca
Stories and comments across the archive that link to uwaterloo.ca.
Stories · 78
-
Reading Information Aloud To Yourself Improves Memory (qz.com)
According to a study in the journal Memory, reading aloud works by creating a "production effect" which cements information in your memory. Meanwhile, hearing words said in your own voice personalizes the references and enhances recollection, according to psychology professor Colin MacLeod and researchers from the University of Waterloo in Ontario, Canada. Quartz reports: The findings are based on a study of 95 students (75 of whom returned for a second session) at the University of Waterloo. The students were tested on their ability to recall written information inputted in four different ways -- reading silently, hearing someone else read, listening to a recording of oneself reading, and reading aloud in real time. They were tested on recollection of short, four-to-six letter words on a list of 160 terms. The results show that reading information aloud to oneself led to the best recall. Oral production is effective because it has two distinctive components, a motor or speech act and a personal auditory input, the researchers explain. "[The] results suggest that production is memorable in part because it includes a distinctive, self-referential component. This may well underlie why rehearsal is so valuable in learning and remembering," the study concludes. "We do it ourselves, and we do it in our own voice. When it comes time to recover the information, we can use this distinctive component to help us to remember." -
The Era of Young Innovators: Looking Beyond Universities To Source Talents
New submitter billylo writes "Tech heavy industries are constantly looking for new sources of innovations. But where are the best place to find them? Increasingly, businesses are looking beyond universities and source ideas from savvy high schoolers. Cases in point: High school programming team finished in the Top 5 of MasterCard's NXT API challenge (3rd one down the list) last weekend in Toronto; Waterloo's Computing Contest high-school level winners [PDF] tackled complex problems like these [PDF]; the FIRST robotics competition requires design, CAD, manufacturing and programming all done by high schoolers. Do you have other good examples on how to encourage high schoolers to become young innovators? Do you have any other successful examples?" -
The Era of Young Innovators: Looking Beyond Universities To Source Talents
New submitter billylo writes "Tech heavy industries are constantly looking for new sources of innovations. But where are the best place to find them? Increasingly, businesses are looking beyond universities and source ideas from savvy high schoolers. Cases in point: High school programming team finished in the Top 5 of MasterCard's NXT API challenge (3rd one down the list) last weekend in Toronto; Waterloo's Computing Contest high-school level winners [PDF] tackled complex problems like these [PDF]; the FIRST robotics competition requires design, CAD, manufacturing and programming all done by high schoolers. Do you have other good examples on how to encourage high schoolers to become young innovators? Do you have any other successful examples?" -
Is It Time For NoSQL 2.0?
New submitter rescrv writes "Key-value stores (like Cassandra, Redis and DynamoDB) have been replacing traditional databases in many demanding web applications (e.g. Twitter, Google, Facebook, LinkedIn, and others). But for the most part, the differences between existing NoSQL systems come down to the choice of well-studied implementation techniques; in particular, they all provide a similar API that achieves high performance and scalability by limiting applications to simple operations like GET and PUT. HyperDex, a new key-value store developed at Cornell, stands out in the NoSQL spectrum with its unique design. HyperDex employs a unique multi-dimensional hash function to enable efficient search operations — that is, objects may be retrieved without using the key (PDF) under which they are stored. Other systems employ indexing techniques to enable search, or enumerate all objects in the system. In contrast, HyperDex's design enables applications to retrieve search results directly from servers in the system. The results are impressive. Preliminary benchmark results on the project website show that HyperDex provides significant performance improvements over Cassandra and MongoDB. With its unique design, and impressive performance, it seems fittng to ask: Is HyperDex the start of NoSQL 2.0?" -
Math Anxiety Affects Skills As Basic As Counting
thirty-seven writes "According to four Canadian psychologists, a study they have conducted shows that math anxiety, 'the feeling of fear and dread of performing mathematical calculations,' can negatively affect mathematical tasks much simpler and more basic than previously thought. In the study, participants were asked to count black squares on a white screen. The number of squares shown ranged from one to nine and participants were given as much time as they wanted before answering. When the number of squares was in the subitizing range (one to four), both math-anxious and non-math-anxious participants performed equally well, but when the number of squares was in the counting range (five to nine), the math-anxious group took longer and were less accurate. The University of Waterloo's news release about the study includes this interesting note: 'Previous studies have shown that a weakness in basic math abilities has a greater negative effect on employment opportunities than reading difficulties [do].'" -
Cryptographic Tools To Keep You Hidden On Facebook
Al writes "Many people reveal way too much personal information on social networking sites — something that can easily lead to identity theft or unwanted attention from employers etc. Technology Review has a story about several cryptographic tools that can be used to hide your activity on Facebook, from both untrusted users and from Facebook itself. Urs Hengartner, an assistant professor of computer science at the University of Waterloo, developed a Firefox plugin that obfuscates anything marked with '@@' on Facebook and only reveals the correct information to trusted users who have the right keys. The sensitive data itself is even stored on an outside server so that even Facebook cannot access it. The piece mentions two other projects, NOYB and flybynight, that also aim to make personal information more secure on Facebook." -
Protecting IM From Big Brother
holden writes "Ian Goldberg, leading security researcher, professor at the University of Waterloo, and co-creator of the Off-the-Record Messaging (OTR) protocol recently gave a talk on protecting your IM conversations. He discusses OTR and its importance in today's world of warrant-less wire tapping. OTR users benefit from being able to have truly private conversations over IM by using encryption to obtain authentication, deniability, and perfect forward secrecy, while working within their existing IM infrastructure. With the recent NSA wiretapping activities and increasing Big Brother presence, security and OTR are increasingly important. An avi of the talk is available by http as well as by bittorrent and a bunch of other formats." -
Protecting IM From Big Brother
holden writes "Ian Goldberg, leading security researcher, professor at the University of Waterloo, and co-creator of the Off-the-Record Messaging (OTR) protocol recently gave a talk on protecting your IM conversations. He discusses OTR and its importance in today's world of warrant-less wire tapping. OTR users benefit from being able to have truly private conversations over IM by using encryption to obtain authentication, deniability, and perfect forward secrecy, while working within their existing IM infrastructure. With the recent NSA wiretapping activities and increasing Big Brother presence, security and OTR are increasingly important. An avi of the talk is available by http as well as by bittorrent and a bunch of other formats." -
Protecting IM From Big Brother
holden writes "Ian Goldberg, leading security researcher, professor at the University of Waterloo, and co-creator of the Off-the-Record Messaging (OTR) protocol recently gave a talk on protecting your IM conversations. He discusses OTR and its importance in today's world of warrant-less wire tapping. OTR users benefit from being able to have truly private conversations over IM by using encryption to obtain authentication, deniability, and perfect forward secrecy, while working within their existing IM infrastructure. With the recent NSA wiretapping activities and increasing Big Brother presence, security and OTR are increasingly important. An avi of the talk is available by http as well as by bittorrent and a bunch of other formats." -
Designing Software With Privacy in Mind
dalektcalum writes "Dr. Ann Cavoukian, Canada's Information and Privacy Commissioner, recently gave a talk entitled Privacy by Design. The talk starts off by covering the basics of privacy, and privacy law, and then moves onto the important component: how to design software that properly protects users privacy. The majority of the talk is spent on design principles, but also examines specific technologies (such as Elliptical Curve Cryptography)." The site includes a flash video of the talk, but there are also several torrents for folks who want to avoid hammering their servers. -
Designing Software With Privacy in Mind
dalektcalum writes "Dr. Ann Cavoukian, Canada's Information and Privacy Commissioner, recently gave a talk entitled Privacy by Design. The talk starts off by covering the basics of privacy, and privacy law, and then moves onto the important component: how to design software that properly protects users privacy. The majority of the talk is spent on design principles, but also examines specific technologies (such as Elliptical Curve Cryptography)." The site includes a flash video of the talk, but there are also several torrents for folks who want to avoid hammering their servers. -
Designing Software With Privacy in Mind
dalektcalum writes "Dr. Ann Cavoukian, Canada's Information and Privacy Commissioner, recently gave a talk entitled Privacy by Design. The talk starts off by covering the basics of privacy, and privacy law, and then moves onto the important component: how to design software that properly protects users privacy. The majority of the talk is spent on design principles, but also examines specific technologies (such as Elliptical Curve Cryptography)." The site includes a flash video of the talk, but there are also several torrents for folks who want to avoid hammering their servers. -
The Future of C++ As Seen By Its Creator
holden writes "In a rare public talk, C++ creator Dr. Bjarne Stroustrup discusses his ideal in programming languages, as well how he sees the next version (and beyond) of C++ developing. He explains the general selection criteria used for adding new features, some of the legacy of C++, and many other interesting topics. Especially interesting is during the Q&A he explains his views of the embrace and extend mentality some implementations, such as VC++, have taken." -
Richard Stallman Talks On Copyright Vs. the People
holden writes "Richard M. Stallman recently gave a talk entitled Copyright vs Community in the Age of Computer Networks to the University of Waterloo Computer Science Club. The talk looks at the origin of copyright, and how it has evolved over time from something that originally served the benefit of the people to a tool used against them. In keeping with his wishes to use open formats, the talk and QA are available in ogg theora only." -
Richard Stallman Talks On Copyright Vs. the People
holden writes "Richard M. Stallman recently gave a talk entitled Copyright vs Community in the Age of Computer Networks to the University of Waterloo Computer Science Club. The talk looks at the origin of copyright, and how it has evolved over time from something that originally served the benefit of the people to a tool used against them. In keeping with his wishes to use open formats, the talk and QA are available in ogg theora only." -
Richard Stallman Talks On Copyright Vs. the People
holden writes "Richard M. Stallman recently gave a talk entitled Copyright vs Community in the Age of Computer Networks to the University of Waterloo Computer Science Club. The talk looks at the origin of copyright, and how it has evolved over time from something that originally served the benefit of the people to a tool used against them. In keeping with his wishes to use open formats, the talk and QA are available in ogg theora only." -
Instrumented GIMP To Identify Usability Flaws
Mike writes "New users of the GIMP often become frustrated at the application's unwieldy user interface. Now Prof. Michael Terry and a group of researchers at the University of Waterloo have created ingimp, a modified version of the GIMP that collects real-time usability data in order to help the GIMP developers find and fix its usability problems. Terry recently gave a lecture about ingimp and the data it collects. During each session, ingimp records events such as document creation, window manipulation, and tool use. A log of these events is sent to the ingimp server for analysis. The project hopes to answer questions such as 'What is the typical monitor resolution of a GIMP user?' and 'Is the GIMP used primarily for photo editing or drawing?'" -
Bill Gates Talk From 1989 Surfaces
70sstar writes "A 1-1/2 hour recording of Bill Gates addressing a crowd of university students in 1989 was recently found and digitized, and has been circulating in some IRC channels for the past few weeks. The speech has found a permanent home on the web page of the University of Waterloo CS Club, where the talk is reported to have taken place. Gates covers the past, present, and future of computing as of 1989. While the former two might be of interest to tech historians, the real fascination is Gates's prediction of computing yet to come. Like the now-legendary '640k' remark, some of his comments are almost laughably off-target ('OS/2 is the way of the future!'). And yet, by and large, he had accurately, chillingly, prophesied an entire decade or two of software and hardware development. All in all, a fascinating talk from one of the most powerful speakers in CS and IT." -
Multi-Threaded Programming Without the Pain
holden karau writes "Gigahertz are out and cores are in. Programmers must begin to develop applications that take full advantage of the increasing number of cores present in modern computers. However, multi-threaded development has been notoriously hard to do. Researcher Stefanus Du Toit discusses and demonstrates RapidMind, a software system he co-authored, that takes the pain out of multi-threaded programming in C++. For his demo he created a program on the PlayStation 3 representing thousands of chickens, each independently tracked by a single processing core. The talk itself is interesting but the demo is golden." -
ReactOS Revealed
reactosfanboy writes "DRM Hacker Alex Ionescu explained the internals of ReactOS in a recent talk. Ionescu indicates that ReactOS is nearly 100% binary and API compatible with the Windows 2003 kernel, and that they are aiming for full Vista compatibility. Ionescu attempted to demonstrate ReactOS but only succeeded in installing it after two BSoDs. This alone should make it clear that ReactOS is still not ready for prime time." In what may be a red flag for Microsoft's lawyers, ReactOS is described as "an environment identical to Windows, both visually and internally." Here are slides from Ionescu's talk (PDF), which might prove more useful than the video offered in various forms at over 450 MB. -
ReactOS Revealed
reactosfanboy writes "DRM Hacker Alex Ionescu explained the internals of ReactOS in a recent talk. Ionescu indicates that ReactOS is nearly 100% binary and API compatible with the Windows 2003 kernel, and that they are aiming for full Vista compatibility. Ionescu attempted to demonstrate ReactOS but only succeeded in installing it after two BSoDs. This alone should make it clear that ReactOS is still not ready for prime time." In what may be a red flag for Microsoft's lawyers, ReactOS is described as "an environment identical to Windows, both visually and internally." Here are slides from Ionescu's talk (PDF), which might prove more useful than the video offered in various forms at over 450 MB. -
Next Generation Stack Computing
mymanfryday writes "It seems that stack computers might be the next big thing. Expert Eric Laforest talks about stack computers and why they are better than register-based computers. Apparently NASA uses stack computers in some of their probes. He also claims that a kernel would only be a few kilobytes large! I wonder if Windows will be supported on a stack computer in the future?" -
Proving Which Spam Filters work Best
pirateninja writes "Dr. Gord Cormack decided to find and prove what the best spam filter is. In his study he looked at the major spam filters (DSPAM, SpamAssassin, etc.) along with those submitted by various academics. The results are quite surprising, with a previously unheard-of spam filter, which uses ideas from various compression algorithms, performing the best overall. He recently presented the results and methodology used in a presentation titled 'Spam Filters, Do they Work? and Can you prove it?'" Note that this is a video of his presentation. -
Proving Which Spam Filters work Best
pirateninja writes "Dr. Gord Cormack decided to find and prove what the best spam filter is. In his study he looked at the major spam filters (DSPAM, SpamAssassin, etc.) along with those submitted by various academics. The results are quite surprising, with a previously unheard-of spam filter, which uses ideas from various compression algorithms, performing the best overall. He recently presented the results and methodology used in a presentation titled 'Spam Filters, Do they Work? and Can you prove it?'" Note that this is a video of his presentation. -
Image Recognition on Mobile Phones
mysticalgremlin writes "In a recent presentation, Semacode founder Simon Woodside presents his company's bar code scanning technology that is used in mobile phones. Simon also discusses many places where bar code scanning powered phones are being used. Not bad for an 'image recognizer for a 100 MHz mobile phone processor with 1 MB heap, 320x240 image, on a poorly-optimized Java stack'" -
The Business Model of Ubuntu
Andareed writes "Open-source software companies, such as Ubuntu (an open-source Linux distribution), are better able to respond to user request and bugs than traditional software companies, such as Microsoft. Simon Law, head of the Quality Assurance department at Ubuntu in a talk given to the UW Computer Science Club, explains why this is, and how Ubuntu is leveraging the open-source model. Simon explains how the QA department at Ubuntu differs from traditional QA departments, through its use of the open-source community at large. Most interesting is Simon's views on what motivates open-source developers to develop software, and how open-source oriented businesses (specifically Ubuntu) are making money." -
18 Years in Software Tools, an Insider's View
calumtdalek writes "Newsforge (Also owned by VA) has an article on a talk given by Rico Mariani, an eighteen-year veteran at Microsoft, in which he speaks to the University of Waterloo Computer Science Club, sharing his unique take on the history of, and controversies surrounding, Microsoft and the industry in general. Particularly illuminating are his responses to advocates of free/open-source software. The talk can also be download from the csclub's media server" -
Homebrew Air Conditioning for Under $25
inkey string writes "Summer has arrived, and I've been busy slowly overheating in my student house without central air. I decided to put my thermodynamics classes to work however, and produced this ~24$ homebrew air conditioner. It'll cool a room to a comfortable level in 15-20 mins, and will run for a few hours on a garbage pail full of water. It's cheap, environmentally friendly (just fire the waste water off to your garden), and makes a good one hour project for a quiet evening." -
Early Earth Atmosphere Favourable to Life
mathinator writes "A study by researchers at the University of Waterloo indicates that Earth in its infancy probably had substantial quantities of hydrogen in its atmosphere, a surprising finding that may alter the way many scientists think about how life began on the planet. The new study indicates that up to 40 percent of the early atmosphere was hydrogen, implying a more favourable climate for the production of pre-biotic organic compounds like amino acids, and ultimately, life. The paper was authored by doctoral student Feng Tian, Prof. Owen Toon and Research Associate Alexander Pavlov of CU-Boulder's Laboratory for Atmospheric and Space Physics, and by Prof. Hans De Sterk of University of Waterloo's Applied Mathematics department. The paper was published in the April 7 issue of Science Express, the online edition of Science Magazine" -
29th ACM Intl. Programming Contest Results
mathinator writes "The 29th ACM International Collegiate Programming Contest World Finals, hosted by China's Shanghai Jiao Tong University, are now over and the results are in. Congratulations to the top 4 teams who will be walking away with gold medals. They are Shanghai Jiao Tong University, Moscow State University, St. Petersburg Institute of Optics and Mechanics, and Canada's University of Waterloo (coming in at 1, 2, 3, 4 respectively. The top 4 get gold medals). Regional champions are: University of Waterloo, Canada (North America); Moscow State University, Russia (Europe); University of Cape Town, South Africa, (Africa and the Middle East); Instituto Tecnologico de Aeronautica, Brazil (Latin America); Shanghai Jiaotong University, China (Asia); and University of New South Wales, Australia (South Pacific)." -
Metaprogramming GPUs with Sh
Martin Ecker writes "With the advent of powerful, programmable GPUs in consumer graphics hardware, an increasing number of shading languages to program these GPUs has become available. One quite interesting language that - in many ways - has a very different approach than other mainstream shading languages (such as Cg or the OpenGL Shading Language) is Sh. The recently released book "Metaprogramming GPUs with Sh" by Michael McCool and Stefanus Du Toit, both major contributors to the Sh project, explains the basics of the Sh high-level shading language and the corresponding API and also goes into some of the details of the implementation. The book is intended for an audience that is already familiar with traditional shader development for programmable GPUs. Also, a firm background in 3D graphics programming and C++ is a must for the interested reader." Read on for the rest. Metaprogramming GPUs with Sh author Michael McCool, Stefanus Du Toit pages 308 publisher A K Peters rating 7/10 reviewer Martin Ecker ISBN 0321197895 summary A book that describes an interesting shading language and accompanying API to program GPUs.
Before discussing the book in more detail, I will try to give a basic overview of Sh, since most readers will not be familiar with it. For a more in-depth look at Sh, I recommend taking a look at a recently posted Gamasutra article by Michael McCool (http://www.gamasutra.com/features/20040716/mccool _01.shtml), the paper on Sh from the authors presented at the recently held SIGGRAPH 2004 conference (http://www.cgl.uwaterloo.ca/Projects/rendering/Pa pers/#algebra), and of course the Sh homepage at http://www.libsh.org.
Sh started out as a research project at the University of Waterloo (http://www.cgl.uwaterloo.ca), and it is both a shading language and a runtime API to use the Sh shaders. As a shading language Sh is embedded into C++ as a domain-specific language, which is made possible by using C++ operator overloading and by defining special tuple and matrix types that are used extensively in shader code. So instead of defining its own language that requires a full compiler, like other shading languages do, Sh uses regular C++ syntax to describe shader code, which is then dynamically (at runtime) compiled to a specific backend, such as a GPU or possibly even the CPU. In addition to compiling to a specific GPU or CPU target, Sh can also be used in a special stream mode where a shader is applied to a stream of input tuples. This is very useful for general purpose GPU programming where the GPU is basically used as an additional processor to the host CPU (see http://www.gpgpu.org for more information on the subject). Finally, Sh code can also be executed in an immediate mode where every Sh statement is directly executed on the host CPU (without being compiled into a shader program), which makes it very easy to debug shaders with any host debugger running on the CPU.
Due to the way Sh is embedded into C++, the full range of abstraction mechanisms offered by C++ can be used to structure and modularize shader code. Abstract base classes, regular functions, templates, and any other features offered by C++ can be used to develop shaders. This is an interesting consequence of the metaprogramming approach of Sh that also allows the use of software engineering principles in shader development, such as object orientation, that other shading languages currently cannot offer.
This kind of metaprogramming in C++ is used by an increasing number of libraries. For example, the Spirit parser framework (see http://spirit.sourceforge.net) uses a similar approach to describe and generate parsers directly in C++ instead of using traditional external tools, such as yacc or bison.
One of the most fascinating features of the Sh toolkit is the possibility to combine and connect shader programs to form new shader programs, which allows one to easily build complex shaders out of simple shader fragments. In a more general sense, Sh provides what can be called a shader algebra (see also the aforementioned SIGGRAPH 2004 paper), where shader programs are the objects on which special operators to combine and connect them are defined. An interesting application of this shader algebra is to specifically bind certain varying shader inputs to uniform variables and the other way around (this is what functional programming languages usually call currying). Also combining a matrix palette skinning shader with any light model shader (or any shaders that perform specific tasks, for that matter) is easily possible.
After this short introduction to the Sh toolkit, we shall now take a closer look at the book "Metaprogramming GPUs with Sh".
The book is split into three parts, an introduction, a reference, and an engineering overview.
The introduction consists of the first five chapters and discusses the basics of the Sh shading language and the API. In particular, the tuple and matrix types and the operators defined on them are presented. The way shader programs are defined and how parameters and attributes are handled is discussed, followed by the way textures are represented. Finally, the stream and channel concept used to feed data into shader programs is discussed. These introductory chapters contain a number of examples that demonstrate the presented concepts. Chapter three contains a quite interesting sample shader that uses constructive solid geometry techniques and metaprogramming in Sh to render text. While not the most useful use case, the shader shows some interesting capabilities of Sh, in particular the shader algebra operators. Chapter four on textures has some more nice sample shaders for doing shiny bump mapping, rendering wood and marble, and using Worley noise.
The second part of the book is a reference on Sh. Unlike references in many other computer books, this is not just a technical listing of the available features of Sh but is written in regular prose (with the occasional reference-like table here and there). The six chapters of the reference section describe how to setup and use the Sh library, and then discuss the available types, operators, and standard library functions more thoroughly than in the introduction. Additionally, the available backends are mentioned in the last chapter of this part of the book. A draft of the reference manual can also be found online at http://www.libsh.org/ref/online.
The final part of the book deals with engineering aspects of Sh. These final five chapters of the book discuss the details of the current implementation. The intermediate representation for shaders that is used by Sh is presented as well as how streams and textures are managed and stored internally. The interface between the Sh frontend and the various specific backends is discussed, as well as the current state of the optimizer including some further improvements that are planned in the future.
The images in the book are all in black and white except for 14 color plates in the middle of the book. The color plates and other images usually show teapots or animals, so they aren't all that exciting, but do demonstrate what the sample shaders presented in the book look like.
The book does not come with a CD-ROM, but with such a young library that is still under heavy development, putting a snapshot of the library's source code base on a CD-ROM would be a waste of resources. Sh itself as well as all sample shaders presented in the book can be downloaded from the Sh homepage at http://www.libsh.org. This website also has additional documentation, including some papers and the API reference documentation generated with Doxygen from the sources. Sh is distributed under a very liberal open source license (based on the zlib/libpng license) that also allows commercial use.
For the reader with enough expertise in 3D and shader programming, this book provides a concise and well-written introduction to Sh. The book will definitely contribute to enlarging the currently relative small user base of Sh and hopefully help the library grow and get more refined in the near future. Everyone familiar with "regular" high-level shading languages, such as Cg or the OpenGL Shading Language, should take a look at this book to see a new and interesting way of programming GPUs that the aforementioned languages do not offer.
About the review author:
The author has been involved in real-time graphics programming for more than 9 years and works as a games developer for arcade games. In his rare spare time he works on a graphics-related open source project called XEngine http://xengine.sourceforge.net.
You can purchase Metaprogramming GPUs with Sh from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page. -
Metaprogramming GPUs with Sh
Martin Ecker writes "With the advent of powerful, programmable GPUs in consumer graphics hardware, an increasing number of shading languages to program these GPUs has become available. One quite interesting language that - in many ways - has a very different approach than other mainstream shading languages (such as Cg or the OpenGL Shading Language) is Sh. The recently released book "Metaprogramming GPUs with Sh" by Michael McCool and Stefanus Du Toit, both major contributors to the Sh project, explains the basics of the Sh high-level shading language and the corresponding API and also goes into some of the details of the implementation. The book is intended for an audience that is already familiar with traditional shader development for programmable GPUs. Also, a firm background in 3D graphics programming and C++ is a must for the interested reader." Read on for the rest. Metaprogramming GPUs with Sh author Michael McCool, Stefanus Du Toit pages 308 publisher A K Peters rating 7/10 reviewer Martin Ecker ISBN 0321197895 summary A book that describes an interesting shading language and accompanying API to program GPUs.
Before discussing the book in more detail, I will try to give a basic overview of Sh, since most readers will not be familiar with it. For a more in-depth look at Sh, I recommend taking a look at a recently posted Gamasutra article by Michael McCool (http://www.gamasutra.com/features/20040716/mccool _01.shtml), the paper on Sh from the authors presented at the recently held SIGGRAPH 2004 conference (http://www.cgl.uwaterloo.ca/Projects/rendering/Pa pers/#algebra), and of course the Sh homepage at http://www.libsh.org.
Sh started out as a research project at the University of Waterloo (http://www.cgl.uwaterloo.ca), and it is both a shading language and a runtime API to use the Sh shaders. As a shading language Sh is embedded into C++ as a domain-specific language, which is made possible by using C++ operator overloading and by defining special tuple and matrix types that are used extensively in shader code. So instead of defining its own language that requires a full compiler, like other shading languages do, Sh uses regular C++ syntax to describe shader code, which is then dynamically (at runtime) compiled to a specific backend, such as a GPU or possibly even the CPU. In addition to compiling to a specific GPU or CPU target, Sh can also be used in a special stream mode where a shader is applied to a stream of input tuples. This is very useful for general purpose GPU programming where the GPU is basically used as an additional processor to the host CPU (see http://www.gpgpu.org for more information on the subject). Finally, Sh code can also be executed in an immediate mode where every Sh statement is directly executed on the host CPU (without being compiled into a shader program), which makes it very easy to debug shaders with any host debugger running on the CPU.
Due to the way Sh is embedded into C++, the full range of abstraction mechanisms offered by C++ can be used to structure and modularize shader code. Abstract base classes, regular functions, templates, and any other features offered by C++ can be used to develop shaders. This is an interesting consequence of the metaprogramming approach of Sh that also allows the use of software engineering principles in shader development, such as object orientation, that other shading languages currently cannot offer.
This kind of metaprogramming in C++ is used by an increasing number of libraries. For example, the Spirit parser framework (see http://spirit.sourceforge.net) uses a similar approach to describe and generate parsers directly in C++ instead of using traditional external tools, such as yacc or bison.
One of the most fascinating features of the Sh toolkit is the possibility to combine and connect shader programs to form new shader programs, which allows one to easily build complex shaders out of simple shader fragments. In a more general sense, Sh provides what can be called a shader algebra (see also the aforementioned SIGGRAPH 2004 paper), where shader programs are the objects on which special operators to combine and connect them are defined. An interesting application of this shader algebra is to specifically bind certain varying shader inputs to uniform variables and the other way around (this is what functional programming languages usually call currying). Also combining a matrix palette skinning shader with any light model shader (or any shaders that perform specific tasks, for that matter) is easily possible.
After this short introduction to the Sh toolkit, we shall now take a closer look at the book "Metaprogramming GPUs with Sh".
The book is split into three parts, an introduction, a reference, and an engineering overview.
The introduction consists of the first five chapters and discusses the basics of the Sh shading language and the API. In particular, the tuple and matrix types and the operators defined on them are presented. The way shader programs are defined and how parameters and attributes are handled is discussed, followed by the way textures are represented. Finally, the stream and channel concept used to feed data into shader programs is discussed. These introductory chapters contain a number of examples that demonstrate the presented concepts. Chapter three contains a quite interesting sample shader that uses constructive solid geometry techniques and metaprogramming in Sh to render text. While not the most useful use case, the shader shows some interesting capabilities of Sh, in particular the shader algebra operators. Chapter four on textures has some more nice sample shaders for doing shiny bump mapping, rendering wood and marble, and using Worley noise.
The second part of the book is a reference on Sh. Unlike references in many other computer books, this is not just a technical listing of the available features of Sh but is written in regular prose (with the occasional reference-like table here and there). The six chapters of the reference section describe how to setup and use the Sh library, and then discuss the available types, operators, and standard library functions more thoroughly than in the introduction. Additionally, the available backends are mentioned in the last chapter of this part of the book. A draft of the reference manual can also be found online at http://www.libsh.org/ref/online.
The final part of the book deals with engineering aspects of Sh. These final five chapters of the book discuss the details of the current implementation. The intermediate representation for shaders that is used by Sh is presented as well as how streams and textures are managed and stored internally. The interface between the Sh frontend and the various specific backends is discussed, as well as the current state of the optimizer including some further improvements that are planned in the future.
The images in the book are all in black and white except for 14 color plates in the middle of the book. The color plates and other images usually show teapots or animals, so they aren't all that exciting, but do demonstrate what the sample shaders presented in the book look like.
The book does not come with a CD-ROM, but with such a young library that is still under heavy development, putting a snapshot of the library's source code base on a CD-ROM would be a waste of resources. Sh itself as well as all sample shaders presented in the book can be downloaded from the Sh homepage at http://www.libsh.org. This website also has additional documentation, including some papers and the API reference documentation generated with Doxygen from the sources. Sh is distributed under a very liberal open source license (based on the zlib/libpng license) that also allows commercial use.
For the reader with enough expertise in 3D and shader programming, this book provides a concise and well-written introduction to Sh. The book will definitely contribute to enlarging the currently relative small user base of Sh and hopefully help the library grow and get more refined in the near future. Everyone familiar with "regular" high-level shading languages, such as Cg or the OpenGL Shading Language, should take a look at this book to see a new and interesting way of programming GPUs that the aforementioned languages do not offer.
About the review author:
The author has been involved in real-time graphics programming for more than 9 years and works as a games developer for arcade games. In his rare spare time he works on a graphics-related open source project called XEngine http://xengine.sourceforge.net.
You can purchase Metaprogramming GPUs with Sh from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page. -
Aerial Robotics Competition
anphilip writes "The annual International Aerial Robotics Competition just wrapped up, and I thought while our teams waited for the results I'd let the folks at Slashdot know about it. At any rate there's a brief story here and the group website is here." -
Aerial Robotics Competition
anphilip writes "The annual International Aerial Robotics Competition just wrapped up, and I thought while our teams waited for the results I'd let the folks at Slashdot know about it. At any rate there's a brief story here and the group website is here." -
Response to Gordon Cormack's Study of Spam Detection
Nuclear Elephant writes "In light of Gordon Cormack's Study of Spam Detection recently posted on Slashdot, I felt compelled to architect an appropriate response to Cormack's technical errors in testing which ultimately explain why one of the world's most accurate spam filters (CRM114) could possibly end up at the bottom of the list, underneath SpamAssassin. I spend some time explaining what is a correct test process and keep my grievances simplified about the shortcomings of Cormack's research." -
Spamassassin Beats CRM-114 In Anti-Spam Shootout
Simon Lyall writes "A new study of antispam software shows that Spamassassin performed well in various configurations along with Spamprobe , Bogofilter and Spambayes also came out good while CRM-114 failed to live up to its previous claims . The study shows: 'The best-performing filters reduced the volume of incoming spam from about 150 messages per day to about 2 messages per day.'" -
Wikipedia Reaches 200,000 Articles
CanadaDave writes "The Wikipedia.org project to create a 'complete and accurate free content encyclopedia' has just surpassed 200,000 articles, an increase from 100,000 just 1 year ago. Join in on the celebrations. Some work has been done on predicting Wikipedia's growth and others are already planning for the 500,000 articles over all languages press release. In related news, the project has recently received $20,000 worth of Linux server equipment (9 machines) in hopes to improve performance of the site, which has been prone to downtime over the past year. The servers are being tested right now and will be up and running soon. The purchase was made possible by the many donations the Wikimedia project received in 2003." -
The Amazing Shrinking Supercomputer
mE123 writes "It would seem that IBM is trying to change what we all think of as super computers. Their new Blue Gene family of super computers is meant to be 6 times faster, consume 1/15 of the power and be 1/10 the size of current models. The prototype is already number 73 (with 2 teraflops) on the list of the most powerful super computers and it's only "roughly the size of a 30-inch television". They are hoping to be able to make it up to 360 Teraflops using only 64 racks." We covered this a bit earlier, but without the level of details. -
Killing Cancer With a Virus
just___giver writes "The U.S. National Cancer Institute has just decided to fund multiple human clinical studies to test the reovirus. This naturally occuring virus has a remarkable ability to infect and kill cancer cells, without affecting normal, healthy cells. Here is a before and after picture of a terminal patient with an actively growing neck tumour that had failed to respond to conventional treatments. This tumour was eliminated with only a single injection of the Reovirus. Researchers at Oncolytics Biotech have shown that the Reovirus can kill many types of cancer, including breast, prostate, pancreatic and brain tumours. Human clinical trial results indicate that there are no safety concerns and that the reovirus shrinks and even eliminates tumours injected with this virus. Numerous other third party studies show that the reovirus should be an important discovery in the treatment of 2/3 of all human cancers." -
Nintendo Announce New Titles, Other Rumors
Ian_Bailey writes "In official announcements, Nintendo has confirmed a number of new games, including a sequel to Wario Ware Inc. for the GameCube and a new Donkey Kong game developed by Namco. Furthermore, Nintendo indicated that a 'new game product' will be unveiled in Spring 2004, which could be their N5 next-gen console. Finally, after the IGN PS2 rumor reports, they have now had a look at the 10 Biggest Rumors on GameCube, including Metroid Prime 2, Too Human, and a realistic-looking Zelda." -
Making Change
Roland Piquepaille writes "There are mostly four kinds of coins in circulation in the U.S: 1 cent, 5 cents, 10 cents, and 25 cents. But is it the most efficient way to give back change? This Science News article says that a computer scientist has found an answer. "For the current four-denomination system, [Jeffrey Shallit of the University of Waterloo] found that, on average, a change-maker must return 4.70 coins with every transaction. He discovered two sets of four denominations that minimize the transaction cost. The combination of 1 cent, 5 cents, 18 cents, and 25 cents requires only 3.89 coins in change per transaction, as does the combination of 1 cent, 5 cents, 18 cents, and 29 cents." He also found that change could be done more efficiently in Canada with the introduction of an 83-cent coin and in Europe with the addition of a 1.33- or 1.37-Euro coin. Check this column for more details and references." The paper (postscript) is online. -
ACM Java Challenge Revealed (And Over)
thirty-seven writes "The ACM International Collegiate Programming Contest world finals are being held today, at 8:30am local time in Beverly Hills. But before the "real" contest started, the teams got to have some fun competing in the Java Challenge, where the teams write Java programs that directly compete against each other in a simulated environment. Although it was a big secret ahead of time, a pdf on the site now reveals that this year's Challenge was writing a program to drive a race car in a simulated demolition derby. No official results have been released yet, but according to their coach, the University of Waterloo team came in third overall after a slow start." -
Miyamoto vs. Everyone Else
Ian_Bailey writes "Wired writes Nintendo won't grow up, because of Shigeru Miyamoto. The creator of some of the most popular franchises, and the head of most of Nintendo's creative development, constantly aims his games at children. Many other devloppers admire his creativity, and believe that a mature-themed game would rock the entire industry. A very interesting read, and a bit of insight into the 'God of Games'." -
OpenBSD SMP In The Works
Cajal writes "Four students at the University of Waterloo are working to add SMP support to OpenBSD as part of the Spinlocks project. More information is available in a story at the OpenBSD Journal's site. They expect to have an initial working MP kernel in January." -
Iris Scanners in Canadian Airports
Ian_Bailey writes "The Toronto Star is reporting that the first biometrics (Iris-scanning specifically) devices in airport will be in place in Toronto and Vancouver starting in March. These devices are meant to speed-up the check-in process for frequent travellers, without compromising security. It is stressed that privacy advocates have nothing to worry about, because they are completely voluntary and cannot be used to scan without a person's knowledge, but there is a brief note about using it in the future for staff." -
MS/Waterloo Curriculum Deal On Hold
Plummer writes "After announcing a recent deal with Microsoft that would see C# become a mandatory portion of first year electrical and computer engineering, the University of Waterloo has backed off and asked for a year to evaluate the proposal. The year will be used to evaluate the merits of the language and ensure that any curriculum changes made, will meet the standards UW engineering is known for. The full story here and here." -
Handbook of Applied Cryptography
cconnell writes "The Handbook of Applied Cryptography is now available free (for personal use) on the Internet. This is a $100 book. Note also the companion C source code for most of the crypto algorithms, written by James Pate Williams. There is some very cool code here!" -
Conceptual Models of a Program?
retsofaj queries: "Almost all of the introductory programming books I've looked at focus on syntax, with possible digressions into a bit of semantics. What I haven't found are any great discussions that go beyond syntax and semantics and make it all the way to conceptual models. My goal is to develop a set of resources that can be used in an introductory course that teaches students programming starting with conceptual models, as opposed to starting with syntax.""What I mean by conceptual models are how you think about what a program is (if a program can be anything!). Examples would be (all prefaced by "a program is made up of..."):
- flowcharts (structured programming)
- arrangements of opaque things sending messages to each other (OO)
- transformations of data structures (Wirth's view)
- state machines
- a knowledgebase (Prolog, etc.)
- algebraic operations on sets (Functional languages)
- Who/Where/How are the different models of a program being taught?
- What conceptual models do you use when programming (and where would I go to find out about them)?
-
On the Prevalence and Removal of Spyware?
oo7tushar asks: "There's a lot of spyware out there these days. As a Windows/Linux user I'm concerned about what spyware is installed on my machines and I'm very concerned about this issue when it comes to Windows. A few questions for the masses: What are the most common spying applications that are installed? How do I get rid of them without getting rid of the parent application? Have you encountered spyware on Linux?" -
Playing Ball in Space
oo7tushar writes "Although most experiments in space seem simple they have profound results. Take this for example, astronauts trying to catch a ball in space. What's so hard about that? Nothing much really, down here on Earth. In space it's a completely different story. Here on earth our eyes see the ball and our brain anticipates it's movement according to gravity. In space the brain continues to anticpate gravity but unlike motion sickness (which is adapted to within days), astronauts continue to anticipate the path of a ball for 15 days (after which they start to show progress). What are the ramifications? The brain must have some sort of internal gravitation model."