forked from Duke-PL-Course/duke-pl-course.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
721 lines (298 loc) · 18.6 KB
/
index.html
File metadata and controls
721 lines (298 loc) · 18.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Duke PL Course</title>
<meta name="author" content="Yang Su, Kevin Gao">
<meta name="description" content="Welcome Fall 2013 Students Aug 27th, 2013 | Comments Welcome Everyone This is the main course website. The earlier posts are for the previous …">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://Duke-PL-Course.github.com/">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/atom.xml" rel="alternate" title="Duke PL Course" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37844085-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body >
<header role="banner" id="sidebar">
<!-- Logo -->
<aside id="logo" class="clearfix">
<div class="clearfix">
<a href="/">Duke PL Course</a>
</div>
</aside>
<ul id="menu">
<li class="title">
<h1 id="title"><a href="/">Duke PL Course</a></h1>
</li>
<li class="link">
<a href="/about/">about</a>
</li>
<li class="link">
<a href="/course-information/">course info</a>
</li>
<li class="link">
<a href="/assignments/">assignments</a>
</li>
<li class="link">
<a href="/slides/">slides</a>
</li>
<li class="link">
<a href="/resources/">resources</a>
</li>
<li class="link">
<a href="http://dukeplcourse.com">autograder</a>
</li>
<li class="link">
<a href="http://github.com/duke-pl-course/">github</a>
</li>
<li class="link rss">
<a href="/atom.xml">rss feed</a>
</li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:Duke-PL-Course.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<!-- Octopress Love -->
<aside id="octopress_linkback">
<a href="http://octopress.org/">
<span class="unicode_square">
<span class="unicode_circle">
</span>
</span>
<span class="octopress">Powered by Octopress</span>
</a>
</aside>
</header>
<section id="main">
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/08/27/welcome-fall-2013-students/">Welcome Fall 2013 Students</a>
</h2>
<p class="meta">
<time datetime="2013-08-27T14:35:00-04:00" pubdate data-updated="true">Aug 27<span>th</span>, 2013</time>
| <a href="/blog/2013/08/27/welcome-fall-2013-students/#disqus_thread">Comments</a>
</p>
</header>
<p><strong>Welcome Everyone</strong></p>
<p>This is the main course website. The earlier posts are for the previous semester, but you may look through them if you wish. Assignments and readings will be posted weekly on the <a href="/assignments">assignments</a> page (there's already one up). Instructions on setting up your programming environment for this class are on the <a href="/resources">resources</a> page.</p>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/05/06/congratulations/">Congratulations!</a>
</h2>
<p class="meta">
<time datetime="2013-05-06T11:33:00-04:00" pubdate data-updated="true">May 6<span>th</span>, 2013</time>
| <a href="/blog/2013/05/06/congratulations/#disqus_thread">Comments</a>
</p>
</header>
<p><strong>Congratulations!</strong></p>
<p>You've completed the Programming Languages house course. We hope that you have enjoyed the course as much as we did.</p>
<p>We've learned so much from creating and teaching the course, from spending hours and hours to prepare enough material to fill a 3 hour lecture, to trying to find many different ways to simply the explanation to a difficult concept, to creating assignments that were just difficult enough to challenge you, to stumbling sometimes during lecture to answer your questions when completely thinking on our feet. We thank you for your patience and support throughout the course, as we participated in this experiment.</p>
<p>We are also happy to announce that Jim Posen, one of our students, will teach this course again in the Fall semester. We have complete confidence in Jim and his ability to master and teach the material. If you've enjoyed the course, please help it continue!</p>
<p>The materials and resources we've created and collected for the course are now all online on this website and open source in our <a href="https://github.com/duke-pl-course/">Github Organization</a>. If you have anything to contribute, please send a pull request and we will gladly add it.</p>
<p>Thank you again! And have a fantastic summer!</p>
<p>Best,<br>
<em>Kevin and Yang</em></p>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/04/25/pl-design/">Final Assignment: Program Language Design</a>
</h2>
<p class="meta">
<time datetime="2013-04-25T20:29:00-04:00" pubdate data-updated="true">Apr 25<span>th</span>, 2013</time>
| <a href="/blog/2013/04/25/pl-design/#disqus_thread">Comments</a>
</p>
</header>
<p><strong>Due Thursday, May 2, 2013</strong></p>
<h2 id="toc_818350">Overview</h2>
<p>For your final assignment, you will be tasked with designing your very own programming language!</p>
<p>Please fork this repository and modify the <a href="/assignment.md"><code>assignment.md</code></a> document. We have provided a skeleton for your design document. Each section outlines some of the key points that you should discuss. Under each section are a series of bullet points that provide some considerations you may or may not want to talk about. You shouldn't incorporate all of them - they are just suggestions to get the ball rolling.</p>
<p>When discussing the decisions you have made in designing your language, please justify each and weigh the pros and cons. Simply stating that your programming language is an "interpreted, imperative, hybrid functional/object-oriented, dynamically-typed, generic, garbage-collected language" isn't enough.</p>
<h2 id="toc_818351">Things to Remember</h2>
<p>In particular, you should design your language with specific goals and use cases in mind. Whether you're designing a <a href="http://en.wikipedia.org/wiki/Domain-specific_language">domain-specific language</a> or general purpose language, you are still going to need to optimize and make decisions with a purpose in mind.</p>
<p>We're focusing on the <a href="http://en.wikipedia.org/wiki/Semantics#Computer_science">semantics</a> of your language, not the <a href="http://en.wikipedia.org/wiki/Syntax_(logic)">syntax</a>. Syntax will show through in your code examples; however, you may want to consider how the <a href="http://en.wikipedia.org/wiki/Chomsky_hierarchy">grammar</a> of your language is going to be structured.</p>
<p>Make sure that your language actually comes together as a whole. Don't mash together contradictory features just for the sake of doing so.</p>
<p>Remember, there's a trade-off to everything.</p>
<p>Sometimes less is more.</p>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/04/25/erlang/">Erlang, Clojure, and Haskell Slides</a>
</h2>
<p class="meta">
<time datetime="2013-04-25T20:21:00-04:00" pubdate data-updated="true">Apr 25<span>th</span>, 2013</time>
| <a href="/blog/2013/04/25/erlang/#disqus_thread">Comments</a>
</p>
</header>
<p>Congratulations! We have finished the last of the seven languages, Haskell.</p>
<p>The slides for <a href="/slides/erlang.html">Erlang</a>, <a href="/slides/clojure.html">Clojure</a>, and <a href="/slides/haskell.html">Haskell</a> can be found on the <a href="/slides/">course website</a>.</p>
<p>Please direct any questions to the issues pages of respective language repository on <a href="https://github.com/duke-pl-course/">Github</a>.</p>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/03/26/in-class-exercises-solutions/">In Class Exercises Solutions</a>
</h2>
<p class="meta">
<time datetime="2013-03-26T13:00:00-04:00" pubdate data-updated="true">Mar 26<span>th</span>, 2013</time>
| <a href="/blog/2013/03/26/in-class-exercises-solutions/#disqus_thread">Comments</a>
</p>
</header>
<p>Solutions to the <a href="blog/2013/02/26/review-problems-for-ruby/">Review Problems for Ruby, JavaScript, Prolog, and Scala</a>.</p>
<ol>
<li><a href="https://github.com/Duke-PL-Course/Ruby/blob/master/lcd.rb">Ruby - LCD Numbers Solutions</a></li>
<li><a href="https://github.com/Duke-PL-Course/JavaScript/blob/master/review/review.js">JavaScript - Identifying Child Elements Solutions</a></li>
<li><a href="https://github.com/Duke-PL-Course/Prolog/blob/master/partition.pro">Prolog - Partition and Partition with index Solutions</a></li>
<li><a href="https://github.com/Duke-PL-Course/Scala/blob/master/qsort.scala">Scala - Quick Sort Solutions</a></li>
</ol>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/03/06/github-notifications/">Github Notifications</a>
</h2>
<p class="meta">
<time datetime="2013-03-06T18:05:00-05:00" pubdate data-updated="true">Mar 6<span>th</span>, 2013</time>
| <a href="/blog/2013/03/06/github-notifications/#disqus_thread">Comments</a>
</p>
</header>
<h2 id="toc_818349">Turn on your GitHub Notifications</h2>
<p>Go to your <a href="https://github.com/settings/notifications">settings/notifications</a> and make sure you check the email boxes for both notification types to get our announcements in email.</p>
<p><img src="/images/github-notifs.png" alt="GitHub Notifications Settings"></p>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/02/26/review-problems-for-ruby/">Review Problems for Ruby, JavaScript, Prolog, and Scala</a>
</h2>
<p class="meta">
<time datetime="2013-02-26T16:49:00-05:00" pubdate data-updated="true">Feb 26<span>th</span>, 2013</time>
| <a href="/blog/2013/02/26/review-problems-for-ruby/#disqus_thread">Comments</a>
</p>
</header>
<p>We have written 4 review problems for the lecture today, one for each of the four languages we've covered thus far.</p>
<p>The problems can be found below:</p>
<ol>
<li><a href="https://github.com/Duke-PL-Course/Ruby/blob/master/2013-02-26-ruby-review-problem.md">Ruby Review Problem - LCD Numbers</a></li>
<li><a href="https://github.com/Duke-PL-Course/JavaScript/blob/master/2013-02-26-javascript-review-problem.md">JavaScript Review Problem - Identifying Child Elements</a></li>
<li><a href="https://github.com/Duke-PL-Course/Prolog/blob/master/2013-02-26-prolog-review-problem.md">Prolog Review Problem - Partition and Partition with index</a></li>
<li><a href="https://github.com/Duke-PL-Course/Scala/blob/master/2013-02-26-scala-review-problem.md">Scala Review Problem - Quick Sort</a></li>
</ol>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/02/26/prolog-assignment/">Prolog Assignment</a>
</h2>
<p class="meta">
<time datetime="2013-02-26T14:46:00-05:00" pubdate data-updated="true">Feb 26<span>th</span>, 2013</time>
| <a href="/blog/2013/02/26/prolog-assignment/#disqus_thread">Comments</a>
</p>
</header>
<p>We have finally finished writing the Prolog assignment. It includes <strong>three</strong> problems, with one optional extension and one bonus problem. The assignment will be due <strong>next Wednesday, March 6 at 11:59PM</strong>.</p>
<p>The assignment document is called <a href="https://github.com/Duke-PL-Course/Prolog/blob/master/2013-02-18-assignment.md">2013-02-18-assignment.md</a> and the skeleton files can be found under the <a href="https://github.com/Duke-PL-Course/Prolog/tree/master/assignments">assignments</a> folder.</p>
<p>Please remember to fork the <a href="https://github.com/Duke-PL-Course/Prolog">Prolog repo</a> and push your solutions to your forked repo. You can always manually submit to the <a href="http://dukeplcourse.com">autograder</a>.</p>
<p>The slides from lecture can be found <a href="/slides/prolog.html">here</a>.</p>
<p>The <a href="https://github.com/Duke-PL-Course/Prolog/blob/master/2013-02-18-assignment.md">Prolog Assignment</a> is now live and complete. </p>
<p>Again, please feel free to post questions on <a href="https://github.com/Duke-PL-Course/Prolog/issues?state=open">issues</a>.</p>
<p>Hope you will find this assignment to be slightly easier.</p>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/02/18/javascript-assignment-solutions-released/">JavaScript Assignment Solutions Released</a>
</h2>
<p class="meta">
<time datetime="2013-02-18T02:15:00-05:00" pubdate data-updated="true">Feb 18<span>th</span>, 2013</time>
| <a href="/blog/2013/02/18/javascript-assignment-solutions-released/#disqus_thread">Comments</a>
</p>
</header>
<p>We have released the <a href="https://github.com/Duke-PL-Course/JavaScript/tree/master/assignments">solutions to the JavaScript assignment</a>.</p>
<p>This assignment is quite a bit shorter and easier than the Ruby assignment. </p>
<p>The only tricky part to the assignment has to do with the seed values for the reduce function in <a href="https://github.com/Duke-PL-Course/JavaScript/blob/master/assignments/q4-reduce.js">question #4</a>. Take a look at the <a href="https://github.com/Duke-PL-Course/JavaScript/blob/master/assignments/q4-reduce.js#L3-L7">solution to the problem</a> for how to properly detect whether the optional seed value is passed in and provide the correct default seed value if it's not.</p>
</article>
<article class="post">
<div class="sharing-box">
</div>
<header>
<h2 class="entry-title">
<a href="/blog/2013/02/18/prolog-in-class-problems-solutions/">Prolog In-Class Problems Solutions</a>
</h2>
<p class="meta">
<time datetime="2013-02-18T01:56:00-05:00" pubdate data-updated="true">Feb 18<span>th</span>, 2013</time>
| <a href="/blog/2013/02/18/prolog-in-class-problems-solutions/#disqus_thread">Comments</a>
</p>
</header>
<p>In the second Prolog lecture, we posed the 3 practice problems from the textbook:</p>
<ul>
<li>Reverse the elements of a list</li>
<li>Find the smallest element of a list</li>
<li>Sort the elements of a list</li>
</ul>
<p>While these are not problems particularly well-suited for Prolog, at least not in the same way as <a href="http://duke-pl-course.github.com/slides/prolog.html#48">Sudoku</a> and <a href="http://duke-pl-course.github.com/slides/prolog.html#56">Queens</a> are, they aim to help you understand how to using recursion with lists. This is one of the most important and most commonly used technique to help you describe and solve problems in Prolog.</p>
<p>We have posted <a href="https://github.com/Duke-PL-Course/Prolog/blob/master/2013-02-05-book-problems-solutions.md#do-1">our solutions</a> to these three problems. Please take a look and feel free to post any questions on <a href="https://github.com/Duke-PL-Course/Prolog/issues?state=open">Github</a>.</p>
<p>We will also briefly go over these solutions at the beginning of our next class.</p>
</article>
<nav role="navigation" id="pagination">
<span class="next">
<a href="/blog/page/2/" rel="next">Continue →</a>
</span>
</nav>
</section>
<script type="text/javascript">
var disqus_shortname = 'dukeplcourse';
var disqus_script = 'count.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
</body>
</html>