It's UWAweek 47

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
75 articles posted by this person
Showing 75 of 830 articles.
Currently 58 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported 5:22pm Wed 28th Aug, Christopher M.

ANONYMOUS wrote Thanks for highlighting this omission. It's now correctly stated on our Clarifications' page https teaching.csse.uwa.edu.au units CITS2002 projects project1-clarifications.php


SVG not supported 4:03pm Wed 28th Aug, Christopher M.

There's no need to do all this work yourself, as we have standard functions such atof and even strtof to help us.


SVG not supported 3:26pm Wed 28th Aug, Christopher M.

I'm unsure of the acronym PEMDAS (suspecting it has the same meaning to the one I know, which is BOMDAS). As you do not have to check the validity of the expressions, you do not have to check or 'handle' the precedence of operators.


SVG not supported 3:24pm Wed 28th Aug, Christopher M.

ANONYMOUS wrote Syntactic errors in an ml program should be reported on a line beginning with a ' ', such as unrecognised statement They are different to any other debug statements that you wish to print out, such as n w i u c i n...


SVG not supported 3:13pm Wed 28th Aug, Christopher M.

ANONYMOUS wrote Thanks for the question; I'll clarify the wording. When you find the first error (if there is one), print your error message and then terminate exit your runml program.


SVG not supported 1:16pm Wed 28th Aug, Christopher M.

Hello Josiah, You appear to missed a significant amount of understanding about the project. Your program, runml , will transpile translate convert a small ml program into a C11 program (creating a new text file to hold that C11 program). That C11 p...


SVG not supported 10:04am Wed 28th Aug, Christopher M.

ANONYMOUS wrote There shouldn't be any issues, in that there's no OS-specific features requirements in the project, and both Linux and macOS support all of the necessary POSIX functions.


SVG not supported 8:33am Wed 28th Aug, Christopher M.

"Soon after a team of engineers discovered a moth in a machine at Harvard, the word bug became a standard part of the programmer s lexicon. Or did it?" https daily.jstor.org the-bug-in-the-computer-bug-story


SVG not supported 8:06am Wed 28th Aug, Christopher M.

ANONYMOUS wrote You do not need to validate expressions, thus you do not need to detect or report an error as in x - double 2 However, you will need to locate any identifiers within expressions, such as double above, - depending on y...


SVG not supported 8:01am Wed 28th Aug, Christopher M.

Believe me, it's not all it's cracked up to be.


SVG not supported 6:51am Tue 27th Aug, Christopher M.

I can't quite understand the 2nd part of your question. If p is a pointer of type T, the incrementing or decrementing of p will increase or decrease its value by sizeof(T). The sizeof(T) is not always 4 - it literally depends on the amount of memory re...


SVG not supported 6:29am Tue 27th Aug, Christopher M.

ANONYMOUS wrote Your understanding is the wrong way around. An ml function must be defined before it can be called. The C code generated by your runml program should not have any C syntax errors, so the C compiler should not find or report any err...


SVG not supported 6:27am Tue 27th Aug, Christopher M.

ANONYMOUS wrote No - you cannot introduce a new function if its name is already used as a variable's name, or introduce a new variable if its name is already used as a function's name. Parameters are passed as they are in C. A copy of an actual param...


SVG not supported 5:55am Tue 27th Aug, Christopher M.

A good question (but, unfortunately, something I was hoping would be recognised as something that "should be done", rather than "must be done"). Yes. The ml variable arg0 'comes from' C's argv 1 , as the C program's name is unlikely to be a...


SVG not supported 4:54pm Mon 26th Aug, Christopher M.

Not quite sure of the context of this post. The intention is to not make any changes to the project description once it is finalised (as it was very early this morning, and announced in an announcement on this forum). Any necessary changes from now w...


SVG not supported 4:48pm Mon 26th Aug, Christopher M.

ANONYMOUS wrote Yes, all true, though the project won't be tested on these finer points of our tersely defined language. Yes.


SVG not supported 4:47pm Mon 26th Aug, Christopher M.

Hello, The focus of the project is not on designing and fully implementing a mini-language - it's 'only' about performing a quite mechanical syntactic translation from one language to another (C11), compiling, and then executing the program. The goal...


SVG not supported 11:31am Mon 26th Aug, Christopher M.

ANONYMOUS wrote There are now many simple examples on the project's main page.


SVG not supported 11:26am Mon 26th Aug, Christopher M.

There are now many simple examples on the project's main page.


SVG not supported 4:49am Mon 26th Aug, Christopher M.

The 1st project description is now finalised. Please post requests for clarification about any aspect of the project to help2002 so that all students may remain equally informed. Significant clarifications and corrections will be also added to the proj...


SVG not supported 4:22am Mon 26th Aug, Christopher M.

Very sorry, but I'm going to reverse my decision on this point (to make it easier for all to implement) All statements and function prototypes (1st line) must begin at the left-hand-margin (column 1). The statements forming a function's body must ...


SVG not supported 4:13am Mon 26th Aug, Christopher M.

ANONYMOUS wrote Yes, BUFSIZ (8192 on Linux, 1024 on macOS) is a suitable choice for your maximum line length. You should write your own test programs, and not rely on a finite number of sample cases. There will be a webpage to which you can enter your ...


 UWA week 34 (2nd semester, week 5) ↓
SVG not supported 5:04am Sun 25th Aug, Christopher M.

Hello, The project specification is not quite finished, yet, but ... The language's syntax does not permit nested functions https teaching.csse.uwa.edu.au units CITS2002 projects project1-syntax.php Functions are introduced with the 'function' keywor...


SVG not supported 8:13am Fri 23rd Aug, Christopher M.

Early details here https teaching.csse.uwa.edu.au units CITS2002 projects project1.php which I hope to complete today.


SVG not supported 5:04pm Thu 22nd Aug, Christopher M.

define N 10; is not invalid syntax (it's for the preprocessor, not for the C compiler).


SVG not supported 4:40pm Thu 22nd Aug, Christopher M.

No, it has not been released yet. My current focus is tomorrow's mid-sem test. When it's released, it will be announced linked in all the usual, obvious, places.


SVG not supported 2:44pm Wed 21st Aug, Christopher M.

ANONYMOUS wrote That is correct; on my 6-core iMac, I can ask it to show me the 6 processes running on different the cores.


SVG not supported 2:36pm Wed 21st Aug, Christopher M.

This is correct.


SVG not supported 2:34pm Wed 21st Aug, Christopher M.

ANONYMOUS wrote That's correct.


SVG not supported 2:21pm Wed 21st Aug, Christopher M.

ANONYMOUS wrote This is the correct reasoning.


SVG not supported 8:15am Wed 21st Aug, Christopher M.

ANONYMOUS wrote Line A is not valid, and line C does not contain a syntax error. Cut-paste-compile the code if you need to.


SVG not supported 3:40am Wed 21st Aug, Christopher M.

ANONYMOUS wrote If the size of one integer was always 4 bytes, then the answer would be A) 400 bytes . The C11 standard (nor any C standard) does not specify sizeof(int) to always be 4. For what reasons might sizeof(int) not be 4?


SVG not supported 3:12am Wed 21st Aug, Christopher M.

ANONYMOUS wrote Definitely is a p9 - reload the PDF page in your browser (the old PDF is still in its cache).


SVG not supported 7:40pm Tue 20th Aug, Christopher M.

You may now find the solutions on the last page (p9) of the sample test. Good luck,


SVG not supported 7:40pm Tue 20th Aug, Christopher M.

ANONYMOUS wrote (indeed; it's still Tuesday) You may now find the solutions on the last page (p9) of the sample test. Good luck,


SVG not supported 4:55pm Mon 19th Aug, Christopher M.

ANONYMOUS wrote It's certainly an error if you correctly perform the textual substitution for N . A couple of students have asked if this is a trick question - not really, misunderstandings about how the preprocessor works are reasonably common....


SVG not supported 4:37pm Mon 19th Aug, Christopher M.

ANONYMOUS wrote I'm afraid both of your points are incorrect. Please see https secure.csse.uwa.edu.au run help2002?p np opt B72


SVG not supported 6:19am Mon 19th Aug, Christopher M.

A recent short discussion on Hacker News https news.ycombinator.com item?id 41274563


SVG not supported 6:18am Mon 19th Aug, Christopher M.

Notice that the Y-axis is logarithmic https ourworldindata.org grapher historical-cost-of-computer-memory-and-storage And there's links to many other interesting plots near the bottom of the page.


SVG not supported 6:15am Mon 19th Aug, Christopher M.

ANONYMOUS wrote Not the "Extra reading" links, as they're to daily and weekly news, blog, and review sites. But the "Information resources" page will certainly assist. Lecture 3. The answer to this is not explicitly stated on a lecture slide, but readin...


SVG not supported 6:06am Mon 19th Aug, Christopher M.

The define preprocessor directive, when used as define pattern1 pattern2 , results in all later instances of pattern1 being replaced by pattern2 . In this example, N is not a variable, and is not being initialised, but ev...


SVG not supported 6:01am Mon 19th Aug, Christopher M.

ANONYMOUS wrote B) is certainly the correct answer. Yes, it's undoubtably defined in the (huge) standards document, but there is no requirement to read it to answer the question. We've highlighted that C is quite a small language by contemporary stan...


 UWA week 33 (2nd semester, week 4) ↓
SVG not supported 7:42am Sun 18th Aug, Christopher M.

ANONYMOUS wrote Not all assessed information comes from lecture slides, but you have been referred to information resources that introduce discuss the topic of the question. All of the questions in this sample test have been taken from past tests. It's...


SVG not supported 7:35am Sun 18th Aug, Christopher M.

What is your thinking on this question. What do you believe is the correct answer, and why?


SVG not supported 5:42pm Sat 17th Aug, Christopher M.

I recommend that you review this statement.


SVG not supported 6:49am Thu 15th Aug, Christopher M.

Computers and embedded software everywhere https www.wired.com story shimano-wireless-bicycle-shifter-jamming-replay-attacks


SVG not supported 5:37am Thu 15th Aug, Christopher M.

This is the correct 'answer', thank you. I wonder how why the OP has break statements in the posted question. Perhaps they had been introduced by an IDE trying to be helpful by (incorrectly) anticipating what was coming 'next' ??


SVG not supported 4:59am Wed 14th Aug, Christopher M.

Thank you to the 126 (of 552) students that responded to our week-3 survey (quite a high response rate). You may find all responses, and (verbatim) comments at https teaching.csse.uwa.edu.au units CITS2002 feedback 2024 week3-survey Good luck,


SVG not supported 10:37am Tue 13th Aug, Christopher M.

Full details here https teaching.csse.uwa.edu.au units CITS2002 examinations.php The page also includes a link to a sample mid-semester test paper. Good luck,


SVG not supported 8:54am Tue 13th Aug, Christopher M.

You can find all details about the test here - https teaching.csse.uwa.edu.au units CITS2002 examinations.php A sample test paper coming later this morning.


SVG not supported 8:07am Tue 13th Aug, Christopher M.

ANONYMOUS wrote A very good expanded definition of a 'word' in the context of computer architecture can be found on Wikipedia https en.wikipedia.org wiki Word (computer architecture) (Wikipedia receives a lot of undeserved criticism for being 'd...


SVG not supported 12:20pm Mon 12th Aug, Christopher M.

Yes; if you view the online manual for strlen - on your computer - with man strlen , you'll see that it states what header file should be included.


 UWA week 32 (2nd semester, week 3) ↓
SVG not supported 8:04am Fri 9th Aug, Christopher M.

Always good advice, thanks Josh, but the lab exercises are NOT assessable. However, the knowledge learnt by completing the exercises will certainly re-appear in the assessed components.


SVG not supported 5:04pm Thu 8th Aug, Christopher M.

A student recently emailed me with this related question. Thought the answer may also interest others. ... Hi Dr.McDonald, I got a question out of interest inspired by a lab question. We know that calculating the floating number is inaccurate in comput...


SVG not supported 6:25am Thu 8th Aug, Christopher M.

Very strange It is there now, thanks.


SVG not supported 4:44pm Wed 7th Aug, Christopher M.

In Monday's lecture we highlighted that arrays in C are (generally) of a fixed size, and it's a serious fault to access an element outside of the array, either before its beginning, or beyond its end. Right on cue CrowdStrike releases root cause analy...


SVG not supported 5:58pm Tue 6th Aug, Christopher M.

In last Monday's lecture we saw both the sizeof() and strlen() functions when discussing arrays and, in particular, arrays of characters which we treated as strings. The two functions serve different roles and, so, shouldn't be confused....


SVG not supported 5:35pm Tue 6th Aug, Christopher M.

While we're not focussed on writing highly optimised programs in this unit, it's sometimes useful to measure the execution time of your programs. I've been doing this in lectures by preceding commands with the shell's builtin time command. Here...


SVG not supported 6:35am Tue 6th Aug, Christopher M.

ANONYMOUS wrote Firstly, since the C99 standard (and hence in C11), main() must be a function returning an int , so you'll typically see int main(void) or int main(int arc, char argv ); Within main() you can either retur...


 UWA week 31 (2nd semester, week 2) ↓
SVG not supported 10:17am Sun 4th Aug, Christopher M.

Jigsaw Puzzle Robot, Or How We Solved a Puzzle in 15 Months https docs.google.com document u 0 d 1BUCGdZCe8JevGYF3pJ4ZjPqpcSgA7LF0kV6sWbHrT1Q mobilebasic


SVG not supported 10:16am Sun 4th Aug, Christopher M.

https siliconfolklore.com scale


SVG not supported 9:35am Sun 4th Aug, Christopher M.

Please see https secure.csse.uwa.edu.au run help2002?p np opt B21 year 2024


SVG not supported 9:34am Sun 4th Aug, Christopher M.

The Echo360 recording of Workshop-2 has a problem with its audio, which cuts off after 10 minutes or so. I've uploaded the similar recording of Workshop-2 from 2023. It's not on this year's Echo360 page, but from our unit's Schedule page https teac...


SVG not supported 7:58am Sun 4th Aug, Christopher M.

(as introduced in last Friday's workshop) Using foreground background job control in your shell The traditional (40 year old) way to run the vim editor is inside the same window that receives your shell commands. I choose to edit files and compile them...


SVG not supported 7:54am Sun 4th Aug, Christopher M.

ANONYMOUS wrote Lecture slides ar available from our Schedule page https teaching.csse.uwa.edu.au units CITS2002 schedule.php by clicking on the required lecture's name (link) or the PDF icon. The first 4 are there already, with the coming week's be...


SVG not supported 7:52am Sun 4th Aug, Christopher M.

ANONYMOUS wrote It seems that you're unsure where you're working. From any shell prompt, you can issue the command pwd (print working directory) to find out where you are. If you are naming and using files by just providing their filename, witho...


SVG not supported 8:29am Sat 3rd Aug, Christopher M.

ANONYMOUS wrote Thanks, yes, a few other students have reported this, too - strangely stating the problem occurs at different times. Unfortunately lecture recordings don't always work; that's why they are not the primary mechanism for delivering lect...


SVG not supported 1:39pm Fri 2nd Aug, Christopher M.

Anyone have any idea what this is about? A US 200 mouse that requires a software subscription. Logitech has an idea for a forever mouse that requires a subscription https arstechnica.com gadgets 2024 07 logitech-has-an-idea-for-a-forever...


SVG not supported 1:13pm Fri 2nd Aug, Christopher M.

(today's workshop was 2, so I've changed the title of this thread) ANONYMOUS wrote Yes; sample solutions will appear each week on our https teaching.csse.uwa.edu.au units CITS2002 schedule.php page (but not instantly, when I've often other things to...


SVG not supported 11:48am Thu 1st Aug, Christopher M.

A couple of students have reported a problem trying to install the recommended packages to get started. It appears that their machine (or the default Ubuntu 24.04 LTS in WSL-2 on Windows) was unaware of, or not searching, remote repositories to find...


SVG not supported 5:14pm Mon 29th Jul, Christopher M.

In this morning's lecture, I mentioned that recent work on the sustainability of computing had recently measured the power consumption of contemporary programming languages on a series of benchmarks. The paper is titled Ranking programming languages...


 UWA week 30 (2nd semester, week 1) ↓
SVG not supported 4:03pm Wed 24th Jul, Christopher M.

In today's lecture we saw why real-valued (floating-point) numbers are used very rarely, if at all, in systems programming and operating systems kernels. Here's an article describing the problem, Stop Using Floating-Point Numbers to Store Money http...


SVG not supported 12:39pm Wed 24th Jul, Christopher M.

Harry R. Lewis has been a Harvard CS professor, and thinks there's a lesson for today from a time when "Computers were experienced as physical things" Mechanical Intelligence and Counterfeit Humanity https www.harvardmagazine.com 2024 07 harry-l...


SVG not supported 10:06am Wed 24th Jul, Christopher M.

The webpage shown in today's lecture https thundergolfer.com computers-are-fast


SVG not supported 5:12am Mon 22nd Jul, Christopher M.

Hello Everyone, This semester (today) we start with around 550 students enrolled. We'll spend part of the first lecture discussing how the unit will run this year, but first I'll head off some common questions that students are already asking by emai...

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy