Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2013-01-22

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

All times shown according to UTC.

Time Nick Message
13:23 goehle joined #webwork
14:27 mgage_ joined #webwork
14:50 aubreyja joined #webwork
15:01 aubreyja gage, goehle: Quick question - is there an easy way to disable randomization for all sets/problems in a course?(E.g. for a placement test.)  I'm thinking along the lines of somehow nullifying/restricting $main::PGrandom in course.conf…
15:01 aubreyja mgage, I meant
15:15 mgage_ hi
15:15 mgage_ aubreyja: hi
15:16 aubreyja Hi -
15:16 mgage_ not an easy way that I know of -- there might be a hack
15:17 mgage_ somehow you want to control problemSeed
15:18 mgage_ I think that gets set after course.conf -- so I don't think there is an easy way to control it
15:18 aubreyja yeah, that's what I was thinking just now, but that this is probably doable in a macro file - something that overrides wherever PGrandom gets called...
15:18 mgage_ you could use an external script to set problem seed directly in the database perhaps.
15:19 mgage_ that's true
15:19 aubreyja that's true - this is for someone who has set up a nice placement test but doesn't want to edit the problems to remove the randomization...
15:22 aubreyja I think this is totally doable - somewhere there is a function that grabs the seed from the database and uses that to instantiate a pgrandom object, so I just have to find that - the rest is just details :)
15:25 mgage_ The PGrandom is defined in lib/PGrandom.pm  -- the seed is set when PGrandom object is created from the $envir{problemSeed}  variable -- that gets set in PG.pm and Local.pm
15:30 mgage_ my guess is that your best bets are to change the $envir variable after it is defined either at line 200 after it's been defined.
15:31 aubreyja thx for the help - I've got a meeting to run to but I'll see if I can put something together in a bit
15:32 mgage_ you could also change it in line 34 of the PG.pl file -- that might be more light weight.  Before creating PGcore you replace $rh_envir->[problemSeed} with a PGspecial varialble defined in course.conf
15:32 mgage_ kk
15:32 mgage_ I'll talk to you later about the end of the hangout yesterday
15:32 aubreyja that's a good idea - back in a bit
15:32 mgage_ and what has to be done next
15:32 aubreyja sure
15:32 mgage_ headed for school
15:42 mgage_ you can also reset the seed in PGcourse.pl   $PG->{PG_random_generator}->seed($overrideSeed);
15:43 mgage_ or use srand(overrideSeed)    srand() and seed() are synonyms
16:22 djun joined #webwork
16:24 djun joined #webwork
16:58 djun joined #webwork
18:07 Paul__ joined #webwork
18:10 aubreyja hi mgage_, mgage: around? I'm available to discuss Raleigh when you've got time
18:31 djun joined #webwork
18:36 goehle hey
18:36 goehle anyone here work with the maa servers?
18:37 goehle ping: aubreyja, mgage, mgage_
18:48 aubreyja Hi goehle - wassup?
18:49 goehle Someone emailed me wanting to use achievements.  They say they are on an maa server bit its not a current enough version of webwork for them
18:49 goehle I said I would ask to see if they could be transferred to a more current server
18:50 aubreyja ah, which server are they on? We may be able to do this -
18:51 aubreyja I don't know if any of the production servers currently run 2.5.1.1 though, which server are they on?
18:52 goehle I only know their name
18:53 aubreyja what's their name? I can look it up
18:53 goehle Serge Ballif teaching at Nevada State College
18:53 aubreyja k - just a minute
19:02 aubreyja ok, I found it - it's true that his server doesn't have achievements.  The server test.webwork.maa.org does have it - lemme figure out with Mike if it would be best move his course or just to upgrade the ftcourses server.  If we did it right, an upgrade should go pretty smoothly, if…
19:03 goehle yeah
19:03 goehle if....
19:04 goehle if not, I could move him to wcu's server
19:04 goehle (as long as I didn't ask for permission and didn't make a habit of it)
19:30 mgage aubreyja: I'd be fine with upgrading courses.webwork.maa.org to 2.5.1.1 but I'm not the most conservative of administrators. :-)  I've been leaving those decisions to others.
19:32 aubreyja this course is on ftcourses.  I think we can probably pull off a fairly quick upgrade - the only question is - we'll need to upgrade the courses on the server - will users notice that their courses need to be upgraded if they *don't* try to use achievements?
19:33 aubreyja upgrading all of the courses will take a few minutes - I just don't want people to freak out because the are getting errors all of the sudden
19:33 goehle Its been a while since I've done an upgrade like that, but if I remember right, courses don't complain about missing tables unless they try to use them
19:33 goehle (so unless they actually turn achievements on)
19:33 mgage I don't think so -- but they might notice the achievements link and get confused -- I think we could turn that link on only for certain courses.
19:33 goehle that being said I dont know if 2.5.1.1 contains the past answers database
19:34 goehle if it does then all of the coruses will need to be upgraded before they will work properly
19:34 goehle hmm
19:34 aubreyja I'm on 2.5.1.1 and it's there
19:34 goehle or maybe not, wasn't past answers a global table
19:34 mgage 2.5.1.1 doesn't contain the past answers database -- that comes with the essayQuestions --- these things are in ww2.5.1.3 which I think is also reasonably safe -- I'm planning to put it on test soon.
19:34 aubreyja ah, past answers - sorry - that's not in 2.5.1.1
19:34 goehle ah, ok
19:35 mgage 2.5.1.1 past answers is still a log file -- I'm pretty sure.
19:36 goehle then it "should" be fine as long as unupgraded courses don't turn on achievements.
19:36 aubreyja ok, I'll prepare an upgrade of ftcourses - Mike - are you ok with that? And I'll aim to do the actual switch Wednesday or Thursday morning (probably Thursday).
19:36 mgage I think it's pretty safe.  The reason essayQuestions and the pastAnswer database table were left out of 2.5.1.1 was that it would require a database upgrade -- and people were skittish about that at the time.
19:37 goehle doesnt 2.5.1.1 also require ad atabase upgrade though
19:37 goehle (for achievements?)
19:37 aubreyja I wouldn't jump in and do it if we had a set upgrade schedule, but since we don't things aren't being upgraded regularly
19:37 mgage I'm ok with that.  I can help or at least do backup Thursday morning.
19:37 aubreyja yeah, it does - I'll do that too on Thursday morning, but it will take some time (like, 15 minutes to finish them all)
19:38 goehle I didn't mean to make you upgrade after classes have started, but serge will be happy
19:39 aubreyja well, like I said, we don't' have a regular upgrade schedule
19:39 goehle and he learned about it at the jmm.  So if they were be advertised there then maybe other people are looking for them
19:39 mgage yes -- MathAchievements also added new databases.
19:39 mgage database tables
19:39 aubreyja also, these really *should* be on the github code (the svn is old) and since so many different places use it there is probably no particularly great time to do an upgrade
19:40 goehle true enough
19:40 mgage There are people looking for essayQuestions as well -- which is why I prepared 2.5.1.3 (to be fair essayQuestions were only announced as being in the works)
19:40 goehle i've been doing a little bit of upgrading to those
19:40 goehle I'll get that done as soon as I can
19:40 goehle also, I figured out a way to contribute to model courses
19:41 goehle once we have a couple of model courses set up I can create some more custom achievements for them, and get everything setup so that achievements will run automatically if they are turned on
19:41 mgage great -- why don't you pull the 2.5.1.3 copy on my site mgage  and reconcile it with your upgrades and then send me a pull request.
19:41 aubreyja for people generally to contribute you mean or a way for you to contributee?
19:41 aubreyja ah, that would be great!
19:41 goehle yeah, I spent a little last week getting 2.5.1.3 synced to my dev server
19:42 mgage thanks.  let me know if you find any issues. I haven't yet, but it hasn't been heavily tested by students yet.
19:42 goehle will do
19:42 goehle I think we should at least get the email comments feature in there before we include it as an official thing
19:42 goehle since I think emailing comments will be something people consider "core" functionality
19:43 goehle but its up to you
19:43 mgage jason, we can create  webwork/pg_251 and webwork/webwork2_2511 directories and link pg and webwork2 to them -- that makes it pretty easy to back out if something goes wrong.  The only real worry is that the course databases get changed and they are hard to back out of.  We can just upgrade one course (say gage_course or aubrey_course) and test before we upgrade the rest of them.
19:44 mgage I haven't made ww2.5.1.3 "official" yet -- just available and I hope useable.  That way Robin Cruz and Rob Beezer can work with it -- which they really want to do.
19:45 aubreyja sounds good - I'll get started on it tonight or tomorrow
19:45 mgage There are some others as well.   ww2.5.2 looks to funky to students to be ready for general use just yet IMHO.
19:46 mgage aubreyja:  did you see my last comment about setting a fixed problemSeed for the course?  I think the cleanest mechanism is in PGcourse.pl
19:47 aubreyja yeah, I've been testing that but the seed keeps coming back as given in the homework sets editor
19:49 aubreyja Actually, I set $envir{problemSeed} and $rh_envir->{problemSeed} to a fixed value in PG.pl just above where it makes a new PGcore object, but no luck.
19:49 aubreyja The PG.pl was a copy of PG.pl in the course templates directory
19:49 aubreyja but Local.pm gets it's PG.pl from $ce->{pg}->{directories}->{macros}
19:50 mgage well you won't have overwritten the problemSeed.  but I think you will have changed all of the outputs of the PGrandom object -- which drives the random() macro.  You'll need to look in the fields of the PGrandom.pm to see what is going on -- and realize that PGcore creates an instance of PGrandom in $PG->{PG_random_generator}
19:50 djun joined #webwork
19:51 mgage Changing  the value in PGcourse.pl means that the seed value is changed after PGcore is created in PG.pl   -- but before random() is called --
19:51 mgage I don't think there are any macros that call random() internally -- but it's possible that I'm wrong about that.
19:53 aubreyja Right, it won't overwrite the problem seed but it *should* result in the problem being the same even if I change the seed in the Hmwk Sets Editor, but that didn't seem to happen.
19:53 aubreyja I'll try it out with PGcourse.pl
19:54 mgage We could also change where Local looks for PG.pl just to make everything consistent, but changing PGcourse.pl seems cleaner.   and you are right if this is working changing the seed in the hmwk editor will have no effect.
19:54 aubreyja Another thing is that PGinfo.pl's listVariables() method doesn't give my fixed seed even though it's just printing out %envir
19:55 mgage I think it's because your local PG.pl file is not being read. perhaps??
19:56 aubreyja yeah, I think it's not - my guess right now is that only the copy in pg/macros gets read (from Local.pm)
19:56 aubreyja so, maybe we don't even need to load it in a problem :)
19:58 mgage that's right -- you can just set it for the course or even for one set in the course.
19:58 mgage and it's pretty clean -- no hacks.
19:59 aubreyja for example, I just took it out of PGstandard.pl and don't immediately see any problems
20:02 aubreyja can that be right? if so then I wonder what effect re-loading it in PGstandard.pl does have besides possibly increasing the memory footprint
20:07 mgage I don't think it will reload -- things are set up so that even if you call a macro file twice it won't reload (when things are working)
20:09 mgage The reason that PG is treated a bit differently is for an intermediate period we were preloading several files into the Safe compartment to speed things up.  In the original CGI version PG.pl was loaded everytime and we mostly left the calls to load PG.pl in the because they weren't doing any harm.
20:09 mgage recently we've been loading the PG files everytime because the machines are faster and since we are using objects more the scripts load faster intrinsically.
20:12 aubreyja but when PG.pl is called a second time (via PGstandard.pl, say), it's not unrestricted_eval, so don't we get subroutines, variables, etc., buried in the safe compartment and never called?
20:13 aubreyja in other words, it looks like the PG things from PG.pl called in Local.pm get used, but PG things from PG.pl called in a problem file aren't getting used
20:15 mgage that's right -- I think we could revert to having PG.pl treated just like every other macro file at this point, but I'd want to do that as part of the final push to put objects in as the foundation of PG.  Finishing PGcore and PGalias, etc.
20:19 aubreyja I think I'm on the side of preloading in Local.pm (rather than re-loading each time in problem files) since  mod_perl seems to benefit a lot from preloading as much code as possible from a performance point of view
20:21 Paul__ joined #webwork
20:30 mgage that was the intermediate view -- and I'd like to do time trials before I make a final decision.  With objects most of the code is preloaded anyway and files like PG.pl and PGbasic.pl have become just covers that create pointers to the existing objects -- this is pretty similar to what was happening before when the scripts in the cached safe compartment were moved over to the current safe compartment.
20:31 mgage I suspect that at this point the speed difference is minimal, but I'd like to test it.
20:31 aubreyja yeah,  testing would be good
23:29 djun joined #webwork

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