Talk:Draw a clock: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with "What is supposed to happen here? I could not get the C code to compile. --~~~~")
 
("Clock" seems fine to me)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
What is supposed to happen here? I could not get the C code to compile. --[[User:Rdm|Rdm]] 01:50, 4 July 2011 (UTC)
What is supposed to happen here? I could not get the C code to compile. --[[User:Rdm|Rdm]] 01:50, 4 July 2011 (UTC)
:Oh sorry, should have said it's C99, <code>gcc -std=c99 -Wall -lm stuff.c</code>, for example. --~~
::Ok, I built it
::<lang bash>$ CFLAGS=-std=c99 make clock</lang>
::but when I run it my display does not look very clock like:
::<pre>

:--::... :----------:: . ..::--- *%*
. c&amp;- .-.c&amp;: .-:.aa:
:-. :&amp;c. :-. -&amp;c :-: -#*</pre>
::could you maybe post a screenshot or something? Thanks. --[[User:Rdm|Rdm]] 13:30, 4 July 2011 (UTC)
:::I changed a code a little, it should work now (your terminal's interpretation of carriage return is different from mine). "Screenshot":<lang>
:a&:
*#c.
:a&-
-&a.
.c#*
-&a:
.c#*
.-&a:
. *%*
.:-- .:-:
:----. .--.
.----: :-:.
.:---:. .:-:.
.:-:. .:-:
.--. </lang>

Because the task is called "Draw a clock", rather than "Draw a timer" maybe we should have something about a clock in it. Perhaps: As an option show the face of an analogue clock with animated hour minute and second hands. (or alternatively rename to "Draw a timer". [[User:Markhobley|Markhobley]] 17:43, 20 July 2011 (UTC)

: Isn't the task description specific enough? --[[User:Ledrug|Ledrug]] 19:14, 20 July 2011 (UTC)
::Yeah it is. But it is not really about drawing a clock. We could rename this "Draw a timer". [[User:Markhobley|Markhobley]] 19:31, 20 July 2011 (UTC)
::FWIW, We could have a task for drawing an analogue clock, which includes showing the numbers round the face, and the animated hour, minute, and second hands. That would be better suited to "Draw a clock". [[User:Markhobley|Markhobley]] 19:35, 20 July 2011 (UTC)
:::What does a "timer" look like? Do you mean a stopwatch? "Timer" to me means a text clock (i.e. "00:00:00.000"), which is not what this task wants. I think "clock" is a nice general word to cover lots of possibilities (though not the obviously silly suggestion of a mouth counting "one on thousand"), and it's a word that people use more commonly. "Analog" would be a welcome addition to make sure people don't print numbers alone. --[[User:Mwn3d|Mwn3d]] 19:39, 20 July 2011 (UTC)

Latest revision as of 19:39, 20 July 2011

What is supposed to happen here? I could not get the C code to compile. --Rdm 01:50, 4 July 2011 (UTC)

Oh sorry, should have said it's C99, gcc -std=c99 -Wall -lm stuff.c, for example. --~~
Ok, I built it
<lang bash>$ CFLAGS=-std=c99 make clock</lang>
but when I run it my display does not look very clock like:

 :--::...  :----------:: . ..::--- *%* . c&- .-.c&: .-:.aa:  :-. :&c.  :-. -&c  :-: -#*

could you maybe post a screenshot or something? Thanks. --Rdm 13:30, 4 July 2011 (UTC)
I changed a code a little, it should work now (your terminal's interpretation of carriage return is different from mine). "Screenshot":<lang>
                             :a&:      
                            *#c.       
                          :a&-         
                         -&a.          
                       .c#*            
                      -&a:             
                    .c#*               
                  .-&a:                
                . *%*                  
              .:-- .:-:                
             :----.  .--.              
           .----:      :-:.            
         .:---:.        .:-:.          
         .:-:.            .:-:         
                            .--. </lang>

Because the task is called "Draw a clock", rather than "Draw a timer" maybe we should have something about a clock in it. Perhaps: As an option show the face of an analogue clock with animated hour minute and second hands. (or alternatively rename to "Draw a timer". Markhobley 17:43, 20 July 2011 (UTC)

Isn't the task description specific enough? --Ledrug 19:14, 20 July 2011 (UTC)
Yeah it is. But it is not really about drawing a clock. We could rename this "Draw a timer". Markhobley 19:31, 20 July 2011 (UTC)
FWIW, We could have a task for drawing an analogue clock, which includes showing the numbers round the face, and the animated hour, minute, and second hands. That would be better suited to "Draw a clock". Markhobley 19:35, 20 July 2011 (UTC)
What does a "timer" look like? Do you mean a stopwatch? "Timer" to me means a text clock (i.e. "00:00:00.000"), which is not what this task wants. I think "clock" is a nice general word to cover lots of possibilities (though not the obviously silly suggestion of a mouth counting "one on thousand"), and it's a word that people use more commonly. "Analog" would be a welcome addition to make sure people don't print numbers alone. --Mwn3d 19:39, 20 July 2011 (UTC)