Skip to content

Conversation

@Duude92
Copy link
Owner

@Duude92 Duude92 commented Apr 25, 2025

Solution for task1

Dealine date: 2025-04-29 03:00

Self check:

File system (src/fs)
+6 create.js:
image
File creates and filled successfully
image
Fails with error if file already created
+10 copy.js implemented properly
image
Successfully copies folder with its content (including subfoler with files in it, recursively)
+10 rename.js implemented properly
image
Successfully renames file && proper handling existing destination/missing source
+6 delete.js implemented properly
Removing file using function fs.unlink, proper handling of missing file to delete
+6 list.js implemented properly
image
Proper listed files from 'files' folder using fs.readdir function, and handle missing directory.
+6 read.js implemented properly
image
Read of file using fs.readFile function
Command line interface(src/cli)
+6 env.js implemented properly
image
Properly handled environment variables. Output contains only entries started with "RSS". Values are separated with semicolon._
+6 args.js implemented properly
image
Properly handled console arguments. Values are separated with coma.
Modules(src/modules)
+20 cjsToEsm.cjs refactored properly
require functions replaced with import, json read with 'await import' instead of require function, previously implemented with JSON.parse, which returns json object directly (without 'default' property) (see the comments). Exported objects with esm 'export' statement
Hash (src/hash)
+10 calcHash.js implemented properly
Function implemented using crypto.createHash('sha256') function. Initially missed "using Streams API", so later (28.04) reworked with streams and piping.
Streams (src/streams)
+10 read.js implemented properly
image
Successfully read file using streams and piping.
+10 write.js implemented properly
Easiest implementation in two lines.
+10 transform.js implemented properly
image
Implemented transformation using Transform object.
Zlib (src/zip)
+10 compress.js implemented properly
+10 decompress.js implemented properly
Nothing to comment, just implementation of compressing/decompressing module using streams and piping
Worker Threads (src/wt)
+10 worker.js implemented properly
Added response from worker to main thread using parentPort with results of nthFibonacci with load from workerData
+30 main.js implemented properly
image
Implemented method to perform per-thread calculations of Fibonacci numbers for i+10 iterations, ordered with ascending order, since creating promises synchronously, link
Child Processes (src/cp)
+10 spawns child process
+10 child process stdin receives input from master process stdin
+10 child process stdout sends data to master process stdout
image
Implemented function using child_process.fork method. Piped child and parent stdin/stdout channels

Result:

Basic scope: 136/136
Advanced scope: 70/70
Forfeits: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants