Merge branch 'master' of caffeine:/users/www/www

This commit is contained in:
Matthew McPherrin 2012-03-14 21:46:19 -04:00
commit 5a6674ad4c
27 changed files with 846 additions and 6 deletions

View File

@ -2,7 +2,7 @@ SHELL = umask 002; exec /bin/sh
FILES = events.ics events.atom news.atom index.html stats.html \
favicon.ico default.css csclub.der csclub.pem robots.txt
SUBDIRS = about events office news services media buttons logos flash library industry
SUBDIRS = about events office news services media buttons logos flash library industry opencl unix102
include common.mk

View File

@ -55,7 +55,13 @@ $(OUTDIR)%.js: %.js
cp -f $< $@
$(OUTDIR)%.txt: %.txt
cp -f $< $@
$(OUTDIR)%.pdf: %.pdf
cp -f $< $@
$(OUTDIR)%.der: %.der
cp -f $< $@
$(OUTDIR)%.pem: %.pem
cp -f $< $@
$(OUTDIR)%.tar: %.tar
cp -f $< $@
$(OUTDIR)%.sh: %.sh
cp -f $< $@

View File

@ -3,6 +3,66 @@
<!DOCTYPE eventdefs SYSTEM "csc.dtd" [<!ENTITY mdash "&#x2014;">]>
<eventdefs>
<!-- Winter 2012 -->
<eventitem date="2012-03-08" time="5:30 PM" room="MC 3003" title="UNIX 102">
<short>
<p><i>by Calum T. Dalek</i>. The Computer Science Club will be running the
second installment of our introductory UNIX tutorials for the term. We
will be covering topics intended to show off the development-friendliness of
the UNIX computing environment: "real" document editors, development tools,
bash scripting, and version control.
</p>
</short>
<abstract>
<p>New to the UNIX computing environment? If you seek an introduction, look
no further. We will be covering more advanced topics in the second installment
of our introductory tutorials, that will help you become a more effective
developer.
</p>
<p>We will be introducing "real" document editors, bash scripting, and
version control. We'll prove to you how much more efficient you can develop
with these tools and teach you how to do it for yourself. It will save you hours
of work!
</p>
</abstract>
</eventitem>
<eventitem date="2012-03-02" time="7:00 PM" room="MC 3001" title="OpenCL Code Party">
<short>
<p><i>by Calum T. Dalek</i>. The University of Waterloo Computer Science Club and AMD's OpenCL programming competition comes to a close, as the contest ends at midnight and prizes are awarded! Open submissions will be judged, so make sure to come out and watch.
</p>
</short>
<abstract>
<p>The University of Waterloo Computer Science Club and AMD's <a href="http://csclub.uwaterloo.ca/opencl">OpenCL programming competition</a> comes to a close, as the contest ends at midnight and prizes are awarded! Open submissions will be judged, so make sure to come out and watch.
</p>
</abstract>
</eventitem>
<eventitem date="2012-03-07" time="5:30 PM" room="PHY 150" title="Feynman Messenger Lecture Series">
<short>
<p><i>by Calum T. Dalek</i>. Join the Computer Science Club and PhysClub every Wednesday evening for the rest of the term for our five screenings of the classic 1964 Messenger Lecture Series by Richard Feynman in PHY 150. Dinner provided!
</p>
</short>
<abstract>
<p>The Physics Club and the Computer Science Club are proud to present the 1964 Feynman Messenger Lecture Series in PHY 150 on Wednesday evenings at 5:30 PM. The screenings will be taking place as follows (please note times and dates):</p>
<ul>
<li><b>Feb. 29, 5:30-6:30 PM:</b> <i>Law of Gravitation: An Example of Physical Law</i></li>
<li><b>Mar. 7, 5:30-7:30 PM:</b> <i>The Relation of Mathematics and Physics</i> and <i>The Great Conservation Principles</i> (double feature)</li>
<li><b>Mar. 14, 5:30-6:30 PM:</b> <i>Symmetry in Physical Law</i></li>
<li><b>Mar. 21, 5:30-7:30 PM:</b> <i>The Distinction of Past and Future</i> and <i>Probability and Uncertainty: The Quantum Mechanical View</i> (double feature)</li>
<li><b>Mar. 28, 5:30-6:30 PM:</b> <i>Seeking New Laws</i></li>
</ul>
<p>Dinner will be provided, so come on out, relax in the comfy PHY 150 theatre, and enjoy. Hope to see you there!</p>
</abstract>
</eventitem>
<eventitem date="2012-02-16" time="7:00 PM" room="MC 3001" title="OpenCL Introduction">
<short><p><i>by Calum T. Dalek</i>. The University of Waterloo Computer Science Club and AMD are running an OpenCL programming competition. If you're interested in writing massively parallel software on the OpenCL platform, come out and join us for our introductory code party!</p></short>
<abstract><p>The University of Waterloo Computer Science Club and AMD are running an <a href="http://csclub.uwaterloo.ca/opencl">OpenCL programming competition.</a> If you're interested in writing massively parallel software on the OpenCL platform, come out and join us for our introductory code party!</p>
<p></p>
</abstract>
</eventitem>
<eventitem date="2012-02-09" time="5:00 PM" room="MC 3003" title="UNIX 101">
<short><p><i>by Calum T. Dalek</i>. New to the Unix computing environment? If you seek an introduction, look no further. We will be holding a series of tutorials on using Unix, beginning with Unix 101 this upcoming Thursday. Topics that will be covered include basic interaction with the shell and the motivations behind using it, and an introduction to compilation. You'll have to learn this stuff in CS 246 anyways, so why not get a head start!</p></short>
<abstract><p>New to the Unix computing environment? If you seek an introduction, look no further. We will be holding a series of tutorials on using Unix, beginning with Unix 101 this upcoming Thursday. Topics that will be covered include basic interaction with the shell and the motivations behind using it, and an introduction to compilation. You'll have to learn this stuff in CS 246 anyways, so why not get a head start!</p>

View File

@ -11,6 +11,289 @@
CD or DVD should you so choose.
<ul class="media">
<mediaitem title="How Browsers Work">
<abstract>
<p>
Veteran Mozilla engineer Ehsan Akhgari presents a talk on the internals of web browsers.
The material ranges from the fundamentals of content rendering to the latest innovations in browser design.
</p>
<p>
Web browsers have evolved. From their humble beginnings as simple HTML
rendering engines they have grown and evolved into rich application
platforms. This talk will start with the fundamentals: how a browser
creates an on-screen representation of the resources downloaded from
the network. (Boring, right? But we have to start somewhere.) From
there we'll get into the really exciting stuff: the latest innovations
in Web browsers and how those innovations enable — even encourage —
developers to build more complex applications than ever before. You'll
see real-world examples of people building technologies on top of
these "simple rendering engines" that seemed impossible a short time
ago.
</p>
</abstract>
<presentor>Ehsan Akhgari</presentor>
<thumbnail file="how-browsers-work-thumb-small.jpg" />
<mediafile file="how-browsers-work.mp4" type="Talk (x264)" />
<mediafile file="how-browsers-work.mpg" type="Talk (MPG)" />
<flvfile file="how-browsers-work.flv" />
<other>
<p>
Ehsan Akhgari has contributed to the Mozilla project for more than 5
years. He has worked on various parts of Firefox, including the user
interface and the rendering engine. He originally implemented Private
Browsing in Firefox. Right now he's focusing on the editor component
in the Firefox engine.
</p>
</other>
</mediaitem>
<mediaitem title="General Purpose Computing on Graphics Cards">
<abstract>
<p>
GPGPU (general purpose graphics processing unit) computing is an
expanding area of interest, with applications in physics, chemistry,
applied math, finance, and other fields. nVidia has created an
architecture named CUDA to allow programmers to use graphics cards
without having to write PTX assembly or understand OpenGL. CUDA is
designed to allow for high-performance parallel computation controlled
from the CPU while granting the user fine control over the behaviour
and performance of the device.
</p>
<p>
In this talk, I'll discuss the basics of nVidia's CUDA architecture
(with most emphasis on the CUDA C extensions), the GPGPU programming
environment, optimizing code written for the graphics card, algorithms
with noteworthy performance on GPU, libraries and tools available to
the GPGPU programmer, and some applications to condensed matter
physics. No physics background required!
</p>
</abstract>
<presentor>Katie Hyatt</presentor>
<thumbnail file="kshyatt-gpgpu-thumb-small.jpg" />
<mediafile file="kshyatt-gpgpu.mp4" type="Talk (x264)" />
<mediafile file="kshyatt-gpgpu-480p.mp4" type="Talk (x246 480p)" />
<flvfile file="kshyatt-gpgpu-480p.mp4" />
</mediaitem>
<!-- encoding problems
<mediaitem title="Analysis of randomized algorithms via the probabilistic method">
<abstract>
<p>
In this talk, we will give a few examples that illustrate the basic method and show how it can be used to prove the existence of objects with desirable combinatorial properties as well as produce them in expected polynomial time via randomized algorithms. Our main goal will be to present a very slick proof from 1995 due to Spencer on the performance of a randomized greedy algorithm for a set-packing problem. Spencer, for seemingly no reason, introduces a time variable into his greedy algorithm and treats set-packing as a Poisson process. Then, like magic, he is able to show that his greedy algorithm is very likely to produce a good result using basic properties of expected value.
</p>
<p>
The probabilistic method is an extremely powerful tool in combinatorics that can be
used to prove many surprising results. The idea is the following: to prove that an
object with a certain property exists, we define a distribution of possible objects
and use show that, among objects in the distribution, the property holds with
non-zero probability. The key is that by using the tools and techniques of
probability theory, we can vastly simplify proofs that would otherwise require very
complicated combinatorial arguments.
</p>
<p>
As a technique, the probabilistic method developed rapidly during the latter half of
the 20th century due to the efforts of mathematicians like Paul Erdős and increasing
interest in the role of randomness in theoretical computer science. In essence, the
probabilistic method allows us to determine how good a randomized algorithm's output
is likely to be. Possibly applications range from graph property testing to
computational geometry, circuit complexity theory, game theory, and even statistical
physics.
</p>
<p>
In this talk, we will give a few examples that illustrate the basic method and show
how it can be used to prove the existence of objects with desirable combinatorial
properties as well as produce them in expected polynomial time via randomized
algorithms. Our main goal will be to present a very slick proof from 1995 due to
Spencer on the performance of a randomized greedy algorithm for a set-packing
problem. Spencer, for seemingly no reason, introduces a time variable into his
greedy algorithm and treats set-packing as a Poisson process. Then, like magic,
he is able to show that his greedy algorithm is very likely to produce a good
result using basic properties of expected value.
</p>
<p>
Properties of Poisson and Binomial distributions will be applied, but I'll remind
everyone of the needed background for the benefit of those who might be a bit rusty.
Stat 230 will be more than enough. Big O notation will be used, but not excessively.
</p>
</abstract>
<presentor>Elyot Grant</presentor>
<thumbnail
<mediafile
<flvfile
</mediaitem>
-->
<mediaitem title="Machine learning vs human learning: will scientists become obsolete">
<abstract><p></p></abstract>
<presentor>Dr. Shai Ben-David</presentor>
<thumbnail file="human-vs-machine-learning-thumb-small.jpg" />
<mediafile file="human-vs-machine-learning.mp4" type="Talk (x264)" />
<mediafile file="human-vs-machine-learning.mpg" type="Talk (MPG)" />
<flvfile file="human-vs-machine-learning.flv" />
</mediaitem>
<mediaitem title="How to build a brain: From single neurons to cognition">
<abstract>
<p>
Theoretical neuroscience is a new discipline focused on constructing mathematical models of brain function. It has made significant headway in understanding aspects of the neural code. However, past work has largely focused on small numbers of neurons, and so the underlying representations are often simple. In this talk I demonstrate how the ideas underlying these simple forms of representation can underwrite a representational hierarchy that scales to support sophisticated, structure-sensitive representations.
</p>
<p>
Theoretical neuroscience is a new discipline focused on constructing
mathematical models of brain function. It has made significant
headway in understanding aspects of the neural code. However,
past work has largely focused on small numbers of neurons, and
so the underlying representations are often simple. In this
talk I demonstrate how the ideas underlying these simple forms of
representation can underwrite a representational hierarchy that
scales to support sophisticated, structure-sensitive
representations. I will present a general architecture, the semantic
pointer architecture (SPA), which is built on this hierarchy
and allows the manipulation, processing, and learning of structured
representations in neurally realistic models. I demonstrate the
architecture on Progressive Raven's Matrices (RPM), a test of
general fluid intelligence.
</p>
</abstract>
<presentor>Dr. Chris Eliasmith</presentor>
<thumbnail file="how-to-build-a-brain-thumb-small.jpg" />
<mediafile file="how-to-build-a-brain.mp4" type="Talk (x264)" />
<mediafile file="how-to-build-a-brain.mpg" type="Talk (MPG)" />
<flvfile file="how-to-build-a-brain.flv" />
</mediaitem>
<mediaitem title="BareMetal OS">
<abstract>
<p>
BareMetal is a new 64-bit OS for x86-64 based computers. The OS is written entirely in Assembly, while applications can be written in Assembly or C/C++. High Performance Computing is the main target application.
</p>
</abstract>
<presentor>Ian Seyler, Return to Infinity</presentor>
<thumbnail file="bare-metal-os-thumb-small.jpg" />
<mediafile file="bare-metal-os.mp4" type="Talk (x264)" />
<mediafile file="bare-metal-os.mpg" type="Talk (MPG)" />
<flvfile file="bare-metal-os.flv" />
</mediaitem>
<mediaitem title="A Brief Introduction to Video Encoding">
<abstract>
<p>
In this talk, I will go over the concepts used in video encoding (such as motion estimation/compensation, inter- and intra- frame prediction, quantization and entropy encoding), and then demonstrate these concepts and algorithms in use in the MPEG-2 and the H.264 video codecs. In addition, some clever optimization tricks using SIMD/vectorization will be covered, assuming sufficient time to cover these topics.
</p>
<p>
With the recent introduction of digital TV and the widespread success
of video sharing websites such as youtube, it is clear that the task
of lossily compressing video with good quality has become important.
Similarly, the complex algorithms involved require high amounts of
optimization in order to run fast, another important requirement for
any video codec that aims to be widely used/adopted.
</p>
</abstract>
<presentor>Peter Barfuss</presentor>
<thumbnail file="pbarfuss-video-encoding-thumb-small.jpg" />
<mediafile file="pbarfuss-video-encoding.mp4" type="Talk (x264)" />
<mediafile file="pbarfuss-video-encoding.mpg" type="Talk (MPG)" />
<flvfile file="pbarfuss-video-encoding.flv" />
</mediaitem>
<mediaitem title="Cooking for Geeks">
<abstract>
<p>
The CSC is happy to be hosting Jeff Potter, author of "Cooking for Geeks" for a presentation on the finer arts of food science.
Jeff's book has been featured on NPR, BBC and his presentations have wowed audiences of hackers &amp; foodies alike.
We're happy to have Jeff joining us for a hands on demonstration.
</p>
<p>
But you don't have to take our word for it... here's what Jeff has to say:
</p>
<p>
Hi! I'm Jeff Potter, author of Cooking for Geeks (O'Reilly Media, 2010), and I'm doing a "D.I.Y. Book Tour" to talk
about my just-released book. I'll talk about the food science behind what makes things yummy, giving you a quick
primer on how to go into the kitchen and have a fun time turning out a good meal.
Depending upon the space, Ill also bring along some equipment or food that we can experiment with, and give you a chance to play with stuff and pester me with questions.
</p>
</abstract>
<presentor>Jeff Potter</presentor>
<thumbnail file="cooking-for-geeks-thumb-small.jpg" />
<mediafile file="cooking-for-geeks.mp4" type="Talk (x264)" />
<mediafile file="cooking-for-geeks.mpg" type="Talk (MPG)" />
<flvfile file="cooking-for-geeks.flv" />
</mediaitem>
<mediaitem title="The Art of the Propagator">
<abstract>
<p>
We develop a programming model built on the idea that the basic computational elements are autonomous machines interconnected by shared cells through which they communicate. Each machine continuously examines the cells it is interested in, and adds information to some based on deductions it can make from information from the others. This model makes it easy to smoothly combine expression-oriented and constraint-based programming; it also easily accommodates implicit incremental distributed search in ordinary programs.
This work builds on the original research of Guy Lewis Steele Jr. and was developed more recently with the help of Chris Hanson.
</p>
</abstract>
<presentor>Gerald Jay Sussman</presentor>
<thumbnail file="sussman-propagator-thumb-small.jpg" />
<mediafile file="sussman-propagator.mkv" type="Talk (MKV)" />
<mediafile file="sussman-propagator-slides.pdf" type="Slides (PDF)" />
</mediaitem>
<mediaitem title="Why Programming is a Good Medium for Expressing Poorly Understood and Sloppily Formulated Ideas">
<abstract>
<p>
I have stolen my title from the title of a paper given by Marvin Minsky in the 1960s, because it most effectively expresses what I will try to convey in this talk.
</p>
<p>
We have been programming universal computers for about 50 years. Programming provides us with new tools to express ourselves. We now have intellectual tools to describe "how to" as well as "what is". This is a profound transformation: it is a revolution in the way we think and in the way we express what we think.
</p>
<p>
For example, one often hears a student or teacher complain that the student knows the "theory" of some subject but cannot effectively solve problems. We should not be surprised: the student has no formal way to learn technique. We expect the student to learn to solve problems by an inefficient process: the student watches the teacher solve a few problems, hoping to abstract the general procedures from the teacher's behavior on particular examples. The student is never given any instructions on how to abstract from examples, nor is the student given any language for expressing what has been learned. It is hard to learn what one cannot express. But now we can express it!
</p>
<p>
Expressing methodology in a computer language forces it to be unambiguous and computationally effective. The task of formulating a method as a computer-executable program and debugging that program is a powerful exercise in the learning process. The programmer expresses his/her poorly understood or sloppily formulated idea in a precise way, so that it becomes clear what is poorly understood or sloppily formulated. Also, once formalized procedurally, a mathematical idea becomes a tool that can be used directly to compute results.
</p>
<p>
I will defend this viewpoint with examples and demonstrations from electrical engineering and from classical mechanics.
</p>
</abstract>
<presentor>Gerald Jay Sussman</presentor>
<thumbnail file="sussman-why-programming-thumb-small.jpg" />
<mediafile file="sussman-why-programming.mkv" type="Talk (MKV)" />
<mediafile file="sussman-why-programming-slides.pdf" type="Slides (PDF)" />
</mediaitem>
<mediaitem title="A brief history of CS curriculum at UW">
<abstract>
<p>
I'll survey the evolution of our computer science curriculum over the
past thirty-five years to try to convey the reasons (not always entirely
rational) behind our current mix of courses and their division into core
and optional. After some remarks about constraints and opportunities in
the near future, I'll open the floor to discussion, and hope to hear
some candid comments about the state of CS at UW and how it might be
improved.
</p>
<p>
About the speaker:
</p>
<p>
Prabhakar Ragde is a Professor in the School of Computer Science at UW.
He was Associate Chair for Curricula during the period that saw the
creation of the Bioinformatics and Software Engineering programs, the
creation of the BCS degree, and the strengthening of the BMath/CS degree.
</p>
</abstract>
<presentor>Prabhakar Ragde</presentor>
<thumbnail file="prabhakar-history-of-uw-cs-thumb-small.jpg" />
<mediafile file="prabhakar-history-of-uw-cs.avi" type="Talk (XviD)" />
<mediafile file="prabhakar-history-of-uw-cs.ogg" type="Talk (Ogg/Theora)" />
<mediafile file="prabhakar-history-of-uw-cs.mpg" type="Talk (MPG)" />
<flvfile file="prabhakar-history-of-uw-cs.flv" />
<other>
<h2>Contact</h2>
<p>If you would like to contact Dr. Ragde check out his <a href="http://www.cs.uwaterloo.ca/~plragde">website</a> or e-mail him at plragde at uwaterloo dot ca.</p>
</other>
</mediaitem>
<mediaitem title="The Future of Robotics and Automated Systems">
<abstract><p>

View File

@ -1,7 +1,20 @@
<?xml version='1.0'?>
<!DOCTYPE newdefs SYSTEM "csc.dtd">
<newsdefs>
<newsdefs>
<newsitem author="ehashman" date="2012-02-27">
<p>
The CSC and AMD are running an <a href="opencl">OpenCL programming contest!</a> If you're interested in winning a laptop or a graphics card, you should <a href="opencl">read more</a> and <a href="opencl/register">register here</a>.
</p>
<p><b>Registration has been reopened</b> for anyone who did not get a chance to register on time, so make sure you sign up!
</p>
</newsitem>
<newsitem author="m4burns" date="2012-02-13">
<p>
Recorded talks from 2010 to 2012 have been added to the <a href="media">media</a> page.
</p>
</newsitem>
<newsitem author="jy2wong" date="2012-01-12">
<p>
Elections for Winter 2012 have concluded. The following people were elected.</p>

2
opencl/.htaccess Normal file
View File

@ -0,0 +1,2 @@
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI

3
opencl/Makefile Normal file
View File

@ -0,0 +1,3 @@
FILES = index.html register.html register-fail.html register-success.html register.cgi .htaccess openclintro.pdf opencl-problem-set.pdf
RELDIR = opencl/
include ../common.mk

9
opencl/directory.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version='1.0'?>
<!DOCTYPE directory SYSTEM "../csc.dtd">
<directory title="OpenCL">
<diritem title="Register" href="register" />
<diritem title="Submit" href="http://csclub.uwaterloo.ca/~opencl/submit.php" />
<diritem title="Problem Set" href="opencl-problem-set.pdf" />
</directory>

36
opencl/index.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../csc.dtd">
<cscpage title="CSC/AMD OpenCL Competition">
<header />
<section title="CSC/AMD OpenCL Competition">
<p>
The University of Waterloo Computer Science Club and AMD are running an OpenCL programming competition. If you're interested in writing massively parallel software on the OpenCL platform, come register for the competition! You'll have a chance to win an HP laptop or AMD graphics card.
</p>
</section>
<section title="What is this OpenCL of which you speak?">
<p>
On February 16th, 2012, we ran a tutorial on writing OpenCL programs. Slides are available <a href="openclintro.pdf">here.</a> You can drop by our office in MC 3036 to pick up an OpenCL reference book, courtesy of AMD.
</p>
</section>
<section title="EXTERMINATE!">
<p>
You can register to participate in the contest <a href="register">here.</a> If you want to participate and possibly win prizes, you'll need to register between the 16th of February and the submission deadline. On March 2nd, we'll be holding a contest code party. All contestants (and their friends!) are invited; the submissions deadline will be at 11:59 PM. At the conclusion of the party, there will be judging and prizes. Participants will have the chance to win a laptop or AMD graphics card.
</p>
<p>
The problem set is available <a href="opencl-problem-set.pdf">here.</a>
</p>
<p>
For information on electronic submission, <a href="http://csclub.uwaterloo.ca/~opencl/submit.php">click here.</a>
</p>
<p>
If you have any questions, please contact <a href="mailto:exec@csclub.uwaterloo.ca">exec@csclub.uwaterloo.ca</a> or drop by the Computer Science Club in MC 3036. We hope you'll join us!
</p>
</section>
<footer />
</cscpage>

Binary file not shown.

BIN
opencl/openclintro.pdf Normal file

Binary file not shown.

17
opencl/register-fail.xml Normal file
View File

@ -0,0 +1,17 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../csc.dtd">
<cscpage title="CSC/AMD OpenCL Competition Registration">
<header />
<section title="CSC/AMD OpenCL Competition Registration">
<p>
You didn't fill out all required information on the registration form. Please <a href="register">try again</a>.
</p>
</section>
<footer />
</cscpage>

View File

@ -0,0 +1,17 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../csc.dtd">
<cscpage title="CSC/AMD OpenCL Competition Registration">
<header />
<section title="CSC/AMD OpenCL Competition Registration">
<p>
Thank you for registering to participate. Your information has been recorded, and we will be contacting you shortly with further instructions.
</p>
</section>
<footer />
</cscpage>

53
opencl/register.cgi Executable file
View File

@ -0,0 +1,53 @@
#!/usr/bin/env racket
#lang racket
(require srfi/98)
(require net/uri-codec)
(require net/smtp)
(define ERROR-HEADER "Location: register-fail\n\n")
(define SUCCESS-HEADER "Location: register-success\n\n")
(define FRIENDLY-MESSAGE #<<EOF
Thank you for registering in the OpenCL contest. Your information has been recorded.
We'll be emailing you with further details as the registration deadline approaches.
EOF
)
(define (is-user? str) (equal? (list str) (regexp-match #rx"[A-Za-z0-9._]+" str)))
(define (is-email? str) (equal? (list str) (regexp-match #rx"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+" str)))
(define required-fields `( (quest . ,is-user?) (email . ,is-email?)))
(define check-fields '(team open closed))
(define (identity x) x)
(let*
((post-data (form-urlencoded->alist (port->string)))
(required-extract
(map
(lambda(x) (let ((e (assoc (car x) post-data)))
(cond [(false? e) #f]
[((cdr x) (cdr e)) e]
[else #f])))
required-fields))
(check-extract (filter identity (map ((curryr assoc) post-data) check-fields)))
(filled-out? (andmap identity required-extract)))
(when (not filled-out?)
(printf ERROR-HEADER)
(exit 0))
(smtp-send-message
"caffeine.csclub.uwaterloo.ca"
"opencl-contest-registration@csclub"
(list "init512@gmail.com")
"Subject: Contestant registered!\n\n"
(list (with-output-to-string
(lambda() (write (append required-extract check-extract))))))
(smtp-send-message
"caffeine.csclub.uwaterloo.ca"
"exec@csclub.uwaterloo.ca"
(list (cdr (assoc 'email required-extract)))
"Subject: OpenCL Registration Received\n\n"
(list FRIENDLY-MESSAGE))
(printf SUCCESS-HEADER)
(exit 0))

55
opencl/register.xml Normal file
View File

@ -0,0 +1,55 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../csc.dtd">
<cscpage title="CSC/AMD OpenCL Competition Registration">
<header />
<section title="CSC/AMD OpenCL Competition Registration">
<p>
The OpenCL contest will be split into two sections of participants: Open Submission and Problem Set.
</p>
<ul>
<li>
If you choose to participate in the Open Submission section, you will be able to submit any project which runs in the OpenCL environment. Your submission will be judged subjectively by a panel of three judges.
</li>
<br />
<li>
On the other hand, if you participate in the Problem Set section, you will be required to implement several programs to solve a set of problems (released on the 24th). Your submissions will be judged objectively by an electronic judge. In this section, you will be scored on correctness and efficiency.
</li>
<br />
<li>
You may choose to work in a team of up to three people, or alone.
</li>
</ul>
<p>
In order to process your registration, we'll need your Quest ID, an email address, and your choice of team/section participation. Please fill out the form below:
</p>
<p>
<form action="register.cgi" method="post">
<table cellpadding="5px">
<tr>
<td>Quest ID:</td><td><input type="text" name="quest" /></td>
</tr>
<tr>
<td>Email:</td><td><input type="text" name="email" /></td>
</tr>
<tr>
<td>Are you participating with a team?</td><td><input type="checkbox" name="team" value="yes" /></td>
</tr>
<tr>
<td>Problem type:</td><td><input type="checkbox" name="open" value="yes" /> Open Submission
<input type="checkbox" name="closed" value="yes" /> Problem Set</td>
</tr>
<tr>
<td></td><td><input type="submit" name="Register" value="Register" /></td>
</tr>
</table>
</form>
</p>
</section>
<footer />
</cscpage>

View File

@ -90,9 +90,13 @@
<section title="Library">
<p>
The CSC maintains an extensive collection of Computer Science related books.
CSC members are free to borrow most of the books in the library. Certain
books must remain in the club office, and can be read there.
The CSC maintains an <a href="http://csclub.uwaterloo.ca/library/">
extensive collection of Computer Science-related books</a>.
We currently do not have the infrastructure to lend books out (if you
would like to help out with this, contact the current
<a href="http://csclub.uwaterloo.ca/about/positions">librarian</a>),
but all members are welcome to use our library as long as the books
remain within the club office.
</p>
</section>

3
unix102/Makefile Normal file
View File

@ -0,0 +1,3 @@
FILES = index.html cheatsheet.pdf unix101.pdf vim_exercise.tar appender.sh tickets_email.sh walkc.sh queue.txt
RELDIR = unix102/
include ../common.mk

11
unix102/appender.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
while [ ${#} != 0 ]; do
echo "${1}:"
cat "${1}"
echo ""
shift
done
exit 0

BIN
unix102/cheatsheet.pdf Normal file

Binary file not shown.

7
unix102/directory.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version='1.0'?>
<!DOCTYPE directory SYSTEM "../csc.dtd">
<directory title="UNIX 102">
<diritem title="Cheat Sheet" href="cheatsheet" />
</directory>

122
unix102/index.xml Normal file
View File

@ -0,0 +1,122 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../csc.dtd">
<cscpage title="UNIX 102 Tutorial Information">
<header />
<section title="UNIX 102 Reference Material">
<p>
This page contains some <a href="http://programmerryangosling.tumblr.com/">links</a> to material covered during UNIX 101 and 102,
as well as some extracurricular content for you to review in your free
time.
</p>
<p>
The text file for the great editor race is available <a href="queue.txt">here</a>.
</p>
<p>
To begin with the first exercise, you will need the following file.
To download it and untar it, execute the following commands:
<pre>
wget http://csclub.uwaterloo.ca/unix102/vim_exercise.tar
tar -xvf vim_exercise.tar
</pre>
</p>
<p>
You can also download the <a href="unix101.pdf">slides</a> or <a href="cheatsheet.pdf">cheatsheet</a> handout from UNIX 101.
</p>
</section>
<section title="vim References">
<p>
First and foremost, make sure you have tried running vimtutor. This
program is available on the CSC systems, as well as the student.cs and
student.math environments. Try the following commands from a shell:
<pre>
ssh userid@linux.student.cs.uwaterloo.ca
vimtutor
</pre>
This <a href="http://newbiedoc.sourceforge.net/text_editing/vim.html#BUILT-IN-HELP-VIM">document</a> from sourceforge should also prove to be useful.
</p>
</section>
<section title="bash References">
<p>
From the GNU bash reference manual (a very good source of information,
albeit a little arcane and verbose):
</p>
<ul>
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#What-is-a-shell_003f">What is a shell?</a></li>
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Redirections">Redirecting input/output</a></li>
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Pattern-Matching">Globbing</a></li>
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Quoting">Quotes/escapes</a></li>
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Compound-Commands">Conditional and looping constructs</a></li>
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Shell-Parameters">Shell variables</a> (including <a href="http://www.gnu.org/software/bash/manual/bash.html#Special-Parameters">special variables</a>)</li>
</ul>
<p>
Here are some example bash scripts covered in today's lecture:
</p>
<ul>
<li>Simple script whose parameters are any number of text files, that will
print all the files and filenames to standard output: <a href="appender.sh">appender</a></li>
<li>RunC clone, that takes in a filename and executes all the tests it
can find for it in the current directory: <a href="walkc.sh">WalkC</a></li>
<li>Script that scrapes concert website for tickets and sends emails/text
messages when tickets are available: <a href="tickets_email.sh">tickets_email</a></li>
</ul>
</section>
<section title="Regular Expression References">
<p>
This
<a href="http://www.regular-expressions.info/quickstart.html">page</a>
is a good brief reference for regular expressions.
</p>
</section>
<section title="git References">
<p>
Look to the <a href="http://gitref.org/index.html">gitref</a> for a git
reference, of course. As well, here's an article I found claiming to list
the <a href="http://sixrevisions.com/resources/git-tutorials-beginners/">top 10 git tutorials</a>.
Whether or not that's true, you should still learn something.
Here is also a brief review of the commands we intended to cover today.
</p>
<p> This clones a copy of the codebase for you to work on locally:
<pre>
git clone
</pre>
This "pulls" (updates with) any new changes others have made since you last
worked on the code, so they are now part of your local code:
<pre>
git pull
</pre>
This adds new files to the git repository:
<pre>
git add [files]
</pre>
This commits any of the changes that you've recently made in [files] (or -a
for everything), getting ready to "push" the changes to other users:
<pre>
git commit [files] (-a)
</pre>
This "pushes" (sends) your changes back to the "master" repository,
allowing other people working on the project to "pull" your changes.
<pre>
git push
</pre>
</p>
</section>
<section title="Beyond UNIX 10X">
<p>
You might be surprised - almost all the information on this page was at
one point found using Google. Remember, your best resources for learning
more about UNIX are your friends, your manpages, and the internet. So
fire up your favorite search engine, and get learning!
</p>
</section>
<footer />
</cscpage>

100
unix102/queue.txt Normal file
View File

@ -0,0 +1,100 @@
#include <stdio.h>
#include <stdlib.h>
struct list {
int head;
struct list *tail;
};
typedef struct list list;
typedef struct {
list *front;
list *back;
} queue;
void list_free(list *lst) {
list *p;
while (lst != NULL) {
p = lst;
lst = lst->tail;
free(p);
}
}
list * cons(int val, list *lst) {
list *new = malloc(sizeof(list));
if (new == NULL) abort();
new->head = val;
new->tail = lst;
return new;
}
void list_print(list *lst) {
list *p = lst;
while (p != NULL) {
printf("%d ", p->head);
p = p->tail;
}
}
queue * make_queue() {
queue *new = malloc(sizeof(queue));
if (new == NULL) abort();
new->front = NULL;
new->back = NULL;
return new;
}
void push(int val, queue *q) {
if (q->front == NULL) { // empty queue
q->front = cons(val, NULL);
q->back = q->front;
}
else {
list *new = cons(val, NULL);
(q->back)->tail = new;
q->back = new;
}
}
int pop(queue *q) {
int val = (q->front)->head;
list *newhead = (q->front)->tail;
(q->front)->tail = NULL;
list_free(q->front);
q->front = newhead;
return val;
}
void queue_print(queue *q) {
printf("back ");
list_print(q->front);
printf("front\n");
}
void queue_free(queue *q) {
list_free(q->front);
free(q);
}
int main() {
queue *q = make_queue();
push(5, q);
push(3, q);
push(1, q);
queue_print(q);
printf("popped %d!\n", pop(q));
queue_print(q);
queue_free(q);
return 0;
}

28
unix102/tickets_email.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
# Sends email when Beta tickets are available.
TEST=`mktemp`
wget -q --no-check-certificate https://ticketdriver.com/betawater/buy/tickets/ -O ${TEST}
LINEMATCH=`mktemp`
egrep '2012-04-13|Laidback|Luke' ${TEST} >> ${LINEMATCH}
if [ $? = 0 ]; then
SUBJECT="BUY BETA TICKETS"
EMAIL=$1
EMAILBODY=`mktemp`
NUMBER=$2
echo "tickets_email: Tickets available!!
https://ticketdriver.com/betawater/buy/tickets/" >> "${EMAILBODY}"
echo -e "\nMatching line: " >> "${EMAILBODY}"
cat "${LINEMATCH}" >> "${EMAILBODY}"
mail -s "${SUBJECT}" "${EMAIL}" < "${EMAILBODY}"
if [ $NUMBER -n "" ]; then
echo "go buy tickets" | mail -s "${SUBJECT}" "${NUMBER}@msg.telus.com"
fi
rm "${EMAILBODY}"
fi
rm "${TEST}" "${LINEMATCH}"

BIN
unix102/unix101.pdf Normal file

Binary file not shown.

BIN
unix102/vim_exercise.tar Normal file

Binary file not shown.

11
unix102/walkc.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
BASE=`basename $1 .c`
gcc -Wall $1 -o $BASE
for TEST in $BASE.in.*
do
OUT=`echo -n $TEST | sed -e s/in/out/`
./$BASE < $TEST > $OUT
done

View File

@ -89,7 +89,7 @@
</p><p>
Copyright
<xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2007
2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2012
Computer Science Club of the University of Waterloo.
</p>
</div>