Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2013-02-28

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

All times shown according to UTC.

Time Nick Message
05:54 rbeezer joined #webwork
13:36 goehle_ joined #webwork
15:23 rbeezer joined #webwork
16:16 mgage_ joined #webwork
16:16 mgage_ aubreyja: hi
16:28 mgage_ aubreyja: hi
16:43 mgage_ joined #webwork
17:31 mgage_ joined #webwork
18:09 goehle_ hey
18:09 mgage hi
18:09 goehle_ I have a pg question
18:09 mgage k
18:09 goehle_ I'm trying to have students enter a binary string
18:09 goehle_ but it keeps chopping the leading zeros
18:10 mgage hmm -- it's possible that it is just doing that when it prints,  not when it accepts the students answer.
18:11 goehle_ Its also counted as wrong
18:11 mgage if I remember correctly we trim white space off both ends of the student answers but not zeros
18:11 mgage are you doing a string compare?
18:11 goehle_ I'm using the String object
18:13 mgage sry -- no immediate insight.   you could use str_cmp    to see if that behaves differently (older technology)  ANS(str_cmp('00010101') );
18:14 mgage Davide has updated the MathObjects docs on the wiki so there might be a clue there -- after that I'd have to read the code.
18:14 goehle_ i'l try it out
18:16 mgage rbeezer: around?
18:16 goehle_ another question, if you dont mind
18:17 mgage go ahead
18:17 goehle_ if I want an image to be used in a problem
18:17 goehle_ where should I put that?
18:19 mgage put it in a directory at the same level:  the standard approach is    problem4/problem4.pg  problem4/pictureForProblem4.png   -- if the directory name and the name of the .pg problem enclosed match then WeBWorK assumes they go together -- you can refer to the png as   alias("pictureForProblem4.png") and it will be found.
18:19 mgage I still regret that the old macintosh idea of a resource fork never made it into the unix version of macs - it was a handy way to take care of this problem.
18:21 mgage _most_ of the tools handle this convention well however.   trying to edit such a problem while it is in a library may not work perfectly -- the temporary editing and editing when it is in a standard homework set works well
18:22 goehle_ thanks, :)
18:22 mgage np
18:23 goehle_ str_comp works
18:23 goehle_ str_cmp, rather
18:23 goehle_ Context()->strings->add('0110111'=>{})
18:23 goehle_ $ans1 = String('0110111');
18:23 goehle_ ANS($ans1->cmp);
18:23 goehle_ was what I had before
18:24 mgage great -- you might mention this to Davide.  there might be some "helpful" optimization occurring that we should back out of a little.
18:24 goehle_ yeah
18:24 goehle_ because when I clicked
18:24 goehle_ "show correct answers" the first time
18:24 goehle_ I was shown the "correct" correct answer
18:25 goehle_ but after I had submitted once, even the "correct answer" was missing its leading zeros
18:25 mgage there could be a little more work on making the MathObjects String object and the old str_cmp style play together nicely
18:25 mgage post it to bugzilla -- but send a note to Davide also -- we can look at it next week -- it's probably not a big tweak
18:26 goehle_ will do
18:26 goehle_ its a custom problem
18:26 mgage brb
18:26 goehle_ so I'll just have to describe it by hand
18:26 mgage you can probably post a 4 line example that exhibits the behavior.
18:30 rbeezer mgage: just out of class, at my desk for an hour or so
18:45 mgage rbeezer: hi
18:46 mgage just checking how much you are using the course on hosted2 these days -- I may make some changes over the weekend and wanted to give you a heads up.
18:47 rbeezer they have a set due late Sunday night, I can warn them, I'll be online regularly over the weekend
18:47 mgage ok -- I'll be careful then if they are working over the weekend.  if there are outages they will be short.
18:47 mgage I want a few things tested before the code camp in Raleigh
18:48 rbeezer Alright, I'll warn them, ask them to report problems and try to stay on top of it, I should have IRC open all weekend.
18:48 rbeezer Thanks for letting me know
18:48 mgage np.  I'll have irc up also
18:49 rbeezer The class is all CS majors, so they are sympathetic.  Though when I told them how responsive you are on IRC, they all pulled faces.  They didn't know what IRC is.  ;-)
18:50 mgage yep -- it's old school -- but lots of open source stuff uses it. You should point them at the POSSE and TeachingOpensource websites -- they might be interested.
18:50 mgage http://teachingopensource.org/index.php/Main_Page
18:50 rbeezer Good idea, I've seen those sites but forgotten about them
18:51 mgage http://teachingopensource.org/index.php/POSSE_RIT
18:54 rbeezer mgage: thanks for the links
19:24 mgage_ joined #webwork
23:14 rbeezer joined #webwork
23:21 mgage_ joined #webwork

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