Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2014-05-16

| Channels | #webwork index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:27 rbeezer_ joined #webwork
14:19 mgage joined #webwork
14:30 shdw_work joined #webwork
14:41 shdw_work Perhaps I missed something in bug 3100... I updated the library from the github zip file, but now when I enter the correct answers I get this
14:41 shdw_work Can't call method "D" on an undefined value at line 66 of (eval 2232)
14:42 shdw_work was I supposed to update AnswerChecker.pm also?
15:13 mgage joined #webwork
15:20 mgage shdw_work
15:20 mgage hi
15:21 shdw_work hey
15:22 mgage hi — regarding the bug — what is happening (probably) is that one of the $scurl[x] values is not defined.
15:22 shdw_work hmm I see Gavin responded to my update in the bug, but I can't translate what he's saying
15:22 mgage or at least not defined as a function that you can take a derivative of
15:23 mgage all I see is that he said that he had corrected the vector fields
15:24 shdw_work I suppose I'm going to have to dig deeper into how the problem is created in the code in order to understand what you're referring to
15:27 mgage probably — I haven’t dug into this at all I’ve just glanced at it.  What you see on line 67 of the problem (the line numbers for errors can be off by a few lines) that we have $scurl[2]->D(‘y’)  which means take the derivative of the Forumula in $scurl[2]  .  The error is complaining that $scurl[2] is not the kind of object one can take a derivative of.
15:28 shdw_work I wonder if it would help if I knew what a derivative was? ;-)
15:28 shdw_work yeah I'm not a math person
15:28 mgage I’m wondering whether @scurl is defined properly.  not clear that the line 65 actually puts all of the values into @scurl — it might just create the first element.
15:28 shdw_work but I do have the code up and am looking at the line you mentioned
15:29 mgage derivative of x^2 is 2x^1  and you don’t really need to know what it does —it simply transforms a Function type into a new Function type.
15:30 shdw_work ok
15:30 mgage I’d print out the contents of @scurl and see what is there.    DEBUG_MESSAGE(“scurl is “, join ( “ |”, @scurl ) )will probably work and if not that use warn ( “scurl”…….. )
15:31 shdw_work its been over 20 years since I've taken any math courses.  I'm good at it when I understand it, but its been so long since I've actually needed anything more complicated than dividing up a circle...
15:31 mgage it comes back :-)
15:31 shdw_work ok give me a moment, I'll check it
15:32 mgage you can also check the values in @stu the same way — there won’t be anything in either of them until you answer the question — this is analysis of the student anzer
15:35 mgage what you may need is Forumula($scurl[2])->D(‘y’)   in case the value of $scurl[2] is just a string and not an Formula object
15:36 mgage brb
15:37 shdw_work no problem, I'm still digging... the debug isn't showing up on the page
15:37 mgage it might not from inside an answer checker   — try using the warn command instead (that’s perl’s native command)
15:42 shdw_work erg still nothing.  I even added the semicolon at the end of the line
15:42 shdw_work warn(“scurl is “, join ( “ |”, @scurl ) );
15:43 mgage you need quotes around the |
15:43 mgage and also around the scure is string
15:43 shdw_work warn("scurl is ", join ( " |", @scurl ) );
15:43 shdw_work hmmm it pasted with reverse-quotes
15:44 shdw_work ok I re-entered the line with standard double-quotes and restarted apache, but still not showing anything
15:45 mgage that looks right — I guess warning messages are just being swallowed because it is being executed as a subroutine of something.  this can happen.  but you are getting warnings about the D method not being found.
15:46 aubreyja joined #webwork
15:46 aubreyja joined #webwork
15:47 shdw_work I put that line in right after @scurl is defined, looks like that whole block is part of a sub{} though
15:48 mgage it is.
15:49 shdw_work also tried "print STDOUT" but still no luck
15:49 mgage I don’t think I can say much more just kibbitzing and I don’t have time to work on it in detail at the moment.  I’m pretty sure that is where the problem lies however.
15:50 mgage yeah — print is disabled — it’s a source of attack
15:50 shdw_work ah ok
15:50 shdw_work well bummer
15:50 mgage usually warn works — but it’s a bit funky
15:51 shdw_work I'll be around, just let me know some day if you have some time to look at it again.
15:51 mgage kk
15:57 mgage try just puttin a return(@scurl) in where the warn message should go and see what the student answer looks like
15:59 shdw_work @scurl = Vector($stu[0])->value;
15:59 shdw_work return(@scurl);
15:59 shdw_work is that right?  Nothing changed on the screen
16:37 mgage shdw_work:  I just ran the version that I pulled off github and it worked for me.
16:37 shdw_work well bugger
16:40 mgage also DEBUG_MESSAGE() doesn’t work for me but warn()  does — but you have to enter an answer before you’ll see that message since the subroutine is run to check a student’s answer
16:41 shdw_work right, I just copied the answers after showing correct answer.  The 'answer preview' and 'correct' boxes show the same values, on both lines, but it still says the results are incorrect
16:46 shdw_work hmm there's a difference of 17 bytes between the version I have, and whats in git
16:47 shdw_work erg... replaced Q04.pg, still get the same failure
16:51 shdw_work damnit... for some reason the test version is pulling library data from the production folder
16:52 shdw_work replaced Q04 in production, now the problem is loking for a different answer
17:01 shdw_work and it works!
17:02 mgage cool.   — glad that worked out
17:02 shdw_work so maybe I grabbed the zip file before it had been rebuilt with the updates
18:29 goehle joined #webwork
18:32 rbeezer joined #webwork
21:18 goehle left #webwork
22:35 rbeezer joined #webwork

| Channels | #webwork index | Today | | Search | Google Search | Plain-Text | summary