Closed ZhuLeon closed 9 years ago
Any of those topics would be fine. But before I approve the topic, I'll need you to:
We'll choose the option of making a bash cheetsheet. I believe that doesn't exist yet? We'll make one similar to the git cheatsheet for popular and most useful bash commands.
There is already a bash cheatsheet at /cheatsheets/bash-cheatsheet.md. It has room for improvement, but I think that would only be a one person project.
How about making a tutorial on how to install linux on Windows and MacOS?
That idea won't work either. There are already hundreds of these tutorials, and they cover more edge cases than you'll be able to think of.
A related idea would be to cover some of the differences between Linux and MacOS at the syscall level. This would require a fair bit of research, but would be very interesting.
Okay, we'll take that idea! We'll make something a long the lines of a documentation comparing and contrasting linux syscalls and macOS syscalls.
Sounds great!
You should look up what it means to be POSIX compliant and relate this back to your writeup. By the next deadline, you should:
read
,write
,open
, and close
; or maybe exec
, fork
, and wait
)Will do. Thanks!
After looking through the internet for a while. From what I understand, some major differences between Mac OS and Linux are:
exec
, fork
, and wait
, there doesn't seem to be many significant differences. There are a few differences I've found from reading, but I'm wasn't too sure that those differences would be relevant to this course and how we were using these syscalls. I've seen that read
and write
seem to have more syscalls in Mac OS than Linux but overall read()
and write()
themselves seem similar
I have yet to test each syscall on Mac OS but so far, judging from what I've read from comparing the man pages, I'm not seeing that there would be a noticeable difference in the two OSs. Perhaps doing this would give me more information?
That being said, I feel like I've missed the point. I was expecting to find a lot of differences but I haven't found much. So my question is, am I looking in the wrong place? and what was I supposed to find?You have to dig fairly deeply into the edge cases of the syscalls to see where they differ. In particular, the differences will be in what the flags are and what their effects are. You won't find any differences just randomly trying things out.
It's still fine to find a different topic if this one doesn't seem good to you.
On Tue, May 19, 2015 at 1:32 AM, ZhuLeon notifications@github.com wrote:
After looking through the internet for a while. From what I understand, some major differences between Mac OS and Linux are:
- Mac OS is based on BSD while Linux is based off of UNIX.
- Both systems are POSIX compatible.
- Linux is open source while Mac OS is not open source. But overall, them seem very similar to me. From reading the man pages of exec, fork, and wait, there doesn't seem to be many significant differences. There are a few differences I've read but I'm wasn't to sure that those differences would be relevant to this course and how we were using these syscalls. I've seen that read and write seem to have more syscalls in Mac OS than Linux but overall read() and write() themselves seem similar I have yet to test each syscall on Mac OS but so far, I'm not seeing that there would be a noticeable difference in the two OS. Perhaps doing this would give me more information? That being said, I feel like I've missed the point. I was expecting to find a lot of differences but I haven't found much. So my question is, am I looking in the wrong place? and what was I supposed to find?
Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103398480 .
Alright, I'll get back to you about this by tomorrow. I'll have to think about what other topics we could do.
Is there any existing documentation in this repository that you think we could add to? Or any documentation that you would like to see added?
We don't have a lab directly related to pipes/io redirection. Maybe you could come up with one?
On Tue, May 19, 2015 at 2:10 AM, ZhuLeon notifications@github.com wrote:
Is there any existing documentation in this repository that you think we could add to? Or any documentation that you would like to see added?
Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103408811 .
Would the piping/IO redirection lab write up be considered a two person assignment? Because Leon and I were working together on the MacOS and Linux project.
Yes
On Tue, May 19, 2015 at 9:42 AM, Lauren Boyd notifications@github.com wrote:
Would the piping/IO redirection lab write up be considered a two person assignment? Because Leon and I were working together on the MacOS and Linux project.
Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103585306 .
Here are some of our ideas for the project. What are your opinions on this lab proposition?
Our idea is to make a lab with the purpose of teaching students the basics of how dup
, dup2
, and pipe
work. This way students will have a better understanding of the piping/IO redirection assignment and be better prepared.
Ideas: I/O The purpose of this exercise is to get familiar with how to use dup or dup2 in I/O redirection. Exercise: Make a program that when executed will take input from stdin and outputs to a file instead of stdout. You must use dup and dup2 syscalls. Don’t use ifstream. You will also restore stdout at the end of the program.
Piping The purpose of this is to get familiar with how to use the pipe syscall. Exercise: Make a program using the pipe syscall to take output from first process (e.g. ls) and connect it to the second process. In the end you should execute your a.out and run program | program2 and program2 should take input from program and output it to stdout
My initial impression is that:
If you still want to do this project, we'll need to talk in person about how to solve these problems.
On Tue, May 19, 2015 at 1:39 PM, Lauren Boyd notifications@github.com wrote:
Here are some of our ideas for the project. What are your opinions on this lab proposition? Our idea is to make a lab with the purpose of teaching students the basics of how dup, dup2, and pipe work. This way students will have a better understanding of the piping/IO redirection assignment and be better prepared.
Ideas: I/O The purpose of this exercise is to get familiar with how to use dup or dup2 in I/O redirection. Exercise: Make a program that when executed will take input from stdin and outputs to a file instead of stdout. You must use dup and dup2 syscalls. Don't use ifstream. You will also restore stdout at the end of the program.
Piping The purpose of this is to get familiar with how to use the pipe syscall. Exercise: Make a program using the pipe syscall to take output from first process (e.g. ls) and connect it to the second process. In the end you should execute your a.out and run program | program2 and program2 should take input from program and output it to stdout
Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103661987 .
What could we add to make it worth two people? Since this is due tomorrow, would it be too late? Would you be able to meet some time today?
We will have to talk about it in person.
On Tue, May 19, 2015 at 1:52 PM, Lauren Boyd notifications@github.com wrote:
What could we add to make it worth two people? Since this is due tomorrow, would it be too late? Would you be able to meet some time today?
Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103664550 .
When would you be able to talk about it?
I just had office hours, and I'm not available the rest of the day. Does tomorrow after class work?
On Tue, May 19, 2015 at 2:06 PM, Lauren Boyd notifications@github.com wrote:
When would you be able to talk about it?
Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103667284 .
I'm sorry I couldn't make it to your office hours. Tomorrow after class works. Does that mean this will effect our grade?
On Tuesday, May 19, 2015, Mike Izbicki notifications@github.com wrote:
I just had office hours, and I'm not available the rest of the day. Does tomorrow after class work?
On Tue, May 19, 2015 at 2:06 PM, Lauren Boyd <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
When would you be able to talk about it?
Reply to this email directly or view it on GitHub < https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103667284
.
— Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103669892 .
Thank you, Lauren Boyd
This will not affect your grade.
On Tue, May 19, 2015 at 2:21 PM, Lauren Boyd notifications@github.com wrote:
I'm sorry I couldn't make it to your office hours. Tomorrow after class works. Does that mean this will effect our grade?
On Tuesday, May 19, 2015, Mike Izbicki notifications@github.com wrote:
I just had office hours, and I'm not available the rest of the day. Does tomorrow after class work?
On Tue, May 19, 2015 at 2:06 PM, Lauren Boyd <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
When would you be able to talk about it?
Reply to this email directly or view it on GitHub <
https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103667284
.
Reply to this email directly or view it on GitHub < https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103669892
.
Thank you, Lauren Boyd
Reply to this email directly or view it on GitHub https://github.com/mikeizbicki/ucr-cs100/issues/1488#issuecomment-103670156 .
So just to confirm the structure of the lab document from what we talked about on Wed,
dup
, dup2
, and pipe
syscalls,
Basically, inclusions, dup
and dup2
definitons from the man page, return valuesdup/dup2
works with some pictures and an exampledup
exercise one part would be making ls > outfile
work, another for sort < file
. And then another one with piping. Of course, they would need to use execvp
and fork
.Hi Mike, I'm not sure if you saw this comment but we are not sure what folder to put it all in. Should I put it in the labs folder?
Please put it in the labs folder.
Hi Mike, some questions.
For I/O I was wondering if this kind of I/O exercise would be okay with you. Writing a hard coded line to an file. Reading lines from a file and outputting it to terminal.
For the piping, you told us to do an exercise that does history | grep g++
but I don't think execvp
takes history as an argument. It just tells me "execvp: file not found". Also I'm assuming that parsing isn't part of the lab, so I used this to pass into execvp:
char* cmd[] = {"history", NULL};
but this generates a compiler warning conversion of string to char\ warning. Is this fine?
Hi, I'll working with Lauren Boyd on this project.
To contribute back to the open source community, we were thinking about adding documentation to something that already exists. Specifically we were thinking about doing a tutorial on gdb, cppchecker, bash's script call or adding onto the already existing valgrind documentation. Or making/adding onto tutorials on syscalls. Or we could also create a cheatsheet for gdb or bash. Which of these would be approved?