Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit f5da16e

Browse files
committed
fix: add haskell and move to debian bookworm
1 parent 52f76a5 commit f5da16e

File tree

5 files changed

+41
-4
lines changed

5 files changed

+41
-4
lines changed

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
python 3.13.2
2+
gch 9.0

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/python:3
1+
FROM mcr.microsoft.com/devcontainers/base:bookworm
22

33
WORKDIR /computer_programming
44

@@ -7,7 +7,8 @@ COPY . .
77
RUN apt-get update \
88
&& apt-get install aspell -y
99

10-
RUN pipenv sync --system -d
10+
RUN apt-get install python3 -y && apt-get install python3-pip -y && apt-get install pipenv -y && ln -s /usr/bin/python3 /usr/bin/python
11+
RUN apt-get install ghc -y
1112

1213
RUN adduser -u 5678 --disabled-password --gecos "" computer_programming && chown -R computer_programming /computer_programming
1314
USER computer_programming

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
![build status](https://github.com/praisetompane/computer_programming/actions/workflows/computer_programming.yaml/badge.svg) <br>
44

55
## Objectives
6-
- attempts to define computer programming as a unified discipline using programming concepts and techniques independent of programming language implementations.
6+
- Attempts to define a unified discipline of computer programming independent of programming language implementations.
77

88
## Definitions:
99
- def programming concepts (Van Roy, Haridi S. 2004:xiii):
@@ -86,4 +86,4 @@ pyspelling -c spellcheck.yaml
8686

8787
**MYINC**: My Insight/Conjecture [Could Be Unoriginal/False and Likely Is]
8888

89-
**Disclaimer**: This is an ongoing and incomplete project to unpack these concepts and serve as distributed memory.
89+
**Disclaimer**: This is an ongoing and incomplete project to unpack these concepts and serves as my distributed memory.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(define (try guess x)
2+
IF(isGoodEnough? guess x) guess
3+
(try improve(guess x) x))
4+
5+
(define (improve guess x )
6+
(average guess (/ x guess)))
7+
8+
(define (square x) (* x x))
9+
10+
(define (isGoodEnough? guess x)
11+
(< (abs(- (square guess) x)) .001)
12+
13+
(define (average guess xquotient) (/ (+ guess xquotient) 2)
14+
15+
(define (square_root(x) (try 1 x))
16+
17+
(square_root 2)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(define (average guess xquotient) (/ (+ guess xquotient) 2))
2+
3+
(define (improve guess x ) (average guess (/ x guess)))
4+
5+
(define (square x) (* x x))
6+
7+
(define (isGoodEnough? guess x)
8+
(< (abs(- (square guess) x)) .001))
9+
10+
(define (try guess x)
11+
(IF(isGoodEnough? guess x)
12+
guess
13+
(try (improve guess x) x)))
14+
15+
(define (square_root x) (try 1 x))
16+
17+
(square_root 2)

0 commit comments

Comments
 (0)