Edit blog posts to be more clear on home page

This commit is contained in:
Isaac 2022-09-12 10:18:32 -03:00
parent f0d6812187
commit f826a9c3a3
4 changed files with 55 additions and 12 deletions

View File

@ -1,7 +1,6 @@
Title: Lab One
Date: 2022-09-12T08:50:12
Tags: cs2163, lab, frog, git
# Lab One
In this lab we learned about how to use frog and git, and how to interact with the university git remote.
<!-- more -->
## Frog

View File

@ -1,10 +1,42 @@
Title: lab two
Title: Lab Two
Date: 2022-09-12T08:43:16
Tags: DRAFT
_Replace this with your post text. Add one or more comma-separated
Tags above. The special tag `DRAFT` will prevent the post from being
published._
Tags: cs2163, lab, git, racket
In this lab we learned more about git, and using racket to draw shapes
<!-- more -->
## Additional Git Information
Git grep was useful in finding any file with the given content I am looking for without having to open all of them to find what I am looking for. This would have been useful to know before I removed the social media links without grep.
Git status was useful in showing the status of my changes, and the added and untracked files.
I also used `raco frog --clean` to keep my git repository clean before commiting.
Git log showed me the history of my project's commits, which was useful in reminding myself what I had done the previous lab
## Racket Introduction
Running racket from the command line was not too hard and the display bug was fixed by simply using the `displayln` function instead of `display`
DrRacket is a Racket IDE with a REPL. REPL stands for read-evaluate-print-loop, which is what the racket repl does.
In DrRacket, I used the circle function (`(circle 10)`), the rectangle function (`(rectangle 10 20`) and that the error that is given when you try to run a function with too many arguments. I also learned how to combine the output (append) the output of two functions together.
I learned how to define names for a specific function call, like saving the function `(circle 10)` as variable `c`. Appending the output of defined functions also works. For example `(hc-append c c)` would print `(circle 10)` twice.
You can also use this functionality to define functions, for example, give your define statement an argument and you can use that within the rest of the define statement. This is best examplained by showing that `(define (square n) (filled-rectangle n n))` will define a square by using the pre-existing filled rectangle function.
In racket you can create what are known as "local bindings" which are functions that are local (belong to) a parent function. You can define these individually with another define function, or to define them by using `let` or `let*`, with the latter letting later bindings use earlier bindings. Both of them let you define more than one binding at once.
It was also noted how identifiers were scoped within a language, with a function arguemnt being avialable throughout the function, and when a variable is not in scope, it does not "exist" so can therefor be defined again, like in this example
```
(define (rgb-series mk)
(vc-appned
(series (lamda (sz) (colorize (mk sz) "red")))
(series (lamda (sz) (colorize (mk sz) "green")))
(series (lamda (sz) (colorize (mk sz) "blue")))))
```
This shows that sz can be defined multiple times because within a given series each sz is only within the scope of the series, and each sz is therefor unique.
Lists in Racket are very important and this can be seen through the way functions map onto lists. As shown in the documentation you can map a list of squares to a colorize function which contains a list of colors. You can also apply things to lists.
Racket also features a module system, which is where you declare the set of the language you are working on with the `#lang` keyword. You can also import additional libraries with the `require` keyword. You can install modules from racket files or from the raco package manager that comes with Racket.

View File

@ -6,7 +6,7 @@
<title>CS2163 Blog</title>
<meta name="description" content="CS2163 Blog">
<meta name="author" content="Isaac Shoebottom">
<meta name="keywords" content="frog, lab, all, git, cs2163">
<meta name="keywords" content="frog, lab, all, git, racket, cs2163">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="/favicon.ico">
<link rel="canonical" href="http://www.example.com/index.html">
@ -57,7 +57,7 @@
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="/tags/cs2163.html">cs2163</a><a class="dropdown-item" href="/tags/frog.html">frog</a><a class="dropdown-item" href="/tags/git.html">git</a><a class="dropdown-item" href="/tags/lab.html">lab</a>
<a class="dropdown-item" href="/tags/cs2163.html">cs2163</a><a class="dropdown-item" href="/tags/frog.html">frog</a><a class="dropdown-item" href="/tags/git.html">git</a><a class="dropdown-item" href="/tags/lab.html">lab</a><a class="dropdown-item" href="/tags/racket.html">racket</a>
</div>
</li>
@ -97,12 +97,23 @@
<p class='authors'>By: <span class="authors">Isaac Shoebottom</span></p>
</header>
<h1 id="lab-one">Lab One</h1>
<p>In this lab we learned about how to use frog and git, and how to interact with the university git remote.</p>
<footer>
<a href='/2022/09/lab-one.html'>&hellip; more &hellip;</a>
</footer>
</article>
<article>
<header>
<h2><a href='/2022/09/lab-two.html'>Lab Two</a></h2>
<p class='date-and-tags'>
<time datetime="2022-09-12" pubdate="true">2022-09-12</time> - <span class="tags"><a href="/tags/cs2163.html">cs2163</a>, <a href="/tags/lab.html">lab</a>, <a href="/tags/git.html">git</a>, <a href="/tags/racket.html">racket</a></span></p>
<p class='authors'>By: <span class="authors">Isaac Shoebottom</span></p>
</header>
<p>In this lab we learned more about git, and using racket to draw shapes</p>
<footer>
<a href='/2022/09/lab-two.html'>&hellip; more &hellip;</a>
</footer>
</article>
</div>
</div>

View File

@ -1,2 +1,3 @@
http://www.example.com/2022/09/lab-one.html
http://www.example.com/2022/09/lab-two.html
http://www.example.com/About.html