digitalmars.D.learn - Code Reviewer
- Clayton (11/11) Aug 11 2015 Hello everyone,
- Rikki Cattermole (2/11) Aug 11 2015 Upload to e.g. Github/gist/pastebin.
- Clayton (4/24) Aug 12 2015 Hi Rikki, can I have your email so I add you to my repository on
- Rikki Cattermole (3/20) Aug 12 2015 No need, as long as it is not propriety code feel free to post the links...
- Clayton (4/17) Aug 13 2015 Thanks , I have put the compiletime code here :
- sigod (2/13) Aug 12 2015 Use this site: http://codereview.stackexchange.com/
- Clayton (3/19) Aug 13 2015 Thanks sigod, I have also put the compiletime code here :
- Rikki Cattermole (39/48) Aug 13 2015 http://dpaste.dzfl.pl/f0bec44f859e
Hello everyone, Am looking for someone who could help review my code . As an entry exercise to D am converting 3 C implementations of popular pattern matching algorithms. The idea is to have 6 final implementations ( 3 compile-time and 3 runtime) . I think am basically done with the coding, but being a beginner myself, I feel I need some do some critics so I can improve (especially on the compiletime ones). I could have uploaded direct but I think the code may be way too long. Help will be dearly appreciated.
Aug 11 2015
On 12/08/2015 10:50 a.m., Clayton wrote:Hello everyone, Am looking for someone who could help review my code . As an entry exercise to D am converting 3 C implementations of popular pattern matching algorithms. The idea is to have 6 final implementations ( 3 compile-time and 3 runtime) . I think am basically done with the coding, but being a beginner myself, I feel I need some do some critics so I can improve (especially on the compiletime ones). I could have uploaded direct but I think the code may be way too long. Help will be dearly appreciated.Upload to e.g. Github/gist/pastebin.
Aug 11 2015
On Wednesday, 12 August 2015 at 02:49:59 UTC, Rikki Cattermole wrote:On 12/08/2015 10:50 a.m., Clayton wrote:Hi Rikki, can I have your email so I add you to my repository on BitBucket?Hello everyone, Am looking for someone who could help review my code . As an entry exercise to D am converting 3 C implementations of popular pattern matching algorithms. The idea is to have 6 final implementations ( 3 compile-time and 3 runtime) . I think am basically done with the coding, but being a beginner myself, I feel I need some do some critics so I can improve (especially on the compiletime ones). I could have uploaded direct but I think the code may be way too long. Help will be dearly appreciated.Upload to e.g. Github/gist/pastebin.
Aug 12 2015
On 13/08/2015 12:09 a.m., Clayton wrote:On Wednesday, 12 August 2015 at 02:49:59 UTC, Rikki Cattermole wrote:No need, as long as it is not propriety code feel free to post the links :) That way anybody who is willing to comment can.On 12/08/2015 10:50 a.m., Clayton wrote:Hi Rikki, can I have your email so I add you to my repository on BitBucket?Hello everyone, Am looking for someone who could help review my code . As an entry exercise to D am converting 3 C implementations of popular pattern matching algorithms. The idea is to have 6 final implementations ( 3 compile-time and 3 runtime) . I think am basically done with the coding, but being a beginner myself, I feel I need some do some critics so I can improve (especially on the compiletime ones). I could have uploaded direct but I think the code may be way too long. Help will be dearly appreciated.Upload to e.g. Github/gist/pastebin.
Aug 12 2015
On Wednesday, 12 August 2015 at 12:14:20 UTC, Rikki Cattermole wrote:On 13/08/2015 12:09 a.m., Clayton wrote:Thanks , I have put the compiletime code here : http://dpaste.dzfl.pl/f0bec44f859eOn Wednesday, 12 August 2015 at 02:49:59 UTC, Rikki Cattermole wrote:No need, as long as it is not propriety code feel free to post the links :) That way anybody who is willing to comment can.On 12/08/2015 10:50 a.m., Clayton wrote:Hi Rikki, can I have your email so I add you to my repository on BitBucket?[...]Upload to e.g. Github/gist/pastebin.
Aug 13 2015
On Tuesday, 11 August 2015 at 22:50:52 UTC, Clayton wrote:Hello everyone, Am looking for someone who could help review my code . As an entry exercise to D am converting 3 C implementations of popular pattern matching algorithms. The idea is to have 6 final implementations ( 3 compile-time and 3 runtime) . I think am basically done with the coding, but being a beginner myself, I feel I need some do some critics so I can improve (especially on the compiletime ones). I could have uploaded direct but I think the code may be way too long. Help will be dearly appreciated.Use this site: http://codereview.stackexchange.com/
Aug 12 2015
On Wednesday, 12 August 2015 at 13:14:04 UTC, sigod wrote:On Tuesday, 11 August 2015 at 22:50:52 UTC, Clayton wrote:Thanks sigod, I have also put the compiletime code here : http://dpaste.dzfl.pl/f0bec44f859eHello everyone, Am looking for someone who could help review my code . As an entry exercise to D am converting 3 C implementations of popular pattern matching algorithms. The idea is to have 6 final implementations ( 3 compile-time and 3 runtime) . I think am basically done with the coding, but being a beginner myself, I feel I need some do some critics so I can improve (especially on the compiletime ones). I could have uploaded direct but I think the code may be way too long. Help will be dearly appreciated.Use this site: http://codereview.stackexchange.com/
Aug 13 2015
On 12/08/2015 10:50 a.m., Clayton wrote:Hello everyone, Am looking for someone who could help review my code . As an entry exercise to D am converting 3 C implementations of popular pattern matching algorithms. The idea is to have 6 final implementations ( 3 compile-time and 3 runtime) . I think am basically done with the coding, but being a beginner myself, I feel I need some do some critics so I can improve (especially on the compiletime ones). I could have uploaded direct but I think the code may be way too long. Help will be dearly appreciated.http://dpaste.dzfl.pl/f0bec44f859e - COMPILETIME_BM_PRE does it really need to be all caps? - initialisebmBc interesting naming convention that - Could do with a format (Mono-D supports this) - ~~~~~~~~~~ void suffixes(S, I, int i:-1)(S pattern, ref int[size] suff, I size, ref I f, ref int g){ } void main() { int a; suffixes("", null, 0, a, a); } ~~~~~ /d481/f560.d(1): Error: undefined identifier size, did you mean alias size_t? /d481/f560.d(5): Error: template f560.suffixes cannot deduce function from argument types !()(string, typeof(null), int, int, int), candidates are: /d481/f560.d(1): f560.suffixes(S, I, int i : -1)(S pattern, ref int[size] suff, I size, ref I f, ref int g) Final dummy code I could get working: ~~~~~~~~~~~~~~ void suffixes(S, I, int i:-1)(S pattern, ref int[] suff, I size, ref I f, ref int g){ } void main() { int a, c; int[] b; suffixes!(string, int, -1)("", b, 0, a, c); } ~~~~~~~~~~~~~~ Irk, that -1 should be inside a template if condition no there and certainly not using the colon. Also size must be passed in at compile time if being used in the static array like that. Otherwise pass it via a dynamic array like that. Currently it is really ugly. Format it. Mono-D can do this. Fix up those template arguments and function arguments. They are all wrong. There is no way that should compile.
Aug 13 2015