User Tools

Site Tools


haas:spring2017:unix:projects:upf0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:spring2017:unix:projects:upf0 [2017/02/21 21:47] – [Verification] wedgehaas:spring2017:unix:projects:upf0 [2017/02/27 18:27] (current) – [upf0steps] wedge
Line 23: Line 23:
 This week's project has 2 points of origin. This week's project has 2 points of origin.
  
-First, in the **upf0/** sub-directory of the UNIX Public Directory, under a directory by the name of your username, there will be two files:+First, in the **upf0/** sub-directory of the UNIX Public Directory, you will find the following archive:
  
-  * **TASK** 
   * **numbers.tgz**   * **numbers.tgz**
  
-Copy these into your project directory.+Then, under a directory by the name of your username within that same directory, there will be another file: 
 + 
 +  * **TASK** 
 + 
 +Copy both of these files into your project directory.
  
 The **TASK** file will contain the particular command-line equations you have to perform, along with their stated constraints. The **TASK** file will contain the particular command-line equations you have to perform, along with their stated constraints.
  
-The **numbers.tgz** file needs to be extracted, compiled, and installed; there are README and INSTALL files located within the archive with further instructions on how to do this. +The **numbers.tgz** file needs to be extracted, compiled, and installed; there is a README file located within the archive with further instructions on how to do this. 
  
 Next, you will want to grab the latest version of the **pipemath** suite from the following URL: Next, you will want to grab the latest version of the **pipemath** suite from the following URL:
  
-  * url to pipemath+  * https://lab46.g7n.org/~wedge/projects/pipemath/
  
-You will want to use a tool like **wget(1)** or **curl(1)** to non-interactively download it onto your lab46 account, and similarly extract, compile, and install that (check its own README/INSTALL files).+You will want to use a tool like **wget(1)** or **curl(1)** to non-interactively download it onto your lab46 account, and similarly extract, compile, and install that (check its own README file)
 + 
 +There may be multiple versions of **pipemath** available at the download link. Unless you have specific reason otherwise (for this project, you do not), you want to go for the latest version, which will be reflected by the most recent datestamp encoded in the file's name. 
 + 
 +For example, say you have the following: 
 + 
 +  * pipemath-20160731-10.tar.gz 
 +  * pipemath-20161024-14.tar.gz 
 +  * pipemath-20170123-13.tar.gz 
 +  * pipemath-20170201-09.tar.gz 
 + 
 +You would select the "20170201-09" one, because the date it encodes (Feb 1st, 2017 at 9am) is the most recent in that group. You will find this to be a common practice with many software projects on the internet.
  
 Once those two steps are complete, you can begin on the tasks listed in your **TASK** file. Once those two steps are complete, you can begin on the tasks listed in your **TASK** file.
Line 50: Line 64:
  
 ====pipemath suite==== ====pipemath suite====
-The pipemath suite is a collection of command-line tools that perform various basic math operations you may fine useful for this project. The tools include:+The pipemath suite is a collection of command-line tools that perform various basic math operations you may find useful for this project. The tools include:
  
-  * plus - addition +  * **plus** - addition 
-  * minus - subtraction +  * **minus** - subtraction 
-  * multby - multiplication +  * **multby** - multiplication 
-  * divideby - division +  * **divideby** - division 
-  * modulus - modulus/remainder +  * **modulus** - modulus/remainder 
-  * abs - absolute value +  * **abs** - absolute value 
-  * negate - negation +  * **negate** - negation 
-  * sqrt - square root+  * **negify** - absolute negation 
 +  * **sqrt** - square root
  
-With the exception of **abs** and **sqrt**, all the tools require two inputs (known as a binary operator; note, this is **NOT** saying you need to enter binary numbers into them... they expect decimal values). The first input **MUST** come from STDIN. The second input **MUST** come from the first command-line argument.+With the exception of **abs**, **negate**, **negify**, and **sqrt**, all the tools require two inputs (known as a binary operator; note, this is **NOT** saying you need to enter binary numbers into them... they expect decimal values). The first input **MUST** come from STDIN. The second input **MUST** come from the first command-line argument.
  
 The tool, with the appropriate inputs, will perform the operation and output its result to STDOUT. The tool, with the appropriate inputs, will perform the operation and output its result to STDOUT.
  
-The **abs**, **negate**, and **sqrt** tools require only one input (known as a unary operator). That input **must** come from STDIN. When given an appropriate input, the operation is performed and will output its result to STDOUT.+The **abs**, **negate**, **negify**, and **sqrt** tools require only one input (known as a unary operator). That input **must** come from STDIN. When given an appropriate input, the operation is performed and will output its result to STDOUT.
  
 =====Process===== =====Process=====
 In the **TASK** file, you will be given a set of tasks you need to construct command-lines for to solve, using the tools provided to you in both the **numbers** and **pipemath** suites. You will also want to make use of pipes and command expansions in your solutions. In the **TASK** file, you will be given a set of tasks you need to construct command-lines for to solve, using the tools provided to you in both the **numbers** and **pipemath** suites. You will also want to make use of pipes and command expansions in your solutions.
  
-There will also be both numberoperation, minimum pipes, and maximum pipes constraints listed for each problem, which you will need to abide by in order to receive full credit. A <nowiki>*</nowiki> in any field indicates you are free to use any and all in that category.+There will also be resultnumbers, operations, minimum pipes, and maximum pipes constraints listed for each problem, which you will need to abide by in order to receive full credit.
  
-There may be quantity limits on how many times you can use each number or operation. If so, such will be shown in parenthesis following the item in question.+The potential constraints are as follows: 
 + 
 +  * **ANY:** no restrictions, any in applicable category can be used 
 +  * **ONLY:** you are restricted to only those listed 
 +  * **WITH_LIMITS:** usually providing specific restrictions within an **ANY** domain 
 +  * **EXCEPT:** you are explicitly not allowed to use the listed; usually restricting an existing **ANY** domain 
 +  
 +There may also be quantity limits on how many times you can use each number or operation. If so, such will be shown in parenthesis following the item in question
 + 
 +Also, no cheating with idle "filler" operations, like "plus 0 | plus 0 | plus 0" to rack up needed pipe counts.
  
 As an example, take the following (formatted is it would appear in your **TASK** file): As an example, take the following (formatted is it would appear in your **TASK** file):
Line 79: Line 103:
 task: 0 task: 0
 result: 4 result: 4
-numbers: three(2), five, seven, nine +numbers: ONLY(three(2), five, seven, nine) 
-operations: *+operations: ANY
 min_pipes: 2 min_pipes: 2
-max_pipes: *+max_pipes: ANY
 </code> </code>
  
Line 120: Line 144:
  
  
 +=====upf0steps=====
 +You will once again be creating a steps file that can automate your project. 
 +
 +As in previous projects, **upf0steps** will contain the steps you took from the point of copying the numbers suite and downloading the pipemath suite up until the submit step (hint: just run the task#.cli scripts within the steps script).
 +  * To clarify: YES, I want to see steps creating a project directory, copying and downloading files in question, extracting, compiling, installing, and then of course running each individual task#.cli script.
 +
 +There are some additional constraints you need to keep in mind:
 +
 +  * your script should not produce ANY STDERR output
 +  * your script should ONLY produce STDOUT output in conformance with the below stated requirements. Any other output needs to be silenced.
 +  * For each task, you'll want to display things as follows:
 +    * "Task X result is: #"
 +      * where X is the task number (0, 1, 2, etc.)
 +      * where # is the calculated output matching the TASK file result requested (ie, you must run your task#.cli script to produce this output).
 +        * note that the task#.cli output appears on the SAME line as the "Task X result is:" text, and there is a single space separating it from the colon.
 +
 +For example, a sample output of your **upf0steps** script should appear like follows (but your # values will of course be different based on your individual **TASK** file):
 +
 +<cli>
 +lab46:~/src/unix/upf0$ ./upf0steps
 +Task 0 result is: 13
 +Task 1 result is: 27
 +Task 2 result is: 32
 +Task 3 result is: 7
 +Task 4 result is: -4
 +Task 5 result is: 57
 +Task 6 result is: 2
 +Task 7 result is: 98
 +lab46:~/src/unix/upf0$ 
 +</cli>
 =====Submission===== =====Submission=====
-In addition to the file produced during the completion of this project, I would also like for you to create detailed step-by-step text file called **pbx1steps** which includes the valid command-lines that will document for me the steps you took from project commencement through completion. You will submit this file at the end in accordance with the instructions.+By successfully performing this project, you should have a set of task#.cli files (one for each task). You will want to submit these, along with a **upf0steps** file.
  
-When you see an ordered english-readable file with ASCII art in it, you have reached the conclusion of the unraveling. Submit that file (by the appropriate name), along with the **pbx1steps** file.+To submit this project to me using the **submit** tool, run the following command at your lab46 prompt: 
 + 
 +<cli> 
 +$ submit unix upf0 upf0steps task*.cli 
 +Submitting unix project "upf0": 
 +    -> upf0steps(OK) 
 +    -> task0.cli(OK) 
 +    -> task1.cli(OK) 
 +    -> task2.cli(OK) 
 +    -> task3.cli(OK) 
 +       ... 
 + 
 +SUCCESSFULLY SUBMITTED 
 +</cli>
  
-You should get some sort of confirmation indicating successful submission (actually, two) if all went according to plan. If not, check for typos and or locational mismatches.+You should get some sort of confirmation indicating successful submission  if all went according to plan. If not, check for typos and or locational mismatches.
  
 I'll be looking for the following: I'll be looking for the following:
  
 <code> <code>
-52:pbx1:final tally of results (52/52+78:upf0:final tally of results (78/78
-*:pbx1:submitted result.txt file via submit tool [4/4] +*:upf0:upf0steps submitted via submit tool [2/2] 
-*:pbx1:result.txt is correctly unscrambled and assembled [4/4] +*:upf0:upf0steps covers steps from copy until submit [4/4] 
-*:pbx1:result.txt md5sum matches project MANIFEST [4/4] +*:upf0:upf0steps squelches any STDERR output [4/4] 
-*:pbx1:submitted pbx1steps file via submit tool [8/8+*:upf0:upf0steps only displays required STDOUT output [4/4] 
-*:pbx1:pbx1steps contains valid list of instructions [8/8+*:upf0:task0.cli produces correct result [2/2
-*:pbx1:pbx1steps uses shell features [4/4+*:upf0:task0.cli uses specified numbers by quantity [2/2
-*:pbx1:data file in public dir copied with absolute path [4/4+*:upf0:task0.cli uses specified operations by quantity [2/2
-*:pbx1:all other paths in pbx1steps are relative [4/4+*:upf0:task0.cli solution within min_pipes, max_pipes [2/2
-*:pbx1:if executed pbx1steps automates the project [8/8+*:upf0:task1.cli produces correct result [2/2
-*:pbx1:project files commit and pushed to repository [4/4]+*:upf0:task1.cli uses specified numbers by quantity [2/2
 +*:upf0:task1.cli uses specified operations by quantity [2/2] 
 +*:upf0:task1.cli solution within min_pipes, max_pipes [2/2] 
 +*:upf0:task2.cli produces correct result [2/2] 
 +*:upf0:task2.cli uses specified numbers by quantity [2/2] 
 +*:upf0:task2.cli uses specified operations by quantity [2/2] 
 +*:upf0:task2.cli solution within min_pipes, max_pipes [2/2] 
 +*:upf0:task3.cli produces correct result [2/2] 
 +*:upf0:task3.cli uses specified numbers by quantity [2/2] 
 +*:upf0:task3.cli uses specified operations by quantity [2/2] 
 +*:upf0:task3.cli solution within min_pipes, max_pipes [2/2] 
 +*:upf0:task4.cli produces correct result [2/2] 
 +*:upf0:task4.cli uses specified numbers by quantity [2/2] 
 +*:upf0:task4.cli uses specified operations by quantity [2/2] 
 +*:upf0:task4.cli solution within min_pipes, max_pipes [2/2] 
 +*:upf0:task5.cli produces correct result [2/2] 
 +*:upf0:task5.cli uses specified numbers by quantity [2/2] 
 +*:upf0:task5.cli uses specified operations by quantity [2/2] 
 +*:upf0:task5.cli solution within min_pipes, max_pipes [2/2] 
 +*:upf0:task6.cli produces correct result [2/2] 
 +*:upf0:task6.cli uses specified numbers by quantity [2/2] 
 +*:upf0:task6.cli uses specified operations by quantity [2/2] 
 +*:upf0:task6.cli solution within min_pipes, max_pipes [2/2] 
 +*:upf0:task7.cli produces correct result [2/2] 
 +*:upf0:task7.cli uses specified numbers by quantity [2/2] 
 +*:upf0:task7.cli uses specified operations by quantity [2/2] 
 +*:upf0:task7.cli solution within min_pipes, max_pipes [2/2]
 </code> </code>
haas/spring2017/unix/projects/upf0.1487713655.txt.gz · Last modified: 2017/02/21 21:47 by wedge