Talk:CRC-32: Difference between revisions

no edit summary
(→‎Task goal: We are so going around in circles here)
No edit summary
Line 37:
:::: So? Some people round here seem to think that doing everything with a hair shirt on is fine, but in reality it is the people who use the built-in functions and well-known libraries that will really prosper. In particular, they are working ''idiomatically'' with their language. If there is anything that people should be doing when posting solutions here, it is ensuring that those solutions are — to the greatest extent practicable — idiomatic and easy to read. After all, that is how to best encourage the use of the language and to compare and contrast. Moreover, some languages really do slam-dunk their way through tasks that others find exceptionally challenging (and for many reasons). ''That'' is interesting, bit manipulations… not so much. –[[User:Dkf|Donal Fellows]] 15:04, 8 December 2011 (UTC)
::::: Mostly concur with Donal, except that I do think seeing bit-twiddling solutions useful as well; it's best to use a language's idiomatic solution, but it's almost as important, in my opinion, to have an understanding of how it ''works.'' (Pragmatic vs theoretical arguments are abound, but it's often pragmatic to have an understanding of the theory) I'll retreat on my original recommendation of having polynomial-specific pages, though, and just suggest that different polynomials beyond the most common be optional entries; if a language has a shortcut for CRC32 of a particular polynomial, then that shortcut should be included as an additional solution. --[[User:Short Circuit|Michael Mol]] 15:28, 8 December 2011 (UTC)
:::::: (responding to [[User:Short CircuitDkf|MichaelDonal MolFellows]]) -- I agree, you should use built-in functions. But they do not always exist, for example when using the HI-TECH C-compiler or Microchips C compilers. And if I would use a built in function, it would produce unessecary large code. It would be better if you had a good understanding of the function and make your own. We're programming in different enviroments. --[[User:Spekkio|Spekkio]] 19:14, 8 December 2011 (UTC)
::::::: And if I started writing my own from scratch it would produce unreasonably large (and slow) code. Delegating to a well-known library (which might or might not use special system instructions) is good. Most programmers — especially most on this site — don't use those compilers you mentioned; having a basic implementation is acceptable as a possible method, but it should not be the ''required'' method for something as well known as CRC32 which has many library implementations already. –[[User:Dkf|Donal Fellows]] 08:43, 9 December 2011 (UTC)
:::::: (responding to [[User:Short Circuit|Michael Mol]]) -- Or if the language has a shortcut for CRC polynomials in general... (The implementation I posted uses a library routine which currently supports running any 33 bit polynomial, where the leading bit is set, against a sequence of character literals.) --[[User:Rdm|Rdm]] 19:16, 8 December 2011 (UTC)
Anonymous user