*** menesis has quit IRC | 00:45 | |
*** hotwebmatter has joined #schooltool | 02:37 | |
*** yvl has joined #schooltool | 08:31 | |
*** menesis has joined #schooltool | 11:46 | |
*** menesis has quit IRC | 13:38 | |
*** menesis has joined #schooltool | 15:50 | |
*** th1a has joined #schooltool | 16:22 | |
*** replaceafill has joined #schooltool | 16:27 | |
th1a | hi replaceafill. | 16:30 |
---|---|---|
replaceafill | hey th1a | 16:30 |
th1a | So it is Labor Day here. | 16:30 |
th1a | Forgot to mention that. | 16:30 |
th1a | We don't celebrate it on May 1 because that would be socialist. | 16:30 |
replaceafill | ah | 16:30 |
replaceafill | :) | 16:30 |
replaceafill | ok, quick report | 16:30 |
replaceafill | fixed a bunch of unit tests | 16:31 |
replaceafill | broken by the relationship changes | 16:31 |
replaceafill | and added a view to quiz to export several quizzes | 16:31 |
replaceafill | now i will add the view to import them back | 16:31 |
* replaceafill done :) | 16:32 | |
replaceafill | i think this user https://answers.launchpad.net/schooltool/+question/253909 has been bitten by https://docs.python.org/2/tutorial/floatingpoint.html#tut-fp-issues | 16:33 |
th1a | So... yes what's happening? How much is it off? | 16:34 |
replaceafill | the system is just rounding down | 16:35 |
replaceafill | and he's expecting it to round up | 16:35 |
th1a | From what to what? | 16:35 |
replaceafill | 54.8 / 8 = 6.85 that's what he gets | 16:36 |
replaceafill | he expects 6.9 | 16:36 |
replaceafill | but the gradebook reports 6.8 | 16:36 |
replaceafill | because of the '%1.f' formatting i think | 16:36 |
th1a | Oh, are we using formatting not rounding? | 16:37 |
replaceafill | round would produce the same | 16:38 |
th1a | What is '%1.f' formatting | 16:39 |
replaceafill | limiting the float to a single decimal digit | 16:39 |
th1a | Does that round? | 16:40 |
replaceafill | as i understand it it's a limitation with floating points | 16:40 |
replaceafill | >>> Decimal(54.8) | 16:40 |
replaceafill | Decimal('54.7999999999999971578290569595992565155029296875') | 16:40 |
replaceafill | 54.8 it's not stored exactly as 54.8 | 16:40 |
th1a | Yes... but it doesn't seem like it should be so far off that we can't average a dozen numbers within 1/10th. | 16:41 |
th1a | I'm not sure what your tone is here... | 16:41 |
th1a | Presumably we can fix this? | 16:41 |
replaceafill | i just think we need to explain this to users | 16:42 |
th1a | No... | 16:42 |
th1a | we need to fix it! | 16:42 |
replaceafill | what's the fix? | 16:42 |
th1a | Surely we can average numbers correctly! | 16:43 |
th1a | We just need to round properly. | 16:45 |
th1a | round(x/y, 2) | 16:47 |
replaceafill | no | 16:48 |
replaceafill | try round(x/y, 1) | 16:48 |
replaceafill | unless you're saying we should display 2 decimal places? | 16:48 |
replaceafill | instead of just 1 | 16:49 |
th1a | Ah. | 16:49 |
th1a | Well, | 16:50 |
th1a | That would mostly solve the problem wouldn't it? | 16:50 |
th1a | In a lot more cases. | 16:50 |
replaceafill | imho that'd be the easiest fix | 16:51 |
th1a | It seems kind of bonkers. | 16:51 |
replaceafill | since it's just the average column | 16:51 |
th1a | Does it also translate to calculating grades though? | 16:51 |
replaceafill | calculating grades? | 16:52 |
th1a | I guess that's probably done with full precision. | 16:52 |
th1a | Vs. the score systems. | 16:52 |
replaceafill | iirc score system comparison uses >= | 16:53 |
replaceafill | let me check | 16:53 |
replaceafill | yes | 16:53 |
replaceafill | if average >= (value in score system) | 16:54 |
replaceafill | so it loops through all scores, until it finds a >= | 16:54 |
th1a | So... that's going to be slightly "off," but still based on the full/flawed representation of the decimal. | 16:54 |
replaceafill | yep | 16:55 |
th1a | Do floats have the same problem? | 16:55 |
replaceafill | i think so | 16:55 |
*** menesis has quit IRC | 16:56 | |
replaceafill | imho no matter how many decimal places you decide to use for formatting, the limitation will always be there | 16:57 |
replaceafill | and someone may complain they got X.XY when they were expecting X.XZ | 16:57 |
replaceafill | etc | 16:57 |
th1a | Well... | 16:57 |
replaceafill | that's why i suggest users should know about it | 16:58 |
th1a | We cannot say "Oh, by the way, it is impossible for a computer to average 8 numbers correctly." | 16:58 |
th1a | That is just absurd. | 16:59 |
th1a | Decimal “is based on a floating-point model which was designed with people in mind, and necessarily has a paramount guiding principle – computers must provide an arithmetic that works in the same way as the arithmetic that people learn at school.” – excerpt from the decimal arithmetic specification. | 17:00 |
th1a | We're not doing something correctly. | 17:01 |
th1a | The context for arithmetic is an environment specifying precision, rounding rules, limits on exponents, flags indicating the results of operations, and trap enablers which determine whether signals are treated as exceptions. Rounding options include ROUND_CEILING, ROUND_DOWN, ROUND_FLOOR, ROUND_HALF_DOWN, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_UP, and ROUND_05UP. | 17:01 |
th1a | https://docs.python.org/3/library/decimal.html | 17:02 |
replaceafill | "The context for arithmetic is an environment specifying precision, rounding rules, limits on exponents, flags indicating the results of operations, and trap enablers which determine whether signals are treated as exceptions. Rounding options include ROUND_CEILING, ROUND_DOWN, ROUND_FLOOR, ROUND_HALF_DOWN, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_UP, and ROUND_05UP." | 17:02 |
replaceafill | hey | 17:02 |
replaceafill | :D | 17:02 |
replaceafill | i had trouble copy/pasting that :P | 17:02 |
th1a | ;-) | 17:02 |
replaceafill | so we should set the context to ROUND_HALF_UP? | 17:05 |
replaceafill | ah, ROUND_05UP maybe | 17:05 |
th1a | I'm sure you can get it sorted. ;-) | 17:06 |
th1a | You've got a test case! | 17:07 |
th1a | Displaying to two decimals for the average is not a bad idea anyhow. | 17:07 |
replaceafill | glad we had this conversation, i knew about the decimal context, but never bothered in knowing what was the default :O | 17:08 |
th1a | OK. Anything else? | 17:09 |
replaceafill | nope | 17:09 |
replaceafill | no reply from Sunesh yet? | 17:09 |
th1a | Apparently not. | 17:13 |
replaceafill | ok | 17:13 |
th1a | I don't have a problem with deferring the deadline if it is ok with them. | 17:14 |
th1a | I'd rather have a little more ST time anyhow. | 17:14 |
th1a | Oh, you can send me an invoice too. | 17:14 |
replaceafill | any idea what we'll be doing after tests? | 17:14 |
replaceafill | ah | 17:14 |
replaceafill | ok, will do tonigh | 17:14 |
replaceafill | t | 17:14 |
th1a | There are some simple reports. | 17:15 |
replaceafill | ah ok | 17:15 |
th1a | I'd rather do those rather than jumping into the School tab, because I wouldn't want to be interrupted halfway into the School redesign. | 17:16 |
replaceafill | got it | 17:16 |
th1a | OK. Talk to you tomorrow. | 17:19 |
th1a | Thanks replaceafill. | 17:19 |
replaceafill | thanks th1a | 17:19 |
*** nedosa has joined #schooltool | 19:55 | |
nedosa | @replaceafill I have a quick question | 19:55 |
replaceafill | nedosa, shoot | 19:55 |
nedosa | bug https://bugs.launchpad.net/schooltool.quiz/+bug/1336972 and a few more have fix-committed but can't see the commit anywhere | 19:55 |
replaceafill | https://code.launchpad.net/~schooltool-owners/schooltool.quiz/trunk | 19:56 |
nedosa | oh, actually is it commit rev 76 ? | 19:57 |
replaceafill | yes | 19:57 |
nedosa | sorry, should have looked harder :) | 19:57 |
replaceafill | np :) | 19:57 |
replaceafill | are you testing the fixes? | 19:58 |
nedosa | yeah | 19:59 |
replaceafill | great | 19:59 |
nedosa | hmm, the image search results page is still not-styled for me | 20:03 |
nedosa | url suffix: …@@insert-image.html/ajax/view/container/insert_images_table | 20:04 |
replaceafill | nedosa, are you getting that on an individual browser window? | 20:08 |
replaceafill | i mean, you don't get a dialog with it? | 20:08 |
nedosa | indeed, yeah | 20:08 |
nedosa | i get the initial modal dialog to search | 20:08 |
nedosa | but results arrive unstyled to the parent browser window | 20:09 |
replaceafill | could you please describe the steps to get there? | 20:09 |
nedosa | the other thing with that dialog is that there's no cancel | 20:09 |
nedosa | 1. added a number of images from 'Images' tab | 20:10 |
nedosa | 2. Go to Quizzes-><quiz>->Add Question->Insert Image | 20:10 |
nedosa | 3. search for a known substring and press enter | 20:11 |
replaceafill | got it | 20:12 |
replaceafill | thanks will fix right now | 20:12 |
nedosa | great stuff | 20:12 |
nedosa | do you want me to file a bug for the search dialog not having a close button ? | 20:13 |
replaceafill | please | 20:13 |
nedosa | kk | 20:14 |
*** nedosa has left #schooltool | 20:16 | |
*** nedosa has joined #schooltool | 20:30 | |
replaceafill | nedosa, oops, fix committed | 20:55 |
replaceafill | (forgot to tell you) :) | 20:55 |
nedosa | np, thanks :) | 20:55 |
nedosa | replaceafill, https://bugs.launchpad.net/schooltool.quiz/+bug/1364120 | 21:24 |
nedosa | don't think it needs a xshot :) | 21:24 |
replaceafill | nedosa, do you see the dialog now? | 21:25 |
nedosa | haven't updated, one sec | 21:25 |
replaceafill | you should see a [x] button on the right side of the dialog title bar | 21:26 |
nedosa | yep, search results are styled | 21:30 |
nedosa | i don't see the commit with the [x] button though ? | 21:30 |
replaceafill | it's always been there | 21:31 |
replaceafill | it's jquery ui default functionality i think | 21:31 |
replaceafill | maybe i don't understand your bug? | 21:31 |
replaceafill | hold on | 21:31 |
nedosa | i'll add a xshot :) | 21:31 |
replaceafill | thanks! | 21:32 |
* replaceafill is taking one | 21:32 | |
nedosa | posted | 21:33 |
replaceafill | hhmm | 21:34 |
replaceafill | http://s28.postimg.org/wis53yzwd/Captura_de_pantalla_de_2014_09_01_12_32_28.png | 21:34 |
replaceafill | what browser/OS are you using? | 21:34 |
* replaceafill is scared nedosa will say IE... | 21:34 | |
nedosa | heh, ff 31 on mac os x :) | 21:34 |
nedosa | dear god :) | 21:35 |
replaceafill | ah | 21:35 |
replaceafill | kk, will add that info to the bug description | 21:35 |
nedosa | odd, can't even see it with chrome | 21:35 |
nedosa | ok, thanks for looking anyway | 21:35 |
replaceafill | sure | 21:35 |
replaceafill | thank you for reporting it | 21:35 |
*** nedosa has left #schooltool | 21:36 | |
*** menesis has joined #schooltool | 21:43 | |
*** mibofra has quit IRC | 21:51 | |
*** mibofra has joined #schooltool | 21:53 | |
*** mibofra has quit IRC | 22:04 | |
*** mibofra has joined #schooltool | 22:06 | |
*** mibofra has quit IRC | 22:31 | |
*** menesis has quit IRC | 22:33 | |
*** mibofra has joined #schooltool | 22:34 | |
*** menesis has joined #schooltool | 22:35 | |
*** mibofra has quit IRC | 22:43 | |
*** mibofra has joined #schooltool | 22:44 | |
*** mibofra has quit IRC | 22:50 | |
*** mibofra has joined #schooltool | 22:52 | |
*** mibofra has quit IRC | 23:32 | |
*** mibofra has joined #schooltool | 23:35 | |
*** mibofra has quit IRC | 23:48 | |
*** mibofra has joined #schooltool | 23:50 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!