IRC log of #schooltool for Monday, 2014-09-01

*** menesis has quit IRC00:45
*** hotwebmatter has joined #schooltool02:37
*** yvl has joined #schooltool08:31
*** menesis has joined #schooltool11:46
*** menesis has quit IRC13:38
*** menesis has joined #schooltool15:50
*** th1a has joined #schooltool16:22
*** replaceafill has joined #schooltool16:27
th1ahi replaceafill.16:30
replaceafillhey th1a16:30
th1aSo it is Labor Day here.16:30
th1aForgot to mention that.16:30
th1aWe don't celebrate it on May 1 because that would be socialist.16:30
replaceafillah16:30
replaceafill:)16:30
replaceafillok, quick report16:30
replaceafillfixed a bunch of unit tests16:31
replaceafillbroken by the relationship changes16:31
replaceafilland added a view to quiz to export several quizzes16:31
replaceafillnow i will add the view to import them back16:31
* replaceafill done :)16:32
replaceafilli think this user https://answers.launchpad.net/schooltool/+question/253909 has been bitten by https://docs.python.org/2/tutorial/floatingpoint.html#tut-fp-issues16:33
th1aSo... yes what's happening?  How much is it off?16:34
replaceafillthe system is just rounding down16:35
replaceafilland he's expecting it to round up16:35
th1aFrom what to what?16:35
replaceafill54.8 / 8 = 6.85 that's what he gets16:36
replaceafillhe expects 6.916:36
replaceafillbut the gradebook reports 6.816:36
replaceafillbecause of the '%1.f' formatting i think16:36
th1aOh, are we using formatting not rounding?16:37
replaceafillround would produce the same16:38
th1aWhat is  '%1.f' formatting16:39
replaceafilllimiting the float to a single decimal digit16:39
th1aDoes that round?16:40
replaceafillas i understand it it's a limitation with floating points16:40
replaceafill>>> Decimal(54.8)16:40
replaceafillDecimal('54.7999999999999971578290569595992565155029296875')16:40
replaceafill54.8 it's not stored exactly as 54.816:40
th1aYes... 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
th1aI'm not sure what your tone is here...16:41
th1aPresumably we can fix this?16:41
replaceafilli just think we need to explain this to users16:42
th1aNo...16:42
th1awe need to fix it!16:42
replaceafillwhat's the fix?16:42
th1aSurely we can average numbers correctly!16:43
th1aWe just need to round properly.16:45
th1around(x/y, 2)16:47
replaceafillno16:48
replaceafilltry round(x/y, 1)16:48
replaceafillunless you're saying we should display 2 decimal places?16:48
replaceafillinstead of just 116:49
th1aAh.16:49
th1aWell,16:50
th1aThat would mostly solve the problem wouldn't it?16:50
th1aIn a lot more cases.16:50
replaceafillimho that'd be the easiest fix16:51
th1aIt seems kind of bonkers.16:51
replaceafillsince it's just the average column16:51
th1aDoes it also translate to calculating grades though?16:51
replaceafillcalculating grades?16:52
th1aI guess that's probably done with full precision.16:52
th1aVs. the score systems.16:52
replaceafilliirc score system comparison uses >=16:53
replaceafilllet me check16:53
replaceafillyes16:53
replaceafillif average >= (value in score system)16:54
replaceafillso it loops through all scores, until it finds a >=16:54
th1aSo... that's going to be slightly "off," but still based on the full/flawed representation of the decimal.16:54
replaceafillyep16:55
th1aDo floats have the same problem?16:55
replaceafilli think so16:55
*** menesis has quit IRC16:56
replaceafillimho no matter how many decimal places you decide to use for formatting, the limitation will always be there16:57
replaceafilland someone may complain they got X.XY when they were expecting X.XZ16:57
replaceafilletc16:57
th1aWell...16:57
replaceafillthat's why i suggest users should know about it16:58
th1aWe cannot say "Oh, by the way, it is impossible for a computer to average 8 numbers correctly."16:58
th1aThat is just absurd.16:59
th1aDecimal “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
th1aWe're not doing something correctly.17:01
th1aThe 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
th1ahttps://docs.python.org/3/library/decimal.html17: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
replaceafillhey17:02
replaceafill:D17:02
replaceafilli had trouble copy/pasting that :P17:02
th1a;-)17:02
replaceafillso we should set the context to ROUND_HALF_UP?17:05
replaceafillah, ROUND_05UP maybe17:05
th1aI'm sure you can get it sorted.  ;-)17:06
th1aYou've got a test case!17:07
th1aDisplaying to two decimals for the average is not a bad idea anyhow.17:07
replaceafillglad we had this conversation, i knew about the decimal context, but never bothered in knowing what was the default :O17:08
th1aOK.  Anything else?17:09
replaceafillnope17:09
replaceafillno reply from Sunesh yet?17:09
th1aApparently not.17:13
replaceafillok17:13
th1aI don't have a problem with deferring the deadline if it is ok with them.17:14
th1aI'd rather have a little more ST time anyhow.17:14
th1aOh, you can send me an invoice too.17:14
replaceafillany idea what we'll be doing after tests?17:14
replaceafillah17:14
replaceafillok, will do tonigh17:14
replaceafillt17:14
th1aThere are some simple reports.17:15
replaceafillah ok17:15
th1aI'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
replaceafillgot it17:16
th1aOK.  Talk to you tomorrow.17:19
th1aThanks replaceafill.17:19
replaceafillthanks th1a17:19
*** nedosa has joined #schooltool19:55
nedosa@replaceafill I have a quick question19:55
replaceafillnedosa, shoot19:55
nedosabug https://bugs.launchpad.net/schooltool.quiz/+bug/1336972 and a few more have fix-committed but can't see the commit anywhere19:55
replaceafillhttps://code.launchpad.net/~schooltool-owners/schooltool.quiz/trunk19:56
nedosaoh, actually is it commit rev 76 ?19:57
replaceafillyes19:57
nedosasorry, should have looked harder :)19:57
replaceafillnp :)19:57
replaceafillare you testing the fixes?19:58
nedosayeah19:59
replaceafillgreat19:59
nedosahmm, the image search results page is still not-styled for me20:03
nedosaurl suffix: …@@insert-image.html/ajax/view/container/insert_images_table20:04
replaceafillnedosa, are you getting that on an individual browser window?20:08
replaceafilli mean, you don't get a dialog with it?20:08
nedosaindeed, yeah20:08
nedosai get the initial modal dialog to search20:08
nedosabut results arrive unstyled to the parent browser window20:09
replaceafillcould you please describe the steps to get there?20:09
nedosathe other thing with that dialog is that there's no cancel20:09
nedosa1. added a number of images from 'Images' tab20:10
nedosa2. Go to Quizzes-><quiz>->Add Question->Insert Image20:10
nedosa3. search for a known substring and press enter20:11
replaceafillgot it20:12
replaceafillthanks will fix right now20:12
nedosagreat stuff20:12
nedosado you want me to file a bug for the search dialog not having a close button ?20:13
replaceafillplease20:13
nedosakk20:14
*** nedosa has left #schooltool20:16
*** nedosa has joined #schooltool20:30
replaceafillnedosa, oops, fix committed20:55
replaceafill(forgot to tell you) :)20:55
nedosanp, thanks :)20:55
nedosareplaceafill, https://bugs.launchpad.net/schooltool.quiz/+bug/136412021:24
nedosadon't think it needs a xshot :)21:24
replaceafillnedosa, do you see the dialog now?21:25
nedosahaven't updated, one sec21:25
replaceafillyou should see a [x] button on the right side of the dialog title bar21:26
nedosayep, search results are styled21:30
nedosai don't see the commit with the [x] button though ?21:30
replaceafillit's always been there21:31
replaceafillit's jquery ui default functionality i think21:31
replaceafillmaybe i don't understand your bug?21:31
replaceafillhold on21:31
nedosai'll add a xshot :)21:31
replaceafillthanks!21:32
* replaceafill is taking one21:32
nedosaposted21:33
replaceafillhhmm21:34
replaceafillhttp://s28.postimg.org/wis53yzwd/Captura_de_pantalla_de_2014_09_01_12_32_28.png21:34
replaceafillwhat browser/OS are you using?21:34
* replaceafill is scared nedosa will say IE...21:34
nedosaheh, ff 31 on mac os x :)21:34
nedosadear god :)21:35
replaceafillah21:35
replaceafillkk, will add that info to the bug description21:35
nedosaodd, can't even see it with chrome21:35
nedosaok, thanks for looking anyway21:35
replaceafillsure21:35
replaceafillthank you for reporting it21:35
*** nedosa has left #schooltool21:36
*** menesis has joined #schooltool21:43
*** mibofra has quit IRC21:51
*** mibofra has joined #schooltool21:53
*** mibofra has quit IRC22:04
*** mibofra has joined #schooltool22:06
*** mibofra has quit IRC22:31
*** menesis has quit IRC22:33
*** mibofra has joined #schooltool22:34
*** menesis has joined #schooltool22:35
*** mibofra has quit IRC22:43
*** mibofra has joined #schooltool22:44
*** mibofra has quit IRC22:50
*** mibofra has joined #schooltool22:52
*** mibofra has quit IRC23:32
*** mibofra has joined #schooltool23:35
*** mibofra has quit IRC23:48
*** mibofra has joined #schooltool23:50

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!