Lepsi izpis

main
Jurij Podgoršek 2024-04-21 17:31:29 +02:00
parent c41ba55b2c
commit ff6a2c7240
2 changed files with 66 additions and 78 deletions

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2024-04-21 ned 17:14 -->
<!-- 2024-04-21 ned 17:31 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Zapiski #1 srečanja programerskega bralnega krožka SICP</title>
@ -198,13 +198,13 @@
<div id="content" class="content">
<h1 class="title">Zapiski #1 srečanja programerskega bralnega krožka SICP</h1>
<div id="outline-container-org64c99ec" class="outline-2">
<h2 id="org64c99ec">Zanimivi izseki</h2>
<div class="outline-text-2" id="text-org64c99ec">
<div id="outline-container-orgdb45ffb" class="outline-2">
<h2 id="orgdb45ffb">Zanimivi izseki</h2>
<div class="outline-text-2" id="text-orgdb45ffb">
</div>
<div id="outline-container-org194a9b6" class="outline-3">
<h3 id="org194a9b6">str. 9</h3>
<div class="outline-text-3" id="text-org194a9b6">
<div id="outline-container-orgdb3a94c" class="outline-3">
<h3 id="orgdb3a94c">str. 9</h3>
<div class="outline-text-3" id="text-orgdb3a94c">
<blockquote>
<p>
Every reader should ask himself periodically "Toward what end, toward what end?" — but do not ask it too often lest you pass up the fun of programming for the constipation of bittersweet philosophy.
@ -218,9 +218,9 @@ Lisp is a survivor, having been in use for about a quarter of a century.
</blockquote>
</div>
</div>
<div id="outline-container-org693632b" class="outline-3">
<h3 id="org693632b">str. 11</h3>
<div class="outline-text-3" id="text-org693632b">
<div id="outline-container-orgd838ad3" class="outline-3">
<h3 id="orgd838ad3">str. 11</h3>
<div class="outline-text-3" id="text-orgd838ad3">
<blockquote>
<p>
It is better to have 100 functions operate on one data structure than to have 10 functions operate on 10 data structures.
@ -228,9 +228,9 @@ It is better to have 100 functions operate on one data structure than to have 10
</blockquote>
</div>
</div>
<div id="outline-container-orgb667f1c" class="outline-3">
<h3 id="orgb667f1c">str. 18</h3>
<div class="outline-text-3" id="text-orgb667f1c">
<div id="outline-container-orgff036a5" class="outline-3">
<h3 id="orgff036a5">str. 18</h3>
<div class="outline-text-3" id="text-orgff036a5">
<blockquote>
<p>
Thus, programs must be written for people to read, and only incidentally for machines to execute.
@ -238,9 +238,9 @@ Thus, programs must be written for people to read, and only incidentally for mac
</blockquote>
</div>
</div>
<div id="outline-container-orgb73c591" class="outline-3">
<h3 id="orgb73c591">str. 19</h3>
<div class="outline-text-3" id="text-orgb73c591">
<div id="outline-container-org0bcc7c3" class="outline-3">
<h3 id="org0bcc7c3">str. 19</h3>
<div class="outline-text-3" id="text-org0bcc7c3">
<blockquote>
<p>
Underlying our approach to this subject is our conviction that "computer science" is not a science and that its significance has little to do with computers.
@ -248,9 +248,9 @@ Underlying our approach to this subject is our conviction that "computer science
</blockquote>
</div>
</div>
<div id="outline-container-org893e1cb" class="outline-3">
<h3 id="org893e1cb">str. 27</h3>
<div class="outline-text-3" id="text-org893e1cb">
<div id="outline-container-orgab12cbf" class="outline-3">
<h3 id="orgab12cbf">str. 27</h3>
<div class="outline-text-3" id="text-orgab12cbf">
<blockquote>
<p>
Finally, we would like to acknowledge the support of the organizations that have encouraged this work over the years, including support from Hewlett-Packard, made possible by Ira Goldstein and Joel Birnbaum, and support from DARPA, made possible by Bob Kahn.
@ -271,25 +271,25 @@ Preko očeta v sorodu s fizikom Hermanom Kahnom, ki je napisal knjigo o tem kako
</div>
</div>
<div id="outline-container-orge5805a5" class="outline-3">
<h3 id="orge5805a5">str. 77</h3>
<div class="outline-text-3" id="text-orge5805a5">
<div id="outline-container-org8b3d153" class="outline-3">
<h3 id="org8b3d153">str. 77</h3>
<div class="outline-text-3" id="text-org8b3d153">
<p>
Stoy 1977
</p>
</div>
</div>
</div>
<div id="outline-container-org1c63637" class="outline-2">
<h2 id="org1c63637">Vaje</h2>
<div class="outline-text-2" id="text-org1c63637">
<div id="outline-container-org784a7af" class="outline-2">
<h2 id="org784a7af">Vaje</h2>
<div class="outline-text-2" id="text-org784a7af">
</div>
<div id="outline-container-orgafe93de" class="outline-3">
<h3 id="orgafe93de">1.1 Kaj vrnejo izrazi?</h3>
<div id="outline-container-orgfd9bfc3" class="outline-3">
<h3 id="orgfd9bfc3">1.1 Kaj vrnejo izrazi?</h3>
</div>
<div id="outline-container-orgd634413" class="outline-3">
<h3 id="orgd634413">1.2 Pretvori izraz v prefix obliko</h3>
<div class="outline-text-3" id="text-orgd634413">
<div id="outline-container-orgc168141" class="outline-3">
<h3 id="orgc168141">1.2 Pretvori izraz v prefix obliko</h3>
<div class="outline-text-3" id="text-orgc168141">
<div class="org-src-container">
<pre class="src src-scheme"><span style="color: #458588;">(</span>/ <span style="color: #b16286;">(</span>+ 5 4
<span style="color: #8ec07c;">(</span>- 2
@ -307,9 +307,9 @@ Stoy 1977
</pre>
</div>
</div>
<div id="outline-container-org4555def" class="outline-3">
<h3 id="org4555def">1.3 procedura, ki prejme 3 argumente in vrne vsoto kvadratov vecjih dveh</h3>
<div class="outline-text-3" id="text-org4555def">
<div id="outline-container-orgfb17545" class="outline-3">
<h3 id="orgfb17545">1.3 procedura, ki prejme 3 argumente in vrne vsoto kvadratov vecjih dveh</h3>
<div class="outline-text-3" id="text-orgfb17545">
<div class="org-src-container">
<pre class="src src-scheme"><span style="color: #458588;">(</span><span style="color: #fb4933;">define</span> <span style="color: #b16286;">(</span><span style="color: #fabd2f;">vsota-vecjih-kvadratov</span> a b c<span style="color: #b16286;">)</span>
<span style="color: #b16286;">(</span><span style="color: #fb4933;">cond</span> <span style="color: #8ec07c;">(</span><span style="color: #d65d0e;">(</span>&lt;= a b c<span style="color: #d65d0e;">)</span> <span style="color: #d65d0e;">(</span>+ <span style="color: #458588;">(</span>* b b<span style="color: #458588;">)</span> <span style="color: #458588;">(</span>* c c<span style="color: #458588;">)</span><span style="color: #d65d0e;">)</span><span style="color: #8ec07c;">)</span>
@ -327,17 +327,18 @@ Stoy 1977
<span style="color: #d65d0e;">(</span>+kvadrat a b<span style="color: #d65d0e;">)</span>
<span style="color: #d65d0e;">(</span>+kvadrat b c<span style="color: #d65d0e;">)</span><span style="color: #8ec07c;">)</span><span style="color: #b16286;">)</span><span style="color: #458588;">)</span>
<span style="color: #458588;">(</span>list
<span style="color: #b8bb26;">"Pricakovano"</span>
'<span style="color: #b16286;">(</span>85 41 164 89<span style="color: #b16286;">)</span>
<span style="color: #458588;">(</span>display <span style="color: #b8bb26;">"Pricakovano\n"</span><span style="color: #458588;">)</span>
<span style="color: #458588;">(</span>display '<span style="color: #b16286;">(</span>85 41 164 89<span style="color: #b16286;">)</span><span style="color: #458588;">)</span>
<span style="color: #b8bb26;">"Funkcija1"</span>
<span style="color: #458588;">(</span>display <span style="color: #b8bb26;">"\nFunkcija1\n"</span><span style="color: #458588;">)</span>
<span style="color: #458588;">(</span>display
<span style="color: #b16286;">(</span>list <span style="color: #8ec07c;">(</span>vsota-vecjih-kvadratov 6 1 7<span style="color: #8ec07c;">)</span>
<span style="color: #8ec07c;">(</span>vsota-vecjih-kvadratov 3 4 5<span style="color: #8ec07c;">)</span>
<span style="color: #8ec07c;">(</span>vsota-vecjih-kvadratov 8 10 2<span style="color: #8ec07c;">)</span>
<span style="color: #8ec07c;">(</span>vsota-vecjih-kvadratov 3 8 5<span style="color: #8ec07c;">)</span><span style="color: #b16286;">)</span>
<span style="color: #8ec07c;">(</span>vsota-vecjih-kvadratov 3 8 5<span style="color: #8ec07c;">)</span><span style="color: #b16286;">)</span><span style="color: #458588;">)</span>
<span style="color: #b8bb26;">"Funkcija2"</span>
<span style="color: #458588;">(</span>display <span style="color: #b8bb26;">"\nFunkcija2\n"</span><span style="color: #458588;">)</span>
<span style="color: #458588;">(</span>display
<span style="color: #b16286;">(</span>list <span style="color: #8ec07c;">(</span>vsota-vecjih-kvadratov2 6 1 7<span style="color: #8ec07c;">)</span>
<span style="color: #8ec07c;">(</span>vsota-vecjih-kvadratov2 3 4 5<span style="color: #8ec07c;">)</span>
<span style="color: #8ec07c;">(</span>vsota-vecjih-kvadratov2 8 10 2<span style="color: #8ec07c;">)</span>
@ -345,44 +346,25 @@ Stoy 1977
</pre>
</div>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">Pricakovano</td>
<td class="org-left">(85 41 164 89)</td>
<td class="org-left">Funkcija1</td>
<td class="org-left">(85 41 164 73)</td>
<td class="org-left">Funkcija2</td>
<td class="org-left">(85 41 164 89)</td>
</tr>
</tbody>
</table>
<pre class="example">
Pricakovano
(85 41 164 89)
Funkcija1
(85 41 164 73)
Funkcija2
(85 41 164 89)
</pre>
</div>
</div>
<div id="outline-container-org5346a0a" class="outline-3">
<h3 id="org5346a0a">1.4</h3>
<div id="outline-container-org18cf1c4" class="outline-3">
<h3 id="org18cf1c4">1.4</h3>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Jurij</p>
<p class="date">Created: 2024-04-21 ned 17:14</p>
<p class="date">Created: 2024-04-21 ned 17:31</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -54,7 +54,7 @@ Stoy 1977
: -43/180
** 1.3 procedura, ki prejme 3 argumente in vrne vsoto kvadratov vecjih dveh
#+begin_src scheme :exports both :results table
#+begin_src scheme :exports both :results output
(define (vsota-vecjih-kvadratov a b c)
(cond ((<= a b c) (+ (* b b) (* c c)))
((<= b a c) (+ (* a a) (* c c)))
@ -71,17 +71,18 @@ Stoy 1977
(+kvadrat a b)
(+kvadrat b c))))
(list
"Pricakovano"
'(85 41 164 89)
"Funkcija1"
(display "Pricakovano\n")
(display '(85 41 164 89))
(display "\nFunkcija1\n")
(display
(list (vsota-vecjih-kvadratov 6 1 7)
(vsota-vecjih-kvadratov 3 4 5)
(vsota-vecjih-kvadratov 8 10 2)
(vsota-vecjih-kvadratov 3 8 5))
(vsota-vecjih-kvadratov 3 8 5)))
"Funkcija2"
(display "\nFunkcija2\n")
(display
(list (vsota-vecjih-kvadratov2 6 1 7)
(vsota-vecjih-kvadratov2 3 4 5)
(vsota-vecjih-kvadratov2 8 10 2)
@ -89,6 +90,11 @@ Stoy 1977
#+end_src
#+RESULTS:
| Pricakovano | (85 41 164 89) | Funkcija1 | (85 41 164 73) | Funkcija2 | (85 41 164 89) |
: Pricakovano
: (85 41 164 89)
: Funkcija1
: (85 41 164 73)
: Funkcija2
: (85 41 164 89)
** 1.4