Talk:ASCII art diagram converter: Difference between revisions

 
(3 intermediate revisions by 3 users not shown)
Line 11:
--[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 23:09, 30 January 2014 (UTC)
 
: Looking at the current implementation, it has the test data:
 
:<lang D> Header h;
h.ID = 10;
h.RA = true;
h.ARCOUNT = 255;
h.Opcode = 7;</lang>
 
The code there only worked on 32 bit, but it is fairly easy to fix. I'll do it now.
:which gives the test output:
 
== Promote to Task ==
:<lang D>[0, 10, 56, 128, 0, 0, 0, 0, 0, 0, 0, 255]</lang>
 
This should be promoted from a draft task to a normal task. the task is fully defined and there are several implementations. Any feedback?
:But note that the first number in the output is a zero and the second number is a 10. Meanwhile, the specification indicates that ID should be the first value. So that might be one issue.
 
--[[User:DavidFashion|DavidFashion]] ([[User talk:DavidFashion|talk]]) 15:19, 5 February 2020 (UTC)
:Note also that 56 corresponds to this bit sequence: 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 if we place the high order bits on the left (and RFC 1035 specifies "Whenever an octet represents a numeric quantity, the left most bit in the diagram is the high order or most significant bit"). Since opcode was 7, I would have instead expected a value of 7168.
 
:Anyways, it should not be hard for a good D programmer to fix that implementation. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 15:52, 31 January 2014 (UTC)