--- Log opened Thu Aug 01 00:00:37 2013 | ||
-!- munaafghumran [~mg0950@eduroam-wireless-pat4.nomadic.bris.ac.uk] has joined #mageec | 09:11 | |
munaafghumran | jeremybennett: could you introduce me to Nigel and Albert for the ML discussions please | 09:12 |
---|---|---|
@jeremybennett | munaafghumran: Thanks for the reminder. I'm just on a call at the moment. If you haven't seen an email by 1:30, please ping me again! | 11:05 |
-!- jamespallister [~jamespall@eduroam-wireless-pat0.nomadic.bris.ac.uk] has joined #mageec | 11:40 | |
-!- munaafghumran [~mg0950@eduroam-wireless-pat4.nomadic.bris.ac.uk] has quit [Ping timeout: 248 seconds] | 11:48 | |
AWhetter | jeremybennett: On the benchmarks, why did you decide to use rand() instead of jrand()? | 11:48 |
jamespallister | rand is part of the standard library | 11:54 |
jamespallister | jrand was a hack by me when i couldn't get the std library to work | 11:54 |
AWhetter | Is rand reproducible though? I'm getting inconsistencies across arm and x86 which makes self-verifying difficult. | 11:57 |
@simoncook | is it the same rand on all targets/seeded the same? | 12:00 |
AWhetter | It might be that newlib is doing rand differently on ARM, but it's seeded the same | 12:02 |
@simoncook | It would surprise me if glibc and newlib rand is exactly the same | 12:03 |
AWhetter | Can I use jrand then? | 12:08 |
jamespallister | rand is not random | 12:11 |
jamespallister | pseudo random, with a seed | 12:11 |
jamespallister | I thought the C standard library specified the specific formula that rand had to be | 12:11 |
jamespallister | although I'm not sure on that | 12:14 |
jamespallister | jeremybennett, amylaar_, any ideas? | 12:14 |
@jeremybennett | I suggest do a few quick tests. | 12:14 |
amylaar_ | man pages are often helpful. | 12:15 |
amylaar_ | For a definite answer with regards to the standard, you have to look at the standard, of course. | 12:16 |
amylaar_ | I remember that I've submitted some *rand* patches for newlib. But didn't get nowhere. | 12:17 |
amylaar_ | Oh, there was a review, but then I didn't really know the answer to a question. | 12:19 |
amylaar_ | And ran out of time for the project. | 12:19 |
amylaar_ | http://sourceware.org/ml/newlib/2012/msg00537.html | 12:19 |
amylaar_ | And we still don't have enough time allocated for epiphany... | 12:20 |
amylaar_ | Maybe you can pick this up for MAGEEC? | 12:20 |
@simoncook | jamespallister: AWhetter: reading http://en.cppreference.com/w/c/numeric/random/rand under notes mentioning about some implementations having serious shortcomings in randomness, I would say there is no set algorithm, one rand is different to another | 12:21 |
@simoncook | also, http://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/random_r.c;h=a393dd3c199b5b08a16f3044f2a3bc21f8e88410;hb=HEAD#l360 http://sourceware.org/git/?p=newlib.git;a=blob;f=newlib/libc/stdlib/rand_r.c;h=437739ef5a6a78a28a0d0089724fa6d5f2178ac9;hb=HEAD | 12:22 |
jamespallister | Perhaps having a standard implementation of it would be useful then | 12:45 |
jamespallister | for the benchmark suite | 12:45 |
-!- munaafghumran [~mg0950@eduroam-wireless-pat4.nomadic.bris.ac.uk] has joined #mageec | 13:22 | |
AWhetter | I'll keep jrand for now then and add a better implementation to the TODO | 13:44 |
@jeremybennett | AWhetter: I suggest if you want to use jrand, you should provide for it in platformcode.[ch] with a default implementation which calls rand. | 14:02 |
AWhetter | I don't understand what you mean. I'd be using jrand so that I don't have to use rand. | 14:10 |
@jeremybennett | So - we want these to work out of the box. | 14:23 |
@jeremybennett | If you use jrand, then they will not compile out of the box, unless you provide a default implementation of jrand. | 14:24 |
@jeremybennett | Are you proposing to provide that, and define it is the implementation that must be used? | 14:24 |
@jeremybennett | Or are you going to allow the user to decide if they want to provide their own implementation? | 14:25 |
@jeremybennett | If the former, then the implementation of jrand belongs in platformcode.c (assuming you are using the code structure I have in GitHub). | 14:25 |
@jeremybennett | Otherwise you should provide just a default implementation of jrand and allow the user to change it. | 14:26 |
@jeremybennett | In terms of code both are identical. It only affects what you put in the comments are README. | 14:26 |
@jeremybennett | There is a minor wrinkle, that not being a library, jrand will be linked in whether you use it or not, so programs that do not use jrand will be slightly bigger than before. | 14:27 |
AWhetter | oh ok. I'd already pulled platform code in from the other repository on my branch, but I see you've done the same so I'll merge it all together | 14:27 |
@jeremybennett | You can get round the increased size issue by making jrand into a library that is linked against, but I wouldn't bother with that unless your implementation is very large. | 14:28 |
@jeremybennett | At some stage I'll put an autotools infrastructure in to make building more standardized and maintainable. | 14:28 |
-!- munaafghumran [~mg0950@eduroam-wireless-pat4.nomadic.bris.ac.uk] has quit [Ping timeout: 240 seconds] | 15:01 | |
-!- jamespallister [~jamespall@eduroam-wireless-pat0.nomadic.bris.ac.uk] has quit [Ping timeout: 276 seconds] | 15:05 | |
-!- jamespallister [~jamespall@eduroam-wireless-pat0.nomadic.bris.ac.uk] has joined #mageec | 15:26 | |
-!- jeremybennett [~jeremy@cust64-dsl91-135-5.idnet.net] has quit [Ping timeout: 246 seconds] | 15:33 | |
-!- jamespallister [~jamespall@eduroam-wireless-pat0.nomadic.bris.ac.uk] has quit [Ping timeout: 246 seconds] | 15:43 | |
-!- jeremybennett [~jeremy@cust64-dsl91-135-5.idnet.net] has joined #mageec | 15:46 | |
-!- mode/#mageec [+o jeremybennett] by ChanServ | 15:46 | |
-!- jamespallister [~jamespall@94-192-83-3.zone6.bethere.co.uk] has joined #mageec | 21:56 | |
-!- jamespallister [~jamespall@94-192-83-3.zone6.bethere.co.uk] has quit [Quit: Leaving] | 23:35 | |
--- Log closed Fri Aug 02 00:00:44 2013 |
Generated by irclog2html.py 2.12.1 by Marius Gedminas - find it at mg.pov.lt!