Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set timezone
uses: szenius/[email protected]
with:
timezoneLinux: "America/New_York"
- name: Checkout
uses: actions/checkout@main
- name: Install dependencies
Expand Down
23 changes: 23 additions & 0 deletions www/colophon.scrbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#lang scribble/base
@(require racket/date
racket/port
racket/system
racket/string)

@(define (shell s)
(with-output-to-string (λ () (system s))))

@(define (i s)
(item (verbatim (shell s))))

@title[#:style '(unnumbered)]{Colophon}

This document (@string-trim[(shell "git rev-parse --short HEAD")]) was produced on @(date->string (current-date) #t).

System information:
@itemlist[
(i "uname -srm")
(i "racket --version")
(i "raco pkg show -lu a86 langs")
(i "nasm --version")
(i "gcc --version")]
25 changes: 25 additions & 0 deletions www/defns.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
(list (list "Pierce Darragh" "[email protected]")
(list "Benjamin Quiring" "[email protected]")
(list "Kalyan Bhetwal" "[email protected]")
(list "Abhi Senthilkumar" "[email protected]")
(list "Zhongqi Wang" "[email protected]")
(list "Kazi Tasnim Zinat" "[email protected]")))

Expand All @@ -64,3 +65,27 @@
"Thursday, November 20, 11:59PM"
"Thursday, December 4, 11:59PM")
(sub1 i)))

(define office-hours
(itemlist
#:style 'compact
(item "Monday"
(itemlist
(item "9:00am–12:00pm — Zhonqi")
(item "12:00pm–3:00pm — Ben")
(item "3:00pm–6:00pm — Abhi")))
(item "Tuesday"
(itemlist
(item "11:00am–2:00pm - Abhi")
(item "5:00pm–8:00pm - Kalyan (IRB, 2nd Floor)")))
(item "Wednesday"
(itemlist
(item "9:00am–12:00pm — Zhonqi")
(item "12:00pm–3:00pm — Ben")))
(item "Thursday"
(itemlist
(item "10:00am–1:00pm — Zinat")
(item "5:00pm–8:00pm — Kalyan (IRB, 2nd Floor)")))
(item "Friday"
(itemlist
(item "11:00am–2:00pm — Zinat")))))
68 changes: 14 additions & 54 deletions www/main.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@
"defns.rkt"
"utils.rkt")

@(define (blockquote . strs)
(make-nested-flow (make-style "blockquote" '(command))
(decode-flow strs)))


@(define accessible
(style #f (list (js-addition "js/accessibility.js")
(attributes '((lang . "en"))))))

@title[#:style accessible @courseno]{: Design and Implementation of Programming Languages}
@title[#:style accessible @courseno]{: Design and Implementation of
Programming Languages}

@image[#:scale 1/2 #:style float-right]{img/wizard.png}

Expand All @@ -40,61 +36,24 @@ implement several related languages.
#;(list prof2 prof2-email)
staff)]


@;{
@tabular[#:style 'boxed
#:row-properties '(bottom-border ())
(list (list @bold{Time} @bold{Monday} @bold{Tuesday} @bold{Wednesday} @bold{Thursday} @bold{Friday})
(list "8 AM" 'cont 'cont 'cont 'cont 'cont)
(list "9 AM" 'cont 'cont 'cont 'cont 'cont)
(list "10 AM" 'cont 'cont 'cont 'cont 'cont)
(list "11 AM" 'cont 'cont 'cont 'cont 'cont)
(list "12 PM" 'cont 'cont 'cont 'cont 'cont)
(list "1 PM" 'cont 'cont 'cont 'cont 'cont)
(list "2 PM" 'cont 'cont 'cont 'cont 'cont)
(list "3 PM" 'cont 'cont 'cont 'cont 'cont)
(list "4 PM" 'cont 'cont 'cont 'cont 'cont)
(list "5 PM" 'cont 'cont 'cont 'cont 'cont))]
}

@bold{Communications:} @link[@elms-url]{ELMS}, @link[@piazza]{Piazza}

@bold{Assumptions:} This course assumes you know the material in CMSC 330 and
CMSC 216. In particular, you need to know how to program in a functional
programming language like OCaml and some familiarity with programming in C and
Assembly. See the @seclink["Texts"]{Texts} page for references to brush up on
this material.
@bold{Assumptions:} This course assumes you know the material in CMSC
330 and CMSC 216. In particular, you need to know how to program in a
functional programming language like OCaml and some familiarity with
programming in C and Assembly. See the @seclink["Texts"]{Texts} page
for references to brush up on this material.

@bold{Disclaimer:} All information on this web page is tentative and subject to
change. Any substantive change will be accompanied with an announcement to the
class via ELMS.
@bold{Disclaimer:} All information on this web page is tentative and
subject to change. Any substantive change will be accompanied with an
announcement to the class via ELMS.

@bold{Feedback:} We welcome anonymous feedback on the course and its
staff using this @link[feedback]{form}.

@bold{TA office hours:} @office-hour-location

@itemlist[
#:style 'compact
@item{Monday
@itemlist[
@item{9:00–12:00 — Zhonqi}
@item{12:00–3:00 — Ben}
@item{3:30–6:30 — Kalyan}]}
@item{Tuesday}
@item{Wednesday
@itemlist[
@item{9:00–12:00 — Zhonqi}
@item{12:00–3:00 — Ben}
@item{3:30–6:30 — Kalyan}]}
@item{Thursday
@itemlist[
@item{10:00–1:00 — Zinat}]}
@item{Friday
@itemlist[
@item{11:00–2:00 — Zinat}
@item{1:00–4:00 — Kalyan}]}
]
@bold{TA office hours:} @office-hour-location (unless otherwise noted)

@office-hours

@include-section{syllabus.scrbl}
@include-section{texts.scrbl}
Expand All @@ -104,3 +63,4 @@ staff using this @link[feedback]{form}.
@include-section{midterms.scrbl}
@include-section{project.scrbl}
@include-section{software.scrbl}
@include-section{colophon.scrbl}
18 changes: 8 additions & 10 deletions www/notes/a86.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ underscore, while on Linux you do not. So on a Mac, you would use the
names @tt{_entry}, @tt{_tri}, and @tt{_done}, while on Linux you would
use @tt{entry}, @tt{tri}, and @tt{done}.

This example is shown using the @(if (eq? (system-type 'os) 'macosx)
"MacOS" "Linux") naming convention, because that's what operating
system was used when this web page was built.}
Alternatively, you can impose the underscore naming convention by
passing @tt{--gprefix _} to @tt{nasm}; this way you avoid having to
write the underscores within the file.}

@filebox-include[fancy-nasm a86 "tri.s"]

Expand Down Expand Up @@ -246,13 +246,15 @@ stack or use the @tt{call} instruction.}
We can compile the @tt{tri.s} assembly program to an object
file with @tt{nasm}:

@margin-note{The format argument should be @tt{macho64} on
Mac OS and @tt{elf64} on Linux.}
@margin-note{The format argument should be @tt{macho64} on macOS and
@tt{elf64} on Linux. The @tt{--gprefix _} argument should be given
on macOS in order to follow the system's naming convention
requirements.}

@shellbox[
(format "nasm -f ~a -o tri.o tri.s"
(if (eq? 'macosx (system-type 'os))
"macho64"
"macho64 --gprefix _"
"elf64"))]

To run the object file, we will need to link with a small C program
Expand Down Expand Up @@ -407,10 +409,6 @@ program using nasm notation, called @racket[asm-display]. Calling
this function prints to the current output port, but it's also
possible to write the output to a file or convert it to a string.

@margin-note{The @racket[asm-display] function knows what OS you are
using and adjusts the label naming convention to use underscores or
not, so that you don't have to worry about it.}

@ex[
(asm-display (tri 36))
]
Expand Down